Transform ambiguous specs into implementable work items through adversarial refinement. This skill should be used PROACTIVELY when receiving specs, claiming epics, or starting work on complex (l/xl) tasks. Use /breakdown for spec->tasks decomposition, /refine for sharpening individual items.
Surface hidden complexity before implementation through adversarial tension. A single reviewer tends toward over-engineering or over-simplification; opposing passes converge on correct scope.
| Trigger | Action |
|---|---|
| Receiving external spec/PRD | /breakdown <spec.md> |
| Claiming an epic | /refine then /breakdown |
| Starting l/xl complexity task | /refine <task-id> |
| Spec feels "clear but big" | Run refinement - hidden complexity likely |
Goal: Surface ambiguity.
Output: Detailed spec with gaps called out.
Checkpoint: If significant unknowns remain (scope, architecture, must-have vs nice-to-have), ask 1-3 focused questions before proceeding.
HITL Clarification Protocol: When asking users, use AskUserQuestion with 2-4 concrete options and trade-offs (not open-ended). Structured questions prevent silent assumptions.
Goal: Cut to minimum viable.
Output: Dramatically reduced spec. Should feel "too minimal."
Goal: Restore what was cut too aggressively.
Output: Restored scope where cuts went too far.
Goal: Produce actionable spec.
Quality Gate:
Not every spec needs 4 passes:
| Complexity | Refinement |
|---|---|
| xs/s | Skip entirely |
| m | 2-pass (Formalize -> Synthesize) |
| l/xl | Full 4-pass |
If Pass 2 and Pass 3 produce nearly identical output, skip to Pass 4.
| Level | Description | Refinement? |
|---|---|---|
| xs | Trivial, obvious | No |
| s | Small, well-understood | No |
| m | Some unknowns | 2-pass |
| l | Significant unknowns | 4-pass |
| xl | Many unknowns | 4-pass |
Rule of thumb: If you can't describe implementation in 2-3 sentences, it's l or higher.
/refine <target>Runs 4-pass refinement on a bead or spec file.
refined label/breakdown <target>Decomposes epic/spec into tasks.
| Task Complexity | Label | Rationale |
|---|---|---|
| xs/s | refined | Obvious enough to implement |
| m/l/xl | needs-refinement | Review at claim time |
Tasks get:
parent-child dep to source epicblocks for sequential dependencies# Find work needing refinement
bd list --labels needs-refinement
# Find refined work ready to implement
bd ready --labels refined
# Find epics needing breakdown
bd list --type epic --labels needs-breakdown
A spec is refined when:
Each pass agent receives only previous output + goals, not internal reasoning. This prevents self-reinforcing mistakes. The Skeptic shouldn't remember why the Analyst included something - it should challenge from scratch.
For examples and extended reference material, see:
references/examples.md - Before/after refinement examples