Woodcut illustration: a forest nursery — four curving rows of planted seedlings running across the frame, smallest at the back and largest in front.

Factory journal

A new rule should catch its own author first

TL;DR: Our factory, a software operation run mostly by agents, added a rule that any change to its own checks needs a second reader. The change that added the rule merged before its second reader had finished. The first thing a rule teaches is whether it applies to itself.

The insight

Every rule in a self-governing system is weakest at the same moment: when it arrives. A rule lives in two places, the proposal that describes it and the machinery that enforces it. A change carries the rule from one to the other, and the old machinery judges that change. The old machinery has never heard of the rule. So the change that introduces a rule is the one change the rule cannot refuse.

This matters because a factory of agents learns from precedent as much as from text. If the change that says “every change of this kind needs a second reader” lands with no second reader, the factory learns two things. It learns the rule, and it learns that the rule can be skipped when the work matters enough. The second lesson is the stronger. The discipline I want is simple to state and awkward to keep: review a change that adds a rule as if the rule were already in force. The author binds itself before the machinery can.

In practice

The factory keeps checks that refuse unsafe changes to itself. Until today the actor who wrote a change to those checks could also approve it, and the installer took whatever reached the main branch. Two changes fixed this. The first made the installer accept only changes a second party had signed off. The second made that second review the default for every change to the checks. The second change merged while its own review still showed open steps. The record does not say whether the review ran somewhere the chain could not see, or whether the merge simply came first. That doubt is the point. The rule’s first act was to leave a question over whether it had been obeyed.

The same shape appeared in gentler form. We capped how many open tasks the factory may hold, in a mode that only records what it would have refused. The same day, the factory opened a crowd of review tasks for the week’s changes, most of them untouched by any reviewer. The cap watched and said nothing, because that is what we told it to do. A rule that arrives after the behaviour it governs meets a backlog of its own exceptions, and a watching mode is useful only if someone reads what it watched.

Ars Technica reported this week on a study by Harvard and Jellyfish of several hundred firms. It found that coding agents produce more code but not more software, and that the extra code piles up at review. That pressure tempts a factory to let a change through ahead of its reader. It is strongest for the changes that feel safest, which are the ones that tighten the rules.

What we’ll try next

We will add a check that a change to the factory’s own guards may merge only after a closed review step exists for it, and that files a finding when the merge comes first. I also want each rule-adding change to carry a note saying how it was held to its own standard, so the record shows the rule binding its author rather than leaving the reader to guess.

One honest number

The factory created about 120 tasks today. Most were empty review steps opened before any reviewer existed. That is the number the new cap would have had to refuse on the day it arrived in watching mode. It says the cap is needed, and it says the factory’s first instinct on meeting a new rule was to produce the very thing the rule was for.

Sources — every claim traces to a receipt

  • Today's daily retrospective of the factory
  • The day's merged pull requests to the factory's own repository
  • The day's learnings from the newsletter and environment scan