How our team ships with AI without letting the AI just wing it. A companion piece to the release train.
An AI coding agent will hand you a two-hundred-line pull request in ninety seconds. It will look plausible. The variable names will be sensible, the structure will be clean, and somewhere in the middle it will have made an assumption nobody asked for and nobody caught. You cannot review it properly, because there is no record of what it was trying to do or why. You are left grading an answer with no working shown.
This is the actual risk of AI-assisted development, and it is not that the code is bad. It is that speed without structure produces confident, wrong, unreviewable work, and it produces it faster than you can catch it. A junior engineer does the same thing for the same reason. The failure is not the writer. It is the absence of anything forcing the thinking to happen before the typing.
Our answer is a system called CasaFlow, and this is the quieter half of a story I started last week. The release train was mine, a tool the whole team feels when a deploy rolls out. CasaFlow is Zak's, and it is the opposite kind of tool: the one a single engineer drives, heads down, to turn an idea into a merged PR. He built it in his first weeks on the team, he maintains it, and by now the whole team contributes to it. Two parts of a whole. One makes shipping legible. This one makes the building itself hard to do badly.
What it is
CasaFlow is a pipeline of skills, slash commands in Claude Code, that walk a piece of work from idea to merged PR. It is emphatically not a single "write my code" prompt. It is a staged process, and every stage produces a durable artifact: a spec, a plan, the code, the tests, a QA pass, a retro. Those artifacts do not evaporate when the PR merges. They live in a docs repo as a permanent trail, so every feature we ship carries a written record of what it was for, how it was designed, and how it was checked.
We did not invent the skeleton. CasaFlow is built on Jig, an open-source workflow framework the Duro engineering team built for their own AI-assisted development and then released under MIT. Zak and I had always meant to build something like this, and Jig turned out to be a better starting base than a blank repo. The name is what sold me. Anyone who has done machine work knows a jig is the unglamorous fixture that makes precision repeatable instead of heroic. You are not a better machinist with one. You just stop producing parts that are subtly wrong in ways nobody notices until assembly. Swap "machinist" for "engineer with an AI agent" and you have the entire thesis of this post.
What it does
The pipeline runs from discovery to a shipped PR to a retro, and I will not name all eighteen commands, because that is a reference manual and this is not. What matters is where the gates are.
Work starts with a kickoff that classifies the task and files the ticket. Then, before a line of code exists, /brainstorm forces the design conversation, and it is a hard gate. No code gets written until the design is approved. From there a spec pins down acceptance criteria, non-goals, and a test plan, and a plan breaks that into small, test-first tasks with real file paths.
Building is not one big agent. /build dispatches focused agents, in parallel when the work allows, each one scoped to a piece. Review works the same way. /review sends in a swarm of specialist reviewers, each looking at exactly one thing: security, error handling, or dead code; each scored; the whole thing aggregated into a confidence number. A separate pass grades the tests on coverage and mutation testing and hands back an actual letter grade.
The piece that ties it together sits between the stages. /approve is a comprehension gate. Before you move from one stage to the next, you have to answer three questions that prove you understand what the stage produced. Not that it passed. That you understood it. You cannot hand-wave through a gate that asks you to explain the thing you just made.
Its twin is /verify, which demands evidence before anyone gets to claim something is done. Between the two, the system asks the only questions that actually matter: do you understand this, and can you prove it works. Neither one cares whether you are a person or an agent.
And when something does slip through anyway, /postmortem does not just log it. It patches the skills themselves, so the specific way we got burned this time becomes a way we do not get burned again.
Why it exists
Two things separate this from "write code with an AI and hope."
The first is the gates. Every stage is blocked on either an approved artifact or answered comprehension questions. Neither a person nor an agent can skip the thinking steps and hand you vague, plausible, unreviewable work, because the gate will not open until the thinking is on the page.
The second is the specialists. Build and review are not one monolithic model trying to do everything at once. They are fleets of focused agents, each dispatched at its own narrow job, in parallel. A reviewer looking only for async-safety problems finds things a general reviewer reads right past.
The deeper payoff is the one I did not expect. Process stops being a tax you pay on top of the work and becomes a byproduct of doing the work. We do not write specs because a policy says to. Every feature has a spec, a plan, tests, and a retro because the workflow produced all of them on the way to the merge. The documentation is the exhaust, not a second job.
What it bought us
Concretely: a small team shipping more than two hundred tickets a month, a release cadence pulled down to at least every two weeks, and new engineers opening real pull requests in their first week. That last one is the tell. They did not have to absorb a year of tribal knowledge first, because the standards live in the pipeline, not in someone's head.
And it is not finished, which is the part I would underline if I could only keep one sentence. CasaFlow is a living tool, and it evolves as our workflow does. We recently added a recon skill that searches the codebase, Jira, and open PRs for adjacent work before anyone starts building, so nobody spends a day solving a problem a teammate solved last week in a different corner of the repo. We pulled Claude Design into the flow to round out the workflow from idea through interface rather than stopping at the API boundary. Every one of those additions came from someone hitting friction and saying so at a retro. A workflow framework that stops changing is just process debt with better branding.
Where this is headed is a team where the workflow itself carries the quality bar. The gates catch the preventable mistakes, the specialists catch the subtle ones, and the humans spend their judgment where it actually belongs, on the decisions a checklist can never make for you. The release train made releasing something you can feel. CasaFlow makes quality something the process refuses to skip.
Gates, not vibes. That turns out to be the whole difference between shipping fast and just breaking things fast.