Transform ambiguous specs into implementable work items through adversarial refinement. Use when receiving specs, claiming epics, or starting complex (l/xl) tasks. Use /breakdown for spec→tasks decomposition, /refine for sharpening individual items.
Transforms ambiguous specifications into implementable tasks through adversarial analysis and scope refinement.
npx claudepluginhub rbergman/dark-matter-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/examples.mdSurface 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 |
Before any simplification, identify items that must NOT be cut:
| Category | Description | Examples |
|---|---|---|
| Core Workflow | The minimal viable loop | CRUD operations, essential commands |
| Agent Primitives | Flags/features enabling agent autonomy | --json, --range, --auto, structured output |
| User-Requested Features | Explicitly requested by user | Items called out in original spec |
| Token Efficiency | Batch operations, context injection | Bulk APIs, pagination, streaming |
| Structured Output | Machine-parseable output | JSON on all commands, typed responses |
Tag protected items early. The Proposer phase should not propose cutting them.
Goal: Surface ambiguity and tag protected items.
Output: Detailed spec with gaps called out and protected items tagged.
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: Identify candidates for simplification—propose, don't execute.
The Proposer suggests cuts with confidence levels. It does NOT produce a reduced spec; it produces a list of proposals for the Advocate to argue against.
Output Format:
## PROTECTED (never cut)
- [List items from protected categories with rationale]
## PROPOSED CUTS
### Strong Cut Candidates (high confidence)
- `<item>` — [Rationale: clearly deferrable or unnecessary]
### Moderate Cut Candidates (medium confidence)
- `<item>` — [Rationale: could defer, but note trade-offs]
### Weak Cut Candidates (low confidence, protect carefully)
- `<item>` — [Rationale: seems optional, but may have hidden value]
Key Constraint: Proposer argues for cuts but does NOT execute them. The Advocate reviews each proposal.
Goal: Argue against proposed cuts, restore what matters.
The Advocate receives the Proposer's proposals and responds to EACH one:
Output Format:
## ADVOCATE RESPONSES
### Strong Cuts — Agreed
- `<item>` — Agree: [brief reason]
### Strong Cuts — Contested
- `<item>` — Contest: [why this should stay]
### Moderate Cuts — Agreed
- `<item>` — Agree, defer to phase 2
### Moderate Cuts — Contested
- `<item>` — Contest: [hidden value / future cost of adding later]
### Weak Cuts — Recommendations
- `<item>` — [Keep/Cut with reasoning]
### Cheap Additions Missed
- [Items not in spec that are low-effort, high-impact]
Key Constraint: Advocate argues from the proposals, not from memory. Every proposal gets a response.
Goal: Verify essential scope before synthesis.
Before the Judge produces final output, verify:
| Check | Status | Action if Failed |
|---|---|---|
| Core workflow commands preserved | ✅/❌ | Restore from Phase 1 |
| Agent primitives preserved | ✅/❌ | Restore --json, ranges, etc. |
| User-requested features addressed | ✅/❌ | Review with user |
| Structured output on all commands | ✅/❌ | Add missing |
| Token efficiency considered | ✅/❌ | Review batch/bulk operations |
"Too Thin" Indicators:
--json)? ⚠️If 2+ indicators trigger, return to Phase 3 with guidance to restore scope.
Goal: Produce actionable, externally-reviewable spec with quality gates.
Standalone Context Requirement:
The final spec must be reviewable by an external agent without access to conversation history. Include:
Keep context token-efficient: enough for an external reviewer to assess readiness, not a full project overview.
Spec Structure:
## Introduction
[What + Why in 2-3 sentences. If partial: "See Appendix A for project context."]
## Scope
[What's being built]
## Acceptance Criteria
[Testable outcomes]
## Out of Scope
[Explicit boundaries]
## Appendix A: Project Context (if needed)
[Token-efficient big picture: ~100-200 words max]
Synthesis Quality Check:
| Indicator | Status | Action if Failed |
|---|---|---|
| Commands/features ≥ minimum viable | ✅/❌ | Restore essentials |
| All commands have structured output | ✅/❌ | Add --json flags |
| Agent primitives present | ✅/❌ | Restore ranges, batching |
| User requests addressed | ✅/❌ | Review with user |
| Acceptance criteria testable | ✅/❌ | Add specifics |
| Spec standalone-reviewable | ✅/❌ | Add intro/context |
If 2+ indicators fail, output REVISE with specific gaps—don't ship a thin spec.
Quality Gate:
Not every spec needs all 5 phases:
| Complexity | Refinement |
|---|---|
| xs/s | Skip entirely |
| m | 2-phase (Formalize → Synthesize) |
| l/xl | Full 5-phase |
If the Proposer has no cuts and Advocate has no additions, skip Scope Lock and proceed to Synthesize.
| Level | Description | Refinement? |
|---|---|---|
| xs | Trivial, obvious | No |
| s | Small, well-understood | No |
| m | Some unknowns | 2-phase |
| l | Significant unknowns | 5-phase |
| xl | Many unknowns | 5-phase |
Rule of thumb: If you can't describe implementation in 2-3 sentences, it's l or higher.
/refine <target>Runs 5-phase 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 phase agent receives only previous output + goals, not internal reasoning. This prevents self-reinforcing mistakes. The Proposer shouldn't remember why the Analyst included something—it should propose cuts from scratch. The Advocate shouldn't remember the Proposer's reasoning—it should challenge each proposal independently.
For examples and extended reference material, see:
references/examples.md — Before/after refinement examplesCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.