docs: add CLAUDE.md rule #4 (plan-state hygiene) + tick doc-structure plan
Rule #4 codifies the discipline that prevents the kind of drift the 2026-05-30 status-audit found: Phase 2B, v0.5.1 Streams A/B/C, and 1C-γ all stealth-shipped 2-3 weeks earlier with their plan checkboxes never ticked and STATUS.md still listing them as "Up next". Two halves to the rule: - Ship side: ticking the boxes is part of shipping. A commit that lands plan work also ticks that plan's boxes (or an immediately-following docs commit does). - Execute side: before starting an unchecked plan, spot-check git log for distinctive symbols/files — re-executing already-merged work is the worst failure mode of the drift. Also applies the rule retroactively to the doc-structure redesign plan: all 37 sub-step checkboxes flipped to [x]. Tasks 1-4 (rename, scope headers + Next: footers, link fixes, CLAUDE.md table) shipped in 36a59cd..bae3f7c. Task 5's six verification steps all pass (Step 3's grep matches are false positives — they're correct new-path sibling links from inside docs/ to docs/, not stale old-path uses). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -118,10 +118,14 @@ Current in-flight work: `STATUS.md`. Full roadmap with release targets: `ROADMAP
|
||||
|
||||
### Discipline rules
|
||||
|
||||
Three rules to prevent the kind of drift the 2026-05-30 audit found:
|
||||
Four rules to prevent the kind of drift the 2026-05-30 audits found:
|
||||
|
||||
1. **Scope-boundary check.** When editing a tour doc, verify the change fits the doc's scope header. If it doesn't, the change belongs in a different doc — move it instead of stretching the scope. Concretely: a sentence about crypto added to `DESIGN.md` belongs in `docs/CRYPTO.md`; a wire-format table added to `docs/CRYPTO.md` belongs in `docs/FORMATS.md`.
|
||||
|
||||
2. **Code-constant pinning.** When a tour doc cites a code constant (`VERSION_BYTE = 0x02`, `QUANT_STEP = 50.0`, `MIN_COPIES = 5`, `MANIFEST_SCHEMA_VERSION = 2`, etc.), the doc must cite the source file + line. When the underlying constant changes, grep for the citation pattern and update the docs together with the code change in the same commit. Most drift the audit found was code-constant drift — this rule attacks it at the source.
|
||||
|
||||
3. **New-doc rule.** When adding a tour doc, also update (a) `DESIGN.md`'s code-map, (b) the reading-order sequence (the "Next:" footer chain), and (c) the living-docs table above. A new doc that doesn't appear in all three is not done.
|
||||
|
||||
4. **Plan-state hygiene.** Plan checkboxes and `STATUS.md`/`ROADMAP.md` must reflect what's actually shipped. Two halves:
|
||||
- **Ship side:** when a commit lands work that maps to a plan task, tick that plan's checkboxes in the same commit (or the immediately-following docs commit). Same for `STATUS.md` — the "Up next" list does not get to lag the actual state of `main` by weeks.
|
||||
- **Execute side:** before starting execution of a plan whose checkboxes are all unchecked, spot-check git log (`git log --oneline --all --grep <distinctive-name>`) or grep for a distinctive symbol/file the plan would create. A plan whose work already merged is the worst kind of plan to re-execute. The 2026-05-30 status-audit found Phase 2B, v0.5.1 Streams A/B/C, and 1C-γ all stealth-shipped two-to-three weeks earlier because nobody ran this check.
|
||||
|
||||
Reference in New Issue
Block a user