# Changelog

Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), versioning follows [SemVer](https://semver.org/).

## [Unreleased]

### Added

- `make publish`: builds the site (`make site`) and uploads `target/site/public/` to a Cloudflare Pages project with `wrangler pages deploy` (wrangler 4.167.0 through `npx`). `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`, `CLOUDFLARE_PAGES_PROJECT`, `SITE_DOMAIN` and the optional `CLOUDFLARE_PAGES_BRANCH` are read from `.env` (ignored by git; new `.env.example`); the target stops before building when one is missing or the domain is still `mul.example`. ADR-012 amendment.
- Signed numbers for patch mode (row 4.80, RFC-014 Signs, ADR-022 and ADR-021 amendments, RFC-013, Go adapter 0.13.0): `mul plan set_literal --signed` takes the value as the whole number with its sign. A number literal fact has an optional `sign` (`"unary"` with `signStart` and `signedText`, or `"free"`; none for the right operand of a binary operator), so the plan replaces an existing unary sign (`-3` to `-5`, `+5` or `5`; the inner minus of `- -6`) or writes one where the syntax allows (`x := 5` to `-6`, `-(7)` to `-(-9)`) and refuses it for `a - 3` and `a -3`; the plan marks the edit `"signed": true`, and `apply` accepts a sign only for such an edit and refuses one that would join the operator before it (`MUL-P014`, `a-` and `-5`). Without the flag nothing changes. `mul_graph::ForeignLiteral` has `sign: Sign`. Fixtures `corpus/signs.go`, `corpus/signs_bom.go` (byte order mark and CRLF), the cases and refusals of `scripts/patch.sh` (`patch-cases.tsv`, `patch-refusals.tsv`).
- Snapshot id under load (row 4.190, RFC-013): the intermittent `Snapshot::id` difference on `golang.org/x/tools` seen in row 4.14 was looked for in the core and the Go adapter and not reproduced: forty ingests (twenty of `x/tools` v0.53.0, twenty of the Go tool tree `cmd`, two at a time each, with sixteen busy loops on 32 cores) gave `snap:5afd6b93a2f5a583` and `snap:97d01f4b13e34817` every time, and twelve more of each in a heavier run did too (one `cmd` run of those lost its adapter process to memory pressure of the shared machine, which is an error, not another id). Part joining and hashing are sequential and per key in arrival order, and the adapter's extraction goroutine hands its result over through a closed channel before any part is built, so no part is split, reused or reordered while the state changes. New tests in `mul-adapter` (`many_small_parts_give_the_id_of_the_joined_answer`, `a_part_out_of_order_or_twice_changes_the_id`) fail when a part is hashed out of order, twice or not at all. The earlier difference is most likely the cgo cache spelling fixed in row 4.90.
- Core memory of a large ingest, second step (row 4.91, ADR-023 amendment): `mul_graph::Interned` (a shared `Arc<str>` that derefs to `str`) holds each repeated path, symbol id, package id, name, kind and usage once, so the fields of `ForeignFile`, `ForeignPackage`, `ForeignSymbol`, `ForeignReference`, `ForeignLiteral` and `ForeignDiagnostic` that carried those as `String` are now `Interned` (readers that need an owned string call `.to_string()`); `mul_adapter::Parts` spools the compact text for `Snapshot::id` to a temporary file outside the project instead of holding it, `Parts::finish` returns a `Result`, and `AdapterError::Spool` reports a file that cannot be written or read. `Snapshot::id` and the graph `snapshot_id` are unchanged (checked against the old formula on the fixture, `golang.org/x/tools` and `cmd`). Core peak for `cmd` 1,277 MB to 569 MB, for x/tools 374 MB to 276 MB (release build, `VmHWM`).
- Extraction time of a very large project (row 4.15, RFC-013, ADR-023 amendment, Go adapter 0.12.0): on 2 cores with a cold cache the Go tool tree `cmd` needed 27.2 s for the first part (45 % of the 60 s per answer). The adapter now extracts in the background and answers an `ingest` request with an empty part and the same `next` after 15 s if the extraction is not done; the core is unchanged (it reads empty parts as any other, a test shows `Snapshot::id` stays the same), the protocol and manifest gain nothing and the contract stays `lcl-v0`.
- Memory of a large ingest (row 4.14, RFC-013, ADR-023 amendment): the core no longer joins the parts of a paged `ingest` into one `serde_json::Value`. `mul_adapter::Client::ingest` takes a sink and hands it each part as it arrives; `mul_graph::ForeignBuilder` (`add_part`, `finish`) imports the parts into the typed lists, checking per part what the part decides and, after the last part, what needs all of them (duplicates, ranges inside files, dangling ids, missing lists). `ForeignGraph::from_facts` is the one-part case. `Snapshot::id` (same value, hashed from the compact text kept per key) and the graph `snapshot_id` are unchanged. Peak memory of the `mul` process in a release build: 642 MB to 373 MB for `golang.org/x/tools`, 3,451 MB to 1,275 MB for the Go tool tree `cmd`; time unchanged.
- Go adapter 0.11.0: named parameters of function types in package-level `var` and `const` and the contents of a function literal assigned to one are symbols with the variable as owner (`F/parameter:x`; row 4.30, RFC-013, ADR-021 amendment). No schema change; references from names that share one declaration range are now attributed in a fixed order.
- Go adapter, cgo files that are not plain (row 4.31, Go adapter 0.10.0, RFC-013, ADR-021 amendment): a symbol or use of a project file that the `//line` mapping cannot confirm is no longer dropped silently; the adapter reports a diagnostic with `file` and `offset` (names cgo made up stay silent). New fixture `frontends/go/testdata/repo/native/crlf.go` (cgo with CRLF line ends). A byte order mark in a cgo file stops cgo itself, so that case is checked on a throwaway project, not in the corpus. No schema change.
- `mul plan set_literal` selectors and kinds (row 4.13, RFC-014, RFC-013, ADR-022 amendment): `--at <file>:<line>:<column>` next to `--at <file>:<byte>` (bytes from 1, a line ends at `\n`, a CR and a byte order mark are counted; the file hash must still be the one of the facts, else `MUL-P005`; `scripts/patch.sh` checks it on the CRLF and byte-order-mark corpus files); a number with a sign is refused with its own message (a minus is an operator in the facts, so `--5` or a changed meaning is never written; the transformation that edits a sign is row 4.80); optional adapter method `validate` for literal kinds outside the five lexical rules, declared by `"validate": true` in `capabilities.json` (contract stays `lcl-v0`, an adapter without it is unchanged), whose acceptance is recorded as `"validatedBy": "adapter"` on the edit, so that `apply` takes a kind with no rule only from such an edit. `mul_patch::Settings` replaces the `allow_generated` argument of `plan_set_literal`; `Edit` gains `adapter_checked`; `mul_adapter::Client::validate`. No Go adapter change.
- Go adapter 0.9.0: diagnostic offsets the line:column text cannot give (row 4.20, RFC-013, ADR-021 amendment): the adapter records the parser's raw error positions, so end-of-file syntax errors get an exact `offset`, and reads files with `//line` directives through their adjusted positions (a directive without a column leaves `offset` null). No schema change; new fixture `frontends/go/testdata/broken/directive/`.
- The Go corpus `frontends/go/testdata/repo` passes the whole verification (row 4.18, ADR-024): `corpus/tags_ignored.go` carries `// +build ignore,!ignore` matching its `//go:build ignore && !ignore` line, so `go vet` (run by `go test`) accepts it and `mul apply --verify format,build,test` keeps a one-literal change on the corpus. `scripts/verify.sh` takes `@repo` as a project (the corpus itself) and `verify-cases.tsv` runs it with all three steps; the file stays excluded from the build, still has a hash and no symbols, and the byte-exact round trip is unchanged.
- `generated` marker on files (row 4.10, Go adapter 0.8.0, RFC-013, RFC-014, ADR-021 amendment): a file of `lcl-facts-v0` gains the optional boolean `generated` (absent or `null` is false, so old payloads load). The Go adapter sets it for the header `// Code generated ... DO NOT EDIT.` before the package clause (`go/ast.IsGenerated`). `ForeignFile::generated` carries it into `ForeignGraph` (not into `snapshot_id`). `mul plan` refuses a literal in a generated file with the new `error[MUL-P013]` and plans nothing; `--allow-generated` plans it and prints a warning on standard error (`plan_set_literal` takes `allow_generated`). The plan does not record the override; the apply-time check stays in row 5.6.
- Loopback in the verification namespace (row 4.17, ADR-024 amendment): a step now has its own loopback up (`unshare --keep-caps`, `ip link set lo up`, then `setpriv` drops every capability), so a test that listens and connects on `127.0.0.1` passes; the network to the outside stays cut. New fixture `frontends/go/testdata/verify/loopback`; the `network` fixture still fails to reach the host. `ip` and `setpriv` are now required, and a system without them is refused with `MUL-E001`.
- Verification (row 4.4, Go adapter 0.7.0, RFC-013, RFC-014, ADR-024): new crate `mul-verify` and the command `mul verify <language> [--dir] [--before <dir>] [--steps format,build,test] [--timeout <s>] [--memory <MiB>] [--log-dir] [--frontends]`. The `capabilities.json` manifest gains the optional `verify` block (`env` and the commands of the steps `format`, `build`, `test`; `mul_adapter::VerifySpec`, `Step`), so the core holds no language command; no protocol message is added and the contract stays `lcl-v0`. Each step runs in a child process with a wall-clock limit (120 s), a memory limit (`RLIMIT_DATA`, 4096 MiB per process), a file size limit and no network, without root: `unshare --user --map-current-user --net --pid --fork --kill-child` plus `prlimit` (the options evaluated and the limits of the mechanism are in ADR-024). A system that cannot do this (not Linux, tools missing, user namespaces forbidden) gets `error[MUL-E001]` and nothing runs; there is no unisolated mode. The report has per step the status, the time, the first 10 lines of output and the path of the full log; the first failed step stops the rest. The format step passes unless the change left a file unformatted that was not before (so an unformatted fixture does not fail, and a longer literal that moves the alignment of comments does; row 4.12). `mul apply <plan> --verify build,test` writes the plan, verifies the written tree and puts the old bytes back when a step fails (`error[MUL-E008]`, exit 1); new `mul_patch::apply_checked`; a restore that fails is `MUL-P012`. Error family `MUL-E001` to `MUL-E008` and `MUL-P012` in `docs/language/errors.md`. `scripts/verify.sh` (in `make check-adapter` through `frontends/<language>/testdata/verify-cases.tsv`) runs seven fixtures through the real CLI: a passing change, a file unformatted before and after, a build break, a failing test, a test that hangs (killed at the limit, no process left), a test that connects to a listener on the host (it must fail, and the listener must see only the control connection) and a change that unformats a file; the four failing cases leave the tree byte for byte as it was. `scripts/lib.sh` holds the tree-state function shared with `scripts/patch.sh`. `mul-patch` splits `stage.rs` out of `apply.rs`. Wave 4 gate: on a Go module `mul plan` and `mul apply --verify format,build,test` change one literal with a minimal patch and gofmt, `go build` and `go test` pass.
- Go adapter 0.6.0: cgo files, type parameters and function-type parameters (row 4.11, RFC-013, ADR-021 amendment): a file that uses cgo is read like any other, its ranges mapped from cgo's output back to the source through its `//line` directives; new kind `typeparameter` (`<owner>/typeparameter:T`) and `parameter` symbols for interface methods, function types and function-typed fields (`Visitor.Visit/parameter:node`, `Handler/parameter:request`). No schema change. New fixtures `native/mixed.go` and `members/typeparams.go`.
- Broken Go projects in the round-trip corpus (row 4.9, RFC-013, ADR-021 amendment): `frontends/go/testdata/broken/` is a module that does not build (syntax error, type errors, a missing and an unused import, a test file that does not compile, a healthy package); `scripts/roundtrip.sh` round-trips it next to `testdata/repo/`. A diagnostic of `lcl-facts-v0` gains the optional keys `file` and `offset` (byte offset of the position), the core validates them (`ForeignDiagnostic::file`, `offset`; absent or null stays valid) and `mul ingest` prints `(byte N)`. Go adapter 0.5.0 computes them (null for a position outside the file or a file with `//line` directives) and sorts diagnostics by package, file and offset.
- Ingest at the size of a real module (row 4.8, RFC-013 Paged ingest, ADR-023): measured on `golang.org/x/tools` (72.9 MB of facts, ingest 2.3 s in the adapter) and the Go tool tree `cmd` (408.8 MB, 14 s), loading dependencies from source is cheap (1.3 s and 3.4 s) and the limit that was hit is the 64 MiB answer line, not the 60 s. `ingest` may now be answered in parts: a part carries `next`, `mul-adapter` asks for the next one with `cursor` (new module `parts`, at most 4096 parts, each with its own 60 s) and joins the lists, so snapshots and the graph see the unpaged object; a result that fits one part is unchanged. Go adapter 0.4.0 pages at about 16 MiB (`x/tools` 6.2 s in 5 parts, `cmd` 30.6 s in 26 parts); the facts of the fixture are byte-identical to 0.3.0. No cache and no export data: not needed, recorded in ADR-023. The measurements are in `frontends/go/README.md`.
- Patch engine and `set_literal` (row 4.3, RFC-014, ADR-022): new crate `mul-patch` and the commands `mul plan set_literal <language> <dir> (--at <file>:<byte> | --symbol <id>) --value <text> [--out <plan.json>]` and `mul apply <plan.json> [--dir <dir>] [--dry-run]`. A plan is JSON (`mul-plan-v0`, unknown keys ignored so wave 5 can extend it) with edits on byte ranges, each with `old`, `new`, `kind` and the `baseHash` of the whole file. `apply` re-checks everything against the disk and writes nothing when the file hash differs, the old bytes are not there, a range is empty, outside the file or overlapping, the path is not a plain relative path inside the root or is a link, or the new value is not a well-formed literal of its kind (lexical rules for `int`, `float`, `imaginary`, `char`, `string`; any other kind is refused). Each file is replaced atomically (exclusive temporary file, mode copied, rename) and every other byte, including a byte order mark and CRLF, is copied unchanged; `--dry-run` prints the same diff without writing. `scripts/patch.sh` (in `make check-adapter` through `frontends/<language>/testdata/patch-cases.tsv`) runs plan and apply on the Go corpus and fails unless only the literal's bytes changed, the mode is kept, no temporary file is left and a second apply is refused. Every refusal prints `error[MUL-P001]` to `MUL-P011` (plan unreadable, empty, path outside, not a regular file, hash mismatch, range outside, overlap, old bytes differ, ill-formed new literal, file changed between check and write, write failed), documented in `docs/language/errors.md`; all files are compared once more before the first write, and a system failure on a later file restores the earlier ones. A plan is a plain file (stdout or `--out`), no implicit store; the convention and the compatibility with row 5.1 are in RFC-014. `patch-cases.tsv` also covers float, imaginary and char literals and a file edited between plan and apply. The first half of the wave 4 gate; `verify` and rollback are row 4.4.
- Go adapter 0.3.0, symbol coverage (row 4.7, RFC-013, ADR-021 amendment): embedded struct fields, interface methods, local types, local constants and labels (new kind `label`) are symbols (`Record.Base`, `Reader.Read`, `<fn>/type:<T>`, `<fn>/constant:<name>`, `<fn>/label:<name>`) and their uses are references; no change to the facts schema or the Rust core. Generated files are listed and read like any other; a file that uses cgo is listed and hashed as written, gives no symbols, and a diagnostic says so. New fixtures `frontends/go/testdata/repo/members/` and `native/`.
- Backlog rows written out for sessions: `BACKLOG.md` gains the row form `Done when:` / `Open, to settle in …` / `Decide with the user first:` and the rule that a choice left open by a row is recorded in an RFC or ADR before it is implemented. Rows 4.3, 4.4, 5.1–5.6, 6.1–6.4, 7.1, 7.2 and 7.5 are rewritten in that form from the cited sections of the design document; rows 7.2, 9.2 and 12.3 are split (new rows 7.2a logical tasks, 9.2a floating point, 12.3a `lang.upgrade`). Rows of waves 8–13 stay outlines and are rewritten by the first session of their wave.
- Literal facts for `set_literal` (row 4.6, RFC-013, ADR-021 amendment): `lcl-facts-v0` gains the required list `literals` (`kind`, `text`, `file`, `start`, `end`, `symbol`): the literal tokens of the project with their exact byte range (a byte order mark and CRLF count), the token as written and the symbol that holds it. The schema name is unchanged; the core now rejects a payload without the list, and the adapter contract `Snapshot::id` of a project changes. `mul_graph::ForeignGraph` has `literals`, `literals_of` and `literal_at`; the import checks file, range, text length, duplicate start and holder. `mul ingest` prints `literals: N`, `mul inspect --language` one line per literal, and `--symbol` the literals the symbol holds. The Go adapter (0.2.0) reports int, float, imaginary, char and string literals, skipping import paths.
- Round-trip corpus (row 4.5, spec §13.7): `frontends/go/testdata/repo/corpus/` joins the Go fixture project (comments at every position, odd spacing, generics, raw strings, non-ASCII identifiers, `//line` directives, build tags, CRLF, mixed line ends, byte order mark, no final newline). Go tests in `internal/adapter` copy the project with fixed old modification times, ingest through the protocol and fail on any change of bytes, modes, mtimes or paths, and check that file hashes equal the SHA-256 of the files and that symbol and reference ranges and symbol hashes are exact. New `scripts/roundtrip.sh <language>` runs the real `mul ingest` on a copy of `frontends/<language>/testdata/repo` and diffs the tree before and after; `make check-adapter` runs it for any adapter that has such a corpus. No change to the adapter or the facts schema.
- Go adapter and the facts of `ingest` (row 4.2, RFC-013, ADR-021): `frontends/go` (adapter 0.1.0, level L1, Go 1.21 to 1.27, own `CHANGELOG.md`, `Makefile` with `build`, `test`, `lint`, `coverage`) reads a Go module with `go/packages` and `go/types` and answers `hello`, `project` (the `go` directive of `go.mod`, as major.minor), `ingest` and `shutdown`. The `ingest` result `lcl-facts-v0` is language-neutral: `files` with SHA-256 of their exact bytes, `packages`, `symbols` (functions, methods, types, variables, constants, struct fields, parameters, locals; byte range of the declaration and of its name, SHA-256 of exactly those bytes, scope) and `references` (call, read, write, type; byte range of the name) between symbols the project defines, and `diagnostics`; offsets count a byte order mark and CRLF. The adapter runs the Go tool with `GOFLAGS=-mod=readonly` and `GOTOOLCHAIN=local` and writes nothing. New `mul_graph::ForeignGraph::from_facts` imports and validates the facts (unique ids, ranges inside their file, no dangling id) with its own `snapshot_id`; the core still names no language. New commands, all read-only: `mul ingest <language> <dir>`, `mul inspect --language <language> [--symbol <id>] <dir>`, `mul refs <language> <dir> <symbol>`, each with `--frontends <dir>`. `make check-adapter LANG=<language>` builds the adapter first when its Makefile has a `build` target. `mul-graph` depends on `serde_json`; the Go adapter on `golang.org/x/tools` v0.53.0.
- Longer inputs for the `typed_program` fuzz target (row 3.14, ADR-015): `make fuzz` runs it with `-max_len=$(FUZZ_TYPED_LEN)` (default 16384) and `-len_control=0`, because libFuzzer's length control had kept inputs at 43 bytes or less. In a 300 s session on nightly with `cargo-fuzz` 0.13.2 the corpus reached 1908 inputs of up to 1252 bytes (424 KB in all) in 20.8 k runs (bigger programs, so fewer runs than the 167 k of row 3.12); no crash, so no regression case.
- Language adapter contract LCL v0 (row 4.1, RFC-013, ADR-020): new crate `mul-adapter`. An adapter is a separate process in any language in `frontends/<language>/`, found only through `frontends/*/capabilities.json` (`language`, `adapterVersion`, `level` 0-4, `languageVersions` `min`..`max`, `outsideRange` `readOnly`|`refuse`, `command`); the core names no language. `Client` starts it and speaks one JSON object per line over stdio (`hello`, `project`, `ingest`, `shutdown`) with a 60 s timeout, a 64 MiB line limit and named errors. The adapter reports the project's declared language version (`go.mod`, `composer.json`, `pyproject.toml`, `tsconfig`); `decide` gives full access inside the range and read-only access or a refusal outside it or without a declared version, never a guess; `Snapshot` keeps the version, the access and the adapter's facts, with an id `snap:...`. `mul adapter check <language> [--frontends <dir>] [--project <dir>]` and `make check-adapter LANG=<language>` check one adapter in isolation. New dependency: `serde_json` 1.0.154.
- `mul build --strip-positions` (row 3.13, ADR-018): builds an executable without the file path and the source line of its trap sites; a trap prints `error[CODE]: message`. It reuses the trap site table with `TrapSites::default()` (no frames beyond the line feed), so the default build is unchanged. Accepted by `build` only.
- Guarded recursion in the typed program generator and the first libFuzzer sessions (row 3.12, ADR-015). A generated function with an `i32` parameter may emit `if pK > 0 { f(..., ((pK % 4) - 1), ...) { ... } }`, where `pK` is its first `i32` parameter; inside that guard it may call itself again, always with the decreased measure, so recursion is at most four calls deep and ends in both backends before the call depth trap. The property test `crates/mul-cli/tests/typed.rs` now also requires that some recursive programs run to the same end in the interpreter and the JIT, and a new case pins the generated text of the guard. `make fuzz FUZZ_TIME=540` ran on nightly with `cargo-fuzz` 0.13.2 (540 s per target; 20 000 proptest cases per property first): `front_end` 6.2 M runs, `parser` 4.8 M, `mulb_reader` 82.8 M, `typed_program` 167 k; no crash, so no regression case to add.
- Parameters and locals in the Code Graph (row 3.8, ADR-019): `mul_graph::Kind` has `Parameter` and `Local`, `Symbol` a `scope` (the declaring function's id), `Reference` a `usage` (`Usage::{Call, Read, Write}`); every name read and assignment target resolves to its declaration through the block scopes. Ids `sym:mul:<module>:<function>/parameter:<name>` and `.../local:<name>`, with `#<n>` for the n-th declaration of a name in sibling blocks; each member has a `content_hash` over its canonical declaration. Function ids and hashes and the `snapshot_id` (`mul-snapshot-v1`, functions only) are unchanged. New `mul_graph::{member_id, content_hash}` and `Graph::members_of`; `calls_of` returns calls only. `mul inspect` lists members after their function, `--symbol main/local:t` prints scope, declaration, origin, hash and `references: [read@…, write@…]`, and a function's detail lists its `parameters` and `locals`. `.mulb` Code Graph section 4 (optional-feature bit 2, RFC-012) with kinds, scopes and usages replaces section 3 in the writer; section 3 is still read, and section 4 wins when a file has both. Limit: 1 048 576 symbols in section 4.
- Source positions outside the interpreter and JIT (row 3.7, ADR-018). An executable from `mul build` reports a trap exactly as `mul run` does: `file:line:column: error[CODE]: message [byte N]`, the source line and the `^` marker, or `<source>: ... [byte N]` for a `.mulb` whose recorded source changed. The object carries a table `mul.rt.sites` with the pre-rendered head and tail of the diagnostic of every trap site (`mul_backend_cranelift::TrapSites`), and the C `main` writes head, message and tail. A code generation error names the IR node it failed on, and the CLI prints its position under the internal compiler error (`  at file:line:column [byte N]`), like a verifier error. `mul_syntax::Span::frame` and `Diagnostic::render_in` (rendering with or without the source text) are shared by the CLI and the executable.

- `.mulb` sections 2 and 3 (row 3.5, RFC-012): the source map (path, length and raw SHA-256 of the source, then the byte range of every function, block, instruction and terminator, with no counts: the shape comes from the IR section) and the Code Graph (module, symbols with name, kind, visibility, signature, effect, content hash and origin, references by symbol index; `symbol_id` and `snapshot_id` are derived, the reader recomputes the snapshot). `mul build --emit mulb` writes both as optional sections; `mul_format::Mulb` has `source_map` and `graph` fields in place of the opaque `sections` list. A `.mulb` file now gives the same positioned run-time errors as its source while the recorded source file is unchanged (otherwise `<source>: error[CODE]: message [byte N]`), and `mul ir --source-map` and `mul inspect [--symbol]` work on it; a file without the section a command needs is reported by name. The file hash and the `snapshot_id` stay separate (ADR-016). `mul_graph::{symbol_id, snapshot_id}` are public; `SourceMap::dump` takes the source text as an `Option`. The `.mulb` fuzzing corpus includes both sections.

- `mul inspect --file <file>.mulb` (row 3.6): prints the header (schema version, feature masks, capabilities, content hash) and the section list (identifier, name, required flag, size) of a `.mulb` file. `mul_format::inspect` shares the header and section walk with `decode` (new `header` module with `Header`, `Info`, `SectionInfo`), so rejections carry the same `MUL-B0xx` codes; a non-`.mulb` path is a usage error.
- Site without links into the private repository (row 3.11): the `link_rewrites` and `repository_url` are gone from `site/ssg.yaml`; `docs/language/` names repository files (`spec/grammar.ebnf`, RFC numbers, `llms.txt`) as text, the theme drops the GitHub links, and `CHANGELOG.md` is published at `/changelog/` (generated by `scripts/site-content.sh`). New docs test `site_does_not_link_the_private_repository` (in `make check`) fails on any link to the repository host in the site sources, and `make site` fails when the built `target/site/public/` contains one.
- Deeper fuzzing (row 3.9, ADR-015): a typed program generator (`crates/mul-cli/tests/common/typed.rs`, `typed_stmt.rs`, `typed_expr.rs`) turns any byte string into a MUL program that passes sema by construction (types, scope without shadowing, `var`-only assignment, effects, returns and no unreachable code), with locals, assignments, calls, `print`, nested blocks, `if` chains, `while` loops with any condition and counted loops. The property test `crates/mul-cli/tests/typed.rs` (256 cases in `make check`) checks through `common/oracle.rs` that sema and the verifier accept each program, that a `.mulb` round trip keeps its IR, and that the interpreter and the Cranelift JIT agree on result, output and trap (with its instruction). New `mul_interp::run_fueled` and `Fueled`: the interpreter with a step budget, so a generated `while true` ends in `Fueled::OutOfFuel` instead of hanging; the JIT runs only when the interpreter finished. `mul run` is unchanged and there is no new error code. New cargo-fuzz target `typed_program`, which includes the generator and the oracle by path; `make fuzz` runs the typed property with `FUZZ_CASES` and the new target. 30 000 generated programs in release mode found no disagreement and no crash. libFuzzer did not run: no nightly toolchain or `cargo-fuzz` on the development machine (the four targets type-check on stable).
- Site after wave 3 (row 3.10): the blog post "Identity and persistence" (`site/blog/2026/identity-and-persistence.md`, cover `blog-identity.svg`) on the Code Graph and `mul inspect`, `.mulb`, positioned run-time errors and fuzzing, with the open items; the "What comes next" list of the welcome post brought up to date; the home page pipeline step on the IR lowering says every IR node maps back to the MUL source.
- Docs test `language_links_are_published_by_the_site` (in `make check`): a link in `docs/language/` must be a sibling page or a `../../` repository path, the two forms the site resolves, so a link such as `../adr/` fails before `make site` does.
- Fuzzing of the `.mulb` reader (rows 3.2 and 3.3, ADR-015): the property test `mulb_reader_is_total_on_bytes_and_corrupted_files` runs `mul_format::decode` on arbitrary bytes and on truncated and mutated `.mulb` files of every corpus program that compiles; cargo-fuzz target `mulb_reader`, whose corpus `make fuzz` seeds with `mul build --emit mulb`.
- Code Graph (row 3.1, ADR-014): new crate `mul-graph` with stable `symbol_id` (`sym:mul:<module>:<name>`), `content_hash` (`sha256:` over a layout-independent canonical text of each function) and `snapshot_id` (`snap:` + 16 hex digits over all ids and hashes), plus definitions, references (call sites) and calls (`Graph::build`, `find`, `calls_of`, `references_to`). `mul inspect <file>` lists the snapshot and symbols; `mul inspect --symbol <id> <file>` prints one symbol. Compact, pretty and one-line layouts, comments and function order give the same ids, hashes and snapshot. New dependency: `sha2` 0.11.1.
- Fuzzing and round-trip property tests for the front end (row 3.3, ADR-015). `crates/mul-cli/tests/robust.rs` (proptest, stable toolchain, part of `make check` with 256 cases per property) feeds lexer, parser, sema, lowering and verifier arbitrary bytes and text, every prefix of every corpus program and mutated programs, and checks on generated programs that compact → pretty → compact is lossless, layouts are idempotent, `parse(format(p))` equals `parse(p)` apart from spans, and the verifier never rejects the IR of a program that type-checks; hostile inputs of 200 000 nested parentheses, unary operators, blocks, `if`/`while`, operator chains, calls, literals and names end in a diagnostic. No crash was found: the limits `MUL-S003` and `MUL-S004` already bound every recursive phase. The harness `crates/mul-cli/tests/common/robust.rs` takes any `fn(&[u8]) -> Result<_, _>` (`reader_is_total`), so the `.mulb` reader needs one small test file; a watchdog aborts on a hang. `fuzz/` is a standalone cargo-fuzz crate (targets `front_end`, `parser`, excluded from the workspace); `make fuzz` runs the property tests with `FUZZ_CASES` and, when a nightly toolchain and `cargo-fuzz` exist, the targets for `FUZZ_TIME` seconds each from a corpus seeded with `tests/` and `examples/`.
- The `.mulb` binary format (row 3.2, RFC-012, ADR-016), new crate `mul-format`. A 68-byte header (magic, schema version 1, flags, required and optional feature masks, capabilities, section count, body length, SHA-256 content hash over the header and body) and sections `(identifier, flags, length, payload)`; section 1 is the IR module, 2 and 3 are reserved for the source map and the Code Graph (rows 3.4, 3.1). An unknown required feature or required section rejects the file (`MUL-B004`, `MUL-B007`); an unknown optional section is skipped. Size limits for file, sections, counts, names and strings; capabilities are recomputed from the IR and the IR passes the verifier on load. Saving is deterministic: save, load, save is byte-identical. `mul_format::{encode, decode}`: `decode` takes any `&[u8]`, never panics and is the entry point for fuzzing (row 3.3). Error codes `MUL-B001`..`MUL-B009` in `errors.md`.
- `mul build --emit mulb [-o <file>]` writes the verified IR; `check`, `ir`, `run` and `build` accept a `.mulb` path in place of source.
- Source maps (row 3.4, ADR-017): every function, block, instruction and terminator of the IR has a byte range in the MUL Source, kept in a side table (`mul_ir::SourceMap`: `SourceFile` with path, length and SHA-256, and a `SpanTable` parallel to the module) filled by `mul_ir::lower_with_spans` from the checked program; IR equality and the IR dump do not depend on it. A run-time trap in the interpreter and in the Cranelift JIT now reports `file:line:column: error[CODE]: message [byte N]`, the source line and a `^` marker at the operation that trapped (the same one in both backends, also in a file written on one line, and inside a called function); the JIT records the trap site in its `out` slot, `ExecError::Trap` carries the `IrNode`. A verifier error (exit code 3) names the source position of its IR node. `mul ir --source-map <file>` prints the map. `mul_verifier::VerifyError` has an `at` field; `mul_ir::Module::inst_nodes` numbers the instructions.
- `mul_syntax::Span::position` (line and column of a byte range), shared by diagnostics and the source map.
- Design document chapter 23, both editions (row 2.20): compact MUL as a third variant. The counts table has a compact column; a new section "Second layout: compact MUL" with a table and a plot of the ratios to compact MUL; the break-even table and plot show pretty and compact MUL side by side, and the prose is reread for the larger guide (`o200k_base`: 2172 tokens). With compact MUL the guide is recovered against Go, PHP and C (about 8700, 8000 and 6300 tokens of code); the chapter states that this is a gain of the layout against the other languages as written, not of the syntax, and that correctness in the compact layout is row 7.3. The estimator section describes the glue rule and its error on compact MUL; threats to validity and conclusions have a layout item. Listings stay pretty (ADR-013). `measure.py` writes the new parts (`cvol`, `cprogs`, `\tsRowsCompactRatios`, `\tsPlotCompactRatios`, the extra columns and the fifth argument of `\tsPlotBreakEven`); the numbers already published do not change.
- Token study in both layouts (row 2.19): `research/token-sample/measure.py` counts every MUL program in the pretty layout (through `mul fmt --pretty --stdout`, the layout the published numbers use) and in the stored compact one; `results.csv` has a `layout` column (`pretty`, `compact`, `as written`), `summary.json` a `compact` part and `generated.tex` new macros (`ctotal`, `csave`, `cagg`, `cgm`, `ctlo`, `cthi`, `cest.*`) for the comparison with compact MUL. The BPE counts of the sources are unchanged; the guide is larger since row 2.16, so its cost and the break-even volumes in chapter 23 moved (`o200k_base`: 2069 → 2172 tokens).
- Site: comparison pages from the committed evidence (row 2.18). `scripts/site-content.sh` reads the IR, the run output in every language and the token tables from `examples/compare/evidence/<name>/` instead of running the programs again, and shows the `cl100k_base` and `o200k_base` tables next to the estimator table with one sentence on why they differ. `make site-content` (and so `make site`) runs `make evidence-check` first.
- Site: pretty view of compact MUL in the browser (row 2.17). `site/theme/mul/js/layout.js` lays out every `mul` code block holding a whole module for reading, with a Compact/Pretty switch per block; Copy always copies the compact layout. Example pages show the stored compact source once instead of two server-side copies. `make site-layout` (part of `make site`, needs Node.js) runs `scripts/site-layout.test.mjs`: on every MUL file the script's pretty and compact layouts must equal `mul fmt --pretty` and `mul fmt`; the docs test also checks that the script lists every keyword.
- `make venv`: a project virtual environment in `.venv/` with `tiktoken` (`research/token-sample/requirements.txt`); `make evidence`, `make evidence-check` and `make token-study` use it when it exists.

- `mul fmt [--pretty] [--check | --stdout] <file>...` and RFC-011, the layout of MUL Source (row 2.16, ADR-013). The compact layout is canonical and the default: a space only between two word tokens (keywords, names, numbers), a line feed only after a comment, nothing else. `--pretty` writes the layout for people (one statement per line, four-space indentation, spaces around operators, a blank line before every function). Both layouts keep every token and comment, and compact → pretty → compact is lossless. Only a program that parses is formatted; `--check` lists files out of layout and exits with 1, `--stdout` prints instead of writing. The formatter is `mul_syntax::format` with `Layout::{Compact, Pretty, OneLine}`. `spec/grammar.ebnf` and RFC-011 state where whitespace is required and guarantee that no rule depends on a line feed. New tests (`crates/mul-cli/tests/layout.rs`): the round trip on every golden, conformance, example and reference source; every golden and conformance case run in the one-line layout in both backends; `examples/` and `tests/` must stay compact; the guide's blocks compact, the other reference pages pretty.
- ADR-013: the compact layout (no optional whitespace) is the canonical form of MUL Source, the pretty layout is produced on request; implementation is backlog row 2.16, the correctness risk is measured in row 7.3.

- `examples/compare/evidence/<name>/`: committed evidence for every comparison program — the verified IR, the output and exit code in MUL (interpreter and Cranelift), Go, PHP, C and Rust, and token tables from the offline estimator and from the `cl100k_base` and `o200k_base` vocabularies. `make evidence` rewrites it, `make evidence-check` fails when it is stale. `research/token-sample/count.py` is the counter used through `mul tokens --tokenizer-cmd`.

- Comparison pairs `isqrt` (integer square root by bisection) and `abundant` (abundant numbers below 100, sum of proper divisors) in MUL, Go, PHP, C and Rust; both are on the benchmarks page and pass `make compare`.
- Design document v2.2 (both editions): signed by the author; chapter 23 "Pilot study: tokens of the source text" with tables, formulas, confidence intervals, an exact Wilcoxon test, linear approximations and three plots; a Declarations section (authorship, use of AI tools, data availability, conflict of interest). The chapter's numbers, table rows and plots come from `research/token-sample/generated.tex`.
- `research/token-sample/`: measurement script `measure.py` with a self-test, raw data `results.csv`, derived `summary.json`; `make token-study` repeats the measurement (tokenizers run locally: built-in estimator, `cl100k_base`, `o200k_base`, two local models).
- Five more comparison programs in `examples/compare/` (`fib`, `gcd`, `fizzbuzz`, `power`, `digits`), checked by `make compare`.

- Rust in the comparison pairs (row 2.12): `examples/compare/<name>.rs` for every pair, with the same output and exit code as the MUL program. `make compare` builds each one with `rustc --edition 2021 -O` (skipped when `rustc` is missing), `make tokens` and the example pages add it to the `--compare` list, and the benchmarks page has a Rust column and a fifth chart series in Google Pink (`#d01884` light, `#e52592` dark), checked for colour-vision deficiency together with the other four.

- Documentation site (row 2.11) built with spagu/ssg: `make site` writes a static directory to `target/site/public/`, `make site-serve` serves it on port 8888 and rebuilds on changes. The language reference is `docs/language/` read in place; the examples gallery (source, verified IR, run output, token tables), the landing page's Hello world, four feature snippets from `site/snippets/` and the benchmarks page with its bar chart are generated at build time by running `mul` (`scripts/site-content.sh`, `site-data.sh`, `site-benchmarks.sh`). Also a blog (`site/blog/`, Atom feed, first post "Welcome to MUL") and a papers page publishing the PDFs from `make paper`. Own theme `site/theme/mul/`: IBM Plex Sans and Mono self-hosted, Google palette, light and dark schemes at WCAG 2.2 AA contrast, drawn SVG illustrations, Open Graph and Twitter meta tags on every page, Google Tag Manager wired with the placeholder `GTM-XXXXXXX`. The build fails on dead internal links, missing titles or descriptions, and reference pages missing from the sidebar.
- `docs/language/highlighting.md`: token classes for colouring `mul` source and `mul ir` output; the site's highlighter (`site/theme/mul/js/highlight.js`) implements it, and a documentation test checks that both list every keyword of the lexer.
- ADR-012: the site is a host-agnostic static directory; the domain is not chosen yet (`SITE_DOMAIN`, placeholder `mul.example`).
- `docs/site-style.md`: palette, contrast ratios, syntax and chart colours, type and images of the site.

### Changed

- `mul_adapter::Snapshot` has the field `id` (a string) instead of `payload`, and `Client::ingest(root, sink)` takes the sink that imports the parts (row 4.14); `Snapshot::id()` is gone. `AdapterError::Facts` carries the importer's rejection of a part.
- `mul_ir::ExecError::Codegen` is `{ message, at: Option<IrNode> }` with the constructor `ExecError::codegen` and `ExecError::at` (row 3.7); `mul_backend_cranelift::{build_executable, emit_object}` take `&TrapSites` (`TrapSites::default()` keeps the old `error[CODE]: message` output). `mul build` executables of programs without a source map name the file given, as `mul run` does.

- `research/token-sample/measure.py` (over 600 lines) split into modules with one job each (row 2.21): `stats.py` (statistics and the self-test), `measurement.py` (sample, tokenizers, counting, `results.csv`), `summary.py` (`summary.json`), `latex.py`, `macros.py` and `plots.py` (`generated.tex`). `measure.py` stays the entry point with the same options; `make token-study` writes byte-identical `results.csv`, `summary.json` and `generated.tex`.
- `mul tokens` estimator refitted on both MUL layouts (row 2.19): one new rule, a `(` `.` `:` `#` or `{` that ends a punctuation run right before a word merges into it, as BPE vocabularies make `(n` or `{return` one piece. On the study's compact MUL files the bias against `o200k_base` falls from +12.8% to +0.9% (mean error 2.5%); over all 40 study files the mean error is under 4%. The calibration test covers both layouts with tighter bounds (mean error < 5%, bias < 3%, every language and layout total within 5%, same order as the real vocabularies). The evidence token tables, the blog post and the docs follow the new counts.

- Site on ssg 1.9.13 (row 2.13, spagu/ssg#438, #439, #440 fixed): the Makefile passes `--domain=$(SITE_DOMAIN)` instead of writing a `sed` copy of `site/ssg.yaml`; `pretty_html` is on again and the `<pre>` blocks come out byte for byte as without it (184 blocks compared); `description:` is a top-level key and the templates read `.Description`, so `variables.description` is gone.

- `examples/`, `examples/compare/` and `tests/` are in the compact layout, rewritten by `mul fmt` (the nine golden cases with a deliberate syntax error stay as they were). The committed evidence follows: on the ten comparison programs MUL counts 836 `o200k_base` tokens (pretty: 1186, −29.5%) against 1111 for Rust, 1141 for Go, 1169 for PHP and 1295 for C; the IR and run outputs did not change.
- The compact guide (`mul guide`, `docs/language/guide.md`) and `llms.txt` use the compact layout and explain it; the reference pages keep the pretty layout and `syntax.md` has a Layout section with both. Example pages of the site show each program in both layouts, and the landing page's Hello world in the pretty one.
- Compile-time diagnostics end the first line with the byte offset, `file:line:column: error[CODE]: message [byte N]`, so an error in a one-line file can be located; a source line longer than 100 characters is shown as 40 characters on each side of the error, with `...` where it is cut.
- `mul tokens` reports which layout it counted: a `layout` column in the table and a `"layout"` field per file in the JSON (`compact`, `pretty` or `as written`); existing fields are unchanged. The estimator calibration test estimates the MUL programs in the pretty layout, the one the pilot study counted.
- Design document v2.3 (both editions), chapter 23: the study was rerun with the recalibrated `mul tokens` estimator (only the estimator columns of `research/token-sample/` changed). The section on the estimator's accuracy now gives the numbers before and after (mean error against `o200k_base` 13.3% → 4.6%, same language order as the BPE vocabularies) and its limits: the shortest files, the `gemma3:12b` tokenizer, and the fact that the error is measured in-sample. A new threat to validity covers that, and the conclusion no longer says the estimator needs improvement.

- `mul tokens` estimator recalibrated on the pilot token study (row 2.14). New per-class rules: punctuation and operator runs cost one token per 3 characters (the fixed list of two-character operators is gone), word parts one per 5 characters, a line break is free right after punctuation, indentation is a token of its own (with tabs, one per tab after the first). Against `o200k_base`/`cl100k_base` on the 32 study files the mean error falls from 14.7% to 4.6%, the bias from +14.3% to +3.6%, and the languages now come out in the same order as with the real vocabularies (before, Go looked longer than MUL). A test pins these bounds to `research/token-sample/results.csv`. The table prints a `note:` line under the tokenizer name, and the JSON report has a new `"estimated"` field (`true` for the estimator, `false` for `--tokenizer-cmd`); existing fields are unchanged. The evidence token tables, the benchmarks page and the blog post's numbers follow the new counts.
- Example pages of the site print the Go, PHP, C and Rust versions of each comparison pair on the page instead of linking to the files on GitHub, and the gallery index no longer links into the repository: it stays private until the production release, so those links were dead for readers.
- `docs/language/README.md` has front matter (title, `slug: reference`, description) so the site publishes it at `/reference/`.
- Text published on the site no longer points to internal planning documents: backlog row numbers and the `§` reference are gone from `docs/language/` (`README.md`, `not-in-mul.md`, `effects.md`) and from the comment in `examples/effects.mul`, and the benchmarks and papers pages no longer cite the ADR or the backlog.

### Fixed

- Ingest spool file no longer survives a killed core (row 4.290, ADR-023 amendment): on Unix `mul_adapter` unlinks the `mul-ingest-*.spool` file right after creating it and keeps using the open handle, so a SIGKILL or crash leaves nothing in the temporary directory; other platforms keep the remove-on-drop. Tests: no entry while the spool is in use, and a child process killed with SIGKILL leaves the directory empty. `Snapshot::id` is unchanged.
- Go adapter facts no longer depend on the state of the Go build cache (row 4.90, Go adapter 0.12.1, RFC-013): the Go tool caches the output of cgo by content, and its `//line` directives name the source by the path of the run that filled the cache, which can be the directory behind a symbolic link of the project root (the Go tool tree `cmd` read through `/snap/go/current` gave 62 symbols, 61 references and 34 literals fewer, and 24 more diagnostics, when the cache came from the resolved path). The adapter now takes a path with either spelling of the root, the given one or with links resolved, as a project file. No schema change; the facts of `golang.org/x/tools` were the same in ten runs before and after, so the intermittent difference seen there in row 4.14 is not explained by this (see row 4.190).
- Flaky `mul-adapter` test: `starts_a_program_of_a_relative_frontends_directory` executed a just-written script directly, so a `fork` in a concurrent test thread (which holds the write descriptor until its `exec`) made the exec fail with "Text file busy" (3 failures in 300 runs of the crate). The test now runs a symlink to the system shell, and no test helper marks a script executable any more: adapter scripts are only run as `sh ./a.sh` (row 4.16).
- A relative `--frontends` directory (row 4.2): the program of an adapter's `command` containing `/` was resolved against the adapter's directory a second time and was not found; it is now made absolute before the process starts (row 4.1 only ran adapters from absolute paths). `mul adapter check --project <dir>` passes the adapter an absolute, canonical path, as `mul ingest` does; a relative `<dir>` was refused by the adapter.
- The range of a binary or unary expression that starts or ends with a parenthesised operand now covers the parentheses: `-(1 + 2)` was reported as `-(1 + 2`, and `(a - b) / (c - d)` started after its first `(`.
- `scripts/site-benchmarks.sh` read the token table by column position and failed with a division by zero since `mul tokens` prints the `layout` column; it now reads the fields from the end of each row.

### Removed

- `MUL_Pelna_Specyfikacja_Rust_Cranelift_LLVM.docx`: the design document is now `MUL_Rozprawa_Naukowa.tex` (v2.1), which contains the spec and keeps its chapter numbering.

### Added

- English edition of the design document v2.1, `MUL_Design_Paper_EN.tex` (row 2.10), with the same chapter and section numbering and the same `\label` keys as the Polish original `MUL_Rozprawa_Naukowa.tex`, so the `§` references in `BACKLOG.md` are valid in both. `make paper` builds both PDFs into `target/paper/` with `lualatex` and first names any missing TeX package or font.
- `MUL_Rozprawa_Naukowa.tex` v2.1: implementation status chapter; sections on objects without inheritance, the AI language reference, language adapters as modules, foreign-language OOP in the Code Graph, version tagging and `mul tokens`; fixed tables, code blocks and links left by the docx conversion.
- `BACKLOG.md`: finished rows are kept and marked `**DONE**`; new rows for language adapters as modules (version ranges, scaffold, new-release process), language and dependency version tagging, Python and Pascal adapters, syntax-density and session-handle experiments, docs site and browser demo; wave 13 (standard library and self-hosting).

### Changed

- The expectation header of golden and documentation tests accepts `// expect:` lines before `// expect-error:`: what the program prints before it traps. A trap case without them must now print nothing (`strings_print_trap.mul` states its line). The header parser moved from the test helpers into `mul_cli::expect`, shared by the harness and `mul test`.

- **Breaking:** the value returned by `main` is now the process exit code, as in C, Go or Rust (RFC-010): `mul run` and executables built by `mul build` exit with its low 8 bits and print nothing for it. The new flag `--print-result` (on `run` and `build`) restores the previous behaviour: print the value on the last line and exit with 0.
- `Backend::run` takes the writer for program output; `mul_interp::run` and `build_executable`/`emit_object` take the new arguments (`out`, `MainResult`).
- IR instructions carry `result: Option<(Value, Type)>`, so an instruction may define no value (`print`).
- Golden and documentation examples may have several `// expect:` lines (program output, then the value of `main`); the harness also checks the exit-code mode.

### Added

- `mul tokens <file> [--compare <file>...] [--json] [--tokenizer-cmd <cmd>]` (row 2.9): token count of a source file in any language and, with `--compare`, a table (or JSON) with the absolute and percentage difference of each file to the first one. The default counter is an offline, deterministic estimate (`mul_cli::tokens::Estimate`); an exact counter runs only when given with `--tokenizer-cmd` (text on stdin, count on stdout), and `mul` sends no code anywhere by itself. README explains that the result is a tokenizer-dependent estimate.
- Comparison pairs `examples/compare/{hello,primes,collatz}.{mul,go,php,c}` with the same output and exit code; `make compare` (`scripts/compare.sh`) checks that, `make tokens` prints the estimate of each pair, and `make demo` shows one comparison.
- RFC-003, normative MVP semantics (row 2.8): 20 numbered rules `SEM-01`..`SEM-20` for the `i32` range and literals, checked overflow, division and remainder (zero check before overflow, `MIN % -1` traps), evaluation order, short-circuit, traps (the first one in evaluation order wins, earlier output stays) and the absence of conversions. No behaviour changed; every rule was already implemented.
- Conformance suite `tests/conformance/`: 38 cases, each naming its rule in a `// rule: SEM-NN` line; the golden harness runs them in the interpreter, the JIT and a native executable, and a test requires a case for every rule of RFC-003.
- `mul test [<path>...]`: runs every `.mul` file with an expectation header under the given files and directories (default: the current directory) in the interpreter and the Cranelift JIT, requires the backends to agree and checks `<name>.ir` snapshots; prints `ok`/`FAIL` per file and a summary, exits 1 on a failure or when nothing ran. `make conformance` runs it on `tests/`.

- `string` and `print` (RFC-010, row 2.7): string literals with `\n`, `\t`, `\\`, `\"` escapes (`MUL-S006` for an invalid one), the type `string` for parameters, results and variables, the built-in `io` function `print(text)` called as a statement, call statements whose value is discarded. New codes `MUL-T014` (`print` used as a value) and `MUL-T015` (`==`/`!=` on strings); a function named `print` is `MUL-T001`. IR: `const.string` and `print`; the verifier checks their types and effect (`MUL-V010`, `MUL-V011`).
- `mul-runtime` crate: string values are 32-bit handles into the module's string table, its native layout, and the reference `print`. The interpreter and the JIT (a host function) use it; executables get a generated `print` that calls `write(2)`, so they still need nothing else from libc.
- `examples/hello.mul` in `make demo`; 14 golden cases for strings, call statements and exit codes, with IR snapshots.
- `pure` and `io` effects (RFC-009, row 2.6): an optional effect after the return type, `pure` when none is written; a `pure` function cannot call an `io` one (`MUL-T013`). New keywords `pure` and `io`. The IR function carries its effect (printed only for `io`) and the verifier rejects a `pure` → `io` call (`MUL-V011`). Four golden cases with an IR snapshot, `examples/effects.mul` in `make demo`, language reference and guide.
- Verifier type checking of the IR (RFC-008, row 2.5a): instruction result and operand types, ordering comparisons on `i32` only, call argument and result types, `bool` branch conditions, block argument types and the returned value; new code `MUL-V010`.
- MUL specification v1.0 (proposal) in docx format.
- `BACKLOG.md`: session plan in 13 waves (0–12), from MVP-0 to additional languages.
- `README.md`: project description, status, quick start, structure, and badges.
- Cargo workspace (Rust 1.100, edition 2024) with the crates `mul-cli`, `mul-syntax`, `mul-sema`, `mul-ir`, `mul-verifier`, `mul-interp`.
- `mul` binary with `--version` and `--help`; an unknown command exits with code 2.
- `Makefile` (build, run, fmt, clippy, test, coverage ≥98%, audit, check), `.gitignore`, `rust-toolchain.toml`.
- MVP-0 of the language (RFC-001): `module`, functions without parameters, `return`, the `i32` type, `+ - * / %`, unary minus, parentheses, `//` comments.
- `mul-syntax`: lexer and parser with byte ranges, `file:line:column` diagnostics with a `^` marker, limit of 256 operations per expression (`MUL-S003`).
- `mul-sema`: type resolution, literal range, `-2147483648` as `i32::MIN`, required `return`, unreachable code, duplicate functions.
- `mul-ir`: typed SSA IR with one block per function, left-to-right lowering, deterministic text dump.
- `mul-verifier`: unique functions and values, definition before use.
- `mul-interp`: reference interpreter with checked arithmetic (overflow, division by zero).
- CLI: `mul check`, `mul ir`, `mul run`; exit codes 1 (program error) and 3 (compiler error).
- `spec/rfc-001-mvp0.md`, `docs/adr/ADR-001..011`, the `tests/golden/` format with 20 cases and an IR snapshot.
- `make demo`: the pipeline on the examples in `examples/`.
- `mul-backend-cranelift` (Cranelift 0.138): IR lowering with checked arithmetic without CPU signals, JIT and an object file with `main` in the C ABI.
- `Backend` trait and `RuntimeError` in `mul-ir::exec`; the interpreter and Cranelift implement the same contract.
- CLI: `mul run --backend interp|cranelift` and `mul build [--target native] [-o <output>]` (linker from `$CC`, default `cc`).
- Differential tests: every golden case goes through the interpreter, the JIT, and the executable.
- Function parameters and calls, including recursion (RFC-002, row 2.2): `fn f(a: i32, b: i32)`, `f(x, y)`, calls to functions defined later in the file.
- Diagnostics `MUL-T006`..`T009` (duplicate parameter, unknown name, unknown function, wrong argument count), `MUL-V004`/`V005` (call checks in the verifier), `MUL-R005` (call depth limit of 10 000, the same in every backend) and `MUL-R006` (entry function with parameters).
- IR: parameters as `%0..%n-1`, the `call.i32 @f(...)` instruction; `Module::entry` picks the entry function for every backend.
- 10 new golden cases with an IR snapshot for calls; `examples/calls.mul` in `make demo`.
- Language reference for AI (row 2.1): `spec/grammar.ebnf` (ISO EBNF matching the parser), `docs/language/` (syntax, types, effects, errors with every `MUL-*` code and a typical fix, idioms, what MUL does not have), the compact `docs/language/guide.md` printed by the new `mul guide` command, and `llms.txt`.
- `crates/mul-cli/tests/docs.rs`: every `mul` block in `docs/language/` passes `mul check` and `mul run` (interpreter and Cranelift) with the stated result; every grammar rule names existing golden cases; grammar terminals equal the lexer's keywords and punctuation; every `MUL-*` code in the compiler is documented; links in `llms.txt` and the reference resolve.
- Golden case `module_path.mul` (dotted module name).
- `mul_syntax::fixed_spellings()`: keywords and punctuation of the lexer, for the grammar consistency test.
- Local variables and block scopes (RFC-005, row 2.3): `let x = e` and `var x = e` with an optional `: i32`, assignment `x = e` to a `var`, nested blocks `{ ... }`; a `return` may end a nested block. No shadowing: a visible name cannot be declared again.
- Diagnostics `MUL-S004` (blocks nested deeper than 64 levels), `MUL-T010` (name already defined, no shadowing), `MUL-T011` (assignment to a `let` or a parameter).
- 11 golden cases for variables and blocks with an IR snapshot; `examples/locals.mul` in `make demo`.
- Conditions (RFC-006, row 2.4): the `bool` type with `true`/`false`, comparisons `== != < <= > >=`, short-circuit `&&`/`||`, `!`, and `if` / `else if` / `else` statements; a `return` may appear on any path, and recursion can stop.
- Type checking of operands, initializers, assignments, arguments, returns and conditions: `MUL-T012` (type mismatch); chained comparisons are `MUL-S005`.
- IR: several basic blocks per function with block parameters, terminators `jump` and `branch`, instructions `const.bool`, `not.bool` and comparisons `eq ne lt le gt ge`; variables assigned on several paths are merged through merge-block parameters; `Function::reverse_postorder`.
- Verifier: SSA dominance (`MUL-V002`), unknown jump targets (`MUL-V006`), block argument count (`MUL-V007`), entry block (`MUL-V008`), unreachable blocks (`MUL-V009`).
- 13 golden cases for conditions with two IR snapshots; `examples/conditions.mul` in `make demo`.
- `while` loops (RFC-007, row 2.5): `while cond { ... }` tests a `bool` condition before every iteration; the body is a fresh block scope each time and may `return`. A loop never terminates a path, so a `return` follows it (`MUL-T004`).
- IR: a loop header block takes as parameters the variables its body assigns; the entry jump and the back edge pass their values. No new instructions, terminators or diagnostic codes.
- 8 golden cases for loops with two IR snapshots; `examples/loops.mul` in `make demo`; interpreter/Cranelift differential test for loops.

### Changed

- Interpreter keeps call frames on the heap, so deep MUL recursion never overflows the Rust stack.
- Native calling convention: `fn(out, budget, args...) -> status`; status 8 means `MUL-R005` (supersedes the RFC-001 section *Native code*).
- Planned RFCs renumbered: normative semantics is RFC-003, memory model RFC-004.
- Golden and documentation tests share one helper module (`crates/mul-cli/tests/common`).
- HIR: a function body is a list of slot assignments plus the returned expression; `Expr::Param` became `Expr::Local` (parameters are the first slots). Lowering maps variables to SSA values, so the IR format, verifier and backends are unchanged.
- `MUL-T004`, `MUL-T005` and `MUL-T007` apply to nested blocks and variables; the parser reports `expected statement` instead of ``expected `return` ``.
- IR dump: every block is printed with its label (`b0:`), also in single-block functions; the IR snapshots were updated.
- HIR: a function body is a list of statements (`Assign`, `If`, `Return`); calls carry the callee's return type, comparisons their operand type.
- `MUL-R006` covers any entry signature other than `fn() -> i32` (`RuntimeError::EntryParams` became `EntrySignature`); `MUL-T002` accepts `i32` and `bool`; `MUL-T004` reads "must end with `return` on every path".
- In native code and the interpreter a `bool` is an `i32` holding `0` or `1`, so the calling convention is unchanged.

- Project language switched to English (docs, code comments, diagnostics, CLI help).
- No GitHub Actions: the quality gate is the local `make check`; the CI task was removed from the backlog.
