بنقرة واحدة
debate
Use when: adversarial multi-tool debate for strategy, tier escalation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use when: adversarial multi-tool debate for strategy, tier escalation
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use when: full dev cycle branch->plan->implement->review->PR->merge
Use when: executing tasks via csa run/review/debate, session mgmt
Use when: iterative review-fix loop until csa review --diff is clean
Use when: running CSA-driven code review, independent model selection
Use when: three-layer manager-employee orchestration for delegation
Use when: legacy alias, redirects to dev2merge pipeline
| name | debate |
| description | Use when: adversarial multi-tool debate for strategy, tier escalation |
| allowed-tools | Bash, Read, Grep, Glob |
| triggers | ["debate","adversarial debate","multi-tool debate","AI debate","strategy debate"] |
Check your initial prompt. If it contains the literal string "Use the debate skill", then:
YOU ARE THE DEBATE PARTICIPANT. Follow these rules:
question from the initial prompt. If continuation=true, this is a follow-up in an ongoing debate.continuation=true): Respond directly to the arguments, concede valid points, defend your position with evidence.csa run/csa debate/csa review sub-agents unless the scope genuinely requires delegation. Fractal recursion is allowed up to the configured ceiling (project.max_recursion_depth, default 5) and pipeline::load_and_validate enforces it, but a debate participant that nests more CSA invocations dilutes the adversarial-reasoning signal this command is designed to provide.Only if you are Claude Code and a human user typed /debate in the chat:
Orchestrate an adversarial debate using CSA's independent model routing to produce well-reasoned strategies. The csa debate command automatically selects an appropriate debate model: when the caller is claude-code, CSA routes to an independent backend (ensuring different reasoning systems stress-test each other).
Two usage modes:
csa debate critiques via independent model, caller rebuts, repeat until consensus.When operating under SA mode (e.g., dispatched by /sa or any autonomous workflow),
ALL csa invocations MUST include --sa-mode true. This includes csa debate,
csa run, csa review, and any other execution commands. Omitting --sa-mode
at root depth causes a hard error; passing false when the caller is in SA mode
breaks prompt-guard propagation.
# New debate — independent model analyzes the question
csa debate --sa-mode true "Should we use gRPC or REST for our new microservice API?"
# Continue debate — pass counterargument in existing session
csa debate --sa-mode true --session <SESSION_ID> "I disagree because gRPC adds complexity for our small team"
# Prefer a tool within the selected tier
csa debate --sa-mode true --tier tier-3-complex --tool codex "How should we handle distributed transactions?"
# Select a stronger configured tier
csa debate --sa-mode true --tier tier-4-critical "What caching strategy should we use?"
# Pipe long prompts via stdin
echo "Given this architecture: ... Should we refactor?" | csa debate --sa-mode true
This is the pattern for embedding csa debate as the standard decision-making step in AI coding tool system prompts (CLAUDE.md, AGENTS.md, etc.):
1. You (the caller) have a question or proposal
2. Run: csa debate --sa-mode true "your question/proposal"
3. Read the independent model's response
4. If you agree → adopt the strategy, note the consensus
5. If you disagree → counter-argue:
csa debate --sa-mode true --session <ID> "I disagree because X. My alternative is Y."
6. Read the response, repeat steps 4-5 until consensus
7. Document the final decision with the debate session ID for audit trail
## Mandatory Debate Protocol
Before any non-trivial design decision (architecture, API design, data model, error handling strategy):
1. Run `csa debate --sa-mode true "describe the decision and your initial leaning"`
2. Read the independent model's analysis
3. If the model raises valid concerns you hadn't considered, revise your approach
4. If you disagree, counter-argue: `csa debate --sa-mode true --session <ID> "your counterpoint"`
5. Continue until consensus or 3 rounds (whichever comes first)
6. Document: "Decided X after debate (session: <ID>)"
Skip debate for: trivial changes, typo fixes, single-line edits, test additions.
question: The strategy question or problem to debate (positional argument or stdin)tool (optional): Debate tool selection override (default: auto)session (optional): Resume existing debate session (ULID or prefix)model (optional): Override model within selected toolcsa debate needs to work (tiers not required)opencode, codex, or claude commands directlycsa tiers listcsa tiers list returns no usable models, ERRORIf CSA invocation fails (non-zero exit, timeout, parsing error):
Use this protocol for complex strategy questions that benefit from multi-round, multi-model debate with tier escalation.
csa --format json tiers list
Validation (MANDATORY):
tiers array is empty → STOP. "No tiers configured. Run csa init."Parse the JSON output to get:
tiers[].name: tier name (sorted by name, lower = simpler)tiers[].models[]: model specs in tool/provider/model/thinking_budget formattiers[].description: human-readable tier descriptiontier_mapping.default: default tier for general taskscsa debate handles tool resolution automatically:
claude-code → debate uses codexcodex → debate uses claude-codeConfiguration in ~/.config/cli-sub-agent/config.toml or .csa/config.toml:
[debate]
tool = "auto" # or "codex", "claude-code", "opencode"
tier is specified, use that tier.default in tier_mapping.For the selected tier, build the models[] list:
tiers[chosen_tier].models[debate].require_heterogeneous = true in global config to fail-fast instead of soft fallbackmodels[] has >= 2 entries (proposal + critique)Within the selected tier, CSA resolves model specs from the tier while the orchestrator uses tool preferences to keep proposer and critic roles heterogeneous when possible:
{proposer_tool} = preferred proposer tool for this round{critic_tool} = preferred critic tool for this round{current_tier} and reruns the same tier-based commandsRound N (Proposal):
SID=$(csa run --sa-mode true --tier "{current_tier}" --tool "{proposer_tool}" --ephemeral \
"Question: {question}
You are the PROPOSER in an adversarial debate. {context_from_previous_rounds}
Provide a concrete, actionable strategy. Structure your response as:
1. Core Strategy (2-3 sentences)
2. Key Arguments (numbered, with evidence/reasoning)
3. Implementation Steps (concrete actions)
4. Anticipated Weaknesses (acknowledge limitations honestly)")
csa session wait --session "$SID"
Round N (Critique):
SID=$(csa run --sa-mode true --tier "{current_tier}" --tool "{critic_tool}" --ephemeral \
"Question: {question}
You are the CRITIC in an adversarial debate.
PROPOSAL:
{proposal_text}
Rigorously critique this proposal:
1. Logical Flaws (identify reasoning errors)
2. Missing Considerations (what was overlooked)
3. Better Alternatives (if any exist, be specific)
4. Strongest Counter-Arguments (the best case AGAINST this proposal)
Be intellectually honest: acknowledge strengths before attacking weaknesses.")
csa session wait --session "$SID"
Round N (Response):
SID=$(csa run --sa-mode true --tier "{current_tier}" --tool "{proposer_tool}" --ephemeral \
"Question: {question}
You are the PROPOSER responding to criticism.
ORIGINAL PROPOSAL:
{proposal_text}
CRITIQUE:
{critique_text}
Respond to each criticism:
1. Concede valid points and revise your strategy
2. Refute invalid criticisms with evidence
3. Present your REVISED STRATEGY incorporating lessons learned
If the critique fundamentally undermines your approach, propose a new strategy.")
csa session wait --session "$SID"
After each critique-response pair, YOU (the orchestrator) evaluate:
Convergence criteria (debate should end):
Escalation criteria (move to next tier):
When escalation is triggered:
# Example: escalating from tier-1-quick to tier-2-standard
SID=$(csa run --sa-mode true --tier "{higher_tier}" --ephemeral \
"Question: {question}
PREVIOUS DEBATE SUMMARY (lower-tier models could not resolve):
{debate_summary}
You have been escalated to provide deeper analysis. Build on the previous debate:
1. Identify what the previous debaters missed
2. Propose a superior strategy with stronger reasoning
3. Address all unresolved criticisms")
csa session wait --session "$SID"
After the debate concludes (convergence or max rounds/escalations reached), YOU synthesize:
# Debate Result: {question}
## Final Strategy
{synthesized_strategy}
## Key Insights from Debate
- {insight_1}
- {insight_2}
## Resolved Tensions
- {tension_1}: resolved by {resolution}
## Remaining Uncertainties
- {uncertainty_1}
## Debate Trajectory
- Tier: {starting_tier} -> {final_tier} ({n} escalations)
- Rounds: {total_rounds}
- Models used: {model_list}
Every debate result MUST include:
tool/provider/model/thinking_budget formatWhy: Debate results are used as evidence in code review arbitration (pr-bot), security audits, and design decisions. Without model specs, future reviewers cannot assess the quality or independence of the arbitration.
When the debate skill is invoked from pr-bot Step 8 (false positive arbitration)
or any code review context where results will be posted to a PR:
The debate result MUST be posted as a PR comment for audit trail. The caller (typically pr-bot) is responsible for posting, but the debate output MUST include all information needed:
**Local arbitration result: [DISMISSED|CONFIRMED|ESCALATED].**
## Participants
- **Author**: `{tool}/{provider}/{model}/{thinking_budget}`
- **Arbiter**: `{tool}/{provider}/{model}/{thinking_budget}`
## Debate Summary
### Round 1
- **Proposer** (`{model}`): [position summary]
- **Critic** (`{model}`): [counter-argument summary]
### Round N...
## Conclusion
[verdict, rationale, which side prevailed]
## Audit
- Rounds: {N}, Escalations: {N}
- CSA session: `{session_id}`
FORBIDDEN: Posting a debate result without model specs. If model specs cannot be determined (e.g., CSA returned no metadata), report this explicitly in the comment rather than omitting the section.
csa tiers list.--ephemeral (no persistent sessions needed).User: "Should we refactor the auth module to use JWT instead of sessions?"
Agent runs: csa debate --sa-mode true "We're considering replacing server-side sessions with JWT for our auth module. Current system uses Redis-backed sessions. Team size: 3 developers. Scale: ~10k DAU."
# Heterogeneous model responds with analysis, arguments for/against
Agent disagrees with a point:
csa debate --sa-mode true --session 01JK... "Your concern about token revocation is valid, but we plan to use short-lived tokens (15min) with refresh rotation, which mitigates this."
# Model responds to counterpoint
Agent reaches consensus → documents decision
User: /debate "How should we handle distributed transactions across 5 microservices?"
Debate flow:
csa debate or csa run (no direct tool calls).