From c45d1bc0ffaee945ca21669f053ddd7c49435437 Mon Sep 17 00:00:00 2001 From: Edwin van den Houdt Date: Fri, 4 Sep 2026 18:46:00 +0200 Subject: [PATCH] docs: `git grep -c` counts lines, not occurrences (the seventh miss) RD-14 asserted that a grep for the four SaveState tags would count at least 4. All four live on one line of a single-line type declaration, so the honest answer is 1. The executing agent refused to reformat the type across four lines to satisfy the number, which would have fought prettier and violated the ticket's own "move verbatim" decision, and flagged the check instead. Use `grep -o | wc -l` when you mean occurrences. Say "lines" when you mean lines. This is the seventh miscalibrated acceptance command in this backlog, and the third an executing agent caught using these rules rather than the supervisor. Co-Authored-By: Claude Opus 5 --- docs/project/readable-codebase/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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