All posts

AI-augmented engineering

The ticket is the real prompt

The short version

  • I used to prompt agents directly. Now I never ask for code in a chat. I ask for options and a plan, settle it over a few sessions, and turn it into tickets.
  • The agent gets a ticket number, not a prompt. It cannot code before I approve the ticket, or close before I approve its review.
  • The most useful line in the whole setup: "No regressions detected" only counts if you say what you checked.

When I started, I did what everyone does. I typed what I wanted into a chat and the agent wrote code. Sometimes it was right. Often it was right about a slightly different problem than the one I had.

So I stopped asking for code. I started asking the agent to evaluate: look at this part of the system, tell me what the options are, propose a plan. Then we go back and forth. Usually it takes a few sessions before the plan is something I would sign. Only then does it become tickets.

From that point on, I do not prompt. I pass a ticket number. The idea is worked out in conversation. The work is defined in the ticket.

Seven phases, three stops

Every ticket goes through the same seven phases: analyse, ticket, implement, test, document, review, close. Each phase has a short template, so every model starts from the same instructions. The agent does not choose how to work. It is told which phase it is in.

Three phases stop and wait for me: after the ticket is written, after the review package is compiled, and at the close. Everything between those stops, the agent does alone.

Not every phase needs the same model. I route by phase. Analysis that needs deep reasoning goes to the strongest model I have. Routine implementation, tests and documentation go to faster, cheaper ones. Architecture-level decisions get the most expensive model, used sparingly. It sounds like optimisation. In practice it is mostly about not paying for deep thought on a docstring.

What a ticket has to contain

The ticket template is strict on purpose. Here is the shape, filled in with a neutral example:

## Problem Statement
The nightly import retries a failed source forever. One bad source
blocks every source queued after it, and nothing alerts.

## Acceptance Criteria
- [ ] AC1: A source that fails 3 times in a run is skipped, the rest continue
- [ ] AC2: Each skip is logged at ERROR with source, attempt count, last error
- [ ] AC3: The run summary lists skipped sources by name

## Impacted Files
| File                        | Change | Reason                    |
|-----------------------------|--------|---------------------------|
| ingest/runner.py            | Modify | add per-source retry cap  |
| ingest/summary.py           | Modify | report skipped sources    |
| tests/unit/test_runner.py   | Add    | retry cap, skip, continue |

## Test Requirements
- Unit: retry counter, skip decision
- Integration: three sources, middle one fails, other two complete
- Edge cases: source fails on the 3rd try exactly; all sources fail

## Effort Estimate: S

Writing that down is where I catch most misunderstandings, because the interactive sessions already did the thinking and the ticket has to say it precisely. If the impacted files table lists something I did not expect, the plan was misread. If the edge cases are vague, the tests will be too. Reading a ticket and saying no takes minutes. Reading a pull request and saying no takes much longer.

The project has close to a thousand of these tickets now. That is useful in a way I did not expect: when something breaks, the ticket that introduced it says what it was supposed to do, and the commit says what was tested.

The review package

Before the agent can ask to close, it compiles a review package. What changed, file by file. Tests passed out of how many. Each acceptance criterion with the evidence that it holds. Documentation and logging, done or not.

And one section I would put in every review, human or agent. The template says "No regressions detected" is only acceptable if you explain what you checked. For the example above, a good one reads like this:

### Regression Check
Ran the full unit suite (all pass) and the ingest integration
tests against a real Postgres (all pass). Re-ran last night's
import against a copy of the data: same row counts per source as
before the change. Not checked: behaviour when the database itself
is down mid-run. That path is unchanged but has no test. Raised as
a follow-up ticket.
"No regressions detected" is only acceptable if you explain what you checked.

That one rule did more than any instruction about being careful. A model will happily say nothing broke. It is much less comfortable listing what it did not check, because the list makes the gaps visible. People are the same.

What it looks like over time

0200400600December 2025: 109 commits109DecJanuary 2026: 11 commits11JanFebruary 2026: 40 commitsFebMarch 2026: 73 commitsMarApril 2026: 29 commitsAprMay 2026: 215 commitsMayJune 2026: 141 commitsJunJuly 2026: 40 commitsJulAugust 2026: 461 commitsAugSeptember 2026: 578 commits578SepOctober 2026 (to the 14th): 172 commitsOct*
Commits per month in the repository, from git history. *October runs to the 14th.
Show as a table
MonthCommits
December 2025109
January 202611
February 202640
March 202673
April 202629
May 2026215
June 2026141
July 202640
August 2026461
September 2026578
October 2026 (to the 14th)172

I will not pretend the chart proves the workflow. Some months I had more evenings than others. But the shape is real. The big months came after the ticket and review templates settled, when I could hand over ticket numbers and spend my time on the plan and the review instead of the code.

Where it still goes wrong

The process does not stop an agent being confidently wrong. It makes it easier to catch.

The working agreement in the repository keeps a table of claims that turned out to be false. A job reported as storing nothing, when it stored hundreds of rows: the agent had matched it to the wrong table because the names were similar. A data feed reported as losing coverage, when it never had that coverage. Ten missing days that were really two, because eight predated the source itself.

Every one has the same root. The claim came from a name, a ticket or a reconstructed query, not from the code that actually runs. So the rule now is: before filing or fixing, run the real function, and check whether the ticket is already stale.

If you are starting

Do not ask for code in a chat. Ask for options and a plan, and argue with it until you would sign it. Then write tickets, and give the agent ticket numbers. Make it stop at the ticket and at the review. And make the review say what was checked, not just that it passed.

All posts