circuit

a workflow engine, driven from Claude Code and Codex

The process your coding agent follows.

AGENTS.md and a pile of skill files can only suggest. Circuit encodes the process itself: typed steps, mechanical checks, a written record of every run.

From one prompt to a verified prototype choice. The flow frames the work, builds several candidates, checks them, asks for your call, and leaves a run folder behind.

  • $ /circuit:run create a pure CSS mesh gradient generatorCIRCUITflow prototypeprocess mediumRunning Frame...

What makes it different

Not a smarter agent. A process the agent runs inside, with rules it can't talk its way around.

A process, not a chat

A flow is a set of typed steps compiled from a schematic, so the same work runs the same way every time. Each step is a micro-harness: its own model, tool scope, and a clean context with only what it needs, so a long session can't rot the steps that come after.

frame · plan · act · verify · review

How a run works

One dial, models by role

Circuit picks model, effort, and tool per step from the step's role and one power dial. Turn the dial down and the step that edits code gets cheaper while research stays on the high tier. After a run, the receipt shows spend per role.

--power low · researcher stays high

Try the dial below

It can't skip the proof

The check that lets a step advance is run by the engine, not the model. A run can't reach complete by giving up or by running out of tries.

outcome: blocked until verified

Evidence and runs
And the rest of the surface

It loops until it's proven

Some work isn't one pass. Circuit can repeat a set of steps until the goal is met and confirmed, inside hard caps on tries and spend.

How the loop works

Tools it can't reach

Scope a step to the tools it should touch. For the step that edits code, on Claude Code the rest are gone, not just discouraged.

Compose a flow from a description

Describe a process and Circuit assembles a flow from existing blocks, checked runnable before it runs. Today it's an experimental CLI on your machine, not a host command.

How flows compose

Every feature is a command

Run, resume, inspect, generate, and search past runs are one CLI, so the whole engine scripts and automates.

The CLI, end to end

Every run leaves a record

A run ends in a folder you can read, query, or resume: the trace, the typed reports, the evidence.

What the next run recalls

Roles and the power dial

Model choice moves out of your head and into the process. Steps declare archetypes, one dial prices those archetypes, and the split is visible before a single token is spent.

Every step in a flow declares an archetype. The researcher reads the code and sets direction. The implementer makes the edits. The reviewer judges the result. Circuit resolves each step's model and effort from its archetype and the dial at the moment the step runs.

The allocation is deliberately lopsided. Turn the dial down and the implementer drops to a cheap, fast model while the researcher holds the top tier at every setting. The reading that steers the run is the wrong place to save.

On auto, the run sizes itself: the researcher recommends a tier and the engine clamps it to bounds you set. A failed step retries one tier up. An explicit model or effort you set yourself always wins over the dial.

After the run, the receipt reports the dial position and what each archetype spent.

$ circuit preview build --matrix
power
steprolelowmediumhigh
analyze-stepresearcheropusopusopus
act-stepimplementerhaikusonnetopus
review-stepreviewersonnetsonnetopus

dial: low · the implementer drops two tiers. the researcher does not move.

non-relay steps: frame-step (checkpoint), plan-step (compose), build-baseline (verification), verify-step (verification), build-touch-area (verification), close-step (compose)

The matrix is the Build flow's real allocation, straight from circuit preview. On Codex the dial moves each step's reasoning effort too. The non-relay steps carry no model at all: the engine runs those checks itself.

What you can run

Mostly coding. Not only coding. Some flows come with Circuit; the rest you describe and compose.

Every flow that ships, in detail
Coding
ships today

Fix a flaky test without guessing

Prove the failure, name the cause, make the smallest change, re-run to confirm.

How Fix runs
ships today

Ship a change inside set limits

State what must keep working, pause for your call, stay in bounds, verify, then review.

How Build runs
ships today

Compare a few approaches

Fan out candidates in a tournament and stop for you to pick the winner.

Tournament mode
ships today

Review a change before the PR

A read-only, evidence-backed verdict on behavior, scope, and risk. It never edits the code.

How Review runs
Beyond coding
you compose it

Scrape pages into one clean dataset

Pull each source, normalize to a typed shape, and reject the rows that don't match.

you compose it

Research a topic into a cited brief

Draft, then critique on a loop until every claim carries a source.

you compose it

Audit a long document for one risk

A read-only verdict on a named risk that never alters the source.

How you'd compose these

Get started

Install Circuit once for the agent you use. Paste the prompt and let the agent set itself up, or run the commands by hand.

Let your agent install it

Claude Code

› /plugin marketplace add petekp/circuit
› /plugin install circuit@circuit
› /reload-plugins

Codex

› codex plugin marketplace add petekp/circuit --ref circuit--v0.1.0-alpha.10
Installed? The quickstart walks your first run