How it works

Prepare, lenses, review.

Prism runs on your machine next to your agent. Prepare picks the files. A lens sets how the agent works. Review ends with a Receipt.

Step 1

Map

Prism reads your code and builds a local map: files, functions, imports and tests. A background process keeps it up to date.

Your agent
YouWhat is in this repo?
Prismgraph mode: map
## src/billing/totals.ts · callers: credit-note.ts, invoice.ts
## src/lib/money.ts · callers: invoice.ts, totals.ts
AgentBilling lives in src/billing. Money helpers are in src/lib/money.ts.
~/northwind
$ prism startInstalling for your agent…Prism 2.0.0 installed for your agent.Indexed 12 files in 0.1 s.# Prism repo map## src/billing/totals.ts computeTotals (src/billing/totals.ts:4) callers: src/billing/credit-note.ts, src/billing/invoice.ts callees: src/lib/money.tsTry: prism prepare "<task>", or ask your agent; it calls prepare_change first.
Step 2

Prepare

When you ask for a change, Prepare adds the files to open, the tests and code to reuse to your request.

Your agent
YouAdd VAT to computeTotals in the billing totals
PrismPrism · files for this task:
- src/billing/totals.ts: matches compute, total
3: function computeTotals(lines: Line[])
Tests: test/invoice.test.ts, test/totals.test.ts
Run: npx vitest run test/invoice.test.ts test/totals.test.ts
AgentStarting in totals.ts and running those two tests after.
~/northwind
$ prism prepare "add VAT to invoice totals"Prepare: add VAT to invoice totalsFiles 4Tests 2Reuse 1Truncated noPATH WHYsrc/billing/invoice.ts seed filesrc/billing/totals.ts import distance 1src/checkout/summary.ts import distance 2src/lib/money.ts import distance 2Reuse invoiceTotal src/billing/invoice.ts
Step 3

Guard

While the agent edits, Prism stops edits to generated files and flags widely used ones. Where the agent supports hooks, they run in the session. Otherwise a rule asks the agent to call Prism before and after a change.

Your agent
YouAdd an email field to the API schema
Prism✗ Denied: src/api/generated/schema.ts is generated. Do not edit generated or vendored files.
AgentThat file is generated. I’ll change its source and regenerate it.
~/northwind
$ prism strength liteStrength set to lite in /Users/sam/.prism/config.json.$ prism strengthStrength: lite (~/.prism/config.json)
Step 4

Review

Review reads the change. Guardrails, the QA lens, and the Architect lens supply the checks. Findings are Critical, High, Low, or Nit. The Receipt says SHIP, NOT PROVEN, or NO-SHIP.

Your agent
YouTidy up the reduce in computeTotals
AgentDone. The reduce in computeTotals is shorter now.
PrismPrism · NO-SHIP (1 check failed)
Prism receipt: changed 1 file, 5 dependents, 2 tests reach it — NO-SHIP
Proven          2 scoped test files · typecheck ✓
Failed          test ✗ Failed Tests 1
AgentThe test caught it: I wrote price + qty instead of price * qty. Fixed, and the next receipt says SHIP.
~/northwind
$ prism receipts show 1Prism · NO-SHIP (1 check failed)Prism receipt: changed 1 file, 5 dependents, 2 tests reach it — NO-SHIPProven          2 scoped test files · typecheck ✓Failed          test ✗ Failed Tests 1

One map for every surface

Your agent (MCP), the hooks and the prism CLI all read the same local map.

Nine tools for your agent

Your agent picks them from your words: “where is this used”, “review my changes”, “run my deploy habit”.

Analysis has no model

Answers come from the local map and your own test scripts.

Clean uninstall

Install records every file it writes. prism uninstall removes exactly that.

Try it in your repo.

Install Prism, then connect every agent on this machine. Open the agent again.

$npm install -g @prismapp/cli && prism install all