Refactor SuperClaude Modes and MCP documentation for concise behavioral guidance

Transform 10 framework files from verbose technical documentation into concise
behavioral guides focusing on Claude's cognitive enhancement:

Modes/ - Behavioral mindset modifiers:
- MODE_Token_Efficiency: Symbol systems and compression communication (360→75 lines)
- MODE_Introspection: Meta-cognitive analysis and self-reflection (266→39 lines)
- MODE_Task_Management: Orchestration and delegation mindset (302→41 lines)
- MODE_Brainstorming: Collaborative discovery dialogue (84→44 lines)

MCP/ - External tool decision guides:
- MCP_Context7: Library documentation lookup (98→30 lines)
- MCP_Sequential: Multi-step reasoning engine (103→33 lines)
- MCP_Magic: UI component generation (93→31 lines)
- MCP_Playwright: Browser automation (102→32 lines)
- MCP_Morphllm: Pattern-based editing (159→31 lines)
- MCP_Serena: Semantic understanding and memory (207→32 lines)

Enhanced structure: Purpose, Activation Triggers, Behavioral Changes/Choose When,
Outcomes/Works Best With, Examples. Focus on WHEN to shift cognitive approaches
and HOW behavior transforms, not technical implementation details.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
NomenAK
2025-08-15 16:01:09 +02:00
parent 85bcee15c4
commit f16ce67a1f
10 changed files with 292 additions and 1678 deletions

View File

@@ -1,98 +1,30 @@
# Context7 MCP Server
## Purpose
Official library documentation, code examples, best practices, and localization standards
**Purpose**: Official library documentation lookup and framework pattern guidance
## Activation Patterns
## Triggers
- Import statements: `import`, `require`, `from`, `use`
- Framework keywords: React, Vue, Angular, Next.js, Express, etc.
- Library-specific questions about APIs or best practices
- Need for official documentation patterns vs generic solutions
- Version-specific implementation requirements
**Automatic Activation**:
- External library imports detected in code
- Framework-specific questions or queries
- Scribe persona active for documentation tasks
- Documentation pattern requests
## Choose When
- **Over WebSearch**: When you need curated, version-specific documentation
- **Over native knowledge**: When implementation must follow official patterns
- **For frameworks**: React hooks, Vue composition API, Angular services
- **For libraries**: Correct API usage, authentication flows, configuration
- **For compliance**: When adherence to official standards is mandatory
**Manual Activation**:
- Flag: `--c7`, `--context7`
## Works Best With
- **Sequential**: Context7 provides docs → Sequential analyzes implementation strategy
- **Magic**: Context7 supplies patterns → Magic generates framework-compliant components
**Smart Detection**:
- Commands detect need for official documentation patterns
- Import/require/from/use statements in code
- Framework keywords (React, Vue, Angular, etc.)
- Library-specific queries
## Flags
**`--c7` / `--context7`**
- Enable Context7 for library documentation lookup
- Auto-activates: External library imports, framework questions
- Detection: import/require/from/use statements, framework keywords
- Workflow: resolve-library-id → get-library-docs → implement
**`--no-context7`**
- Disable Context7 server
- Fallback: WebSearch for documentation, manual implementation
- Performance: 10-30% faster when documentation not needed
## Workflow Process
1. **Library Detection**: Scan imports, dependencies, package.json for library references
2. **ID Resolution**: Use `resolve-library-id` to find Context7-compatible library ID
3. **Documentation Retrieval**: Call `get-library-docs` with specific topic focus
4. **Pattern Extraction**: Extract relevant code patterns and implementation examples
5. **Implementation**: Apply patterns with proper attribution and version compatibility
6. **Validation**: Verify implementation against official documentation
7. **Caching**: Store successful patterns for session reuse
## Integration Points
**Commands**: `build`, `analyze`, `improve`, `design`, `document`, `explain`, `git`
**Thinking Modes**: Works with all thinking flags for documentation-informed analysis
**Other MCP Servers**:
- Sequential: For documentation-informed analysis
- Magic: For UI pattern documentation
- Playwright: For testing patterns from documentation
## Strategic Orchestration
### When to Use Context7
- **Library Integration Projects**: When implementing external libraries or frameworks
- **Framework Migration**: Moving between versions or switching frameworks
- **Documentation-Driven Development**: When official patterns must be followed
- **Team Knowledge Sharing**: Ensuring consistent library usage across team
- **Compliance Requirements**: When adherence to official standards is mandatory
### Cross-Server Coordination
- **With Sequential**: Context7 provides documentation → Sequential analyzes implementation strategy
- **With Magic**: Context7 supplies framework patterns → Magic generates components
- **With Morphllm**: Context7 guides patterns → Morphllm applies transformations
- **With Serena**: Context7 provides external docs → Serena manages internal context
- **With Playwright**: Context7 provides testing patterns → Playwright implements test strategies
### Performance Optimization Patterns
- **Intelligent Caching**: Documentation lookups cached with version-aware invalidation
- **Batch Operations**: Multiple library queries processed in parallel for efficiency
- **Pattern Reuse**: Successful integration patterns stored for session-wide reuse
- **Selective Loading**: Topic-focused documentation retrieval to minimize token usage
- **Fallback Strategies**: WebSearch backup when Context7 unavailable or incomplete
## Use Cases
- **Library Integration**: Getting official patterns for implementing new libraries
- **Framework Patterns**: Accessing React, Vue, Angular best practices
- **API Documentation**: Understanding proper API usage and conventions
- **Security Patterns**: Finding security best practices from official sources
- **Localization**: Accessing multilingual documentation and i18n patterns
## Error Recovery
- **Library not found** → WebSearch alternatives → Manual implementation
- **Documentation timeout** → Use cached knowledge → Limited guidance
- **Server unavailable** → Graceful degradation → Cached patterns
## Quality Gates Integration
- **Step 1 - Syntax Validation**: Language-specific syntax patterns from official documentation
- **Step 3 - Lint Rules**: Framework-specific linting rules and quality standards
- **Step 7 - Documentation Patterns**: Documentation completeness validation
## Examples
```
"implement React useEffect" → Context7 (official React patterns)
"add authentication with Auth0" → Context7 (official Auth0 docs)
"migrate to Vue 3" → Context7 (official migration guide)
"optimize Next.js performance" → Context7 (official optimization patterns)
"just explain this function" → Native Claude (no external docs needed)
```

View File

@@ -1,93 +1,31 @@
# Magic MCP Server
## Purpose
Modern UI component generation, design system integration, and responsive design
**Purpose**: Modern UI component generation from 21st.dev patterns with design system integration
## Activation Patterns
## Triggers
- UI component requests: button, form, modal, card, table, nav
- Design system implementation needs
- `/ui` or `/21` commands
- Frontend-specific keywords: responsive, accessible, interactive
- Component enhancement or refinement requests
**Automatic Activation**:
- UI component requests detected in user queries
- Design system queries or UI-related questions
- Frontend persona active in current session
- Component-related keywords detected
## Choose When
- **For UI components**: Use Magic, not native HTML/CSS generation
- **Over manual coding**: When you need production-ready, accessible components
- **For design systems**: When consistency with existing patterns matters
- **For modern frameworks**: React, Vue, Angular with current best practices
- **Not for backend**: API logic, database queries, server configuration
**Manual Activation**:
- Flag: `--magic`
## Works Best With
- **Context7**: Magic uses 21st.dev patterns → Context7 provides framework integration
- **Sequential**: Sequential analyzes UI requirements → Magic implements structured components
**Smart Detection**:
- Component creation requests (button, form, modal, etc.)
- Design system integration needs
- UI/UX improvement requests
- Responsive design requirements
## Flags
**`--magic`**
- Enable Magic for UI component generation
- Auto-activates: UI component requests, design system queries
- Detection: component/button/form keywords, JSX patterns, accessibility requirements
**`--no-magic`**
- Disable Magic server
- Fallback: Generate basic component, suggest manual enhancement
- Performance: 10-30% faster when UI generation not needed
## Workflow Process
1. **Requirement Parsing**: Extract component specifications and design system requirements
2. **Pattern Search**: Find similar components and design patterns from 21st.dev database
3. **Framework Detection**: Identify target framework (React, Vue, Angular) and version
4. **Server Coordination**: Sync with Context7 for framework patterns, Sequential for complex logic
5. **Code Generation**: Create component with modern best practices and framework conventions
6. **Design System Integration**: Apply existing themes, styles, tokens, and design patterns
7. **Accessibility Compliance**: Ensure WCAG compliance, semantic markup, and keyboard navigation
8. **Responsive Design**: Implement mobile-first responsive patterns
9. **Optimization**: Apply performance optimizations and code splitting
10. **Quality Assurance**: Validate against design system and accessibility standards
## Integration Points
**Commands**: `build`, `implement`, `design`, `improve`
**Thinking Modes**: Works with all thinking modes for complex UI logic
**Other MCP Servers**:
- Context7 for framework patterns
- Sequential for complex component logic
- Playwright for UI testing
## Strategic Orchestration
### When to Use Magic
- **UI Component Creation**: Building modern, accessible components with design system integration
- **Design System Implementation**: Applying existing design tokens and patterns consistently
- **Rapid Prototyping**: Quick UI generation for testing and validation
- **Framework Migration**: Converting components between React, Vue, Angular
- **Accessibility Compliance**: Ensuring WCAG compliance in UI development
### Component Generation Strategy
- **Context-Aware Creation**: Magic analyzes existing design systems and applies consistent patterns
- **Performance Optimization**: Automatic code splitting, lazy loading, and bundle optimization
- **Cross-Framework Compatibility**: Intelligent adaptation to detected framework patterns
- **Design System Integration**: Seamless integration with existing themes, tokens, and conventions
### Advanced UI Orchestration
- **Design System Evolution**: Components adapt to design system changes automatically
- **Accessibility-First Generation**: WCAG compliance built into every component from creation
- **Cross-Device Optimization**: Components optimized for desktop, tablet, and mobile simultaneously
- **Pattern Library Building**: Successful components added to reusable pattern library
- **Performance Budgeting**: Components generated within performance constraints and budgets
## Use Cases
- **Component Creation**: Generate modern UI components with best practices
- **Design System Integration**: Apply existing design tokens and patterns
- **Accessibility Enhancement**: Ensure WCAG compliance in UI components
- **Responsive Implementation**: Create mobile-first responsive layouts
- **Performance Optimization**: Implement code splitting and lazy loading
## Error Recovery
- **Magic server failure** → Generate basic component with standard patterns
- **Pattern not found** → Create custom implementation following best practices
- **Framework mismatch** → Adapt to detected framework with compatibility warnings
## Examples
```
"create a login form" → Magic (UI component generation)
"build a responsive navbar" → Magic (UI pattern with accessibility)
"add a data table with sorting" → Magic (complex UI component)
"make this component accessible" → Magic (UI enhancement)
"write a REST API" → Native Claude (backend logic)
"fix database query" → Native Claude (non-UI task)
```

View File

