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