Skip to content

refactor(docs): split dev-workflows into hub, verification, frontend - #67

Merged
EduPav merged 1 commit into
mainfrom
docs/split-dev-workflows
Aug 14, 2026
Merged

refactor(docs): split dev-workflows into hub, verification, frontend#67
EduPav merged 1 commit into
mainfrom
docs/split-dev-workflows

Conversation

@EduPav

@EduPav EduPav commented Aug 14, 2026

Copy link
Copy Markdown
Member

Summary

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 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.

File Lines Read it when
docs/dev-workflows.md 461 → 124 Process hub: command index, per-task checklists, releases
docs/verification.md 289 (new) A gate failed, or you need what a command actually checks
docs/frontend-conventions.md 82 (new) Building or restyling a screen, wiring data fetching

Issue

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, and checkGateClaims asserts DOCUMENTED_COMMANDS are named in docs/dev-workflows.md specifically. 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:

  • The pnpm check:agent-docs prose was mis-nested under ### Python dependency updates — unrelated content under the wrong heading. It is now its own ## Agent-docs check section, which also makes AGENTS.md §5's inbound link land on the actual content instead of a 288-line section.
  • The chain note said "see 'Documentation Update' above", which is now a different file, so it became a real link.

New guard — scripts/agent-docs/doc-links.mjs. Only the SECURITY.mdAGENTS.md anchor 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 #anchor against real files and headings. It is dependency-free and offline — external http/mailto links 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 in AGENTS.md §5.

Links repointed (all now machine-verified): AGENTS.md §5/§6/§8/§9/§10, README.md ×5, the five docs/features/*.md prerequisite links, the ci.yml header comment, and one tech-debt-tracker reference. The feature-doc links were also inaccurate before — they pointed at #commands for a prerequisite list that lives in ## Non-live verification.

Verification

Command Result Notes
pnpm verify pass exit 0; agent-docs check passed (110 checks), 187 backend + 164 frontend tests, 4 structural
pnpm verify:full not run needs live B2 credentials, a bound local server, and Playwright Chromium; this PR touches only Markdown and the dependency-free doc guard, so no browser or live-service behavior is in scope

Negative-tested the new guard rather than only confirming it green — broke an anchor and a file path in AGENTS.md and confirmed both fail with the real anchor list in the message, then restored:

- AGENTS.md:161 links to docs/verification.md#python-deps — expected a heading anchored
  #python-deps in docs/verification.md, actual anchors: ["verification","local-environments",...]
- AGENTS.md:176 links to docs/frontend-convention.md — expected a file at
  docs/frontend-convention.md, found nothing

AGENTS.md is 230/250 lines, still inside its enforced cap.

UI evidence

N/A - no UI changes.

Docs

  • Updated relevant docs in this PR (see the doc update mapping in AGENTS.md section 9)

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

  • Risk: low, and mostly one-way. Content is unchanged prose; the failure mode of a doc split is a broken inbound link, which the new guard now blocks in CI. Residual risk is external links (blog posts, bookmarks) pointing at moved dev-workflows.md anchors — 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.
  • Rollback: revert the single commit. No migrations, config, or runtime code touched.

Review ownership

No CODEOWNERS in this repo, so no reviewer is auto-assigned — requesting manually.

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.
@EduPav EduPav self-assigned this Aug 14, 2026
@EduPav
EduPav marked this pull request as ready for review August 14, 2026 13:56
@EduPav
EduPav merged commit 94726ff into main Aug 14, 2026
7 checks passed
@EduPav
EduPav deleted the docs/split-dev-workflows branch August 14, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant