refactor(docs): split dev-workflows into hub, verification, frontend - #67
Merged
Conversation
docs/dev-workflows.md had grown to 461 lines, 288 of them (62%) in the Testing section alone. It was three documents with three different read triggers — per-task checklists, verification mechanics, frontend conventions — so an agent needing only "what do I run before a PR" loaded all 461 lines. Now docs/dev-workflows.md (124) is the process hub, docs/verification.md (289) holds gate mechanics and failure recovery, and docs/frontend-conventions.md (82) holds screens and data fetching. The command index and "Review ownership" stay in the hub deliberately: six docs link #commands, two GitHub templates cite Review ownership by name, and checkGateClaims asserts DOCUMENTED_COMMANDS are named in that exact file. Everything else moves verbatim and in original order, so the move is verifiable by diff rather than by rereading. Two things fixed in passing: the agent-docs prose was mis-nested under "Python dependency updates", and the plain-language chain note pointed at a "Documentation Update" section that now lives in another file. Adds scripts/agent-docs/doc-links.mjs so this kind of move stays safe. Only the SECURITY.md -> AGENTS.md anchor was verified before, so every other cross-doc anchor could rot in silence: GitHub serves the file and lands the reader at the top, and a dead anchor reads as a working link. It resolves every relative link and #anchor against real files and headings, never fetching external URLs. Running it on the pre-split tree surfaced a real failure and a bug in anchorOf(): it collapsed runs of whitespace, but GitHub emits one hyphen per space, so punctuation dropped from a heading leaves a double hyphen (RELIABILITY.md#stateful-counters--durability-caveats). The doc was right and the slugger was wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docs/dev-workflows.mdhad grown to 461 lines, 288 of them (62%) in the## Testingsection alone. It was three documents with three different read triggers glued together, so an agent that only needed "what do I run before a PR" loaded all 461 lines.Split three ways, and adds a guard so this kind of move can't silently break inbound anchors.
docs/dev-workflows.mddocs/verification.mddocs/frontend-conventions.mdIssue
None — no existing issue tracked this.
Scope
What deliberately stayed in the hub. The command index and "Review ownership" did not move: six docs link
#commands, two GitHub templates cite Review ownership by name, andcheckGateClaimsassertsDOCUMENTED_COMMANDSare named indocs/dev-workflows.mdspecifically. Keeping both in place meant the guard needed no loosening.Content moved verbatim and in original order, so the move is verifiable by diff instead of by rereading. Verified mechanically: every non-heading line of the old file is accounted for in the three new ones.
Two things fixed in passing, both consequences of the split:
pnpm check:agent-docsprose was mis-nested under### Python dependency updates— unrelated content under the wrong heading. It is now its own## Agent-docs checksection, which also makesAGENTS.md§5's inbound link land on the actual content instead of a 288-line section.New guard —
scripts/agent-docs/doc-links.mjs. Only theSECURITY.md→AGENTS.mdanchor was ever verified, so every other cross-doc anchor could rot in silence: GitHub serves the file and lands the reader at the top, and a dead anchor reads as a working link. The new check resolves every relative Markdown link and#anchoragainst real files and headings. It is dependency-free and offline — externalhttp/mailtolinks are never fetched — and skips fenced code so a shell example isn't parsed as a link.Running it on the pre-split tree surfaced one real pre-existing failure and a bug in
anchorOf(): it collapsed runs of whitespace, but GitHub emits one hyphen per space, so punctuation dropped from a heading leaves a double hyphen (RELIABILITY.md#stateful-counters--durability-caveats). The doc was right; the slugger was wrong. Fixed, and the check registered inAGENTS.md§5.Links repointed (all now machine-verified):
AGENTS.md§5/§6/§8/§9/§10,README.md×5, the fivedocs/features/*.mdprerequisite links, theci.ymlheader comment, and one tech-debt-tracker reference. The feature-doc links were also inaccurate before — they pointed at#commandsfor a prerequisite list that lives in## Non-live verification.Verification
pnpm verifyagent-docs check passed (110 checks), 187 backend + 164 frontend tests, 4 structuralpnpm verify:fullNegative-tested the new guard rather than only confirming it green — broke an anchor and a file path in
AGENTS.mdand confirmed both fail with the real anchor list in the message, then restored:AGENTS.mdis 230/250 lines, still inside its enforced cap.UI evidence
N/A - no UI changes.
Docs
AGENTS.md§9 was the highest-risk edit: its one "Dev or testing process" row is how agents route doc writes, so it became three rows. A stale row there would send future changes to the wrong file, which is worse than a long file.Risk / rollback
dev-workflows.mdanchors — nothing in-repo can vouch for those. Not considered a breaking change under the release policy: doc file paths aren't in the versioned surface.Review ownership
No
CODEOWNERSin this repo, so no reviewer is auto-assigned — requesting manually.