diff --git a/docs/project/readable-codebase/README.md b/docs/project/readable-codebase/README.md index c0edf56..a2f9559 100644 --- a/docs/project/readable-codebase/README.md +++ b/docs/project/readable-codebase/README.md @@ -180,7 +180,7 @@ Three rules when you write a ticket file, because the agent reads its ticket and estimate and nothing can check it. `npm run lint` has an exit code. 4. **Run every acceptance command against the tree before you hand the ticket over.** A command that cannot pass is worse than no command: the agent either wastes a cycle or, - worse, "fixes" correct code to satisfy it. Four real misses so far, all in tickets written + worse, "fixes" correct code to satisfy it. Seven real misses so far, all in tickets written by the supervisor: - RD-06 grepped only `runIfSubmitting`, missing that one wizard spells it `runIfIndienen`. - RD-08 grepped bare `onPrimary\|onRetry`, which can never return nothing — an unrelated @@ -206,6 +206,12 @@ Three rules when you write a ticket file, because the agent reads its ticket and which are repo-wide sweeps. - **Anchor on a declaration** (`^ onRetry\(\)`), not on a name that may legitimately appear elsewhere. + - **`git grep -c` counts matching LINES, not occurrences.** RD-14 asserted + `git grep -c "'Idle'\|'Saving'\|'Saved'\|'Error'"` would be `>= 4`, but all four tags + live on one line of a single-line type declaration, so the honest answer is `1`. The + agent correctly refused to reformat the type across four lines to satisfy the number. + When you want occurrences, use `grep -o … | wc -l`; when a line count is what you mean, + say so. - **Scope every acceptance command to the ticket's Files list, never to a parent directory.** This is the habit most often broken, including by the supervisor in RD-12: the check `git grep "ActionState" -- apps/ssp/src/app/brief` cannot pass, because