Podcast about DevSecOps

#94 - Small Tasks, Big Wins: The AI Dev Loop at System Initiative

Six Claude Code sessions worked because each had a small task and a human questioning the plan.

17 min read

We bring Paul Stack back to cover the parts we skipped last time. What changed when the models got better and we moved from one-shot Gen AI to agentic, human-in-the-loop work? How do plan mode and tight prompts stop AI from going rogue? Want to hear how six branches, git worktrees, and a TypeScript CLI came together?

Discuss the episode or ask us anything on LinkedIn


Why the same coding agent produces garbage for one team and good code for another

Company policy on AI tooling runs the whole spectrum. Some ban it outright, sometimes down to the IDE plugin. Others want it everywhere as fast as possible, which in an enterprise takes a while anyway. In between sit the companies that allow Copilot-style completion but will not hear the word “agent”. The policy is not what decides whether the output is any good. Plenty of people hand an agent a mega prompt, “rebuild me Slack”, get something useless back and conclude that AI is garbage, having given it no context in any shape or form.

The cost of getting this wrong isn’t only maintenance. A story out of Poland went around recently: someone built an app for uploading receipts into the country’s centralised accounting system, and it went public along with their customers’ data. Probably nobody told the agent it was building a public receipt server holding other people’s data, so it had no security context to work inside, though that’s a guess from the outside. Who answers for a leak like that is not something we can settle: data protection law already assigns duties to controllers and processors (GDPR Article 82), and we don’t know how those duties get split between the person who prompted an app into existence and the platform that generated the code. The backdrop makes the question louder: Block told shareholders in its Q4 2025 letter that it is “reducing Block by nearly half, from over 10,000 people to just under 6,000”, naming intelligence tools as the reason, after a year the same letter calls strong.

Paul Stack, Director of Product at System Initiative, has two decades in infrastructure behind him and wrote providers for both Terraform and Pulumi. The team is five people. Their CLI, Swamp, is open source under AGPL v3 and is written almost entirely by agents. That shrink was not an AI decision, and the distinction is worth holding: the company cut down because it didn’t yet know what it was going to build, let alone how, and the agents came after. What’s worth copying isn’t the headcount. It’s the loop.

The loop matters more than the model

Start with what actually changed, because the usual answer stops one step short.

What changed when the models got good?

The models did improve sharply around October and November 2025, but the useful shift was in how people worked with them.

Call the old way Gen AI: hand an agent a specification, expect it to one-shot the result, take whatever comes out and walk away. The newer way treats the agent as a collaborator you keep interrupting, closer to a pair programmer than a code generator. System Initiative’s old CLI was written in Deno, so the models had seen a great deal of the TypeScript ecosystem and produced decent TypeScript on the first pass. Decent, not well architected. Left alone it blurts out raw code, because it doesn’t know your architecture. Give it your patterns, your practices, and the existing code it has to sit next to, and the output starts matching the conventions of the codebase around it.

Before the holidays in December 2025, that looked like six terminals open at the same time, each on its own git worktree, each building one small feature, fed bug reports and data, merged back through pull requests.

There’s a tax, and it’s the old one. Engineers learned to single-task because context switching is expensive. If you work best with one problem in your head at a time, driving six agents will cost you more focus than it buys you throughput. One split that works is longer-running tasks parked on a Mac mini reachable over Tailscale, short ones on the laptop. What you’re doing in either case isn’t typing. You’re commanding architecture and design.

Plan mode is the terraform plan you already know how to read

Six agents only works if you can see what each one intends before it moves.

What does plan mode actually prevent?

It puts a written, reasoned breakdown in front of you before the agent starts changing things, which is where the horror stories come from.

