From dff5f96bb36e5a871ec3eb7bd1726c5064e13df0 Mon Sep 17 00:00:00 2001 From: Edwin van den Houdt Date: Fri, 4 Sep 2026 22:01:01 +0200 Subject: [PATCH] docs: correct RD-20's file count, and record the ninth miss RD-20 asserted `git grep -l "toWizardErrors"` would find 5 files, but its own Steps list regenerates `behaviour-spec.mdx`, and the generator publishes every `describe` title. Naming a spec after the function it tests puts the name in the generated document too, so the honest count is 6. The agent refused to rename the describe block to satisfy the number, which is the correct response and matches the precedent from RD-14. Co-Authored-By: Claude Opus 5 --- docs/project/readable-codebase/RD-20-wizard-errors.md | 7 ++++++- docs/project/readable-codebase/README.md | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/project/readable-codebase/RD-20-wizard-errors.md b/docs/project/readable-codebase/RD-20-wizard-errors.md index 35bc178..9af8550 100644 --- a/docs/project/readable-codebase/RD-20-wizard-errors.md +++ b/docs/project/readable-codebase/RD-20-wizard-errors.md @@ -113,9 +113,14 @@ Measured against the tree before handover. ```bash git grep -c "export function toWizardErrors" -- libs/shared/src/layout/wizard-shell/wizard-errors.ts # MUST be 1 -git grep -l "toWizardErrors" -- apps libs | wc -l # is 0 -> MUST be 5 (helper, spec, 3 wizards) +git grep -l "toWizardErrors" -- apps libs | wc -l # is 0 -> MUST be 6 ``` +**Corrected after the ticket ran: 6, not the 5 first written.** The sixth file is +`libs/shared/docs/behaviour-spec.mdx`. Step 5 regenerates it, and the generator publishes every +`describe` title — so `describe('toWizardErrors', …)` puts the name in the generated document. +The helper, its spec, the three wizards, and the generated page. + The hand-rolled flattening is gone from all three: ```bash diff --git a/docs/project/readable-codebase/README.md b/docs/project/readable-codebase/README.md index ef07a59..407ff0d 100644 --- a/docs/project/readable-codebase/README.md +++ b/docs/project/readable-codebase/README.md @@ -207,6 +207,14 @@ Three rules when you write a ticket file, because the agent reads its ticket and sweep's exemption check against the new scope.** An exemption is a property of the content, not of the directory that happened to hold it first. + - RD-20 required `gen:behaviour-spec` in its own Steps list, then asserted + `git grep -l "toWizardErrors" -- apps libs | wc -l` would be **5**: the helper, its spec + and the three call sites. The honest answer is 6. The generator publishes every `describe` + title, so naming the spec after the function it tests — which is house style — puts the + name into `behaviour-spec.mdx` as well. The agent correctly refused to rename the describe + block to satisfy the number. **A name that appears in a spec title also appears in the + generated document.** Count that file, or use `>=` as RD-17 did. + Four habits that prevent all five: - **Use `git grep`, not `grep -r`.** It searches tracked files only, so untracked and