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