From 89e27bd0dfa2cfd86cb6d9b3b7ae5c0d0a4709a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 25 Feb 2026 20:43:11 +0000 Subject: [PATCH] stage0: add porting guidance to CLAUDE.md Add two points to the IP gap constraints section: - Port functions mechanically, don't analyze individual entries first - Time-box investigation to ~10 minutes before coding Co-Authored-By: Claude Opus 4.6 (1M context) --- stage0/CLAUDE.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/stage0/CLAUDE.md b/stage0/CLAUDE.md index 6a43d5a720..cb715709d1 100644 --- a/stage0/CLAUDE.md +++ b/stage0/CLAUDE.md @@ -111,6 +111,15 @@ entries so that IP indices in the function body AIR match. - Deduplication matters. If the function body interns a value that was already created during module-level analysis, `ipIntern` must return the existing index (not create a duplicate). +- Port **functions**, not entries. The IP entries are a consequence of + running the upstream functions (`createFileRootStruct`, + `scanNamespace`, `ensureFileAnalyzed`, etc.) correctly. Port those + functions mechanically from `src/Zcu/PerThread.zig` to C; do not try + to understand every individual IP entry before starting to code. +- Time-box investigation. Spend at most ~10 minutes investigating a + problem before writing code. Use `--verbose-intern-pool` dumps to + verify progress after each batch, not to plan the entire + implementation upfront. ## AIR comparison exceptions