# Changelog
## 0.1.5 (2026-07-27)
- Prebuilt binaries are now published for Linux (`x86_64-unknown-linux-gnu`), macOS (`aarch64-apple-darwin` and `x86_64-apple-darwin`), and Windows (`x86_64-pc-windows-msvc`). Previously only Windows had a prebuilt binary, so every macOS and Linux developer needed a Rust toolchain to install a tool for projects that are not written in Rust — the single largest barrier to adopting memlay across a team. Release creation is now a separate job from the per-platform build matrix so parallel jobs cannot race on `gh release create`. Unix targets ship as `.tar.gz` because zip does not preserve the executable bit.
- Fix: `memlay init` did not build an index, and `--no-index` did nothing. The build sat behind an `if index {}` block whose body was an empty comment, so a freshly initialized repository reported `files 0, symbols 0` until some later command happened to trigger the lazy build — indistinguishable, while onboarding, from a broken install. `init` now indexes eagerly and reports what it indexed, `--no-index` genuinely defers the build to the first query, and the index honors an existing `.memlay/config.toml` rather than the defaults `init` loads before that file exists.
- `memlay init --codex` now installs lifecycle hooks to `.codex/hooks.json`, wiring `SessionStart`, `UserPromptSubmit`, `PostToolUse`, `PermissionRequest`, and `Stop` to `memlay hook ingest --agent codex`. Codex users previously got MCP tools but zero audit events, so nothing audit-derived worked for them: no session spool, no session provenance on records, no `expand audit:<session>`. Codex sends `session_id` and `hook_event_name` on stdin exactly as Claude Code does, so both agents now land in the same audit stream. The merge is idempotent and only ever appends matcher groups under `hooks` — Codex rejects unknown root keys, and existing user hooks are preserved. Handlers carry `timeout: 5`; Codex parses `async` but does not yet honor it, and its 600s default would park a stuck hook in front of the agent. Codex treats newly discovered project hooks as untrusted and prompts to review them on the next session — they do not run until trusted (see `docs/codex.md`).
- Fix: concurrent `memlay hook ingest` processes could tear audit-spool NDJSON lines. The writer emitted each event's `Display` output as many small appends, and parallel hook processes (e.g. Claude Code firing two `PostToolUse` hooks for one assistant message) interleaved those fragments mid-line, leaving unparseable events that failed `doctor`. Events are now serialized up front and appended as a single write under an exclusive advisory file lock (`std::fs::File::lock`; MSRV 1.77 → 1.89). Regression-tested with 24 parallel large-payload ingest processes.
- `audit finalize` quarantines unparseable spool lines to `<session>.ndjson.corrupt` beside the spool instead of silently dropping them; `doctor` reports quarantined lines informationally (`N events (M quarantined)`) while still failing on unparseable lines in a live spool.
## 0.1.4 (2026-07-27)
- `memlay docs --reference [--check]`: generated reference blocks inside committed docs pages, rendered from the binary itself — CLI reference from the live clap tree, MCP tool contracts from the actual schemas, config defaults, stable error codes, and the module inventory from the repository map with `architecture`-record purposes. `--check` fails when any block is stale (wired into CI), eliminating docs drift for mechanical content.
## 0.1.3 (2026-07-27)
- `memlay map [--budget] [--depth] [--scope]`: whole-repository module map — files/symbol counts, dominant language, purposes (memory-recorded `::` or derived `:~`), rolled-up inter-module import edges, `module:` drill-down refs. A typical repo maps in a few hundred tokens.
- `expand module:<dir>` (and `module:.` for the root map) over CLI and MCP: bounded module detail — files, structural symbols with signatures, scoped memory records, imports, sub-modules.
## 0.1.2 (2026-07-27)
- `memlay docs --split`: one markdown file per top-level key namespace plus `index.md` (per-area decisions, rationale, aliases, related change history). Requires `--out`.
## 0.1.1 (2026-07-27)
- MCP `record` enforces duplicate-key governance (`key_resolution` + justification); returns similar-key candidates
- `memlay stats` local usage/latency/effectiveness counters; `stats --reset`
- MCP server watches the repository (notify); warm queries skip reconciliation
- `sync_state` derives `behind`/`ahead`/`diverged` from record trees; strict mode allows `ahead`
- Epoch (`.mle`) format contract validated in `check`; `schema epoch`; `archive` reserved as P1
- `stale --suggest-fixes` rename-repair drafts; `keys show`/`keys conflicts`; `backfill apply`/`reject`; bulk `import --format json`; `docs` view; shell `completions`; `expand audit:<session>`
- Property tests; measured ≥25% MCF token reduction; auto-publish release workflow
## 0.1.0 (2026-07-27)
Initial release.
- MRF v1 immutable records with canonical serialization and JSON interop
- Supersession / current-head / semantic-conflict model; key aliases with before/after impact simulation
- Three-layer team memory (team/branch/working) with revision-stamped responses and `memlay sync`
- Worktree-local SQLite index (WAL, FTS5); atomic rebuild; content-addressed incremental file indexing
- Tree-sitter structural indexing: TypeScript, TSX, JavaScript, JSX, Python, Rust, Go, Lua; shared parse cache across worktrees
- Exact-first token-budgeted retrieval with transparent ranking, MCF rendering, data-delimited injection containment, expand, stale detection with rename evidence checks
- MCP STDIO server exposing exactly `context`, `expand`, `record`
- Key governance: similarity gate, `create-distinct` overrides with stored justification, `memlay keys` catalog/similar/alias
- `memlay diff` reviewer summary (markdown for PR comments) + GitHub Actions template
- CI change-record gate (`check --ci --require-change-record`) with `record --draft-from-diff` assist
- Deterministic backfill from Git history and ADR documents
- Hook ingestion with secret redaction, crash-tolerant spooling, zstd bundles, per-writer `refs/memlay/audit/*` refs
- Idempotent Codex and Claude Code integrations; `memlay doctor`
## 0.1.2 (2026-07-27)
- `memlay docs --split`: one markdown file per top-level key namespace plus `index.md` (per-area decisions, rationale, aliases, related change history). Requires `--out`.