Kristopher Baker iOS · Product engineering · Systems and tooling
← The workshop
active Repository

Sparra

A build harness that gives one model a checkable contract, then has another run and evaluate the result. It can be steered interactively or left to work through a queue.

TypeScriptAI agentsTestingAutomationClaudeCodexOpen source

Sparra is a build harness for long-running software work. I built it because I wanted to leave an agent with more than a prompt and hope: each work item needed a checkable contract, persistent state, and an evaluator that would run the result. I can steer the loop from an editing session or give it a queue and let it continue unattended.

How it works

A planner divides the work into units. For each unit, a contract generator and evaluator agree on a small set of assertions before the builder starts. The generator implements that contract, and a separate evaluator reads the diff, runs the artifact's own checks, probes weak inputs, and returns a verdict with evidence. Claude can build while Codex judges, or Codex can build while Claude judges. Different model families help because the evaluator does not begin with exactly the same blind spots as the builder.

A Sparra session running several work items with Codex generating changes and a Claude model evaluating them. Several role runs in progress while Sparra works on its own repository. Each item keeps its contract, report, and verdict on disk.

The filesystem holds the shared state. Every phase reads its input from disk and writes its result back, so people can inspect, diff, or resume a run after a provider limit. The builder receives the contract but not evaluator-only holdouts. Sparra commits accepted changes to a Sparra branch rather than the project's main branch.

Running an artifact also defines the main security boundary. The command executor uses an allowlist of known build and test runners with safe operand shapes. It rejects shell metacharacters, interpreter evaluation flags, mutating subcommands, and filenames passed where policy allows only a named task. Commands launch without a shell. This keeps the policy narrower than trying to list every dangerous binary, which failed as soon as the evaluator tried equivalent operations through another tool.

Verification

The evaluator must run the delivered artifact rather than treat readable code as proof. For Apple-platform projects, it can build an app, start a simulator, drive the UI, and inspect screenshots. One run caught an app that letterboxed because it had no launch screen. Another failed a generator at 72 out of 75 after finding a scope hole and an incomplete documentation pass.

A Sparra evaluation rejecting a first attempt with two findings while a repair round runs. A failed evaluation returns the work to a new generator round. Each phase records enough state to reconstruct the status.

Current state

Sparra supports interactive role runs and a headless conductor for unattended work. A private HTTP bridge can trigger and monitor jobs over Tailscale without exposing raw model output or holdout text. It has built parts of itself and several of my other projects. I continue tightening its contracts and command policy as evaluators find new ways to satisfy a weak assertion without delivering the intended behavior.

Next

Aoede See the build log