Skip to content

v1.0.4

Choose a tag to compare

@BHUPESH003 BHUPESH003 released this 04 Aug 10:45
· 5 commits to main since this release

v1.0 — capture, store, retrieve, eval

matha is a local MCP server that gives AI coding agents persistent project memory: intent, business rules, prior corrections ("decisions"), danger zones, contracts, and an admin-declared boundary layer — all scored against what you're about to touch and delivered under a token budget. No enforcement ceremony, no cloud, no API key.

This is the first tagged GitHub release. It covers the full v1.0 roadmap (phases 1–5) plus two field-driven fixes on top of the v1.0.0 milestone.

Retrieval core

  • S × L × C × R scoring: hierarchical structural path match, BM25 lexical relevance, confidence weighting, recency decay — severity gated so a lexical-only hit can never read as CRITICAL.
  • Token-budgeted matha_brief (~1,500 tokens), criticals always ranked into the budget first.
  • Consolidated MCP surface: matha_brief, matha_match (scope now optional — pass intent alone for a keyword-only search, never critical), matha_record, matha_refresh, plus the matha_context prompt.
  • Golden-set eval harness gating CI: recall@5 ≥ 0.8, false-critical ≤ 0.05, brief within budget.

Capture quality & coverage

  • Incremental codemap: a persisted commit cursor means every refresh scans only new commits — bounded, recency-weighted first analysis (~18 months / ~10k commits) on large/existing repos.
  • Auto-refresh on read — the codemap can't silently go stale.
  • possiblyStale flagging (code changed after a record was written) with a rank penalty, surfaced everywhere, never hidden.
  • Near-duplicate write rejection, matha catchup (unaccounted work since the last recorded decision).
  • Agent writes are capped at probable confidence — confirmed is reserved for human surfaces (matha after, matha review).

Lifecycle & curation

  • matha_record lifecycle verbs: violation, supersede, retire — decision content stays append-only; lifecycle is the designed exception.
  • matha review — a human triage queue for unconfirmed and possibly-stale records.
  • Admin-declared boundaries (matha boundary add/list) — CLI-only, pinned, non-decaying, always CRITICAL on a direct path hit.
  • matha check --diff <base> — advisory CI check, --strict to fail the build on criticals.
  • matha export --md (deterministic, PR-diffable) and matha ui (single self-contained HTML report).
  • matha onboard and matha hooks --install for existing codebases and Claude Code session-start wiring.

Fixed after v1.0.0, folded into this release

  • Windows CI: matha init --from silently returned empty fields on CRLF-checked-out files — JS regex . never matches \r. Fixed at the source; added .gitattributes so no future text fixture can hit this class of bug.
  • .gitignore scope: .matha/cortex/ holds both auto-regenerated files (analysis.json, stability.json, co-changes.json — the real source of cross-branch merge conflicts) and constant, human-authored files written once at init (boundaries.json, ownership.json, shape.json). matha init now ignores exactly the three regenerated files, not the whole directory.
  • Dependency trim: swapped @inquirer/prompts for the scoped @inquirer/input (matha only ever uses input()), dropping chardet/external-editor from the tree entirely.

262 tests passing. Full history in docs/analysis/03-target-architecture.md.