- Restructured core framework components - Added new Agents, MCP servers, and Modes documentation - Introduced SuperClaude-Lite minimal implementation - Enhanced Commands with session management capabilities - Added comprehensive Hooks system with Python integration - Removed legacy setup and profile components - Updated .gitignore to exclude Tests/, ClaudeDocs/, and .serena/ - Consolidated configuration into SuperClaude/Config/ - Added Templates for consistent component creation This is the initial commit for the V4 Beta branch containing all recent framework improvements and architectural changes. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
7.8 KiB
SuperClaude Architecture Overview
Introduction
SuperClaude v3 is a comprehensive framework that extends Claude Code with specialized commands, intelligent routing, and MCP server integration for advanced development workflows. The framework has evolved from a Python-based implementation to a markdown-driven orchestration system that emphasizes configuration over code.
Core Philosophy
SuperClaude operates as an orchestration layer that:
- Enhances Claude Code with 21 specialized slash commands for common development tasks
- Integrates 6 MCP servers for extended capabilities (Context7, Sequential, Magic, Playwright, Morphllm, Serena)
- Provides intelligent routing and persona-based task execution
- Enables sophisticated development workflows through declarative configuration
Architecture Layers
1. Framework Core (SuperClaude/Core/)
The framework core consists of markdown documents installed to ~/.claude/ that guide Claude's behavior:
- CLAUDE.md: Entry point that references all framework components
- FLAGS.md: Behavior modification flags (--think, --delegate, --uc, etc.)
- PRINCIPLES.md: Core development principles and philosophy
- RULES.md: Actionable rules for framework operation
- ORCHESTRATOR.md: Intelligent routing system for tool and persona selection
- SESSION_LIFECYCLE.md: Session management patterns with Serena MCP integration
2. Commands Layer (SuperClaude/Commands/)
21 slash commands organized by category:
Utility Commands (Basic Complexity)
/sc:analyze- Code analysis and insights/sc:build- Project building and packaging/sc:design- Technical design generation/sc:document- Documentation creation/sc:git- Git operations and workflows/sc:test- Test execution and analysis/sc:troubleshoot- Problem diagnosis
Workflow Commands (Standard Complexity)
/sc:cleanup- Code cleanup and optimization/sc:estimate- Effort estimation/sc:explain- Code explanation/sc:implement- Feature implementation/sc:improve- Code enhancement/sc:index- Project indexing
Orchestration Commands (Advanced Complexity)
/sc:brainstorm- Interactive requirements discovery/sc:task- Multi-session task management/sc:workflow- Complex workflow orchestration
Special Commands (High Complexity)
/sc:spawn- Meta-orchestration for complex operations/sc:select-tool- Intelligent tool selection
Session Commands (Cross-Session)
/sc:load- Project context loading with Serena/sc:save- Session persistence and checkpointing/sc:reflect- Task reflection and validation
3. MCP Server Integration (SuperClaude/MCP/)
Six specialized MCP servers provide extended capabilities:
- Context7: Official library documentation and patterns
- Sequential: Multi-step problem solving and analysis
- Magic: UI component generation and design systems
- Playwright: Browser automation and E2E testing
- Morphllm: Intelligent file editing with Fast Apply
- Serena: Semantic code analysis and memory management
4. Behavioral Modes (SuperClaude/Modes/)
Four behavioral modes that modify Claude's operational approach:
- Brainstorming Mode: Interactive requirements discovery
- Introspection Mode: Meta-cognitive analysis
- Task Management Mode: Multi-layer task orchestration
- Token Efficiency Mode: Intelligent compression (30-50% reduction)
5. Agent System (SuperClaude/Agents/)
12 specialized agents organized by domain:
Analysis Agents
security-auditor: Security vulnerability detectionroot-cause-analyzer: Systematic issue investigationperformance-optimizer: Performance bottleneck resolution
Design Agents
system-architect: System design and architecturebackend-engineer: Backend development expertisefrontend-specialist: Frontend and UI development
Quality Agents
qa-specialist: Testing strategy and executioncode-refactorer: Code quality improvement
Education Agents
technical-writer: Documentation creationcode-educator: Programming education
Infrastructure Agents
devops-engineer: Infrastructure and deployment
Special Agents
brainstorm-PRD: Requirements to PRD transformation
6. Hooks System (SuperClaude/Hooks/)
Python-based hooks for framework integration:
- session_lifecycle: Session start/checkpoint/end management
- performance_monitor: Real-time performance tracking
- quality_gates: 8-step validation cycle
- framework_coordinator: Framework component coordination
Key Integration Patterns
1. Command-MCP Integration
Commands declare MCP server requirements in metadata:
mcp-integration:
servers: [serena, morphllm]
personas: [backend-engineer]
wave-enabled: true
2. Mode-Command Coordination
Modes provide behavioral frameworks, commands provide execution:
- Brainstorming Mode detects ambiguous requests
/sc:brainstormcommand executes discovery dialogue- Mode patterns applied throughout execution
3. Intelligent Routing
The ORCHESTRATOR.md provides routing logic:
pattern_matching:
ui_component → Magic + frontend persona
deep_analysis → Sequential + think modes
symbol_operations → Serena + LSP precision
pattern_edits → Morphllm + token optimization
4. Session Lifecycle Pattern
/sc:load → WORK → /sc:save → NEXT SESSION
↑ ↓
└────── Enhanced Context ───────┘
Performance Architecture
Target Metrics
- Memory operations: <200ms
- Project loading: <500ms
- Tool selection: <100ms
- Session save: <2000ms
- Checkpoint creation: <1000ms
Optimization Strategies
- MCP server caching and coordination
- Token efficiency mode for large operations
- Parallel execution with wave orchestration
- Intelligent tool selection based on complexity
Quality Assurance
8-Step Quality Cycle
- Syntax Validation
- Type Analysis
- Lint Rules
- Security Assessment
- E2E Testing
- Performance Analysis
- Documentation Patterns
- Integration Testing
Quality Gates Integration
- Commands integrate at steps 2.5 and 7.5
- MCP servers provide specialized validation
- Hooks enforce quality standards
Installation and Configuration
Directory Structure
~/.claude/
├── CLAUDE.md (entry point)
├── Core framework files
├── MCP server configurations
├── Mode definitions
└── Session data
SuperClaude/
├── Core/ # Framework documents
├── Commands/ # Command definitions
├── Agents/ # Agent specifications
├── MCP/ # MCP server configs
├── Modes/ # Behavioral modes
└── Hooks/ # Python hooks
Installation Process
- Framework files copied to
~/.claude/ - Python hooks installed and configured
- MCP servers configured in Claude Code
- Session lifecycle initialized
Evolution and Future
SuperClaude has evolved from Python implementation to markdown orchestration:
- v1-v2: Python-based with complex implementation
- v3: Markdown-driven orchestration framework
- Future: Enhanced MCP integration, improved session management
The framework continues to evolve with focus on:
- Simplified configuration over code
- Enhanced MCP server capabilities
- Improved session persistence
- Intelligent automation
Summary
SuperClaude v3 represents a mature orchestration framework that extends Claude Code through:
- Declarative configuration in markdown
- Intelligent routing and tool selection
- Comprehensive MCP server integration
- Session lifecycle management
- Quality-driven development workflows
The architecture emphasizes simplicity, reliability, and extensibility while maintaining sophisticated capabilities through intelligent orchestration rather than complex implementation.