diff --git a/CLAUDE.md b/CLAUDE.md index 48827457..ed2b7cb0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,3 +4,9 @@ 4. All C code must strictly align with plan 9 coding style 5. lib/ is the standard library; follow Hare APIs (signatures, layout, error idioms) — consult ref/hare/ before designing new modules 6. ref/hare and ref/plan9front are read-only references — consult before inventing data shapes or syntax +7. No workarounds. If a bug forces a workaround, STOP and report with a precise repro. Document any retained divergence at the site with a pointer to the filed task. Never silent. +8. Comments are WHY-only. Never narrate WHAT the code does — names carry the WHAT. Comment only non-obvious WHY: a constraint, a divergence from a reference, a citation to a filed task. +9. Hare-fidelity over convenience. No ad-hoc extensions, renames, or convenience wrappers in lib/. Cite ref/hare// for every signature ported. +10. Symmetric stages. cstage and wwstage MUST emit byte-identical asm for the same input. When inference power differs, align the richer side DOWN to the leaner side, not the other way. +11. Split commits when they bundle unrelated concerns. Bisect-cleanliness is the default. Multi-fix commits need a body paragraph explaining why they couldn't split. +12. Simple data, simple algorithms. Sea-of-stars style. Mirror Hare's structural choices over clever alternatives.