Skip to main content

Implement Spec

Decompose, implement, adversarial review, converge. The reference workflow.

When to use

For quality-sensitive work that needs adversarial review. Each task goes through implementation, gate validation, and a workflow validator review. If the review fails, the implementer receives targeted feedback and iterates. Escalation to a stronger model kicks in after repeated failures.

The workflow

How it works

The decompose step splits the spec into tasks. For each task, the converge step implements the code and then runs three gates: compile, test, and a workflow validator (validators/arch-review) that uses Claude Opus to review the diff against the spec. If the validator review fails, the retry overrides the prompt with targeted feedback from {gate.review.comments} — the agent gets a focused instruction instead of the full spec. From attempt 4, escalation switches to Claude Opus with a fresh session and reset worktree. The smoke step reuses the session from converge (session: from: converge) and the same agent that converged (agent: {converge.agent}) — if converge escalated to Opus, smoke runs with Opus too.

Execution trace

Customize

Create your own validators/my-review workflow with type: validate and swap it in the gate.
Delete the smoke step from each: if you trust the quality gate alone.
Add hitl: before_gate on decompose to validate the task breakdown manually.
Add parallel: true on the decompose step. Requires strictly disjoint blast radii.