You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
internal/ holds cmd-only code; CLI packages belong in cmd/internal #742
internal/ at the repository root is importable by the whole module. cmd/internal/ is importable only by
the commands. Every package under internal/ is imported only by cmd/, so the wider visibility buys
nothing and misplaces the code.
Measured
Package
Imported by cmd/
Imported by pkg/ or other internal/
internal/console
3 files
0
internal/credentials
2 files
0
internal/manifest
4 files
0
internal/registry
4 files
0
The clearest case is internal/console
It is a Bubble Tea terminal UI — charmbracelet/bubbletea, bubbles/spinner, bubbles/textinput, plus model.go, session.go, and styles.go. That is CLI presentation, and its only consumers are cmd/writ/writ/migrate_cmd.go and cmd/writ/writ/migrate/. It belongs beside the other CLI plumbing in cmd/internal/.
The other three need a judgment, not a sweep
credentials, manifest, and registry are domain packages that happen to have only command consumers
today. The visibility argument applies to them equally, but "used only by cmd right now" is weaker than "is
CLI code": a future pkg/ consumer would be legitimate for a manifest parser and not for a Bubble Tea
model. Each should be moved or left deliberately, with the reason recorded.
Why it matters beyond tidiness
Root internal/ invites a pkg/ package to import CLI presentation, which would drag Bubble Tea into the
library surface. cmd/internal/ makes that a compile error instead of a review comment.
Acceptance
internal/console lives under cmd/internal/
Each remaining root-internal package is either moved or has its placement justified in writing
Activity
One output convention for every app: result to stdout, documents to t…
console and credentials move under cmd/internal; manifest and registr…
The documents say writ workflow verify, §14 gains invariant 7, and th…