TL;DR
- Context: at my job I do not own the product. Tickets come to me. But the habit from this series still works there.
- Change: before I write code, I ask "what must be true?". An agent helps me answer it with evidence.
- Method: triage the ticket → write a behavior contract → draft acceptance criteria if there are none → build → verify each criterion in the running app.
- Result since July: about 30 triage verdicts. About half came back "BLOCKED" or "NEEDS_INFO". Each of those was a question answered before any code.
- Part 7, the last part of the series "Moving toward product engineering".
The 5 steps
- Triage: is the ticket ready?
- Discovery: write the behavior contract.
- Draft acceptance criteria, if the ticket has none.
- Build.
- Verify each approved criterion in the running app.
Each step has its details below.
Step 1: Triage — is the ticket ready?
Two phases, in this order:
- Collect the facts. Read the ticket, its comments, its links, and related branches and pull requests. Save them. No judgment yet.
- Judge readiness. Give one verdict: READY, BLOCKED, or NEEDS_INFO.
To judge, list every requirement in the ticket. Split long sentences into single obligations: one input, one observable result. Then check four places where tickets are usually incomplete:
- Mapping: the result changes by context (plan, language, user type). Is each context mapped to one result, including the default case?
- Owner: a value is "configurable". Who owns it, and how does a new value reach the running app?
- Threshold: the ticket says "high", "enough", or "small". What are the units, and what happens below, at, and above the edge?
- Order: the ticket lists items. Is the order defined, and what happens on a tie?
If one of these is open, the verdict is not READY. The blocker becomes a concrete question for the ticket owner.
Rules:
- Triage decides. It never plans. No code ideas in the triage output.
- Every quote is checked. The evidence quotes must match the ticket text exactly. A script checks this.
- Nothing is posted without my approval. The agent drafts one comment for the ticket. I read it and approve it, every time.
Step 2: Discovery — write the behavior contract
For a READY ticket, the agent maps the code that the change touches. Then it writes a contract in Gherkin (Given / When / Then), with three kinds of scenario:
- REQ: required behavior.
- REG: behavior that must not change (regression).
- OPEN: an edge case that needs a human decision. It has 2–3 options. Exactly one is marked "recommended".
Edge cases come from one simple check: compare what the screen shows with what the code uses. For example, a panel shows all items, but the action works only on the visible ones. Each mismatch becomes an OPEN scenario, not a silent guess.
For a visible bug, the agent reproduces it first. The screenshots become the "before" half of the pull request.
Step 3: Draft acceptance criteria, if the ticket has none
Many tickets have no acceptance criteria. Then the agent drafts candidates:
- It opens the current app and walks the route. It takes screenshots.
- It proposes one observable criterion per outcome.
- It replaces vague words ("relevant", "fast", "gracefully") with examples or bounds.
- If an outcome is unknown, it does not pick one. It writes the question instead. For example: "Should an over-limit paste be cut, or kept with an error?"
Each candidate has one state:
- needs-route-evidence: the current screen is not captured yet.
- needs-product-decision: more than one outcome is possible.
- needs-decomposition: two testable outcomes must be split.
- ready-for-approval: the wording can be approved.
A person approves the wording and records it in the ticket. The draft is a proposal, not a spec.
Important limit: a screenshot of today's app shows today's behavior. It cannot prove future behavior. Each candidate says what the evidence shows, and what it cannot show.
Step 4: Build
Now I write the code, against the contract and the approved criteria. This is the short part.
Step 5: Verify each approved criterion in the running app
- List every approved criterion, word for word, from the ticket.
- Pin the exact commit that is tested.
- For each criterion, a fresh agent conversation gets only that criterion and its evidence. It walks the app, takes screenshots, and gives one verdict.
- The result is one report, with each criterion, its verdict, and its screenshots.
One criterion per fresh conversation keeps the judge honest. It cannot carry an assumption from one criterion to the next.
Why this helps
- Questions move earlier. A "BLOCKED" verdict on day one costs less than a wrong pull request on day five.
- The reviewer gets more than a diff. The contract and the verification report show what the change must do, and that it does it.
- Most blockers are product questions. So the triage comment goes to the person who can decide, with a question that they can answer in one line.
Trade-offs
- Every comment needs my approval. That is slow, but a wrong comment on a ticket costs more.
- It is heavy for small tickets. A copy fix gets "No scenarios" and goes direct. The full contract is for changes with real behavior.
- Screenshots show today. They expose assumptions. They cannot prove the future behavior. Only the verification after the build can.
The series, in one line
Listen to users (Part 3), watch competitors (Part 4), decide with briefs (Part 5), show the product (Part 2), measure (Part 6), and at work, decide what must be true before you build (Part 7). The map is in Part 1.
I am still trying things. Next, I will read Jeff Patton's story mapping properly, and try to start from the user's journey in all of these steps.