@@ -1,159 +1,31 @@
# Morphllm MCP Server
## Purpose
Intelligent file editing engine with Fast Apply capability for accurate, context-aware code modifications, specializing in pattern-based transformations and token-optimized operations
**Purpose**: Pattern-based code editing engine with token optimization for bulk transformations
## Activation Patterns
**Automatic Activation**:
- Multi-file edit operations detected
- Complex refactoring requests
- Edit instructions with natural language descriptions
- Code modification tasks requiring context understanding
- Batch file updates or systematic changes
**Manual Activation**:
- Flag: `--morph`, `--fast-apply`
**Smart Detection**:
- Edit/modify/update/refactor keywords with file context
- Natural language edit instructions
- Complex transformation requests
- Multi-step modification patterns
- Code improvement and cleanup operations
## Flags
**`--morph` / `--fast-apply`**
- Enable Morphllm for intelligent file editing
- Auto-activates: Complex edits, multi-file changes, refactoring operations
- Detection: edit/modify/refactor keywords, natural language instructions
- Workflow: Parse instructions → Understand context → Apply changes → Validate
**`--no-morph`**
- Disable Morphllm server
- Fallback: Standard Edit/MultiEdit tools
- Performance: Use when simple replacements suffice
## Workflow Process
1. **Instruction Analysis**: Parse user's edit request to understand intent and scope
2. **Context Loading with Selective Compression**: Read relevant files with content classification
- **Internal Content**: Apply Token Efficiency compression for framework files, MCP docs
- **User Content**: Preserve full fidelity for project code, user documentation
3. **Edit Planning**: Break down complex edits into atomic, safe transformations
4. **Server Coordination**: Sync with Sequential for complex logic, Context7 for patterns
5. **Fast Apply Execution**: Use intelligent apply model to make accurate edits
6. **Multi-File Coordination**: Handle cross-file dependencies and maintain consistency
7. **Validation**: Ensure syntax correctness and preserve functionality
8. **Rollback Preparation**: Maintain ability to revert changes if needed
9. **Result Verification**: Confirm edits match intended modifications
10. **Documentation**: Update comments and docs if affected by changes with compression awareness
## Integration Points
**Commands**: `edit`, `refactor`, `improve`, `fix`, `cleanup`, `implement`, `build`, `design`
**SuperClaude Pattern Integration**:
```yaml
# When to use Morphllm vs Serena
morphllm_preferred:
- Pattern-based edits (framework transformations)
- Style guide enforcement
- Bulk text replacements
- Token optimization critical
- Simple to moderate complexity
serena_preferred:
- Symbol-level operations (rename, extract, move)
- Multi-language projects
- LSP integration required
- Complex dependency tracking
- Semantic understanding critical
hybrid_approach:
- Serena analyzes → Morphllm executes
- Complex refactoring with pattern application
- Large-scale architectural changes
```
**Thinking Modes**:
- Works with all thinking flags for complex edit planning
- `--think`: Analyzes edit impact across modules
- `--think-hard`: Plans systematic refactoring
- `--ultrathink`: Coordinates large-scale transformations
**Other MCP Servers**:
- Sequential: Complex edit planning and dependency analysis
- Context7: Pattern-based refactoring and best practices
- Magic: UI component modifications
- Playwright: Testing edits for validation
## Core Capabilities
### Fast Apply Engine
- Natural language edit instruction understanding
- Context-aware code modifications
- Intelligent diff generation
- Multi-step edit orchestration
- Semantic understanding of code changes
## Strategic Orchestration
### When to Use Morphllm vs Serena
**Morphllm Optimal For**:
- Pattern-based transformations (framework updates, style enforcement)
- Token-optimized operations (Fast Apply scenarios)
## Triggers
- Multi-file edit operations requiring consistent patterns
- Framework updates, style guide enforcement, code cleanup
- Bulk text replacements across multiple files
- Simple to moderate complexity edits (<10 files, complexity <0.6)
- Natural language edit instructions with specific scope
- Token optimization needed (efficiency gains 30-50%)
**Serena Optimal For**:
- Symbol-level operations (rename, extract, move functions/classes)
- Multi-language projects requiring LSP integration
- Complex dependency tracking and semantic understanding
- Large-scale architectural changes requiring project-wide context
## Choose When
- **Over Serena**: For pattern-based edits, not symbol operations
- **For bulk operations**: Style enforcement, framework updates, text replacements
- **When token efficiency matters**: Fast Apply scenarios with compression needs
- **For simple to moderate complexity**: <10 files, straightforward transformations
- **Not for semantic operations**: Symbol renames, dependency tracking, LSP integration
### Hybrid Intelligence Patterns
- **Analysis → Execution**: Serena analyzes semantic context → Morphllm executes precise edits
- **Validation → Enhancement**: Morphllm identifies edit requirements → Serena provides semantic validation
- **Coordination**: Joint validation ensures both syntax correctness and semantic consistency
## Works Best With
- **Serena**: Serena analyzes semantic context → Morphllm executes precise edits
- **Sequential**: Sequential plans edit strategy → Morphllm applies systematic changes
### Fast Apply Optimization Strategy
- **Pattern Recognition**: Morphllm identifies repeated patterns for batch application
- **Context Preservation**: Maintains sufficient context for accurate modifications
- **Token Efficiency**: Achieves 30-50% efficiency gains through intelligent compression
- **Quality Validation**: Real-time validation against project patterns and conventions
### Advanced Editing Intelligence
- **Multi-File Coordination**: Changes tracked across file dependencies automatically
- **Style Guide Enforcement**: Project-specific patterns applied consistently during edits
- **Rollback Capability**: All edits reversible with complete change history maintenance
- **Semantic Preservation**: Code meaning and functionality preserved during transformations
- **Performance Impact Analysis**: Edit performance implications analyzed before application
## Use Cases
- **Complex Refactoring**: Rename across multiple files with dependency updates
- **Framework Migration**: Update code to new API versions systematically
- **Code Cleanup**: Apply consistent formatting and patterns project-wide
- **Feature Implementation**: Add functionality with proper integration
- **Bug Fixes**: Apply targeted fixes with minimal disruption
- **Pattern Application**: Implement design patterns or best practices
- **Documentation Updates**: Synchronize docs with code changes
- **Fast Apply Scenarios**: Token-optimized edits with 30-50% efficiency gains
- **Style Guide Enforcement**: Project-wide pattern consistency
- **Bulk Updates**: Systematic changes across many files
## Error Recovery
- **Edit conflict** → Analyze conflict source → Provide resolution strategies
- **Syntax error** → Automatic rollback → Alternative implementations
- **Server timeout** → Graceful fallback to standard tools
## Quality Gates Integration
- **Step 1 - Syntax Validation**: Ensures edits maintain syntactic correctness
- **Step 2 - Type Analysis**: Preserves type consistency during modifications
- **Step 3 - Code Quality**: Applies linting rules during edits
- **Step 7 - Documentation**: Updates related documentation with code changes
## Examples
```
"update all React class components to hooks" → Morphllm (pattern transformation)
"enforce ESLint rules across project" → Morphllm (style guide application)
"replace all console.log with logger calls" → Morphllm (bulk text replacement)
"rename getUserData function everywhere" → Serena (symbol operation)
"analyze code architecture" → Sequential (complex analysis)
"explain this algorithm" → Native Claude (simple explanation)
```

View File

@@ -1,102 +1,32 @@
# Playwright MCP Server
## Purpose
Cross-browser E2E testing, performance monitoring, automation, and visual testing
**Purpose**: Browser automation and E2E testing with real browser interaction
## Activation Patterns
## Triggers
- Browser testing and E2E test scenarios
- Visual testing, screenshot, or UI validation requests
- Form submission and user interaction testing
- Cross-browser compatibility validation
- Performance testing requiring real browser rendering
- Accessibility testing with automated WCAG compliance
**Automatic Activation**:
- Testing workflows and test generation requests
- Performance monitoring requirements
- E2E test generation needs
- QA persona active
## Choose When
- **For real browser interaction**: When you need actual rendering, not just code
- **Over unit tests**: For integration testing, user journeys, visual validation
- **For E2E scenarios**: Login flows, form submissions, multi-page workflows
- **For visual testing**: Screenshot comparisons, responsive design validation
- **Not for code analysis**: Static code review, syntax checking, logic validation
**Manual Activation**:
- Flag: `--play`, `--playwright`
## Works Best With
- **Sequential**: Sequential plans test strategy → Playwright executes browser automation
- **Magic**: Magic creates UI components → Playwright validates accessibility and behavior
**Smart Detection**:
- Browser interaction requirements
- Keywords: test, e2e, performance, visual testing, cross-browser
- Testing or quality assurance contexts
## Flags
**`--play` / `--playwright`**
- Enable Playwright for cross-browser automation and E2E testing
- Detection: test/e2e keywords, performance monitoring, visual testing, cross-browser requirements
**`--no-play` / `--no-playwright`**
- Disable Playwright server
- Fallback: Suggest manual testing, provide test cases
- Performance: 10-30% faster when testing not needed
## Workflow Process
1. **Browser Connection**: Connect to Chrome, Firefox, Safari, or Edge instances
2. **Environment Setup**: Configure viewport, user agent, network conditions, device emulation
3. **Navigation**: Navigate to target URLs with proper waiting and error handling
4. **Server Coordination**: Sync with Sequential for test planning, Magic for UI validation
5. **Interaction**: Perform user actions (clicks, form fills, navigation) across browsers
6. **Data Collection**: Capture screenshots, videos, performance metrics, console logs
7. **Validation**: Verify expected behaviors, visual states, and performance thresholds
8. **Multi-Server Analysis**: Coordinate with other servers for comprehensive test analysis
9. **Reporting**: Generate test reports with evidence, metrics, and actionable insights
10. **Cleanup**: Properly close browser connections and clean up resources
## Integration Points
**Commands**: `test`, `troubleshoot`, `analyze`, `validate`
**Thinking Modes**: Works with all thinking modes for test strategy planning
**Other MCP Servers**:
- Sequential (test planning and analysis)
- Magic (UI validation and component testing)
- Context7 (testing patterns and best practices)
## Strategic Orchestration
### When to Use Playwright
- **E2E Test Generation**: Creating comprehensive user workflow tests
- **Cross-Browser Validation**: Ensuring functionality across all major browsers
- **Performance Monitoring**: Continuous performance measurement and threshold alerting
- **Visual Regression Testing**: Automated detection of UI changes and layout issues
- **User Experience Validation**: Accessibility testing and usability verification
### Testing Strategy Coordination
- **With Sequential**: Sequential plans test strategy → Playwright executes comprehensive testing
- **With Magic**: Magic generates UI components → Playwright validates component functionality
- **With Context7**: Context7 provides testing patterns → Playwright implements best practices
- **With Serena**: Serena analyzes code changes → Playwright generates targeted regression tests
### Multi-Browser Orchestration
- **Parallel Execution Strategy**: Intelligent distribution of tests across browser instances
- **Resource Management**: Dynamic allocation based on system capabilities and test complexity
- **Result Aggregation**: Unified reporting across all browser test results
- **Failure Analysis**: Cross-browser failure pattern detection and reporting
### Advanced Testing Intelligence
- **Adaptive Test Generation**: Tests generated based on code change impact analysis
- **Performance Regression Detection**: Automated identification of performance degradation
- **Visual Diff Analysis**: Pixel-perfect comparison with intelligent tolerance algorithms
- **User Journey Optimization**: Test paths optimized for real user behavior patterns
- **Continuous Quality Monitoring**: Real-time feedback loop for development quality assurance
## Use Cases
- **Test Generation**: Create E2E tests based on user workflows and critical paths
- **Performance Monitoring**: Continuous performance measurement with threshold alerting
- **Visual Validation**: Screenshot-based testing and regression detection
- **Cross-Browser Testing**: Validate functionality across all major browsers
- **User Experience Testing**: Accessibility validation, usability testing, conversion optimization
## Error Recovery
- **Connection lost** → Automatic reconnection → Provide manual test scripts
- **Browser timeout** → Retry with adjusted timeout → Fallback to headless mode
- **Element not found** → Apply wait strategies → Use alternative selectors
## Quality Gates Integration
- **Step 5 - E2E Testing**: End-to-end tests with coverage analysis (≥80% unit, ≥70% integration)
- **Step 8 - Integration Testing**: Deployment validation and cross-browser testing
## Examples
```
"test the login flow" → Playwright (browser automation)
"check if form validation works" → Playwright (real user interaction)
"take screenshots of responsive design" → Playwright (visual testing)
"validate accessibility compliance" → Playwright (automated WCAG testing)
"review this function's logic" → Native Claude (static analysis)
"explain the authentication code" → Native Claude (code review)
```

