The rules every session and agent needs. What only the main session does
(versions, CI, promote, issues, the driver, hooks) is in
docs/supervisor.md.
develop (#437)main is the default branch and the last tested state; develop is the
trunk. A session starts on main or a branch made from it, so it switches
first: git fetch origin develop && git checkout -B develop origin/develop.
Nobody pushes to main.cargo fmt, the tests the
change touches, cargo clippy --all-targets -- -D warnings (a lint in a
lowered file is allowed on the tools module in
crates/nikaia-std/src/lib.rs, not fixed in the file) and
nikaia run scripts/pre-push.nika (fmt, ADR citations, badges, version, on
what is staged, not the working tree). Never the full suite.
Small commits, often.docs/supervisor.md). A session working alone pushes its own commits to
develop after git pull --rebase origin develop; no pull requests.develop is fixed forward: whoever finds it red fixes it with the
next commit or reverts the commit that broke it, at once.CHANGELOG.md or the badges,
names in its report what the change decided, and takes a new NK code only
from the block the supervisor reserved for it.Fixes #N; that word closes it
when promote brings it to main. Never write fix #N, fixed #N or
closes #N (any tense, in prose too) for an issue the commit does not
finish; write the fix for #N. (#N) and Part of #N close nothing.ready, decision,
blocked or note (docs/README.md). Whoever files an issue or changes its
state sets the label.git reset, git stash, git checkout . or git restore .
in the shared checkout: it throws away the others’ work. Restore only your
own files, by name.std or the tools
is written as .nika (crates/nikaia-std/src/tools/*.nika, a package, a
tools/*.nika); the .rs the lowering writes from it
(crates/nikaia-std/src/tools/lowered/) is output. A step that cannot be
done without writing Rust stops before the first line: Result: blocked,
Found: the gap in Nikaia, Needs: supervisor decision. Briefs that still
order Rust are read with this rule over them. A defect in existing Rust is
fixed in Rust only where that code cannot be converted to Nikaia directly;
where it can, the fix moves it into Nikaia.tools/*.nika behind a nikaia subcommand or run with nikaia run, not
Python or shell; the Python in scripts/ moves when it is next reworked.
What blocks on the way is a finding: fix it in the compiler, do not route
around it..nika program with its .stdout / .stderr beside it
in tests/compiler/ (or a package’s tests), run by nikaia test (#821); no
new #[test], no new Rust test file. An existing Rust test is changed only
to keep it passing, or moved to Nikaia. What cannot yet be said in Nikaia is
a finding: fix or file it.docs/supervisor.md..claude/agents/builder.md (the cycle and the gate) and
docs/builder-facts.md (where things live, traps, and the self-hosting
rules: slices, syntax gaps of tools/*.nika, lowering).docs/measuring.md
(count with callgrind, never time; against tuned Rust; tokens, not lines).README.md or guide/:
docs/writing-guide.md (lead with safety, no absolute claims, natural prose
without bold lead-ins, nothing shown as runnable before it is built). Its
last section is for whoever writes the specification: compact for models
that read it whole, one rule in one place, one meaning per word.zip/mem::take,
scalars.take(16) for a refused slice, a loop for a missing map .iter();
each is debt). Whoever meets something Nikaia, std or the toolchain lacks
sorts it first, before writing a line around it:
Result: blocked, Found: the gap with a probe
of a few lines, Needs: supervisor decision. The supervisor decides it
(owner, 2026-10-31 and 2026-11-01): an obvious language change or
extension, by the language principles (docs/supervisor.md, Language
decisions), it approves itself, writes the ADR or specification text and files the
build (ready); only a genuinely non-obvious question goes to the owner
as a decision issue with a decision paper. Either way the work waits
for the build of that decision.No ADR to cite means it is not on purpose: in doubt, it is 2. “It can be written otherwise” is never the reason to go on, and a brief may not order a way around a gap of kind 2 or 3.
ready), never in a file in the repository, and the work that
needs it waits for the fix. Who finds a defect that blocks the work fixes
it at once, in any lane (owner, 2026-11-01); only what does not fit the
round goes to the bug lane (docs/supervisor.md, Lanes).target/ of a worktree you no
longer use; keep target/nikaia-project-tests (the tests’ cache, pruned by
the compiler to NIKAIA_CACHE_LIMIT). Never run the full suite locally by hand
(about 45 minutes; a driver runs it per batch): CI runs it on every push to develop.lower-std) are in docs/builder-facts.md.