Clayton Lengel-Zigich

I measured my AI software factory like a Toyota plant. It was 3% efficient. Here's how I fixed it.

Nov 14th, 2026 · first posted on X

I’ve been running a little software factory for my apps. AI coding agents pick up cards from Plonkboard boards, ship the work, and prove it shipped. I’m the only human in it. Right now that’s 35 boards, 33 of them with an agent team working on them. The work items are a mix of server admin tasks, periodic SEO improvements, feature work, bug fixes, and research tasks.

The other morning it kept breaking in ways I didn’t notice… until I tripped over them. Every piece had unit tests. But nothing tested the pieces together, and the failures were silent.

So around midday I stopped all agent work and handed one Opus session on my cloud server a card with nine failures on it. Over the next few days that turned into the most useful thing I’ve done with the factory so far, which was measuring it.

This is what I did and what I learned.

Why I treated it like a factory

Once I realized the software factory is more like an actual factory than the average software organization, it seemed obvious to try some lean manufacturing (Toyota Production System) thinking on it.

Cards come in. Agents work them. Reviewers check them. A merge gate lets them out. There are queues and handoffs between every step, just like stations on a line.

And because of how the system works, everything the agents do already gets logged. Every webhook, every launch, every comment, every block. So it was pretty easy to instrument the whole flow and look at the stats.

I also asked the session to frame its coaching around the Toyota Production System, The Goal and The Phoenix Project. Later I made it the factory’s “lean manufacturing coach”, with one job, which is to make the system better without me poking at individual cards.

Step 1: measure the flow

Lean has a metric called flow efficiency. It’s the percent of a card’s life where something is actually working on it, versus waiting.

I would have guessed 40 to 50%. I’d piloted the approach on one project and it seemed pretty dialed in.

The coach pulled 48 hours of data (5.7k dispatcher events, 8,500 board events, and the full history of every card that finished). Here’s what came back:

Share of lead time for the 146 cards that reached Done, Nov 10 to Nov 12.

I assumed the waste would be something stupid, like reviews going in circles or agents saying they needed my approval when they really didn’t. That pilot project just didn’t extrapolate to the whole fleet.

Review was only 4.3% of lead time. Mostly cards were just waiting.

27% of in-progress cards were blocked, and blocked cards still counted against each team’s WIP limit. So a team could have every slot full of stuck work while ready cards piled up behind it. “Team WIP full” was the scheduler’s top reason for skipping a card, at 18.4k skips.

It also took 1,238 agent launches to finish those 146 cards. That’s 8.5 per card (median 4, but the p90 was 17). About half of launches changed anything on the card, and 18% did nothing visible at all.

The worst offender was my own supervisor agent, Ziggy. It accounted for 35% of all launches, and 35% of those produced nothing visible. Everything that didn’t fit somewhere else got sent to it, including access problems it had no way to fix.

Step 2: find the constraint (it was me)

The Goal has this idea that the whole system only moves as fast as its slowest step. So you find that step and protect it.

I figured my agents were mostly waiting on each other or on model quota, but the numbers kept pointing at me.

In those same 48 hours my agents asked for help 118 times, on 67 cards. I answered on the card twice.

That sounds worse than it was. I’m already talking to my supervisor agent (Kun Chen’s firstmate running Opus) so much that it’s easy to just ask it what’s waiting on me and work through things that way. But the asks on the cards never got closed. And the scheduler correctly skips cards that are waiting on the human, so those cards just froze, waiting on an answer I’d already given somewhere else.

When the coach checked the In Progress column the next morning, 26 of 40 cards (65%) were waiting on me. On the Plonkboard board, where the factory improves itself, it was 13 of 14. So the work that would fix the problem was stuck behind the problem 😅

Over a full week it looked like this:

487 @-mentions of me in one week, and what they were.

About half of the asks were real. The rest were stale or just mentioned me in passing.

There was also a hidden queue. 21 of 59 In Progress cards (36%) had been flagged as “waiting on the human” because of a bare @human comment, so nothing re-woke them and they kept their WIP slot. But that flag never put them in my inbox. The machines followed one signal and I saw a different one, and the oldest of those cards had been quiet for 67 hours.

What I told the coach about the cards waiting on me was basically that they were so verbose because the agents were talking to each other, and it got less and less clear what I, as the human, actually needed to do. And after I did it, how was I supposed to tell the card?

Later I put it more simply. “If you were waiting for me, you need to tell me what to do.”

So now an ask is structured. It has a kind (merge, run, decide or provide), one line saying what to do, a short why, and the exact link or command. It shows up as a box at the top of the card and as the line in my inbox. Decisions get answer buttons. Merge asks close themselves when the PR merges. Agents can’t flag a card as waiting on me any other way.

A decide ask with answer buttons (local demo data, not a real card).

After it went live my inbox went from 30 cards to 8.

I’m still getting used to answering that way. But having the buttons in Plonkboard has been nice when I’m not at my computer and need to quickly unstick something. A few days in, the answer buttons are much better and easier to use as the human in the loop.

Step 3: cut the waste

Lean has a list of wastes. The one that bit me hardest was overproduction, making more of something than the next step can use.

On the night of November 12 I turned on “reviewed merges only” branch protection, which seemed like the responsible thing to do.

The problem was every agent on my cloud server pushes as the same GitHub identity, and GitHub won’t let you approve your own PR.