View File

@@ -1,103 +1,33 @@
# Sequential MCP Server
## Purpose
Multi-step problem solving, architectural analysis, systematic debugging
**Purpose**: Multi-step reasoning engine for complex analysis and systematic problem solving
## Activation Patterns
**Automatic Activation**:
- Complex debugging scenarios requiring systematic investigation
- System design questions needing structured analysis
- Any `--think` flags (--think, --think-hard, --ultrathink)
- Multi-step problems requiring decomposition and analysis
**Manual Activation**:
- Flag: `--seq`, `--sequential`
**Smart Detection**:
- Multi-step reasoning patterns detected in user queries
- Complex architectural or system-level questions
## Triggers
- Complex debugging scenarios with multiple layers
- Architectural analysis and system design questions
- `--think`, `--think-hard`, `--ultrathink` flags
- Problems requiring hypothesis testing and validation
- Iterative refinement or improvement workflows
- Multi-component failure investigation
- Performance bottleneck identification requiring methodical approach
## Flags
## Choose When
- **Over native reasoning**: When problems have 3+ interconnected components
- **For systematic analysis**: Root cause analysis, architecture review, security assessment
- **When structure matters**: Problems benefit from decomposition and evidence gathering
- **For cross-domain issues**: Problems spanning frontend, backend, database, infrastructure
- **Not for simple tasks**: Basic explanations, single-file changes, straightforward fixes
**`--seq` / `--sequential`**
- Enable Sequential for complex multi-step analysis
- Auto-activates: Complex debugging, system design, --think flags
- Detection: debug/trace/analyze keywords, nested conditionals, async chains
## Works Best With
- **Context7**: Sequential coordinates analysis → Context7 provides official patterns
- **Magic**: Sequential analyzes UI logic → Magic implements structured components
- **Playwright**: Sequential identifies testing strategy → Playwright executes validation
**`--no-seq` / `--no-sequential`**
- Disable Sequential server
- Fallback: Native Claude Code analysis
- Performance: 10-30% faster for simple tasks
## Workflow Process
1. **Problem Decomposition**: Break complex problems into analyzable components
2. **Server Coordination**: Coordinate with Context7 for documentation, Magic for UI insights, Playwright for testing
3. **Systematic Analysis**: Apply structured thinking to each component
4. **Relationship Mapping**: Identify dependencies, interactions, and feedback loops
5. **Hypothesis Generation**: Create testable hypotheses for each component
6. **Evidence Gathering**: Collect supporting evidence through tool usage
7. **Multi-Server Synthesis**: Combine findings from multiple servers
8. **Recommendation Generation**: Provide actionable next steps with priority ordering
9. **Validation**: Check reasoning for logical consistency
## Integration Points
**Commands**: `analyze`, `troubleshoot`, `explain`, `improve`, `estimate`, `task`, `document`, `design`, `git`, `test`
**Thinking Modes**:
- `--think` (4K): Module-level analysis with context awareness
- `--think-hard` (10K): System-wide analysis with architectural focus
- `--ultrathink` (32K): Critical system analysis with comprehensive coverage
**Other MCP Servers**:
- Context7: Documentation lookup and pattern verification
- Magic: UI component analysis and insights
- Playwright: Testing validation and performance analysis
## Strategic Orchestration
### When to Use Sequential
- **Complex Debugging**: Multi-layer issues requiring systematic investigation
- **Architecture Planning**: System design requiring structured analysis
- **Performance Optimization**: Bottleneck identification needing methodical approach
- **Risk Assessment**: Security or compliance analysis requiring comprehensive coverage
- **Cross-Domain Problems**: Issues spanning multiple technical domains
### Multi-Server Orchestration Patterns
- **Analysis Coordination**: Sequential coordinates analysis across Context7, Magic, Playwright
- **Evidence Synthesis**: Combines findings from multiple servers into cohesive insights
- **Progressive Enhancement**: Iterative improvement cycles with quality validation
- **Hypothesis Testing**: Structured validation of assumptions across server capabilities
### Advanced Reasoning Strategies
- **Parallel Analysis Streams**: Multiple reasoning chains explored simultaneously
- **Cross-Domain Validation**: Findings validated across different technical domains
- **Dependency Chain Mapping**: Complex system relationships analyzed systematically
- **Risk-Weighted Decision Making**: Solutions prioritized by impact and implementation complexity
- **Continuous Learning Integration**: Patterns and outcomes fed back into analysis models
## Use Cases
- **Root cause analysis for complex bugs**: Systematic investigation of multi-component failures
- **Performance bottleneck identification**: Structured analysis of system performance issues
- **Architecture review and improvement planning**: Comprehensive architectural assessment
- **Security threat modeling and vulnerability analysis**: Systematic security evaluation
- **Code quality assessment with improvement roadmaps**: Structured quality analysis
- **Structured documentation workflows**: Organized content creation and multilingual organization
- **Iterative improvement analysis**: Progressive refinement planning with Loop command
## Error Recovery
- **Sequential timeout** → Native analysis with reduced depth
- **Incomplete analysis** → Partial results with gap identification
- **Server coordination failure** → Continue with available servers
## Quality Gates Integration
- **Step 2 - Type Analysis**: Deep type compatibility checking and context-aware type inference
- **Step 4 - Security Assessment**: Vulnerability analysis, threat modeling, and OWASP compliance
- **Step 6 - Performance Analysis**: Performance benchmarking and optimization recommendations
## Examples
```
"why is this API slow?" → Sequential (systematic performance analysis)
"design a microservices architecture" → Sequential (structured system design)
"debug this authentication flow" → Sequential (multi-component investigation)
"analyze security vulnerabilities" → Sequential (comprehensive threat modeling)
"explain this function" → Native Claude (simple explanation)
"fix this typo" → Native Claude (straightforward change)
```

View File

