commit 89e27bd0dfa2cfd86cb6d9b3b7ae5c0d0a4709a5 (tree)
parent 5700b742d2a1473808de80cc1a88ad1064445fe2
Author: Motiejus Jakštys <motiejus@jakstys.lt>
Date: Wed, 25 Feb 2026 20:43:11 +0000
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) <noreply@anthropic.com>
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git 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