Tell your agent how to work.

A lens tells your agent how to work on a task: make the smallest fix, hunt the bug or review the design. Prism picks one from your words and runs its checks on the change.

Your agent
Youfind bugs in the invoice code
PrismLens: QA
You are the QA lens. Find bugs. Do not redesign the feature.
1. Read the code the task names and the tests that reach it.
2. State a concrete failure: the input, what the code does, what goes wrong…
Agentcredit-note.ts has no test. Input [] gives -0; here is the test that should catch it.
~/northwind
$ prism lens listLenses (4)architect Architect checks: new_cross_package_edge, new_value_cycle, off_limits_touchedqa QA checks: untested_changed_symbol, dependents_not_in_diff, test_reaches_but_not_rundev Dev checks: reuse_missed, new_dependency_added, untested_new_branchtriage Triage (custom) triggers: “triage”

“Find bugs” picks the QA lens. prism lens list shows them all.

Built in

Three built-in lenses.

Dev · Building

Daily changes: the smallest complete fix, using what the repo already has.

Picked for “Add VAT to totals”, “fix the date format”

reuse_missednew_dependency_addeduntested_new_branch

QA · Testing and debugging

A bug hunt: a concrete failure, the path, and the test that should catch it.

Picked for “find bugs in billing”, “why does checkout fail?”

untested_changed_symboldependents_not_in_difftest_reaches_but_not_run

Architect · Design and review

Structure review for a new feature, a plan or a pull request, ending with a pass that cuts what isn’t needed.

Picked for “plan a new feature”, “review my PR”

new_cross_package_edgenew_value_cycleoff_limits_touched

House style is part of Dev: it reuses what the repo already has and follows the code around it. Add your own rules as a lens or a habit.

How lenses work

How a lens is picked.

You don’t pick a lens by hand unless you want to. Text in code blocks, quotes and “don’t …” clauses is ignored.

1You ask

In plain words, as usual.

“find bugs in the invoice code”
2Prism picks a lens

From your words, on your machine. No model.

a name you use › your trigger › QA › Architect › Dev
3Your agent works that way

The lens joins your request with its steps.

Lens: QA · “Find bugs. Do not redesign.”
4The change is checked

The lens checks run on the change. Findings show in the review and the receipt.

dependents_not_in_diff · high risk
Your own

Add a lens for how you work.

One command adds a lens, and it works in every repository.

Triage · Triaging

Sorts a new issue: where it lives, how far it reaches, which tests cover it. Say: “triage: the invoice total is wrong in renderInvoice”

Your agent
Youtriage: the invoice total is wrong in renderInvoice
PrismPrism · files for this task:
- src/billing/invoice.ts: matches invoice, render, named in task
Lens: Triage
Sorts a new issue: where it lives, how far it reaches, which tests cover it.
Judges the change with dependents_not_in_diff.
- Check dependents_not_in_diff
AgentIt lives in src/billing/invoice.ts. checkout.ts depends on it and test/invoice.test.ts covers it. Likely cause: computeTotals in totals.ts.
~/northwind
$ prism lens add triage --name Triage --role "Sorts a new issue: where it lives, how far it reaches, which tests cover it." --trigger "triage" --checks dependents_not_in_diffAdded lens triage (Triage) to ~/.prism/lenses/lenses.json.$ prism lens list…triage Triage (custom) triggers: “triage” checks: dependents_not_in_diff

Debug · Debugging

Finds the cause of a failure before any fix. Say: “debug this: checkout throws when the cart is empty”

Your agent
Youdebug this: checkout throws when the cart is empty
PrismLens: Debug
Finds the cause of a failure before any fix.
Judges the change with untested_changed_symbol, test_reaches_but_not_run.
- Check untested_changed_symbol

- Check test_reaches_but_not_run
AgentCause first: cartItems() returns [] and checkout reads [0].price. No test covers the empty cart. I’ll add one, then fix.
~/northwind
$ prism lens add debug --name Debug --role "Finds the cause of a failure before any fix." --trigger "debug this" --checks untested_changed_symbol,test_reaches_but_not_runAdded lens debug (Debug) to ~/.prism/lenses/lenses.json.$ prism lens list…debug Debug (custom) triggers: “debug this” checks: untested_changed_symbol, test_reaches_but_not_run

Tests · Testing

Writes the missing test first, next to the existing ones. Say: “write a test for creditNote in the billing code”

Your agent
Youwrite a test for creditNote in the billing code
PrismPrism · files for this task:
- src/billing/credit-note.ts: matches credit, note, bill, named in task
Lens: Tests
Writes the missing test first, next to the existing ones.
Judges the change with untested_new_branch, untested_changed_symbol.
- Check untested_new_branch

- Check untested_changed_symbol
AgentAdded test/credit-note.test.ts next to totals.test.ts, covering an empty list and a refund.
~/northwind
$ prism lens add tests --name Tests --role "Writes the missing test first, next to the existing ones." --trigger "write a test" --checks untested_new_branch,untested_changed_symbolAdded lens tests (Tests) to ~/.prism/lenses/lenses.json.$ prism lens list…tests Tests (custom) triggers: “write a test” checks: untested_new_branch, untested_changed_symbol

Security · Security review

Looks for secrets, new dependencies and trust boundaries in the change. Say: “do a security pass on the checkout change”

Your agent
Youdo a security pass on the checkout change
PrismLens: Security
Looks for secrets, new dependencies and trust boundaries in the change.
Judges the change with off_limits_touched, new_dependency_added.
- Check off_limits_touched

- Check new_dependency_added
AgentNo secrets in the diff, no new dependency, and no generated or vendored path touched.
~/northwind
$ prism lens add security --name Security --role "Looks for secrets, new dependencies and trust boundaries in the change." --trigger "security pass" --checks off_limits_touched,new_dependency_addedAdded lens security (Security) to ~/.prism/lenses/lenses.json.$ prism lens list…security Security (custom) triggers: “security pass” checks: off_limits_touched, new_dependency_added

What a lens can hold

Lenses live in ~/.prism/lenses/lenses.json. A trigger can’t use the built-in words review, bug, bugs, pr, qa, architect or dev.

Naming a lens works everywhere

Where a prompt hook is available, a trigger phrase can pick the lens. Otherwise, name it: “use the Triage lens”.

OptionSets
--nameHow the lens is shown
--roleWhat the lens does, in one line
--focusHow it judges
--checklistA checklist item (repeatable)
--checksData-backed checks, from the nine below
--evidenceWhat Prism reads for it
--triggerA phrase that picks this lens (repeatable)
The nine checks: new_cross_package_edgenew_value_cycleoff_limits_touchedreuse_missednew_dependency_addeduntested_new_branchuntested_changed_symboldependents_not_in_difftest_reaches_but_not_run

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