Shift the review left: from the pull request to the tasks

Intentional Engineering · #3 of 3

Shift left: steer AI before the code exists

Code review can't keep up with AI-generated code. Sequencing work into named, reviewable increments moves control upstream, and lets a whole team trust the process.

Where is our steering wheel?

My line from the beginning of this series is that a software factory aims at building software faster while keeping control over the output, particularly its quality.

I want to dive a little into the control interface. What should our steering wheel look like?

In the world before AI, you had two main control inputs. The first, pre-code, was writing tickets and prioritizing them. The second, post-code, was reviewing pull requests.

We tended to focus on the latter more than the former, with tickets generally underspecified, a bias towards figuring things out in the code, and decisions made directly in the PR. Code is now produced by AI much faster than humans can review it. We use AI to review code, but that works as a quality gate, not a human control interface. Here, I will argue that the other old-school lever, ticket writing, can now function as your main steering medium. The focus shifts left from after to before code-writing.

Furthermore, I believe that this shift is required in order to establish control over AI software production not just as an individual, but as a team.

Software engineering work is still incremental

If you work in construction, you will operate in increments to erect a building, but once that is done you don’t get to do incremental structural changes, such as replacing a concrete frame with steel.

In software, not only is that possible, but it is the recommended approach. There are a number of software patterns focusing on having your code broken up in smaller units that you can modify and test somewhat independently. When you go about a big change, it naturally breaks up into a series of changes on those smaller units.

Software engineering is naturally incremental, and AI coding agents have not changed that fact. If anything, because an AI agent operates in a loop between changes and evaluation, it naturally works in increments. Larger, better models have brought the ability to plan and carry out many more increments than before, but they haven’t changed the nature of the work.

Get the to-do list out of the harness’s black box

The issue with agent harnesses is that they tend to obfuscate that incremental nature. You might get them to express it in text at the beginning by using plan mode, but once implementation starts, you only get a view into their to-do list in the harness. That to-do list is neither writeable nor shareable.

Why does this matter? Let’s take an example. You designed a new feature, passed it on to a frontier model, and you get a 13K-line pull request. You decide to (heroically) review it manually, and conclude that there are a number of points that were underspecified in the design, that you want changed in the implementation. How do you communicate that to the agent with precision?

Chances are, the correction you want corresponds to just one particular increment in the agent’s progression. However, that delta was introduced early and the drift only increased with subsequent increments. If you had access to that particular increment and a way to designate it with a name or an identifier, you could tell the agent to just change that part. If the agent had written one commit per increment, you could review commit by commit, and then at the branching point, you could give new instructions. The agent would rewind to that commit and redo implementation from there.

A single unseen delta sets the course for the whole implementation

But then even if you had that set up, telling the agent to make that change after the fact wastes many tokens and feels very frustrating, like driving a car with a delay between your steering and the wheels turning. It would be much more efficient to review each increment before it’s implemented, and check it after implementation before moving on to the next one.

So we want two things: (1) explicit, named work increments, and (2) the ability to review those increments. Which brings us back to tickets.

Sequencing

My approach is simple. I use tickets, or more precisely Linear tasks, as those named, reviewable increments. I use them during two phases:

  1. I have a sequencing skill to break down a design into those increments.
  2. A sequence of increments is my main interface to drive implementation with a natural human-in-the-loop moment.

The sequencing flow

The first pass of the sequencing skill gives me tasks without an implementation plan. Only a description of the intent and a summary of the implementation. This allows me to think about order and granularity: the high-level path to completion.

Once that’s done, I let the model flesh out each task with a full implementation plan, equivalent to the output of the Claude Code plan mode, for example. This is when the model will look in more detail at the existing implementation or the documentation of whatever new library you want to use. It is typically a point when it might surface a gap between assumptions made at the design phase and the reality on the ground.

This is also the point where you can project your coding conventions. Pointing an implementation agent to your agents.md or whatever equivalent you have has always seemed a little pointless to me because only a few of the rules in that kind of document will be relevant to what the agent is doing at any given point. Here instead, you can front-load those conventions by directly having all your implementation plans describe the changes in accordance with those rules.

Finally, the sequencing skill can do sequencing review to identify inconsistencies and things slipping through the cracks. Another point where you might realize your design was underspecified in some vital area.

Driving implementation

The implementation flow

Breaking up the work into explicit increments has nice implementation properties too: you get a natural point to check the agent’s work after each increment, which lets your agents work on long-horizon tasks. That way, you don’t need to babysit your agent because you know that even if it runs amok, the worst you’ll have to redo is a single increment.

My approach to doing this is with a two-tier agent setup. The control agent has the design and full task sequence and context, plus any other relevant documents. It is your main interaction point. For each task, it will create an implementation agent that will work on that task, handle PR reviews, and drive to a green CI.

Earlier on, we mentioned the potential drift between intended and actual direction. To handle this, I have my implementation agent write up a drift report where it details all the things it didn’t do as planned and why. That drift report is written back to the task. What the agent writes doesn’t need to be 100% accurate. The point is that it provides a feedback loop, and yet another point where gaps in your design or your assumptions will surface.

Course-correcting at every implementation tick

The control agent will get that drift report and help you work through it. In particular, if you do need to change your tasks, it can easily rewrite them since it has the design and the full task sequence in context. Similarly, the control agent can handle stale implementation plans in your tasks.

Shifting left to trust AI as a team

The question of code reviews is often presented as the new bottleneck when code is generated with AI. I tend to see that as a symptom of low trust in the code-generation process.

As I argued in the first post of this series, AI usage today is still largely individual. The way your teammates produce code is mostly a black box to you, yet you and they share ownership of it. The code review then becomes a flashpoint, the one moment when you can actually exercise scrutiny over what is going into production.

I believe that disciplined sequencing brings much more trust to the code generation process. Tasks are units of collective intent that you can now share and review as a team. Through task review, you can establish team trust over your code generation process instead of just checking its output.

I’ll be honest, I am still figuring out how you should review tasks as a team. I do believe that it means reading through them all and mentally walking through the sequence of steps, much like you see rock climbers go through the motions of their route before a competition. What I’m not certain of is whether that actually works for a team beyond two or three people.

Conclusion

Over-reliance on code review for collective code ownership meant we were already steering with a high delay between input and effect. That was acceptable when we were moving at the pace of manual code writing, but doesn’t work anymore when code is generated by a racing car.

Introducing AI-driven sequencing into your workflow creates shared units of intent that function as an intermediate layer between the high-level intent of your design and the agents that will implement it. Reviewing them allows you to steer before the wheel turns. This approach shifts the onus onto the process of code generation rather than its result. Here again, the factory is a useful metaphor. You don’t do deep quality-checks on every car that comes out of your assembly line; instead, you monitor the variability of your process, and you just spot-check the output.

In my very first post, I argued that intentional engineering means keeping a clear decision lineage: the ability to trace every line of code back to the intention behind it. A sequencing skill gives you that lineage by construction, from design to task to code. In the next instalment, I’ll look at how to compress that lineage so your agents get fast access to your decision history.