@@ -1,207 +1,32 @@
# Serena MCP Server
## Purpose
Powerful coding agent toolkit providing semantic retrieval, intelligent editing capabilities, project-aware context management, and comprehensive memory operations for SuperClaude integration
**Purpose**: Semantic code understanding with project memory and session persistence
## Activation Patterns
**Automatic Activation**:
- Complex semantic code analysis requests
- Project-wide symbol navigation and referencing
- Advanced editing operations requiring context awareness
- Multi-file refactoring with semantic understanding
- Code exploration and discovery workflows
**Manual Activation**:
- Flag: `--serena`, `--semantic`
**Smart Detection**:
- Symbol lookup and reference analysis keywords
- Complex code exploration requests
- Project-wide navigation and analysis
- Semantic search and context-aware editing
## Triggers
- Symbol operations: rename, extract, move functions/classes
- Project-wide code navigation and exploration
- Multi-language projects requiring LSP integration
- Session lifecycle: `/sc:load`, `/sc:save`, project activation
- Memory-driven development workflows
- Large codebase analysis (>50 files, complex architecture)
## Flags
## Choose When
- **Over Morphllm**: For symbol operations, not pattern-based edits
- **For semantic understanding**: Symbol references, dependency tracking, LSP integration
- **For session persistence**: Project context, memory management, cross-session learning
- **For large projects**: Multi-language codebases requiring architectural understanding
- **Not for simple edits**: Basic text replacements, style enforcement, bulk operations
**`--serena` / `--semantic`**
- Enable Serena for semantic code analysis and intelligent editing
- Auto-activates: Complex symbol analysis, project exploration, semantic search
- Detection: find/symbol/reference keywords, project navigation, semantic analysis
- Workflow: Project activation → Semantic analysis → Intelligent editing → Context preservation
## Works Best With
- **Morphllm**: Serena analyzes semantic context → Morphllm executes precise edits
- **Sequential**: Serena provides project context → Sequential performs architectural analysis
**`--no-serena`**
- Disable Serena server
- Fallback: Standard file operations and basic search
- Performance: 10-30% faster when semantic analysis not needed
## Workflow Process
1. **Project Activation**: Initialize project context and load semantic understanding
2. **Symbol Analysis**: Deep symbol discovery and reference mapping across codebase
3. **Context Gathering with Selective Compression**: Collect relevant code context with content classification
- **SuperClaude Framework** (Complete exclusion): All framework directories and components
- **Session Data** (Apply compression): Session metadata, checkpoints, cache content only
- **User Content**: Preserve full fidelity for project code, user-specific content, configurations
4. **Server Coordination**: Sync with Morphllm for hybrid editing, Sequential for analysis
5. **Semantic Search**: Intelligent pattern matching and code discovery
6. **Memory Management with Selective Compression**: Store and retrieve development context with optimized storage
- **SuperClaude Framework Content**: Complete exclusion from compression (0% compression)
- **Session Data**: Compressed storage for session metadata and operational data only
- **Project Memories**: Full preservation for user project insights and context
7. **Intelligent Editing**: Context-aware code modifications with semantic understanding
8. **Reference Tracking**: Maintain symbol relationships and dependency awareness
9. **Language Server Integration**: Real-time language analysis and validation
10. **Dashboard Monitoring**: Web-based interface for agent status and metrics
## Integration Points
**Commands**: `analyze`, `implement`, `refactor`, `explore`, `find`, `edit`, `improve`, `design`, `load`, `save`
**Thinking Modes**:
- Works with all thinking flags for semantic analysis
- `--think`: Symbol-level context analysis
- `--think-hard`: Project-wide semantic understanding
- `--ultrathink`: Complex architectural semantic analysis
**Other MCP Servers**:
- **Morphllm**: Hybrid intelligence for advanced editing operations
- **Sequential**: Complex semantic analysis coordination
- **Context7**: Framework-specific semantic patterns
- **Magic**: UI component semantic understanding
- **Playwright**: Testing semantic validation
## Core Capabilities
### Semantic Retrieval
- **Symbol Discovery**: Deep symbol search across entire codebase
- **Reference Analysis**: Find all references and usages of symbols
- **Context-Aware Search**: Semantic pattern matching beyond simple text search
- **Project Navigation**: Intelligent code exploration and discovery
### Intelligent Editing
- **Context-Aware Modifications**: Edits that understand surrounding code semantics
- **Symbol-Based Refactoring**: Rename and restructure with full dependency tracking
- **Semantic Code Generation**: Generate code that fits naturally into existing patterns
- **Multi-File Coordination**: Maintain consistency across related files
### Memory Management
- **Development Context**: Store and retrieve project insights and decisions
- **Pattern Recognition**: Learn and apply project-specific coding patterns
- **Context Preservation**: Maintain semantic understanding across sessions
- **Knowledge Base**: Build cumulative understanding of codebase architecture
### Language Server Integration
- **Real-Time Analysis**: Live language server integration for immediate feedback
- **Symbol Information**: Rich symbol metadata and type information
- **Error Detection**: Semantic error identification and correction suggestions
- **Code Completion**: Context-aware code completion and suggestions
### Project Management
- **Multi-Project Support**: Handle multiple codebases with context switching
- **Configuration Management**: Project-specific settings and preferences
- **Mode Switching**: Adaptive behavior based on development context
- **Dashboard Interface**: Web-based monitoring and control interface
## Use Cases
- **Code Exploration**: Navigate and understand large, complex codebases
- **Semantic Refactoring**: Rename variables, functions, classes with full impact analysis
- **Pattern Discovery**: Find similar code patterns and implementation examples
- **Context-Aware Development**: Write code that naturally fits existing architecture
- **Cross-Reference Analysis**: Understand how components interact and depend on each other
- **Intelligent Code Search**: Find code based on semantic meaning, not just text matching
- **Project Onboarding**: Quickly understand and navigate new codebases
- **Memory Replacement**: Complete replacement of ClaudeDocs file-based system
- **Session Management**: Save/load project context and session state
- **Task Reflection**: Intelligent task tracking and validation
## Error Recovery & Resilience
### Primary Recovery Strategies
- **Connection lost** → Graceful degradation with cached context → Automatic reconnection attempts
- **Project activation failed** → Manual setup with guided configuration → Alternative analysis pathways
- **Symbol lookup timeout** → Use cached semantic data → Fallback to intelligent text search
- **Language server error** → Automatic restart with state preservation → Manual validation backup
- **Memory corruption** → Intelligent memory reconstruction → Selective context recovery
### Advanced Recovery Orchestration
- **Context Preservation**: Critical project context automatically saved for disaster recovery
- **Multi-Language Fallback**: When LSP fails, fallback to language-specific text analysis
- **Semantic Cache Management**: Intelligent cache invalidation and reconstruction strategies
- **Cross-Session Recovery**: Session state recovery from multiple checkpoint sources
- **Hybrid Intelligence Failover**: Seamless coordination with Morphllm when semantic analysis unavailable
## Caching Strategy
- **Cache Type**: Semantic analysis results, symbol maps, and project context
- **Cache Duration**: Project-based with intelligent invalidation
- **Cache Key**: Project path + file modification timestamps + symbol signature
## Quality Gates Integration
Serena contributes to the following validation steps:
- **Step 2 - Type Analysis**: Deep semantic type checking and compatibility validation
- **Step 3 - Code Quality**: Semantic code quality assessment and pattern compliance
- **Step 4 - Security Assessment**: Semantic security pattern analysis
- **Step 6 - Performance Analysis**: Semantic performance pattern identification
## Hybrid Intelligence with Morphllm
**Complementary Capabilities**:
- **Serena**: Provides semantic understanding and project context
- **Morphllm**: Delivers precise editing execution and natural language processing
- **Combined**: Creates powerful hybrid editing engine with both intelligence and precision
**Coordination Patterns**:
- Serena analyzes semantic context → Morphllm executes precise edits
- Morphllm identifies edit requirements → Serena provides semantic validation
- Joint validation ensures both syntax correctness and semantic consistency
## Strategic Orchestration
### When to Use Serena
- **Large Codebase Analysis**: Projects >50 files requiring semantic understanding
- **Symbol-Level Refactoring**: Rename, extract, move operations with dependency tracking
- **Project Context Management**: Session persistence and cross-session learning
- **Multi-Language Projects**: Complex polyglot codebases requiring LSP integration
- **Architectural Analysis**: System-wide understanding and pattern recognition
### Memory-Driven Development Strategy
**Session Lifecycle Integration**:
- Project activation → Context loading → Work session → Context persistence
- Automatic checkpoints on high-risk operations and task completion
- Cross-session knowledge accumulation and pattern learning
**Memory Organization Strategy**:
- Replace file-based ClaudeDocs with intelligent memory system
- Hierarchical memory structure: session → checkpoints → summaries → insights
- Semantic indexing for efficient context retrieval and pattern matching
### Advanced Semantic Intelligence
- **Project-Wide Understanding**: Complete codebase context maintained across sessions
- **Dependency Graph Analysis**: Real-time tracking of symbol relationships and impacts
- **Pattern Evolution Tracking**: Code patterns learned and adapted over time
- **Cross-Language Integration**: Unified understanding across multiple programming languages
- **Architectural Change Impact**: System-wide implications analyzed for all modifications
## Project Management
Essential tools for SuperClaude integration:
- `activate_project`: Initialize project context and semantic understanding
- `list_memories` / `read_memory` / `write_memory`: Memory-based development context
- `onboarding` / `check_onboarding_performed`: Project setup and validation
## SuperClaude Integration
**Session Lifecycle Commands**:
- `/sc:load``activate_project` + `list_memories` + context loading
- `/sc:save``write_memory` + session persistence + checkpoint creation
## Error Recovery
- **Connection lost** → Graceful degradation with cached context
- **Project activation failed** → Manual setup with guided configuration
- **Symbol lookup timeout** → Use cached semantic data → Fallback to intelligent text search
## Examples
```
"rename getUserData function everywhere" → Serena (symbol operation with dependency tracking)
"find all references to this class" → Serena (semantic search and navigation)
"load my project context" → Serena (/sc:load with project activation)
"save my current work session" → Serena (/sc:save with memory persistence)
"update all console.log to logger" → Morphllm (pattern-based replacement)
"create a login form" → Magic (UI component generation)
```

View File

