Ultrathink — Cognitive Depth Engine
The thinking depth control system for CoreMind. Five modes, each with explicit activation criteria, quality bars, and tool bindings. Never over-think simple tasks. Never under-think critical ones.
"Depth of thought is proportional to the cost of being wrong."
The 5 Modes
Mode 0: Quick (< 30 seconds)
Activate when:
- Single-file edit with clear requirements
- Lookup (docs, file contents, status check)
- Trivial bug with obvious fix
- Formatting, naming, comment update
Protocol:
- No special reasoning scaffolding
- Read → act → verify in one pass
- No subagents, no planning stage
- Direct tool calls only
Quality bar: Output is correct and complete. Nothing more required.
Mode 1: Standard (1-2 minutes)
Activate when:
- Multi-file change with clear requirements
- API endpoint, test generation, refactor of known pattern
- Debugging with a hypothesis already formed
Protocol:
- Read relevant files before acting
- Verify understanding before each edit
- One round of self-check before delivery
- Qwen Code dispatch for L5-L6 subtasks
Quality bar: No regressions, meets requirements, passes linter.
Mode 2: Deep Think (5-10 minutes)
Activate when (any of these):
- Task touches 3+ files or 2+ system layers
- Architecture decision with non-obvious tradeoffs
- Debugging without a clear root cause
- New feature with downstream effects
- Security-adjacent change
- Keyword: "think hard", "complex", "architecture"
Protocol:
- Load CONTEXT_MAP (PRE-STAGE 0 from /ultraplan)
- Use
mcp__sequential__sequentialthinking for multi-step analysis (5-10 thoughts)
- Enumerate at least 2 alternative approaches before committing
- Check MEMORY.md for relevant confidence facts
- State the root cause or core decision explicitly before acting
- Route via DAG (Stage 4 mini-version): identify critical path
- Subagents if parallelizable
Quality bar: Root cause stated. Tradeoffs enumerated. Evidence collected. Two approaches considered.
Invocation: Think through the problem using sequential reasoning tool before writing any code.
Mode 3: Ultrathink (20-30 minutes)
Activate when (any of these):
- Cross-system design (frontend + backend + DevOps together)
- Architectural decision that affects >5 files or entire subsystem
- Security audit, incident response, data migration
- Strategic planning (product, revenue, go-to-market)
- Task complexity = enterprise
- Keyword: "ultrathink", "enterprise", "critical", "strategic", "design the system"
Protocol:
- Full Knowledge Synthesis — run PRE-STAGE 0 of /ultraplan (all 3 layers in parallel)
- Sequential Reasoning Chain —
mcp__sequential__sequentialthinking with 10-20 thoughts
- Multi-perspective scan — for each aspect: security, scalability, maintainability, cost
- Agent council (mini) — invoke 2-3 specialized agents for independent perspectives:
- System-architect for structural decisions
- Security-engineer for any auth/data/secrets concerns
- Performance-engineer for bottleneck analysis
- Enumerate 3+ alternatives — with explicit tradeoff matrix
- Risk assessment — T-tier assignment for every action in the plan
- DAG construction — explicit dependency graph with critical path
- KB article draft — before executing, draft the wiki/ article this will produce
- Execute via /ultraplan pipeline — all 15 stages active
Quality bar:
- ≥ 3 alternatives considered
- Tradeoff matrix populated
- Risk tier assigned to every action
- Root cause or core insight explicitly stated
- Knowledge capture planned before execution begins
Tools activated:
mcp__sequential__sequentialthinking (mandatory)
- claude-mem semantic search (mandatory)
council skill (if strategic domain)
architecture-radar skill (if infrastructure domain)
security-review skill (if security-adjacent)
Mode 4: Council (60+ minutes)
Activate when (any of these):
- Business-level decisions (pricing, strategy, market entry)
- Critical security incident
- Major architecture overhaul (entire system redesign)
- Conflicting constraints with no obvious resolution
- Keyword: "council", "full analysis", "executive decision", "bet-the-business"
Protocol:
- All ultrathink steps, plus:
- Invoke
business-panel-experts agent for strategic framing
- Invoke full
/council command — multi-expert panel (Christensen, Porter, Drucker, etc.)
- Produce a formal decision memo in
~/.claude/kb/outputs/decision_<topic>_<date>.md
- Present executive summary, 3 options, recommended path, reversibility assessment
- Require explicit user approval before any T1+ action
Quality bar:
- Decision memo produced
- ≥ 3 experts' perspectives synthesized
- Reversibility explicitly assessed
- User approval obtained before execution
Activation Map
| Signal |
Mode |
Why |
| "fix typo", "rename", "format" |
Quick |
Trivial, low risk |
| "add endpoint", "test", "refactor" |
Standard |
Contained scope |
| "think hard", "debug this", "architecture" |
Deep Think |
Tradeoffs involved |
| "ultrathink", "design the system", "critical" |
Ultrathink |
Cross-system, high stakes |
| "council", "strategic decision", "full analysis" |
Council |
Business-level, irreversible |
| task.complexity = enterprise |
Ultrathink |
Forced by intent parse |
| task.risk_level = critical |
Ultrathink |
Forced by intent parse |
| task.action_tier = T3 |
Council |
Forced by governance gate |
| keyword hook: "architect" / "design" |
Deep Think |
system-architect auto-activated |
Reasoning Scaffold (for Deep Think + Ultrathink)
Use this structure with mcp__sequential__sequentialthinking:
Thought 1: What exactly is being asked? (restate in your own words)
Thought 2: What do I already know? (CONTEXT_MAP synthesis)
Thought 3: What are the constraints? (technical, time, risk, compliance)
Thought 4: What are the 3 main approaches?
Thought 5: What are the tradeoffs of each?
Thought 6: What does prior work suggest? (MEMORY.md facts, KB wiki)
Thought 7: What is the critical decision point?
Thought 8: What is the optimal approach and why?
Thought 9: What could go wrong with that approach?
Thought 10: What is the mitigation for each risk?
Thought 11+: [domain-specific analysis as needed]
Final: State the chosen approach, expected outcome, and first action
Anti-Patterns (Never Do)
- Never apply Mode 3/4 to trivial tasks — wastes tokens and time
- Never apply Mode 0/1 to T2+ risk actions — governance violation
- Never start sequential reasoning without loading CONTEXT_MAP first
- Never skip tradeoff enumeration for architectural decisions
- Never end ultrathink without a concrete first action
- Never invoke council for decisions that don't require human approval
Integration Points
/ultraplan — ultrathink is the cognitive engine; ultraplan is the execution pipeline
governance-gate skill — risk tier determines minimum thinking mode (T2 → Deep Think, T3 → Council)
council command — Mode 4 always invokes it
mcp__sequential__sequentialthinking — mandatory for Mode 2+
- claude-mem — mandatory context load for Mode 2+
~/.claude/kb/wiki/ — output destination for knowledge captured during ultrathink
Quality Bars Summary
| Mode |
Min. Alternatives |
Sequential MCP |
Agent Council |
KB Capture |
User Approval |
| Quick |
0 |
No |
No |
No |
No |
| Standard |
0 |
No |
No |
Optional |
No |
| Deep Think |
2 |
Yes |
No |
Yes (if new) |
T2+ only |
| Ultrathink |
3 |
Yes |
2-3 agents |
Yes |
T2+ always |
| Council |
3+ |
Yes |
Full council |
Yes |
Always |
1---2name: ultrathink3description: Cognitive depth engine for Claude Code. Defines 5 thinking modes (quick → council), activation triggers, quality bars, reasoning scaffolds, and the ultrathink protocol for complex multi-domain decisions. Use when a task requires deep synthesis before action — architecture decisions, security reviews, strategic planning, cross-system design. Pairs with /ultraplan for full execution.4---56# Ultrathink — Cognitive Depth Engine78The thinking depth control system for CoreMind. Five modes, each with explicit activation criteria, quality bars, and tool bindings. Never over-think simple tasks. Never under-think critical ones.910> "Depth of thought is proportional to the cost of being wrong."1112---1314## The 5 Modes1516### Mode 0: Quick (< 30 seconds)1718**Activate when:**19- Single-file edit with clear requirements20- Lookup (docs, file contents, status check)21- Trivial bug with obvious fix22- Formatting, naming, comment update2324**Protocol:**25- No special reasoning scaffolding26- Read → act → verify in one pass27- No subagents, no planning stage28- Direct tool calls only2930**Quality bar:** Output is correct and complete. Nothing more required.3132---3334### Mode 1: Standard (1-2 minutes)3536**Activate when:**37- Multi-file change with clear requirements38- API endpoint, test generation, refactor of known pattern39- Debugging with a hypothesis already formed4041**Protocol:**42- Read relevant files before acting43- Verify understanding before each edit44- One round of self-check before delivery45- Qwen Code dispatch for L5-L6 subtasks4647**Quality bar:** No regressions, meets requirements, passes linter.4849---5051### Mode 2: Deep Think (5-10 minutes)5253**Activate when (any of these):**54- Task touches 3+ files or 2+ system layers55- Architecture decision with non-obvious tradeoffs56- Debugging without a clear root cause57- New feature with downstream effects58- Security-adjacent change59- Keyword: "think hard", "complex", "architecture"6061**Protocol:**621. Load CONTEXT_MAP (PRE-STAGE 0 from /ultraplan)632. Use `mcp__sequential__sequentialthinking` for multi-step analysis (5-10 thoughts)643. Enumerate at least 2 alternative approaches before committing654. Check MEMORY.md for relevant confidence facts665. State the root cause or core decision explicitly before acting676. Route via DAG (Stage 4 mini-version): identify critical path687. Subagents if parallelizable6970**Quality bar:** Root cause stated. Tradeoffs enumerated. Evidence collected. Two approaches considered.7172**Invocation:** Think through the problem using sequential reasoning tool before writing any code.7374---7576### Mode 3: Ultrathink (20-30 minutes)7778**Activate when (any of these):**79- Cross-system design (frontend + backend + DevOps together)80- Architectural decision that affects >5 files or entire subsystem81- Security audit, incident response, data migration82- Strategic planning (product, revenue, go-to-market)83- Task complexity = enterprise84- Keyword: "ultrathink", "enterprise", "critical", "strategic", "design the system"8586**Protocol:**871. **Full Knowledge Synthesis** — run PRE-STAGE 0 of /ultraplan (all 3 layers in parallel)882. **Sequential Reasoning Chain** — `mcp__sequential__sequentialthinking` with 10-20 thoughts893. **Multi-perspective scan** — for each aspect: security, scalability, maintainability, cost904. **Agent council (mini)** — invoke 2-3 specialized agents for independent perspectives:91 - System-architect for structural decisions92 - Security-engineer for any auth/data/secrets concerns93 - Performance-engineer for bottleneck analysis945. **Enumerate 3+ alternatives** — with explicit tradeoff matrix956. **Risk assessment** — T-tier assignment for every action in the plan967. **DAG construction** — explicit dependency graph with critical path978. **KB article draft** — before executing, draft the wiki/ article this will produce989. **Execute via /ultraplan pipeline** — all 15 stages active99100**Quality bar:**101- ≥ 3 alternatives considered102- Tradeoff matrix populated103- Risk tier assigned to every action104- Root cause or core insight explicitly stated105- Knowledge capture planned before execution begins106107**Tools activated:**108- `mcp__sequential__sequentialthinking` (mandatory)109- claude-mem semantic search (mandatory)110- `council` skill (if strategic domain)111- `architecture-radar` skill (if infrastructure domain)112- `security-review` skill (if security-adjacent)113114---115116### Mode 4: Council (60+ minutes)117118**Activate when (any of these):**119- Business-level decisions (pricing, strategy, market entry)120- Critical security incident121- Major architecture overhaul (entire system redesign)122- Conflicting constraints with no obvious resolution123- Keyword: "council", "full analysis", "executive decision", "bet-the-business"124125**Protocol:**1261. All ultrathink steps, plus:1272. Invoke `business-panel-experts` agent for strategic framing1283. Invoke full `/council` command — multi-expert panel (Christensen, Porter, Drucker, etc.)1294. Produce a formal decision memo in `~/.claude/kb/outputs/decision_<topic>_<date>.md`1305. Present executive summary, 3 options, recommended path, reversibility assessment1316. Require explicit user approval before any T1+ action132133**Quality bar:**134- Decision memo produced135- ≥ 3 experts' perspectives synthesized136- Reversibility explicitly assessed137- User approval obtained before execution138139---140141## Activation Map142143| Signal | Mode | Why |144|--------|------|-----|145| "fix typo", "rename", "format" | Quick | Trivial, low risk |146| "add endpoint", "test", "refactor" | Standard | Contained scope |147| "think hard", "debug this", "architecture" | Deep Think | Tradeoffs involved |148| "ultrathink", "design the system", "critical" | Ultrathink | Cross-system, high stakes |149| "council", "strategic decision", "full analysis" | Council | Business-level, irreversible |150| task.complexity = enterprise | Ultrathink | Forced by intent parse |151| task.risk_level = critical | Ultrathink | Forced by intent parse |152| task.action_tier = T3 | Council | Forced by governance gate |153| keyword hook: "architect" / "design" | Deep Think | system-architect auto-activated |154155---156157## Reasoning Scaffold (for Deep Think + Ultrathink)158159Use this structure with `mcp__sequential__sequentialthinking`:160161```162Thought 1: What exactly is being asked? (restate in your own words)163Thought 2: What do I already know? (CONTEXT_MAP synthesis)164Thought 3: What are the constraints? (technical, time, risk, compliance)165Thought 4: What are the 3 main approaches?166Thought 5: What are the tradeoffs of each?167Thought 6: What does prior work suggest? (MEMORY.md facts, KB wiki)168Thought 7: What is the critical decision point?169Thought 8: What is the optimal approach and why?170Thought 9: What could go wrong with that approach?171Thought 10: What is the mitigation for each risk?172Thought 11+: [domain-specific analysis as needed]173Final: State the chosen approach, expected outcome, and first action174```175176---177178## Anti-Patterns (Never Do)179180- Never apply Mode 3/4 to trivial tasks — wastes tokens and time181- Never apply Mode 0/1 to T2+ risk actions — governance violation182- Never start sequential reasoning without loading CONTEXT_MAP first183- Never skip tradeoff enumeration for architectural decisions184- Never end ultrathink without a concrete first action185- Never invoke council for decisions that don't require human approval186187---188189## Integration Points190191- `/ultraplan` — ultrathink is the cognitive engine; ultraplan is the execution pipeline192- `governance-gate` skill — risk tier determines minimum thinking mode (T2 → Deep Think, T3 → Council)193- `council` command — Mode 4 always invokes it194- `mcp__sequential__sequentialthinking` — mandatory for Mode 2+195- claude-mem — mandatory context load for Mode 2+196- `~/.claude/kb/wiki/` — output destination for knowledge captured during ultrathink197198---199200## Quality Bars Summary201202| Mode | Min. Alternatives | Sequential MCP | Agent Council | KB Capture | User Approval |203|------|------------------|----------------|---------------|------------|---------------|204| Quick | 0 | No | No | No | No |205| Standard | 0 | No | No | Optional | No |206| Deep Think | 2 | Yes | No | Yes (if new) | T2+ only |207| Ultrathink | 3 | Yes | 2-3 agents | Yes | T2+ always |208| Council | 3+ | Yes | Full council | Yes | Always |