kazuki nakai 050d5ea2ab
refactor: PEP8 compliance - directory rename and code formatting (#425)
* fix(orchestration): add WebFetch auto-trigger for infrastructure configuration

Problem: Infrastructure configuration changes (e.g., Traefik port settings)
were being made based on assumptions without consulting official documentation,
violating the 'Evidence > assumptions' principle in PRINCIPLES.md.

Solution:
- Added Infrastructure Configuration Validation section to MODE_Orchestration.md
- Auto-triggers WebFetch for infrastructure tools (Traefik, nginx, Docker, etc.)
- Enforces MODE_DeepResearch activation for investigation
- BLOCKS assumption-based configuration changes

Testing: Verified WebFetch successfully retrieves Traefik official docs (port 80 default)

This prevents production outages from infrastructure misconfiguration by ensuring
all technical recommendations are backed by official documentation.

* feat: Add PM Agent (Project Manager Agent) for seamless orchestration

Introduces PM Agent as the default orchestration layer that coordinates
all sub-agents and manages workflows automatically.

Key Features:
- Default orchestration: All user interactions handled by PM Agent
- Auto-delegation: Intelligent sub-agent selection based on task analysis
- Docker Gateway integration: Zero-token baseline with dynamic MCP loading
- Self-improvement loop: Automatic documentation of patterns and mistakes
- Optional override: Users can specify sub-agents explicitly if desired

Architecture:
- Agent spec: SuperClaude/Agents/pm-agent.md
- Command: SuperClaude/Commands/pm.md
- Updated docs: README.md (15→16 agents), agents.md (new Orchestration category)

User Experience:
- Default: PM Agent handles everything (seamless, no manual routing)
- Optional: Explicit --agent flag for direct sub-agent access
- Both modes available simultaneously (no user downside)

Implementation Status:
-  Specification complete
-  Documentation complete
-  Prototype implementation needed
-  Docker Gateway integration needed
-  Testing and validation needed

Refs: kazukinakai/docker-mcp-gateway (IRIS MCP Gateway integration)

* feat: Add Agent Orchestration rules for PM Agent default activation

Implements PM Agent as the default orchestration layer in RULES.md.

Key Changes:
- New 'Agent Orchestration' section (CRITICAL priority)
- PM Agent receives ALL user requests by default
- Manual override with @agent-[name] bypasses PM Agent
- Agent Selection Priority clearly defined:
  1. Manual override → Direct routing
  2. Default → PM Agent → Auto-delegation
  3. Delegation based on keywords, file types, complexity, context

User Experience:
- Default: PM Agent handles everything (seamless)
- Override: @agent-[name] for direct specialist access
- Transparent: PM Agent reports delegation decisions

This establishes PM Agent as the orchestration layer while
respecting existing auto-activation patterns and manual overrides.

Next Steps:
- Local testing in agiletec project
- Iteration based on actual behavior
- Documentation updates as needed

* refactor(pm-agent): redesign as self-improvement meta-layer

Problem Resolution:
PM Agent's initial design competed with existing auto-activation for task routing,
creating confusion about orchestration responsibilities and adding unnecessary complexity.

Design Change:
Redefined PM Agent as a meta-layer agent that operates AFTER specialist agents
complete tasks, focusing on:
- Post-implementation documentation and pattern recording
- Immediate mistake analysis with prevention checklists
- Monthly documentation maintenance and noise reduction
- Pattern extraction and knowledge synthesis

Two-Layer Orchestration System:
1. Task Execution Layer: Existing auto-activation handles task routing (unchanged)
2. Self-Improvement Layer: PM Agent meta-layer handles documentation (new)

Files Modified:
- SuperClaude/Agents/pm-agent.md: Complete rewrite with meta-layer design
  - Category: orchestration → meta
  - Triggers: All user interactions → Post-implementation, mistakes, monthly
  - Behavioral Mindset: Continuous learning system
  - Self-Improvement Workflow: BEFORE/DURING/AFTER/MISTAKE RECOVERY/MAINTENANCE

- SuperClaude/Core/RULES.md: Agent Orchestration section updated
  - Split into Task Execution Layer + Self-Improvement Layer
  - Added orchestration flow diagram
  - Clarified PM Agent activates AFTER task completion

- README.md: Updated PM Agent description
  - "orchestrates all interactions" → "ensures continuous learning"

- Docs/User-Guide/agents.md: PM Agent section rewritten
  - Section: Orchestration Agent → Meta-Layer Agent
  - Expertise: Project orchestration → Self-improvement workflow executor
  - Examples: Task coordination → Post-implementation documentation

- PR_DOCUMENTATION.md: Comprehensive PR documentation added
  - Summary, motivation, changes, testing, breaking changes
  - Two-layer orchestration system diagram
  - Verification checklist

Integration Validated:
Tested with agiletec project's self-improvement-workflow.md:
 PM Agent aligns with existing BEFORE/DURING/AFTER/MISTAKE RECOVERY phases
 Complements (not competes with) existing workflow
 agiletec workflow defines WHAT, PM Agent defines WHO executes it

Breaking Changes: None
- Existing auto-activation continues unchanged
- Specialist agents unaffected
- User workflows remain the same
- New capability: Automatic documentation and knowledge maintenance

Value Proposition:
Transforms SuperClaude into a continuously learning system that accumulates
knowledge, prevents recurring mistakes, and maintains fresh documentation
without manual intervention.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: add Claude Code conversation history management research

Research covering .jsonl file structure, performance impact, and retention policies.

Content:
- Claude Code .jsonl file format and message types
- Performance issues from GitHub (memory leaks, conversation compaction)
- Retention policies (consumer vs enterprise)
- Rotation recommendations based on actual data
- File history snapshot tracking mechanics

Source: Moved from agiletec project (research applicable to all Claude Code projects)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: add Development documentation structure

Phase 1: Documentation Structure complete

- Add Docs/Development/ directory for development documentation
- Add ARCHITECTURE.md - System architecture with PM Agent meta-layer
- Add ROADMAP.md - 5-phase development plan with checkboxes
- Add TASKS.md - Daily task tracking with progress indicators
- Add PROJECT_STATUS.md - Current status dashboard and metrics
- Add pm-agent-integration.md - Implementation guide for PM Agent mode

This establishes comprehensive documentation foundation for:
- System architecture understanding
- Development planning and tracking
- Implementation guidance
- Progress visibility

Related: #pm-agent-mode #documentation #phase-1

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat: PM Agent session lifecycle and PDCA implementation

Phase 2: PM Agent Mode Integration (Design Phase)

Commands/pm.md updates:
- Add "Always-Active Foundation Layer" concept
- Add Session Lifecycle (Session Start/During Work/Session End)
- Add PDCA Cycle (Plan/Do/Check/Act) automation
- Add Serena MCP Memory Integration (list/read/write_memory)
- Document auto-activation triggers

Agents/pm-agent.md updates:
- Add Session Start Protocol (MANDATORY auto-activation)
- Add During Work PDCA Cycle with example workflows
- Add Session End Protocol with state preservation
- Add PDCA Self-Evaluation Pattern
- Add Documentation Strategy (temp → patterns/mistakes)
- Add Memory Operations Reference

Key Features:
- Session start auto-activation for context restoration
- 30-minute checkpoint saves during work
- Self-evaluation with think_about_* operations
- Systematic documentation lifecycle
- Knowledge evolution to CLAUDE.md

Implementation Status:
-  Design complete (Commands/pm.md, Agents/pm-agent.md)
-  Implementation pending (Core components)
-  Serena MCP integration pending

Salvaged from mistaken development in ~/.claude directory

Related: #pm-agent-mode #session-lifecycle #pdca-cycle #phase-2

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: disable Serena MCP auto-browser launch

Disable web dashboard and GUI log window auto-launch in Serena MCP server
to prevent intrusive browser popups on startup. Users can still manually
access the dashboard at http://localhost:24282/dashboard/ if needed.

Changes:
- Add CLI flags to Serena run command:
  - --enable-web-dashboard false
  - --enable-gui-log-window false
- Ensures Git-tracked configuration (no reliance on ~/.serena/serena_config.yml)
- Aligns with AIRIS MCP Gateway integration approach

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: rename directories to lowercase for PEP8 compliance

- Rename superclaude/Agents -> superclaude/agents
- Rename superclaude/Commands -> superclaude/commands
- Rename superclaude/Core -> superclaude/core
- Rename superclaude/Examples -> superclaude/examples
- Rename superclaude/MCP -> superclaude/mcp
- Rename superclaude/Modes -> superclaude/modes

This change follows Python PEP8 naming conventions for package directories.

* style: fix PEP8 violations and update package name to lowercase

Changes:
- Format all Python files with black (43 files reformatted)
- Update package name from 'SuperClaude' to 'superclaude' in pyproject.toml
- Fix import statements to use lowercase package name
- Add missing imports (timedelta, __version__)
- Remove old SuperClaude.egg-info directory

PEP8 violations reduced from 2672 to 701 (mostly E501 line length due to black's 88 char vs flake8's 79 char limit).

* docs: add PM Agent development documentation

Add comprehensive PM Agent development documentation:
- PM Agent ideal workflow (7-phase autonomous cycle)
- Project structure understanding (Git vs installed environment)
- Installation flow understanding (CommandsComponent behavior)
- Task management system (current-tasks.md)

Purpose: Eliminate repeated explanations and enable autonomous PDCA cycles

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(pm-agent): add self-correcting execution and warning investigation culture

## Changes

### superclaude/commands/pm.md
- Add "Self-Correcting Execution" section with root cause analysis protocol
- Add "Warning/Error Investigation Culture" section enforcing zero-tolerance for dismissal
- Define error detection protocol: STOP → Investigate → Hypothesis → Different Solution → Execute
- Document anti-patterns (retry without understanding) and correct patterns (research-first)

### docs/Development/hypothesis-pm-autonomous-enhancement-2025-10-14.md
- Add PDCA workflow hypothesis document for PM Agent autonomous enhancement

## Rationale

PM Agent must never retry failed operations without understanding root causes.
All warnings and errors require investigation via context7/WebFetch/documentation
to ensure production-quality code and prevent technical debt accumulation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(installer): add airis-mcp-gateway MCP server option

## Changes

- Add airis-mcp-gateway to MCP server options in installer
- Configuration: GitHub-based installation via uvx
- Repository: https://github.com/oraios/airis-mcp-gateway
- Purpose: Dynamic MCP Gateway for zero-token baseline and on-demand tool loading

## Implementation

Added to setup/components/mcp.py self.mcp_servers dictionary with:
- install_method: github
- install_command: uvx test installation
- run_command: uvx runtime execution
- required: False (optional server)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: kazuki <kazuki@kazukinoMacBook-Air.local>
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-14 08:47:09 +05:30

28 KiB

SuperClaude Behavioral Modes Guide 🧠

Quick Verification

Test modes by using /sc: commands - they activate automatically based on task complexity. For full command reference, see Commands Guide.

Quick Reference Table

Mode Purpose Auto-Triggers Key Behaviors Best Used For
🧠 Brainstorming Interactive discovery "brainstorm", "maybe", vague requests Socratic questions, requirement elicitation New project planning, unclear requirements
🔍 Introspection Meta-cognitive analysis Error recovery, "analyze reasoning" Transparent thinking markers (🤔, 🎯, 💡) Debugging, learning, optimization
🔬 Deep Research Systematic investigation mindset /sc:research, investigation keywords 6-phase workflow, evidence-based reasoning Technical research, current events, market analysis
📋 Task Management Complex coordination >3 steps, >2 directories Phase breakdown, memory persistence Multi-step operations, project management
🎯 Orchestration Intelligent tool selection Multi-tool ops, high resource usage Optimal tool routing, parallel execution Complex analysis, performance optimization
Token Efficiency Compressed communication High context usage, --uc flag Symbol systems, estimated 30-50% token reduction Resource constraints, large operations

Getting Started (2-Minute Overview)

Modes activate through behavioral instructions - Claude Code reads context files to determine which mode behaviors to adopt based on your task patterns and complexity.

Quick Examples:

# Automatic activation examples
/sc:brainstorm "mobile app"        # → Socratic discovery questions
/sc:implement "auth system"        # → Multi-phase coordination  
"--uc analyze large-codebase/"     # → Compressed symbol output

When to use manual flags:

  • Need specific behavior: --brainstorm, --introspect, --uc
  • Override automatic detection for learning/debugging
  • Optimize for specific constraints (memory, time, clarity)

Mode Details

🧠 Brainstorming Mode - Interactive Discovery

Purpose: Transform vague ideas into structured requirements through collaborative discovery.

Auto-Activation Triggers:

  • Vague project requests: "I want to build...", "Thinking about creating..."
  • Exploration keywords: brainstorm, explore, discuss, figure out, not sure
  • Uncertainty indicators: "maybe", "possibly", "could we"
  • Manual flags: --brainstorm, --bs

Behavioral Changes:

  • Socratic Questioning: Asks probing questions to uncover hidden requirements
  • Non-Presumptive Approach: Avoids assumptions, lets you guide discovery direction
  • Collaborative Partnership: Works with you in exploration rather than directive consultation
  • Requirement Synthesis: Converts insights into structured technical briefs
  • Cross-Session Memory: Maintains discovery context for follow-up discussions

Example Experience:

Standard Approach: "I'll build a user authentication system with JWT tokens..."
Brainstorming Approach: 
"🤔 Let's explore this together:
 - What specific user problems does auth solve for your app?
 - Who are your users and what's their technical comfort level?  
 - Any existing systems or social logins to integrate with?
 - What security/compliance requirements do you have?
 📝 Outcome: Detailed auth requirements brief ready for implementation"

Success Criteria

  • Responds with questions instead of immediate solutions
  • Questions explore user needs, technical constraints, and business goals
  • Maintains collaborative tone throughout discovery process
  • Produces structured requirements or technical brief as outcome

Verify: /sc:brainstorm "web app" should ask about users, features, technology
Test: Vague requests should trigger discovery questions, not assumptions
Check: Mode should persist across follow-up questions in same conversation

Works Best With:

  • → Task Management: Requirements discovery → systematic implementation planning
  • → Orchestration: Requirements clarity → optimal tool selection for implementation
  • Manual Override: Use --brainstorm to force discovery even for "clear" requirements

🔍 Introspection Mode - Meta-Cognitive Analysis

Purpose: Expose reasoning process for learning optimization and transparent decision-making.

Auto-Activation Triggers:

  • Self-analysis requests: "analyze my reasoning", "reflect on decision"
  • Error recovery scenarios and unexpected results requiring investigation
  • Complex problem solving with multiple viable approaches
  • Pattern recognition needs for optimization opportunities
  • Manual flag: --introspect

Behavioral Changes:

  • Reasoning Transparency: Exposes thinking process with clear markers (🤔, 🎯, , 📊, 💡)
  • Decision Analysis: Evaluates choice logic and considers alternative approaches
  • Pattern Recognition: Identifies recurring behaviors and improvement opportunities
  • Meta-Learning: Extracts insights for continuous framework improvement
  • Framework Compliance: Validates actions against SuperClaude principles and quality gates

Example Experience:

Standard Approach: "I'll analyze this code structure and suggest improvements..."
Introspective Approach:
"🧠 Meta-Analysis: Why did I choose structural analysis over functional flow?
 🎯 Decision Logic: Saw class hierarchy → assumed OOP pattern dominance
 🔄 Alternative Considered: Data flow analysis might reveal hidden dependencies
 📊 Evidence Check: File imports suggest functional composition, not OOP
 💡 Learning: Need to analyze imports before choosing analysis strategy
 ⚡ Correction: Switching to functional flow analysis approach"

Works Best With:

  • → Task Management: Provides transparent reasoning for complex phase decisions
  • Any Mode: Adds reasoning transparency layer to any other mode's operation
  • Manual Override: Use --introspect for learning sessions and debugging workflows

🔬 Deep Research Mode - Systematic Investigation Mindset

Purpose: Research mindset for systematic investigation and evidence-based reasoning.

Auto-Activation Triggers:

  • /sc:research command invocation
  • Research-related keywords: investigate, explore, discover, analyze
  • Questions requiring current information beyond knowledge cutoff
  • Complex research requirements
  • Manual flag: --research

Behavioral Modifications:

  • Thinking Style: Systematic over casual, evidence over assumption, progressive depth exploration
  • Communication: Lead with confidence levels, provide inline citations, acknowledge uncertainties
  • Priority Shifts: Completeness over speed, accuracy over speculation, verification over assumption
  • Process Adaptations: Always create investigation plans, default to parallel operations, maintain evidence chains

6-Phase Research Workflow:

  • 📋 Understand (5-10%): Assess query complexity and requirements
  • 📝 Plan (10-15%): Select strategy (planning/intent/unified) and identify parallelization
  • TodoWrite (5%): Create adaptive task hierarchy (3-15 tasks based on complexity)
  • 🔄 Execute (50-60%): Parallel-first searches and smart extraction routing
  • 📊 Track (Continuous): Monitor progress and update confidence scores
  • Validate (10-15%): Verify evidence chains and ensure completeness

Example Experience:

Standard Mode: "Here are some search results about quantum computing..."
Deep Research Mode: 
"📊 Research Plan: Quantum computing breakthroughs
 ✓ TodoWrite: Created 8 research tasks
 🔄 Executing parallel searches across domains
 📈 Confidence: 0.82 across 15 verified sources
 📝 Report saved: claudedocs/research_quantum_[timestamp].md"

Quality Standards

  • Minimum 2 sources per claim with inline citations
  • Confidence scoring (0.0-1.0) for all findings
  • Parallel execution by default for independent operations
  • Reports saved to claudedocs/ with proper structure
  • Clear methodology and evidence presentation

Verify: /sc:research "test topic" should create TodoWrite and execute systematically
Test: All research should include confidence scores and citations
Check: Reports should be saved to claudedocs/ automatically

Works Best With:

  • → Task Management: Research planning with TodoWrite integration
  • → Orchestration: Parallel Tavily/Playwright coordination
  • Manual Override: Use --depth and --strategy for fine control

📋 Task Management Mode - Complex Coordination

Purpose: Hierarchical task organization with session persistence for multi-step operations.

Auto-Activation Triggers:

  • Operations requiring >3 coordinated steps
  • Multiple file/directory scope (>2 directories OR >3 files)
  • Complex dependencies requiring phases and checkpoints
  • Quality improvement requests: polish, refine, enhance
  • Manual flags: --task-manage, --delegate

Behavioral Changes:

  • Hierarchical Planning: Breaks complex work into Plan → Phase → Task → Todo structure
  • Session Persistence: Maintains project context and progress across interruptions
  • Memory Integration: Uses write_memory/read_memory for state preservation
  • Progress Orchestration: Coordinates TodoWrite with memory updates for tracking
  • Quality Gates: Implements systematic validation checkpoints between phases

Example Experience:

Standard Approach: "I'll implement user authentication..." → Direct implementation
Task Management Approach:
"📋 Multi-Phase Implementation Plan:
 🎯 Phase 1: Security Requirements Analysis (Session 1)
 🎯 Phase 2: API Design & Documentation (Session 2)  
 🎯 Phase 3: Implementation & Testing (Session 3-4)
 🎯 Phase 4: Integration & Validation (Session 5)
 💾 Session persistence: Resume context automatically
 ✓ Quality gates: Validation before each phase transition"

Works Best With:

  • Brainstorming →: Requirements discovery then systematic implementation
  • + Orchestration: Task coordination with optimal tool selection
  • + Introspection: Transparent reasoning for complex phase decisions

🎯 Orchestration Mode - Intelligent Tool Selection

Purpose: Optimize task execution through intelligent tool routing and parallel coordination.

Auto-Activation Triggers:

  • Multi-tool operations requiring sophisticated coordination
  • Performance constraints (high resource usage)
  • Parallel execution opportunities (>3 independent files/operations)
  • Complex routing decisions with multiple valid tool approaches

Behavioral Changes:

  • Intelligent Tool Routing: Selects optimal MCP servers and native tools for each task type
  • Resource Awareness: Adapts approach based on system constraints and availability
  • Parallel Optimization: Identifies independent operations for concurrent execution
  • Coordination Focus: Optimizes tool selection and usage through coordinated execution
  • Adaptive Fallback: Switches tools gracefully when preferred options are unavailable

Example Experience:

Standard Approach: Sequential file-by-file analysis and editing
Orchestration Approach:
"🎯 Multi-Tool Coordination Strategy:
 🔍 Phase 1: Serena (semantic analysis) + Sequential (architecture review)
 ⚡ Phase 2: Morphllm (pattern edits) + Magic (UI components) 
 🧪 Phase 3: Playwright (testing) + Context7 (documentation patterns)
 🔄 Parallel execution: 3 tools working simultaneously
\"

Works Best With:

  • Task Management →: Provides tool coordination for complex multi-phase plans
  • + Token Efficiency: Optimal tool selection with compressed communication
  • Any Complex Task: Adds intelligent tool routing to enhance execution

Token Efficiency Mode - Compressed Communication

Purpose: Achieve estimated 30-50% token reduction through symbol systems while preserving information quality.

Auto-Activation Triggers:

  • High context usage approaching limits
  • Large-scale operations requiring resource efficiency
  • User explicit flags: --uc, --ultracompressed
  • Complex analysis workflows with multiple outputs

Behavioral Changes:

  • Symbol Communication: Uses visual symbols for logic flows, status, and technical domains
  • Technical Abbreviation: Context-aware compression for repeated technical terms
  • Structured Density: Bullet points, tables, and concise formatting over verbose paragraphs
  • Information Preservation: Maintains ≥95% information quality despite compression
  • Structured Format: Organized for clarity and task completion

Example Experience:

Standard Approach: "The authentication system implementation shows a security vulnerability in the user validation function that needs immediate attention..."
Token Efficient Approach:
"🛡️ Security Alert:
 auth.js:45 → user val() → critical vuln
 📊 Impact: ❌ token bypass possible
 ⚡ Action: fix validation + audit ∵ high sev
 🔧 Est: 2h impl + 1h test"

Works Best With:

  • Any Mode: Adds compression layer while preserving mode-specific behaviors
  • Orchestration →: Compressed tool coordination and status updates
  • Manual Override: Use --uc when context pressure or efficiency is priority

🎨 Standard Mode - Balanced Default

Purpose: Provide clear, professional communication for straightforward development tasks.

Auto-Activation Triggers:

  • Simple, well-defined tasks without complexity indicators
  • Single-file operations with clear requirements
  • Basic explanations and standard development workflows
  • No other mode triggers detected (default fallback)

Behavioral Changes:

  • Professional Communication: Clear, concise technical language without compression
  • Moderate Detail: Balanced information depth suitable for most development tasks
  • Standard Tool Selection: Uses native Claude capabilities and basic tools
  • Quality Focus: Maintains code quality without complex orchestration overhead
  • Responsive Adaptation: Ready to switch to specialized modes when complexity increases

Example Experience:

Standard Approach: Consistent, professional baseline for all tasks
"I'll implement the login function with proper error handling:
 
 1. Validate user input (email format, password requirements)
 2. Authenticate against database with secure hashing
 3. Generate JWT token with appropriate expiration
 4. Return success response with user data
 
 The implementation will follow security best practices and include comprehensive error handling."

Works Best With:

  • → Any Mode: Serves as baseline that other modes enhance
  • Mode Switching: Automatically escalates to specialized modes when needed
  • Clarity Priority: When straightforward communication is more important than optimization

Advanced Usage

Mode Combinations

Multi-Mode Workflows:

# Discovery → Planning → Implementation
/sc:brainstorm "microservices architecture" --task-manage
# → Brainstorming: requirement discovery
# → Task Management: multi-phase coordination

# Analysis with transparency and efficiency
/sc:analyze legacy-system/ --introspect --uc
# → Introspection: transparent reasoning
# → Token Efficiency: compressed output

Manual Mode Control

Force Specific Behaviors:

  • --brainstorm: Force collaborative discovery for any task
  • --introspect: Add reasoning transparency to any mode
  • --task-manage: Enable hierarchical coordination
  • --orchestrate: Optimize tool selection and parallel execution
  • --uc: Compress communication for efficiency

Override Examples:

# Force brainstorming on "clear" requirements
/sc:implement "user login" --brainstorm

# Add reasoning transparency to debugging
# Debug authentication issue with transparent reasoning

# Enable task management for simple operations
# Update styles.css with systematic task management

Mode Boundaries and Priority

When Modes Activate:

  1. Complexity Threshold: >3 files → Task Management
  2. Resource Pressure: High context usage → Token Efficiency
  3. Multi-Tool Need: Complex analysis → Orchestration
  4. Uncertainty: Vague requirements → Brainstorming
  5. Error Recovery: Problems → Introspection

Priority Rules:

  • Safety First: Quality and validation always override efficiency
  • User Intent: Manual flags override automatic detection
  • Context Adaptation: Modes stack based on complexity
  • Resource Management: Efficiency modes activate under pressure

Real-World Examples

Complete Workflow Examples

New Project Development:

# Phase 1: Discovery (Brainstorming Mode auto-activates)
"I want to build a productivity app"
→ 🤔 Socratic questions about users, features, platform choice
→ 📝 Structured requirements brief

# Phase 2: Planning (Task Management Mode auto-activates)  
/sc:implement "core productivity features"
→ 📋 Multi-phase breakdown with dependencies
→ 🎯 Phase coordination with quality gates

# Phase 3: Implementation (Orchestration Mode coordinates tools)
/sc:implement "frontend and backend systems"
→ 🎯 Magic (UI) + Context7 (patterns) + Sequential (architecture)
→ ⚡ Parallel execution optimization

Debugging Complex Issues:

# Problem analysis (Introspection Mode auto-activates)
"Users getting intermittent auth failures"
→ 🤔 Transparent reasoning about potential causes
→ 🎯 Hypothesis formation and evidence gathering
→ 💡 Pattern recognition across similar issues

# Systematic resolution (Task Management coordinates)
# Fix authentication system comprehensively
→ 📋 Phase 1: Root cause analysis
→ 📋 Phase 2: Solution implementation  
→ 📋 Phase 3: Testing and validation

Mode Combination Patterns

High-Complexity Scenarios:

# Large refactoring with multiple constraints
/sc:improve legacy-system/ --introspect --uc --orchestrate
→ 🔍 Transparent reasoning (Introspection)
→ ⚡ Compressed communication (Token Efficiency)  
→ 🎯 Optimal tool coordination (Orchestration)
→ 📋 Systematic phases (Task Management auto-activates)

Quick Reference

Mode Activation Patterns

Trigger Type Example Input Mode Activated Key Behavior
Vague Request "I want to build an app" 🧠 Brainstorming Socratic discovery questions
Complex Scope >3 files or >2 directories 📋 Task Management Phase coordination
Multi-Tool Need Analysis + Implementation 🎯 Orchestration Tool optimization
Error Recovery "This isn't working as expected" 🔍 Introspection Transparent reasoning
Resource Pressure High context usage Token Efficiency Symbol compression
Simple Task "Fix this function" 🎨 Standard Clear, direct approach

Manual Override Commands

# Force specific mode behaviors
/sc:command --brainstorm    # Collaborative discovery
/sc:command --introspect    # Reasoning transparency
/sc:command --task-manage   # Hierarchical coordination
/sc:command --orchestrate   # Tool optimization
/sc:command --uc           # Token compression

# Combine multiple modes
/sc:command --introspect --uc    # Transparent + efficient
/sc:command --task-manage --orchestrate  # Coordinated + optimized

Troubleshooting

For troubleshooting help, see:

Common Issues

  • Mode not activating: Use manual flags: --brainstorm, --introspect, --uc
  • Wrong mode active: Check complexity triggers and keywords in request
  • Mode switching unexpectedly: Normal behavior based on task evolution
  • Execution impact: Modes optimize tool usage, shouldn't affect execution
  • Mode conflicts: Check flag priority rules in Flags Guide

Immediate Fixes

  • Force specific mode: Use explicit flags like --brainstorm or --task-manage
  • Reset mode behavior: Restart Claude Code session to reset mode state
  • Check mode indicators: Look for 🤔, 🎯, 📋 symbols in responses
  • Verify complexity: Simple tasks use Standard mode, complex tasks auto-switch

Mode-Specific Troubleshooting

Brainstorming Mode Issues:

# Problem: Mode gives solutions instead of asking questions
# Quick Fix: Check request clarity and use explicit flag
/sc:brainstorm "web app" --brainstorm         # Force discovery mode
"I have a vague idea about..."                # Use uncertainty language
"Maybe we could build..."                     # Trigger exploration

Task Management Mode Issues:

# Problem: Simple tasks getting complex coordination
# Quick Fix: Reduce scope or use simpler commands
/sc:implement "function" --no-task-manage     # Disable coordination
/sc:troubleshoot bug.js                       # Use basic commands
# Check if task really is complex (>3 files, >2 directories)

Token Efficiency Mode Issues:

# Problem: Output too compressed or unclear
# Quick Fix: Disable compression for clarity
/sc:command --no-uc                           # Disable compression
/sc:command --verbose                         # Force detailed output
# Use when clarity is more important than efficiency

Introspection Mode Issues:

# Problem: Too much meta-commentary, not enough action
# Quick Fix: Disable introspection for direct work
/sc:command --no-introspect                   # Direct execution
# Use introspection only for learning and debugging

Orchestration Mode Issues:

# Problem: Tool coordination causing confusion
# Quick Fix: Simplify tool usage
/sc:command --no-mcp                          # Native tools only
/sc:command --simple                          # Basic execution
# Check if task complexity justifies orchestration

Error Code Reference

Mode Error Meaning Quick Fix
B001 Brainstorming failed to activate Use explicit --brainstorm flag
T001 Task management overhead Use --no-task-manage for simple tasks
U001 Token efficiency too aggressive Use --verbose or --no-uc
I001 Introspection mode stuck Use --no-introspect for direct action
O001 Orchestration coordination failed Use --no-mcp or --simple
M001 Mode conflict detected Check flag priority rules
M002 Mode switching loop Restart session to reset state
M003 Mode not recognized Update SuperClaude or check spelling

Progressive Support Levels

Level 1: Quick Fix (< 2 min)

  • Use manual flags to override automatic mode selection
  • Check if task complexity matches expected mode behavior
  • Try restarting Claude Code session

Level 2: Detailed Help (5-15 min)

# Mode-specific diagnostics
/sc:help modes                            # List all available modes
/sc:reflect --type mode-status            # Check current mode state
# Review request complexity and triggers

Level 3: Expert Support (30+ min)

# Deep mode analysis
SuperClaude install --diagnose
# Check mode activation patterns
# Review behavioral triggers and thresholds

Level 4: Community Support

  • Report mode issues at GitHub Issues
  • Include examples of unexpected mode behavior
  • Describe desired vs actual mode activation

Success Validation

After applying mode fixes, test with:

  • Simple requests use Standard mode (clear, direct responses)
  • Complex requests auto-activate appropriate modes (coordination, reasoning)
  • Manual flags override automatic detection correctly
  • Mode indicators (🤔, 🎯, 📋) appear when expected
  • Performance remains good across different modes

Quick Troubleshooting (Legacy)

  • Mode not activating → Use manual flags: --brainstorm, --introspect, --uc
  • Wrong mode active → Check complexity triggers and keywords in request
  • Mode switching unexpectedly → Normal behavior based on task evolution
  • Execution impact → Modes optimize tool usage, shouldn't affect execution
  • Mode conflicts → Check flag priority rules in Flags Guide

Frequently Asked Questions

Q: How do I know which mode is active? A: Look for these indicators in communication patterns:

  • 🤔 Discovery questions → Brainstorming
  • 🎯 Reasoning transparency → Introspection
  • Phase breakdowns → Task Management
  • Tool coordination → Orchestration
  • Symbol compression → Token Efficiency

Q: Can I force specific modes? A: Yes, use manual flags to override automatic detection:

/sc:command --brainstorm     # Force discovery
/sc:command --introspect     # Add transparency
/sc:command --task-manage    # Enable coordination
/sc:command --uc            # Compress output

Q: Do modes affect execution? A: Modes optimize tool usage through coordination:

  • Token Efficiency: 30-50% context reduction
  • Orchestration: Parallel processing
  • Task Management: Prevents rework through systematic planning

Q: Can modes work together? A: Yes, modes are designed to complement each other:

  • Task Management coordinates other modes
  • Token Efficiency compresses any mode's output
  • Introspection adds transparency to any workflow

Summary

SuperClaude's 5 behavioral modes create an intelligent adaptation system that matches your needs automatically:

  • 🧠 Brainstorming: Transforms vague ideas into clear requirements
  • 🔍 Introspection: Provides transparent reasoning for learning and debugging
  • 📋 Task Management: Coordinates complex multi-step operations
  • 🎯 Orchestration: Optimizes tool selection and parallel execution
  • Token Efficiency: Compresses communication while preserving clarity
  • 🎨 Standard: Maintains professional baseline for straightforward tasks

The key insight: You don't need to think about modes - they work transparently to enhance your development experience. Simply describe what you want to accomplish, and SuperClaude automatically adapts its approach to match your needs.


Learning Progression:

🌱 Essential (Week 1)

🌿 Intermediate (Week 2-3)

🌲 Advanced (Month 2+)

🔧 Expert

Mode-Specific Guides: