From claude-swe-workflows
Spawns parallel advocate subagents to debate decision options adversarially, rebut arguments, and gather evidence before judge renders verdict. For robust choices.
npx claudepluginhub chrisallenlane/claude-swe-workflows --plugin claude-swe-workflowsThis skill uses the workspace's default tool permissions.
Uses adversarial representation to ensure all options are robustly explored before making a decision. Inspired by the legal adversarial system where truth emerges from the collision of well-argued positions.
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Uses adversarial representation to ensure all options are robustly explored before making a decision. Inspired by the legal adversarial system where truth emerges from the collision of well-argued positions.
Judge (You): The Claude instance running this skill. You:
Advocates: Subagents spawned for each option. They:
Identify from user's request:
If options are unclear:
Output: Clear list of N options to deliberate.
Before spawning advocates, ensure you have sufficient context.
Probe for:
Ask clarifying questions proactively - don't assume the initial framing contains everything relevant. Users often omit context they consider obvious.
Conclude fact-finding when:
Keep it focused - you're gathering context, not conducting an interview. 3-5 clarifying questions is typical; more than 10 suggests the decision isn't ready for deliberation.
For each option, spawn an advocate agent:
Task tool with subagent_type: "THK - Advocate"Advocate prompt template:
You represent: [OPTION]
Decision context: [WHAT IS BEING DECIDED]
Relevant criteria: [WHAT MATTERS FOR THIS DECISION]
Background: [ANY CONTEXT THE USER PROVIDED]
Present your initial argument for why [OPTION] is the best choice.
Collect initial arguments from all advocates.
Share all arguments with all advocates:
Rebuttal prompt template:
You represent: [OPTION]
Here are the arguments made by all advocates:
[ADVOCATE 1 - OPTION A]:
[argument]
[ADVOCATE 2 - OPTION B]:
[argument]
...
Present your rebuttal. Address the strongest points made against your option and counter the arguments made for competing options.
As judge, you may ask questions to:
Question prompt:
You represent: [OPTION]
The judge asks: [QUESTION]
Respond directly and honestly.
You may question one advocate, multiple advocates, or all of them.
Before rendering judgment, explain your current thinking:
Give advocates a final opportunity to respond:
You represent: [OPTION]
The judge is leaning toward [OTHER OPTION] for the following reasons:
[REASONING]
This is your final opportunity to make your case. Respond to the judge's reasoning.
Collect final arguments in parallel.
After final arguments, either:
A) Return to Step 5 if:
B) Proceed to judgment if:
Iteration limit: 10 rounds maximum (a "round" is one cycle through steps 4-6)
Present your decision to the user:
Format:
## Judgment
**Recommendation:** [OPTION]
**Reasoning:**
[Why this option wins]
**Trade-offs:**
[What you're sacrificing by not choosing alternatives]
**Confidence:** [High/Medium/Low] - [Brief explanation]
**Key factors:**
- [Factor 1]
- [Factor 2]
- [Factor 3]
If you truly cannot decide:
Present to user:
## Unable to Render Judgment
I cannot make a definitive recommendation because: [REASON]
**The deliberation revealed:**
- [Key insight 1]
- [Key insight 2]
**The decision hinges on:**
- [Factor the user must weigh]
- [Personal preference that matters]
**If you value X, choose [OPTION A].**
**If you value Y, choose [OPTION B].**
Iteration limit: Maximum 10 rounds of deliberation Model: All advocates use opus for best reasoning Tool access: Advocates have full tool access for research Good faith: Advocates must not fabricate facts or misrepresent options
Good fit:
Poor fit:
The adversarial process ensures:
The judge's job is not to be passive. Ask hard questions. Challenge weak arguments. Push advocates to address concerns. The quality of the judgment depends on the rigor of the process.