Heavy Think
Unified orchestrator for heavy thinking. One entry point, four modes — all powered by parallel agents → your synthesis.
Core principle: the parallel-agents-→-synthesize pattern is general-purpose. Change what the agents explore, and you get different thinking capabilities from the same engine.
Teammates vs subagents: Use teammates (agent teams) when the agents need to talk to each other — debate, collaborative brainstorm, hand-offs. Use parallel subagents when they don't — independent fan-out. Teammates compound (live cross-talk) but cost more and require the main session + CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1; subagents are cheaper and collide only once, in your synthesis.
Dispatch
Classify the problem, pick the mode:
| Signal | Mode | Pattern |
|--------|------|---------|
| "What should we..." / "What are the options" / subjective question | Brainstorm | Parallel perspectives → collide → synthesize |
| Verifiable answer exists (math, logic, algorithm) | Solve | Parallel solution paths → deliberate → verify |
| "How do we break this down" / too big to tackle | Decompose | Parallel decomposition strategies → synthesize best structure |
| "I'm stuck" / every option feels wrong / going in circles | Unstick | Parallel reframes → find the frame that unlocks movement |
| "Debate this" / "pressure-test" / "argue both sides" / high-stakes call needing adversarial rigor | Debate | Named teammates argue live via SendMessage → you moderate → synthesize |
| Need step-by-step with revision capability | Analyze | Sequential thinking (no agents needed) |
When the signal is Debate (user explicitly asks to debate/pressure-test, or stakes are high), go straight to Escalation: Agent Debate and run the Team Debate protocol — don't simulate it inline. Requires the main session (a subagent can't spawn teammates). Debate is also reached automatically when synthesis hits irreconcilable positions.
When uncertain: ask the user which mode fits. Don't guess.
When modes should chain: decompose first → brainstorm on each piece, or unstick → then solve.
Mode 1: Brainstorm
Parallel perspective agents explore the same problem from different worldviews. Insight emerges from collision, not consensus.
Stage 1: Frame
PROBLEM: [One sentence — what are we trying to figure out?]
CONSTRAINTS: [What's fixed? Budget, timeline, team size, tech stack...]
SUCCESS LOOKS LIKE: [How will we know a good answer when we see it?]
MODE: scan (3 agents, breadth-first) | deep (3-5 agents, depth-first)
Stage 2: Design Perspectives
Choose 3-5 perspectives that collide productively — tension, not redundancy.
| Perspective | Explores | |-------------|----------| | First Principles | What's actually true vs assumed? | | User Advocate | What does the person experiencing this actually need? | | Contrarian | What if the obvious answer is wrong? | | Futurist | What's true in 3 years that isn't today? | | Operator | What breaks at scale? Maintenance burden? | | Economist | Incentives? Who pays, who benefits? | | Minimalist | 10% effort that captures 80% value? | | Historian | What's been tried? Why did it fail/succeed? |
Rules: MUST include ≥1 challenger. MUST span ≥2 of: user, business, technical, temporal.
See references/perspective-combinations.md for pre-built sets by scenario.
Stage 3: Spawn Parallel Agents
Launch all in one message, model="opus". Each gets the same problem, distinct lens.
See references/brainstorm-agent-prompt.md for full prompt. Core structure:
You are a brainstorming agent exploring from one specific perspective.
PROBLEM: {problem} | CONSTRAINTS: {constraints}
YOUR PERSPECTIVE: {perspective_name} — {perspective_description}
Think from this perspective ONLY. Find what ONLY this lens reveals.
1. Challenge 2-3 assumptions most people take for granted
2. What is the REAL problem underneath the stated one?
3. Generate 3-5 ideas — push past the obvious first answer
4. Pick strongest. Stress-test: what breaks? what scales?
5. Second-order effects: if this succeeds, then what? And then what?
Output: ## Core Insight → ## The Real Problem → ## Ideas → ## Second-Order Effects → ## Hidden Risk → ## Provocation
Stage 4: Synthesize (YOU — never delegate)
- Map — territory each perspective covered, overlap vs divergence
- Collide — where perspectives directly contradict (deepest insight lives here)
- Extract surprises — what exists in NO single output but emerges from combining
- Second-order cascade — trace strongest ideas: then what? and then what?
- Converge — landscape → key insights (ranked by surprise) → tensions worth holding → recommendation → what to kill
Stage 5 (Optional): Stress Test
For high stakes, spawn 1-2 agents to attack synthesis: Red team ("find every way this fails") or Pre-mortem ("it's 1 year later and this failed — what happened?"). See references/brainstorm-agent-prompt.md for templates.
Escalation: Team Brainstorm (collaborative teammates)
Stages 1–5 use isolated parallel agents — they collide once, in your synthesis. When you want ideas to compound (each builds on the others live), escalate to a collaborative council: named teammates that cross-pollinate via SendMessage, then YOU harvest the expanded set. (Per the teammates-vs-subagents heuristic above — agents that build on each other need to talk.)
Full protocol, spawn template, anti-groupthink rules, and variants: references/team-brainstorm.md. Adversarial counterpart: references/team-debate.md.
Mode 2: Solve
K independent agents solve the same verifiable problem from scratch. Deliberation audits reasoning chains and forges new paths from fragments — it produces correct answers absent from ALL trajectories in ~50% of cases.
When to use
- Mathematical reasoning, algorithmic/competition problems, complex logical deduction
- Any verifiable task where confidence < ~70%
- NOT for subjective, preference-oriented, or easy (>90% confidence) tasks
Stage 1: Parallel Reasoning
Spawn K independent agents in a single message (parallel). Zero sibling knowledge.
| K | When | |---|------| | 3 | Standard — most problems | | 5 | High-stakes — competition math, critical correctness |
Solve this problem step by step. Show complete reasoning and arrive at a final answer.
Use whatever approach you find most natural — algebraic, geometric, constructive, brute force, or proof by contradiction.
Problem: {query}
Requirements:
- Reason from first principles, show all work
- Final answer clearly marked
- Math: \boxed{answer} | Code: code block
Stage 2: Memory Cache
- Collect all K outputs
- Shuffle trajectory order (prevents position bias)
- Prune if exceeding token budget — truncate reasoning, preserve final answers
Stage 3: Sequential Deliberation (YOU — never delegate)
- Classify query type (math / code / logic / multi-step)
- Map answer distribution — what answers appear, how often?
- Audit each chain — logic valid? gaps? sign errors? hidden assumptions?
- Cross-validate — do independent approaches confirm the same result?
- Apply critical skepticism:
- Majority is signal, not proof
- Minority answer with tighter logic may be correct
- All may be wrong — re-derive from fragments if needed
- Synthesize the definitive answer
Stage 4: Output
Final answer only — no meta-analysis unless asked. Math: \boxed{answer} | Code: code block.
Iterative Deliberation
Trigger when first deliberation produces low confidence or fundamental disagreement. Concatenate deliberation as additional trajectory, re-run Stage 3. Max 2-3 iterations — performance degrades beyond that.
See references/compute.md for cost analysis and K selection. See references/tensions.md for design tensions.
Mode 3: Decompose
Parallel agents each decompose the problem using a different decomposition strategy. You synthesize the best structure from their outputs.
Stage 1: Frame
PROBLEM: [What needs to be decomposed?]
WHY DECOMPOSITION IS HARD: [What makes this non-obvious to break down?]
GOAL: [What does a good decomposition enable? Parallel work? Clarity? Prioritization?]
Stage 2: Spawn 3 Decomposition Agents
Launch all in one message, model="opus":
| Agent | Strategy | Prompt Focus | |-------|----------|--------------| | Functional | By capability/responsibility | "What are the distinct functional areas?" | | Temporal | By sequence/dependency | "What must happen first, second, third?" | | Risk | By uncertainty/difficulty | "What's known vs unknown? Easy vs hard?" |
For deeply technical problems, swap in: | Agent | Strategy | Prompt Focus | |-------|----------|--------------| | Data-flow | By information movement | "What data flows where? Where are the boundaries?" | | User-journey | By user experience | "What does the user do step by step?" | | Failure-mode | By what can go wrong | "What are the independent failure domains?" |
Agent prompt template (see references/decompose-prompt.md):
You are a decomposition agent. Break down a complex problem using a specific strategy.
PROBLEM: {problem}
CONTEXT: {context}
YOUR STRATEGY: {strategy_name} — {strategy_description}
Decompose this problem using ONLY your assigned strategy. Don't try to be comprehensive — show what your lens uniquely reveals about the problem's structure.
Requirements:
1. Identify 3-7 components/phases/pieces
2. For each: name it, define its scope, identify its inputs/outputs/dependencies
3. Flag which pieces are independent (parallelizable) vs sequential
4. Identify the hardest piece and explain why
5. Name what your decomposition MISSES — what falls between the cracks?
Output:
## Decomposition ({strategy_name})
### Components
1. **[Name]** — [Scope]. Inputs: [X]. Outputs: [Y]. Dependencies: [Z].
2. ...
### Dependency Map
[Which pieces depend on which? What can run in parallel?]
### Hardest Piece
[Which component and why — complexity, unknowns, risk]
### Blind Spots
[What does this decomposition miss or awkwardly split?]
Stage 3: Synthesize
You compare all decompositions yourself:
- Overlay — where do all strategies agree on boundaries? Those are real seams.
- Conflict — where do strategies split things differently? These reveal design decisions, not facts.
- Blind spots — what did each strategy miss? The union of blind spots shows hidden complexity.
- Compose — build the final decomposition by stealing the best cuts from each strategy.
Output:
## Synthesized Decomposition
### Components (with source)
1. **[Name]** — [Scope]. Source: [which strategy revealed this most clearly]
2. ...
### Execution Order
[What's parallel, what's sequential, what's the critical path]
### Key Design Decisions
[Where decomposition strategies disagreed — and which cut you chose and why]
### Hidden Complexity
[What emerged from combining decompositions that no single one showed]
Mode 4: Unstick
Parallel agents each reframe the problem from a different angle. The goal: find the frame that transforms "stuck" into "obvious next step."
Stage 1: Name the Stuckness
PROBLEM: [What are you trying to do?]
WHY STUCK: [What's blocking? Every option feels wrong? Going in circles? Can't see the next step?]
WHAT YOU'VE TRIED: [What approaches have been attempted or considered?]
Stage 2: Spawn 3 Reframe Agents
Launch all in one message, model="opus":
| Agent | Reframe Strategy | |-------|-----------------| | Inversion | "What if the opposite of your assumption is true?" | | Abstraction Shift | "What if you're solving the wrong level of the problem? Go up one level or down one level." | | Constraint Flip | "What if the thing you think is fixed is actually variable, and vice versa?" |
For deeper stuck-ness, add: | Agent | Reframe Strategy | |-------|-----------------| | Adjacent Domain | "What field outside yours has solved an analogous problem?" | | First Principles | "Strip everything away — what's actually, provably true here?" |
Agent prompt template (see references/unstick-prompt.md):
You are an unsticking agent. Someone is stuck on a problem. Your job: reframe it so movement becomes possible.
PROBLEM: {problem}
WHY THEY'RE STUCK: {stuck_reason}
WHAT THEY'VE TRIED: {attempts}
YOUR REFRAME STRATEGY: {strategy_name} — {strategy_description}
You are not solving the problem. You are changing how they SEE it. A good reframe makes the next step obvious.
Requirements:
1. Name the assumption or frame that's creating the stuckness
2. Apply your reframe strategy to shift it
3. Show what the problem looks like after reframing
4. Suggest 1-2 concrete next steps that are obvious in the new frame
5. Name the risk of your reframe — what does it miss or oversimplify?
Output:
## The Trap
[What assumption/frame is keeping them stuck?]
## The Reframe
[Apply your strategy — how does the problem change?]
## After Reframing
[Describe the problem in the new frame. What's now obvious?]
## Next Steps
[1-2 concrete actions that follow naturally from the new frame]
## Reframe Risk
[What does this new frame miss or distort?]
Stage 3: Synthesize
- Which reframe unlocks movement? — Not which is cleverest, but which makes the next step most obvious.
- Can reframes combine? — Sometimes two reframes together reveal more than either alone.
- What's the actual trap? — If multiple agents identified the same underlying assumption, that's the real blockage.
- Recommend — state the reframe that works, the next concrete step, and what to watch out for.
Mode 5: Analyze
No agents needed — apply sequential-thinking skill directly.
Use when the problem needs step-by-step decomposition with revision capability, not parallel exploration.
Invoke: Skill("sequential-thinking")
Escalation: Agent Debate
When standard parallel → synthesize isn't deep enough (low confidence, fundamental disagreements, high stakes), escalate to a debate — positions get attacked, and only what survives is kept.
When to Escalate
- Synthesis reveals irreconcilable positions (not just different angles — genuine contradictions)
- Stakes are high enough to justify 3-5x more compute
- First-pass synthesis confidence is low
- User asks for "deeper", "more rigorous", "pressure-test", or "debate this"
Two mechanisms, in order of preference.
Preferred: Team Debate (agent teams)
Spawn named teammates that argue with each other directly via SendMessage — a live, persistent debate where each debater keeps its own thread and engages its opponent's latest argument. This is the real thing, and the default when available.
Requires
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1and that you are the main session — agent teams have no nested teams, so a subagent cannot spawn teammates. If either is false, use the fallback below.
In short: frame the motion → spawn 2–4 named debaters in one message (model="opus", each given full context + its stance + opponents by name, since teammates don't inherit your history) → they open and cross-examine each other live → you moderate (bound the rounds, steer, detect convergence — never argue a stance yourself) → you synthesize what survived → shut them down.
Full protocol, spawn-prompt template, moderation rules, and variants: references/team-debate.md.
Fallback: Round Protocol (subagents)
Use only when teams are unavailable (flag off, or you're inside a subagent). Weaker — subagents can't talk to each other, so YOU relay text between rounds against frozen snapshots:
-
Round 1: Positions — Run the standard mode (Brainstorm/Solve/Decompose). Collect agent outputs.
-
Round 2: Challenges — Spawn new agents in parallel, each attacking one Round 1 position. Each receives ALL Round 1 outputs and must:
- Identify the weakest assumption in their target position
- Present the strongest counter-argument
- Propose a specific modification or alternative
You are a debate challenger. Read all positions below, then attack the assigned one. ALL POSITIONS FROM ROUND 1: {all_round1_outputs} YOUR TARGET: Position {N} by {agent_name} 1. What is the weakest assumption in this position? 2. What evidence or logic undermines it? 3. What do OTHER positions get right that this one misses? 4. Propose a specific modification or superior alternative. Be rigorous, not hostile. The goal is truth, not winning. -
Round 3: Defenses (optional, for highest stakes) — Send challenges back to original agents (or new defenders). Each must:
- Acknowledge valid criticisms
- Defend what survives challenge
- Integrate insights from challengers into a revised position
-
Final Synthesis — YOU synthesize across all rounds. The value is in what survives challenge, not what sounded good initially.
Constraints (both mechanisms)
- Max 3 debate rounds. Beyond that, diminishing returns.
- Each agent/teammate uses
model="opus"for depth. - Spawn in parallel (one message).
- Always state: "Escalating to debate because [reason]."
Chaining Modes
Complex problems often need multiple modes in sequence:
| Chain | When | |-------|------| | Unstick → Brainstorm | Stuck on direction → once unblocked, explore options | | Decompose → Brainstorm (per piece) | Big problem → break down → ideate on each component | | Brainstorm → Solve | Explore options → verify the winning approach rigorously | | Decompose → Solve (per piece) | Break down → solve each sub-problem with full rigor | | Unstick → Decompose | Can't see the structure → reframe → then decompose clearly |
State the chain upfront: "I'll decompose first, then brainstorm on the hardest piece."
Anti-Patterns
| Pattern | Fix | |---------|-----| | Using heavy-think for simple tasks | If you can answer in 30 seconds, just answer | | Picking a mode without classifying | Always match signal → mode first | | Skipping synthesis, just listing agent outputs | YOU must synthesize — the value is in the collision | | Running all modes "to be thorough" | Pick the mode that fits. Chain only when necessary | | Decomposing when you're actually stuck | Stuck ≠ complex. Stuck means you need a reframe, not more structure | | Brainstorming when you should be solving | If there's a verifiable answer, solve. Don't ideate around it |
References
references/team-debate.md— Agent-teams debate: spawn named teammates that argue via SendMessage (preferred), with legacy fallbackreferences/team-brainstorm.md— Agent-teams council: named teammates that build on each other's ideas via SendMessage (collaborative ideation)references/brainstorm-agent-prompt.md— Brainstorm + stress test agent promptsreferences/perspective-combinations.md— Pre-built perspective sets by scenarioreferences/compute.md— Cost analysis, K selection, non-monotonic performancereferences/tensions.md— Design tensions: consensus vs minority, width vs depthreferences/landscape.md— How Solve mode compares to Best-of-N, Self-Consistency, Forest-of-Thoughtreferences/paper-details.md— HeavySkill paper methodology detailsreferences/decompose-prompt.md— Full decomposition agent prompts with variantsreferences/unstick-prompt.md— Full unsticking agent prompts with variants- Related skills:
problem-solving,sequential-thinking