The overnight merge jam, about 6pm to 4am Arizona time.

So from about 6pm to 4am, 20 cards on 9 boards were stuck waiting to merge. The dispatcher kept launching reviewers anyway, 87 review sessions (76 Sonnet, 11 Opus). None of those approvals counted. Then another agent re-reviewed the same changes under its own identity so they could merge, so the same work got done twice.

It was more just wasted time than money. The reviews are pretty small, so I’m sure I burned through some usage limits, but not enough that I really felt it.

A dry run with one PR would have caught it. Now there’s a review hold. Before a reviewer starts, the dispatcher checks whether GitHub is refusing merges across the fleet (3 or more cards on 2 or more boards in the last 12 hours). If it is, review waits in the queue and starts on its own once the blocks clear. I also changed the rulesets to require green CI and a CODEOWNERS review instead of an approval from a second identity.

The other waste was churn. On the first evening of the cleanup about 25 PRs merged, each one waiting on CI and conflicting with the others in the same few files. I said at the time “this is why I didn’t want a million PRs.” The rule now is related changes go in one PR.

Then I asked the coach a bigger question. Are we causing too much churn by having every card turn into a CI run, a PR and a deploy? Should we be batching work?

Its answer was to keep one card, one PR and continuous deploys, and make each handoff cheaper instead. Toyota does the same thing with changeovers. It looked at the last 24 hours of the Plonkboard repo for evidence. 27 PRs merged, the median was 79 lines, and only 8 of 149 CI runs failed. So the PRs weren’t really the expensive part, and those reviews nobody could use were.

What changed

A lot of this shipped as one batch on November 12.

Blocked cards and cards waiting on me give their WIP slot back. A board over its limit keeps its cards but stops pulling new work and flags the jam. The Plonkboard board turned out to have no WIP limit at all (21 cards In Progress, 18 of their agents idle) because only boards created with a team got the default. Now every team board has one.

Within an hour of that batch, In Progress went from 40 cards to 61, as boards that had been full of waiting work pulled ready cards. It’s an early signal, and the daily report is the real measure.

A daily factory health report now posts to one card, with the previous day next to it. As of November 13 it also tracks merged PRs, review launches per merged PR and CI minutes per merged PR, so I can see whether the review hold and batching actually help.

A Plonkboard board with a card waiting on me (local demo data).

Two things I didn’t expect to learn along the way:

Independent review mattered more than I thought. The coach wrote ten PRs during the cleanup and sent each one to a separate reviewer. Eight came back with changes or a real defect found after merge. That included a race condition, lost webhooks, and a way for a mention of @Clayton to get around the cap on paging me. The coach’s own tests passed every time.

And my test fakes were nicer than the real thing. The fake GitHub in the end-to-end tests answered requests with no token and accepted any API version. Production had no token at all, so every real call came back 404, and every card trying to reach Done stalled. Now the fakes have to be at least as strict as the service they stand in for.

What I still don’t know

I’m still measuring. Mission Control now shows about 5.5 hours of work in a 25 hour cycle for the last day, but it measures from when a card is ready rather than created, so it isn’t an apples to apples comparison with the 3%. I’d be happy with anything north of 3%.

Blocked cards still mostly get routed and then sit. On November 12, 20 cards were blocked with a median age of 15.6 hours, and almost every one had a single routing comment with nothing after it. And 158 of 232 real block reasons (68%) didn’t match any known class, so now blocking agents have to say what kind of block it is.

Agent capacity is the next constraint after me. The 8 slots on the cloud server are often all full. And when every routine model paused at the same time, the factory sat at zero capacity for about 8.5 hours (that one was partly my own “stop all work” switch, which nobody undid).

I’m also piloting an inbox mode on one board, where events get batched and idle agents close after about 10 minutes. The evaluation is on November 17.

Looking back, I should have set up the coach agent earlier and had it more aggressively looking for waste like this.

If I were doing this again

If I were setting up an agent factory from scratch, these are the things I’d keep in mind.

  1. Log everything from day one. Every launch, comment and block. Then measure the flow before you guess at it (I guessed 40 to 50% and it was 3%).
  2. Set up a coach agent early. Its only job is finding waste in the system, not working cards.
  3. Make asks to the human structured. One line on what to do, the link or command, and a way to answer right on the card. If agents can flag you any other way, they will.
  4. Count blocked cards against WIP, at least at first. A full board is a good way to expose what’s stuck. But if you’re the blocker and you don’t really need to be, it just freezes work that could have kept moving.
  5. Give every board a WIP limit, even the ones you set up by hand.
  6. Dry run any change to your merge rules with one PR before you turn it on for the whole fleet.
  7. Know which identity your agents push as. If they all share one, GitHub won’t let them approve each other’s PRs.
  8. Put related changes in one PR so they aren’t all waiting on CI and conflicting with each other.
  9. Make your test fakes at least as strict as the real service.
  10. Have a separate agent review the work. The coach’s tests passed every time and 8 of its 10 PRs still came back with changes.
  11. Keep an eye on your supervisor agent. It’s easy for it to become the place everything that doesn’t fit gets sent, including problems it can’t fix.

I’ll be writing more about the dispatcher, my “scrum master” (Bosun), and all the little technical paper cuts I ran into along the way running these agents in on my Mac and in a cloud VPS inside VMs.

And if you want your own plonkboard, point your agent at plonkboard.com it’s free and gets you 30% there 😀