refactor(init): clarify public helper ownership #553

Merged
barrettruth merged 2 commits from refactor/public-submodule-boundaries-549 into main 2026-04-29 20:05:06 +00:00
barrettruth commented 2026-04-29 19:59:19 +00:00

Problem

The root require('forge') surface still bundled helper-style exports whose owning public facades already existed elsewhere, and the :Forge command implementation still exposed a flat set of internal cmd_* modules at the root of lua/forge/.

Solution

Turn lua/forge/init.lua into a thinner assembly layer by aliasing helper exports directly from forge.pr, forge.issue, forge.repo, forge.format, and forge.review; move repo_info() onto forge.repo; document the owning helper modules in the help file; add a focused spec that locks the root compatibility shims to those owners; and move the internal command parser, completion, dispatch, and resolver helpers under lua/forge/cmd/ while keeping require('forge.cmd') stable via cmd/init.lua.

Closes #549
Closes #550

## Problem The root `require('forge')` surface still bundled helper-style exports whose owning public facades already existed elsewhere, and the `:Forge` command implementation still exposed a flat set of internal `cmd_*` modules at the root of `lua/forge/`. ## Solution Turn `lua/forge/init.lua` into a thinner assembly layer by aliasing helper exports directly from `forge.pr`, `forge.issue`, `forge.repo`, `forge.format`, and `forge.review`; move `repo_info()` onto `forge.repo`; document the owning helper modules in the help file; add a focused spec that locks the root compatibility shims to those owners; and move the internal command parser, completion, dispatch, and resolver helpers under `lua/forge/cmd/` while keeping `require('forge.cmd')` stable via `cmd/init.lua`. Closes #549 Closes #550
Sign in to join this conversation.
No description provided.