Session 08 — Piece 1, first draft
Goal
The author merged PR #6, which brought the overture to master, and asked for the first draft of piece 1 (translated from Italian).
What we did
- Checked the prerequisites first (CLAUDE.md §10.3): the code exists, all 15 tests pass, and the reference cloud run is recorded (
795ffb8, clean tree, 10 s, no network). - Drafted piece 1 (
3cada1c), 718 words on the §3.4 skeleton:- Hook: guardrails that block a tool call on a pattern, thermostats and pre-commit hooks are all simple reflex agents.
- AIMA §2.4.2, paraphrased: rules on the current percept; loops without full observability; the coin flip as the way out, and the book’s own admission that it’s a patch.
- PEAS and the seven environment properties.
- The real code, 27 lines, docstrings trimmed.
- What happened, with three of the four charts.
- The cloud run, with the
sbx --cloud createline quoted fromscripts/sbx-run.sh. - Disposability, and why no fence is needed.
- Why it still matters: the sandbox’s network policy is itself a simple reflex agent, used here once as CLAUDE.md §3.1 asks, with the same blind spot of judging each request alone.
- Reproduce it, navigation, and the disclosure line.
- Every number in the article checked by script against the reference run’s
results.json: 18 and 10 out of 20, all clean at step 3, the blind agent starting at B, 194 of 200 steps against the wall, 12 squares never cleaned, 788 vs 2666, all clean at step 82.
Commands that mattered
make article-check # both drafts: ok; piece 1 at 718 words, overture at 1,983
make test
Decisions
- No new ADR. The draft uses one of the CLAUDE.md §3.1 theses (“the network policy is itself a simple reflex agent”) exactly once, as planned in session 04.
Dead ends and surprises
- “After every merge” was too broad.
sandbox.ymlruns after merges that touch the examples or the wrapper, not after every merge. The sentence was corrected before committing. - “The host runs 3.12” needed care. The Codespace’s default Python is 3.14 and CI’s is 3.12, and both match the sandbox’s output. The article keeps to what’s true of CI’s check: the sandbox on 3.14, the host on 3.12.
- Links to
piece-01-v1don’t work yet. The tag is created when the code is frozen for publication (PUBLISHING.md, step 1). Until then the article’s code links return 404. That’s deliberate, so the article never points at a branch that can move.
Who did what
- The author: merged PR #6 and asked for the draft.
- Claude: checked the prerequisites, drafted piece 1, verified its numbers and wrote this entry.
Next
- The author: review piece 1.
- After review: freeze the code with the
piece-01-v1tag, run/verify-sbx examples/01-simple-reflex, and set both articles toreview, thenready. - Publish the overture and piece 1 together, following
articles/PUBLISHING.md.