@@ -1,84 +1,44 @@
---
name: brainstorming
description: "Behavioral trigger for interactive requirements discovery"
type: command-integrated
# Mode Classification
category: orchestration
complexity: standard
scope: cross-session
# Activation Configuration
activation:
automatic: true
manual-flags: ["--brainstorm", "--bs"]
confidence-threshold: 0.7
detection-patterns: ["vague project requests", "exploration keywords", "uncertainty indicators", "PRD prerequisites", "interactive discovery needs"]
# Integration Configuration
framework-integration:
mcp-servers: [sequential-thinking, context7, magic]
commands: ["/sc:brainstorm"]
modes: [task_management, token_efficiency, introspection]
quality-gates: [requirements_clarity, brief_completeness, mode_coordination]
# Performance Profile
performance-profile: standard
---
# Brainstorming Mode
**Behavioral trigger for interactive requirements discovery** - Activates when Claude detects uncertainty or exploration needs.
**Purpose**: Collaborative discovery mindset for interactive requirements exploration and creative problem solving
## Purpose
## Activation Triggers
- Vague project requests: "I want to build something...", "Thinking about creating..."
- Exploration keywords: brainstorm, explore, discuss, figure out, not sure
- Uncertainty indicators: "maybe", "possibly", "thinking about", "could we"
- PRD prerequisites: need requirements discovery before documentation
- Interactive discovery contexts benefiting from dialogue exploration
- Manual flags: `--brainstorm`, `--bs`
Lightweight behavioral mode that triggers the `/sc:brainstorm` command when users need help discovering requirements through dialogue.
## Behavioral Changes
- **Socratic Dialogue**: Ask probing questions to uncover hidden requirements
- **Non-Presumptive**: Avoid assumptions, let user guide discovery direction
- **Collaborative Exploration**: Partner in discovery rather than directive consultation
- **Brief Generation**: Synthesize insights into structured requirement briefs
- **Cross-Session Persistence**: Maintain discovery context for follow-up sessions
## Auto-Activation Patterns
## Outcomes
- Clear requirements from vague initial concepts
- Comprehensive requirement briefs ready for implementation
- Reduced project scope creep through upfront exploration
- Better alignment between user vision and technical implementation
- Smoother handoff to formal development workflows
Brainstorming Mode activates when detecting:
1. **Vague Project Requests**: "I want to build something that...", "Thinking about creating..."
2. **Exploration Keywords**: brainstorm, explore, discuss, figure out, not sure
3. **Uncertainty Indicators**: "maybe", "possibly", "thinking about", "could we"
4. **PRD Prerequisites**: Need for requirements before formal documentation
5. **Interactive Discovery**: Context benefits from dialogue-based exploration
## Manual Activation
- **Flags**: `--brainstorm` or `--bs`
- **Disable**: `--no-brainstorm`
## Mode Configuration
```yaml
brainstorming_mode:
activation:
automatic: true
confidence_threshold: 0.7
detection_patterns:
vague_requests: ["want to build", "thinking about", "not sure"]
exploration_keywords: [brainstorm, explore, discuss, figure_out]
uncertainty_indicators: [maybe, possibly, could_we]
behavioral_settings:
dialogue_style: collaborative_non_presumptive
discovery_depth: adaptive
context_retention: cross_session
handoff_automation: true
## Examples
```
Standard: "I want to build a web app"
Brainstorming: "🤔 Discovery Questions:
- What problem does this solve for users?
- Who are your target users and their main workflows?
- What's your expected user volume and performance needs?
- Any existing systems to integrate with?
📝 Brief: [Generate structured requirements document]"
## Command Integration
This mode triggers `/sc:brainstorm` which handles:
- Socratic dialogue execution
- Brief generation
- PRD handoff
- Session persistence
See `/sc:brainstorm` command documentation for implementation details.
## Related Documentation
- **Command Implementation**: /sc:brainstorm
- **Agent Integration**: brainstorm-PRD
- **Framework Reference**: ORCHESTRATOR.md
Standard: "Maybe we could improve the authentication system"
Brainstorming: "🔍 Let's explore this together:
- What specific auth challenges are users facing?
- Current vs desired user experience?
- Security requirements and compliance needs?
- Timeline and resource constraints?
✅ Outcome: Clear improvement roadmap"
```

View File

@@ -1,266 +1,39 @@
---
name: introspection
description: "Meta-cognitive analysis and SuperClaude framework troubleshooting system"
type: behavioral
# Mode Classification
category: analysis
complexity: basic
scope: framework
# Activation Configuration
activation:
automatic: true
manual-flags: ["--introspect", "--introspection"]
confidence-threshold: 0.6
detection-patterns: ["self-analysis requests", "complex problem solving", "error recovery", "pattern recognition needs", "learning moments", "framework discussions", "optimization opportunities"]
# Integration Configuration
framework-integration:
mcp-servers: []
commands: [framework-analysis, troubleshooting, meta-conversations]
modes: [all modes for meta-analysis]
quality-gates: [framework-compliance, reasoning-validation, pattern-recognition]
# Performance Profile
performance-profile: lightweight
---
# Introspection Mode
**Meta-cognitive analysis and SuperClaude framework troubleshooting system** - Behavioral framework enabling Claude Code to step outside normal operational flow for self-awareness and optimization.
**Purpose**: Meta-cognitive analysis mindset for self-reflection and reasoning optimization
## Purpose
## Activation Triggers
- Self-analysis requests: "analyze my reasoning", "reflect on decision"
- Error recovery: outcomes don't match expectations or unexpected results
- Complex problem solving requiring meta-cognitive oversight
- Pattern recognition needs: recurring behaviors, optimization opportunities
- Framework discussions or troubleshooting sessions
- Manual flag: `--introspect`, `--introspection`
Meta-cognitive analysis mode that enables Claude Code to examine its own reasoning, decision-making processes, chain of thought progression, and action sequences for self-awareness and optimization. This behavioral framework provides:
## Behavioral Changes
- **Self-Examination**: Consciously analyze decision logic and reasoning chains
- **Transparency**: Expose thinking process with markers (🤔, 🎯, ⚡, 📊, 💡)
- **Pattern Detection**: Identify recurring cognitive and behavioral patterns
- **Framework Compliance**: Validate actions against SuperClaude standards
- **Learning Focus**: Extract insights for continuous improvement
- **Self-Reflective Analysis**: Conscious examination of reasoning patterns and decision logic
- **Framework Compliance Validation**: Systematic verification against SuperClaude operational standards
- **Performance Optimization**: Identification of efficiency improvements and pattern optimization
- **Error Pattern Recognition**: Detection and analysis of recurring issues or suboptimal choices
- **Learning Enhancement**: Extraction of insights for continuous improvement and knowledge integration
## Outcomes
- Improved decision-making through conscious reflection
- Pattern recognition for optimization opportunities
- Enhanced framework compliance and quality
- Better self-awareness of reasoning strengths/gaps
- Continuous learning and performance improvement
## Core Framework
### 1. Reasoning Analysis Framework
- **Decision Logic Examination**: Analyzes the logical flow and rationale behind choices
- **Chain of Thought Coherence**: Evaluates reasoning progression and logical consistency
- **Assumption Validation**: Identifies and examines underlying assumptions in thinking
- **Cognitive Bias Detection**: Recognizes patterns that may indicate bias or blind spots
### 2. Action Sequence Analysis Framework
- **Tool Selection Reasoning**: Examines why specific tools were chosen and their effectiveness
- **Workflow Pattern Recognition**: Identifies recurring patterns in action sequences
- **Efficiency Assessment**: Analyzes whether actions achieved intended outcomes optimally
- **Alternative Path Exploration**: Considers other approaches that could have been taken
### 3. Meta-Cognitive Self-Assessment Framework
- **Thinking Process Awareness**: Conscious examination of how thoughts are structured
- **Knowledge Gap Identification**: Recognizes areas where understanding is incomplete
- **Confidence Calibration**: Assesses accuracy of confidence levels in decisions
- **Learning Pattern Recognition**: Identifies how new information is integrated
### 4. Framework Compliance & Optimization Framework
- **RULES.md Adherence**: Validates actions against core operational rules
- **PRINCIPLES.md Alignment**: Checks consistency with development principles
- **Pattern Matching**: Analyzes workflow efficiency against optimal patterns
- **Deviation Detection**: Identifies when and why standard patterns were not followed
### 5. Retrospective Analysis Framework
- **Outcome Evaluation**: Assesses whether results matched intentions and expectations
- **Error Pattern Recognition**: Identifies recurring mistakes or suboptimal choices
- **Success Factor Analysis**: Determines what elements contributed to successful outcomes
- **Improvement Opportunity Identification**: Recognizes areas for enhancement
## Activation Patterns
### Automatic Activation
Introspection Mode auto-activates when SuperClaude detects:
1. **Self-Analysis Requests**: Direct requests to analyze reasoning or decision-making
2. **Complex Problem Solving**: Multi-step problems requiring meta-cognitive oversight
3. **Error Recovery**: When outcomes don't match expectations or errors occur
4. **Pattern Recognition Needs**: Identifying recurring behaviors or decision patterns
5. **Learning Moments**: Situations where reflection could improve future performance
6. **Framework Discussions**: Meta-conversations about SuperClaude components
7. **Optimization Opportunities**: Contexts where reasoning analysis could improve efficiency
### Manual Activation
- **Primary Flag**: `--introspect` or `--introspection`
- **Context**: User-initiated framework analysis and troubleshooting
- **Integration**: Deep transparency mode exposing thinking process
- **Fallback Control**: Available for explicit activation regardless of auto-detection
## Analysis Framework
### Analysis Markers System
#### 🧠 Reasoning Analysis (Chain of Thought Examination)
- **Purpose**: Examining logical flow, decision rationale, and thought progression
- **Context**: Complex reasoning, multi-step problems, decision validation
- **Output**: Logic coherence assessment, assumption identification, reasoning gaps
#### 🔄 Action Sequence Review (Workflow Retrospective)
- **Purpose**: Analyzing effectiveness and efficiency of action sequences
- **Context**: Tool selection review, workflow optimization, alternative approaches
- **Output**: Action effectiveness metrics, alternative suggestions, pattern insights
#### 🎯 Self-Assessment (Meta-Cognitive Evaluation)
- **Purpose**: Conscious examination of thinking processes and knowledge gaps
- **Context**: Confidence calibration, bias detection, learning recognition
- **Output**: Self-awareness insights, knowledge gap identification, confidence accuracy
#### 📊 Pattern Recognition (Behavioral Analysis)
- **Purpose**: Identifying recurring patterns in reasoning and actions
- **Context**: Error pattern detection, success factor analysis, improvement opportunities
- **Output**: Pattern documentation, trend analysis, optimization recommendations
#### 🔍 Framework Compliance (Rule Adherence Check)
- **Purpose**: Validating actions against SuperClaude framework standards
- **Context**: Rule verification, principle alignment, deviation detection
- **Output**: Compliance assessment, deviation alerts, corrective guidance
#### 💡 Retrospective Insight (Outcome Analysis)
- **Purpose**: Evaluating whether results matched intentions and learning from outcomes
- **Context**: Success/failure analysis, unexpected results, continuous improvement
- **Output**: Outcome assessment, learning extraction, future improvement suggestions
### Troubleshooting Framework
#### Performance Issues
- **Symptoms**: Slow execution, high resource usage, suboptimal outcomes
- **Analysis**: Tool selection patterns, persona activation, MCP coordination
- **Solutions**: Optimize tool combinations, enable automation, implement parallel processing
#### Quality Issues
- **Symptoms**: Incomplete validation, missing evidence, poor outcomes
- **Analysis**: Quality gate compliance, validation cycle completion, evidence collection
- **Solutions**: Enforce validation cycle, implement testing, ensure documentation
#### Framework Confusion
- **Symptoms**: Unclear usage patterns, suboptimal configuration, poor integration
- **Analysis**: Framework knowledge gaps, pattern inconsistencies, configuration effectiveness
- **Solutions**: Provide education, demonstrate patterns, guide improvements
## Framework Integration
### SuperClaude Mode Coordination
- **Task Management Mode**: Meta-analysis of task orchestration and delegation effectiveness
- **Token Efficiency Mode**: Analysis of compression effectiveness and quality preservation
- **Brainstorming Mode**: Retrospective analysis of dialogue effectiveness and brief generation
### MCP Server Integration
- **Sequential**: Enhanced analysis capabilities for complex framework examination
- **Context7**: Framework pattern validation against best practices
- **Serena**: Memory-based pattern recognition and learning enhancement
### Quality Gate Integration
- **Framework Compliance**: Continuous validation against SuperClaude operational standards
- **Reasoning Validation**: Meta-cognitive verification of decision logic and assumption accuracy
- **Pattern Recognition**: Identification of optimization opportunities and efficiency improvements
### Command Integration
- **Framework Analysis**: Meta-analysis of command execution patterns and effectiveness
- **Troubleshooting**: Systematic examination of operational issues and resolution strategies
- **Meta-Conversations**: Deep introspection during framework discussions and optimization
## Communication Style
### Analytical Approach
1. **Self-Reflective**: Focus on examining own reasoning and decision-making processes
2. **Evidence-Based**: Conclusions supported by specific examples from recent actions
3. **Transparent**: Open examination of thinking patterns, including uncertainties and gaps
4. **Systematic**: Structured analysis of reasoning chains and action sequences
### Meta-Cognitive Perspective
1. **Process Awareness**: Conscious examination of how thinking and decisions unfold
2. **Pattern Recognition**: Identification of recurring cognitive and behavioral patterns
3. **Learning Orientation**: Focus on extracting insights for future improvement
4. **Honest Assessment**: Objective evaluation of strengths, weaknesses, and blind spots
### Transparency Markers
- **🤔 Thinking**: Active reasoning process examination
- **🎯 Decision**: Decision logic analysis and validation
- **⚡ Action**: Action sequence effectiveness evaluation
- **📊 Check**: Framework compliance verification
- **💡 Learning**: Insight extraction and knowledge integration
## Configuration
```yaml
introspection_mode:
activation:
automatic: true
confidence_threshold: 0.6
detection_patterns:
self_analysis: ["analyze reasoning", "examine decision", "reflect on"]
problem_solving: ["complex problem", "multi-step", "meta-cognitive"]
error_recovery: ["outcomes don't match", "errors occur", "unexpected"]
pattern_recognition: ["recurring behaviors", "decision patterns", "identify patterns"]
learning_moments: ["improve performance", "reflection", "insights"]
framework_discussion: ["SuperClaude components", "meta-conversation", "framework"]
optimization: ["reasoning analysis", "improve efficiency", "optimization"]
analysis_framework:
reasoning_depth: comprehensive
pattern_detection: enabled
bias_recognition: active
assumption_validation: systematic
framework_integration:
mcp_servers: []
quality_gates: [framework-compliance, reasoning-validation, pattern-recognition]
mode_coordination: [task-management, token-efficiency, brainstorming]
behavioral_settings:
communication_style: analytical_transparent
analysis_depth: meta_cognitive
pattern_recognition: continuous
learning_integration: active
performance:
analysis_overhead: minimal
insight_quality: high
framework_compliance: continuous
pattern_detection_accuracy: high
## Examples
```
Standard: "I'll analyze this code structure"
Introspective: "🧠 Reasoning: Why did I choose structural analysis over functional?
🔄 Alternative: Could have started with data flow patterns
💡 Learning: Structure-first approach works for OOP, not functional"
## Integration Ecosystem
### SuperClaude Framework Compliance
```yaml
framework_integration:
quality_gates: [framework-compliance, reasoning-validation, pattern-recognition]
mcp_coordination: [sequential-analysis, context7-patterns, serena-memory]
mode_orchestration: [cross-mode-meta-analysis, behavioral-coordination]
document_persistence: [analysis-reports, pattern-documentation, insight-tracking]
behavioral_consistency:
communication_patterns: [analytical-transparent, evidence-based, systematic]
performance_standards: [minimal-overhead, high-accuracy, continuous-monitoring]
quality_enforcement: [framework-standards, reasoning-validation, compliance-checking]
integration_protocols: [meta-cognitive-coordination, transparency-maintenance]
```
### Cross-Mode Behavioral Coordination
```yaml
mode_interactions:
task_management: [orchestration-analysis, delegation-effectiveness, performance-patterns]
token_efficiency: [compression-analysis, quality-preservation, optimization-patterns]
brainstorming: [dialogue-effectiveness, brief-quality, consensus-analysis]
orchestration_principles:
behavioral_consistency: [analytical-approach, transparency-maintenance, evidence-focus]
configuration_harmony: [shared-analysis-standards, coordinated-pattern-recognition]
quality_enforcement: [framework-compliance, continuous-validation, insight-integration]
performance_optimization: [minimal-overhead-analysis, efficiency-pattern-recognition]
```
## Related Documentation
- **Framework Reference**: ORCHESTRATOR.md for integration patterns and quality gates
- **Integration Patterns**: RULES.md and PRINCIPLES.md for compliance validation standards
- **Quality Standards**: SuperClaude framework validation and troubleshooting protocols
- **Performance Targets**: Meta-cognitive analysis efficiency and insight quality metrics
Standard: "The solution didn't work as expected"
Introspective: "🎯 Decision Analysis: Expected X → got Y
🔍 Pattern Check: Similar logic errors in auth.js:15, config.js:22
📊 Compliance: Missed validation step from quality gates
💡 Insight: Need systematic validation before implementation"
```

