CLAUDE.md: add working norms (rules 7-12)
Codify the operational rules that drove session 3's bug-surfacing
chain. Six rules, each load-bearing at worker/reviewer decision time:
7. No workarounds — STOP and report; document retained divergence
with a task pointer; never silent.
8. WHY-only comments — names carry the WHAT.
9. Hare-fidelity over convenience — no ad-hoc extensions in lib/.
10. Symmetric stages — cstage and wwstage emit byte-identical asm;
align richer side DOWN when inference power differs.
11. Split commits when they bundle unrelated concerns.
12. Simple data, simple algorithms — sea-of-stars over clever.
Auto-loaded by every Claude Code session, so future workers and
reviewers see these from turn 1.
This commit is contained in:
@@ -4,3 +4,9 @@
|
|||||||
4. All C code must strictly align with plan 9 coding style
|
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
|
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
|
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/<module>/<file> 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.
|
||||||
|
|||||||
Reference in New Issue
Block a user