docs: the M5c-1 review, tips T50 to T58, and AGENTS.md rules from the run
The review of tasks 01 to 15 in the implementer log, with the six findings fixed in review. Nine tips for writing tasks from the run's transcripts and the review, new evidence for I16 and I17, and four rules in AGENTS.md: the Cargo registry is outside the repository, `git stash -u` and the README's flaky tests, an edit never anchors on another line, and what a test count includes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,9 @@ Unix sockets. You are implementing it one task at a time.
|
||||
row, because the record of the stop is part of the log.
|
||||
5. Work only from files inside this repository. Never read another checkout or worktree (such as
|
||||
`~/src/boxmaker-ref`), and never search the file system for code (`find /`, `locate`). If you
|
||||
are stuck, stop as in point 4; copying code from elsewhere is not finishing the task.
|
||||
are stuck, stop as in point 4; copying code from elsewhere is not finishing the task. A
|
||||
crate's source in the Cargo registry (`~/.cargo/registry`) is outside the repository too: the
|
||||
task's table of its API is all you need.
|
||||
To try something out (a small program, a script, a copy of a file), work under
|
||||
`.state/scratch/`, which git ignores, and delete it before you commit. Never use `/tmp` or any
|
||||
other directory outside the repository.
|
||||
@@ -83,9 +85,14 @@ These come from defects found in review. The evidence is in `docs/implementer-le
|
||||
angle-bar turn markers), in code, comments, commands or your log. Build them from pieces
|
||||
(`concat!("<", "think")`) and name them in words: text holding them becomes your own control
|
||||
tokens when you read it.
|
||||
- When a test outside your task fails, check once whether it fails without your change, then stop
|
||||
and report both results. Do not keep experimenting, and never add a file the task does not list,
|
||||
outside `.state/scratch/`.
|
||||
- When a test outside your task fails, check once whether it fails without your change
|
||||
(`git stash -u`, run, `git stash pop`), then stop and report both results. Do not keep
|
||||
experimenting, and never add a file the task does not list, outside `.state/scratch/`. The one
|
||||
exception is a test the plan's README lists as flaky: if it passes on one rerun and the gate
|
||||
passes, name it in your row's Notes and go on.
|
||||
- An edit replaces exactly the task's "before" block and nothing around it. When a "before" block
|
||||
does not match, look at `git diff <file>` for your own earlier edit, then stop and report; never
|
||||
anchor the edit on another line.
|
||||
- Write your log row from `git diff` after staging, naming only what the diff shows.
|
||||
|
||||
## The gate
|
||||
@@ -95,7 +102,9 @@ it takes longer than the default 2 minutes, and a gate cut off by the timeout is
|
||||
your code. It runs offline: rustfmt, clippy with
|
||||
warnings denied, all tests, cargo-deny, and the scripts in `scripts/`. Run `cargo fmt --all` before
|
||||
the gate; rustfmt decides the order of `mod` and `use` lines, not you. After you add a dependency,
|
||||
run `cargo build` once so that `Cargo.lock` is updated, then run the gate.
|
||||
run `cargo build` once so that `Cargo.lock` is updated, then run the gate. A test count in a task
|
||||
is the passed total of `cargo test --workspace` plus one, for the ignored `end_to_end` test that
|
||||
the gate runs on its own; never run the gate again only to count.
|
||||
|
||||
Useful while working: `cargo test -p <crate> --test <file>` runs one test file, and
|
||||
`cargo test -p <crate> <name>` runs tests whose name contains `<name>`.
|
||||
|
||||
Reference in New Issue
Block a user