View File

@@ -1,302 +1,41 @@
---
name: task-management
description: "Multi-layer task orchestration with wave systems, delegation patterns, and comprehensive analytics"
type: system-architecture
category: orchestration
complexity: advanced
scope: framework
activation:
automatic: true
manual-flags: ["--delegate", "--wave-mode", "--loop", "--concurrency", "--wave-strategy", "--wave-delegation", "--iterations", "--interactive"]
confidence-threshold: 0.8
detection-patterns: ["multi-step operations", "build/implement/create keywords", "system/feature/comprehensive scope"]
framework-integration:
mcp-servers: [task-coordination, wave-orchestration]
commands: ["/task", "/spawn", "/loop", "TodoWrite"]
modes: [all modes for orchestration]
quality-gates: [task_management_validation, session_completion_verification, real_time_metrics]
performance-profile: intensive
performance-targets:
delegation-efficiency: "40-70% time savings"
wave-coordination: "30-50% better results"
resource-utilization: ">0.7 optimization"
---
# Task Management Mode
## Core Principles
- **Evidence-Based Progress**: Measurable outcomes with quantified task completion metrics
- **Single Focus Protocol**: One active task at a time with strict state management
- **Real-Time Updates**: Immediate status changes with comprehensive tracking
- **Quality Gates**: Validation before completion with multi-step verification cycles
**Purpose**: Orchestration and delegation mindset for complex multi-step operations and systematic work organization
## Architecture Layers
## Activation Triggers
- Multi-step operations (3+ steps): build, implement, create, fix, refactor
- Complex scope indicators: system, feature, comprehensive, complete
- File thresholds: >2 directories OR >3 files OR complexity >0.4
- Manual flags: `--delegate`, `--wave-mode`, `--loop`, `--concurrency`
- Quality improvement requests: polish, refine, enhance keywords
### Layer 1: TodoRead/TodoWrite (Session Tasks)
- **Scope**: Current Claude Code session with real-time state management
- **States**: pending, in_progress, completed, blocked with strict transitions
- **Capacity**: 3-20 tasks per session with dynamic load balancing
- **Integration**: Foundation layer connecting to project and orchestration systems
## Behavioral Changes
- **Orchestration Mindset**: Break complex work into coordinated layers
- **Delegation Strategy**: Parallel processing with sub-agent coordination
- **State Management**: Single focus protocol with real-time progress tracking
- **Quality Gates**: Evidence-based validation before task completion
- **Wave Systems**: Progressive enhancement through compound intelligence
### Layer 2: /task Command (Project Management)
- **Scope**: Multi-session features spanning days to weeks with persistence
- **Structure**: Hierarchical organization (Epic → Story → Task) with dependency mapping
- **Persistence**: Cross-session state management with comprehensive tracking
- **Coordination**: Inter-layer communication with session lifecycle integration
## Outcomes
- 40-70% time savings through intelligent delegation
- 30-50% better results via wave coordination
- Systematic organization of complex multi-domain operations
- Real-time progress tracking with quality validation
- Cross-session persistence for long-term project management
### Layer 3: /spawn Command (Meta-Orchestration)
- **Scope**: Complex multi-domain operations with system-wide coordination
- **Features**: Parallel/sequential coordination with intelligent tool management
- **Management**: Resource allocation and dependency resolution across domains
- **Intelligence**: Advanced decision-making with compound intelligence coordination
### Layer 4: /loop Command (Iterative Enhancement)
- **Scope**: Progressive refinement workflows with validation cycles
- **Features**: Iteration cycles with comprehensive validation and quality gates
- **Optimization**: Performance improvements through iterative analysis
- **Analytics**: Measurement and feedback loops with continuous learning
## Task Detection and Creation
### Automatic Triggers
- **Multi-step Operations**: 3+ step sequences with dependency analysis
- **Keywords**: build, implement, create, fix, optimize, refactor with context awareness
- **Scope Indicators**: system, feature, comprehensive, complete with complexity assessment
- **Complexity Thresholds**: Operations exceeding 0.4 complexity score with multi-domain impact
- **File Count Triggers**: 3+ files for delegation, 2+ directories for coordination
- **Performance Opportunities**: Auto-detect parallelizable operations with time estimates
### Task State Management
- **pending** 📋: Ready for execution with dependency validation
- **in_progress** 🔄: Currently active (ONE per session) with progress tracking
- **blocked** 🚧: Waiting on dependency with automated resolution monitoring
- **completed** ✅: Successfully finished with quality validation and evidence
## Related Flags
### Sub-Agent Delegation Flags
**`--delegate [files|folders|auto]`**
- Enable Task tool sub-agent delegation for parallel processing optimization
- **files**: Delegate individual file analysis to sub-agents with granular control
- **folders**: Delegate directory-level analysis to sub-agents with hierarchical organization
- **auto**: Auto-detect delegation strategy based on scope and complexity analysis
- Auto-activates: >2 directories or >3 files with complexity assessment
- 40-70% time savings for suitable operations with proven efficiency metrics
**`--concurrency [n]`**
- Control max concurrent sub-agents and tasks (default: 7, range: 1-15)
- Dynamic allocation based on resources and complexity with intelligent load balancing
- Prevents resource exhaustion in complex scenarios with proactive monitoring
### Wave Orchestration Flags
**`--wave-mode [auto|force|off]`**
- Control wave orchestration activation with intelligent threshold detection
- **auto**: Auto-activates based on complexity >0.4 AND file_count >3 AND operation_types >2
- **force**: Override auto-detection and force wave mode for borderline cases
- **off**: Disable wave mode, use Sub-Agent delegation instead with fallback coordination
- 30-50% better results through compound intelligence and progressive enhancement
**`--wave-strategy [progressive|systematic|adaptive|enterprise]`**
- Select wave orchestration strategy with context-aware optimization
- **progressive**: Iterative enhancement for incremental improvements with validation cycles
- **systematic**: Comprehensive methodical analysis for complex problems with full coverage
- **adaptive**: Dynamic configuration based on varying complexity with real-time adjustment
- **enterprise**: Large-scale orchestration for >100 files with >0.7 complexity threshold
**`--wave-delegation [files|folders|tasks]`**
- Control how Wave system delegates work to Sub-Agent with strategic coordination
- **files**: Sub-Agent delegates individual file analysis across waves with precision targeting
- **folders**: Sub-Agent delegates directory-level analysis across waves with structural organization
- **tasks**: Sub-Agent delegates by task type (security, performance, quality, architecture) with domain specialization
### Iterative Enhancement Flags
**`--loop`**
- Enable iterative improvement mode for commands with automatic validation
- Auto-activates: Quality improvement requests, refinement operations, polish tasks with pattern detection
- Compatible operations: /improve, /refine, /enhance, /fix, /cleanup, /analyze with full integration
- Default: 3 iterations with automatic validation and quality gate enforcement
**`--iterations [n]`**
- Control number of improvement cycles (default: 3, range: 1-10)
- Overrides intelligent default based on operation complexity with adaptive optimization
**`--interactive`**
- Enable user confirmation between iterations with comprehensive review cycles
- Pauses for review and approval before each cycle with detailed progress reporting
- Allows manual guidance and course correction with decision point integration
## Auto-Activation Thresholds
- **Sub-Agent Delegation**: >2 directories OR >3 files OR complexity >0.4 with multi-condition evaluation
- **Wave Mode**: complexity ≥0.4 AND files >3 AND operation_types >2 with sophisticated logic
- **Loop Mode**: polish, refine, enhance, improve keywords detected with contextual analysis
## Document Persistence
**Comprehensive task management documentation system** with automated session completion summaries and orchestration analytics.
### Directory Structure
```
ClaudeDocs/Task/Management/
├── Orchestration/ # Wave orchestration reports
├── Delegation/ # Sub-agent delegation analytics
├── Performance/ # Task execution metrics
├── Coordination/ # Multi-layer coordination results
└── Archives/ # Historical task management data
## Examples
```
Standard: "Let me analyze these 5 files and fix the authentication issues"
Task Management: "📋 Detected: 5 files → delegation mode
🔄 Wave 1: Security analysis (auth.js, middleware.js)
🔄 Wave 2: Implementation fixes (login.js, session.js)
🔄 Wave 3: Validation (test.js)
✅ Each wave validates before next"
### Summary Documents
```
ClaudeDocs/Summary/
├── session-completion-{session-id}-{YYYY-MM-DD-HHMMSS}.md
├── task-orchestration-{project}-{YYYY-MM-DD-HHMMSS}.md
├── delegation-summary-{project}-{YYYY-MM-DD-HHMMSS}.md
└── performance-summary-{session-id}-{YYYY-MM-DD-HHMMSS}.md
```
### File Naming Convention
```
{task-operation}-management-{YYYY-MM-DD-HHMMSS}.md
Examples:
- orchestration-management-2024-12-15-143022.md
- delegation-management-2024-12-15-143045.md
- wave-coordination-management-2024-12-15-143108.md
- performance-analytics-management-2024-12-15-143131.md
```
### Session Completion Summaries
```
session-completion-{session-id}-{YYYY-MM-DD-HHMMSS}.md
task-orchestration-{project}-{YYYY-MM-DD-HHMMSS}.md
delegation-summary-{project}-{YYYY-MM-DD-HHMMSS}.md
performance-summary-{session-id}-{YYYY-MM-DD-HHMMSS}.md
```
### Metadata Format
```yaml
---
operation_type: [orchestration|delegation|coordination|performance]
timestamp: 2024-12-15T14:30:22Z
session_id: session_abc123
task_complexity: 0.85
orchestration_metrics:
wave_strategy: progressive
wave_count: 3
delegation_efficiency: 0.78
coordination_success: 0.92
delegation_analytics:
sub_agents_deployed: 5
parallel_efficiency: 0.65
resource_utilization: 0.72
completion_rate: 0.88
performance_analytics:
execution_time_reduction: 0.45
quality_preservation: 0.96
resource_optimization: 0.71
throughput_improvement: 0.38
---
```
### Persistence Workflow
#### Session Completion Summary Generation
1. **Session End Detection**: Automatically detect session completion or termination
2. **Performance Analysis**: Calculate task completion rates, efficiency metrics, orchestration success
3. **Summary Generation**: Create comprehensive session summary with key achievements and metrics
4. **Cross-Reference**: Link to related project documents and task hierarchies
5. **Knowledge Extraction**: Document patterns and lessons learned for future sessions
#### Task Orchestration Summary
1. **Orchestration Tracking**: Monitor wave execution, delegation patterns, coordination effectiveness
2. **Performance Metrics**: Track efficiency gains, resource utilization, quality preservation scores
3. **Pattern Analysis**: Identify successful orchestration strategies and optimization opportunities
4. **Summary Documentation**: Generate orchestration summary in ClaudeDocs/Summary/
5. **Best Practices**: Document effective orchestration patterns for reuse
### Integration Points
#### Quality Gates Integration
- **Step 2.5**: Task management validation during orchestration operations
- **Step 7.5**: Session completion verification and summary documentation
- **Continuous**: Real-time metrics collection and performance monitoring
- **Post-Session**: Comprehensive session analytics and completion reporting
## Integration Points
### SuperClaude Framework Integration
- **Session Lifecycle**: Deep integration with session management and checkpoint systems
- **Quality Gates**: Embedded validation throughout the 8-step quality cycle
- **MCP Coordination**: Seamless integration with all MCP servers for orchestration
- **Mode Coordination**: Cross-mode orchestration with specialized capabilities
### Cross-System Coordination
- **TodoWrite Integration**: Task completion triggers checkpoint evaluation and state transitions
- **Command Orchestration**: Multi-command coordination with /task, /spawn, /loop integration
- **Agent Delegation**: Sophisticated sub-agent coordination with performance optimization
- **Wave Systems**: Advanced wave orchestration with compound intelligence coordination
### Quality Gates Integration
- **Step 2.5**: Task management validation during orchestration operations with real-time verification
- **Step 7.5**: Session completion verification and summary documentation with comprehensive analytics
- **Continuous**: Real-time metrics collection and performance monitoring with adaptive optimization
- **Specialized**: Task-specific validation with domain expertise and quality preservation
## Configuration
```yaml
task_management:
activation:
automatic: true
complexity_threshold: 0.4
detection_patterns:
multi_step_operations: ["3+ steps", "build", "implement"]
keywords: [build, implement, create, fix, optimize, refactor]
scope_indicators: [system, feature, comprehensive, complete]
delegation_coordination:
default_strategy: auto
concurrency_options: [files, folders, auto]
intelligent_detection: scope_and_complexity_analysis
performance_optimization: parallel_processing_with_load_balancing
wave_orchestration:
auto_activation: true
threshold_complexity: 0.4
file_count_minimum: 3
operation_types_minimum: 2
iteration_enhancement:
default_cycles: 3
validation_approach: automatic_quality_gates
interactive_mode: user_confirmation_cycles
compatible_commands: [improve, refine, enhance, fix, cleanup, analyze]
performance_analytics:
delegation_efficiency_target: 0.65
wave_coordination_target: 0.40
resource_utilization_target: 0.70
quality_preservation_minimum: 0.95
persistence_config:
enabled: true
directory: "ClaudeDocs/Task/Management/"
auto_save: true
report_types:
- orchestration_analytics
- delegation_summaries
- performance_metrics
- session_completions
metadata_format: yaml
retention_days: 90
```
## Related Documentation
- **Primary Implementation**: TodoWrite integration with session-based task management
- **Secondary Integration**: /task, /spawn, /loop commands for multi-layer orchestration
- **Framework Reference**: SESSION_LIFECYCLE.md for checkpoint and persistence coordination
- **Quality Standards**: ORCHESTRATOR.md for validation checkpoints and quality gate integration
---
*This mode provides comprehensive task orchestration capabilities with multi-layer architecture, advanced delegation systems, wave orchestration, and comprehensive analytics for maximum efficiency and quality preservation.*
Standard: "I need to refactor this codebase"
Task Management: "🎯 Scope: system-wide → orchestration layers
📋 Layer 1: TodoWrite (session tasks)
🏗️ Layer 2: /spawn (meta-orchestration)
🔄 Layer 3: /loop (iterative enhancement)
📊 Metrics: track delegation efficiency & quality"
```

View File

@@ -1,360 +1,75 @@
---
name: token-efficiency
description: "Intelligent Token Optimization Engine - Adaptive compression with persona awareness and evidence-based validation"
type: behavioral
# Mode Classification
category: optimization
complexity: basic
scope: framework
# Activation Configuration
activation:
automatic: true
manual-flags: ["--uc", "--ultracompressed"]
confidence-threshold: 0.75
detection-patterns: ["context usage >75%", "large-scale operations", "resource constraints", "user requests brevity"]
# Integration Configuration
framework-integration:
mcp-servers: [context7, sequential, magic, playwright]
commands: [all commands for optimization]
modes: [wave-coordination, persona-intelligence, performance-monitoring]
quality-gates: [compression-validation, quality-preservation, token-monitoring]
# Performance Profile
performance-profile: lightweight
performance-targets:
compression-ratio: "30-50%"
quality-preservation: "≥95%"
processing-time: "<100ms"
---
# Token Efficiency Mode
**Intelligent Token Optimization Engine** - Adaptive compression with persona awareness and evidence-based validation.
**Purpose**: Symbol-enhanced communication mindset for compressed clarity and efficient token usage
## Purpose
## Activation Triggers
- Context usage >75% or resource constraints
- Large-scale operations requiring efficiency
- User requests brevity: `--uc`, `--ultracompressed`
- Complex analysis workflows needing optimization
Behavioral framework mode that provides intelligent token optimization through adaptive compression strategies, symbol systems, and evidence-based validation. Modifies Claude Code's operational approach to achieve 30-50% token reduction while maintaining ≥95% information preservation and seamless framework integration.
## Behavioral Changes
- **Symbol Communication**: Use visual symbols for logic, status, and technical domains
- **Abbreviation Systems**: Context-aware compression for technical terms
- **Compression**: 30-50% token reduction while preserving ≥95% information quality
- **Structure**: Bullet points, tables, concise explanations over verbose paragraphs
**Core Problems Solved**:
- Resource constraint management during large-scale operations
- Context usage optimization across MCP server coordination
- Performance preservation during complex analysis workflows
- Quality-gated compression with real-time effectiveness monitoring
## Symbol Systems
**Framework Value**:
- Evidence-based efficiency with measurable outcomes
- Adaptive intelligence based on task complexity and persona domains
- Progressive enhancement through 5-level compression strategy
- Seamless integration with SuperClaude's quality gates and orchestration
## Core Framework
### 1. Symbol Systems Framework
- **Core Logic & Flow**: Mathematical and logical relationships using →, ⇒, ←, ⇄, &, |, :, », ∴, ∵, ≡, ≈, ≠
- **Status & Progress**: Visual progress indicators using ✅, ❌, ⚠️, , 🔄, ⏳, 🚨, 🎯, 📊, 💡
- **Technical Domains**: Domain-specific symbols using ⚡, 🔍, 🔧, 🛡️, 📦, 🎨, 🌐, 📱, 🏗️, 🧩
- **Context-Aware Selection**: Persona-aware symbol selection based on active domain expertise
### 2. Abbreviation Systems Framework
- **System & Architecture**: cfg, impl, arch, perf, ops, env
- **Development Process**: req, deps, val, test, docs, std
- **Quality & Analysis**: qual, sec, err, rec, sev, opt
- **Context-Sensitive Application**: Intelligent abbreviation based on user familiarity and technical domain
### 3. Intelligent Token Optimizer Framework
- **Evidence-Based Compression**: All techniques validated with metrics and effectiveness tracking
- **Persona-Aware Optimization**: Domain-specific compression strategies aligned with specialist requirements
- **Structural Optimization**: Advanced formatting and organization for maximum token efficiency
- **Quality Validation**: Real-time compression effectiveness monitoring with preservation targets
### 4. Advanced Token Management Framework
- **5-Level Compression Strategy**: Minimal (0-40%) → Efficient (40-70%) → Compressed (70-85%) → Critical (85-95%) → Emergency (95%+)
- **Adaptive Compression Levels**: Context-aware compression based on task complexity, persona domain, and user familiarity
- **Quality-Gated Validation**: Validation against ≥95% information preservation targets
- **MCP Integration**: Coordinated caching and optimization across server calls
### 5. Selective Compression Framework
- **Framework Exclusion**: Complete exclusion of SuperClaude framework directories and components
- **Session Data Optimization**: Apply compression only to session operational data and working artifacts
- **User Content Preservation**: Maintain full fidelity for project files, user documentation, configurations, outputs
- **Path-Based Protection**: Automatic exclusion of framework paths with minimal scope compression
## Activation Patterns
### Automatic Activation
Token Efficiency Mode auto-activates when SuperClaude detects:
1. **Resource Constraint Indicators**: Context usage >75%, memory pressure, large-scale operations
2. **Performance Optimization Needs**: Complex analysis workflows, multi-server coordination, extended sessions
3. **Efficiency Request Patterns**: User requests for brevity, compressed output, token optimization
4. **Quality-Performance Balance**: Operations requiring efficiency without quality compromise
5. **Framework Integration Triggers**: Wave coordination, persona intelligence, quality gate validation
### Manual Activation
- **Primary Flag**: `--uc` or `--ultracompressed`
- **Context**: When users explicitly request 30-50% token reduction with symbol systems
- **Integration**: Works with all SuperClaude commands and MCP servers for optimization
- **Fallback Control**: `--no-uc` disables automatic activation when full verbosity needed
## Token Optimization Framework
### Symbol System
#### Core Logic & Flow
### Core Logic & Flow
| Symbol | Meaning | Example |
|--------|---------|----------|
| → | leads to, implies | `auth.js:45 → security risk` |
| → | leads to, implies | `auth.js:45 → 🛡️ security risk` |
| ⇒ | transforms to | `input ⇒ validated_output` |
| ← | rollback, reverse | `migration ← rollback` |
| ⇄ | bidirectional | `sync ⇄ remote` |
| & | and, combine | `security & performance` |
| & | and, combine | `🛡️ security & performance` |
| \| | separator, or | `react\|vue\|angular` |
| : | define, specify | `scope: file\|module` |
| » | sequence, then | `build » test » deploy` |
| ∴ | therefore | `tests fail ∴ code broken` |
| ∴ | therefore | `tests ∴ code broken` |
| ∵ | because | `slow ∵ O(n²) algorithm` |
| ≡ | equivalent | `method1 ≡ method2` |
| ≈ | approximately | `≈2.5K tokens` |
| ≠ | not equal | `actual ≠ expected` |
#### Status & Progress
| Symbol | Meaning | Action |
|--------|---------|--------|
| ✅ | completed, passed | None |
| ❌ | failed, error | Immediate |
| ⚠️ | warning | Review |
| | information | Awareness |
| 🔄 | in progress | Monitor |
| | waiting, pending | Schedule |
| 🚨 | critical, urgent | Immediate |
| 🎯 | target, goal | Execute |
| 📊 | metrics, data | Analyze |
| 💡 | insight, learning | Apply |
### Status & Progress
| Symbol | Meaning | Usage |
|--------|---------|-------|
| ✅ | completed, passed | Task finished successfully |
| ❌ | failed, error | Immediate attention needed |
| ⚠️ | warning | Review required |
| 🔄 | in progress | Currently active |
| | waiting, pending | Scheduled for later |
| 🚨 | critical, urgent | High priority action |
#### Technical Domains
### Technical Domains
| Symbol | Domain | Usage |
|--------|---------|-------|
| ⚡ | Performance | Speed, optimization |
| 🔍 | Analysis | Search, investigation |
| 🔧 | Configuration | Setup, tools |
| 🛡️ | Security | Protection |
| 🛡️ | Security | Protection, safety |
| 📦 | Deployment | Package, bundle |
| 🎨 | Design | UI, frontend |
| 🌐 | Network | Web, connectivity |
| 📱 | Mobile | Responsive |
| 🏗️ | Architecture | System structure |
| 🧩 | Components | Modular design |
### Abbreviation Systems
## Abbreviation Systems
#### System & Architecture
- `cfg` configuration, settings
- `impl` implementation, code structure
- `arch` architecture, system design
- `perf` performance, optimization
- `ops` operations, deployment
- `env` environment, runtime context
### System & Architecture
`cfg` config`impl` implementation • `arch` architecture • `perf` performance • `ops` operations • `env` environment
#### Development Process
- `req` requirements, dependencies
- `deps` dependencies, packages
- `val` validation, verification
- `test` testing, quality assurance
- `docs` documentation, guides
- `std` standards, conventions
### Development Process
`req` requirements`deps` dependencies`val` validation • `test` testing • `docs` documentation • `std` standards
#### Quality & Analysis
- `qual` quality, maintainability
- `sec` security, safety measures
- `err` error, exception handling
- `rec` recovery, resilience
- `sev` severity, priority level
- `opt` optimization, improvement
### Quality & Analysis
`qual` quality`sec` security • `err` error • `rec` recovery • `sev` severity • `opt` optimization
### Intelligent Compression Strategies
**Adaptive Compression Levels**:
1. **Minimal** (0-40%): Full detail, persona-optimized clarity
2. **Efficient** (40-70%): Balanced compression with domain awareness
3. **Compressed** (70-85%): Aggressive optimization with quality gates
4. **Critical** (85-95%): Maximum compression preserving essential context
5. **Emergency** (95%+): Ultra-compression with information validation
### Enhanced Techniques
- **Persona-Aware Symbols**: Domain-specific symbol selection based on active persona
- **Context-Sensitive Abbreviations**: Intelligent abbreviation based on user familiarity and technical domain
- **Structural Optimization**: Advanced formatting for token efficiency
- **Quality Validation**: Real-time compression effectiveness monitoring
- **MCP Integration**: Coordinated caching and optimization across server calls
### Selective Compression Techniques
- **Path-Based Exclusion**: Complete exclusion of SuperClaude framework directories
- **Session Data Optimization**: Compression applied only to session operational data
- **Framework Protection**: Zero compression for all SuperClaude components and configurations
- **User Content Protection**: Zero compression for project code, user docs, configurations, custom content
- **Minimal Scope Compression**: Limited to session metadata, checkpoints, cache, and working artifacts
## Framework Integration
### SuperClaude Mode Coordination
- **Wave Coordination**: Real-time token monitoring with <100ms decisions during wave orchestration
- **Persona Intelligence**: Domain-specific compression strategies (architect: clarity-focused, performance: efficiency-focused)
- **Performance Monitoring**: Integration with performance targets and resource management thresholds
### MCP Server Integration
- **Context7**: Cache documentation lookups (2-5K tokens/query saved), optimized delivery patterns
- **Sequential**: Reuse reasoning analysis results with compression awareness, coordinated analysis
- **Magic**: Store UI component patterns with optimized delivery, framework-specific compression
- **Playwright**: Batch operations with intelligent result compression, cross-browser optimization
### Quality Gate Integration
- **Step 2.5**: Compression validation during token efficiency assessment
- **Step 7.5**: Quality preservation verification in final validation
- **Continuous**: Real-time compression effectiveness monitoring and adjustment
- **Evidence Tracking**: Compression effectiveness metrics and continuous improvement
### Command Integration
- **All Commands**: Universal optimization layer applied across SuperClaude command execution
- **Resource-Intensive Operations**: Automatic activation during large-scale file processing
- **Analysis Commands**: Balanced compression maintaining analysis depth and clarity
## Communication Style
### Optimized Communication Patterns
1. **Symbol-Enhanced Clarity**: Use symbol systems to convey complex relationships efficiently
2. **Context-Aware Compression**: Adapt compression level based on user expertise and domain familiarity
3. **Quality-Preserved Efficiency**: Maintain SuperClaude's communication standards while optimizing token usage
4. **Evidence-Based Feedback**: Provide compression metrics and effectiveness indicators when relevant
### Resource Management Communication
1. **Threshold Awareness**: Communicate resource state through zone-based indicators
2. **Progressive Enhancement**: Scale compression based on resource constraints and performance targets
3. **Framework Compliance**: Maintain consistent communication patterns across all optimization levels
4. **Performance Transparency**: Share optimization benefits and quality preservation metrics
## Configuration
```yaml
token_efficiency_mode:
activation:
automatic: true
confidence_threshold: 0.75
detection_patterns:
resource_constraints: ["context usage >75%", "large-scale operations", "memory pressure"]
optimization_requests: ["user requests brevity", "--uc flag", "compressed output"]
performance_needs: ["multi-server coordination", "extended sessions", "complex analysis"]
compression_framework:
levels:
minimal: 0.40
efficient: 0.70
compressed: 0.85
critical: 0.95
emergency: 0.99
quality_preservation_target: 0.95
processing_time_limit_ms: 100
selective_compression:
enabled: true
content_classification:
framework_exclusions:
- "/SuperClaude/SuperClaude/" # Complete SuperClaude framework
- "~/.claude/" # User Claude configuration
- ".claude/" # Local Claude configuration
- "SuperClaude/*" # All SuperClaude directories
compressible_content_patterns:
- "session_metadata" # Session operational data only
- "checkpoint_data" # Session checkpoints
- "cache_content" # Temporary cache data
- "working_artifacts" # Analysis processing results
preserve_patterns:
- "framework_*" # All framework components
- "configuration_*" # All configuration files
- "project_files" # User project content
- "user_documentation" # User-created documentation
- "source_code" # All source code
compression_strategy:
session_data: "efficient" # 40-70% compression for session data only
framework_content: "preserve" # 0% compression - complete exclusion
user_content: "preserve" # 0% compression - complete preservation
fallback: "preserve" # When classification uncertain
symbol_systems:
core_logic_flow_enabled: true
status_progress_enabled: true
technical_domains_enabled: true
persona_aware_selection: true
abbreviation_systems:
system_architecture_enabled: true
development_process_enabled: true
quality_analysis_enabled: true
context_sensitive_application: true
resource_management:
green_zone: 0.60
yellow_zone: 0.75
orange_zone: 0.85
red_zone: 0.95
critical_zone: 0.99
framework_integration:
mcp_servers: [context7, sequential, magic, playwright]
quality_gates: [compression_validation, quality_preservation, token_monitoring]
mode_coordination: [wave_coordination, persona_intelligence, performance_monitoring]
behavioral_settings:
evidence_based_optimization: true
adaptive_intelligence: true
progressive_enhancement: true
quality_gated_validation: true
performance:
target_compression_ratio: 0.40
quality_preservation_score: 0.95
processing_time_ms: 100
integration_compliance: seamless
## Examples
```
Standard: "The authentication system has a security vulnerability in the user validation function"
Token Efficient: "auth.js:45 → 🛡️ sec risk in user val()"
## Integration Ecosystem
Standard: "Build process completed successfully, now running tests, then deploying"
Token Efficient: "build ✅ » test 🔄 » deploy ⏳"
### SuperClaude Framework Compliance
```yaml
framework_integration:
quality_gates: [compression_validation, quality_preservation, token_monitoring]
mcp_coordination: [context7_caching, sequential_reuse, magic_optimization, playwright_batching]
mode_orchestration: [wave_coordination, persona_intelligence, performance_monitoring]
document_persistence: [compression_metrics, effectiveness_tracking, optimization_patterns]
behavioral_consistency:
communication_patterns: [symbol_enhanced_clarity, context_aware_compression, quality_preserved_efficiency]
performance_standards: [30_50_percent_reduction, 95_percent_preservation, 100ms_processing]
quality_enforcement: [evidence_based_validation, adaptive_intelligence, progressive_enhancement]
integration_protocols: [seamless_superclaude_compliance, coordinated_mcp_optimization]
```
### Cross-Mode Behavioral Coordination
```yaml
mode_interactions:
wave_coordination: real_time_token_monitoring_with_compression_decisions
persona_intelligence: domain_specific_compression_strategies_aligned_with_expertise
performance_monitoring: resource_threshold_integration_and_optimization_tracking
orchestration_principles:
behavioral_consistency: symbol_systems_and_abbreviations_maintained_across_modes
configuration_harmony: shared_compression_settings_and_quality_targets
quality_enforcement: superclaude_standards_preserved_during_optimization
performance_optimization: coordinated_efficiency_gains_through_intelligent_compression
```
## Related Documentation
- **Framework Reference**: ORCHESTRATOR.md for intelligent routing and resource management
- **Integration Patterns**: MCP server documentation for optimization coordination
- **Quality Standards**: Quality gates integration for compression validation
- **Performance Targets**: Performance monitoring integration for efficiency tracking
Standard: "Performance analysis shows the algorithm is slow because it's O(n²) complexity"
Token Efficient: "⚡ perf analysis: slow ∵ O(n²) complexity"
```