@xcraftmind/mastermind
v2.1.1
Published
Local codegraph and verifiable workflow for AI coding agents — project maps, change and test impact, MCP queries, Vue SFC indexing, and diff-backed implementation audits. Prebuilt binaries for macOS, Linux, and Windows.
Maintainers
Readme
See the consequences behind the diff
A diff tells you what changed. Mastermind shows what the change reaches: downstream callers, architecture boundaries, candidate tests, ownership, security findings, runtime evidence, and repository policy.
One local snapshot powers the CLI, 30 bounded MCP tools, the read-only Lens UI, SARIF output, and a standalone review package.
Your first review in three commands
Requires Node.js 24+. The package selects a prebuilt native binary for macOS, Linux, or Windows. Rust is not required.
npm install -g @xcraftmind/mastermind
cd your-repository
mastermind index .
mastermind impact --since main
mastermind brief --role executor --since main --budget-tokens 2000
mastermind concept "payment retry handler" --top 10
mastermind ui --since mainindex writes a local graph to .mastermind/mmcg.db. Lens binds to loopback,
reads the index without mutating it, and loads no remote frontend resources.
brief gives a planner, executor, or auditor one revision-bound packet. Its
budget includes the final MCP transport envelope; repository source bodies,
declaration signatures, literal/default values, and history excerpts are never
included.
concept retrieves a small deterministic candidate set from normalized symbol
names, repository paths, and declaration shapes. It uses local SQLite FTS5,
with no embeddings, model calls, network access, source bodies, or comments.
One graph, five useful surfaces
| Job | Surface | |---|---| | Review a branch | Changed symbols → downstream reach → boundary crossings → candidate tests | | Audit a codebase | Components, entry points, cycles, centrality, ownership concentration, and hotspots | | Guard architecture | Policy checks with text, JSON, and SARIF output | | Ground an agent | Bounded MCP queries over the same local graph | | Share the result | Standalone offline Lens, SARIF, summary, and revision/evidence manifest |
Mastermind keeps uncertainty visible. Stale indexes, repository drift, work limits, truncation, unavailable analysis, and partial evidence are result states, not footnotes hidden behind a clean badge.
Bring your existing evidence
mastermind ui --since main \
--sarif semgrep.sarif --sarif codeql.sarif \
--coverage lcov.info --coverage cobertura.xml \
--junit junit.xml --otel traces.jsonLens correlates exact returned trace files with SARIF, LCOV/Cobertura, JUnit, OpenTelemetry, CODEOWNERS, Git churn, specs, ADRs, audits, lessons, and imported facts. Provenance and completeness survive the join.
Runtime evidence may corroborate an exact structural edge. It never silently creates graph topology.
Export a portable review
mastermind review export --since main --out mastermind-reviewThe output contains standalone HTML, SARIF, a bounded Markdown summary, a revision/evidence manifest, and a pinned GitHub Actions workflow. The reviewer does not need Mastermind installed.
Connect your coding agent
mastermind install --client all --profile core
mastermind setup cursor --scope user --write
mastermind setup continue --scope user --write
mastermind doctor --workflow --client all
mastermind workflow audit --root . --jsonFresh installs default to core (15 portable skills, including product intake).
frontend installs 20, security installs 18, and full installs all 26. Every profile keeps the
complete Claude subagent set; only portable skill discovery is narrowed.
Updates preserve each client's installed profile unless --profile explicitly
changes it. Legacy schema-v1 manifests migrate as full. Older installers
reject the schema-v2 manifest without replacing managed files, so use the
current package for later updates.
Install and update reject symbolic links at managed workflow paths instead of
following them into another directory.
workflow audit is read-only. It graphs only repository-owned source workflow
files or artifacts listed by an installed ownership manifest, then reports
missing MCP scope/registration, invalid runtime bounds, optional skill closure,
writer conflicts, unreachable tools, and componentized context estimates.
Mastermind supports Claude Code, Codex, Cursor, Continue, and generic MCP stdio
clients. Setup previews changes unless --write is present. The MCP server
exposes 21 non-destructive queries that may refresh the managed derived index,
8 read-only tools, and one additive write to the local gitignored scratchpad.
Supported stack
- Languages: Python, TypeScript/TSX, JavaScript/JSX, Vue SFC, Rust, C#, Go, Java, PHP, and C/C++.
- Platforms: macOS arm64/x64, Linux glibc and musl arm64/x64, Windows x64.
- Evidence: SARIF, LCOV/Cobertura, JUnit, OTLP JSON, CODEOWNERS, Git, SCIP, and signed declarative facts.
The default Tree-sitter graph is syntactic and toolchain-free. Optional SCIP adds compiler-resolved definitions and references. Dynamic dispatch, reflection, generated code, dependency injection, re-exports, overloads, and cross-language calls may be incomplete. Candidate tests and unreferenced symbols are review inputs, not authorization to skip tests or delete code.
Measured performance
On the published synthetic Rust benchmark, an Apple M3 Pro indexed 1,000 files and 20,000 functions in a 310 ms median cold run. An unchanged scan took 41 ms. A 10,000-file, 200,000-function corpus took 3.20 s cold and 353 ms unchanged.
These are measurements on one machine, not portable guarantees. See the methodology, ranges, and reproduction command.
Documentation
| I want to… | Go here | |---|---| | Understand the product | Product README | | Run my first review | Getting started | | Look up a command, limit, or MCP tool | CLI and MCP reference | | Connect an AI client | Client integrations | | Use the delivery workflow | Review workflow | | Import external evidence safely | Fact-ingestion SDK |
The same binary is available from crates.io as
mmcg. npm installs it as both mastermind
and mmcg.
License
MIT — source and license.
