docs: M5d-2: read only the implementer-log header

Task 06 opened the whole implementer log (~360 kB) after reading supporting
modules; OpenCode returned "Context size has been exceeded" and made no
commit. AGENTS.md and tasks 06-10 now say to read the first 12 lines only.

Co-Authored-By: Grok 4.6 <noreply@x.ai>
This commit is contained in:
2026-10-03 14:42:59 -07:00
co-authored by Grok 4.6
parent 670b5bbabe
commit 2eb0ffd6d7
7 changed files with 29 additions and 11 deletions
+9 -6
View File
@@ -9,7 +9,9 @@ Unix sockets. You are implementing it one task at a time.
nothing else. Do not start the next task.
2. Do the steps in order. Where a step shows a command and its expected output, run it and compare.
3. Do not read `docs/design.md` or other plans unless the task tells you to. The task file quotes
what you need.
what you need. Do not read `docs/implementer-log.md` until the log-and-commit step, and then
only the first 12 lines (the title through the header row). The rest of that file will fill
the session.
4. If something in the task is impossible, contradictory, or fails twice in the same way, **stop**.
Do not improvise, do not change a test, do not weaken a check. Add your row to
`docs/implementer-log.md` with status `stopped`, say what you tried and what happened, commit
@@ -97,7 +99,7 @@ These come from defects found in review. The evidence is in `docs/implementer-le
anchor the edit on another line.
- Write your log row from `git diff` after staging, naming only what the diff shows.
- Add the log row immediately under the table header (newest first). Do not insert it by date
among older rows.
among older rows. Read only the first 12 lines of `docs/implementer-log.md` to do that.
- After `gate: ok`, do not run `cargo test --workspace` only to count tests. If HEAD already has
this task's commit and a `done` row, stop.
@@ -131,10 +133,11 @@ Useful while working: `cargo test -p <crate> --test <file>` runs one test file,
## The implementer log
Before you commit, add one row immediately under the header of the table in
`docs/implementer-log.md` (newest first) and include the file in the commit. Do not insert the
row by date among older rows. Be honest: the log is how the owner judges the process, and a wrong
row is worse than a bad one.
Before you commit, read only the first 12 lines of `docs/implementer-log.md` (title through the
header row). Insert one row immediately under the header (newest first) and include the file in
the commit. Do not insert the row by date among older rows. Do not read the rest of the file: it
is large enough to fill the session. Be honest: the log is how the owner judges the process, and
a wrong row is worse than a bad one.
| Column | What to write |
|---|---|
+1
View File
@@ -101,6 +101,7 @@ How it is used:
| T59 | After `gate: ok`, the task is done counting. Do not tell the implementer to run `cargo test --workspace` (or the gate) again only to compare a number. AGENTS.md already forbids a second gate "only to count"; say the same of the workspace test run. | M5c-2: all twelve sessions ran `cargo test --workspace` after a passing gate to rediscover the total, even with T50's wording in the task. |
| T60 | The driver must not truncate a task's run log, and must not start a task whose commit and `done` row are already in HEAD. A power-loss resume continues the existing log file; it does not open it for write from offset zero, and it skips a task that is already committed. | M5c-2 task 05: `.state/runs/M5c2/05-memoryd-honcho-readers.log` is four `=== …` resume sections after HEAD was at task 12; the original transcript is gone. Commit `b370c60` was already complete. |
| T61 | Name where the log row goes: immediately under the header, newest first. The implementer otherwise inserts by date among older rows. | M5d-1 task 06. |
| T62 | The implementer log is hundreds of kilobytes. A task that needs a row must say to read only the first 12 lines (title through the header). Reading the whole file exceeds the session context and the driver reports "made no commit". | M5d-2 task 06: after reading the task and supporting modules it opened `docs/implementer-log.md` and OpenCode returned `Context size has been exceeded.`; HEAD did not move. |
## What worked and should be kept
@@ -38,6 +38,12 @@ Tests call `tick(ctx, now)` with injected time. No sleeps (T27).
`crates/loopd/src/main.rs`, `docs/implementer-log.md`.
- Do not touch: any other file.
**Read only what the step names.** Step 1 is the `cp`. Do not open `docs/implementer-log.md`,
`docs/runbook.md`, or `crates/loopd/src/{turn,session,compact,baseline,config}.rs` to start.
The facts table is complete. At step 7, read only the first 12 lines of
`docs/implementer-log.md` (title through the header row) and insert the new row immediately
under the header. The rest of that file fills the session (~360 kB).
## Facts you need
- **`Context::hold`.** Same insert as `handle`: if the id is already in `busy`, `Err(Busy)`;
@@ -199,7 +205,8 @@ pass so it runs once.
- [ ] **6. Run the gate.** `cargo fmt --all`, then `make gate`, timeout 600000 ms. Last line
`gate: ok`. Test count **1551** (1545 before, plus 6). After `gate: ok`, do not add up
`test result:` lines.
- [ ] **7. Log and commit.** Task cell `M5d2/06-loopd-scheduler-heartbeat`. Stage with
- [ ] **7. Log and commit.** Task cell `M5d2/06-loopd-scheduler-heartbeat`. Read only the first
12 lines of `docs/implementer-log.md`; insert the row under the header. Stage with
`git add crates/loopd docs/runbook.md docs/implementer-log.md Cargo.lock`, then commit as
`AGENTS.md` says.
+5 -1
View File
@@ -28,6 +28,9 @@ is not busy). Speaker `None`. Same time-line prefix as heartbeat.
- Modify: `crates/loopd/src/scheduler.rs`, `docs/implementer-log.md`.
- Do not touch: any other file.
**Read only what the step names.** Step 1 is the `cp`. At the log step, read only the first 12
lines of `docs/implementer-log.md`. Do not load the rest of that file.
## Facts you need
- **Load.** `jobs::load(&ctx.cfg.paths.home.join("jobs"))`. On `Err`, log `loopd: {e}` and
@@ -84,7 +87,8 @@ Do not change heartbeat behaviour. Do not add a sleep.
- [ ] **6. Run the gate.** `cargo fmt --all`, then `make gate`, timeout 600000 ms. Last line
`gate: ok`. Test count **1557** (1551 before, plus 6). After `gate: ok`, do not add up
`test result:` lines.
- [ ] **7. Log and commit.** Task cell `M5d2/07-loopd-scheduler-cron`. Stage with
- [ ] **7. Log and commit.** Task cell `M5d2/07-loopd-scheduler-cron`. Read only the first 12
lines of `docs/implementer-log.md`; insert the row under the header. Stage with
`git add crates/loopd docs/implementer-log.md Cargo.lock`, then commit as `AGENTS.md` says.
## Done when
+2 -1
View File
@@ -232,7 +232,8 @@ Facts). The `Err(TurnError::SessionFull)` arm gets the same `missing` call befor
- [ ] **6. Run the gate.** `cargo fmt --all`, then `make gate`, timeout 600000 ms. Last line
`gate: ok`. Test count **1563** (1557 before, plus 6). After `gate: ok`, do not add up
`test result:` lines.
- [ ] **7. Log and commit.** Task cell `M5d2/08-loopd-tool-summary`. Stage with
- [ ] **7. Log and commit.** Task cell `M5d2/08-loopd-tool-summary`. Read only the first 12
lines of `docs/implementer-log.md`; insert the row under the header. Stage with
`git add crates/loopd config/summarise.md docs/implementer-log.md Cargo.lock`, then commit
as `AGENTS.md` says.
+2 -1
View File
@@ -119,7 +119,8 @@ results are indexed. A comment that does not fit its code: stop.
- [ ] **6. Run the gate.** `cargo fmt --all`, then `make gate`, timeout 600000 ms. Last line
`gate: ok`. Test count **1568** (1563 before, plus 5). After `gate: ok`, do not add up
`test result:` lines.
- [ ] **7. Log and commit.** Task cell `M5d2/09-memoryd-summary-index`. Stage with
- [ ] **7. Log and commit.** Task cell `M5d2/09-memoryd-summary-index`. Read only the first 12
lines of `docs/implementer-log.md`; insert the row under the header. Stage with
`git add crates/memoryd docs/implementer-log.md Cargo.lock`, then commit as `AGENTS.md`
says.
+2 -1
View File
@@ -228,7 +228,8 @@ Do not edit `cli_memory.rs`. This file is the M5c pin of the same USAGE string.
- [ ] **6. Run the gate.** `cargo fmt --all`, then `make gate`, timeout 600000 ms. Last line
`gate: ok`. Test count **1574** (1568 before, plus 6). After `gate: ok`, do not add up
`test result:` lines.
- [ ] **7. Log and commit.** Task cell `M5d2/10-memoryd-tiers`. Stage with
- [ ] **7. Log and commit.** Task cell `M5d2/10-memoryd-tiers`. Read only the first 12 lines of
`docs/implementer-log.md`; insert the row under the header. Stage with
`git add crates/bxcore crates/memoryd crates/bxctl config/jobs docs/implementer-log.md
Cargo.lock`, then commit as `AGENTS.md` says.