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.
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…
“Find bugs” picks the QA lens. prism lens list shows them all.
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”
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?”
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”
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 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.
In plain words, as usual.
“find bugs in the invoice code”From your words, on your machine. No model.
a name you use › your trigger › QA › Architect › DevThe lens joins your request with its steps.
Lens: QA · “Find bugs. Do not redesign.”The lens checks run on the change. Findings show in the review and the receipt.
dependents_not_in_diff · high riskAdd 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”
- 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
Debug · Debugging
Finds the cause of a failure before any fix. Say: “debug this: checkout throws when the cart is empty”
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
Tests · Testing
Writes the missing test first, next to the existing ones. Say: “write a test for creditNote in the billing code”
- 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
Security · Security review
Looks for secrets, new dependencies and trust boundaries in the change. Say: “do a security pass on the checkout change”
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
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”.
| Option | Sets |
|---|---|
--name | How the lens is shown |
--role | What the lens does, in one line |
--focus | How it judges |
--checklist | A checklist item (repeatable) |
--checks | Data-backed checks, from the nine below |
--evidence | What Prism reads for it |
--trigger | A phrase that picks this lens (repeatable) |
Try it in your repo.
Install Prism, then connect every agent on this machine. Open the agent again.