docs(go): finish per-file doc-comment migration for config, cmdutil, mcp — last three packages-and-layout rows #17
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to an earlier issue. The packages-and-layout.md per-package table was migrated into Go doc comments for all packages except three whose house style is per-FILE package comments (
// Package config — <file> does ...): most of their files today carry a barepackageclause, so deleting their table rows would lose the file map.Remaining rows to migrate then delete:
internal/config— add per-file comments to config.go (core loading, cache), credentials.go (secure backends), user.go (FetchUser, identity), git.go (DetectRepo, branch helpers), storage.go (TokenStore), keychain.go, pass.go, systemd_creds.go, version.go. scheme.go already has one.internal/cmdutil— output.go (OutputStruct, OutputItem, OutputPaginatedList, PrintMessage), flags.go (ListFlags), bodypatch.go/bodyverbs.go (anchored body-edit spine). services.go already has one.internal/mcp— server.go (NewServer, Run), context.go (DetectContext), register.go, tools.go and the per-resource tools_*.go registration files; many other mcp files already carry the per-file style.Accuracy requirement (learned in an earlier verify pass, where two freshly written comments mis-stated file roles): each comment must be written from READING the file's actual declarations, never from the table row alone — the rows are hints, the code is the source of truth. Note Go concatenates multiple package doc comments in filename order in
go docoutput, so each per-file comment must read sensibly in a concatenated stream (the existing// Package X — <file> ...prefix convention handles this).Acceptance:
// Package <pkg> — <file> ...comment.go docoutput for each package reads coherently.TestEveryInternalPackageHasDocCommentin internal/parity, added in an earlier change): a guard asserting docs/architecture/packages-and-layout.md contains no per-package key-file rows (no line matching| \internal/`) — so a hand-rolled markdown package map can never creep back once this table is gone.