Audience
Developers hacking the compiler internals (OCaml lexer/parser/typechecker/borrow-checker/codegen/effects + the formal/ Coq track).
Gap
Surfaced by the 2026-06-21 docs-depth gap-assessment. wiki/compiler/* documents each phase (lexer, parser, type-checker, borrow-checker, codegen) and there's a pipeline diagram in wiki/compiler/architecture.md, but there is no task-oriented runbook for the common contributor flows. A new contributor knows what each phase is but not how to change one. Specifically missing:
- "Extend the grammar / add a syntactic form" end-to-end walkthrough.
- "Add a typecheck or borrow-check rule" —
lib/borrow.ml's algorithm is described only in prose in docs/CAPABILITY-MATRIX.adoc; no walkthrough or debugging tips.
- "Add/extend a codegen target" checklist.
- "Run & extend the
formal/ Coq proofs locally" — formal/justfile exists but is undocumented; no "how to Print Assumptions / check no-Admitted" steps, and no narrative tying K‑1→F‑1→P‑2… to the code a contributor actually edits.
Suggested scope
docs/architecture/EXTENDING-THE-COMPILER.adoc (.adoc per DOC-FORMAT), or a wiki/compiler/extending.md companion, containing:
- a "which file for which change" touch-map,
- a worked "add a new keyword, end-to-end (lex → parse → typecheck → codegen → test)" example,
- typechecker/borrow-checker debugging tips + where the test fixtures live,
- a
formal/ build/check quickstart, with the K‑1→F‑1→P‑2 obligations mapped to the implementation they constrain.
Acceptance
A new contributor can add a trivial syntactic form and run the proof check following only this doc.
Audience
Developers hacking the compiler internals (OCaml lexer/parser/typechecker/borrow-checker/codegen/effects + the
formal/Coq track).Gap
Surfaced by the 2026-06-21 docs-depth gap-assessment.
wiki/compiler/*documents each phase (lexer, parser, type-checker, borrow-checker, codegen) and there's a pipeline diagram inwiki/compiler/architecture.md, but there is no task-oriented runbook for the common contributor flows. A new contributor knows what each phase is but not how to change one. Specifically missing:lib/borrow.ml's algorithm is described only in prose indocs/CAPABILITY-MATRIX.adoc; no walkthrough or debugging tips.formal/Coq proofs locally" —formal/justfileexists but is undocumented; no "how toPrint Assumptions/ check no-Admitted" steps, and no narrative tying K‑1→F‑1→P‑2… to the code a contributor actually edits.Suggested scope
docs/architecture/EXTENDING-THE-COMPILER.adoc(.adocper DOC-FORMAT), or awiki/compiler/extending.mdcompanion, containing:formal/build/check quickstart, with the K‑1→F‑1→P‑2 obligations mapped to the implementation they constrain.Acceptance
A new contributor can add a trivial syntactic form and run the proof check following only this doc.