Prism
Semantic change intelligence for coding agents. Prism turns indexed repository structure into task-shaped answers: potential change-impact sites, source context, and a review of an agent-authored diff.
Prism embeds the Grove code graph. It runs locally as one binary, exposes CLI and MCP interfaces, and requires no hosted service or API token. For organizations, the optional link server, which you host, extends every answer across all your repositories.
Link server: change impact across your whole organization
A change to a shared library reaches services you don't have checked out. The link server closes that gap:
- Each consumer's CI uploads a link bundle on merge: where the repository uses other repositories' symbols (compiler-resolved, one line each) and its own signatures. No function bodies, no machine paths.
- The server keeps them, on one host or as replicas on shared storage.
- Developers and coding agents ask it from the library:
change-impact, verify, test-plan and lookup list every readable consumer site next to the local callers. Each site is pinned to the consumer's commit, and the answer says what it could not cover.

|
|
| Access control |
Per-token rights: CI tokens upload one repository, read tokens see only their teams' repositories, admin tokens manage the store. Expiry and instant revocation |
| Storage |
AWS S3 · Azure Blob Storage · Google Cloud Storage · S3-compatible stores in your data centre (MinIO, Ceph, …) · a local disk |
| Scale |
Any number of replicas on shared storage; p99 under 25 ms at 1,000 repositories and about a million references |
| Security |
TLS and mTLS, an audit log of every request, rate limits, no secrets or source bodies stored |
| Operations |
Container image and Helm chart, Prometheus metrics, retention, integrity check, backup and restore |
| Languages |
Go, Java, TypeScript / JavaScript, Python |
prism link-server token create --tokens tokens.json --name ci-payments --upload github.com/acme/payments-api
prism link-server --s3 s3://acme-prism-links/prod --tokens tokens.json --tls-cert tls.pem --tls-key tls-key.pem
prism workspace push --server https://links.acme.internal --ref main # in each consumer's CI
echo 'workspace_server: https://links.acme.internal' >> prism.yaml # in the library; then change-impact as usual
Guide: docs/LINK_SERVER.md, which covers deployment on AWS, Azure, Google Cloud and in private data centres, credentials, CI setup, the HTTP API, sizing and what was tested.
Why Prism
Text search is excellent for locating a name. It cannot reliably distinguish references from unrelated text, follow an override family, or enumerate types that implicitly satisfy an external interface. Prism combines full-text search with a typed project graph, then exposes the result through operations that match the question an agent is trying to answer.
| Need |
Operation |
| Locate a symbol or exact text |
prism search |
| Gather edit-ready source around known anchors |
prism query |
| Read one file or symbol |
prism read / prism lookup |
| Change a method signature |
prism change-impact |
| Plan a rename |
prism rename-plan |
| Evolve an interface |
prism missing-implementations |
| Check an agent-authored diff |
prism verify |
| Enforce component boundaries |
prism arch |
Structural results report indexed coverage and known stale, partial, or heuristic evidence. A closed indexed result does not prove that every runtime caller or required edit is known.
Benchmark
Reference benchmark: docs/benchmarks/prism-v1.9.1-2026-11-29.md
(2026-11-29), measured on v1.9.1; 2.0 gives the same answers apart from two fixes (see Upgrading to 2.0). Claude Code with Sonnet 5.5, native tools vs Prism through the CLI
interface (prism init --interface cli). Same tasks, checkouts and tests in both
arms. Task cost is everything after the first request of a session, repriced at
Sonnet 5.5's 5-minute-cache prices.
Change work. 32 seeded tasks in Python, Java, TypeScript and Go: method
renames where the name is shared with unrelated methods, property renames, and
signature changes.
|
Native |
Prism |
Prism / native |
| Solved |
31 / 32 |
32 / 32 |
|
| Task cost per task |
$0.0924 |
$0.0768 |
0.83× |
| Tool calls per task |
9.5 |
6.8 |
0.72× |
| Startup per session |
$0.0649 |
$0.0667 |
1.03× |
Bug fixes. 41 GitHub issues filed after the model's training cutoff, in Go,
Java, TypeScript and Python projects.
|
Native |
Prism |
Prism / native |
| Solved |
26 / 41 |
25 / 41 |
|
| Task cost per task |
$0.0772 |
$0.0747 |
0.97× |
| Tool calls per task |
8.3 |
7.7 |
0.92× |
| Startup per session |
$0.0651 |
$0.0668 |
1.03× |
Bug fixes are at parity: the one solve difference was ruled a task-level miss
after reading both transcripts.
Over a session. Startup is paid once per session, task cost once per task.
Projected saving of Prism vs native for a session of N tasks of one kind:
| Tasks in session |
Change work |
Bug fixes |
| 1 |
9% |
1% |
| 10 |
16% |
3% |
| 40 |
16% |
3% |
The projection does not model context growth within a session or count
Prism's one-time indexing. Limits: one model, one agent, one run per cell.
The fact sheet has per-language slices, the comparison with October's v0.87.39
run, engine accuracy per language, and links to raw records in
provasign/research.
Install
# Homebrew (macOS or Linux)
brew install provasign/tap/prism
# macOS or Linux installer, pinned to a release
curl -fsSL https://raw.githubusercontent.com/provasign/prism/v2.0.1/install.sh | VERSION=v2.0.1 bash
# Windows PowerShell
$env:VERSION="v2.0.1"; irm https://raw.githubusercontent.com/provasign/prism/v2.0.1/install.ps1 | iex
The installer verifies the SHA-256 checksum, and the release's signature or
build attestation when cosign or a logged-in gh is installed
(PRISM_REQUIRE_PROVENANCE=1 makes that required). It does not edit your
shell rc file unless you pass --modify-path (… | bash -s -- --modify-path),
and --dry-run lists what it would write.
The installer writes to ~/bin by default. Set INSTALL_DIR to choose another directory.
Use either Homebrew or the standalone installer as the authoritative installation. If both
are present with different versions, prism init and the MCP server report their paths.
The standalone installer verifies the installed version and removes Prism registrations left
by the old global configuration model. Running Prism MCP servers keep working through an
upgrade: each switches to the new binary on its next request (--stop-servers stops them
instead). After changing installation methods, run prism cleanup-global and prism init in
each project.
The current release is v2.0.1. It embeds Grove v0.66.0 (Astkit v0.16.11).
Upgrading from 1.x: see Upgrading to 2.0.
Build from source with make build; run the full test suite with make test.
Quick start
From the root of a repository:
prism init .
Prism indexes what git would track: it skips anything your .gitignore excludes. To keep
other paths out of the index (recorded data, fixtures, generated files), list them in a
.groveignore in the same syntax; nested .groveignore files apply to their directory.
Prism's search skips them too, so exclude only what agents never need to find.
prism init --dry-run . prints a diff of every file it would write and writes nothing.
prism uninstall . later removes exactly what init added (recorded in
.grove/install-manifest.json) and leaves every other byte of those files alone.
This detects installed and previously configured harnesses, recommends those as the
default, and asks which to configure. It then asks how agents should reach Prism:
CLI (the default, and the configuration the reference benchmark measured) registers
no MCP server and steers agents to run the prism command in their shell; MCP
registers the compact project-local server. Both
choices write prism.yaml and current instruction files. CLI init removes Prism's
own MCP registration from the selected harnesses' project configs if present.
The interactive prompt gives a source-file-size hint: CLI suits occasional calls,
while a resident MCP server is faster for repeated discovery, especially in a
large repository. It does not change the default or claim a model-cost saving.
A project that already has a prism.yaml without a recorded interface was set up when
MCP was the default; init keeps it on MCP unless you pass --interface cli.
Harness ids: claude, codex, cursor, windsurf, vscode, gemini, opencode, copilot (GitHub Copilot CLI), kiro.
For automation, pass a comma-separated list such as
prism init --harness claude,codex .; a first-time non-interactive init never assumes
all harnesses. Later runs can use prism init --yes . to reuse the selection recorded
in prism.yaml. Set the interface without a prompt with
prism init --harness claude,codex --interface cli . (or --interface mcp).
--yes and --refresh also reuse the recorded interface; a first-time
non-interactive init defaults to CLI. CLI mode requires prism on the agent's PATH.
Windsurf receives AGENTS.md steering only because its documented MCP
configuration is user-global, which Prism does not modify.
Codex loads the generated .codex/config.toml after the repository is trusted;
accept Codex's project-trust prompt, then restart or reload the session.
Use search to find an anchor, then ask the graph for the relationship you need:
prism search QueryData --scope text --exhaustive --files-only
prism change-impact 'QueryDataHandler.QueryData' --format text
prism query --terms ValidateRequest \
--include graph \
--format text
prism verify --base main --format text
With the MCP interface, prism init exposes one compact prism gateway with seven
operations:
search locates symbols and source text.
query returns budgeted source around named anchors, callers, and tests.
read reads a known file or range and deduplicates unchanged repeat reads.
lookup returns known symbol bodies, marking any omitted content.
change_impact returns indexed declarations, implementation families, and caller candidates.
verify reviews a diff against indexed potential impact sites.
missing_implementations lists the types that do not yet implement an interface member,
including one you are about to add.
More graph commands on the CLI:
prism references Config.Model --kind write # resolved sites, tagged decl/call/read/write/type-use
prism callers Handler.toolVerify --depth 3 # transitive callers as a tree
prism path cmdCI Handler.toolVerify # shortest resolved call path
prism lookup internal/config/config.go:16 # a path:line names the symbol declared there
prism test-plan --format targets # runner targets: Go -run patterns, pytest ids, Class#method
prism change-impact --diff --base main # what the working-tree diff reaches
prism export --format scip -o index.scip # the graph as a SCIP index (Sourcegraph, Glean, ...)
Every command prints text by default; pass --format json for machine-readable output.
Exit codes are the same everywhere: 0 answered, 1 finding, 2 usage error, 3 degraded,
4 not found, 5 ambiguous, 70 internal failure (prism help exit-codes).
CLI help is authoritative for the complete command and flag list:
prism --help
prism doctor .
prism doctor also checks the machine: a missing or too-old toolchain for the repository's
build files, more than one prism on PATH, and a harness MCP config whose prism cannot run.
Each warning ends with its fix.
Read-guard hook (Claude Code)
prism init --read-guard . # install
prism init --no-read-guard . # uninstall
Installs a hook that denies a native Read once prism has already delivered
that exact line range earlier in the same session, pointing the agent back
at what it already has instead of paying for it twice. Off by default.
Claude Code only; hooks are a Claude Code mechanism. The benchmark above did
not use it.
A delivered range stops counting as soon as its file may have changed: an
Edit/Write/MultiEdit/NotebookEdit of the file drops its ranges, a
Bash command that can rewrite files (git checkout/stash/reset/apply/...,
patch, sed -i, mv/cp, formatters, codegen, redirects into files)
drops all of them, and a file whose mtime or size differs from delivery time
is never blocked. Ranges are scoped to the Claude Code session that received
them.
--read-guard writes .claude/hooks/prism_read_tracker.py and
.claude/hooks/prism_read_guard.py, and adds two PostToolUse entries (on
mcp__prism__prism, and on Edit|Write|MultiEdit|NotebookEdit|Bash) and
one PreToolUse entry (on Read) to .claude/settings.json. Re-running it
upgrades an older install in place. It only ever adds entries — an existing
hook you already have on Read or elsewhere is never modified or replaced,
prism's just runs alongside it. Session state lives in
.claude/prism-read-guard/, which ignores itself in git. --no-read-guard
removes exactly what --read-guard added: the two script files, only the
settings.json entries whose command is prism's own (any other hook on the
same matcher is left in place), and the state (including the
.prism-read-tracker.json file older releases kept at the project root).
Both are standalone actions — running either does not require selecting
harnesses or otherwise running the rest of init.
Workflow for coding agents
The steps below name MCP operations (prism(op=...)); the CLI commands have
the same names (prism lookup, prism search, prism change-impact, ...).
- Use
lookup for a known symbol or search for an unknown location; batch related names in one call.
- Use
change_impact when callers, overrides, contracts, or other affected sites need checking; a clearly local body-only edit need not call it. Preserve the returned set when used.
- Use
query for related source context around explicit anchors, or read for a known file or range; inspect omission markers.
- Use exhaustive text search for wide concept removals and other completeness questions.
- Run relevant tests.
verify is optional in every language. Consider it for Python, unchecked JavaScript, or PHP contract changes; for TypeScript or checked JavaScript, only when affected files lack a complete typecheck. Skip it after a complete build/typecheck of affected Go, Java, Rust, C/C++, or C# targets.
prism search --scope text is a real repository text search. The graph adds value after location: callers, implementations, type relationships, tests, architectural edges, and completeness checks.
Architecture and CI
Add boundary rules to prism.yaml:
version: 2
harnesses: "claude,codex"
arch_deny: internal/cli -> internal/mcp # one rule per line; repeat the key
arch_deny: internal/config -> internal/*
prism config . lists every key with its value and where it came from; prism config --check .
exits 1 on an unknown key or an invalid value.
Then run:
prism map .
prism arch .
prism verify . --base main
prism arch reports the concrete file:line evidence for each forbidden component edge. prism verify checks the current diff for missed impact sites, new component dependencies, and introduced architecture violations.
prism api-diff --base v1.2.0 lists the exported-API changes since that revision (removed, signature changed, no longer exported, renamed, an interface that gained a member, added), gives a verdict (breaking, additions-only or compatible) with semver advice, and names the in-repository callers of each breaking change. A changed package identity is breaking too: the Go module path, npm package name, Maven coordinates, or crate or Python project name, since every importer must change. It exits 1 when the change is breaking. Tests, Go internal/ packages and Go main packages are not counted as API, and files git does not track are left out unless you pass --include-untracked. It compares code and manifests only: CLI flags, configuration keys and wire protocols are not API to it.
As a pull-request gate, prism ci . --base origin/main --format github fails on a missed site or a new architecture violation and annotates the lines; the composite action in .github/actions/prism-ci runs it in GitHub Actions and can post one sticky comment (ci_fail_on: and ci_comment: in prism.yaml).
Working across repositories
Link the other repositories a change can reach, and the same commands answer for them:
cd library
prism workspace add ../app # a local checkout; or a git URL[@ref], fetched read-only
prism change-impact Client.Send # call sites in app first, then this repository
prism lookup app.Handler --repo app # answer from one linked repository
prism workspace discover # related checkouts found in go.mod, package.json, pom.xml, ...
Each repository keeps its own index; links are followed when a question is asked. prism map and the prism graph explorer show the edges crossing into linked and uploaded repositories, and the explorer's change impact lists their sites. lookup, read, search, change-impact, verify and test-plan cover linked repositories, and every answer says which repositories it covered and how (compiler-resolved, or name-matched only). A link written in a cloned prism.yaml takes effect only after you confirm it on your machine, and an untrusted repository links nothing. Consumers that are not checked out are covered by the link server, which their CI uploads to. Guides: docs/MULTI_REPO.md for linking, and docs/LINK_SERVER.md for running a link server.
Graph explorer
prism graph # opens http://127.0.0.1:8787/ in the browser
prism graph --no-open --port 9000 path/to/repo
prism graph serves an interactive view of the indexed graph on localhost until you press Ctrl+C. It opens on the repository's packages and the dependencies between them; double-click to drill down from a directory to its files, from a file to its symbols, and from a symbol to its callers, callees and members. Click a link to see the call and type-use sites behind it. Search (⌘K or /) finds symbols, files and directories across the whole index. Change impact (the i key, or Shift+Enter in search) lays a symbol's prism change-impact answer onto the graph: the declaration at the centre, the overrides and implementations that change with it, every edit site with its call line, and optionally the callers one or two hops further out (reached, not edit sites). It shows whether the answer is complete for the repository and can copy the site list; changes with more than 60 edit-site declarations are drawn one node per file. Test files are left out unless you turn on Tests (or pass --tests), and Reload re-indexes changed files. The page is self-contained: it loads nothing from the network, and the server answers loopback requests only.
Language support
Prism indexes Go, TypeScript/TSX, JavaScript/JSX, Python, Java, Rust, C/C++, C#, PHP, Swift, Kotlin, Objective-C, COBOL, and JCL (via the embedded Grove engine). Semantic depth varies by language and by the native toolchain available in the repository; COBOL and JCL are structural/heuristic only, with no published accuracy oracle yet. prism doctor reports the full per-language indexing/resolution tier and limitations breakdown (Grove's own capability manifest) under its languages key, alongside index/engine status.
Interfaces
- CLI: local interactive use and CI
- MCP over stdio: Claude Code, Cursor, VS Code, Codex, Gemini, OpenCode, GitHub Copilot CLI, Kiro, and other MCP clients
- Browser:
prism graph — interactive graph explorer on localhost
- HTTP:
prism serve --port 8888; see docs/HTTP_API.md
- Go library: see docs/GO_KIT.md
Grove is embedded in the Prism binary. Prism users do not need to install or run a separate graph service.
Security and privacy
Prism analyzes the local working tree and stores its index locally. The default MCP transport is stdio. The optional HTTP server and prism graph bind to loopback and require a per-run token.
Indexing Java (Maven/Gradle), TypeScript and Rust runs the repository's own build tools. Prism prints a one-time notice when it does; for a repository you do not trust, run prism untrust . (or set PRISM_UNTRUSTED=1): its build tools never run, analysis for those languages is name-based, and it links no other repository. prism trust . records the opposite and silences the notice. Text search and read withhold the contents of .env, key and credential files unless you pass --include-sensitive; sensitive_paths: in prism.yaml adds patterns. See SECURITY.md and THREAT_MODEL.md for reporting and trust-boundary details.
Upgrading to 2.0
2.0 gives the same answers as 1.9.1 with two fixes: change-impact no longer rewrites prism_* names inside the source lines it quotes, and a renamed or dropped Go parameter name is no longer a signature change for verify, test-plan and api-diff. It removes compatibility paths and changes how a few commands read their arguments. Everything that changed for scripts and setups since 1.0:
In 2.0
- The Go module is
github.com/provasign/prism/v2. Change pkg/kit imports to github.com/provasign/prism/v2/pkg/kit, and go install github.com/provasign/prism/v2/cmd/prism@latest. Homebrew and the installers are unaffected.
search, lookup and read take the directory only from --dir. Every positional argument is a term, a name or a file: prism search alpha internal searches for two terms even though internal is a directory. An argument that can only be a directory exits 2 and names --dir: for lookup, anything written as a path (., ../app, an absolute path); for search, such a path when the directory exists (so /health is still a term); for read, any directory. Other commands keep their [dir] argument.
- The MCP server has one tool,
prism (op + args). prism mcp --legacy and the six separate prism_* MCP tools are gone; --legacy now exits 2 as an unknown flag. --compact is accepted and ignored. The prism_* names stay routes of the HTTP API and names for pkg/kit.
prism_savings is removed from the HTTP API and pkg/kit's Invoke. Kit.Savings() still reads the ledger.
PRISM_SEARCH_SHAPE is removed. Search answers are grep-shaped, the default since October 2026; --context N and --include-bodies bring the windows and bodies back.
mcp_surface in prism.yaml is retired. Old files load; prism init removes the key.
prism init no longer migrates 0.x setups: Prism sections in .cursorrules and .windsurfrules, a Prism entry in .windsurf/mcp.json, and read-guard files from v0.84 and v0.87.4. To upgrade from 0.x, run prism init with 1.9.1 first, or remove them by hand.
In 1.3
- Text is the default output of every command. A script that parsed JSON from a command whose default was JSON must pass
--format json.
- Exit codes are one table (
prism help exit-codes): 4 for a name that does not exist, 5 for an ambiguous name, 70 for a failure.
- The first index prints a trust notice when the repository's build tools will run;
prism trust . silences it.
- A query in a directory that is no project (no
.git, prism.yaml, .grove or build manifest) exits 2; prism index <dir> still builds there.
- Committed MCP configs name plain
prism. prism doctor flags one that names an absolute path; prism init --refresh rewrites it.
prism.yaml typos are reported with the nearest known key.
- Secret files are withheld from search and read;
--include-sensitive shows them.
In 1.2
- New setups default to the CLI interface. Existing setups keep MCP unless you pass
--interface cli.
Contributing
See CONTRIBUTING.md, GOVERNANCE.md, and SUPPORT.md. Accuracy changes should include an oracle-backed regression case; public performance claims should link to reproducible evidence in provasign/research.
License
Apache License 2.0. See LICENSE.