One developer, a fleet of AI agents, and a rule that everything gets written down

How one developer builds safety-critical engineering software with AI agents: delegation tiers, hard budgets, and a rule that every decision and formula gets written down.

· 5 min read · Erik Kubica

I'm building a structural engineering engine for bridges (background in the previous post). It's a domain where a wrong number can end up in concrete, and I'm not a bridge engineer. I'm one developer with a domain expert on the other end of a chat, and a lot of AI agents.

This post is about how that works day to day: what I hand to which agent, what I never hand over, and the one rule that keeps it from turning into confident nonsense.

The rule: if it isn't written down, it didn't happen

Before any code, I set a rule for myself and every agent: every decision, every formula and every change gets recorded: what, where and why. Not "add comments". A real record, in a few files that live next to the code:

  • Decisions log. Each non-trivial choice gets a number (D-001, D-002, …), the options considered, and why the others lost. Reversals get a new entry that points at the old one. You never rewrite history.
  • Formulas log. Each formula or constant gets an F-number: the expression, symbols and units, the exact clause and page of the standard it came from, where it lives in code, which test checks it, and whether a human engineer has reviewed it.
  • Journal. Every merge gets an entry: what changed, why, who did it (human, or which model at which effort, and what it cost), how it was verified, and what is still unverified.
  • Open questions. Every assumption someone qualified has to confirm.

We're past two hundred decisions and two hundred formulas. It sounds like bureaucracy. In practice it's the only reason the project works, for three reasons:

  1. Agents forget. Every new session starts from zero. The written record is its memory, and it's the same memory for every agent, so they don't contradict each other.
  2. Engineers audit. When the expert asks why a factor is what it is, the answer is a clause number, not "the model said so".
  3. It's the future paper. If this ever needs a technical report, a certification or a sales conversation, the truthful history is already written.

The "what is still unverified" line in the journal turned out to be the most important field. Agents, like people, love to report success. Forcing a written list of what wasn't checked makes the gaps visible.

Delegation tiers

Not all work is equal, so not all agents are equal.

Dirty work → cheap agents with a hard budget. Tests for code that already exists, docs, mechanical refactors, scaffolding. These run as a small custom agent on the plain API with a mid-tier model at medium effort and a dollar budget passed on every run. Each run gets its own git worktree and branch. I review the diff before anything merges. If it blows its budget, it stops. It doesn't get to "just finish".

Math-critical work → the strongest model, at high effort, isolated. The beam solver, influence lines, prestress losses, code checks. These go to the top model at high or maximum effort, again in a worktree, with a narrow brief: the spec step, the relevant formulas, the tests that must pass.

Never delegated: deciding what's correct. When an agent and a reference disagree, the answer comes from a closed-form solution, a convergence study, or the domain expert. Never from whichever source sounds more sure of itself.

Agents return their mistakes in the same voice as their wins

This is the most important thing I've learned. An agent that got the sign convention backwards reports it exactly as calmly as one that got it right. There's no hesitation in the prose to tip you off.

So verification can't be "read the summary". It's:

  • tests with hand-checked expected values (every new function ships with one),
  • cross-checks against independent open-source solvers,
  • and, for anything that matters, a second look at the diff with fresh eyes.

I also stopped giving reviewers my conclusion. If you ask an agent "check that this is correct because X", it tends to come back confirming X. Give it the code and the spec, not your hypothesis.

One master spec beats a pile of habits

For months the project ran on decisions I'd accumulated: reasonable, documented, but mine. Then the domain expert sat down and wrote out the firm's actual step-by-step design procedure: nineteen steps, the data passed between them, and a list of regression values from real projects.

I made that document the master spec and declared that it overrides earlier decisions, except for a handful of engineering choices I kept on purpose (and logged why). Every module now starts by reading its step in the spec and its row in a gap analysis.

That was humbling and very good. A lot of my "clever" structure turned out to be solving problems the engineers don't have, while some boring things they do every day weren't covered at all.

Chat isn't documentation

A smaller rule, learned the hard way: speculation stays in chat. Early on, agents happily filed every musing into the decision log ("we might consider…"). The log filled with noise that looked authoritative.

Now only two things go into the record: concrete answers from the domain expert, and things I explicitly decide. Everything else is conversation.

Changing vendors is an engineering decision too

For a while I used a second AI vendor as an "independent oracle", a different model to cross-check answers. Eventually I dropped it completely. The reasons were trust and consistency, not benchmark scores. Its past answers stay in the repo, marked as historical claims to be tested, not facts.

The point isn't which vendor. The point is that "which model do we trust for what" is a real decision, and it gets a D-number like any other.

The side effect nobody planned

Once the firm saw a process that was careful and transparent, they started asking for small things too: a timesheet tool, a results viewer for the analysis software they already use. Those took days, not months, because the process (spec → brief → isolated agent → review → journal) was already there.

Trust turned out to be the real product. The code is how you earn it.

What I'd do differently

  • Start the decision log on day one, not day ten. Reconstructing the first ten decisions from chat history was miserable.
  • Get the domain expert's procedure written down before writing structure. It would have saved weeks of well-documented work in the wrong direction.
  • Budget every agent run from the start. The cost surprises all came from runs without a cap.
  • Make "unverified" a required field everywhere, not just in the journal.

Next post: the engine itself, why it's Rust, and why I insist on exact methods when "close enough" would pass every test.

Tell me what you need built

Usually a reply within a day, by email or WhatsApp.