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.
1.5 KiB
1.5 KiB
- This is a project for ww programming language
- ww is a programming language aiming for Hare + CSP, no GC
- cmd/ is the C bootstrap toolchain (wcc frontend lib, w6c/w6a/w6l per-arch, ww driver); selfhost/ is the ww reimplementation
- All C code must strictly align with plan 9 coding style
- lib/ is the standard library; follow Hare APIs (signatures, layout, error idioms) — consult ref/hare/ before designing new modules
- ref/hare and ref/plan9front are read-only references — consult before inventing data shapes or syntax
- 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.
- 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.
- Hare-fidelity over convenience. No ad-hoc extensions, renames, or convenience wrappers in lib/. Cite ref/hare// for every signature ported.
- 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.
- 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.
- Simple data, simple algorithms. Sea-of-stars style. Mirror Hare's structural choices over clever alternatives.