Software Factory Part 3: A Verifier That Never Reads the Code

Table of contents

Part 3 of 4 in the software factory series. Part 2 covers how the builder works and how its claims get checked. To run it on your own repo, start at the Software Factory product page.

This is the station the software factory exists for. Agents can now write a feature, its tests and its PR description faster than anyone can click through the result. The scarce thing is knowing whether what came out does what the ticket asked.

My 2025 workflow got this wrong. One agent read the ticket, wrote the test, ran it, and told me it passed. When the same agent builds something and reports on it, a misreading of the ticket shows up the same way in both. The verifier is the fix: it doesn’t see the builder’s work, only its result.


After the Merge

The factory polls GitHub. When the PR is merged, the ticket moves to Done, with a comment. If it’s closed without merging, the ticket is blocked, because something went wrong that a human should look at.

A ticket in Done gets verified against the merged main branch: the orchestrator clones it, installs dependencies, starts the app, and runs ticket-verifier from an empty directory.


What the Verifier Gets, and What It Doesn’t

The verifier never reads the diff, the PR, the builder’s summary or the source tree. It gets three things: the ticket text, the navigation doc and the app’s URL. Its only tool is the browser. Here’s its definition, minus the output format at the end (a verdict table plus one JSON block the factory parses):

---
name: ticket-verifier
description: Verifies a Jira ticket's acceptance criteria against a running app in a real browser. Never reads source code and never modifies anything.
tools: mcp__playwright__*
---

You verify one Jira ticket against a running app. You are not the
developer and you do not fix anything. You get the ticket, the app's URL
and its navigation notes in your prompt. You have no access to the source
code, the diff, the PR or the builder's summary, and that is deliberate.

1. Extract the acceptance criteria from the ticket. Number them from 1.
2. For each criterion, drive the browser to check it. Check the outcome,
   not the UI's own message: anything that claims data was saved or
   changed needs evidence from after a reload or a fresh navigation.
3. Give each criterion exactly one verdict:
   - PASS: you observed the behaviour. Say what you saw.
   - FAIL: you observed something else. Give the step and what the page
     showed, and take a screenshot named `verify-<n>.png`.
   - UNTESTABLE: the criterion is too vague to check, or you could not
     reach the state it needs. Say which.
   A PASS with thin evidence is UNTESTABLE.
4. If the app shows a login page, stop and report it. Do not log in.

Four Deliberate Choices

  • No Read, Edit, Write, Bash, Grep or Glob. A verifier that can change code can make a failing check pass. One that can read the source tree inherits the builder’s view of it. My first standalone version kept Read so the agent could open the navigation doc, which meant “only read that file” was a request in the prompt, not a rule anything enforced. In the factory, the orchestrator puts the navigation doc in the prompt and the verifier runs from an empty directory, so the restriction is real.
  • Outcomes, not messages. The classic failure: you type a new name, click Save, and a toast says “Profile updated”. A builder’s own test could easily check for that toast and stop. After a reload, the old name is back. The verifier only accepts evidence from after a reload or a fresh page load.
  • UNTESTABLE is a real verdict. In 2025 the agent had only pass or fail, so a vague criterion got whatever interpretation the agent picked. Now it can say “I can’t check this.” That’s often the most useful line in the report, because it points at a bad ticket, not bad code.
  • No logins. The 2025 template had Perform login if required with <username>/<password> in the prompt. Anything in a prompt can end up in logs and transcripts, so the verifier stops at a login page. For an app that needs one, sign in once as a dedicated QA user and give Playwright MCP the saved state with --storage-state; Playwright’s authentication guide shows how. My site has no login, so the factory doesn’t do this yet.

The verdict table goes on the Jira ticket as a comment, with any screenshots attached.

If every criterion passes, the factory can also write a Playwright regression test and open a PR for it. That’s off by default. The order matters: generate a regression test from a build that hasn’t passed verification, and you get a test that locks the bug in.


KAN-4: The Verifier Disagreed With the Builder

The first real ticket, KAN-4, added voice input to this site’s ⌘K command palette, with 20 acceptance criteria. After I merged it, the verifier spent 1 minute in the browser, for $0.16, and posted 11 PASS, 1 FAIL, 8 UNTESTABLE.

The FAIL is the result the factory is built for. Criterion 5 says the first Esc stops listening and a second Esc closes the palette. The builder had a passing end-to-end test for exactly that. The verifier, driving the merged site, saw the first Esc close the palette.

The verifier couldn’t use a real microphone either. So it injected its own mock of the browser’s speech API through Playwright, without reading any code, and drove the palette with it. Its mock and the builder’s mock disagree about what happens on Esc. Either the feature has a real bug that the builder’s test covers up, or the verifier’s mock behaves differently from a real browser.

The factory can’t tell which, and it doesn’t pretend to. It put the disagreement on the ticket, with the steps, for a human to settle. A single agent checking its own work could never have produced that disagreement.


Reading the UNTESTABLE Rows

There were two kinds. Some were honest limits: a real permission prompt (AC 11), cross-browser behaviour (AC 20) and Lighthouse scores (AC 19) can’t be checked by one headless Chromium.

Others were thin effort. On several criteria the evidence says “I did not test…”: the silence timeout, the other error codes, reduced motion and network traffic. The verifier used 6 of its 60 turns. It followed its own rule (“a PASS with thin evidence is UNTESTABLE”) rather than guessing, which is the right failure mode. But it means an UNTESTABLE row needs reading, not just counting.

Vague criteria produce UNTESTABLE verdicts too, so over time those rows become a review of how your team writes tickets. Part 1 has an example of a ticket written to be checked.


Limits

  • Mocks can disagree. When a feature depends on hardware the browser doesn’t have, the builder and the verifier each write their own mock, and the two can disagree, as they did on KAN-4. A human settles it.
  • Some things can’t be checked headless. Microphones and cameras, real permission prompts, other browsers and real payment flows come back UNTESTABLE, and a person has to check them.
  • It checks behaviour, not looks. Confirming the name saved won’t reveal that the Save button now overlaps the footer. For that I diff screenshots between releases with regress.
  • Verification runs after merge, against the main branch, not against a preview before merge. A FAIL lands on a ticket that’s already Done, and a human decides whether to reopen it.

Key Takeaways

  • Separate the builder from the verifier. A verifier that sees only the ticket and the running app catches what the builder’s tests were written to miss.
  • Enforce the restriction with tools, not prompts. No file tools and an empty working directory, so “don’t read the code” isn’t a request.
  • Check outcomes, not messages. A success toast proves nothing; a reload does.
  • Give uncertainty its own verdict. UNTESTABLE points at a vague ticket or a real limit instead of hiding it behind a guess.
  • Surface disagreements, don’t resolve them. When two agents disagree, the useful output is the disagreement, put in front of a human.

Next: Part 4: Keeping Agents Away From the Keys, on the orchestrator and the token leak I found in my own design.

esc