diff --git a/docs/project/readable-codebase/RD-27-layer-move.md b/docs/project/readable-codebase/RD-27-layer-move.md index 744ef1b..5b7b9ff 100644 --- a/docs/project/readable-codebase/RD-27-layer-move.md +++ b/docs/project/readable-codebase/RD-27-layer-move.md @@ -67,7 +67,15 @@ fine and only fails when Storybook builds. The README says it must not be pushed Do it longest-first anyway — it costs nothing and the property is not guaranteed to hold if this is ever repeated. - There are 200 occurrences across 73 files. The count of occurrences must not change. + There are 200 occurrences across 73 files, and this rewrite alone changes none of them. + + **Corrected after the ticket ran: the total lands at 205, not 200.** Decision 4 converts five + relative imports into `@shared/ui/…` aliases, and each of those is itself a new occurrence. + This decision's "must not change" governs _this_ rewrite; decision 4 adds five on top. The + two decisions were written as if they counted different things, and they do not. + + The honest check is per-source: 200 from the specifier rewrite, plus exactly the 5 that + decision 4 names. 4. **Five of the seven relative imports inside `upload/` become aliases; two stay relative.** A `../sibling/` import only breaks when the sibling lands in a different layer: @@ -168,7 +176,7 @@ git grep -ho "@shared/ui/[a-z0-9-]*" -- apps libs | sort -u # is 26 values -> Nothing was lost or duplicated in the rewrite: ```bash -git grep -ho "@shared/ui/" -- apps libs | wc -l # is 200 -> MUST still be 200 +git grep -ho "@shared/ui/" -- apps libs | wc -l # is 200 -> MUST be 205 (200 + decision 4's 5) git grep -c "src/ui/" -- '*.mdx' | awk -F: '{s+=$NF} END {print s+0}' # is 7 -> MUST still be 7 git grep -c "from '\.\./" -- libs/shared/src/ui/ | awk -F: '{s+=$NF} END {print s+0}' # is 7 -> MUST be 2 ``` diff --git a/docs/project/readable-codebase/README.md b/docs/project/readable-codebase/README.md index 1b0ab61..25f225d 100644 --- a/docs/project/readable-codebase/README.md +++ b/docs/project/readable-codebase/README.md @@ -209,6 +209,13 @@ Three rules when you write a ticket file, because the agent reads its ticket and number, say out loud what the command counts — declarations, call sites, or matching lines — and check that the decisions use that same meaning. + RD-27 then did it a fourth time, in the very next ticket written after that rule was + recorded. Its decision 3 said the `@shared/ui/` occurrence count "must not change" at 200, + while decision 4, nine lines below, mandated converting five relative imports into + `@shared/ui/` aliases — five new occurrences by construction. The answer is 205. + **When two decisions both touch the thing you are counting, add them up before you write + the number.** Naming a habit does not retire it. + - RD-09 grepped `docs/ apps/ libs/ .claude/`, which also matched this backlog's own ticket files (they name the deleted method as the history of `done` work) and 22 gitignored abandoned worktrees. Satisfying it literally would have corrupted completed-ticket