refactor: Complete V4 Beta framework restructuring

Major reorganization of SuperClaude V4 Beta directories:
- Moved SuperClaude-Lite content to Framework-Hooks/
- Renamed SuperClaude/ directories to Framework/ for clarity
- Created separate Framework-Lite/ for lightweight variant
- Consolidated hooks system under Framework-Hooks/

This restructuring aligns with the V4 Beta architecture:
- Framework/: Full framework with all features
- Framework-Lite/: Lightweight variant
- Framework-Hooks/: Hooks system implementation

Part of SuperClaude V4 Beta development roadmap.

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
NomenAK
2025-08-05 15:21:02 +02:00
parent 8ab6e9ebbe
commit 3e40322d0a
174 changed files with 10747 additions and 9341 deletions

View File

@@ -0,0 +1,98 @@
# Context7 MCP Server
## Purpose
Official library documentation, code examples, best practices, and localization standards
## Activation Patterns
**Automatic Activation**:
- External library imports detected in code
- Framework-specific questions or queries
- Scribe persona active for documentation tasks
- Documentation pattern requests
**Manual Activation**:
- Flag: `--c7`, `--context7`
**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

View File

@@ -0,0 +1,93 @@
# Magic MCP Server
## Purpose
Modern UI component generation, design system integration, and responsive design
## Activation Patterns
**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
**Manual Activation**:
- Flag: `--magic`
**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

View File

@@ -0,0 +1,159 @@
# 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
## 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)
- Bulk text replacements across multiple files
- Simple to moderate complexity edits (<10 files, complexity <0.6)
**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
### 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
### 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

View File

@@ -0,0 +1,102 @@
# Playwright MCP Server
## Purpose
Cross-browser E2E testing, performance monitoring, automation, and visual testing
## Activation Patterns
**Automatic Activation**:
- Testing workflows and test generation requests
- Performance monitoring requirements
- E2E test generation needs
- QA persona active
**Manual Activation**:
- Flag: `--play`, `--playwright`
**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

View File

@@ -0,0 +1,103 @@
# Sequential MCP Server
## Purpose
Multi-step problem solving, architectural analysis, systematic debugging
## 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
- Problems requiring hypothesis testing and validation
- Iterative refinement or improvement workflows
## Flags
**`--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
**`--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

207
Framework/MCP/MCP_Serena.md Normal file
View File

@@ -0,0 +1,207 @@
# 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
## 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
- Memory-driven development workflows
## Flags
**`--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
**`--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