debate-vs
Skill148 starsChanged 4 months agoMITView on GitHub
The agent debates an opponent LLM through a multi-turn conversation, then synthesizes the best approach and implements.
In this repository11 other files it gives its agents.
- collabSkill
- collab-vsSkill
- consult-llmSkill
- consultSkill
- debateSkill
- implementSkill
- panelSkill
- phased-implementSkill
- review-panelSkill
- reviewSkill
- workshopSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
22 rules. About 0 are common, 21 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Check the arguments for flags:
- Very specific: line 45
If no --<selector> flag is provided, ask the user which opponent to use, listing the selectors from the Models block.
- Distinctive: line 50
Explore the codebase: - use Glob, Grep, Read to understand:
- Distinctive: line 57
Do not stop at the first plausible file, definition, setting, or example.
- Distinctive: line 60
If the task depends on an external product, CLI, API, protocol, file format, or ecosystem convention, verify the relevant behavior using …
- Distinctive: line 62
Do not create a separate research artifact unless the evidence materially changes the plan.
- Distinctive: line 64
Make evidence-backed assumptions: - do NOT ask clarifying questions
- Distinctive: line 65
Use best judgment based on codebase and external context
- Distinctive: line 66
Prefer simpler solutions when ambiguous
- Distinctive: line 67
Follow existing patterns in the codebase
- Distinctive: line 69
Prepare context summary: - create a brief summary of:
- Distinctive: line 164
Update the thread_id: if a new one is returned.
- Distinctive: line 184
Prefer simpler solutions when arguments are equally strong
- Distinctive: line 234
Exact file paths: - never "somewhere in src/"
- Distinctive: line 237
DRY, YAGNI: - only what's needed
- Distinctive: line 250
Commit after each logical unit: - keep commits small and focused
- Distinctive: line 259
Test changes when possible
- Distinctive: line 260
Keep commits atomic and well-documented
- Distinctive: line 261
Use commit messages that explain the "why"
- Distinctive: line 267
After implementation, have the opponent review using the existing thread (full debate context):
- Distinctive: line 283
Apply fixes: if the opponent identifies clearly valid concerns:
- Distinctive: line 286
Commit each fix separately with clear messages
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Debate an opponent LLM on the best implementation approach using multi-turn conversations, then synthesize and implement.
Load the consult-llm skill before proceeding — it defines the invocation contract (stdin heredoc, flags, output format, multi-turn). Do not call the CLI without loading it first.
Available models
Selectors resolvable in this environment (depends on configured API keys):
!`consult-llm models`Phase 0: Load consult-llm Skill
Load it now. Follow its invocation contract for all CLI calls in this workflow.
Configuration
Arguments: $ARGUMENTS
Check the arguments for flags:
Opponent flag (exactly one required): any --<selector> from the Models block above (e.g. --gemini, --openai, --deepseek). Translates to -m <selector> for the CLI.
Mode flags:
--dry-run→ debate and plan only, skip implementation--skip-final→ skip the final review phase--rounds N→ number of debate rounds (default: 1, max: 3). Each round = agent argues + opponent responds.
Strip all flags from arguments to get the task description.
Set variables from the opponent flag:
MODEL: the selector (e.g.gemini,openai)OPPONENT: the same selector, used as the display label
If no --<selector> flag is provided, ask the user which opponent to use,
listing the selectors from the Models block.
Phase 1: Understand the Task (No Questions)
Explore the codebase - use Glob, Grep, Read to understand:
- Relevant files and their structure
- Existing patterns and conventions
- Dependencies and interfaces
Before planning or consulting, do enough research to understand how the requested behavior actually works. Before starting, think about what resources would be useful to obtain first: relevant source files, tests, logs, generated files, config, examples, command output, external docs, or authoritative upstream source. Gather the cheapest useful evidence before forming a plan.
Do not stop at the first plausible file, definition, setting, or example. Follow references, callers, related tests, and runtime usage until you can explain the current behavior and the likely impact of changing it.
- Ground external semantics before planning - understand the requested behavior in the real system, not just this repo
- If the task depends on an external product, CLI, API, protocol, file format, or ecosystem convention, verify the relevant behavior using the cheapest authoritative evidence available: local binaries/flags, generated files, official docs, public source, package/library code, or web search.
- Capture only decision-relevant facts that affect scope, acceptance criteria, compatibility, or implementation constraints.
- Do not create a separate research artifact unless the evidence materially changes the plan.
- Make evidence-backed assumptions - do NOT ask clarifying questions
- Use best judgment based on codebase and external context
- Prefer simpler solutions when ambiguous
- Follow existing patterns in the codebase
- Prepare context summary - create a brief summary of:
- The task to be implemented
- Relevant files discovered
- Key patterns and conventions in the codebase
- Any constraints or considerations
Phase 2: Opening Arguments
Both debaters propose their approach independently.
Step 1: Agent's Opening Argument
You ARE the debater. Form your own implementation approach based on what you found in Phase 1. Write it out in full:
## Agent's Opening Argument
1. **Approach**: [2-3 sentences]
2. **Key decisions**: [architectural/design decisions]
3. **Files**: [files to create or modify]
4. **Steps**: [implementation steps]
5. **Trade-offs**: [pros and cons]Present this to the user so they can see your position.
Step 2: Opponent's Opening Argument
Invoke consult-llm per the consult-llm skill with -m <MODEL> and -f <path> for each relevant source file discovered in Phase 1. Send the opening prompt below per the consult-llm invocation contract.
Opening prompt:
I need to implement the following task:
[Task description]
Here's what I found in the codebase:
[Context summary - relevant files, patterns, conventions]
Propose your implementation approach:
1. **Approach**: Describe your recommended approach in 2-3 sentences
2. **Key decisions**: List the main architectural/design decisions
3. **Files**: What files to create or modify
4. **Steps**: High-level implementation steps
5. **Trade-offs**: What are the pros and cons of this approach?
Be specific and opinionated. Defend your choices.Save the returned thread_id for subsequent rounds (see consult-llm's multi-turn section).
Present the opponent's opening argument to the user as
## OPPONENT's Opening Argument.
Phase 3: Debate Rounds
For each round (default 1, configurable with --rounds N):
Agent's Turn
Analyze the opponent's latest argument. Write your rebuttal:
## Agent's Rebuttal (Round N)
1. **Critique**: [weaknesses in opponent's approach]
2. **Defense**: [address weaknesses opponent identified in your approach]
3. **Concessions**: [good ideas from opponent worth adopting]
4. **Updated position**: [your refined recommendation]Present this to the user.
Opponent's Turn
Invoke consult-llm per the consult-llm skill with -m <MODEL> and -t <thread_id> (from the previous response), sending the rebuttal prompt below.
Rebuttal prompt:
Your opponent has responded with this rebuttal:
[Opponent's rebuttal from above]
Provide your counter-argument:
1. **Critique**: What are the weaknesses in your opponent's approach and rebuttal?
2. **Defense**: Address the weaknesses your opponent identified in your approach
3. **Concessions**: Are there any good ideas from your opponent worth adopting?
4. **Updated position**: State your refined recommendation
Be constructive but thorough in your critique.Update the thread_id if a new one is returned.
Present the opponent's rebuttal to the user as
## OPPONENT's Rebuttal (Round N).
Phase 4: Synthesis and Plan
As both debater and moderator, synthesize the final approach:
- Score the arguments:
- Which approach is simpler?
- Which approach better fits existing patterns?
- Which critiques were valid?
- What concessions were made?
- Identify consensus: Where did you and the opponent agree?
- Resolve disagreements: For each point of contention:
- Evaluate the arguments from both sides
- Be honest about where the opponent had the stronger argument
- Prefer simpler solutions when arguments are equally strong
- Write the verdict as part of the plan:
# [Feature Name] Implementation Plan
**Goal:** [One sentence describing what this builds]
## Debate Summary
**Agent's position:** [1-2 sentence summary] **OPPONENT's position:** [1-2
sentence summary]
**Points of agreement:**
- [Consensus point 1]
- [Consensus point 2]
**Resolved disagreements:**
- [Issue]: Agent said X, OPPONENT said Y → **Verdict:** [Decision and why]
**Verdict:** [2-3 sentences on the final synthesized approach]
---
### Task 1: [Short description]
**Files:**
- Create: `exact/path/to/file.py`
- Modify: `exact/path/to/existing.py` (lines 123-145)
**Steps:**
1. [Specific action]
2. [Specific action]
**Code:**
```language
// Include actual code, not placeholders
```
---Guidelines:
- Exact file paths - never "somewhere in src/"
- Complete code - show the actual code
- Small tasks - 2-5 minutes of work each
- DRY, YAGNI - only what's needed
- Be honest - credit the opponent when its ideas won
Save the plan to history/plan-<feature-name>.md.
Phase 5: Implement
If --dry-run: Skip to Phase 7 (Summary) - report the debate and plan
without implementing.
Implement the plan without further interaction:
- Follow the plan exactly - implement each task in order
- Commit after each logical unit - keep commits small and focused
- If something is unclear - make a reasonable decision and note it in the commit message
- If a task fails - attempt to fix it before moving on
- Only stop if there's a blocking error that cannot be resolved
Implementation rules:
- Work through tasks sequentially
- Test changes when possible
- Keep commits atomic and well-documented
- Use commit messages that explain the "why"
Phase 6: Final Review
If --skip-final: Skip to Phase 7 (Summary).
After implementation, have the opponent review using the existing thread (full debate context):
Invoke consult-llm per the consult-llm skill with -m <MODEL>, --task review, -t <thread_id> (from the debate), --diff-files <path> for each changed file, and --diff-base HEAD~N, sending the final review prompt below.
Final review prompt:
Forget which side you argued during the debate. Review the implementation purely on its merits:
- Any bugs or edge cases missed?
- Code quality issues?
- Security concerns?
Be concise. Only flag issues worth fixing.Apply fixes if the opponent identifies clearly valid concerns:
- Fix bugs and edge cases
- Commit each fix separately with clear messages
Skip minor style suggestions.
Phase 7: Summary
Present a final summary to the user:
## Summary
**Implemented:** [One sentence describing what was built]
**Debate outcome (Agent vs OPPONENT):**
- Agent advocated: [key position]
- OPPONENT advocated: [key position]
- Final verdict: [who won which points, synthesized approach]
**Key decisions from debate:**
- [Decision 1 - who proposed it and why it won]
- [Decision 2 - who proposed it and why it won]
**Post-implementation fixes:**
- [Fix applied after final review, if any]
**Commits:**
- `abc1234` - [commit message]
- `def5678` - [commit message]Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

