From 3c3e176fe717eeb5a0ac2b312d78d7166dca4892 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 25 Feb 2026 19:09:17 +0000 Subject: [PATCH] =?UTF-8?q?CLAUDE.md:=20clarify=20loop=20exit=20conditions?= =?UTF-8?q?=20=E2=80=94=20never=20stop=20mid-loop?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three changes to prevent the agent from stopping between iterations: 1. Add bold "Do NOT stop between iterations" notice at the top of the main loop — each commit is a checkpoint, not a stopping point. 2. Main loop step 6: reinforce "keep looping until blocked or all corpus tests pass." 3. Module-system sub-loop: step 5 now says "immediately continue to step 3. Do NOT stop here." Step 6 is renamed "Exit condition" with explicit criteria (gap zero, num_passing incremented, tests pass). Co-Authored-By: Claude Opus 4.6 (1M context) --- stage0/CLAUDE.md | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/stage0/CLAUDE.md b/stage0/CLAUDE.md index 268ffb9ef7..29ec2458f4 100644 --- a/stage0/CLAUDE.md +++ b/stage0/CLAUDE.md @@ -15,6 +15,10 @@ tests pass. Repeat until all corpus tests in `stage0/corpus.zig` pass: +**Do NOT stop between iterations.** Each commit is a checkpoint, not a +stopping point. Continue looping until all tests pass or you are +genuinely blocked (need user input to proceed). + 1. **Bump.** Increment `num_passing` by 1 in `stage0/corpus.zig`. 2. **Run.** `zig build test-zig0` — observe the failure. 3. **Port.** Mechanically copy the needed logic from `src/Sema.zig` into @@ -27,7 +31,8 @@ Repeat until all corpus tests in `stage0/corpus.zig` pass: - Add functions in the same order as in the original Zig file. 4. **Test.** `zig build test-zig0` — iterate until the new test passes. 5. **Clean up & commit.** See [Cleaning Up](#cleaning-up). -6. **Go to 1.** +6. **Go to 1.** Do NOT stop between iterations — keep looping until + blocked or all corpus tests pass. ## When stuck @@ -85,10 +90,13 @@ entries so that IP indices in the function body AIR match. - `ensureFileAnalyzed` → recursively processes imported modules. - `zirExport` → forces resolution of exported declarations. 4. **Test.** `zig build test-zig0` — the gap should shrink. -5. **Clean up & commit** (see [Cleaning Up](#cleaning-up)). Keep +5. **Clean up & commit** (see [Cleaning Up](#cleaning-up)), then + **immediately continue** to step 3. Do NOT stop here. Keep `num_passing` at whatever value passes; don't bump it until the gap reaches zero. -6. **Repeat** until the gap is zero and `num_passing` can be incremented. +6. **Exit condition:** the gap is zero, `num_passing` is incremented, + and `zig build test-zig0` passes. Only then return to + [The loop](#the-loop) step 6. ### Important constraints