Claude Code’s plan permission mode is the version most people meet: the agent reads files and runs read-only commands, writes up what it intends to do and why, then waits for your approval before it edits anything. You enter it with Shift+Tab or claude --permission-mode plan (docs). Treat it as a review workflow, not a sandbox. Users have reported Edit, Write and Bash running anyway with the status line still showing plan mode on, and the reporter’s own explanation is that the restraint rides on the system prompt rather than on a block in the tools (claude-code#19874, opened 21 January 2026, closed by a stale bot without a maintainer reply). No maintainer confirmed the behaviour or that explanation of it. Keep the permission prompts in front of anything you can’t afford to have happen.

The comparison that fits is terraform plan, and it holds in both directions: plenty of engineers don’t read a terraform plan either, and the line in the middle saying it’s about to delete a database goes past them. That’s a choice you made, not a failure of the tool.

The plan is a starting position, not an answer.

The questions that do the work are embarrassingly plain. Are you sure this is the right plan? What about this constraint? Tell me, as a five-year-old, why this is the right implementation. Does this fulfil what the user asked for? People at work do laugh at the five-year-old one, and the agent reasons its way to a better answer often enough to keep it. After the implementation lands, the loop closes with a second ask: give me a breakdown of what you built against the plan you wrote, find the things you said you’d do and didn’t, and tell me why they weren’t important.

Architecture is back, and your naming conventions are not

A plan is only as good as what the agent knows about the system it’s planning against.

What do you hand an agent before it writes a line?

The design of the system, written down in the repository, plus the architecture it has to obey.

There are three layers to how we used to build software. Architecture means design patterns: domain-driven design, CQRS, that level. Patterns means DRY, YAGNI, keep it simple. Taste means how you arrange your Terraform modules, what your naming convention is, how the project is laid out. The last ten years in this industry went into taste, and we spent some of them laughing at the ivory tower architects who stayed up at the first level. An agent does not care about your naming conventions. It will recreate the same method five times over until you tell it to refactor and reuse. Architecture it can follow, if you give it one.

System Initiative encodes all of it in the repo. Design documents in a design/ folder cover the model layer and how objects are written and passed around, how workflows connect models, and what the expression language does and doesn’t support. The architecture is stated outright: domain-driven design, with a DDD skill loaded, domains kept separate from infrastructure, repositories and output layers. Then the smaller rules, the cheap ones to forget: TypeScript strict mode, no any, named exports, lint and format must pass, and no dependency carrying a licence that conflicts with AGPL v3. All of that is in front of the agent before it reads a line of code.

Skills carry the rest, lazy-loaded from the repository when a specific question or task calls for them. That design is deliberate on Anthropic’s side too, with metadata up front and the body pulled in only when the skill turns out to be relevant (Agent Skills).

Spaghetti in, more spaghetti on top. A force multiplier multiplies whatever you already have.

Issues in, plans out, and no pull requests from outside

Encoding all of that only pays off if every change comes through the same door.

Why refuse pull requests from the people who use your tool?

Because a patch from outside is code that never passed through the context the team feeds its agents, and that’s a supply chain you can’t vouch for.

The mechanics got easier in February. GitHub shipped repository settings on 13 February 2026 that turn pull requests off entirely or limit creation to collaborators with write access. Before that you wrote a GitHub Action that auto-closed anything from a non-contributor. Swamp’s contributing doc asks for an issue instead and offers to design the change together, which is a different relationship than “your patch is declined”.

That issue then goes through an agent, which decides whether it’s a legitimate bug or feature request, and the summary is posted straight back onto the issue. That matters because the issue then becomes the context the build agent reads: the reasoning, the choices, the design. If it’s legitimate, the work goes into plan mode. The person who opened it can come back and say that isn’t how it should behave, the plan is redone and pushed up again, and only then does anything get built.

Swamp also files its own bugs. A skill lets it check out the version of the code its binary was built from when it hits a fault in itself, analyse that code, and open an issue with the detail already in it.

Internal features skip the issue, but the plans still get published, because they’re good context for anyone trying to understand what’s being built and why.

Two reviewers: the helpful one and the grumpy one

Code written by an agent still has to be reviewed, and reviewing it with the agent that wrote it is worth close to nothing.

Why run two review agents instead of one good one?

Because a reviewer that knows why the code was written reads it charitably, and the bugs live where nobody is reading charitably.

The chain runs: one agent writes the spec, a human reviews the spec with it, another agent writes the code, and a third reviews the pull request without having seen either of the first two. That third one is the happy path reviewer. It loads the skills, checks the code standards, confirms things are where they should be. The fourth was added the Monday before we recorded, and its prompt starts with a line worth stealing.

Pull it apart, tell me why it won’t work, find the injection points. Jekyll and Hyde on the same pull request. If the happy path says this adheres to your standards and the grumpy one says there’s a security hole, the pull request doesn’t merge. If the grumpy one says the code is sound but it would change these tests to catch that case, the change goes through with the tests. In its first week it caught a path traversal bug. Every verdict is written back as a comment, so the lifecycle of a change is readable afterwards. The web app has accessibility guidelines and security checks encoded the same way.

Four tiers of tests, and one of them attacks you

Review agents catch what they can read. Tests catch what runs.

What do you test when nobody on the team wrote the code?

Whether the system does what the user needs and stays inside its boundaries, because the syntax underneath is free to change twelve times a day.

Below the usual unit and integration tests sit architectural tests: contract tests, property tests, and fitness functions that assert the domain doesn’t leak and that the agent built what it was told to build. Above them are user flow tests, kept in a separate repository so they aren’t shaped by how the code happens to be written, and run against compiled binaries. The user needs to create a repository, extend the system, create a workflow, run a model, and get an error on bad input. That’s a user story test by another name, and the role it fills is the QA engineer’s.

The top tier is adversarial, in four layers. Security boundary tests, which is where the path traversal case lives, alongside checks that you can’t pull environment variables out of someone’s shell and read them back. State corruption, for when someone goes digging in the state layer. Concurrency: multiple writes, lock failures. Resource exhaustion, which in practice is a workflow where something injects a 100 MB message on stdout and the system has to cope.

That security tier isn’t theoretical. Aqua Security’s advisory of 27 February 2026 says version 1.8.12 of the Trivy VS Code extension, distributed through the OpenVSX marketplace, carried code built to use a local AI coding agent to collect and exfiltrate sensitive information, and it tells anyone who installed it to remove it and rotate their environment secrets. How the attacker got publishing rights isn’t in the advisory. The account going round the week we recorded added a bot lifting an API key and deleting Trivy’s releases, which the advisory neither confirms nor covers.

Everything pushed to main publishes a release, which makes it a nightly channel: you can pull any nightly, trace it back to the code it came from, run the tests that code needs and play with it yourself if something feels funky. Promotion to stable comes after the user flow and adversarial tests pass, and after a human has downloaded that binary and used it. The tests catch the regressions their assertions cover; the download is still the last gate.

Small tasks are the cheap ones

All of this sounds expensive, and the bill says otherwise.

Where does a five-figure monthly token bill come from?

From telling an agent to go and do the world, so it reads everything in sight trying to work out what you meant.

Five people, each on the $200-a-month Claude Max tier, for a setup that plans, writes, reviews and adversarially tests the code. Separately, there are reports from other companies where developers run $10,000 to $12,000 a month on AI tokens while vibe coding, telling the agent to go off and do everything. Those two figures come from different teams, and nobody has lined the workloads up side by side, so read them as two anecdotes rather than a before and after. Claude Code draws on the same subscription limits as the rest of the plan, and going past them is something you switch on. One path is usage credits, charged on top of the subscription. The other is authenticating against a Claude Console account, which bills as API usage at standard rates instead of drawing on your plan allowance. An ANTHROPIC_API_KEY in your environment picks that second path without asking. Decline the credit prompt and the plan is the ceiling, with a five-hour and a weekly window to wait out (support). The $200 holds while the extras stay off, and the price of holding it is waiting.

The economics are the ones we already knew. Give an engineer a tight, well-defined story and it moves through the system; give them “go rebuild this” and you get “see you in six months, maybe”. A constrained task finishes fast because the agent holds only the context it needs. An unconstrained one burns tokens discovering the context. Running out of room is the new restart-your-machine: compact the conversation and carry on.

What this means for teams

The part that doesn’t come in the box is engineering judgement. An agent doesn’t know your security boundary and doesn’t know your domain unless somebody puts them in front of it. That’s the argument against the layoff fear rather than for it: the skills that keep an agent inside the lines are the ones built over years of shipping and operating software. Specialist labels get thinner at the same time. Terraform and Kubernetes start to look like syntax, and the principles underneath them matter more than the manual.

How junior engineers come up through this is genuinely unresolved. You learn where refactoring becomes necessary by watching a project outgrow its shape, and an agent that skips that stage skips the lesson too. We don’t have a good answer for it yet.

If your company has banned agents, the opening move isn’t code generation. It’s asking for a narrow, analysis-only pilot.

  • Turn on plan mode for one real task this week and read the plan end to end before approving it: claude --permission-mode plan.
  • Write one design document for the part of your system agents touch most, and commit it where the agent will read it.
  • Add a second reviewer on your pull requests with an adversarial prompt, and let it block merges on security findings.
  • Get an analysis-only pilot signed off, with the code and reports it may see written down, then work the next bug report alongside an agent and record whether it landed where you did. That record goes to your CTO.

Common questions, answered

How do I introduce AI agents at a company that has banned them?

Ask for a scoped, analysis-only pilot in writing, and run nothing on company code until you have that approval. A bug report and the code around it leave your environment when you paste them, so check your company’s rules on sharing code and internal reports with an outside service first. Inside those limits, have the agent analyse a bug report while you work through it yourself, then compare where each of you landed and why. Faster diagnosis, with nothing written to the codebase, is an easier case to take to a CTO than letting a model commit code.

How do I run several coding agents at once without them clobbering each other?

Give each one its own git worktree: a separate working directory and branch off the same repository, so their edits can’t collide. Bring the work back through pull requests as you would from any branch. Keep each agent on one small feature; a worktree does nothing for you if the task inside it is a project-wide rewrite. Be honest about the context-switching cost first: if you work best with one problem in your head, six agents will cost more focus than they return.

Who is responsible when an AI-built app leaks customer data?

We can’t tell you who carries the liability. Data protection law already assigns duties to controllers and processors under GDPR Article 82, and how those duties get split between the person who prompted an app into existence and the platform that generated the code is not a question we can answer. So treat it as a design problem while you still can: bring the security skill in the moment you know the thing will be public, and set the boundary before you ship rather than auditing after the leak.

Resources

Since we recorded

The Trivy story got worse: on 19 March 2026 a second compromise landed, and Aqua Security reported that credential rotation after the earlier incident had been incomplete and that the attackers may have obtained refreshed tokens. GitHub kept extending the contribution controls this way of working depends on, adding a collaborators-only setting for issue creation on 29 June 2026. Paul Stack started writing this up himself, opening a blog called The View from the AI Frontier with a post dated 2 April 2026. The token-cost argument had the shortest shelf life: we came back to it in #104 When AI Coding Gets 10x More Expensive once flat-rate pricing started breaking down.