docs: make every AGENTS.md cite code, not docs or issues #113
Reference in New Issue
Block a user
Delete Branch "docs/agents-cite-code-only"
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?
Every
AGENTS.mdnow cites code and nothing else.Why
Two rot mechanisms, same symptom — an agent confidently follows a stale statement:
Code is the only source true at read time.
What changed
All three files: removed every ADR ref, spec/plan pointer (
docs/superpowers/specs/*,plans/*,docs/research/*),DEPLOY.md/REDEPLOY.md,docs/agents/*, and issue number. Facts those links carried are restated inline — theteacommand set and the five triage label strings now live in the root Forge section.### Domain docsis deleted: it pointed only atCONTEXT.mdanddocs/adr/, neither of which exists.backend/anduserscript/: rewritten around derivability.backend/AGENTS.md20578 → 15512 bytes,userscript/AGENTS.md7129 → 5912. Root grows 16905 → 19292: the cost of inlining thedocs/agents/*facts plus the new rule.Rule recorded in root as
## Writing an AGENTS.md. Sole non-code exception is a siblingAGENTS.md. Closing clause: every symbol named must exist, since a dead pointer is a bug rather than a stale sentence.Harness-agnostic: dropped the
Guidance for OpenCode (and Claude Code)openers for plain scope lines.Verification
Applied the new rule to itself — extracted all 118 backticked identifiers across the three files and checked each against every
.go,.js,.sql,.htmland.csssource. Zero repo symbols missing; the 8 non-matches are external (GM_setValue,navigator.webdriver,HeadlessChrome,curl, …).That check caught a claim that was already lying on
main: the cover section saidCoverFetcherwas gone, butNewCoverFetcher,TLSCoverFetcherandBrowserCoverFetcherare all live ininternal/latest. Now names only the genuinely dead/img/kagane/{id}route. Exactly the failure the rule exists to prevent.No code touched — documentation only, nothing to test.