Purpose Metatron provides a git-native project context layer for AI coding agents. It captures the real implementation decisions of a codebase—preferred patterns, rejected approaches, edge cases, internal conventions—as structured decisions: one markdown file per convention, versioned alongside the code in git, consultable by any coding agent that can read files, and curated through ordinary Pull Request review. The goal is for agents to write code like a senior engineer already familiar with the codebase, rather than rediscovering conventions every time.
Key capabilities Decisions are stored as structured records rather than prose: pattern, scope, rationale, confidence, source_refs. Nothing becomes canonical without human confirmation: decisions obtained through guided generation, agent submission, or feedback refinement all first wait as candidates for curation, and none self-promote. It offers two modes: file-first (default) and MCP service layer. In file-first mode, the repository itself runs the loop—agents consult context/decisions/ before writing code, write what they learn as decision files on a working branch, and PR review decides promotion or rejection, optionally bootstrapping the knowledge base in one pass via ingest. In MCP mode, first bootstrap with ingest, curate candidates into a canonical set, then serve them to agents via MCP; while working, agents report gaps via submit_feedback, and refine-feedback reshapes those gaps into new candidates.
Decisions exist as an Open Knowledge Format (OKF) bundle in git Decisions live as markdown under context/, forming a valid OKF v0.1 bundle portable to any tool that reads the standard. In file-first mode this is the knowledge base; in MCP mode the mirror command keeps it losslessly synchronized with the SQLite store. Git is the audit trail: state is represented by directories (candidate/ and decisions/), decisions are promoted with git mv, reviewed in PRs, and any line can be blamed. The canonical boundary always remains under human control: placing a file into decisions/ is an act of curation. Human-owned fields (pattern, scope, rationale, confidence) can be written back to storage in a round trip; machine-derived fields (usefulness score, retrieval keywords, timestamps) are rendered read-only and are never overwritten.
Installation and Running Dependencies: Git is already installed on the system (used to analyze repository commit history and parse files); the Anthropic API key is only used for the LLM extraction steps (ingest, triage, enrich-keywords, refine-feedback), while serve, ui, and candidates run entirely locally and require no key. The installation script automatically downloads and manages uv and Python 3.12+ in an isolated user directory, and installation can also be done directly via pip or uv. metatron can be installed as a global tool, or the installation script can be used to automatically handle Python, uv, and path configuration. It can also be run locally from source or contributed to. The version and curation UI check PyPI at most once a day for a newer getmetatron version and print a passive upgrade notice; this check is a read-only request, does not send repository or private data, fails silently when offline, never auto-updates, and can be disabled with METATRON_NO_UPDATE_CHECK=1. Docker is supported: prebuilt multi-architecture images are published on Docker Hub at kerbelp/getmetatron, the entry point is the metatron CLI, and the default command serves the MCP server over stdio. Decisions are stored in a SQLite database, and a volume must be mounted for persistence.
Command Reference repo: lists repositories and selects the default; repo list shows each repository id and the canonical and candidate counts. ingest: bootstraps candidate decisions from the repository and its git history, uses tree-sitter to parse git-tracked source files and reads commit history, aggregates signals from each area, lets the model infer decisions and stores them as candidates; decisions and usage are keyed by the repository identity derived from the origin remote. candidates: review and curation; candidates list shows the decisions in the current repository, approve promotes a candidate to canonical, and reject discards it. triage: advisory judging of the candidate queue; a separate LLM pass scores each candidate (recommended / borderline / not-recommended) and gives reasons, but does not automatically curate. mirror: synchronizes decisions to/from a git-tracked markdown bundle; sync is deterministic and writes a .sync-state.json baseline.
Configuration Secrets come only from environment variables; the CLI automatically loads .env from the working directory (it does not override already exported variables, and .env is already gitignored), and ANTHROPIC_API_KEY can also be exported directly. Non-secret settings live in the optional metatron.toml (environment variables METATRON_DB / METATRON_MODEL / METATRON_OUTPUT_LANGUAGE / METATRON_CONTEXT_DIR can override them). output_language sets the natural language of generated output—pattern, rationale fields, and keywords—defaulting to english and can be set to french, etc.; code identifiers, file paths, and library names are never translated. Each repository has its own SQLite file under the catalog directory.
Applicable Scenarios and Limitations It is suitable for teams that already have a codebase and need multiple programming agents to follow internal engineering conventions and reduce repeated trial and error, and it is especially suited to scenarios that require self-hosting, target private codebases, and care about sensitive data and local deployment. Extraction sends only structural signals to the model—imports, decorators, base classes, commit subjects—and never sends raw source code; agent feedback is stored only in the local SQLite database. The related architecture has been evaluated on SWE-bench Verified through preregistered research, but that result concerns finding the correct code, not a confirmed improvement in defect-fix success rate. The research used a minimal test framework to evaluate the architecture implemented by Metatron, not end-to-end use of Metatron's own tools. Specific information not provided in the materials, such as features, fees, prices, and platforms, is not yet available.