Agent pipeline · Python
Software Factory
A multi-agent delivery pipeline for Claude Code: scouts, a planner, engineers, a reviewer from a different lab and a verifier, with human approval and git guardrails.
The problem
Coding agents are strong in a single session, but they do not behave like a team. They grade their own work, they run unattended next to git push, and they give you no data on what each step cost or whether it worked.
What I built
Harness is a plugin for Claude Code that turns one session into an engineering manager. It hands each part of the work to a specialised agent: scouts map the code, a planner writes the plan, engineers implement one task at a time, a reviewer from a different lab reviews the diff, and a verifier checks every finding against the real code.
Everything that should not be left to a language model lives in one Python command-line tool of about 2,900 lines that uses only the standard library: run state, branching, test gates, cost accounting, the decision to loop back or finish, and posting to GitHub. It works on single repositories and on workspaces of several, such as an API with a mobile client.
How AI was used
Each stage uses the model that suits it. Scouts run on a small, fast model, one per repository, in parallel. The planner uses the strongest model. Engineers use a mid-sized one and move up for hard tasks. The reviewer is deliberately a model from a different lab, so it is less likely to share the engineer's blind spots; any OpenAI-compatible API can fill that role.
The manager session passes file paths between stages and never reads diffs or source itself, which keeps its context small over long runs.
What kept it safe
- A human approves the plan before any code is written.
- Agents cannot push. A hook parses every shell command. Subagents can never push, rewrite history or write to GitHub.
- Test gates know the baseline. Failures that existed before the change are recorded first, so a gate fails only on new ones, and an engineer cannot finish while a file it edited has no passing run on the current code.
- Tests are protected. Removed assertions, skips and loosened thresholds in existing tests are flagged, and the verifier has to judge each one.
- Reviews stay pending. Reviews posted to GitHub go up as drafts that I submit myself.
Results
I use it daily on real projects. Every stage logs tokens, cost, duration and outcome, and a report breaks cost, quality and speed down by stage and model, so I can measure whether the pipeline is helping.
Court Vision, also on this site, was built with it from a design document.
Lessons and technologies
- Keep the core deterministic and put the agents at the edges.
- The agent that writes the code should never be the one that reviews it.
- Python (standard library only), Claude Code plugins and hooks, OpenAI-compatible reviewer APIs, GitHub CLI.