These rules apply to every Markdown file in this repository and to the comments in config.example.toml.
Agents read these files without chat context and pay for every token, so the files are written for them first.
- Facts first. State what the code does today, in the present tense, before any history or rationale.
- One place per fact. A fact has one home; every other file points to that home instead of restating it.
Homes: setup, configuration and server behaviour in
README.md; MCP and REST surfaces indocs/reference/mcp-and-rest.md; the CLI indocs/reference/cli.md; retrieval behaviour and evaluation indocs/reference/retrieval.md; module structure indocs/architecture.md; the code-level picture of language-server sessions, breakers, readiness and sync indocs/lsp-channel.md; the code flow of one traverse call indocs/traverse-flow.md(answer-key behaviour and defaults stay indocs/reference/cli.md); module boundaries indocs/development/module-boundaries.md; build and test indocs/development/testing.md; language scope indocs/languages.md; machine values indocs/development/machine-values.md; traversal engine indocs/spike/multimap/engine.md; measurement method indocs/spike/multimap/evaluation.md; plans indocs/development/roadmap.md; decisions, findings and history indocs/decisions.md. - Sections stand alone. An
##section can be loaded by itself: it names what it is about in its first line and does not depend on text after it. No forward references inside a section. - Plans are marked. A file that holds plans starts with
Status: PLAN. A section that describes a design that is not built says so in its heading or first line. Frozen records (pre-registrations, results, generated files) start with their date and are never edited; corrections are appended as dated notes or recorded indocs/decisions.md. - No narrative history outside
docs/decisions.md. A fact that changed is replaced, and the change is one line in the log with its date and evidence. - Numbers carry a date and a source: the commit, the results file or the run name. A number without both is an estimate and says so.
- Code references name symbols and files, never line numbers.
- No machine-specific values: no user profile paths, drive letters, client session folders, local port layouts
other than the product's own defaults, model aliases of one machine, or secrets.
cargo xtask lint-machine-pathsenforces part of this; the rest is reviewed. - Links are relative and resolve; anchors match a heading in the target.
cargo xtask docs checkchecks every relative link and anchor in the tracked*.mdfiles (it skips the vendored rust-skills and only reports the frozen*-prereg*.mdand*-results.mdrecords underdocs/spike/multimap/v2) and runs in--suite Full; none may be missing. - Short over complete: a table over prose for facts with the same shape; one example instead of three; a pointer
instead of a copy. Target sizes: README <= 260 lines, any guide <= 250, the roadmap <= 350. The append-only log
docs/decisions.mdis exempt from the line target. - Vendored third-party files (
.agents/skills/rust-skills/**) are not edited. - Every change to these files is checked against the code it describes (names, defaults, ports, commands) in the same change.