mirror of
https://github.com/SuperClaude-Org/SuperClaude_Framework.git
synced 2025-12-29 16:16:08 +00:00
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:
89
Framework/Commands/analyze.md
Normal file
89
Framework/Commands/analyze.md
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
name: analyze
|
||||
description: "Analyze code quality, security, performance, and architecture with comprehensive reporting"
|
||||
allowed-tools: [Read, Bash, Grep, Glob, Write]
|
||||
|
||||
# Command Classification
|
||||
category: utility
|
||||
complexity: basic
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [] # No MCP servers required for basic commands
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
---
|
||||
|
||||
# /sc:analyze - Code Analysis and Quality Assessment
|
||||
|
||||
## Purpose
|
||||
Execute systematic code analysis across quality, security, performance, and architecture domains to identify issues, technical debt, and improvement opportunities with detailed reporting and actionable recommendations.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:analyze [target] [--focus quality|security|performance|architecture] [--depth quick|deep] [--format text|json|report]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Files, directories, modules, or entire project to analyze
|
||||
- `--focus` - Primary analysis domain (quality, security, performance, architecture)
|
||||
- `--depth` - Analysis thoroughness level (quick scan, deep inspection)
|
||||
- `--format` - Output format specification (text summary, json data, html report)
|
||||
|
||||
## Execution
|
||||
1. Discover and categorize source files using language detection and project structure analysis
|
||||
2. Apply domain-specific analysis techniques including static analysis and pattern matching
|
||||
3. Generate prioritized findings with severity ratings and impact assessment
|
||||
4. Create actionable recommendations with implementation guidance and effort estimates
|
||||
5. Present comprehensive analysis report with metrics, trends, and improvement roadmap
|
||||
|
||||
## Claude Code Integration
|
||||
- **Tool Usage**: Glob for file discovery, Grep for pattern analysis, Read for code inspection, Bash for tool execution
|
||||
- **File Operations**: Reads source files and configurations, writes analysis reports and metrics summaries
|
||||
- **Analysis Approach**: Multi-domain analysis combining static analysis, pattern matching, and heuristic evaluation
|
||||
- **Output Format**: Structured reports with severity classifications, metrics, and prioritized recommendations
|
||||
|
||||
## Performance Targets
|
||||
- **Execution Time**: <5s for analysis setup and file discovery, scales with project size
|
||||
- **Success Rate**: >95% for file analysis and pattern detection across supported languages
|
||||
- **Error Handling**: Graceful handling of unsupported files and malformed code structures
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```
|
||||
/sc:analyze
|
||||
# Performs comprehensive analysis of entire project
|
||||
# Generates multi-domain report with key findings and recommendations
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```
|
||||
/sc:analyze src/security --focus security --depth deep --format report
|
||||
# Deep security analysis of specific directory
|
||||
# Generates detailed HTML report with vulnerability assessment
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
- **Invalid Input**: Validates analysis targets exist and contain analyzable source code
|
||||
- **Missing Dependencies**: Checks for analysis tools availability and handles unsupported file types
|
||||
- **File Access Issues**: Manages permission restrictions and handles binary or encrypted files
|
||||
- **Resource Constraints**: Optimizes memory usage for large codebases and provides progress feedback
|
||||
|
||||
## Integration Points
|
||||
- **SuperClaude Framework**: Integrates with build command for pre-build analysis and test for quality gates
|
||||
- **Other Commands**: Commonly precedes refactoring operations and follows development workflows
|
||||
- **File System**: Reads project source code, writes analysis reports to designated output directories
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Perform static code analysis using pattern matching and heuristic evaluation
|
||||
- Generate comprehensive quality, security, performance, and architecture assessments
|
||||
- Provide actionable recommendations with severity ratings and implementation guidance
|
||||
|
||||
**This command will not:**
|
||||
- Execute dynamic analysis requiring code compilation or runtime environments
|
||||
- Modify source code or automatically apply fixes without explicit user consent
|
||||
- Analyze external dependencies or third-party libraries beyond import analysis
|
||||
589
Framework/Commands/brainstorm.md
Normal file
589
Framework/Commands/brainstorm.md
Normal file
@@ -0,0 +1,589 @@
|
||||
---
|
||||
name: brainstorm
|
||||
description: "Interactive requirements discovery through Socratic dialogue, systematic exploration, and seamless PRD generation with advanced orchestration"
|
||||
allowed-tools: [Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite, Task, WebSearch, sequentialthinking]
|
||||
|
||||
# Command Classification
|
||||
category: orchestration
|
||||
complexity: advanced
|
||||
scope: cross-session
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7, magic, playwright, morphllm, serena]
|
||||
personas: [architect, analyzer, frontend, backend, security, devops, project-manager]
|
||||
wave-enabled: true
|
||||
complexity-threshold: 0.7
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: complex
|
||||
personas: [architect, analyzer, project-manager]
|
||||
---
|
||||
|
||||
# /sc:brainstorm - Interactive Requirements Discovery
|
||||
|
||||
## Purpose
|
||||
Transform ambiguous ideas into concrete specifications through sophisticated brainstorming orchestration featuring Socratic dialogue framework, systematic exploration phases, intelligent brief generation, automated agent handoff protocols, and cross-session persistence capabilities for comprehensive requirements discovery.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:brainstorm [topic/idea] [--strategy systematic|agile|enterprise] [--depth shallow|normal|deep] [--parallel] [--validate] [--mcp-routing]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `topic/idea` - Initial concept, project idea, or problem statement to explore through interactive dialogue
|
||||
- `--strategy` - Brainstorming strategy selection with specialized orchestration approaches
|
||||
- `--depth` - Discovery depth and analysis thoroughness level
|
||||
- `--parallel` - Enable parallel exploration paths with multi-agent coordination
|
||||
- `--validate` - Comprehensive validation and brief completeness quality gates
|
||||
- `--mcp-routing` - Intelligent MCP server routing for specialized analysis
|
||||
- `--wave-mode` - Enable wave-based execution with progressive dialogue enhancement
|
||||
- `--cross-session` - Enable cross-session persistence and brainstorming continuity
|
||||
- `--prd` - Automatically generate PRD after brainstorming completes
|
||||
- `--max-rounds` - Maximum dialogue rounds (default: 15)
|
||||
- `--focus` - Specific aspect to emphasize (technical|business|user|balanced)
|
||||
- `--brief-only` - Generate brief without automatic PRD creation
|
||||
- `--resume` - Continue previous brainstorming session from saved state
|
||||
- `--template` - Use specific brief template (startup, enterprise, research)
|
||||
|
||||
## Execution Strategies
|
||||
|
||||
### Systematic Strategy (Default)
|
||||
1. **Comprehensive Discovery**: Deep project analysis with stakeholder assessment
|
||||
2. **Strategic Exploration**: Multi-phase exploration with constraint mapping
|
||||
3. **Coordinated Convergence**: Sequential dialogue phases with validation gates
|
||||
4. **Quality Assurance**: Comprehensive brief validation and completeness cycles
|
||||
5. **Agent Orchestration**: Seamless handoff to brainstorm-PRD with context transfer
|
||||
6. **Documentation**: Comprehensive session persistence and knowledge transfer
|
||||
|
||||
### Agile Strategy
|
||||
1. **Rapid Assessment**: Quick scope definition and priority identification
|
||||
2. **Iterative Discovery**: Sprint-based exploration with adaptive questioning
|
||||
3. **Continuous Validation**: Incremental requirement validation with frequent feedback
|
||||
4. **Adaptive Convergence**: Dynamic requirement prioritization and trade-off analysis
|
||||
5. **Progressive Handoff**: Continuous PRD updating and stakeholder alignment
|
||||
6. **Living Documentation**: Evolving brief documentation with implementation insights
|
||||
|
||||
### Enterprise Strategy
|
||||
1. **Stakeholder Analysis**: Multi-domain impact assessment and coordination
|
||||
2. **Governance Planning**: Compliance and policy integration during discovery
|
||||
3. **Resource Orchestration**: Enterprise-scale requirement validation and management
|
||||
4. **Risk Management**: Comprehensive risk assessment and mitigation during exploration
|
||||
5. **Compliance Validation**: Regulatory and policy compliance requirement discovery
|
||||
6. **Enterprise Integration**: Large-scale system integration requirement analysis
|
||||
|
||||
## Advanced Orchestration Features
|
||||
|
||||
### Wave System Integration
|
||||
- **Multi-Wave Coordination**: Progressive dialogue execution across coordinated discovery waves
|
||||
- **Context Accumulation**: Building understanding and requirement clarity across waves
|
||||
- **Performance Monitoring**: Real-time dialogue optimization and engagement tracking
|
||||
- **Error Recovery**: Sophisticated error handling and dialogue recovery across waves
|
||||
|
||||
### Cross-Session Persistence
|
||||
- **State Management**: Maintain dialogue state across sessions and interruptions
|
||||
- **Context Continuity**: Preserve understanding and requirement evolution over time
|
||||
- **Historical Analysis**: Learn from previous brainstorming sessions and outcomes
|
||||
- **Recovery Mechanisms**: Robust recovery from interruptions and session failures
|
||||
|
||||
### Intelligent MCP Coordination
|
||||
- **Dynamic Server Selection**: Choose optimal MCP servers for dialogue enhancement
|
||||
- **Load Balancing**: Distribute analysis processing across available servers
|
||||
- **Capability Matching**: Match exploration needs to server capabilities and strengths
|
||||
- **Fallback Strategies**: Graceful degradation when servers are unavailable
|
||||
|
||||
## Multi-Persona Orchestration
|
||||
|
||||
### Expert Coordination System
|
||||
The command orchestrates multiple domain experts for comprehensive requirements discovery:
|
||||
|
||||
#### Primary Coordination Personas
|
||||
- **Architect**: System design implications, technology feasibility, scalability considerations
|
||||
- **Analyzer**: Requirement analysis, complexity assessment, technical evaluation
|
||||
- **Project Manager**: Resource coordination, timeline implications, stakeholder communication
|
||||
|
||||
#### Domain-Specific Personas (Auto-Activated)
|
||||
- **Frontend Specialist**: UI/UX requirements, accessibility needs, user experience optimization
|
||||
- **Backend Engineer**: Data architecture, API design, security and compliance requirements
|
||||
- **Security Auditor**: Security requirements, threat modeling, compliance validation needs
|
||||
- **DevOps Engineer**: Infrastructure requirements, deployment strategies, monitoring needs
|
||||
|
||||
### Persona Coordination Patterns
|
||||
- **Sequential Consultation**: Ordered expert consultation for complex requirement decisions
|
||||
- **Parallel Analysis**: Simultaneous requirement analysis from multiple expert perspectives
|
||||
- **Consensus Building**: Integrating diverse expert opinions into unified requirement approach
|
||||
- **Conflict Resolution**: Handling contradictory recommendations and requirement trade-offs
|
||||
|
||||
## Comprehensive MCP Server Integration
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Problem Decomposition**: Break down sophisticated requirement challenges systematically
|
||||
- **Multi-Step Reasoning**: Apply structured reasoning for complex requirement decisions
|
||||
- **Pattern Recognition**: Identify complex requirement patterns across similar projects
|
||||
- **Validation Logic**: Comprehensive requirement validation and verification processes
|
||||
|
||||
### Context7 Integration
|
||||
- **Framework Expertise**: Leverage deep framework knowledge for requirement validation
|
||||
- **Best Practices**: Apply industry standards and proven requirement approaches
|
||||
- **Pattern Libraries**: Access comprehensive requirement pattern and example repositories
|
||||
- **Version Compatibility**: Ensure requirement compatibility across technology stacks
|
||||
|
||||
### Magic Integration
|
||||
- **Advanced UI Generation**: Sophisticated user interface requirement discovery
|
||||
- **Design System Integration**: Comprehensive design system requirement coordination
|
||||
- **Accessibility Excellence**: Advanced accessibility requirement and inclusive design discovery
|
||||
- **Performance Optimization**: UI performance requirement and user experience optimization
|
||||
|
||||
### Playwright Integration
|
||||
- **Comprehensive Testing**: End-to-end testing requirement discovery across platforms
|
||||
- **Performance Validation**: Real-world performance requirement testing and validation
|
||||
- **Visual Testing**: Comprehensive visual requirement regression and compatibility analysis
|
||||
- **User Experience Validation**: Real user interaction requirement simulation and testing
|
||||
|
||||
### Morphllm Integration
|
||||
- **Intelligent Code Generation**: Advanced requirement-to-code pattern recognition
|
||||
- **Large-Scale Refactoring**: Sophisticated requirement impact analysis across codebases
|
||||
- **Pattern Application**: Apply complex requirement patterns and transformations at scale
|
||||
- **Quality Enhancement**: Automated requirement quality improvements and optimization
|
||||
|
||||
### Serena Integration
|
||||
- **Semantic Analysis**: Deep semantic understanding of requirement context and systems
|
||||
- **Knowledge Management**: Comprehensive requirement knowledge capture and retrieval
|
||||
- **Cross-Session Learning**: Accumulate and apply requirement knowledge across sessions
|
||||
- **Memory Coordination**: Sophisticated requirement memory management and organization
|
||||
|
||||
## Advanced Workflow Management
|
||||
|
||||
### Task Hierarchies
|
||||
- **Epic Level**: Large-scale project objectives discovered through comprehensive brainstorming
|
||||
- **Story Level**: Feature-level requirements with clear deliverables from dialogue sessions
|
||||
- **Task Level**: Specific requirement tasks with defined discovery outcomes
|
||||
- **Subtask Level**: Granular dialogue steps with measurable requirement progress
|
||||
|
||||
### Dependency Management
|
||||
- **Cross-Domain Dependencies**: Coordinate requirement dependencies across expertise domains
|
||||
- **Temporal Dependencies**: Manage time-based requirement dependencies and sequencing
|
||||
- **Resource Dependencies**: Coordinate shared requirement resources and capacity constraints
|
||||
- **Knowledge Dependencies**: Ensure prerequisite knowledge and context availability for requirements
|
||||
|
||||
### Quality Gate Integration
|
||||
- **Pre-Execution Gates**: Comprehensive readiness validation before brainstorming sessions
|
||||
- **Progressive Gates**: Intermediate quality checks throughout dialogue phases
|
||||
- **Completion Gates**: Thorough validation before marking requirement discovery complete
|
||||
- **Handoff Gates**: Quality assurance for transitions between dialogue phases and PRD systems
|
||||
|
||||
## Performance & Scalability
|
||||
|
||||
### Performance Optimization
|
||||
- **Intelligent Batching**: Group related requirement operations for maximum dialogue efficiency
|
||||
- **Parallel Processing**: Coordinate independent requirement operations simultaneously
|
||||
- **Resource Management**: Optimal allocation of tools, servers, and personas for requirements
|
||||
- **Context Caching**: Efficient reuse of requirement analysis and computation results
|
||||
|
||||
### Performance Targets
|
||||
- **Complex Analysis**: <60s for comprehensive requirement project analysis
|
||||
- **Strategy Planning**: <120s for detailed dialogue execution planning
|
||||
- **Cross-Session Operations**: <10s for session state management
|
||||
- **MCP Coordination**: <5s for server routing and coordination
|
||||
- **Overall Execution**: Variable based on scope, with progress tracking
|
||||
|
||||
### Scalability Features
|
||||
- **Horizontal Scaling**: Distribute requirement work across multiple processing units
|
||||
- **Incremental Processing**: Process large requirement operations in manageable chunks
|
||||
- **Progressive Enhancement**: Build requirement capabilities and understanding over time
|
||||
- **Resource Adaptation**: Adapt to available resources and constraints for requirement discovery
|
||||
|
||||
## Advanced Error Handling
|
||||
|
||||
### Sophisticated Recovery Mechanisms
|
||||
- **Multi-Level Rollback**: Rollback at dialogue phase, session, or entire operation levels
|
||||
- **Partial Success Management**: Handle and build upon partially completed requirement sessions
|
||||
- **Context Preservation**: Maintain context and progress through dialogue failures
|
||||
- **Intelligent Retry**: Smart retry with improved dialogue strategies and conditions
|
||||
|
||||
### Error Classification
|
||||
- **Coordination Errors**: Issues with persona or MCP server coordination during dialogue
|
||||
- **Resource Constraint Errors**: Handling of resource limitations and capacity issues
|
||||
- **Integration Errors**: Cross-system integration and communication failures
|
||||
- **Complex Logic Errors**: Sophisticated dialogue and reasoning failures
|
||||
|
||||
### Recovery Strategies
|
||||
- **Graceful Degradation**: Maintain functionality with reduced dialogue capabilities
|
||||
- **Alternative Approaches**: Switch to alternative dialogue strategies when primary approaches fail
|
||||
- **Human Intervention**: Clear escalation paths for complex issues requiring human judgment
|
||||
- **Learning Integration**: Incorporate failure learnings into future brainstorming executions
|
||||
|
||||
## Socratic Dialogue Framework
|
||||
|
||||
### Phase 1: Initialization
|
||||
1. **Context Setup**: Create brainstorming session with metadata
|
||||
2. **TodoWrite Integration**: Initialize phase tracking tasks
|
||||
3. **Session State**: Establish dialogue parameters and objectives
|
||||
4. **Brief Template**: Prepare structured brief format
|
||||
5. **Directory Creation**: Ensure ClaudeDocs/Brief/ exists
|
||||
|
||||
### Phase 2: Discovery Dialogue
|
||||
1. **🔍 Discovery Phase**
|
||||
- Open-ended exploration questions
|
||||
- Domain understanding and context gathering
|
||||
- Stakeholder identification
|
||||
- Initial requirement sketching
|
||||
- Pattern: "Let me understand...", "Tell me about...", "What prompted..."
|
||||
|
||||
2. **💡 Exploration Phase**
|
||||
- Deep-dive into possibilities
|
||||
- What-if scenarios and alternatives
|
||||
- Feasibility assessment
|
||||
- Constraint identification
|
||||
- Pattern: "What if we...", "Have you considered...", "How might..."
|
||||
|
||||
3. **🎯 Convergence Phase**
|
||||
- Priority crystallization
|
||||
- Decision making support
|
||||
- Trade-off analysis
|
||||
- Requirement finalization
|
||||
- Pattern: "Based on our discussion...", "The priority seems to be..."
|
||||
|
||||
### Phase 3: Brief Generation
|
||||
1. **Requirement Synthesis**: Compile discovered requirements
|
||||
2. **Metadata Creation**: Generate comprehensive brief metadata
|
||||
3. **Structure Validation**: Ensure brief completeness
|
||||
4. **Persistence**: Save to ClaudeDocs/Brief/{project}-brief-{timestamp}.md
|
||||
5. **Quality Check**: Validate against minimum requirements
|
||||
|
||||
### Phase 4: Agent Handoff (if --prd specified)
|
||||
1. **Brief Validation**: Ensure readiness for PRD generation
|
||||
2. **Agent Invocation**: Call brainstorm-PRD with structured brief
|
||||
3. **Context Transfer**: Pass session history and decisions
|
||||
4. **Link Creation**: Connect brief to generated PRD
|
||||
5. **Completion Report**: Summarize outcomes and next steps
|
||||
|
||||
## Auto-Activation Patterns
|
||||
- **Vague Requests**: "I want to build something that..."
|
||||
- **Exploration Keywords**: brainstorm, explore, figure out, not sure
|
||||
- **Uncertainty Indicators**: maybe, possibly, thinking about, could we
|
||||
- **Planning Needs**: new project, startup idea, feature concept
|
||||
- **Discovery Requests**: help me understand, what should I build
|
||||
|
||||
## MODE Integration
|
||||
|
||||
### MODE-Command Architecture
|
||||
The brainstorm command integrates with MODE_Brainstorming for behavioral configuration and auto-activation:
|
||||
|
||||
```yaml
|
||||
mode_command_integration:
|
||||
primary_implementation: "/sc:brainstorm"
|
||||
parameter_mapping:
|
||||
# MODE YAML Setting → Command Parameter
|
||||
max_rounds: "--max-rounds" # Default: 15
|
||||
depth_level: "--depth" # Default: normal
|
||||
focus_area: "--focus" # Default: balanced
|
||||
auto_prd: "--prd" # Default: false
|
||||
brief_template: "--template" # Default: standard
|
||||
override_precedence: "explicit > mode > framework > system"
|
||||
coordination_workflow:
|
||||
- mode_detection # MODE evaluates request context
|
||||
- parameter_inheritance # YAML settings → command parameters
|
||||
- command_invocation # /sc:brainstorm executed
|
||||
- behavioral_enforcement # MODE patterns applied
|
||||
- quality_validation # Framework compliance checked
|
||||
```
|
||||
|
||||
### Behavioral Configuration
|
||||
- **Dialogue Style**: collaborative_non_presumptive
|
||||
- **Discovery Depth**: adaptive based on project complexity
|
||||
- **Context Retention**: cross_session memory persistence
|
||||
- **Handoff Automation**: true for seamless agent transitions
|
||||
|
||||
### Plan Mode Integration
|
||||
|
||||
**Seamless Plan-to-Brief Workflow** - Automatically transforms planning discussions into structured briefs.
|
||||
|
||||
When SuperClaude detects requirement-related content in Plan Mode:
|
||||
|
||||
1. **Trigger Detection**: Keywords (implement, build, create, design, develop, feature) or explicit content (requirements, specifications, user stories)
|
||||
2. **Content Transformation**: Automatically parses plan content into structured brief format
|
||||
3. **Persistence**: Saves to `ClaudeDocs/Brief/plan-{project}-{timestamp}.md` with plan-mode metadata
|
||||
4. **Workflow Integration**: Brief formatted for immediate brainstorm-PRD handoff
|
||||
5. **Context Preservation**: Maintains complete traceability from plan to PRD
|
||||
|
||||
```yaml
|
||||
plan_analysis:
|
||||
content_detection: [requirements, specifications, features, user_stories]
|
||||
scope_indicators: [new_functionality, system_changes, components]
|
||||
transformation_triggers: [explicit_prd_request, implementation_planning]
|
||||
|
||||
brief_generation:
|
||||
source_metadata: plan-mode
|
||||
auto_generated: true
|
||||
structure: [vision, requirements, approach, criteria, notes]
|
||||
format: brainstorm-PRD compatible
|
||||
```
|
||||
|
||||
#### Integration Benefits
|
||||
- **Zero Context Loss**: Complete planning history preserved in brief
|
||||
- **Automated Workflow**: Plan → Brief → PRD with no manual intervention
|
||||
- **Consistent Structure**: Plan content automatically organized for PRD generation
|
||||
- **Time Efficiency**: Eliminates manual brief creation and formatting
|
||||
|
||||
## Communication Style
|
||||
|
||||
### Dialogue Principles
|
||||
- **Collaborative**: "Let's explore this together..."
|
||||
- **Non-Presumptive**: Avoid solution bias early in discovery
|
||||
- **Progressive**: Build understanding incrementally
|
||||
- **Reflective**: Mirror and validate understanding frequently
|
||||
|
||||
### Question Framework
|
||||
- **Open Discovery**: "What would success look like?"
|
||||
- **Clarification**: "When you say X, do you mean Y or Z?"
|
||||
- **Exploration**: "How might this work in practice?"
|
||||
- **Validation**: "Am I understanding correctly that...?"
|
||||
- **Prioritization**: "What's most important to get right?"
|
||||
|
||||
## Integration Ecosystem
|
||||
|
||||
### SuperClaude Framework Integration
|
||||
- **Command Coordination**: Orchestrate other SuperClaude commands for comprehensive requirement workflows
|
||||
- **Session Management**: Deep integration with session lifecycle and persistence for brainstorming continuity
|
||||
- **Quality Framework**: Integration with comprehensive quality assurance systems for requirement validation
|
||||
- **Knowledge Management**: Coordinate with knowledge capture and retrieval systems for requirement insights
|
||||
|
||||
### External System Integration
|
||||
- **Version Control**: Deep integration with Git and version management systems for requirement tracking
|
||||
- **CI/CD Systems**: Coordinate with continuous integration and deployment pipelines for requirement validation
|
||||
- **Project Management**: Integration with project tracking and management tools for requirement coordination
|
||||
- **Documentation Systems**: Coordinate with documentation generation and maintenance for requirement persistence
|
||||
|
||||
### Workflow Command Integration
|
||||
- **Natural Pipeline**: Brainstorm outputs (PRD/Brief) serve as primary input for `/sc:workflow`
|
||||
- **Seamless Handoff**: Use `--prd` flag to automatically generate PRD for workflow planning
|
||||
- **Context Preservation**: Session history and decisions flow from brainstorm to workflow
|
||||
- **Example Flow**:
|
||||
```bash
|
||||
/sc:brainstorm "new feature idea" --prd
|
||||
# Generates: ClaudeDocs/PRD/feature-prd.md
|
||||
/sc:workflow ClaudeDocs/PRD/feature-prd.md --all-mcp
|
||||
```
|
||||
|
||||
### Task Tool Integration
|
||||
- Use for managing complex multi-phase brainstorming
|
||||
- Delegate deep analysis to specialized sub-agents
|
||||
- Coordinate parallel exploration paths
|
||||
- Example: `Task("analyze-competitors", "Research similar solutions")`
|
||||
|
||||
### Agent Collaboration
|
||||
- **brainstorm-PRD**: Primary handoff for PRD generation
|
||||
- **system-architect**: Technical feasibility validation
|
||||
- **frontend-specialist**: UI/UX focused exploration
|
||||
- **backend-engineer**: Infrastructure and API design input
|
||||
|
||||
### Tool Orchestration
|
||||
- **TodoWrite**: Track dialogue phases and key decisions
|
||||
- **Write**: Persist briefs and session artifacts
|
||||
- **Read**: Review existing project context
|
||||
- **Grep/Glob**: Analyze codebase for integration points
|
||||
|
||||
## Document Persistence
|
||||
|
||||
### Brief Storage Structure
|
||||
```
|
||||
ClaudeDocs/Brief/
|
||||
├── {project}-brief-{YYYY-MM-DD-HHMMSS}.md
|
||||
├── {project}-session-{YYYY-MM-DD-HHMMSS}.json
|
||||
└── templates/
|
||||
├── startup-brief-template.md
|
||||
├── enterprise-brief-template.md
|
||||
└── research-brief-template.md
|
||||
```
|
||||
|
||||
### Persistence Configuration
|
||||
```yaml
|
||||
persistence:
|
||||
brief_storage: ClaudeDocs/Brief/
|
||||
metadata_tracking: true
|
||||
session_continuity: true
|
||||
agent_handoff_logging: true
|
||||
mode_integration_tracking: true
|
||||
```
|
||||
|
||||
### Persistence Features
|
||||
- **Metadata Tracking**: Complete dialogue history and decision tracking
|
||||
- **Session Continuity**: Cross-session state preservation for long projects
|
||||
- **Agent Handoff Logging**: Full audit trail of brief → PRD transitions
|
||||
- **Mode Integration Tracking**: Records MODE behavioral patterns applied
|
||||
|
||||
### Brief Metadata Format
|
||||
```yaml
|
||||
---
|
||||
type: brief
|
||||
timestamp: {ISO-8601 timestamp}
|
||||
session_id: brainstorm_{unique_id}
|
||||
source: interactive-brainstorming
|
||||
project: {project-name}
|
||||
dialogue_stats:
|
||||
total_rounds: 12
|
||||
discovery_rounds: 4
|
||||
exploration_rounds: 5
|
||||
convergence_rounds: 3
|
||||
total_duration: "25 minutes"
|
||||
confidence_score: 0.87
|
||||
requirement_count: 15
|
||||
constraint_count: 6
|
||||
stakeholder_count: 4
|
||||
focus_area: {technical|business|user|balanced}
|
||||
linked_prd: {path to PRD once generated}
|
||||
auto_handoff: true
|
||||
---
|
||||
```
|
||||
|
||||
### Session Persistence
|
||||
- **Session State**: Save dialogue progress for resumption
|
||||
- **Decision Log**: Track key decisions and rationale
|
||||
- **Requirement Evolution**: Show how requirements evolved
|
||||
- **Pattern Recognition**: Document discovered patterns
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Brief Completeness Criteria
|
||||
- ✅ Clear project vision statement
|
||||
- ✅ Minimum 3 functional requirements
|
||||
- ✅ Identified constraints and limitations
|
||||
- ✅ Defined success criteria
|
||||
- ✅ Stakeholder mapping completed
|
||||
- ✅ Technical feasibility assessed
|
||||
|
||||
### Dialogue Quality Metrics
|
||||
- **Engagement Score**: Questions answered vs asked
|
||||
- **Discovery Depth**: Layers of abstraction explored
|
||||
- **Convergence Rate**: Progress toward consensus
|
||||
- **Requirement Clarity**: Ambiguity reduction percentage
|
||||
|
||||
## Customization & Extension
|
||||
|
||||
### Advanced Configuration
|
||||
- **Strategy Customization**: Customize brainstorming strategies for specific requirement contexts
|
||||
- **Persona Configuration**: Configure persona activation and coordination patterns for dialogue
|
||||
- **MCP Server Preferences**: Customize server selection and usage patterns for requirement analysis
|
||||
- **Quality Gate Configuration**: Customize validation criteria and thresholds for requirement discovery
|
||||
|
||||
### Extension Mechanisms
|
||||
- **Custom Strategy Plugins**: Extend with custom brainstorming execution strategies
|
||||
- **Persona Extensions**: Add custom domain expertise and coordination patterns for requirements
|
||||
- **Integration Extensions**: Extend integration capabilities with external requirement systems
|
||||
- **Workflow Extensions**: Add custom dialogue workflow patterns and orchestration logic
|
||||
|
||||
## Success Metrics & Analytics
|
||||
|
||||
### Comprehensive Metrics
|
||||
- **Execution Success Rate**: >90% successful completion for complex requirement discovery operations
|
||||
- **Quality Achievement**: >95% compliance with quality gates and requirement standards
|
||||
- **Performance Targets**: Meeting specified performance benchmarks consistently for dialogue sessions
|
||||
- **User Satisfaction**: >85% satisfaction with outcomes and process quality for requirement discovery
|
||||
- **Integration Success**: >95% successful coordination across all integrated systems and agents
|
||||
|
||||
### Analytics & Reporting
|
||||
- **Performance Analytics**: Detailed performance tracking and optimization recommendations for dialogue
|
||||
- **Quality Analytics**: Comprehensive quality metrics and improvement suggestions for requirements
|
||||
- **Resource Analytics**: Resource utilization analysis and optimization opportunities for brainstorming
|
||||
- **Outcome Analytics**: Success pattern analysis and predictive insights for requirement discovery
|
||||
|
||||
## Examples
|
||||
|
||||
### Comprehensive Project Analysis
|
||||
```
|
||||
/sc:brainstorm "enterprise project management system" --strategy systematic --depth deep --validate --mcp-routing
|
||||
# Comprehensive analysis with full orchestration capabilities
|
||||
```
|
||||
|
||||
### Agile Multi-Sprint Coordination
|
||||
```
|
||||
/sc:brainstorm "feature backlog refinement" --strategy agile --parallel --cross-session
|
||||
# Agile coordination with cross-session persistence
|
||||
```
|
||||
|
||||
### Enterprise-Scale Operation
|
||||
```
|
||||
/sc:brainstorm "digital transformation initiative" --strategy enterprise --wave-mode --all-personas
|
||||
# Enterprise-scale coordination with full persona orchestration
|
||||
```
|
||||
|
||||
### Complex Integration Project
|
||||
```
|
||||
/sc:brainstorm "microservices integration platform" --depth deep --parallel --validate --sequential
|
||||
# Complex integration with sequential thinking and validation
|
||||
```
|
||||
|
||||
### Basic Brainstorming
|
||||
```
|
||||
/sc:brainstorm "task management app for developers"
|
||||
```
|
||||
|
||||
### Deep Technical Exploration
|
||||
```
|
||||
/sc:brainstorm "distributed caching system" --depth deep --focus technical --prd
|
||||
```
|
||||
|
||||
### Business-Focused Discovery
|
||||
```
|
||||
/sc:brainstorm "SaaS pricing optimization tool" --focus business --max-rounds 20
|
||||
```
|
||||
|
||||
### Brief-Only Generation
|
||||
```
|
||||
/sc:brainstorm "mobile health tracking app" --brief-only
|
||||
```
|
||||
|
||||
### Resume Previous Session
|
||||
```
|
||||
/sc:brainstorm --resume session_brainstorm_abc123
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
|
||||
### Common Issues
|
||||
- **Circular Exploration**: Detect and break repetitive loops
|
||||
- **Scope Creep**: Alert when requirements expand beyond feasibility
|
||||
- **Conflicting Requirements**: Highlight and resolve contradictions
|
||||
- **Incomplete Context**: Request missing critical information
|
||||
|
||||
### Recovery Strategies
|
||||
- **Save State**: Always persist session for recovery
|
||||
- **Partial Briefs**: Generate with available information
|
||||
- **Fallback Questions**: Use generic prompts if specific fail
|
||||
- **Manual Override**: Allow user to skip phases if needed
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Efficiency Features
|
||||
- **Smart Caching**: Reuse discovered patterns
|
||||
- **Parallel Analysis**: Use Task for concurrent exploration
|
||||
- **Early Convergence**: Detect when sufficient clarity achieved
|
||||
- **Template Acceleration**: Pre-structured briefs for common types
|
||||
|
||||
### Resource Management
|
||||
- **Token Efficiency**: Use compressed dialogue for long sessions
|
||||
- **Memory Management**: Summarize early phases before proceeding
|
||||
- **Context Pruning**: Remove redundant information progressively
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This advanced command will:**
|
||||
- Orchestrate complex multi-domain requirement discovery operations with expert coordination
|
||||
- Provide sophisticated analysis and strategic brainstorming planning capabilities
|
||||
- Coordinate multiple MCP servers and personas for optimal requirement discovery outcomes
|
||||
- Maintain cross-session persistence and progressive enhancement for dialogue continuity
|
||||
- Apply comprehensive quality gates and validation throughout requirement discovery execution
|
||||
- Guide interactive requirements discovery through sophisticated Socratic dialogue framework
|
||||
- Generate comprehensive project briefs with automated agent handoff protocols
|
||||
- Track and persist all brainstorming artifacts with cross-session state management
|
||||
|
||||
**This advanced command will not:**
|
||||
- Execute without proper analysis and planning phases for requirement discovery
|
||||
- Operate without appropriate error handling and recovery mechanisms for dialogue sessions
|
||||
- Proceed without stakeholder alignment and clear success criteria for requirements
|
||||
- Compromise quality standards for speed or convenience in requirement discovery
|
||||
- Make technical implementation decisions beyond requirement specification
|
||||
- Write code or create solutions during requirement discovery phases
|
||||
- Override user preferences or decisions during collaborative dialogue
|
||||
- Skip essential discovery phases or dialogue validation steps
|
||||
92
Framework/Commands/build.md
Normal file
92
Framework/Commands/build.md
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
name: build
|
||||
description: "Build, compile, and package projects with comprehensive error handling, optimization, and automated validation"
|
||||
allowed-tools: [Read, Bash, Grep, Glob, Write]
|
||||
|
||||
# Command Classification
|
||||
category: utility
|
||||
complexity: enhanced
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [playwright] # Playwright MCP for build validation
|
||||
personas: [devops-engineer] # DevOps engineer persona for builds
|
||||
wave-enabled: true
|
||||
---
|
||||
|
||||
# /sc:build - Project Building and Packaging
|
||||
|
||||
## Purpose
|
||||
Execute comprehensive build workflows that compile, bundle, and package projects with intelligent error handling, build optimization, and deployment preparation across different build targets and environments.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:build [target] [--type dev|prod|test] [--clean] [--optimize] [--verbose]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Specific project component, module, or entire project to build
|
||||
- `--type` - Build environment configuration (dev, prod, test)
|
||||
- `--clean` - Remove build artifacts and caches before building
|
||||
- `--optimize` - Enable advanced build optimizations and minification
|
||||
- `--verbose` - Display detailed build output and progress information
|
||||
|
||||
## Execution
|
||||
|
||||
### Standard Build Workflow (Default)
|
||||
1. Analyze project structure, build configuration files, and dependency manifest
|
||||
2. Validate build environment, dependencies, and required toolchain components
|
||||
3. Execute build process with real-time monitoring and error detection
|
||||
4. Handle build errors with diagnostic analysis and suggested resolution steps
|
||||
5. Optimize build artifacts, generate build reports, and prepare deployment packages
|
||||
|
||||
## Claude Code Integration
|
||||
- **Tool Usage**: Bash for build system execution, Read for configuration analysis, Grep for error parsing
|
||||
- **File Operations**: Reads build configs and package manifests, writes build logs and artifact reports
|
||||
- **Analysis Approach**: Configuration-driven build orchestration with dependency validation
|
||||
- **Output Format**: Structured build reports with artifact sizes, timing metrics, and error diagnostics
|
||||
|
||||
## Performance Targets
|
||||
- **Execution Time**: <5s for build setup and validation, variable for compilation process
|
||||
- **Success Rate**: >95% for build environment validation and process initialization
|
||||
- **Error Handling**: Comprehensive build error analysis with actionable resolution guidance
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```
|
||||
/sc:build
|
||||
# Builds entire project using default configuration
|
||||
# Generates standard build artifacts in output directory
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```
|
||||
/sc:build frontend --type prod --clean --optimize --verbose
|
||||
# Clean production build of frontend module with optimizations
|
||||
# Displays detailed build progress and generates optimized artifacts
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
- **Invalid Input**: Validates build targets exist and build system is properly configured
|
||||
- **Missing Dependencies**: Checks for required build tools, compilers, and dependency packages
|
||||
- **File Access Issues**: Handles source file permissions and build output directory access
|
||||
- **Resource Constraints**: Manages memory and disk space during compilation and bundling
|
||||
|
||||
## Integration Points
|
||||
- **SuperClaude Framework**: Coordinates with test command for build verification and analyze for quality checks
|
||||
- **Other Commands**: Precedes test and deployment workflows, integrates with git for build tagging
|
||||
- **File System**: Reads source code and configurations, writes build artifacts to designated output directories
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Execute project build systems using existing build configurations
|
||||
- Provide comprehensive build error analysis and optimization recommendations
|
||||
- Generate build artifacts and deployment packages according to target specifications
|
||||
|
||||
**This command will not:**
|
||||
- Modify build system configuration or create new build scripts
|
||||
- Install missing build dependencies or development tools
|
||||
- Execute deployment operations beyond artifact preparation
|
||||
236
Framework/Commands/cleanup.md
Normal file
236
Framework/Commands/cleanup.md
Normal file
@@ -0,0 +1,236 @@
|
||||
---
|
||||
name: cleanup
|
||||
description: "Clean up code, remove dead code, and optimize project structure with intelligent analysis and safety validation"
|
||||
allowed-tools: [Read, Grep, Glob, Bash, Edit, MultiEdit, TodoWrite, Task]
|
||||
|
||||
# Command Classification
|
||||
category: workflow
|
||||
complexity: standard
|
||||
scope: cross-file
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7] # Sequential for analysis, Context7 for framework patterns
|
||||
personas: [architect, quality, security] # Auto-activated based on cleanup type
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.7
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: standard
|
||||
---
|
||||
|
||||
# /sc:cleanup - Code and Project Cleanup
|
||||
|
||||
## Purpose
|
||||
Systematically clean up code, remove dead code, optimize imports, and improve project structure through intelligent analysis and safety-validated operations. This command serves as the primary maintenance engine for codebase hygiene, providing automated cleanup workflows, dead code detection, and structural optimization with comprehensive validation.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:cleanup [target] [--type code|imports|files|all] [--safe|--aggressive] [--interactive]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Files, directories, or entire project to clean
|
||||
- `--type` - Cleanup focus: code, imports, files, structure, all
|
||||
- `--safe` - Conservative cleanup approach (default) with minimal risk
|
||||
- `--interactive` - Enable user interaction for complex cleanup decisions
|
||||
- `--preview` - Show cleanup changes without applying them for review
|
||||
- `--validate` - Enable additional validation steps and safety checks
|
||||
- `--aggressive` - More thorough cleanup with higher risk tolerance
|
||||
- `--dry-run` - Alias for --preview, shows changes without execution
|
||||
- `--backup` - Create backup before applying cleanup operations
|
||||
|
||||
## Execution Flow
|
||||
|
||||
### 1. Context Analysis
|
||||
- Analyze target scope for cleanup opportunities and safety considerations
|
||||
- Identify project patterns and existing structural conventions
|
||||
- Assess complexity and potential impact of cleanup operations
|
||||
- Detect framework-specific cleanup patterns and requirements
|
||||
|
||||
### 2. Strategy Selection
|
||||
- Choose appropriate cleanup approach based on --type and safety level
|
||||
- Auto-activate relevant personas for domain expertise (architecture, quality)
|
||||
- Configure MCP servers for enhanced analysis and pattern recognition
|
||||
- Plan cleanup sequence with comprehensive risk assessment
|
||||
|
||||
### 3. Core Operation
|
||||
- Execute systematic cleanup workflows with appropriate safety measures
|
||||
- Apply intelligent dead code detection and removal algorithms
|
||||
- Coordinate multi-file cleanup operations with dependency awareness
|
||||
- Handle edge cases and complex cleanup scenarios safely
|
||||
|
||||
### 4. Quality Assurance
|
||||
- Validate cleanup results against functionality and structural requirements
|
||||
- Run automated checks and testing to ensure no functionality loss
|
||||
- Generate comprehensive cleanup reports and impact documentation
|
||||
- Verify integration with existing codebase patterns and conventions
|
||||
|
||||
### 5. Integration & Handoff
|
||||
- Update related documentation and configuration to reflect cleanup
|
||||
- Prepare cleanup summary with recommendations for ongoing maintenance
|
||||
- Persist cleanup context and optimization insights for future operations
|
||||
- Enable follow-up optimization and quality improvement workflows
|
||||
|
||||
## MCP Server Integration
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Analysis**: Systematic analysis of code structure and cleanup opportunities
|
||||
- **Multi-Step Planning**: Breaks down complex cleanup into manageable, safe operations
|
||||
- **Validation Logic**: Uses structured reasoning for safety verification and impact assessment
|
||||
|
||||
### Context7 Integration
|
||||
- **Automatic Activation**: When framework-specific cleanup patterns and conventions are applicable
|
||||
- **Library Patterns**: Leverages official documentation for framework cleanup best practices
|
||||
- **Best Practices**: Integrates established cleanup standards and structural conventions
|
||||
|
||||
## Persona Auto-Activation
|
||||
|
||||
### Context-Based Activation
|
||||
The command automatically activates relevant personas based on cleanup scope:
|
||||
|
||||
- **Architect Persona**: System structure cleanup, architectural optimization, and dependency management
|
||||
- **Quality Persona**: Code quality assessment, technical debt cleanup, and maintainability improvements
|
||||
- **Security Persona**: Security-sensitive cleanup, credential removal, and secure code practices
|
||||
|
||||
### Multi-Persona Coordination
|
||||
- **Collaborative Analysis**: Multiple personas work together for comprehensive cleanup assessment
|
||||
- **Expertise Integration**: Combining domain-specific knowledge for safe and effective cleanup
|
||||
- **Conflict Resolution**: Handling different persona recommendations through systematic evaluation
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Task Integration
|
||||
- **Complex Operations**: Use Task tool for multi-step cleanup workflows
|
||||
- **Parallel Processing**: Coordinate independent cleanup work streams safely
|
||||
- **Progress Tracking**: TodoWrite integration for cleanup status management
|
||||
|
||||
### Workflow Orchestration
|
||||
- **Dependency Management**: Handle cleanup prerequisites and safe operation sequencing
|
||||
- **Error Recovery**: Graceful handling of cleanup failures with rollback capabilities
|
||||
- **State Management**: Maintain cleanup state across interruptions with backup preservation
|
||||
|
||||
### Quality Gates
|
||||
- **Pre-validation**: Check code safety and backup requirements before cleanup execution
|
||||
- **Progress Validation**: Intermediate safety checks during cleanup process
|
||||
- **Post-validation**: Comprehensive verification of cleanup effectiveness and safety
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Efficiency Features
|
||||
- **Intelligent Batching**: Group related cleanup operations for efficiency and safety
|
||||
- **Context Caching**: Reuse analysis results within session for related cleanup operations
|
||||
- **Parallel Execution**: Independent cleanup operations run concurrently with safety coordination
|
||||
- **Resource Management**: Optimal tool and MCP server utilization for cleanup analysis
|
||||
|
||||
### Performance Targets
|
||||
- **Analysis Phase**: <20s for comprehensive cleanup opportunity assessment
|
||||
- **Cleanup Phase**: <60s for standard code and import cleanup operations
|
||||
- **Validation Phase**: <15s for safety verification and functionality testing
|
||||
- **Overall Command**: <120s for complex multi-file cleanup workflows
|
||||
|
||||
## Examples
|
||||
|
||||
### Safe Code Cleanup
|
||||
```
|
||||
/sc:cleanup src/ --type code --safe --backup
|
||||
# Conservative code cleanup with automatic backup
|
||||
```
|
||||
|
||||
### Import Optimization
|
||||
```
|
||||
/sc:cleanup project --type imports --preview --validate
|
||||
# Import cleanup with preview and validation
|
||||
```
|
||||
|
||||
### Aggressive Project Cleanup
|
||||
```
|
||||
/sc:cleanup entire-project --type all --aggressive --interactive
|
||||
# Comprehensive cleanup with user interaction for safety
|
||||
```
|
||||
|
||||
### Dead Code Removal
|
||||
```
|
||||
/sc:cleanup legacy-modules --type code --dry-run
|
||||
# Dead code analysis with preview of removal operations
|
||||
```
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Graceful Degradation
|
||||
- **MCP Server Unavailable**: Falls back to native analysis capabilities with basic cleanup patterns
|
||||
- **Persona Activation Failure**: Continues with general cleanup guidance and conservative operations
|
||||
- **Tool Access Issues**: Uses alternative analysis methods and provides manual cleanup guidance
|
||||
|
||||
### Error Categories
|
||||
- **Input Validation Errors**: Clear feedback for invalid targets or conflicting cleanup parameters
|
||||
- **Process Execution Errors**: Handling of cleanup failures with automatic rollback capabilities
|
||||
- **Integration Errors**: MCP server or persona coordination issues with fallback strategies
|
||||
- **Resource Constraint Errors**: Behavior under resource limitations with optimization suggestions
|
||||
|
||||
### Recovery Strategies
|
||||
- **Automatic Retry**: Retry failed cleanup operations with adjusted parameters and reduced scope
|
||||
- **User Intervention**: Request clarification when cleanup requirements are ambiguous
|
||||
- **Partial Success Handling**: Complete partial cleanup and document remaining work safely
|
||||
- **State Cleanup**: Ensure clean codebase state after cleanup failures with backup restoration
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### Command Coordination
|
||||
- **Preparation Commands**: Often follows /sc:analyze or /sc:improve for cleanup planning
|
||||
- **Follow-up Commands**: Commonly followed by /sc:test, /sc:improve, or /sc:validate
|
||||
- **Parallel Commands**: Can run alongside /sc:optimize for comprehensive codebase maintenance
|
||||
|
||||
### Framework Integration
|
||||
- **SuperClaude Ecosystem**: Integrates with quality gates and validation cycles
|
||||
- **Quality Gates**: Participates in the 8-step validation process for cleanup verification
|
||||
- **Session Management**: Maintains cleanup context across session boundaries
|
||||
|
||||
### Tool Coordination
|
||||
- **Multi-Tool Operations**: Coordinates Grep/Glob/Edit/MultiEdit for complex cleanup operations
|
||||
- **Tool Selection Logic**: Dynamic tool selection based on cleanup scope and safety requirements
|
||||
- **Resource Sharing**: Efficient use of shared MCP servers and persona expertise
|
||||
|
||||
## Customization & Configuration
|
||||
|
||||
### Configuration Options
|
||||
- **Default Behavior**: Conservative cleanup with comprehensive safety validation
|
||||
- **User Preferences**: Cleanup aggressiveness levels and backup requirements
|
||||
- **Project-Specific Settings**: Project conventions and cleanup exclusion patterns
|
||||
|
||||
### Extension Points
|
||||
- **Custom Workflows**: Integration with project-specific cleanup standards and patterns
|
||||
- **Plugin Integration**: Support for additional static analysis and cleanup tools
|
||||
- **Hook Points**: Pre/post cleanup validation and custom safety checks
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Validation Criteria
|
||||
- **Functional Correctness**: Cleanup preserves all existing functionality and behavior
|
||||
- **Performance Standards**: Meeting cleanup effectiveness targets without functionality loss
|
||||
- **Integration Compliance**: Proper integration with existing codebase and structural patterns
|
||||
- **Error Handling Quality**: Comprehensive validation and rollback capabilities
|
||||
|
||||
### Success Metrics
|
||||
- **Completion Rate**: >95% for well-defined cleanup targets and parameters
|
||||
- **Performance Targets**: Meeting specified timing requirements for cleanup phases
|
||||
- **User Satisfaction**: Clear cleanup results with measurable structural improvements
|
||||
- **Integration Success**: Proper coordination with MCP servers and persona activation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Systematically clean up code, remove dead code, and optimize project structure
|
||||
- Auto-activate relevant personas and coordinate MCP servers for enhanced analysis
|
||||
- Provide comprehensive safety validation with backup and rollback capabilities
|
||||
- Apply intelligent cleanup algorithms with framework-specific pattern recognition
|
||||
|
||||
**This command will not:**
|
||||
- Remove code without thorough safety analysis and validation
|
||||
- Override project-specific cleanup exclusions or architectural constraints
|
||||
- Apply cleanup operations that compromise functionality or introduce bugs
|
||||
- Bypass established safety gates or validation requirements
|
||||
|
||||
---
|
||||
|
||||
*This cleanup command provides comprehensive codebase maintenance capabilities with intelligent analysis and systematic cleanup workflows while maintaining strict safety and validation standards.*
|
||||
89
Framework/Commands/design.md
Normal file
89
Framework/Commands/design.md
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
name: design
|
||||
description: "Design system architecture, APIs, and component interfaces with comprehensive specifications"
|
||||
allowed-tools: [Read, Bash, Grep, Glob, Write]
|
||||
|
||||
# Command Classification
|
||||
category: utility
|
||||
complexity: basic
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [] # No MCP servers required for basic commands
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
---
|
||||
|
||||
# /sc:design - System and Component Design
|
||||
|
||||
## Purpose
|
||||
Create comprehensive system architecture, API specifications, component interfaces, and technical design documentation with validation against requirements and industry best practices for maintainable and scalable solutions.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:design [target] [--type architecture|api|component|database] [--format diagram|spec|code] [--iterative]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - System, component, feature, or module to design
|
||||
- `--type` - Design category (architecture, api, component, database)
|
||||
- `--format` - Output format (diagram, specification, code templates)
|
||||
- `--iterative` - Enable iterative design refinement with feedback cycles
|
||||
|
||||
## Execution
|
||||
1. Analyze requirements, constraints, and existing system context through comprehensive discovery
|
||||
2. Create initial design concepts with multiple alternatives and trade-off analysis
|
||||
3. Develop detailed design specifications including interfaces, data models, and interaction patterns
|
||||
4. Validate design against functional requirements, quality attributes, and architectural principles
|
||||
5. Generate comprehensive design documentation with implementation guides and validation criteria
|
||||
|
||||
## Claude Code Integration
|
||||
- **Tool Usage**: Read for requirements analysis, Write for documentation generation, Grep for pattern analysis
|
||||
- **File Operations**: Reads requirements and existing code, writes design specs and architectural documentation
|
||||
- **Analysis Approach**: Requirement-driven design with pattern matching and best practice validation
|
||||
- **Output Format**: Structured design documents with diagrams, specifications, and implementation guides
|
||||
|
||||
## Performance Targets
|
||||
- **Execution Time**: <5s for requirement analysis and initial design concept generation
|
||||
- **Success Rate**: >95% for design specification generation and documentation formatting
|
||||
- **Error Handling**: Clear feedback for unclear requirements and constraint conflicts
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```
|
||||
/sc:design user-authentication --type api
|
||||
# Designs authentication API with endpoints and security specifications
|
||||
# Generates API documentation with request/response schemas
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```
|
||||
/sc:design payment-system --type architecture --format diagram --iterative
|
||||
# Creates comprehensive payment system architecture with iterative refinement
|
||||
# Generates architectural diagrams and detailed component specifications
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
- **Invalid Input**: Validates design targets are well-defined and requirements are accessible
|
||||
- **Missing Dependencies**: Checks for design context and handles incomplete requirement specifications
|
||||
- **File Access Issues**: Manages access to existing system documentation and output directories
|
||||
- **Resource Constraints**: Optimizes design complexity based on available information and scope
|
||||
|
||||
## Integration Points
|
||||
- **SuperClaude Framework**: Coordinates with analyze command for system assessment and document for specification generation
|
||||
- **Other Commands**: Precedes implementation workflows and integrates with build for validation
|
||||
- **File System**: Reads system requirements and existing architecture, writes design specifications to project documentation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Create comprehensive design specifications based on stated requirements and constraints
|
||||
- Generate architectural documentation with component interfaces and interaction patterns
|
||||
- Validate designs against common architectural principles and best practices
|
||||
|
||||
**This command will not:**
|
||||
- Generate executable code or detailed implementation beyond design templates
|
||||
- Modify existing system architecture or database schemas without explicit requirements
|
||||
- Create designs requiring external system integration without proper specification
|
||||
89
Framework/Commands/document.md
Normal file
89
Framework/Commands/document.md
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
name: document
|
||||
description: "Generate focused documentation for specific components, functions, or features"
|
||||
allowed-tools: [Read, Bash, Grep, Glob, Write]
|
||||
|
||||
# Command Classification
|
||||
category: utility
|
||||
complexity: basic
|
||||
scope: file
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [] # No MCP servers required for basic commands
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
---
|
||||
|
||||
# /sc:document - Focused Documentation Generation
|
||||
|
||||
## Purpose
|
||||
Generate precise, well-structured documentation for specific components, functions, APIs, or features with appropriate formatting, comprehensive coverage, and integration with existing documentation ecosystems.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:document [target] [--type inline|external|api|guide] [--style brief|detailed] [--template standard|custom]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Specific file, function, class, module, or component to document
|
||||
- `--type` - Documentation format (inline code comments, external files, api reference, user guide)
|
||||
- `--style` - Documentation depth and verbosity (brief summary, detailed comprehensive)
|
||||
- `--template` - Template specification (standard format, custom organization)
|
||||
|
||||
## Execution
|
||||
1. Analyze target component structure, interfaces, and functionality through comprehensive code inspection
|
||||
2. Identify documentation requirements, target audience, and integration context within project
|
||||
3. Generate appropriate documentation content based on type specifications and style preferences
|
||||
4. Apply consistent formatting, structure, and organizational patterns following documentation standards
|
||||
5. Integrate generated documentation with existing project documentation and ensure cross-reference consistency
|
||||
|
||||
## Claude Code Integration
|
||||
- **Tool Usage**: Read for component analysis, Write for documentation creation, Grep for reference extraction
|
||||
- **File Operations**: Reads source code and existing docs, writes documentation files with proper formatting
|
||||
- **Analysis Approach**: Code structure analysis with API extraction and usage pattern identification
|
||||
- **Output Format**: Structured documentation with consistent formatting, cross-references, and examples
|
||||
|
||||
## Performance Targets
|
||||
- **Execution Time**: <5s for component analysis and documentation generation
|
||||
- **Success Rate**: >95% for documentation extraction and formatting across supported languages
|
||||
- **Error Handling**: Graceful handling of complex code structures and incomplete information
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```
|
||||
/sc:document src/auth/login.js --type inline
|
||||
# Generates inline code comments for login function
|
||||
# Adds JSDoc comments with parameter and return descriptions
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```
|
||||
/sc:document src/api --type api --style detailed --template standard
|
||||
# Creates comprehensive API documentation for entire API module
|
||||
# Generates detailed external documentation with examples and usage guidelines
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
- **Invalid Input**: Validates documentation targets exist and contain documentable code structures
|
||||
- **Missing Dependencies**: Handles cases where code analysis is incomplete or context is insufficient
|
||||
- **File Access Issues**: Manages read access to source files and write permissions for documentation output
|
||||
- **Resource Constraints**: Optimizes documentation generation for large codebases with progress feedback
|
||||
|
||||
## Integration Points
|
||||
- **SuperClaude Framework**: Coordinates with analyze for code understanding and design for specification documentation
|
||||
- **Other Commands**: Follows development workflows and integrates with build for documentation publishing
|
||||
- **File System**: Reads project source code and existing documentation, writes formatted docs to appropriate locations
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Generate comprehensive documentation based on code analysis and existing patterns
|
||||
- Create properly formatted documentation following project conventions and standards
|
||||
- Extract API information, usage examples, and integration guidance from source code
|
||||
|
||||
**This command will not:**
|
||||
- Modify source code structure or add functionality beyond documentation
|
||||
- Generate documentation for external dependencies or third-party libraries
|
||||
- Create documentation requiring runtime analysis or dynamic code execution
|
||||
236
Framework/Commands/estimate.md
Normal file
236
Framework/Commands/estimate.md
Normal file
@@ -0,0 +1,236 @@
|
||||
---
|
||||
name: estimate
|
||||
description: "Provide development estimates for tasks, features, or projects with intelligent analysis and accuracy tracking"
|
||||
allowed-tools: [Read, Grep, Glob, Bash, TodoWrite, Task]
|
||||
|
||||
# Command Classification
|
||||
category: workflow
|
||||
complexity: standard
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7] # Sequential for analysis, Context7 for framework patterns
|
||||
personas: [architect, performance, project-manager] # Auto-activated based on estimation scope
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.6
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: standard
|
||||
---
|
||||
|
||||
# /sc:estimate - Development Estimation
|
||||
|
||||
## Purpose
|
||||
Generate accurate development estimates for tasks, features, or projects based on intelligent complexity analysis and historical data patterns. This command serves as the primary estimation engine for development planning, providing systematic estimation methodologies, accuracy tracking, and confidence intervals with comprehensive breakdown analysis.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:estimate [target] [--type time|effort|complexity|cost] [--unit hours|days|weeks] [--interactive]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Task, feature, or project scope to estimate
|
||||
- `--type` - Estimation focus: time, effort, complexity, cost
|
||||
- `--unit` - Time unit for estimates: hours, days, weeks, sprints
|
||||
- `--interactive` - Enable user interaction for complex estimation decisions
|
||||
- `--preview` - Show estimation methodology without executing full analysis
|
||||
- `--validate` - Enable additional validation steps and accuracy checks
|
||||
- `--breakdown` - Provide detailed breakdown of estimation components
|
||||
- `--confidence` - Include confidence intervals and risk assessment
|
||||
- `--historical` - Use historical data patterns for accuracy improvement
|
||||
|
||||
## Execution Flow
|
||||
|
||||
### 1. Context Analysis
|
||||
- Analyze scope and requirements of estimation target comprehensively
|
||||
- Identify project patterns and existing complexity benchmarks
|
||||
- Assess complexity factors, dependencies, and potential risks
|
||||
- Detect framework-specific estimation patterns and historical data
|
||||
|
||||
### 2. Strategy Selection
|
||||
- Choose appropriate estimation methodology based on --type and scope
|
||||
- Auto-activate relevant personas for domain expertise (architecture, performance)
|
||||
- Configure MCP servers for enhanced analysis and pattern recognition
|
||||
- Plan estimation sequence with historical data integration
|
||||
|
||||
### 3. Core Operation
|
||||
- Execute systematic estimation workflows with appropriate methodologies
|
||||
- Apply intelligent complexity analysis and dependency mapping
|
||||
- Coordinate multi-factor estimation with risk assessment
|
||||
- Generate confidence intervals and accuracy metrics
|
||||
|
||||
### 4. Quality Assurance
|
||||
- Validate estimation results against historical accuracy patterns
|
||||
- Run cross-validation checks with alternative estimation methods
|
||||
- Generate comprehensive estimation reports with breakdown analysis
|
||||
- Verify estimation consistency with project constraints and resources
|
||||
|
||||
### 5. Integration & Handoff
|
||||
- Update estimation database with new patterns and accuracy data
|
||||
- Prepare estimation summary with recommendations for project planning
|
||||
- Persist estimation context and methodology insights for future use
|
||||
- Enable follow-up project planning and resource allocation workflows
|
||||
|
||||
## MCP Server Integration
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Analysis**: Systematic analysis of project requirements and complexity factors
|
||||
- **Multi-Step Planning**: Breaks down complex estimation into manageable analysis components
|
||||
- **Validation Logic**: Uses structured reasoning for accuracy verification and methodology selection
|
||||
|
||||
### Context7 Integration
|
||||
- **Automatic Activation**: When framework-specific estimation patterns and benchmarks are applicable
|
||||
- **Library Patterns**: Leverages official documentation for framework complexity understanding
|
||||
- **Best Practices**: Integrates established estimation standards and historical accuracy data
|
||||
|
||||
## Persona Auto-Activation
|
||||
|
||||
### Context-Based Activation
|
||||
The command automatically activates relevant personas based on estimation scope:
|
||||
|
||||
- **Architect Persona**: System design estimation, architectural complexity assessment, and scalability factors
|
||||
- **Performance Persona**: Performance requirements estimation, optimization effort assessment, and resource planning
|
||||
- **Project Manager Persona**: Project timeline estimation, resource allocation planning, and risk assessment
|
||||
|
||||
### Multi-Persona Coordination
|
||||
- **Collaborative Analysis**: Multiple personas work together for comprehensive estimation coverage
|
||||
- **Expertise Integration**: Combining domain-specific knowledge for accurate complexity assessment
|
||||
- **Conflict Resolution**: Handling different persona estimates through systematic reconciliation
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Task Integration
|
||||
- **Complex Operations**: Use Task tool for multi-step estimation workflows
|
||||
- **Parallel Processing**: Coordinate independent estimation work streams
|
||||
- **Progress Tracking**: TodoWrite integration for estimation status management
|
||||
|
||||
### Workflow Orchestration
|
||||
- **Dependency Management**: Handle estimation prerequisites and component sequencing
|
||||
- **Error Recovery**: Graceful handling of estimation failures with alternative methodologies
|
||||
- **State Management**: Maintain estimation state across interruptions and revisions
|
||||
|
||||
### Quality Gates
|
||||
- **Pre-validation**: Check estimation requirements and scope clarity before analysis
|
||||
- **Progress Validation**: Intermediate accuracy checks during estimation process
|
||||
- **Post-validation**: Comprehensive verification of estimation reliability and consistency
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Efficiency Features
|
||||
- **Intelligent Batching**: Group related estimation operations for efficiency
|
||||
- **Context Caching**: Reuse analysis results within session for related estimations
|
||||
- **Parallel Execution**: Independent estimation operations run concurrently
|
||||
- **Resource Management**: Optimal tool and MCP server utilization for analysis
|
||||
|
||||
### Performance Targets
|
||||
- **Analysis Phase**: <25s for comprehensive complexity and requirement analysis
|
||||
- **Estimation Phase**: <40s for standard task and feature estimation workflows
|
||||
- **Validation Phase**: <10s for accuracy verification and confidence interval calculation
|
||||
- **Overall Command**: <90s for complex multi-component project estimation
|
||||
|
||||
## Examples
|
||||
|
||||
### Feature Time Estimation
|
||||
```
|
||||
/sc:estimate user authentication system --type time --unit days --breakdown
|
||||
# Detailed time estimation with component breakdown
|
||||
```
|
||||
|
||||
### Project Complexity Assessment
|
||||
```
|
||||
/sc:estimate entire-project --type complexity --confidence --historical
|
||||
# Complexity analysis with confidence intervals and historical data
|
||||
```
|
||||
|
||||
### Cost Estimation with Risk
|
||||
```
|
||||
/sc:estimate payment integration --type cost --breakdown --validate
|
||||
# Cost estimation with detailed breakdown and validation
|
||||
```
|
||||
|
||||
### Sprint Planning Estimation
|
||||
```
|
||||
/sc:estimate backlog-items --unit sprints --interactive --confidence
|
||||
# Sprint planning with interactive refinement and confidence levels
|
||||
```
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Graceful Degradation
|
||||
- **MCP Server Unavailable**: Falls back to native analysis capabilities with basic estimation patterns
|
||||
- **Persona Activation Failure**: Continues with general estimation guidance and standard methodologies
|
||||
- **Tool Access Issues**: Uses alternative analysis methods and provides manual estimation guidance
|
||||
|
||||
### Error Categories
|
||||
- **Input Validation Errors**: Clear feedback for invalid targets or conflicting estimation parameters
|
||||
- **Process Execution Errors**: Handling of estimation failures with alternative methodology fallback
|
||||
- **Integration Errors**: MCP server or persona coordination issues with fallback strategies
|
||||
- **Resource Constraint Errors**: Behavior under resource limitations with optimization suggestions
|
||||
|
||||
### Recovery Strategies
|
||||
- **Automatic Retry**: Retry failed estimations with adjusted parameters and alternative methods
|
||||
- **User Intervention**: Request clarification when estimation requirements are ambiguous
|
||||
- **Partial Success Handling**: Complete partial estimations and document remaining analysis
|
||||
- **State Cleanup**: Ensure clean estimation state after failures with methodology preservation
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### Command Coordination
|
||||
- **Preparation Commands**: Often follows /sc:analyze or /sc:design for estimation planning
|
||||
- **Follow-up Commands**: Commonly followed by /sc:implement, /sc:plan, or project management tools
|
||||
- **Parallel Commands**: Can run alongside /sc:analyze for comprehensive project assessment
|
||||
|
||||
### Framework Integration
|
||||
- **SuperClaude Ecosystem**: Integrates with quality gates and validation cycles
|
||||
- **Quality Gates**: Participates in estimation validation and accuracy verification
|
||||
- **Session Management**: Maintains estimation context across session boundaries
|
||||
|
||||
### Tool Coordination
|
||||
- **Multi-Tool Operations**: Coordinates Read/Grep/Glob for comprehensive analysis
|
||||
- **Tool Selection Logic**: Dynamic tool selection based on estimation scope and methodology
|
||||
- **Resource Sharing**: Efficient use of shared MCP servers and persona expertise
|
||||
|
||||
## Customization & Configuration
|
||||
|
||||
### Configuration Options
|
||||
- **Default Behavior**: Conservative estimation with comprehensive breakdown analysis
|
||||
- **User Preferences**: Estimation methodologies and confidence level requirements
|
||||
- **Project-Specific Settings**: Historical data patterns and complexity benchmarks
|
||||
|
||||
### Extension Points
|
||||
- **Custom Workflows**: Integration with project-specific estimation standards
|
||||
- **Plugin Integration**: Support for additional estimation tools and methodologies
|
||||
- **Hook Points**: Pre/post estimation validation and custom accuracy checks
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Validation Criteria
|
||||
- **Functional Correctness**: Estimations accurately reflect project requirements and complexity
|
||||
- **Performance Standards**: Meeting estimation accuracy targets and confidence requirements
|
||||
- **Integration Compliance**: Proper integration with existing project planning and management tools
|
||||
- **Error Handling Quality**: Comprehensive validation and methodology fallback capabilities
|
||||
|
||||
### Success Metrics
|
||||
- **Completion Rate**: >95% for well-defined estimation targets and requirements
|
||||
- **Performance Targets**: Meeting specified timing requirements for estimation phases
|
||||
- **User Satisfaction**: Clear estimation results with actionable breakdown and confidence data
|
||||
- **Integration Success**: Proper coordination with MCP servers and persona activation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Generate accurate development estimates with intelligent complexity analysis
|
||||
- Auto-activate relevant personas and coordinate MCP servers for enhanced estimation
|
||||
- Provide comprehensive breakdown analysis with confidence intervals and risk assessment
|
||||
- Apply systematic estimation methodologies with historical data integration
|
||||
|
||||
**This command will not:**
|
||||
- Make project commitments or resource allocation decisions beyond estimation scope
|
||||
- Override project-specific estimation standards or historical accuracy requirements
|
||||
- Generate estimates without appropriate analysis and validation of requirements
|
||||
- Bypass established estimation validation or accuracy verification requirements
|
||||
|
||||
---
|
||||
|
||||
*This estimation command provides comprehensive development planning capabilities with intelligent analysis and systematic estimation methodologies while maintaining accuracy and validation standards.*
|
||||
236
Framework/Commands/explain.md
Normal file
236
Framework/Commands/explain.md
Normal file
@@ -0,0 +1,236 @@
|
||||
---
|
||||
name: explain
|
||||
description: "Provide clear explanations of code, concepts, or system behavior with educational clarity and interactive learning patterns"
|
||||
allowed-tools: [Read, Grep, Glob, Bash, TodoWrite, Task]
|
||||
|
||||
# Command Classification
|
||||
category: workflow
|
||||
complexity: standard
|
||||
scope: cross-file
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7] # Sequential for analysis, Context7 for framework documentation
|
||||
personas: [educator, architect, security] # Auto-activated based on explanation context
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.4
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: standard
|
||||
---
|
||||
|
||||
# /sc:explain - Code and Concept Explanation
|
||||
|
||||
## Purpose
|
||||
Deliver clear, comprehensive explanations of code functionality, concepts, or system behavior with educational clarity and interactive learning support. This command serves as the primary knowledge transfer engine, providing adaptive explanation frameworks, clarity assessment, and progressive learning patterns with comprehensive context understanding.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:explain [target] [--level basic|intermediate|advanced] [--format text|diagram|examples] [--interactive]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Code file, function, concept, or system to explain
|
||||
- `--level` - Explanation complexity: basic, intermediate, advanced, expert
|
||||
- `--format` - Output format: text, diagram, examples, interactive
|
||||
- `--interactive` - Enable user interaction for clarification and deep-dive exploration
|
||||
- `--preview` - Show explanation outline without full detailed content
|
||||
- `--validate` - Enable additional validation steps for explanation accuracy
|
||||
- `--context` - Additional context scope for comprehensive understanding
|
||||
- `--examples` - Include practical examples and use cases
|
||||
- `--diagrams` - Generate visual representations and system diagrams
|
||||
|
||||
## Execution Flow
|
||||
|
||||
### 1. Context Analysis
|
||||
- Analyze target code or concept thoroughly for comprehensive understanding
|
||||
- Identify key components, relationships, and complexity factors
|
||||
- Assess audience level and appropriate explanation depth
|
||||
- Detect framework-specific patterns and documentation requirements
|
||||
|
||||
### 2. Strategy Selection
|
||||
- Choose appropriate explanation approach based on --level and --format
|
||||
- Auto-activate relevant personas for domain expertise (educator, architect)
|
||||
- Configure MCP servers for enhanced analysis and documentation access
|
||||
- Plan explanation sequence with progressive complexity and clarity
|
||||
|
||||
### 3. Core Operation
|
||||
- Execute systematic explanation workflows with appropriate clarity frameworks
|
||||
- Apply educational best practices and structured learning patterns
|
||||
- Coordinate multi-component explanations with logical flow
|
||||
- Generate relevant examples, diagrams, and interactive elements
|
||||
|
||||
### 4. Quality Assurance
|
||||
- Validate explanation accuracy against source code and documentation
|
||||
- Run clarity checks and comprehension validation
|
||||
- Generate comprehensive explanation with proper structure and flow
|
||||
- Verify explanation completeness with context understanding
|
||||
|
||||
### 5. Integration & Handoff
|
||||
- Update explanation database with reusable patterns and insights
|
||||
- Prepare explanation summary with recommendations for further learning
|
||||
- Persist explanation context and educational insights for future use
|
||||
- Enable follow-up learning and documentation workflows
|
||||
|
||||
## MCP Server Integration
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Analysis**: Systematic analysis of code structure and concept relationships
|
||||
- **Multi-Step Planning**: Breaks down complex explanations into manageable learning components
|
||||
- **Validation Logic**: Uses structured reasoning for accuracy verification and clarity assessment
|
||||
|
||||
### Context7 Integration
|
||||
- **Automatic Activation**: When framework-specific explanations and official documentation are relevant
|
||||
- **Library Patterns**: Leverages official documentation for accurate framework understanding
|
||||
- **Best Practices**: Integrates established explanation standards and educational patterns
|
||||
|
||||
## Persona Auto-Activation
|
||||
|
||||
### Context-Based Activation
|
||||
The command automatically activates relevant personas based on explanation scope:
|
||||
|
||||
- **Educator Persona**: Learning optimization, clarity assessment, and progressive explanation design
|
||||
- **Architect Persona**: System design explanations, architectural pattern descriptions, and complexity breakdown
|
||||
- **Security Persona**: Security concept explanations, vulnerability analysis, and secure coding practice descriptions
|
||||
|
||||
### Multi-Persona Coordination
|
||||
- **Collaborative Analysis**: Multiple personas work together for comprehensive explanation coverage
|
||||
- **Expertise Integration**: Combining domain-specific knowledge for accurate and clear explanations
|
||||
- **Conflict Resolution**: Handling different persona approaches through systematic educational evaluation
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Task Integration
|
||||
- **Complex Operations**: Use Task tool for multi-step explanation workflows
|
||||
- **Parallel Processing**: Coordinate independent explanation work streams
|
||||
- **Progress Tracking**: TodoWrite integration for explanation completeness management
|
||||
|
||||
### Workflow Orchestration
|
||||
- **Dependency Management**: Handle explanation prerequisites and logical sequencing
|
||||
- **Error Recovery**: Graceful handling of explanation failures with alternative approaches
|
||||
- **State Management**: Maintain explanation state across interruptions and refinements
|
||||
|
||||
### Quality Gates
|
||||
- **Pre-validation**: Check explanation requirements and target clarity before analysis
|
||||
- **Progress Validation**: Intermediate clarity and accuracy checks during explanation process
|
||||
- **Post-validation**: Comprehensive verification of explanation completeness and educational value
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Efficiency Features
|
||||
- **Intelligent Batching**: Group related explanation operations for coherent learning flow
|
||||
- **Context Caching**: Reuse analysis results within session for related explanations
|
||||
- **Parallel Execution**: Independent explanation operations run concurrently with coordination
|
||||
- **Resource Management**: Optimal tool and MCP server utilization for analysis and documentation
|
||||
|
||||
### Performance Targets
|
||||
- **Analysis Phase**: <15s for comprehensive code or concept analysis
|
||||
- **Explanation Phase**: <30s for standard explanation generation with examples
|
||||
- **Validation Phase**: <8s for accuracy verification and clarity assessment
|
||||
- **Overall Command**: <60s for complex multi-component explanation workflows
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Code Explanation
|
||||
```
|
||||
/sc:explain authentication.js --level basic --examples
|
||||
# Clear explanation with practical examples for beginners
|
||||
```
|
||||
|
||||
### Advanced System Architecture
|
||||
```
|
||||
/sc:explain microservices-system --level advanced --diagrams --interactive
|
||||
# Advanced explanation with visual diagrams and interactive exploration
|
||||
```
|
||||
|
||||
### Framework Concept Explanation
|
||||
```
|
||||
/sc:explain react-hooks --level intermediate --format examples --c7
|
||||
# Framework-specific explanation with Context7 documentation integration
|
||||
```
|
||||
|
||||
### Security Concept Breakdown
|
||||
```
|
||||
/sc:explain jwt-authentication --context security --level basic --validate
|
||||
# Security-focused explanation with validation and clear context
|
||||
```
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Graceful Degradation
|
||||
- **MCP Server Unavailable**: Falls back to native analysis capabilities with basic explanation patterns
|
||||
- **Persona Activation Failure**: Continues with general explanation guidance and standard educational patterns
|
||||
- **Tool Access Issues**: Uses alternative analysis methods and provides manual explanation guidance
|
||||
|
||||
### Error Categories
|
||||
- **Input Validation Errors**: Clear feedback for invalid targets or conflicting explanation parameters
|
||||
- **Process Execution Errors**: Handling of explanation failures with alternative educational approaches
|
||||
- **Integration Errors**: MCP server or persona coordination issues with fallback strategies
|
||||
- **Resource Constraint Errors**: Behavior under resource limitations with optimization suggestions
|
||||
|
||||
### Recovery Strategies
|
||||
- **Automatic Retry**: Retry failed explanations with adjusted parameters and alternative methods
|
||||
- **User Intervention**: Request clarification when explanation requirements are ambiguous
|
||||
- **Partial Success Handling**: Complete partial explanations and document remaining analysis
|
||||
- **State Cleanup**: Ensure clean explanation state after failures with educational content preservation
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### Command Coordination
|
||||
- **Preparation Commands**: Often follows /sc:analyze or /sc:document for explanation preparation
|
||||
- **Follow-up Commands**: Commonly followed by /sc:implement, /sc:improve, or /sc:test
|
||||
- **Parallel Commands**: Can run alongside /sc:document for comprehensive knowledge transfer
|
||||
|
||||
### Framework Integration
|
||||
- **SuperClaude Ecosystem**: Integrates with quality gates and validation cycles
|
||||
- **Quality Gates**: Participates in explanation accuracy and clarity verification
|
||||
- **Session Management**: Maintains explanation context across session boundaries
|
||||
|
||||
### Tool Coordination
|
||||
- **Multi-Tool Operations**: Coordinates Read/Grep/Glob for comprehensive analysis
|
||||
- **Tool Selection Logic**: Dynamic tool selection based on explanation scope and complexity
|
||||
- **Resource Sharing**: Efficient use of shared MCP servers and persona expertise
|
||||
|
||||
## Customization & Configuration
|
||||
|
||||
### Configuration Options
|
||||
- **Default Behavior**: Adaptive explanation with comprehensive examples and context
|
||||
- **User Preferences**: Explanation depth preferences and learning style adaptations
|
||||
- **Project-Specific Settings**: Framework conventions and domain-specific explanation patterns
|
||||
|
||||
### Extension Points
|
||||
- **Custom Workflows**: Integration with project-specific explanation standards
|
||||
- **Plugin Integration**: Support for additional documentation and educational tools
|
||||
- **Hook Points**: Pre/post explanation validation and custom clarity checks
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Validation Criteria
|
||||
- **Functional Correctness**: Explanations accurately reflect code behavior and system functionality
|
||||
- **Performance Standards**: Meeting explanation clarity targets and educational effectiveness
|
||||
- **Integration Compliance**: Proper integration with existing documentation and educational resources
|
||||
- **Error Handling Quality**: Comprehensive validation and alternative explanation approaches
|
||||
|
||||
### Success Metrics
|
||||
- **Completion Rate**: >95% for well-defined explanation targets and requirements
|
||||
- **Performance Targets**: Meeting specified timing requirements for explanation phases
|
||||
- **User Satisfaction**: Clear explanation results with effective knowledge transfer
|
||||
- **Integration Success**: Proper coordination with MCP servers and persona activation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Provide clear, comprehensive explanations with educational clarity and progressive learning
|
||||
- Auto-activate relevant personas and coordinate MCP servers for enhanced analysis
|
||||
- Generate accurate explanations with practical examples and interactive learning support
|
||||
- Apply systematic explanation methodologies with framework-specific documentation integration
|
||||
|
||||
**This command will not:**
|
||||
- Generate explanations without thorough analysis and accuracy verification
|
||||
- Override project-specific documentation standards or educational requirements
|
||||
- Provide explanations that compromise security or expose sensitive implementation details
|
||||
- Bypass established explanation validation or educational quality requirements
|
||||
|
||||
---
|
||||
|
||||
*This explanation command provides comprehensive knowledge transfer capabilities with intelligent analysis and systematic educational workflows while maintaining accuracy and clarity standards.*
|
||||
90
Framework/Commands/git.md
Normal file
90
Framework/Commands/git.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
name: git
|
||||
description: "Git operations with intelligent commit messages, branch management, and workflow optimization"
|
||||
allowed-tools: [Read, Bash, Grep, Glob, Write]
|
||||
|
||||
# Command Classification
|
||||
category: utility
|
||||
complexity: basic
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [] # No MCP servers required for basic commands
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
---
|
||||
|
||||
# /sc:git - Git Operations and Workflow Management
|
||||
|
||||
## Purpose
|
||||
Execute comprehensive Git operations with intelligent commit message generation, automated branch management, workflow optimization, and integration with development processes while maintaining repository best practices.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:git [operation] [args] [--smart-commit] [--branch-strategy] [--interactive]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `operation` - Git command (add, commit, push, pull, merge, branch, status, log, diff)
|
||||
- `args` - Operation-specific arguments and file specifications
|
||||
- `--smart-commit` - Enable intelligent commit message generation based on changes
|
||||
- `--branch-strategy` - Apply consistent branch naming conventions and workflow patterns
|
||||
- `--interactive` - Enable interactive mode for complex operations requiring user input
|
||||
|
||||
## Execution
|
||||
1. Analyze current Git repository state, working directory changes, and branch context
|
||||
2. Execute requested Git operations with comprehensive validation and error checking
|
||||
3. Apply intelligent commit message generation based on change analysis and conventional patterns
|
||||
4. Handle merge conflicts, branch management, and repository state consistency
|
||||
5. Provide clear operation feedback, next steps guidance, and workflow recommendations
|
||||
|
||||
## Claude Code Integration
|
||||
- **Tool Usage**: Bash for Git command execution, Read for repository analysis, Grep for log parsing
|
||||
- **File Operations**: Reads repository state and configuration, writes commit messages and branch documentation
|
||||
- **Analysis Approach**: Change analysis with pattern recognition for conventional commit formatting
|
||||
- **Output Format**: Structured Git operation reports with status summaries and recommended actions
|
||||
|
||||
## Performance Targets
|
||||
- **Execution Time**: <5s for repository analysis and standard Git operations
|
||||
- **Success Rate**: >95% for Git command execution and repository state validation
|
||||
- **Error Handling**: Comprehensive handling of merge conflicts, permission issues, and network problems
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```
|
||||
/sc:git status
|
||||
# Displays comprehensive repository status with change analysis
|
||||
# Provides recommendations for next steps and workflow optimization
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```
|
||||
/sc:git commit --smart-commit --branch-strategy --interactive
|
||||
# Interactive commit with intelligent message generation
|
||||
# Applies branch naming conventions and workflow best practices
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
- **Invalid Input**: Validates Git repository exists and operations are appropriate for current state
|
||||
- **Missing Dependencies**: Checks Git installation and repository initialization status
|
||||
- **File Access Issues**: Handles file permissions, lock files, and concurrent Git operations
|
||||
- **Resource Constraints**: Manages large repository operations and network connectivity issues
|
||||
|
||||
## Integration Points
|
||||
- **SuperClaude Framework**: Integrates with build for release tagging and test for pre-commit validation
|
||||
- **Other Commands**: Coordinates with analyze for code quality gates and troubleshoot for repository issues
|
||||
- **File System**: Reads Git configuration and history, writes commit messages and branch documentation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Execute standard Git operations with intelligent automation and best practice enforcement
|
||||
- Generate conventional commit messages based on change analysis and repository patterns
|
||||
- Provide comprehensive repository status analysis and workflow optimization recommendations
|
||||
|
||||
**This command will not:**
|
||||
- Modify Git repository configuration or hooks without explicit user authorization
|
||||
- Execute destructive operations like force pushes or history rewriting without confirmation
|
||||
- Handle complex merge scenarios requiring manual intervention beyond basic conflict resolution
|
||||
243
Framework/Commands/implement.md
Normal file
243
Framework/Commands/implement.md
Normal file
@@ -0,0 +1,243 @@
|
||||
---
|
||||
name: implement
|
||||
description: "Feature and code implementation with intelligent persona activation and comprehensive MCP integration for development workflows"
|
||||
allowed-tools: [Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite, Task]
|
||||
|
||||
# Command Classification
|
||||
category: workflow
|
||||
complexity: standard
|
||||
scope: cross-file
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [context7, sequential, magic, playwright] # Enhanced capabilities for implementation
|
||||
personas: [architect, frontend, backend, security, qa-specialist] # Auto-activated based on context
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.5
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: standard
|
||||
---
|
||||
|
||||
# /sc:implement - Feature Implementation
|
||||
|
||||
## Purpose
|
||||
Implement features, components, and code functionality with intelligent expert activation and comprehensive development support. This command serves as the primary implementation engine in development workflows, providing automated persona activation, MCP server coordination, and best practices enforcement throughout the implementation process.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:implement [feature-description] [--type component|api|service|feature] [--framework react|vue|express|etc] [--safe] [--interactive]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `feature-description` - Description of what to implement (required)
|
||||
- `--type` - Implementation type: component, api, service, feature, module
|
||||
- `--framework` - Target framework or technology stack
|
||||
- `--safe` - Use conservative implementation approach with minimal risk
|
||||
- `--interactive` - Enable user interaction for complex implementation decisions
|
||||
- `--preview` - Show implementation plan without executing
|
||||
- `--validate` - Enable additional validation steps and quality checks
|
||||
- `--iterative` - Enable iterative development with validation steps
|
||||
- `--with-tests` - Include test implementation alongside feature code
|
||||
- `--documentation` - Generate documentation alongside implementation
|
||||
|
||||
## Execution Flow
|
||||
|
||||
### 1. Context Analysis
|
||||
- Analyze implementation requirements and detect technology context
|
||||
- Identify project patterns and existing conventions
|
||||
- Assess complexity and potential impact of implementation
|
||||
- Detect framework and library dependencies automatically
|
||||
|
||||
### 2. Strategy Selection
|
||||
- Choose appropriate implementation approach based on --type and context
|
||||
- Auto-activate relevant personas for domain expertise (frontend, backend, security)
|
||||
- Configure MCP servers for enhanced capabilities (Magic for UI, Context7 for patterns)
|
||||
- Plan implementation sequence and dependency management
|
||||
|
||||
### 3. Core Operation
|
||||
- Generate implementation code with framework-specific best practices
|
||||
- Apply security and quality validation throughout development
|
||||
- Coordinate multi-file implementations with proper integration
|
||||
- Handle edge cases and error scenarios proactively
|
||||
|
||||
### 4. Quality Assurance
|
||||
- Validate implementation against requirements and standards
|
||||
- Run automated checks and linting where applicable
|
||||
- Verify integration with existing codebase patterns
|
||||
- Generate comprehensive feedback and improvement recommendations
|
||||
|
||||
### 5. Integration & Handoff
|
||||
- Update related documentation and configuration files
|
||||
- Provide testing recommendations and validation steps
|
||||
- Prepare for follow-up commands or next development phases
|
||||
- Persist implementation context for future operations
|
||||
|
||||
## MCP Server Integration
|
||||
|
||||
### Context7 Integration
|
||||
- **Automatic Activation**: When external frameworks or libraries are detected in implementation requirements
|
||||
- **Library Patterns**: Leverages official documentation for React, Vue, Angular, Express, and other frameworks
|
||||
- **Best Practices**: Integrates established patterns and conventions from framework documentation
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Analysis**: Applies systematic analysis for multi-component implementations
|
||||
- **Multi-Step Planning**: Breaks down complex features into manageable implementation steps
|
||||
- **Validation Logic**: Uses structured reasoning for quality checks and integration verification
|
||||
|
||||
### Magic Integration
|
||||
- **UI Component Generation**: Automatically activates for frontend component implementations
|
||||
- **Design System Integration**: Applies design tokens and component patterns
|
||||
- **Responsive Implementation**: Ensures mobile-first and accessibility compliance
|
||||
|
||||
## Persona Auto-Activation
|
||||
|
||||
### Context-Based Activation
|
||||
The command automatically activates relevant personas based on detected context:
|
||||
|
||||
- **Architect Persona**: System design, module structure, architectural decisions, and scalability considerations
|
||||
- **Frontend Persona**: UI components, React/Vue/Angular development, client-side logic, and user experience
|
||||
- **Backend Persona**: APIs, services, database integration, server-side logic, and data processing
|
||||
- **Security Persona**: Authentication, authorization, data protection, input validation, and security best practices
|
||||
|
||||
### Multi-Persona Coordination
|
||||
- **Collaborative Analysis**: Multiple personas work together for full-stack implementations
|
||||
- **Expertise Integration**: Combining domain-specific knowledge for comprehensive solutions
|
||||
- **Conflict Resolution**: Handling different persona recommendations through systematic evaluation
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Task Integration
|
||||
- **Complex Operations**: Use Task tool for multi-step implementation workflows
|
||||
- **Parallel Processing**: Coordinate independent implementation work streams
|
||||
- **Progress Tracking**: TodoWrite integration for implementation status management
|
||||
|
||||
### Workflow Orchestration
|
||||
- **Dependency Management**: Handle prerequisites and implementation sequencing
|
||||
- **Error Recovery**: Graceful handling of implementation failures and rollbacks
|
||||
- **State Management**: Maintain implementation state across interruptions
|
||||
|
||||
### Quality Gates
|
||||
- **Pre-validation**: Check requirements and dependencies before implementation
|
||||
- **Progress Validation**: Intermediate quality checks during development
|
||||
- **Post-validation**: Comprehensive results verification and integration testing
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Efficiency Features
|
||||
- **Intelligent Batching**: Group related implementation operations for efficiency
|
||||
- **Context Caching**: Reuse analysis results within session for related implementations
|
||||
- **Parallel Execution**: Independent implementation operations run concurrently
|
||||
- **Resource Management**: Optimal tool and MCP server utilization
|
||||
|
||||
### Performance Targets
|
||||
- **Analysis Phase**: <10s for feature requirement analysis
|
||||
- **Implementation Phase**: <30s for standard component/API implementations
|
||||
- **Validation Phase**: <5s for quality checks and integration verification
|
||||
- **Overall Command**: <60s for complex multi-component implementations
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Component Implementation
|
||||
```
|
||||
/sc:implement user profile component --type component --framework react
|
||||
# React component with persona activation and Magic integration
|
||||
```
|
||||
|
||||
### API Service Implementation
|
||||
```
|
||||
/sc:implement user authentication API --type api --safe --with-tests
|
||||
# Backend API with security persona and comprehensive validation
|
||||
```
|
||||
|
||||
### Full Feature Implementation
|
||||
```
|
||||
/sc:implement payment processing system --type feature --iterative --documentation
|
||||
# Complex feature with multi-persona coordination and iterative development
|
||||
```
|
||||
|
||||
### Framework-Specific Implementation
|
||||
```
|
||||
/sc:implement dashboard widget --type component --framework vue --c7
|
||||
# Vue component leveraging Context7 for Vue-specific patterns
|
||||
```
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Graceful Degradation
|
||||
- **MCP Server Unavailable**: Falls back to native Claude Code capabilities with reduced automation
|
||||
- **Persona Activation Failure**: Continues with general development guidance and best practices
|
||||
- **Tool Access Issues**: Uses alternative tools and provides manual implementation guidance
|
||||
|
||||
### Error Categories
|
||||
- **Input Validation Errors**: Clear feedback for invalid feature descriptions or conflicting parameters
|
||||
- **Process Execution Errors**: Handling of implementation failures with rollback capabilities
|
||||
- **Integration Errors**: MCP server or persona coordination issues with fallback strategies
|
||||
- **Resource Constraint Errors**: Behavior under resource limitations with optimization suggestions
|
||||
|
||||
### Recovery Strategies
|
||||
- **Automatic Retry**: Retry failed operations with adjusted parameters and reduced complexity
|
||||
- **User Intervention**: Request clarification when implementation requirements are ambiguous
|
||||
- **Partial Success Handling**: Complete partial implementations and document remaining work
|
||||
- **State Cleanup**: Ensure clean codebase state after implementation failures
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### Command Coordination
|
||||
- **Preparation Commands**: Often follows /sc:design or /sc:analyze for implementation planning
|
||||
- **Follow-up Commands**: Commonly followed by /sc:test, /sc:improve, or /sc:document
|
||||
- **Parallel Commands**: Can run alongside /sc:estimate for development planning
|
||||
|
||||
### Framework Integration
|
||||
- **SuperClaude Ecosystem**: Integrates with quality gates and validation cycles
|
||||
- **Quality Gates**: Participates in the 8-step validation process
|
||||
- **Session Management**: Maintains implementation context across session boundaries
|
||||
|
||||
### Tool Coordination
|
||||
- **Multi-Tool Operations**: Coordinates Write/Edit/MultiEdit for complex implementations
|
||||
- **Tool Selection Logic**: Dynamic tool selection based on implementation scope and complexity
|
||||
- **Resource Sharing**: Efficient use of shared MCP servers and persona expertise
|
||||
|
||||
## Customization & Configuration
|
||||
|
||||
### Configuration Options
|
||||
- **Default Behavior**: Automatic persona activation with conservative implementation approach
|
||||
- **User Preferences**: Framework preferences and coding style enforcement
|
||||
- **Project-Specific Settings**: Project conventions and architectural patterns
|
||||
|
||||
### Extension Points
|
||||
- **Custom Workflows**: Integration with project-specific implementation patterns
|
||||
- **Plugin Integration**: Support for additional frameworks and libraries
|
||||
- **Hook Points**: Pre/post implementation validation and custom quality checks
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Validation Criteria
|
||||
- **Functional Correctness**: Implementation meets specified requirements and handles edge cases
|
||||
- **Performance Standards**: Meeting framework-specific performance targets and best practices
|
||||
- **Integration Compliance**: Proper integration with existing codebase and architectural patterns
|
||||
- **Error Handling Quality**: Comprehensive error management and graceful degradation
|
||||
|
||||
### Success Metrics
|
||||
- **Completion Rate**: >95% for well-formed feature descriptions and requirements
|
||||
- **Performance Targets**: Meeting specified timing requirements for implementation phases
|
||||
- **User Satisfaction**: Clear implementation results with expected functionality
|
||||
- **Integration Success**: Proper coordination with MCP servers and persona activation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Implement features, components, and code functionality with intelligent automation
|
||||
- Auto-activate relevant personas and coordinate MCP servers for enhanced capabilities
|
||||
- Apply framework-specific best practices and security validation throughout development
|
||||
- Provide comprehensive implementation with testing recommendations and documentation
|
||||
|
||||
**This command will not:**
|
||||
- Make architectural decisions without appropriate persona consultation and validation
|
||||
- Implement features that conflict with existing security policies or architectural constraints
|
||||
- Override user-specified safety constraints or project-specific implementation guidelines
|
||||
- Create implementations that bypass established quality gates or validation requirements
|
||||
|
||||
---
|
||||
|
||||
*This implementation command provides comprehensive development capabilities with intelligent persona activation and MCP integration while maintaining safety and quality standards throughout the implementation process.*
|
||||
236
Framework/Commands/improve.md
Normal file
236
Framework/Commands/improve.md
Normal file
@@ -0,0 +1,236 @@
|
||||
---
|
||||
name: improve
|
||||
description: "Apply systematic improvements to code quality, performance, and maintainability with intelligent analysis and refactoring patterns"
|
||||
allowed-tools: [Read, Grep, Glob, Edit, MultiEdit, TodoWrite, Task]
|
||||
|
||||
# Command Classification
|
||||
category: workflow
|
||||
complexity: standard
|
||||
scope: cross-file
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7] # Sequential for analysis, Context7 for best practices
|
||||
personas: [architect, performance, quality, security] # Auto-activated based on improvement type
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.6
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: standard
|
||||
---
|
||||
|
||||
# /sc:improve - Code Improvement
|
||||
|
||||
## Purpose
|
||||
Apply systematic improvements to code quality, performance, maintainability, and best practices through intelligent analysis and targeted refactoring. This command serves as the primary quality enhancement engine, providing automated assessment workflows, quality metrics analysis, and systematic improvement application with safety validation.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:improve [target] [--type quality|performance|maintainability|style] [--safe] [--interactive]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Files, directories, or project scope to improve
|
||||
- `--type` - Improvement focus: quality, performance, maintainability, style, security
|
||||
- `--safe` - Apply only safe, low-risk improvements with minimal impact
|
||||
- `--interactive` - Enable user interaction for complex improvement decisions
|
||||
- `--preview` - Show improvements without applying them for review
|
||||
- `--validate` - Enable additional validation steps and quality verification
|
||||
- `--metrics` - Generate detailed quality metrics and improvement tracking
|
||||
- `--iterative` - Apply improvements in multiple passes with validation
|
||||
|
||||
## Execution Flow
|
||||
|
||||
### 1. Context Analysis
|
||||
- Analyze codebase for improvement opportunities and quality issues
|
||||
- Identify project patterns and existing quality standards
|
||||
- Assess complexity and potential impact of proposed improvements
|
||||
- Detect framework-specific optimization opportunities
|
||||
|
||||
### 2. Strategy Selection
|
||||
- Choose appropriate improvement approach based on --type and context
|
||||
- Auto-activate relevant personas for domain expertise (performance, security, quality)
|
||||
- Configure MCP servers for enhanced analysis capabilities
|
||||
- Plan improvement sequence with risk assessment and validation
|
||||
|
||||
### 3. Core Operation
|
||||
- Execute systematic improvement workflows with appropriate validation
|
||||
- Apply domain-specific best practices and optimization patterns
|
||||
- Monitor progress and handle complex refactoring scenarios
|
||||
- Coordinate multi-file improvements with dependency awareness
|
||||
|
||||
### 4. Quality Assurance
|
||||
- Validate improvements against quality standards and requirements
|
||||
- Run automated checks and testing to ensure functionality preservation
|
||||
- Generate comprehensive metrics and improvement documentation
|
||||
- Verify integration with existing codebase patterns and conventions
|
||||
|
||||
### 5. Integration & Handoff
|
||||
- Update related documentation and configuration to reflect improvements
|
||||
- Prepare improvement summary and recommendations for future work
|
||||
- Persist improvement context and quality metrics for tracking
|
||||
- Enable follow-up optimization and maintenance workflows
|
||||
|
||||
## MCP Server Integration
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Analysis**: Systematic analysis of code quality issues and improvement opportunities
|
||||
- **Multi-Step Planning**: Breaks down complex refactoring into manageable improvement steps
|
||||
- **Validation Logic**: Uses structured reasoning for quality verification and impact assessment
|
||||
|
||||
### Context7 Integration
|
||||
- **Automatic Activation**: When framework-specific improvements and best practices are applicable
|
||||
- **Library Patterns**: Leverages official documentation for framework optimization patterns
|
||||
- **Best Practices**: Integrates established quality standards and coding conventions
|
||||
|
||||
## Persona Auto-Activation
|
||||
|
||||
### Context-Based Activation
|
||||
The command automatically activates relevant personas based on improvement type:
|
||||
|
||||
- **Architect Persona**: System design improvements, architectural refactoring, and structural optimization
|
||||
- **Performance Persona**: Performance optimization, bottleneck analysis, and scalability improvements
|
||||
- **Quality Persona**: Code quality assessment, maintainability improvements, and technical debt reduction
|
||||
- **Security Persona**: Security vulnerability fixes, secure coding practices, and data protection improvements
|
||||
|
||||
### Multi-Persona Coordination
|
||||
- **Collaborative Analysis**: Multiple personas work together for comprehensive quality improvements
|
||||
- **Expertise Integration**: Combining domain-specific knowledge for holistic optimization
|
||||
- **Conflict Resolution**: Handling different persona recommendations through systematic evaluation
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Task Integration
|
||||
- **Complex Operations**: Use Task tool for multi-step improvement workflows
|
||||
- **Parallel Processing**: Coordinate independent improvement work streams
|
||||
- **Progress Tracking**: TodoWrite integration for improvement status management
|
||||
|
||||
### Workflow Orchestration
|
||||
- **Dependency Management**: Handle improvement prerequisites and sequencing
|
||||
- **Error Recovery**: Graceful handling of improvement failures and rollbacks
|
||||
- **State Management**: Maintain improvement state across interruptions
|
||||
|
||||
### Quality Gates
|
||||
- **Pre-validation**: Check code quality baseline before improvement execution
|
||||
- **Progress Validation**: Intermediate quality checks during improvement process
|
||||
- **Post-validation**: Comprehensive verification of improvement effectiveness
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Efficiency Features
|
||||
- **Intelligent Batching**: Group related improvement operations for efficiency
|
||||
- **Context Caching**: Reuse analysis results within session for related improvements
|
||||
- **Parallel Execution**: Independent improvement operations run concurrently
|
||||
- **Resource Management**: Optimal tool and MCP server utilization
|
||||
|
||||
### Performance Targets
|
||||
- **Analysis Phase**: <15s for comprehensive code quality assessment
|
||||
- **Improvement Phase**: <45s for standard quality and performance improvements
|
||||
- **Validation Phase**: <10s for quality verification and testing
|
||||
- **Overall Command**: <90s for complex multi-file improvement workflows
|
||||
|
||||
## Examples
|
||||
|
||||
### Quality Improvement
|
||||
```
|
||||
/sc:improve src/ --type quality --safe --metrics
|
||||
# Safe quality improvements with detailed metrics tracking
|
||||
```
|
||||
|
||||
### Performance Optimization
|
||||
```
|
||||
/sc:improve backend/api --type performance --iterative --validate
|
||||
# Performance improvements with iterative validation
|
||||
```
|
||||
|
||||
### Style and Maintainability
|
||||
```
|
||||
/sc:improve entire-project --type maintainability --preview
|
||||
# Project-wide maintainability improvements with preview
|
||||
```
|
||||
|
||||
### Security Hardening
|
||||
```
|
||||
/sc:improve auth-module --type security --interactive --validate
|
||||
# Security improvements with interactive validation
|
||||
```
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Graceful Degradation
|
||||
- **MCP Server Unavailable**: Falls back to native analysis capabilities with basic improvement patterns
|
||||
- **Persona Activation Failure**: Continues with general improvement guidance and standard practices
|
||||
- **Tool Access Issues**: Uses alternative analysis methods and provides manual guidance
|
||||
|
||||
### Error Categories
|
||||
- **Input Validation Errors**: Clear feedback for invalid targets or conflicting improvement parameters
|
||||
- **Process Execution Errors**: Handling of improvement failures with rollback capabilities
|
||||
- **Integration Errors**: MCP server or persona coordination issues with fallback strategies
|
||||
- **Resource Constraint Errors**: Behavior under resource limitations with optimization suggestions
|
||||
|
||||
### Recovery Strategies
|
||||
- **Automatic Retry**: Retry failed improvements with adjusted parameters and reduced scope
|
||||
- **User Intervention**: Request clarification when improvement requirements are ambiguous
|
||||
- **Partial Success Handling**: Complete partial improvements and document remaining work
|
||||
- **State Cleanup**: Ensure clean codebase state after improvement failures
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### Command Coordination
|
||||
- **Preparation Commands**: Often follows /sc:analyze or /sc:estimate for improvement planning
|
||||
- **Follow-up Commands**: Commonly followed by /sc:test, /sc:validate, or /sc:document
|
||||
- **Parallel Commands**: Can run alongside /sc:cleanup for comprehensive codebase enhancement
|
||||
|
||||
### Framework Integration
|
||||
- **SuperClaude Ecosystem**: Integrates with quality gates and validation cycles
|
||||
- **Quality Gates**: Participates in the 8-step validation process for improvement verification
|
||||
- **Session Management**: Maintains improvement context across session boundaries
|
||||
|
||||
### Tool Coordination
|
||||
- **Multi-Tool Operations**: Coordinates Read/Edit/MultiEdit for complex improvements
|
||||
- **Tool Selection Logic**: Dynamic tool selection based on improvement scope and complexity
|
||||
- **Resource Sharing**: Efficient use of shared MCP servers and persona expertise
|
||||
|
||||
## Customization & Configuration
|
||||
|
||||
### Configuration Options
|
||||
- **Default Behavior**: Conservative improvements with comprehensive validation
|
||||
- **User Preferences**: Quality standards and improvement priorities
|
||||
- **Project-Specific Settings**: Project conventions and architectural guidelines
|
||||
|
||||
### Extension Points
|
||||
- **Custom Workflows**: Integration with project-specific quality standards
|
||||
- **Plugin Integration**: Support for additional linting and quality tools
|
||||
- **Hook Points**: Pre/post improvement validation and custom quality checks
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Validation Criteria
|
||||
- **Functional Correctness**: Improvements preserve existing functionality and behavior
|
||||
- **Performance Standards**: Meeting quality improvement targets and metrics
|
||||
- **Integration Compliance**: Proper integration with existing codebase and patterns
|
||||
- **Error Handling Quality**: Comprehensive validation and rollback capabilities
|
||||
|
||||
### Success Metrics
|
||||
- **Completion Rate**: >95% for well-defined improvement targets and parameters
|
||||
- **Performance Targets**: Meeting specified timing requirements for improvement phases
|
||||
- **User Satisfaction**: Clear improvement results with measurable quality gains
|
||||
- **Integration Success**: Proper coordination with MCP servers and persona activation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Apply systematic improvements to code quality, performance, and maintainability
|
||||
- Auto-activate relevant personas and coordinate MCP servers for enhanced analysis
|
||||
- Provide comprehensive quality assessment with metrics and improvement tracking
|
||||
- Ensure safe improvement application with validation and rollback capabilities
|
||||
|
||||
**This command will not:**
|
||||
- Make breaking changes without explicit user approval and validation
|
||||
- Override project-specific quality standards or architectural constraints
|
||||
- Apply improvements that compromise security or introduce technical debt
|
||||
- Bypass established quality gates or validation requirements
|
||||
|
||||
---
|
||||
|
||||
*This improvement command provides comprehensive code quality enhancement capabilities with intelligent analysis and systematic improvement workflows while maintaining safety and validation standards.*
|
||||
236
Framework/Commands/index.md
Normal file
236
Framework/Commands/index.md
Normal file
@@ -0,0 +1,236 @@
|
||||
---
|
||||
name: index
|
||||
description: "Generate comprehensive project documentation and knowledge base with intelligent organization and cross-referencing"
|
||||
allowed-tools: [Read, Grep, Glob, Bash, Write, TodoWrite, Task]
|
||||
|
||||
# Command Classification
|
||||
category: workflow
|
||||
complexity: standard
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7] # Sequential for analysis, Context7 for documentation patterns
|
||||
personas: [architect, scribe, quality] # Auto-activated based on documentation scope
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.5
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: standard
|
||||
---
|
||||
|
||||
# /sc:index - Project Documentation
|
||||
|
||||
## Purpose
|
||||
Create and maintain comprehensive project documentation, indexes, and knowledge bases with intelligent organization and cross-referencing capabilities. This command serves as the primary documentation generation engine, providing systematic documentation workflows, knowledge organization patterns, and automated maintenance with comprehensive project understanding.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:index [target] [--type docs|api|structure|readme] [--format md|json|yaml] [--interactive]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Project directory or specific component to document
|
||||
- `--type` - Documentation focus: docs, api, structure, readme, knowledge-base
|
||||
- `--format` - Output format: md, json, yaml, html
|
||||
- `--interactive` - Enable user interaction for complex documentation decisions
|
||||
- `--preview` - Show documentation structure without generating full content
|
||||
- `--validate` - Enable additional validation steps for documentation completeness
|
||||
- `--update` - Update existing documentation while preserving manual additions
|
||||
- `--cross-reference` - Generate comprehensive cross-references and navigation
|
||||
- `--templates` - Use project-specific documentation templates and patterns
|
||||
|
||||
## Execution Flow
|
||||
|
||||
### 1. Context Analysis
|
||||
- Analyze project structure and identify key documentation components
|
||||
- Identify existing documentation patterns and organizational conventions
|
||||
- Assess documentation scope and complexity requirements
|
||||
- Detect framework-specific documentation patterns and standards
|
||||
|
||||
### 2. Strategy Selection
|
||||
- Choose appropriate documentation approach based on --type and project structure
|
||||
- Auto-activate relevant personas for domain expertise (architect, scribe)
|
||||
- Configure MCP servers for enhanced analysis and documentation pattern access
|
||||
- Plan documentation sequence with cross-referencing and navigation structure
|
||||
|
||||
### 3. Core Operation
|
||||
- Execute systematic documentation workflows with appropriate organization patterns
|
||||
- Apply intelligent content extraction and documentation generation algorithms
|
||||
- Coordinate multi-component documentation with logical structure and flow
|
||||
- Generate comprehensive cross-references and navigation systems
|
||||
|
||||
### 4. Quality Assurance
|
||||
- Validate documentation completeness against project structure and requirements
|
||||
- Run accuracy checks and consistency validation across documentation
|
||||
- Generate comprehensive documentation with proper organization and formatting
|
||||
- Verify documentation integration with project conventions and standards
|
||||
|
||||
### 5. Integration & Handoff
|
||||
- Update documentation index and navigation systems
|
||||
- Prepare documentation summary with maintenance recommendations
|
||||
- Persist documentation context and organizational insights for future updates
|
||||
- Enable follow-up documentation maintenance and knowledge management workflows
|
||||
|
||||
## MCP Server Integration
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Analysis**: Systematic analysis of project structure and documentation requirements
|
||||
- **Multi-Step Planning**: Breaks down complex documentation into manageable generation components
|
||||
- **Validation Logic**: Uses structured reasoning for completeness verification and organization assessment
|
||||
|
||||
### Context7 Integration
|
||||
- **Automatic Activation**: When framework-specific documentation patterns and conventions are applicable
|
||||
- **Library Patterns**: Leverages official documentation for framework documentation standards
|
||||
- **Best Practices**: Integrates established documentation standards and organizational patterns
|
||||
|
||||
## Persona Auto-Activation
|
||||
|
||||
### Context-Based Activation
|
||||
The command automatically activates relevant personas based on documentation scope:
|
||||
|
||||
- **Architect Persona**: System documentation, architectural decision records, and structural organization
|
||||
- **Scribe Persona**: Content creation, documentation standards, and knowledge organization optimization
|
||||
- **Quality Persona**: Documentation quality assessment, completeness verification, and maintenance planning
|
||||
|
||||
### Multi-Persona Coordination
|
||||
- **Collaborative Analysis**: Multiple personas work together for comprehensive documentation coverage
|
||||
- **Expertise Integration**: Combining domain-specific knowledge for accurate and well-organized documentation
|
||||
- **Conflict Resolution**: Handling different persona recommendations through systematic documentation evaluation
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Task Integration
|
||||
- **Complex Operations**: Use Task tool for multi-step documentation workflows
|
||||
- **Parallel Processing**: Coordinate independent documentation work streams
|
||||
- **Progress Tracking**: TodoWrite integration for documentation completeness management
|
||||
|
||||
### Workflow Orchestration
|
||||
- **Dependency Management**: Handle documentation prerequisites and logical sequencing
|
||||
- **Error Recovery**: Graceful handling of documentation failures with alternative approaches
|
||||
- **State Management**: Maintain documentation state across interruptions and updates
|
||||
|
||||
### Quality Gates
|
||||
- **Pre-validation**: Check documentation requirements and project structure before generation
|
||||
- **Progress Validation**: Intermediate completeness and accuracy checks during documentation process
|
||||
- **Post-validation**: Comprehensive verification of documentation quality and organizational effectiveness
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Efficiency Features
|
||||
- **Intelligent Batching**: Group related documentation operations for coherent organization
|
||||
- **Context Caching**: Reuse analysis results within session for related documentation components
|
||||
- **Parallel Execution**: Independent documentation operations run concurrently with coordination
|
||||
- **Resource Management**: Optimal tool and MCP server utilization for analysis and generation
|
||||
|
||||
### Performance Targets
|
||||
- **Analysis Phase**: <30s for comprehensive project structure and requirement analysis
|
||||
- **Documentation Phase**: <90s for standard project documentation generation workflows
|
||||
- **Validation Phase**: <20s for completeness verification and quality assessment
|
||||
- **Overall Command**: <180s for complex multi-component documentation generation
|
||||
|
||||
## Examples
|
||||
|
||||
### Project Structure Documentation
|
||||
```
|
||||
/sc:index project-root --type structure --format md --cross-reference
|
||||
# Comprehensive project structure documentation with navigation
|
||||
```
|
||||
|
||||
### API Documentation Generation
|
||||
```
|
||||
/sc:index src/api --type api --format json --validate --update
|
||||
# API documentation with validation and existing documentation updates
|
||||
```
|
||||
|
||||
### Knowledge Base Creation
|
||||
```
|
||||
/sc:index entire-project --type knowledge-base --interactive --templates
|
||||
# Interactive knowledge base generation with project templates
|
||||
```
|
||||
|
||||
### README Generation
|
||||
```
|
||||
/sc:index . --type readme --format md --c7 --cross-reference
|
||||
# README generation with Context7 framework patterns and cross-references
|
||||
```
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Graceful Degradation
|
||||
- **MCP Server Unavailable**: Falls back to native analysis capabilities with basic documentation patterns
|
||||
- **Persona Activation Failure**: Continues with general documentation guidance and standard organizational patterns
|
||||
- **Tool Access Issues**: Uses alternative analysis methods and provides manual documentation guidance
|
||||
|
||||
### Error Categories
|
||||
- **Input Validation Errors**: Clear feedback for invalid targets or conflicting documentation parameters
|
||||
- **Process Execution Errors**: Handling of documentation failures with alternative generation approaches
|
||||
- **Integration Errors**: MCP server or persona coordination issues with fallback strategies
|
||||
- **Resource Constraint Errors**: Behavior under resource limitations with optimization suggestions
|
||||
|
||||
### Recovery Strategies
|
||||
- **Automatic Retry**: Retry failed documentation operations with adjusted parameters and alternative methods
|
||||
- **User Intervention**: Request clarification when documentation requirements are ambiguous
|
||||
- **Partial Success Handling**: Complete partial documentation and document remaining analysis
|
||||
- **State Cleanup**: Ensure clean documentation state after failures with content preservation
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### Command Coordination
|
||||
- **Preparation Commands**: Often follows /sc:analyze or /sc:explain for documentation preparation
|
||||
- **Follow-up Commands**: Commonly followed by /sc:validate, /sc:improve, or knowledge management workflows
|
||||
- **Parallel Commands**: Can run alongside /sc:explain for comprehensive knowledge transfer
|
||||
|
||||
### Framework Integration
|
||||
- **SuperClaude Ecosystem**: Integrates with quality gates and validation cycles
|
||||
- **Quality Gates**: Participates in documentation completeness and quality verification
|
||||
- **Session Management**: Maintains documentation context across session boundaries
|
||||
|
||||
### Tool Coordination
|
||||
- **Multi-Tool Operations**: Coordinates Read/Grep/Glob/Write for comprehensive documentation
|
||||
- **Tool Selection Logic**: Dynamic tool selection based on documentation scope and format requirements
|
||||
- **Resource Sharing**: Efficient use of shared MCP servers and persona expertise
|
||||
|
||||
## Customization & Configuration
|
||||
|
||||
### Configuration Options
|
||||
- **Default Behavior**: Comprehensive documentation with intelligent organization and cross-referencing
|
||||
- **User Preferences**: Documentation depth preferences and organizational style adaptations
|
||||
- **Project-Specific Settings**: Framework conventions and domain-specific documentation patterns
|
||||
|
||||
### Extension Points
|
||||
- **Custom Workflows**: Integration with project-specific documentation standards
|
||||
- **Plugin Integration**: Support for additional documentation tools and formats
|
||||
- **Hook Points**: Pre/post documentation validation and custom organization checks
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Validation Criteria
|
||||
- **Functional Correctness**: Documentation accurately reflects project structure and functionality
|
||||
- **Performance Standards**: Meeting documentation completeness targets and organizational effectiveness
|
||||
- **Integration Compliance**: Proper integration with existing documentation and project standards
|
||||
- **Error Handling Quality**: Comprehensive validation and alternative documentation approaches
|
||||
|
||||
### Success Metrics
|
||||
- **Completion Rate**: >95% for well-defined documentation targets and requirements
|
||||
- **Performance Targets**: Meeting specified timing requirements for documentation phases
|
||||
- **User Satisfaction**: Clear documentation results with effective knowledge organization
|
||||
- **Integration Success**: Proper coordination with MCP servers and persona activation
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Generate comprehensive project documentation with intelligent organization and cross-referencing
|
||||
- Auto-activate relevant personas and coordinate MCP servers for enhanced analysis
|
||||
- Provide systematic documentation workflows with quality validation and maintenance support
|
||||
- Apply intelligent content extraction with framework-specific documentation standards
|
||||
|
||||
**This command will not:**
|
||||
- Override existing manual documentation without explicit update permission
|
||||
- Generate documentation that conflicts with project-specific standards or security requirements
|
||||
- Create documentation without appropriate analysis and validation of project structure
|
||||
- Bypass established documentation validation or quality requirements
|
||||
|
||||
---
|
||||
|
||||
*This index command provides comprehensive documentation generation capabilities with intelligent analysis and systematic organization workflows while maintaining quality and standards compliance.*
|
||||
355
Framework/Commands/load.md
Normal file
355
Framework/Commands/load.md
Normal file
@@ -0,0 +1,355 @@
|
||||
---
|
||||
name: load
|
||||
description: "Session lifecycle management with Serena MCP integration and performance requirements for project context loading"
|
||||
allowed-tools: [Read, Grep, Glob, Write, activate_project, list_memories, read_memory, write_memory, check_onboarding_performed, onboarding]
|
||||
|
||||
# Command Classification
|
||||
category: session
|
||||
complexity: standard
|
||||
scope: cross-session
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [serena] # Mandatory Serena MCP integration
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.3
|
||||
auto-flags: [] # No automatic flags
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: session-critical
|
||||
performance-targets:
|
||||
initialization: <500ms
|
||||
core-operations: <200ms
|
||||
checkpoint-creation: <1s
|
||||
memory-operations: <200ms
|
||||
---
|
||||
|
||||
# /sc:load - Project Context Loading with Serena
|
||||
|
||||
## Purpose
|
||||
Load and analyze project context using Serena MCP for project activation, memory retrieval, and context management with session lifecycle integration and cross-session persistence capabilities.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:load [target] [--type project|config|deps|env|checkpoint] [--refresh] [--analyze] [--checkpoint ID] [--resume] [--validate] [--performance] [--metadata] [--cleanup] [--uc]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Project directory or name (defaults to current directory)
|
||||
- `--type` - Specific loading type (project, config, deps, env, checkpoint)
|
||||
- `--refresh` - Force reload of project memories and context
|
||||
- `--analyze` - Run deep analysis after loading
|
||||
- `--onboard` - Run onboarding if not performed
|
||||
- `--checkpoint` - Restore from specific checkpoint ID
|
||||
- `--resume` - Resume from latest checkpoint automatically
|
||||
- `--validate` - Validate session integrity and data consistency
|
||||
- `--performance` - Enable performance monitoring and optimization
|
||||
- `--metadata` - Include comprehensive session metadata
|
||||
- `--cleanup` - Perform session cleanup and optimization
|
||||
- `--uc` - Enable Token Efficiency mode for all memory operations (optional)
|
||||
|
||||
## Token Efficiency Integration
|
||||
|
||||
### Optional Token Efficiency Mode
|
||||
The `/sc:load` command supports optional Token Efficiency mode via the `--uc` flag:
|
||||
|
||||
- **User Choice**: `--uc` flag can be explicitly specified for compression
|
||||
- **Compression Strategy**: When enabled: 30-50% reduction with ≥95% information preservation
|
||||
- **Content Classification**:
|
||||
- **SuperClaude Framework** (0% compression): Complete exclusion
|
||||
- **User Project Content** (0% compression): Full fidelity preservation
|
||||
- **Session Data** (30-50% compression): Optimized storage when --uc used
|
||||
- **Quality Preservation**: Framework compliance with MODE_Token_Efficiency.md patterns
|
||||
|
||||
### Performance Benefits (when --uc used)
|
||||
- Token Efficiency applies to all session memory operations
|
||||
- Compression inherited by memory operations within session context
|
||||
- Performance benefits: Faster session operations and reduced context usage
|
||||
|
||||
## Session Lifecycle Integration
|
||||
|
||||
### 1. Session State Management
|
||||
- Analyze current session state and context requirements
|
||||
- Use `activate_project` tool to activate the project
|
||||
- Pass `{"project": target}` as parameters
|
||||
- Automatically handles project registration if needed
|
||||
- Validates project path and language detection
|
||||
- Identify critical information for persistence or restoration
|
||||
- Assess session integrity and continuity needs
|
||||
|
||||
### 2. Serena MCP Coordination with Token Efficiency
|
||||
- Execute appropriate Serena MCP operations for session management
|
||||
- Call `list_memories` tool to discover existing memories
|
||||
- Load relevant memories based on --type parameter:
|
||||
- **project**: Load project_purpose, tech_stack memories (framework excluded from compression)
|
||||
- **config**: Load code_style_conventions, completion_tasks (framework excluded from compression)
|
||||
- **deps**: Analyze package.json/pyproject.toml (preserve user content)
|
||||
- **env**: Load environment-specific memories (framework excluded from compression)
|
||||
- **Content Classification Strategy**:
|
||||
- **SuperClaude Framework** (Complete exclusion): All framework directories and components
|
||||
- **Session Data** (Apply compression): Session metadata, checkpoints, cache content only
|
||||
- **User Project Content** (Preserve fidelity): Project files, user documentation, configurations
|
||||
- Handle memory organization, checkpoint creation, or state restoration with selective compression
|
||||
- Manage cross-session context preservation and enhancement with optimized storage
|
||||
|
||||
### 3. Performance Validation
|
||||
- Monitor operation performance against strict session targets
|
||||
- Read memories using `read_memory` tool with `{"memory_file_name": name}`
|
||||
- Build comprehensive project context from memories
|
||||
- Supplement with file analysis if memories incomplete
|
||||
- Validate memory efficiency and response time requirements
|
||||
- Ensure session operations meet <200ms core operation targets
|
||||
|
||||
### 4. Context Continuity
|
||||
- Maintain session context across operations and interruptions
|
||||
- Call `check_onboarding_performed` tool
|
||||
- If not onboarded and --onboard flag, call `onboarding` tool
|
||||
- Create initial memories if project is new
|
||||
- Preserve decision history, task progress, and accumulated insights
|
||||
- Enable seamless continuation of complex multi-session workflows
|
||||
|
||||
### 5. Quality Assurance
|
||||
- Validate session data integrity and completeness
|
||||
- If --checkpoint flag: Load specific checkpoint via `read_memory`
|
||||
- If --resume flag: Load latest checkpoint from `checkpoints/latest`
|
||||
- If --type checkpoint: Restore session state from checkpoint metadata
|
||||
- Display resumption summary showing:
|
||||
- Work completed in previous session
|
||||
- Open tasks and questions
|
||||
- Context changes since checkpoint
|
||||
- Estimated time to full restoration
|
||||
- Verify cross-session compatibility and version consistency
|
||||
- Generate session analytics and performance reports
|
||||
|
||||
## Mandatory Serena MCP Integration
|
||||
|
||||
### Core Serena Operations
|
||||
- **Memory Management**: `read_memory`, `write_memory`, `list_memories`
|
||||
- **Project Management**: `activate_project`, `check_onboarding_performed`, `onboarding`
|
||||
- **Context Enhancement**: Build and enhance project understanding across sessions
|
||||
- **State Management**: Session state persistence and restoration capabilities
|
||||
|
||||
### Session Data Organization
|
||||
- **Memory Hierarchy**: Structured memory organization for efficient retrieval
|
||||
- **Context Accumulation**: Building understanding across session boundaries
|
||||
- **Performance Metrics**: Session operation timing and efficiency tracking
|
||||
- **Project Activation**: Seamless project initialization and context loading
|
||||
|
||||
### Advanced Session Features
|
||||
- **Checkpoint Restoration**: Resume from specific checkpoints with full context
|
||||
- **Cross-Session Learning**: Accumulating knowledge and patterns across sessions
|
||||
- **Performance Optimization**: Session-level caching and efficiency improvements
|
||||
- **Onboarding Integration**: Automatic onboarding for new projects
|
||||
|
||||
## Session Management Patterns
|
||||
|
||||
### Memory Operations
|
||||
- **Memory Categories**: Project, session, checkpoint, and insight memory organization
|
||||
- **Intelligent Retrieval**: Context-aware memory loading and optimization
|
||||
- **Memory Lifecycle**: Creation, update, archival, and cleanup operations
|
||||
- **Cross-Reference Management**: Maintaining relationships between memory entries
|
||||
|
||||
### Context Enhancement Operations with Selective Compression
|
||||
- Analyze project structure if --analyze flag
|
||||
- Create/update memories with new discoveries using selective compression
|
||||
- Save enhanced context using `write_memory` tool with compression awareness
|
||||
- Initialize session metadata with start time and optimized context loading
|
||||
- Build comprehensive project understanding from compressed and preserved memories
|
||||
- Enhance context through accumulated experience and insights with efficient storage
|
||||
- **Compression Application**:
|
||||
- SuperClaude framework components: 0% compression (complete exclusion)
|
||||
- User project files and custom configurations: 0% compression (full preservation)
|
||||
- Session operational data only: 40-70% compression for storage optimization
|
||||
|
||||
### Memory Categories Used
|
||||
- `project_purpose` - Overall project goals and architecture
|
||||
- `tech_stack` - Technologies, frameworks, dependencies
|
||||
- `code_style_conventions` - Coding standards and patterns
|
||||
- `completion_tasks` - Build/test/deploy commands
|
||||
- `suggested_commands` - Common development workflows
|
||||
- `session/*` - Session records and continuity data
|
||||
- `checkpoints/*` - Checkpoint data for restoration
|
||||
|
||||
### Context Operations
|
||||
- **Context Preservation**: Maintaining critical context across session boundaries
|
||||
- **Context Enhancement**: Building richer context through accumulated experience
|
||||
- **Context Optimization**: Efficient context management and storage
|
||||
- **Context Validation**: Ensuring context consistency and accuracy
|
||||
|
||||
## Performance Requirements
|
||||
|
||||
### Critical Performance Targets (Enhanced with Compression)
|
||||
- **Session Initialization**: <500ms for complete session setup (improved with compression: <400ms)
|
||||
- **Core Operations**: <200ms for memory reads, writes, and basic operations (improved: <150ms)
|
||||
- **Memory Operations**: <200ms per individual memory operation (optimized: <150ms)
|
||||
- **Context Loading**: <300ms for full context restoration (enhanced: <250ms)
|
||||
- **Project Activation**: <100ms for project activation (maintained: <100ms)
|
||||
- **Deep Analysis**: <3s for large projects (optimized: <2.5s)
|
||||
- **Compression Overhead**: <50ms additional processing time for selective compression
|
||||
- **Storage Efficiency**: 30-50% reduction in internal content storage requirements
|
||||
|
||||
### Performance Monitoring
|
||||
- **Real-Time Metrics**: Continuous monitoring of operation performance
|
||||
- **Performance Analytics**: Detailed analysis of session operation efficiency
|
||||
- **Optimization Recommendations**: Automated suggestions for performance improvement
|
||||
- **Resource Management**: Efficient memory and processing resource utilization
|
||||
|
||||
### Performance Validation
|
||||
- **Automated Testing**: Continuous validation of performance targets
|
||||
- **Performance Regression Detection**: Monitoring for performance degradation
|
||||
- **Benchmark Comparison**: Comparing against established performance baselines
|
||||
- **Performance Reporting**: Detailed performance analytics and recommendations
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Session-Critical Error Handling
|
||||
- **Data Integrity Errors**: Comprehensive validation and recovery procedures
|
||||
- **Memory Access Failures**: Robust fallback and retry mechanisms
|
||||
- **Context Corruption**: Recovery strategies for corrupted session context
|
||||
- **Performance Degradation**: Automatic optimization and resource management
|
||||
- **Serena Unavailable**: Use traditional file analysis with local caching
|
||||
- **Onboarding Failures**: Graceful degradation with manual onboarding options
|
||||
|
||||
### Recovery Strategies
|
||||
- **Graceful Degradation**: Maintaining core functionality under adverse conditions
|
||||
- **Automatic Recovery**: Intelligent recovery from common failure scenarios
|
||||
- **Manual Recovery**: Clear escalation paths for complex recovery situations
|
||||
- **State Reconstruction**: Rebuilding session state from available information
|
||||
- **Fallback Mechanisms**: Backward compatibility with existing workflow patterns
|
||||
|
||||
### Error Categories
|
||||
- **Serena MCP Errors**: Specific handling for Serena server communication issues
|
||||
- **Memory System Errors**: Memory corruption, access, and consistency issues
|
||||
- **Performance Errors**: Operation timeout and resource constraint handling
|
||||
- **Integration Errors**: Cross-system integration and coordination failures
|
||||
|
||||
## Session Analytics & Reporting
|
||||
|
||||
### Performance Analytics
|
||||
- **Operation Timing**: Detailed timing analysis for all session operations
|
||||
- **Resource Utilization**: Memory, processing, and network resource tracking
|
||||
- **Efficiency Metrics**: Session operation efficiency and optimization opportunities
|
||||
- **Trend Analysis**: Performance trends and improvement recommendations
|
||||
|
||||
### Session Intelligence
|
||||
- **Usage Patterns**: Analysis of session usage and optimization opportunities
|
||||
- **Context Evolution**: Tracking context development and enhancement over time
|
||||
- **Success Metrics**: Session effectiveness and user satisfaction tracking
|
||||
- **Predictive Analytics**: Intelligent prediction of session needs and optimization
|
||||
|
||||
### Quality Metrics
|
||||
- **Data Integrity**: Comprehensive validation of session data quality
|
||||
- **Context Accuracy**: Ensuring session context remains accurate and relevant
|
||||
- **Performance Compliance**: Validation against performance targets and requirements
|
||||
- **User Experience**: Session impact on overall user experience and productivity
|
||||
|
||||
## Integration Ecosystem
|
||||
|
||||
### SuperClaude Framework Integration
|
||||
- **Command Coordination**: Integration with other SuperClaude commands for session support
|
||||
- **Quality Gates**: Integration with validation cycles and quality assurance
|
||||
- **Mode Coordination**: Support for different operational modes and contexts
|
||||
- **Workflow Integration**: Seamless integration with complex workflow operations
|
||||
|
||||
### Cross-Session Coordination
|
||||
- **Multi-Session Projects**: Managing complex projects spanning multiple sessions
|
||||
- **Context Handoff**: Smooth transition of context between sessions and users
|
||||
- **Session Hierarchies**: Managing parent-child session relationships
|
||||
- **Continuous Learning**: Each session builds on previous knowledge and insights
|
||||
|
||||
### Integration with /sc:save
|
||||
- Context loaded by /sc:load is enhanced during session
|
||||
- Use /sc:save to persist session changes back to Serena
|
||||
- Maintains session lifecycle: load → work → save
|
||||
- Session continuity through checkpoint and restoration mechanisms
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Project Load
|
||||
```
|
||||
/sc:load
|
||||
# Activates current directory project and loads all memories
|
||||
```
|
||||
|
||||
### Specific Project with Analysis
|
||||
```
|
||||
/sc:load ~/projects/webapp --analyze
|
||||
# Activates webapp project and runs deep analysis
|
||||
```
|
||||
|
||||
### Refresh Configuration
|
||||
```
|
||||
/sc:load --type config --refresh
|
||||
# Reloads configuration memories and updates context
|
||||
```
|
||||
|
||||
### New Project Onboarding
|
||||
```
|
||||
/sc:load ./new-project --onboard
|
||||
# Activates and onboards new project, creating initial memories
|
||||
```
|
||||
|
||||
### Session Checkpoint
|
||||
```
|
||||
/sc:load --type checkpoint --metadata
|
||||
# Create comprehensive checkpoint with metadata
|
||||
```
|
||||
|
||||
### Session Recovery
|
||||
```
|
||||
/sc:load --resume --validate
|
||||
# Resume from previous session with validation
|
||||
```
|
||||
|
||||
### Performance Monitoring with Compression
|
||||
```
|
||||
/sc:load --performance --validate
|
||||
# Session operation with performance monitoring
|
||||
|
||||
/sc:load --optimize-internal --performance
|
||||
# Enable selective compression with performance tracking
|
||||
```
|
||||
|
||||
### Checkpoint Restoration
|
||||
```
|
||||
/sc:load --resume
|
||||
# Automatically resume from latest checkpoint
|
||||
|
||||
/sc:load --checkpoint checkpoint-2025-01-31-16:00:00
|
||||
# Restore from specific checkpoint ID
|
||||
|
||||
/sc:load --type checkpoint MyProject
|
||||
# Load project and restore from latest checkpoint
|
||||
```
|
||||
|
||||
### Session Continuity Examples
|
||||
```
|
||||
# Previous session workflow:
|
||||
/sc:load MyProject # Initialize session
|
||||
# ... work on project ...
|
||||
/sc:save --checkpoint # Create checkpoint
|
||||
|
||||
# Next session workflow:
|
||||
/sc:load MyProject --resume # Resume from checkpoint
|
||||
# ... continue work ...
|
||||
/sc:save --summarize # Save with summary
|
||||
```
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This session command will:**
|
||||
- Provide robust session lifecycle management with strict performance requirements
|
||||
- Integrate seamlessly with Serena MCP for comprehensive session capabilities
|
||||
- Maintain context continuity and cross-session persistence effectively
|
||||
- Support complex multi-session workflows with intelligent state management
|
||||
- Deliver session operations within strict performance targets consistently
|
||||
- Enable seamless project activation and context loading across sessions
|
||||
|
||||
**This session command will not:**
|
||||
- Operate without proper Serena MCP integration and connectivity
|
||||
- Compromise performance targets for additional functionality
|
||||
- Proceed without proper session state validation and integrity checks
|
||||
- Function without adequate error handling and recovery mechanisms
|
||||
- Ignore onboarding requirements for new projects
|
||||
- Skip context validation and enhancement procedures
|
||||
445
Framework/Commands/reflect.md
Normal file
445
Framework/Commands/reflect.md
Normal file
@@ -0,0 +1,445 @@
|
||||
---
|
||||
name: reflect
|
||||
description: "Session lifecycle management with Serena MCP integration and performance requirements for task reflection and validation"
|
||||
allowed-tools: [think_about_task_adherence, think_about_collected_information, think_about_whether_you_are_done, read_memory, write_memory, list_memories, TodoRead, TodoWrite]
|
||||
|
||||
# Command Classification
|
||||
category: session
|
||||
complexity: standard
|
||||
scope: cross-session
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [serena] # Mandatory Serena MCP integration
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.3
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: session-critical
|
||||
performance-targets:
|
||||
initialization: <500ms
|
||||
core-operations: <200ms
|
||||
checkpoint-creation: <1s
|
||||
memory-operations: <200ms
|
||||
---
|
||||
|
||||
# /sc:reflect - Task Reflection and Validation
|
||||
|
||||
## Purpose
|
||||
Perform comprehensive task reflection and validation using Serena MCP reflection tools, bridging traditional TodoWrite patterns with Serena's analysis capabilities for enhanced task management with session lifecycle integration and cross-session persistence capabilities.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:reflect [--type task|session|completion] [--analyze] [--update-session] [--validate] [--performance] [--metadata] [--cleanup]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `--type` - Reflection type (task, session, completion)
|
||||
- `--analyze` - Perform deep analysis of collected information
|
||||
- `--update-session` - Update session metadata with reflection results
|
||||
- `--checkpoint` - Create checkpoint after reflection if needed
|
||||
- `--validate` - Validate session integrity and data consistency
|
||||
- `--performance` - Enable performance monitoring and optimization
|
||||
- `--metadata` - Include comprehensive session metadata
|
||||
- `--cleanup` - Perform session cleanup and optimization
|
||||
|
||||
## Session Lifecycle Integration
|
||||
|
||||
### 1. Session State Management
|
||||
- Analyze current session state and context requirements
|
||||
- Call `think_about_task_adherence` to validate current approach
|
||||
- Check if current work aligns with project goals and session objectives
|
||||
- Identify any deviations from planned approach
|
||||
- Generate recommendations for course correction if needed
|
||||
- Identify critical information for persistence or restoration
|
||||
- Assess session integrity and continuity needs
|
||||
|
||||
### 2. Serena MCP Coordination with Token Efficiency
|
||||
- Execute appropriate Serena MCP operations for session management
|
||||
- Call `think_about_collected_information` to analyze session work with selective compression
|
||||
- **Content Classification for Reflection Operations**:
|
||||
- **SuperClaude Framework** (Complete exclusion): All framework directories and components
|
||||
- **Session Data** (Apply compression): Reflection metadata, analysis results, insights only
|
||||
- **User Project Content** (Preserve fidelity): Project files, user documentation, configurations
|
||||
- Evaluate completeness of information gathering with optimized memory operations
|
||||
- Identify gaps or missing context using compressed reflection data
|
||||
- Assess quality and relevance of collected data with framework exclusion awareness
|
||||
- Handle memory organization, checkpoint creation, or state restoration with selective compression
|
||||
- Manage cross-session context preservation and enhancement with optimized storage
|
||||
|
||||
### 3. Performance Validation
|
||||
- Monitor operation performance against strict session targets
|
||||
- Task reflection: <4s for comprehensive analysis (improved with Token Efficiency)
|
||||
- Session reflection: <8s for full information assessment (improved with selective compression)
|
||||
- Completion reflection: <2.5s for validation (improved with optimized operations)
|
||||
- TodoWrite integration: <800ms for status synchronization (improved with compression)
|
||||
- Token Efficiency overhead: <100ms for selective compression operations
|
||||
- Validate memory efficiency and response time requirements
|
||||
- Ensure session operations meet <200ms core operation targets
|
||||
|
||||
### 4. Context Continuity
|
||||
- Maintain session context across operations and interruptions
|
||||
- Call `think_about_whether_you_are_done` for completion validation
|
||||
- Evaluate task completion criteria against actual progress
|
||||
- Identify remaining work items or blockers
|
||||
- Determine if current task can be marked as complete
|
||||
- Preserve decision history, task progress, and accumulated insights
|
||||
- Enable seamless continuation of complex multi-session workflows
|
||||
|
||||
### 5. Quality Assurance
|
||||
- Validate session data integrity and completeness
|
||||
- Use `TodoRead` to get current task states
|
||||
- Map TodoWrite tasks to Serena reflection insights
|
||||
- Update task statuses based on reflection results
|
||||
- Maintain compatibility with existing TodoWrite patterns
|
||||
- If --update-session flag: Load current session metadata and incorporate reflection insights
|
||||
- Verify cross-session compatibility and version consistency
|
||||
- Generate session analytics and performance reports
|
||||
|
||||
## Mandatory Serena MCP Integration
|
||||
|
||||
### Core Serena Operations
|
||||
- **Memory Management**: `read_memory`, `write_memory`, `list_memories`
|
||||
- **Reflection System**: `think_about_task_adherence`, `think_about_collected_information`, `think_about_whether_you_are_done`
|
||||
- **TodoWrite Integration**: Bridge patterns for task management evolution
|
||||
- **State Management**: Session state persistence and restoration capabilities
|
||||
|
||||
### Session Data Organization
|
||||
- **Memory Hierarchy**: Structured memory organization for efficient retrieval
|
||||
- **Task Reflection Patterns**: Systematic validation and progress assessment
|
||||
- **Performance Metrics**: Session operation timing and efficiency tracking
|
||||
- **Context Accumulation**: Building understanding across session boundaries
|
||||
|
||||
### Advanced Session Features
|
||||
- **TodoWrite Evolution**: Bridge patterns for transitioning from TodoWrite to Serena reflection
|
||||
- **Cross-Session Learning**: Accumulating knowledge and patterns across sessions
|
||||
- **Performance Optimization**: Session-level caching and efficiency improvements
|
||||
- **Quality Gates Integration**: Validation checkpoints during reflection phases
|
||||
|
||||
## Session Management Patterns
|
||||
|
||||
### Memory Operations
|
||||
- **Memory Categories**: Project, session, checkpoint, and insight memory organization
|
||||
- **Intelligent Retrieval**: Context-aware memory loading and optimization
|
||||
- **Memory Lifecycle**: Creation, update, archival, and cleanup operations
|
||||
- **Cross-Reference Management**: Maintaining relationships between memory entries
|
||||
|
||||
### Reflection Operations
|
||||
- **Task Reflection**: Current task validation and progress assessment
|
||||
- **Session Reflection**: Overall session progress and information quality
|
||||
- **Completion Reflection**: Task and session completion readiness
|
||||
- **TodoWrite Bridge**: Integration patterns for traditional task management
|
||||
|
||||
### Context Operations
|
||||
- **Context Preservation**: Maintaining critical context across session boundaries
|
||||
- **Context Enhancement**: Building richer context through accumulated experience
|
||||
- **Context Optimization**: Efficient context management and storage
|
||||
- **Context Validation**: Ensuring context consistency and accuracy
|
||||
|
||||
## Reflection Types
|
||||
|
||||
### Task Reflection (--type task)
|
||||
**Focus**: Current task validation and progress assessment
|
||||
|
||||
**Tools Used**:
|
||||
- `think_about_task_adherence`
|
||||
- `TodoRead` for current state
|
||||
- `TodoWrite` for status updates
|
||||
|
||||
**Output**:
|
||||
- Task alignment assessment
|
||||
- Progress validation
|
||||
- Next steps recommendations
|
||||
- Risk assessment
|
||||
|
||||
### Session Reflection (--type session)
|
||||
**Focus**: Overall session progress and information quality
|
||||
|
||||
**Tools Used**:
|
||||
- `think_about_collected_information`
|
||||
- Session metadata analysis
|
||||
|
||||
**Output**:
|
||||
- Information completeness assessment
|
||||
- Session progress summary
|
||||
- Knowledge gaps identification
|
||||
- Learning insights extraction
|
||||
|
||||
### Completion Reflection (--type completion)
|
||||
**Focus**: Task and session completion readiness
|
||||
|
||||
**Tools Used**:
|
||||
- `think_about_whether_you_are_done`
|
||||
- Final validation checks
|
||||
|
||||
**Output**:
|
||||
- Completion readiness assessment
|
||||
- Outstanding items identification
|
||||
- Quality validation results
|
||||
- Handoff preparation status
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### With TodoWrite System
|
||||
```yaml
|
||||
# Bridge pattern for TodoWrite integration
|
||||
traditional_pattern:
|
||||
- TodoRead() → Assess tasks
|
||||
- Work on tasks
|
||||
- TodoWrite() → Update status
|
||||
|
||||
enhanced_pattern:
|
||||
- TodoRead() → Get current state
|
||||
- /sc:reflect --type task → Validate approach
|
||||
- Work on tasks with Serena guidance
|
||||
- /sc:reflect --type completion → Validate completion
|
||||
- TodoWrite() → Update with reflection insights
|
||||
```
|
||||
|
||||
### With Session Lifecycle
|
||||
```yaml
|
||||
# Integration with /sc:load and /sc:save
|
||||
session_integration:
|
||||
- /sc:load → Initialize session
|
||||
- Work with periodic /sc:reflect --type task
|
||||
- /sc:reflect --type session → Mid-session analysis
|
||||
- /sc:reflect --type completion → Pre-save validation
|
||||
- /sc:save → Persist with reflection insights
|
||||
```
|
||||
|
||||
### With Automatic Checkpoints
|
||||
```yaml
|
||||
# Checkpoint integration
|
||||
checkpoint_triggers:
|
||||
- High priority task completion → /sc:reflect --type completion
|
||||
- 30-minute intervals → /sc:reflect --type session
|
||||
- Before risk operations → /sc:reflect --type task
|
||||
- Error recovery → /sc:reflect --analyze
|
||||
```
|
||||
|
||||
## Performance Requirements
|
||||
|
||||
### Critical Performance Targets
|
||||
- **Session Initialization**: <500ms for complete session setup
|
||||
- **Core Operations**: <200ms for memory reads, writes, and basic operations
|
||||
- **Memory Operations**: <200ms per individual memory operation
|
||||
- **Task Reflection**: <5s for comprehensive analysis
|
||||
- **Session Reflection**: <10s for full information assessment
|
||||
- **Completion Reflection**: <3s for validation
|
||||
- **TodoWrite Integration**: <1s for status synchronization
|
||||
|
||||
### Performance Monitoring
|
||||
- **Real-Time Metrics**: Continuous monitoring of operation performance
|
||||
- **Performance Analytics**: Detailed analysis of session operation efficiency
|
||||
- **Optimization Recommendations**: Automated suggestions for performance improvement
|
||||
- **Resource Management**: Efficient memory and processing resource utilization
|
||||
|
||||
### Performance Validation
|
||||
- **Automated Testing**: Continuous validation of performance targets
|
||||
- **Performance Regression Detection**: Monitoring for performance degradation
|
||||
- **Benchmark Comparison**: Comparing against established performance baselines
|
||||
- **Performance Reporting**: Detailed performance analytics and recommendations
|
||||
|
||||
### Quality Metrics
|
||||
- Task adherence accuracy: >90%
|
||||
- Information completeness: >85%
|
||||
- Completion readiness: >95%
|
||||
- Session continuity: >90%
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Session-Critical Error Handling
|
||||
- **Data Integrity Errors**: Comprehensive validation and recovery procedures
|
||||
- **Memory Access Failures**: Robust fallback and retry mechanisms
|
||||
- **Context Corruption**: Recovery strategies for corrupted session context
|
||||
- **Performance Degradation**: Automatic optimization and resource management
|
||||
- **Serena MCP Unavailable**: Fall back to TodoRead/TodoWrite patterns
|
||||
- **Reflection Inconsistencies**: Cross-validate reflection results
|
||||
|
||||
### Recovery Strategies
|
||||
- **Graceful Degradation**: Maintaining core functionality under adverse conditions
|
||||
- **Automatic Recovery**: Intelligent recovery from common failure scenarios
|
||||
- **Manual Recovery**: Clear escalation paths for complex recovery situations
|
||||
- **State Reconstruction**: Rebuilding session state from available information
|
||||
- **Cache Reflection**: Cache reflection insights locally
|
||||
- **Retry Integration**: Retry Serena integration when available
|
||||
|
||||
### Error Categories
|
||||
- **Serena MCP Errors**: Specific handling for Serena server communication issues
|
||||
- **Memory System Errors**: Memory corruption, access, and consistency issues
|
||||
- **Performance Errors**: Operation timeout and resource constraint handling
|
||||
- **Integration Errors**: Cross-system integration and coordination failures
|
||||
|
||||
## Session Analytics & Reporting
|
||||
|
||||
### Performance Analytics
|
||||
- **Operation Timing**: Detailed timing analysis for all session operations
|
||||
- **Resource Utilization**: Memory, processing, and network resource tracking
|
||||
- **Efficiency Metrics**: Session operation efficiency and optimization opportunities
|
||||
- **Trend Analysis**: Performance trends and improvement recommendations
|
||||
|
||||
### Session Intelligence
|
||||
- **Usage Patterns**: Analysis of session usage and optimization opportunities
|
||||
- **Context Evolution**: Tracking context development and enhancement over time
|
||||
- **Success Metrics**: Session effectiveness and user satisfaction tracking
|
||||
- **Predictive Analytics**: Intelligent prediction of session needs and optimization
|
||||
|
||||
### Quality Metrics
|
||||
- **Data Integrity**: Comprehensive validation of session data quality
|
||||
- **Context Accuracy**: Ensuring session context remains accurate and relevant
|
||||
- **Performance Compliance**: Validation against performance targets and requirements
|
||||
- **User Experience**: Session impact on overall user experience and productivity
|
||||
|
||||
## Integration Ecosystem
|
||||
|
||||
### SuperClaude Framework Integration
|
||||
- **Command Coordination**: Integration with other SuperClaude commands for session support
|
||||
- **Quality Gates**: Integration with validation cycles and quality assurance
|
||||
- **Mode Coordination**: Support for different operational modes and contexts
|
||||
- **Workflow Integration**: Seamless integration with complex workflow operations
|
||||
|
||||
### Cross-Session Coordination
|
||||
- **Multi-Session Projects**: Managing complex projects spanning multiple sessions
|
||||
- **Context Handoff**: Smooth transition of context between sessions and users
|
||||
- **Session Hierarchies**: Managing parent-child session relationships
|
||||
- **Continuous Learning**: Each session builds on previous knowledge and insights
|
||||
|
||||
### Integration with Hooks
|
||||
|
||||
#### Hook Integration Points
|
||||
- `task_validator` hook: Enhanced with reflection insights
|
||||
- `state_synchronizer` hook: Uses reflection for state management
|
||||
- `quality_gate_trigger` hook: Incorporates reflection validation
|
||||
- `evidence_collector` hook: Captures reflection outcomes
|
||||
|
||||
#### Performance Monitoring
|
||||
- Track reflection timing in session metadata
|
||||
- Monitor reflection accuracy and effectiveness
|
||||
- Alert if reflection processes exceed performance targets
|
||||
- Integrate with overall session performance metrics
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Task Reflection
|
||||
```
|
||||
/sc:reflect --type task
|
||||
# Validates current task approach and progress
|
||||
```
|
||||
|
||||
### Session Checkpoint
|
||||
```
|
||||
/sc:reflect --type session --metadata
|
||||
# Create comprehensive session analysis with metadata
|
||||
```
|
||||
|
||||
### Session Recovery
|
||||
```
|
||||
/sc:reflect --type completion --validate
|
||||
# Completion validation with integrity checks
|
||||
```
|
||||
|
||||
### Performance Monitoring
|
||||
```
|
||||
/sc:reflect --performance --validate
|
||||
# Session operation with performance monitoring
|
||||
```
|
||||
|
||||
### Comprehensive Session Analysis
|
||||
```
|
||||
/sc:reflect --type session --analyze --update-session
|
||||
# Deep session analysis with metadata update
|
||||
```
|
||||
|
||||
### Pre-Completion Validation
|
||||
```
|
||||
/sc:reflect --type completion
|
||||
# Validates readiness to mark tasks complete
|
||||
```
|
||||
|
||||
### Checkpoint-Triggered Reflection
|
||||
```
|
||||
/sc:reflect --type session --checkpoint
|
||||
# Session reflection with automatic checkpoint creation
|
||||
```
|
||||
|
||||
## Output Format
|
||||
|
||||
### Task Reflection Output
|
||||
```yaml
|
||||
task_reflection:
|
||||
adherence_score: 0.92
|
||||
alignment_status: "on_track"
|
||||
deviations_identified: []
|
||||
recommendations:
|
||||
- "Continue current approach"
|
||||
- "Consider performance optimization"
|
||||
risk_level: "low"
|
||||
next_steps:
|
||||
- "Complete implementation"
|
||||
- "Run validation tests"
|
||||
```
|
||||
|
||||
### Session Reflection Output
|
||||
```yaml
|
||||
session_reflection:
|
||||
information_completeness: 0.87
|
||||
gaps_identified:
|
||||
- "Missing error handling patterns"
|
||||
- "Performance benchmarks needed"
|
||||
insights_gained:
|
||||
- "Framework integration successful"
|
||||
- "Session lifecycle pattern validated"
|
||||
learning_opportunities:
|
||||
- "Advanced Serena patterns"
|
||||
- "Performance optimization techniques"
|
||||
```
|
||||
|
||||
### Completion Reflection Output
|
||||
```yaml
|
||||
completion_reflection:
|
||||
readiness_score: 0.95
|
||||
outstanding_items: []
|
||||
quality_validation: "pass"
|
||||
completion_criteria:
|
||||
- criterion: "functionality_complete"
|
||||
status: "met"
|
||||
- criterion: "tests_passing"
|
||||
status: "met"
|
||||
- criterion: "documentation_updated"
|
||||
status: "met"
|
||||
handoff_ready: true
|
||||
```
|
||||
|
||||
## Future Evolution
|
||||
|
||||
### Python Hooks Integration
|
||||
When Python hooks system is implemented:
|
||||
- Automatic reflection triggers based on task state changes
|
||||
- Real-time reflection insights during work sessions
|
||||
- Intelligent checkpoint decisions based on reflection analysis
|
||||
- Enhanced TodoWrite replacement with full Serena integration
|
||||
|
||||
### Advanced Reflection Patterns
|
||||
- Cross-session reflection for project-wide insights
|
||||
- Collaborative reflection for team workflows
|
||||
- Predictive reflection for proactive issue identification
|
||||
- Automated reflection scheduling based on work patterns
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This session command will:**
|
||||
- Provide robust session lifecycle management with strict performance requirements
|
||||
- Integrate seamlessly with Serena MCP for comprehensive session capabilities
|
||||
- Maintain context continuity and cross-session persistence effectively
|
||||
- Support complex multi-session workflows with intelligent state management
|
||||
- Deliver session operations within strict performance targets consistently
|
||||
- Bridge TodoWrite patterns with advanced Serena reflection capabilities
|
||||
|
||||
**This session command will not:**
|
||||
- Operate without proper Serena MCP integration and connectivity
|
||||
- Compromise performance targets for additional functionality
|
||||
- Proceed without proper session state validation and integrity checks
|
||||
- Function without adequate error handling and recovery mechanisms
|
||||
- Skip TodoWrite integration and compatibility maintenance
|
||||
- Ignore reflection quality metrics and validation requirements
|
||||
450
Framework/Commands/save.md
Normal file
450
Framework/Commands/save.md
Normal file
@@ -0,0 +1,450 @@
|
||||
---
|
||||
name: save
|
||||
description: "Session lifecycle management with Serena MCP integration and performance requirements for session context persistence"
|
||||
allowed-tools: [Read, Grep, Glob, Write, write_memory, list_memories, read_memory, summarize_changes, think_about_collected_information]
|
||||
|
||||
# Command Classification
|
||||
category: session
|
||||
complexity: standard
|
||||
scope: cross-session
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [serena] # Mandatory Serena MCP integration
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.3
|
||||
auto-flags: [] # No automatic flags
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: session-critical
|
||||
performance-targets:
|
||||
initialization: <500ms
|
||||
core-operations: <200ms
|
||||
checkpoint-creation: <1s
|
||||
memory-operations: <200ms
|
||||
---
|
||||
|
||||
# /sc:save - Session Context Persistence
|
||||
|
||||
## Purpose
|
||||
Save session context, progress, and discoveries to Serena MCP memories, complementing the /sc:load workflow for continuous project understanding with comprehensive session lifecycle management and cross-session persistence capabilities.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:save [--type session|learnings|context|all] [--summarize] [--checkpoint] [--validate] [--performance] [--metadata] [--cleanup] [--uc]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `--type` - What to save (session, learnings, context, all)
|
||||
- `--summarize` - Generate session summary using Serena's summarize_changes
|
||||
- `--checkpoint` - Create a session checkpoint for recovery
|
||||
- `--prune` - Remove outdated or redundant memories
|
||||
- `--validate` - Validate session integrity and data consistency
|
||||
- `--performance` - Enable performance monitoring and optimization
|
||||
- `--metadata` - Include comprehensive session metadata
|
||||
- `--cleanup` - Perform session cleanup and optimization
|
||||
- `--uc` - Enable Token Efficiency mode for all memory operations (optional)
|
||||
|
||||
## Token Efficiency Integration
|
||||
|
||||
### Optional Token Efficiency Mode
|
||||
The `/sc:save` command supports optional Token Efficiency mode via the `--uc` flag:
|
||||
|
||||
- **User Choice**: `--uc` flag can be explicitly specified for compression
|
||||
- **Compression Strategy**: When enabled: 30-50% reduction with ≥95% information preservation
|
||||
- **Content Classification**:
|
||||
- **SuperClaude Framework** (0% compression): Complete exclusion
|
||||
- **User Project Content** (0% compression): Full fidelity preservation
|
||||
- **Session Data** (30-50% compression): Optimized storage when --uc used
|
||||
- **Quality Preservation**: Framework compliance with MODE_Token_Efficiency.md patterns
|
||||
|
||||
### Session Persistence Benefits (when --uc used)
|
||||
- **Optimized Storage**: Session data compressed for efficient persistence
|
||||
- **Faster Restoration**: Reduced memory footprint enables faster session loading
|
||||
- **Context Preservation**: ≥95% information fidelity maintained across sessions
|
||||
- **Performance Improvement**: 30-50% reduction in session data storage requirements
|
||||
|
||||
## Session Lifecycle Integration
|
||||
|
||||
### 1. Session State Management
|
||||
- Analyze current session state and context requirements
|
||||
- Call `think_about_collected_information` to analyze session work
|
||||
- Identify new discoveries, patterns, and insights
|
||||
- Determine what should be persisted
|
||||
- Identify critical information for persistence or restoration
|
||||
- Assess session integrity and continuity needs
|
||||
|
||||
### 2. Serena MCP Coordination with Token Efficiency
|
||||
- Execute appropriate Serena MCP operations for session management
|
||||
- Call `list_memories` to check existing memories
|
||||
- Identify which memories need updates with selective compression
|
||||
- **Content Classification Strategy**:
|
||||
- **SuperClaude Framework** (Complete exclusion): All framework directories and components
|
||||
- **Session Data** (Apply compression): Session metadata, checkpoints, cache content only
|
||||
- **User Project Content** (Preserve fidelity): Project files, user documentation, configurations
|
||||
- Organize new information by category:
|
||||
- **session_context**: Current work and progress (compressed)
|
||||
- **code_patterns**: Discovered patterns and conventions (compressed)
|
||||
- **project_insights**: New understanding about the project (compressed)
|
||||
- **technical_decisions**: Architecture and design choices (compressed)
|
||||
- Handle memory organization, checkpoint creation, or state restoration with selective compression
|
||||
- Manage cross-session context preservation and enhancement with optimized storage
|
||||
|
||||
### 3. Performance Validation
|
||||
- Monitor operation performance against strict session targets
|
||||
- Record operation timings in session metadata
|
||||
- Compare against PRD performance targets (Enhanced with Token Efficiency):
|
||||
- Memory operations: <150ms (improved from <200ms with compression)
|
||||
- Session save: <1.5s total (improved from <2s with selective compression)
|
||||
- Tool selection: <100ms
|
||||
- Compression overhead: <50ms additional processing time
|
||||
- Generate performance alerts if thresholds exceeded
|
||||
- Update performance_metrics memory with trending data
|
||||
- Validate memory efficiency and response time requirements
|
||||
- Ensure session operations meet <200ms core operation targets
|
||||
|
||||
### 4. Context Continuity
|
||||
- Maintain session context across operations and interruptions
|
||||
- Based on --type parameter:
|
||||
- **session**: Save current session work and progress using `write_memory` with key "session/{timestamp}"
|
||||
- **learnings**: Save new discoveries and insights, update existing knowledge memories
|
||||
- **context**: Save enhanced project understanding, update project_purpose, tech_stack, etc.
|
||||
- **all**: Comprehensive save of all categories
|
||||
- Preserve decision history, task progress, and accumulated insights
|
||||
- Enable seamless continuation of complex multi-session workflows
|
||||
|
||||
### 5. Quality Assurance
|
||||
- Validate session data integrity and completeness
|
||||
- Check if any automatic triggers are met:
|
||||
- Time elapsed ≥30 minutes since last checkpoint
|
||||
- High priority task completed (via TodoRead check)
|
||||
- High risk operation pending or completed
|
||||
- Error recovery performed
|
||||
- Create checkpoint if triggered or --checkpoint flag provided
|
||||
- Include comprehensive restoration data with current task states, open questions, context needed for resumption, and performance metrics snapshot
|
||||
- Verify cross-session compatibility and version consistency
|
||||
- Generate session analytics and performance reports
|
||||
|
||||
## Mandatory Serena MCP Integration
|
||||
|
||||
### Core Serena Operations
|
||||
- **Memory Management**: `read_memory`, `write_memory`, `list_memories`
|
||||
- **Analysis System**: `think_about_collected_information`, `summarize_changes`
|
||||
- **Session Persistence**: Comprehensive session state and context preservation
|
||||
- **State Management**: Session state persistence and restoration capabilities
|
||||
|
||||
### Session Data Organization
|
||||
- **Memory Hierarchy**: Structured memory organization for efficient retrieval
|
||||
- **Progressive Checkpoints**: Building understanding and state across checkpoints
|
||||
- **Performance Metrics**: Session operation timing and efficiency tracking
|
||||
- **Context Accumulation**: Building understanding across session boundaries
|
||||
|
||||
### Advanced Session Features
|
||||
- **Automatic Triggers**: Time-based, task-based, and risk-based session operations
|
||||
- **Error Recovery**: Robust session recovery and state restoration mechanisms
|
||||
- **Cross-Session Learning**: Accumulating knowledge and patterns across sessions
|
||||
- **Performance Optimization**: Session-level caching and efficiency improvements
|
||||
|
||||
## Session Management Patterns
|
||||
|
||||
### Memory Operations
|
||||
- **Memory Categories**: Project, session, checkpoint, and insight memory organization
|
||||
- **Intelligent Retrieval**: Context-aware memory loading and optimization
|
||||
- **Memory Lifecycle**: Creation, update, archival, and cleanup operations
|
||||
- **Cross-Reference Management**: Maintaining relationships between memory entries
|
||||
|
||||
### Checkpoint Operations
|
||||
- **Progressive Checkpoints**: Building understanding and state across checkpoints
|
||||
- **Metadata Enrichment**: Comprehensive checkpoint metadata with recovery information
|
||||
- **State Validation**: Ensuring checkpoint integrity and completeness
|
||||
- **Recovery Mechanisms**: Robust restoration from checkpoint failures
|
||||
|
||||
### Context Operations
|
||||
- **Context Preservation**: Maintaining critical context across session boundaries
|
||||
- **Context Enhancement**: Building richer context through accumulated experience
|
||||
- **Context Optimization**: Efficient context management and storage
|
||||
- **Context Validation**: Ensuring context consistency and accuracy
|
||||
|
||||
## Memory Keys Used
|
||||
|
||||
### Session Memories
|
||||
- `session/{timestamp}` - Individual session records with comprehensive metadata
|
||||
- `session/current` - Latest session state pointer
|
||||
- `session_metadata/{date}` - Daily session aggregations
|
||||
|
||||
### Knowledge Memories
|
||||
- `code_patterns` - Coding patterns and conventions discovered
|
||||
- `project_insights` - Accumulated project understanding
|
||||
- `technical_decisions` - Architecture and design decisions
|
||||
- `performance_metrics` - Operation timing and efficiency data
|
||||
|
||||
### Checkpoint Memories
|
||||
- `checkpoints/{timestamp}` - Full session checkpoints with restoration data
|
||||
- `checkpoints/latest` - Most recent checkpoint pointer
|
||||
- `checkpoints/task-{task-id}-{timestamp}` - Task-specific checkpoints
|
||||
- `checkpoints/risk-{operation}-{timestamp}` - Risk-based checkpoints
|
||||
|
||||
### Summary Memories
|
||||
- `summaries/{date}` - Daily work summaries with session links
|
||||
- `summaries/weekly/{week}` - Weekly aggregations with insights
|
||||
- `summaries/insights/{topic}` - Topical learning summaries
|
||||
|
||||
## Session Metadata Structure
|
||||
|
||||
### Core Session Metadata
|
||||
```yaml
|
||||
# Memory key: session_metadata_{YYYY_MM_DD}
|
||||
session:
|
||||
id: "session-{YYYY-MM-DD-HHMMSS}"
|
||||
project: "{project_name}"
|
||||
start_time: "{ISO8601_timestamp}"
|
||||
end_time: "{ISO8601_timestamp}"
|
||||
duration_minutes: {number}
|
||||
state: "initializing|active|checkpointed|completed"
|
||||
|
||||
context:
|
||||
memories_loaded: [list_of_memory_keys]
|
||||
initial_context_size: {tokens}
|
||||
final_context_size: {tokens}
|
||||
|
||||
work:
|
||||
tasks_completed:
|
||||
- id: "{task_id}"
|
||||
description: "{task_description}"
|
||||
duration_minutes: {number}
|
||||
priority: "high|medium|low"
|
||||
|
||||
files_modified:
|
||||
- path: "{absolute_path}"
|
||||
operations: [edit|create|delete]
|
||||
changes: {number}
|
||||
|
||||
decisions_made:
|
||||
- timestamp: "{ISO8601_timestamp}"
|
||||
decision: "{decision_description}"
|
||||
rationale: "{reasoning}"
|
||||
impact: "architectural|functional|performance|security"
|
||||
|
||||
discoveries:
|
||||
patterns_found: [list_of_patterns]
|
||||
insights_gained: [list_of_insights]
|
||||
performance_improvements: [list_of_optimizations]
|
||||
|
||||
checkpoints:
|
||||
automatic:
|
||||
- timestamp: "{ISO8601_timestamp}"
|
||||
type: "task_complete|time_based|risk_based|error_recovery"
|
||||
trigger: "{trigger_description}"
|
||||
|
||||
performance:
|
||||
operations:
|
||||
- name: "{operation_name}"
|
||||
duration_ms: {number}
|
||||
target_ms: {number}
|
||||
status: "pass|warning|fail"
|
||||
```
|
||||
|
||||
### Checkpoint Metadata Structure
|
||||
```yaml
|
||||
# Memory key: checkpoints/{timestamp}
|
||||
checkpoint:
|
||||
id: "checkpoint-{YYYY-MM-DD-HHMMSS}"
|
||||
session_id: "{session_id}"
|
||||
type: "manual|automatic|risk|recovery"
|
||||
trigger: "{trigger_description}"
|
||||
|
||||
state:
|
||||
active_tasks:
|
||||
- id: "{task_id}"
|
||||
status: "pending|in_progress|blocked"
|
||||
progress: "{percentage}"
|
||||
open_questions: [list_of_questions]
|
||||
blockers: [list_of_blockers]
|
||||
|
||||
context_snapshot:
|
||||
size_bytes: {number}
|
||||
key_memories: [list_of_memory_keys]
|
||||
recent_changes: [list_of_changes]
|
||||
|
||||
recovery_info:
|
||||
restore_command: "/sc:load --checkpoint {checkpoint_id}"
|
||||
dependencies_check: "all_clear|issues_found"
|
||||
estimated_restore_time_ms: {number}
|
||||
```
|
||||
|
||||
## Automatic Checkpoint Triggers
|
||||
|
||||
### 1. Task-Based Triggers
|
||||
- **Condition**: Major task marked complete via TodoWrite
|
||||
- **Implementation**: Monitor TodoWrite status changes for priority="high"
|
||||
- **Memory Key**: `checkpoints/task-{task-id}-{timestamp}`
|
||||
|
||||
### 2. Time-Based Triggers
|
||||
- **Condition**: Every 30 minutes of active work
|
||||
- **Implementation**: Check elapsed time since last checkpoint
|
||||
- **Memory Key**: `checkpoints/auto-{timestamp}`
|
||||
|
||||
### 3. Risk-Based Triggers
|
||||
- **Condition**: Before high-risk operations
|
||||
- **Examples**: Major refactoring (>50 files), deletion operations, architecture changes
|
||||
- **Memory Key**: `checkpoints/risk-{operation}-{timestamp}`
|
||||
|
||||
### 4. Error Recovery Triggers
|
||||
- **Condition**: After recovering from errors or failures
|
||||
- **Purpose**: Preserve error context and recovery steps
|
||||
- **Memory Key**: `checkpoints/recovery-{timestamp}`
|
||||
|
||||
## Performance Requirements
|
||||
|
||||
### Critical Performance Targets
|
||||
- **Session Initialization**: <500ms for complete session setup
|
||||
- **Core Operations**: <200ms for memory reads, writes, and basic operations
|
||||
- **Checkpoint Creation**: <1s for comprehensive checkpoint with metadata
|
||||
- **Memory Operations**: <200ms per individual memory operation
|
||||
- **Session Save**: <2s for typical session
|
||||
- **Summary Generation**: <500ms
|
||||
|
||||
### Performance Monitoring
|
||||
- **Real-Time Metrics**: Continuous monitoring of operation performance
|
||||
- **Performance Analytics**: Detailed analysis of session operation efficiency
|
||||
- **Optimization Recommendations**: Automated suggestions for performance improvement
|
||||
- **Resource Management**: Efficient memory and processing resource utilization
|
||||
|
||||
### Performance Validation
|
||||
- **Automated Testing**: Continuous validation of performance targets
|
||||
- **Performance Regression Detection**: Monitoring for performance degradation
|
||||
- **Benchmark Comparison**: Comparing against established performance baselines
|
||||
- **Performance Reporting**: Detailed performance analytics and recommendations
|
||||
|
||||
## Error Handling & Recovery
|
||||
|
||||
### Session-Critical Error Handling
|
||||
- **Data Integrity Errors**: Comprehensive validation and recovery procedures
|
||||
- **Memory Access Failures**: Robust fallback and retry mechanisms
|
||||
- **Context Corruption**: Recovery strategies for corrupted session context
|
||||
- **Performance Degradation**: Automatic optimization and resource management
|
||||
- **Serena Unavailable**: Queue saves locally for later sync
|
||||
- **Memory Conflicts**: Merge intelligently or prompt user
|
||||
|
||||
### Recovery Strategies
|
||||
- **Graceful Degradation**: Maintaining core functionality under adverse conditions
|
||||
- **Automatic Recovery**: Intelligent recovery from common failure scenarios
|
||||
- **Manual Recovery**: Clear escalation paths for complex recovery situations
|
||||
- **State Reconstruction**: Rebuilding session state from available information
|
||||
- **Local Queueing**: Local save queueing when Serena unavailable
|
||||
|
||||
### Error Categories
|
||||
- **Serena MCP Errors**: Specific handling for Serena server communication issues
|
||||
- **Memory System Errors**: Memory corruption, access, and consistency issues
|
||||
- **Performance Errors**: Operation timeout and resource constraint handling
|
||||
- **Integration Errors**: Cross-system integration and coordination failures
|
||||
|
||||
## Session Analytics & Reporting
|
||||
|
||||
### Performance Analytics
|
||||
- **Operation Timing**: Detailed timing analysis for all session operations
|
||||
- **Resource Utilization**: Memory, processing, and network resource tracking
|
||||
- **Efficiency Metrics**: Session operation efficiency and optimization opportunities
|
||||
- **Trend Analysis**: Performance trends and improvement recommendations
|
||||
|
||||
### Session Intelligence
|
||||
- **Usage Patterns**: Analysis of session usage and optimization opportunities
|
||||
- **Context Evolution**: Tracking context development and enhancement over time
|
||||
- **Success Metrics**: Session effectiveness and user satisfaction tracking
|
||||
- **Predictive Analytics**: Intelligent prediction of session needs and optimization
|
||||
|
||||
### Quality Metrics
|
||||
- **Data Integrity**: Comprehensive validation of session data quality
|
||||
- **Context Accuracy**: Ensuring session context remains accurate and relevant
|
||||
- **Performance Compliance**: Validation against performance targets and requirements
|
||||
- **User Experience**: Session impact on overall user experience and productivity
|
||||
|
||||
## Integration Ecosystem
|
||||
|
||||
### SuperClaude Framework Integration
|
||||
- **Command Coordination**: Integration with other SuperClaude commands for session support
|
||||
- **Quality Gates**: Integration with validation cycles and quality assurance
|
||||
- **Mode Coordination**: Support for different operational modes and contexts
|
||||
- **Workflow Integration**: Seamless integration with complex workflow operations
|
||||
|
||||
### Cross-Session Coordination
|
||||
- **Multi-Session Projects**: Managing complex projects spanning multiple sessions
|
||||
- **Context Handoff**: Smooth transition of context between sessions and users
|
||||
- **Session Hierarchies**: Managing parent-child session relationships
|
||||
- **Continuous Learning**: Each session builds on previous knowledge and insights
|
||||
|
||||
### Integration with /sc:load
|
||||
|
||||
#### Session Lifecycle
|
||||
1. `/sc:load` - Activate project and load context
|
||||
2. Work on project (make changes, discover patterns)
|
||||
3. `/sc:save` - Persist discoveries and progress
|
||||
4. Next session: `/sc:load` retrieves enhanced context
|
||||
|
||||
#### Continuous Learning
|
||||
- Each session builds on previous knowledge
|
||||
- Patterns and insights accumulate over time
|
||||
- Project understanding deepens with each cycle
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Session Save
|
||||
```
|
||||
/sc:save
|
||||
# Saves current session context and discoveries
|
||||
```
|
||||
|
||||
### Session Checkpoint
|
||||
```
|
||||
/sc:save --type checkpoint --metadata
|
||||
# Create comprehensive checkpoint with metadata
|
||||
```
|
||||
|
||||
### Session Recovery
|
||||
```
|
||||
/sc:save --checkpoint --validate
|
||||
# Create checkpoint with validation
|
||||
```
|
||||
|
||||
### Performance Monitoring
|
||||
```
|
||||
/sc:save --performance --validate
|
||||
# Session operation with performance monitoring
|
||||
```
|
||||
|
||||
### Save with Summary
|
||||
```
|
||||
/sc:save --summarize
|
||||
# Saves session and generates summary
|
||||
```
|
||||
|
||||
### Create Checkpoint
|
||||
```
|
||||
/sc:save --checkpoint --type all
|
||||
# Creates comprehensive checkpoint for session recovery
|
||||
```
|
||||
|
||||
### Save Only Learnings
|
||||
```
|
||||
/sc:save --type learnings
|
||||
# Updates only discovered patterns and insights
|
||||
```
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This session command will:**
|
||||
- Provide robust session lifecycle management with strict performance requirements
|
||||
- Integrate seamlessly with Serena MCP for comprehensive session capabilities
|
||||
- Maintain context continuity and cross-session persistence effectively
|
||||
- Support complex multi-session workflows with intelligent state management
|
||||
- Deliver session operations within strict performance targets consistently
|
||||
- Enable comprehensive session context persistence and checkpoint creation
|
||||
|
||||
**This session command will not:**
|
||||
- Operate without proper Serena MCP integration and connectivity
|
||||
- Compromise performance targets for additional functionality
|
||||
- Proceed without proper session state validation and integrity checks
|
||||
- Function without adequate error handling and recovery mechanisms
|
||||
- Skip automatic checkpoint evaluation and creation when triggered
|
||||
- Ignore session metadata structure and performance monitoring requirements
|
||||
225
Framework/Commands/select-tool.md
Normal file
225
Framework/Commands/select-tool.md
Normal file
@@ -0,0 +1,225 @@
|
||||
---
|
||||
name: select-tool
|
||||
description: "Intelligent MCP tool selection based on complexity scoring and operation analysis"
|
||||
allowed-tools: [get_current_config, execute_sketched_edit, Read, Grep]
|
||||
|
||||
# Command Classification
|
||||
category: special
|
||||
complexity: high
|
||||
scope: meta
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [serena, morphllm]
|
||||
personas: []
|
||||
wave-enabled: false
|
||||
complexity-threshold: 0.6
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: specialized
|
||||
---
|
||||
|
||||
# /sc:select-tool - Intelligent MCP Tool Selection
|
||||
|
||||
## Purpose
|
||||
Analyze requested operations and determine the optimal MCP tool (Serena or Morphllm) based on sophisticated complexity scoring, operation type classification, and performance requirements. This meta-system command provides intelligent routing to ensure optimal tool selection with <100ms decision time and >95% accuracy.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:select-tool [operation] [--analyze] [--explain] [--force serena|morphllm]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `operation` - Description of the operation to perform and analyze
|
||||
- `--analyze` - Show detailed complexity analysis and scoring breakdown
|
||||
- `--explain` - Explain the selection decision with confidence metrics
|
||||
- `--force serena|morphllm` - Override automatic selection for testing
|
||||
- `--validate` - Validate selection against actual operation requirements
|
||||
- `--dry-run` - Preview selection decision without tool activation
|
||||
|
||||
## Specialized Execution Flow
|
||||
|
||||
### 1. Unique Analysis Phase
|
||||
- **Operation Parsing**: Extract operation type, scope, language, and complexity indicators
|
||||
- **Context Evaluation**: Analyze file count, dependencies, and framework requirements
|
||||
- **Performance Assessment**: Evaluate speed vs accuracy trade-offs for operation
|
||||
|
||||
### 2. Specialized Processing
|
||||
- **Complexity Scoring Algorithm**: Apply multi-dimensional scoring based on file count, operation type, dependencies, and language complexity
|
||||
- **Decision Logic Matrix**: Use sophisticated routing rules combining direct mappings and threshold-based selection
|
||||
- **Tool Capability Matching**: Match operation requirements to specific tool capabilities
|
||||
|
||||
### 3. Custom Integration
|
||||
- **MCP Server Coordination**: Seamless integration with Serena and Morphllm servers
|
||||
- **Framework Routing**: Automatic integration with other SuperClaude commands
|
||||
- **Performance Optimization**: Sub-100ms decision time with confidence scoring
|
||||
|
||||
### 4. Specialized Validation
|
||||
- **Accuracy Verification**: >95% correct tool selection rate validation
|
||||
- **Performance Monitoring**: Track decision time and execution success rates
|
||||
- **Fallback Testing**: Verify fallback paths and error recovery
|
||||
|
||||
### 5. Custom Output Generation
|
||||
- **Decision Explanation**: Detailed analysis output with confidence metrics
|
||||
- **Performance Metrics**: Tool selection effectiveness and timing data
|
||||
- **Integration Guidance**: Recommendations for command workflow optimization
|
||||
|
||||
## Custom Architecture Features
|
||||
|
||||
### Specialized System Integration
|
||||
- **Multi-Tool Coordination**: Intelligent routing between Serena (LSP, symbols) and Morphllm (patterns, speed)
|
||||
- **Command Integration**: Automatic selection logic used by refactor, edit, implement, and improve commands
|
||||
- **Performance Monitoring**: Real-time tracking of selection accuracy and execution success
|
||||
|
||||
### Unique Processing Capabilities
|
||||
- **Complexity Scoring**: Multi-dimensional algorithm considering file count, operation type, dependencies, and language
|
||||
- **Decision Matrix**: Sophisticated routing logic with direct mappings and threshold-based selection
|
||||
- **Capability Matching**: Operation requirements matched to specific tool strengths
|
||||
|
||||
### Custom Performance Characteristics
|
||||
- **Sub-100ms Decisions**: Ultra-fast tool selection with performance guarantees
|
||||
- **95%+ Accuracy**: High-precision tool selection validated through execution tracking
|
||||
- **Optimal Performance**: Best tool selection for operation characteristics
|
||||
|
||||
## Advanced Specialized Features
|
||||
|
||||
### Intelligent Routing Algorithm
|
||||
- **Direct Operation Mapping**: symbol_operations → Serena, pattern_edits → Morphllm, memory_operations → Serena
|
||||
- **Complexity-Based Selection**: score > 0.6 → Serena, score < 0.4 → Morphllm, 0.4-0.6 → feature-based
|
||||
- **Feature Requirement Analysis**: needs_lsp → Serena, needs_patterns → Morphllm, needs_semantic → Serena, needs_speed → Morphllm
|
||||
|
||||
### Multi-Dimensional Complexity Analysis
|
||||
- **File Count Scoring**: Logarithmic scaling for multi-file operations
|
||||
- **Operation Type Weighting**: Refactoring > renaming > editing complexity hierarchy
|
||||
- **Dependency Analysis**: Cross-file dependencies increase complexity scores
|
||||
- **Language Complexity**: Framework and language-specific complexity factors
|
||||
|
||||
### Performance Optimization Patterns
|
||||
- **Decision Caching**: Cache frequent operation patterns for instant selection
|
||||
- **Fallback Strategies**: Serena → Morphllm → Native tools fallback chain
|
||||
- **Availability Checking**: Real-time tool availability with graceful degradation
|
||||
|
||||
## Specialized Tool Coordination
|
||||
|
||||
### Custom Tool Integration
|
||||
- **Serena MCP**: Symbol operations, multi-file refactoring, LSP integration, semantic analysis
|
||||
- **Morphllm MCP**: Pattern-based edits, token optimization, fast apply capabilities, simple modifications
|
||||
- **Native Tools**: Fallback coordination when MCP servers unavailable
|
||||
|
||||
### Unique Tool Patterns
|
||||
- **Hybrid Intelligence**: Serena for complex analysis, Morphllm for efficient execution
|
||||
- **Progressive Fallback**: Intelligent degradation from advanced to basic tools
|
||||
- **Performance-Aware Selection**: Speed vs capability trade-offs based on operation urgency
|
||||
|
||||
### Tool Performance Optimization
|
||||
- **Sub-100ms Selection**: Lightning-fast decision making with complexity scoring
|
||||
- **Accuracy Tracking**: >95% correct selection rate with continuous validation
|
||||
- **Resource Awareness**: Tool availability and performance characteristic consideration
|
||||
|
||||
## Custom Error Handling
|
||||
|
||||
### Specialized Error Categories
|
||||
- **Tool Unavailability**: Graceful fallback when selected MCP server unavailable
|
||||
- **Selection Ambiguity**: Handling edge cases where multiple tools could work
|
||||
- **Performance Degradation**: Recovery when tool selection doesn't meet performance targets
|
||||
|
||||
### Custom Recovery Strategies
|
||||
- **Progressive Fallback**: Serena → Morphllm → Native tools with capability preservation
|
||||
- **Alternative Selection**: Re-analyze with different parameters when initial selection fails
|
||||
- **Graceful Degradation**: Clear explanation of limitations when optimal tools unavailable
|
||||
|
||||
### Error Prevention
|
||||
- **Real-time Availability**: Check tool availability before selection commitment
|
||||
- **Confidence Scoring**: Provide uncertainty indicators for borderline selections
|
||||
- **Validation Hooks**: Pre-execution validation of tool selection appropriateness
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### SuperClaude Framework Integration
|
||||
- **Automatic Command Integration**: Used by refactor, edit, implement, improve commands
|
||||
- **Performance Monitoring**: Integration with framework performance tracking
|
||||
- **Quality Gates**: Selection validation within SuperClaude quality assurance cycle
|
||||
|
||||
### Custom MCP Integration
|
||||
- **Serena Coordination**: Symbol analysis, multi-file operations, LSP integration
|
||||
- **Morphllm Coordination**: Pattern recognition, token optimization, fast apply operations
|
||||
- **Availability Management**: Real-time server status and capability assessment
|
||||
|
||||
### Specialized System Coordination
|
||||
- **Command Workflow**: Seamless integration with other SuperClaude commands
|
||||
- **Performance Tracking**: Selection effectiveness and execution success monitoring
|
||||
- **Framework Evolution**: Continuous improvement of selection algorithms
|
||||
|
||||
## Performance & Scalability
|
||||
|
||||
### Specialized Performance Requirements
|
||||
- **Decision Time**: <100ms for tool selection regardless of operation complexity
|
||||
- **Selection Accuracy**: >95% correct tool selection validated through execution tracking
|
||||
- **Success Rate**: >90% successful execution with selected tools
|
||||
|
||||
### Custom Resource Management
|
||||
- **Memory Efficiency**: Lightweight complexity scoring with minimal resource usage
|
||||
- **CPU Optimization**: Fast decision algorithms with minimal computational overhead
|
||||
- **Cache Management**: Intelligent caching of frequent operation patterns
|
||||
|
||||
### Scalability Characteristics
|
||||
- **Operation Complexity**: Scales from simple edits to complex multi-file refactoring
|
||||
- **Project Size**: Handles projects from single files to large codebases
|
||||
- **Performance Consistency**: Maintains sub-100ms decisions across all scales
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Specialized Operation
|
||||
```
|
||||
/sc:select-tool "fix typo in README.md"
|
||||
# Result: Morphllm (simple edit, single file, token optimization beneficial)
|
||||
```
|
||||
|
||||
### Advanced Specialized Usage
|
||||
```
|
||||
/sc:select-tool "extract authentication logic into separate service" --analyze --explain
|
||||
# Result: Serena (high complexity, architectural change, needs LSP and semantic analysis)
|
||||
```
|
||||
|
||||
### System-Level Operation
|
||||
```
|
||||
/sc:select-tool "rename function getUserData to fetchUserProfile across all files" --validate
|
||||
# Result: Serena (symbol operation, multi-file scope, cross-file dependencies)
|
||||
```
|
||||
|
||||
### Meta-Operation Example
|
||||
```
|
||||
/sc:select-tool "convert all var declarations to const in JavaScript files" --dry-run --explain
|
||||
# Result: Morphllm (pattern-based operation, token optimization, framework patterns)
|
||||
```
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Specialized Validation Criteria
|
||||
- **Selection Accuracy**: >95% correct tool selection validated through execution outcomes
|
||||
- **Performance Guarantee**: <100ms decision time with complexity scoring and analysis
|
||||
- **Success Rate Validation**: >90% successful execution with selected tools
|
||||
|
||||
### Custom Success Metrics
|
||||
- **Decision Confidence**: Confidence scoring for selection decisions with uncertainty indicators
|
||||
- **Execution Effectiveness**: Track actual performance of selected tools vs alternatives
|
||||
- **Integration Success**: Seamless integration with SuperClaude command ecosystem
|
||||
|
||||
### Specialized Compliance Requirements
|
||||
- **Framework Integration**: Full compliance with SuperClaude orchestration patterns
|
||||
- **Performance Standards**: Meet or exceed specified timing and accuracy requirements
|
||||
- **Quality Assurance**: Integration with SuperClaude quality gate validation cycle
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This specialized command will:**
|
||||
- Analyze operations and select optimal MCP tools with >95% accuracy
|
||||
- Provide sub-100ms decision time with detailed complexity scoring
|
||||
- Integrate seamlessly with other SuperClaude commands for automatic tool routing
|
||||
- Maintain high success rates through intelligent fallback and error recovery
|
||||
|
||||
**This specialized command will not:**
|
||||
- Execute the actual operations (only selects tools for execution)
|
||||
- Override user preferences when explicit tool selection is provided
|
||||
- Compromise system stability through experimental or untested tool selections
|
||||
- Make selections without proper availability verification and fallback planning
|
||||
229
Framework/Commands/spawn.md
Normal file
229
Framework/Commands/spawn.md
Normal file
@@ -0,0 +1,229 @@
|
||||
---
|
||||
name: spawn
|
||||
description: "Meta-system task orchestration with advanced breakdown algorithms and coordination patterns"
|
||||
allowed-tools: [Read, Grep, Glob, Bash, TodoWrite, Edit, MultiEdit, Write]
|
||||
|
||||
# Command Classification
|
||||
category: special
|
||||
complexity: high
|
||||
scope: meta
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [] # Meta-system command uses native orchestration
|
||||
personas: []
|
||||
wave-enabled: true
|
||||
complexity-threshold: 0.7
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: specialized
|
||||
---
|
||||
|
||||
# /sc:spawn - Meta-System Task Orchestration
|
||||
|
||||
## Purpose
|
||||
Advanced meta-system command for decomposing complex multi-domain operations into coordinated subtask hierarchies with sophisticated execution strategies. Provides intelligent task breakdown algorithms, parallel/sequential coordination patterns, and advanced argument processing for complex system-wide operations that require meta-level orchestration beyond standard command capabilities.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:spawn [complex-task] [--strategy sequential|parallel|adaptive] [--depth shallow|normal|deep] [--orchestration wave|direct|hybrid]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `complex-task` - Multi-domain operation requiring sophisticated task decomposition
|
||||
- `--strategy sequential|parallel|adaptive` - Execution coordination strategy selection
|
||||
- `--depth shallow|normal|deep` - Task breakdown depth and granularity control
|
||||
- `--orchestration wave|direct|hybrid` - Meta-system orchestration pattern selection
|
||||
- `--validate` - Enable comprehensive quality checkpoints between task phases
|
||||
- `--dry-run` - Preview task breakdown and execution plan without execution
|
||||
- `--priority high|normal|low` - Task priority and resource allocation level
|
||||
- `--dependency-map` - Generate detailed dependency visualization and analysis
|
||||
|
||||
## Specialized Execution Flow
|
||||
|
||||
### 1. Unique Analysis Phase
|
||||
- **Complex Task Parsing**: Multi-domain operation analysis with context extraction
|
||||
- **Scope Assessment**: Comprehensive scope analysis across multiple system domains
|
||||
- **Orchestration Planning**: Meta-level coordination strategy selection and optimization
|
||||
|
||||
### 2. Specialized Processing
|
||||
- **Hierarchical Breakdown Algorithm**: Advanced task decomposition with Epic → Story → Task → Subtask hierarchies
|
||||
- **Dependency Mapping Engine**: Sophisticated dependency analysis and coordination path optimization
|
||||
- **Execution Strategy Selection**: Adaptive coordination pattern selection based on task characteristics
|
||||
|
||||
### 3. Custom Integration
|
||||
- **Meta-System Coordination**: Advanced integration with SuperClaude framework orchestration layers
|
||||
- **Wave System Integration**: Coordination with wave-based execution for complex operations
|
||||
- **Cross-Domain Orchestration**: Management of operations spanning multiple technical domains
|
||||
|
||||
### 4. Specialized Validation
|
||||
- **Multi-Phase Quality Gates**: Comprehensive validation checkpoints across task hierarchy levels
|
||||
- **Orchestration Verification**: Validation of coordination patterns and execution strategies
|
||||
- **Meta-System Compliance**: Verification of framework integration and system stability
|
||||
|
||||
### 5. Custom Output Generation
|
||||
- **Execution Coordination**: Advanced task execution with progress monitoring and adaptive adjustments
|
||||
- **Result Integration**: Sophisticated result aggregation and synthesis across task hierarchies
|
||||
- **Meta-System Reporting**: Comprehensive orchestration analytics and performance metrics
|
||||
|
||||
## Custom Architecture Features
|
||||
|
||||
### Specialized System Integration
|
||||
- **Multi-Domain Orchestration**: Coordination across frontend, backend, infrastructure, and quality domains
|
||||
- **Wave System Coordination**: Integration with wave-based execution for progressive enhancement
|
||||
- **Meta-Level Task Management**: Advanced task hierarchy management with cross-session persistence
|
||||
|
||||
### Unique Processing Capabilities
|
||||
- **Advanced Breakdown Algorithms**: Sophisticated task decomposition with intelligent dependency analysis
|
||||
- **Adaptive Execution Strategies**: Dynamic coordination pattern selection based on operation characteristics
|
||||
- **Cross-Domain Intelligence**: Multi-domain operation coordination with specialized domain awareness
|
||||
|
||||
### Custom Performance Characteristics
|
||||
- **Orchestration Efficiency**: Optimized coordination patterns for maximum parallel execution benefits
|
||||
- **Resource Management**: Intelligent resource allocation and management across task hierarchies
|
||||
- **Scalability Optimization**: Advanced scaling patterns for complex multi-domain operations
|
||||
|
||||
## Advanced Specialized Features
|
||||
|
||||
### Hierarchical Task Breakdown System
|
||||
- **Epic-Level Operations**: Large-scale system operations spanning multiple domains and sessions
|
||||
- **Story-Level Coordination**: Feature-level task coordination with dependency management
|
||||
- **Task-Level Execution**: Individual operation execution with progress monitoring and validation
|
||||
- **Subtask Granularity**: Fine-grained operation breakdown for optimal parallel execution
|
||||
|
||||
### Intelligent Orchestration Patterns
|
||||
- **Sequential Coordination**: Dependency-ordered execution with optimal task chaining
|
||||
- **Parallel Coordination**: Independent task execution with resource optimization and synchronization
|
||||
- **Adaptive Coordination**: Dynamic strategy selection based on operation characteristics and system state
|
||||
- **Hybrid Coordination**: Mixed execution patterns optimized for specific operation requirements
|
||||
|
||||
### Meta-System Capabilities
|
||||
- **Cross-Session Orchestration**: Multi-session task coordination with state persistence
|
||||
- **System-Wide Coordination**: Operations spanning multiple SuperClaude framework components
|
||||
- **Advanced Argument Processing**: Sophisticated parameter parsing and context extraction
|
||||
- **Meta-Level Analytics**: Orchestration performance analysis and optimization recommendations
|
||||
|
||||
## Specialized Tool Coordination
|
||||
|
||||
### Custom Tool Integration
|
||||
- **Native Tool Orchestration**: Advanced coordination of Read, Write, Edit, Grep, Glob, Bash operations
|
||||
- **TodoWrite Integration**: Sophisticated task breakdown and progress tracking with hierarchical management
|
||||
- **File Operation Batching**: Intelligent batching and optimization of file operations across tasks
|
||||
|
||||
### Unique Tool Patterns
|
||||
- **Parallel Tool Execution**: Concurrent tool usage with resource management and synchronization
|
||||
- **Sequential Tool Chaining**: Optimized tool execution sequences with dependency management
|
||||
- **Adaptive Tool Selection**: Dynamic tool selection based on task characteristics and performance requirements
|
||||
|
||||
### Tool Performance Optimization
|
||||
- **Resource Allocation**: Intelligent resource management for optimal tool performance
|
||||
- **Execution Batching**: Advanced batching strategies for efficient tool coordination
|
||||
- **Performance Monitoring**: Real-time tool performance tracking and optimization
|
||||
|
||||
## Custom Error Handling
|
||||
|
||||
### Specialized Error Categories
|
||||
- **Orchestration Failures**: Complex coordination failures requiring sophisticated recovery strategies
|
||||
- **Task Breakdown Errors**: Issues with task decomposition requiring alternative breakdown approaches
|
||||
- **Execution Coordination Errors**: Problems with parallel/sequential execution requiring strategy adaptation
|
||||
|
||||
### Custom Recovery Strategies
|
||||
- **Graceful Degradation**: Adaptive strategy selection when preferred orchestration patterns fail
|
||||
- **Progressive Recovery**: Step-by-step recovery with partial result preservation
|
||||
- **Alternative Orchestration**: Fallback to alternative coordination patterns when primary strategies fail
|
||||
|
||||
### Error Prevention
|
||||
- **Proactive Validation**: Comprehensive pre-execution validation of orchestration plans
|
||||
- **Dependency Verification**: Advanced dependency analysis to prevent coordination failures
|
||||
- **Resource Checking**: Pre-execution resource availability and allocation verification
|
||||
|
||||
## Integration Patterns
|
||||
|
||||
### SuperClaude Framework Integration
|
||||
- **Wave System Coordination**: Integration with wave-based execution for progressive enhancement
|
||||
- **Quality Gate Integration**: Comprehensive validation throughout orchestration phases
|
||||
- **Framework Orchestration**: Meta-level coordination with other SuperClaude components
|
||||
|
||||
### Custom MCP Integration (when applicable)
|
||||
- **Server Coordination**: Advanced coordination with MCP servers when required for specific tasks
|
||||
- **Performance Optimization**: Orchestration-aware MCP server usage for optimal performance
|
||||
- **Resource Management**: Intelligent MCP server resource allocation across task hierarchies
|
||||
|
||||
### Specialized System Coordination
|
||||
- **Cross-Domain Operations**: Coordination of operations spanning multiple technical domains
|
||||
- **System-Wide Orchestration**: Meta-level coordination across entire system architecture
|
||||
- **Advanced State Management**: Sophisticated state tracking and management across complex operations
|
||||
|
||||
## Performance & Scalability
|
||||
|
||||
### Specialized Performance Requirements
|
||||
- **Orchestration Overhead**: Minimal coordination overhead while maximizing parallel execution benefits
|
||||
- **Task Breakdown Efficiency**: Fast task decomposition with comprehensive dependency analysis
|
||||
- **Execution Coordination**: Optimal resource utilization across parallel and sequential execution patterns
|
||||
|
||||
### Custom Resource Management
|
||||
- **Intelligent Allocation**: Advanced resource allocation strategies for complex task hierarchies
|
||||
- **Performance Optimization**: Dynamic resource management based on task characteristics and system state
|
||||
- **Scalability Management**: Adaptive scaling patterns for operations of varying complexity
|
||||
|
||||
### Scalability Characteristics
|
||||
- **Task Hierarchy Scaling**: Efficient handling of complex task hierarchies from simple to enterprise-scale
|
||||
- **Coordination Scaling**: Advanced coordination patterns that scale with operation complexity
|
||||
- **Resource Scaling**: Intelligent resource management that adapts to operation scale and requirements
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Specialized Operation
|
||||
```
|
||||
/sc:spawn "implement user authentication system"
|
||||
# Creates hierarchical breakdown: Database → Backend → Frontend → Testing
|
||||
```
|
||||
|
||||
### Advanced Specialized Usage
|
||||
```
|
||||
/sc:spawn "migrate legacy monolith to microservices" --strategy adaptive --depth deep --orchestration wave
|
||||
# Complex multi-domain operation with sophisticated orchestration
|
||||
```
|
||||
|
||||
### System-Level Operation
|
||||
```
|
||||
/sc:spawn "establish CI/CD pipeline with security scanning" --validate --dependency-map
|
||||
# System-wide infrastructure operation with comprehensive validation
|
||||
```
|
||||
|
||||
### Meta-Operation Example
|
||||
```
|
||||
/sc:spawn "refactor entire codebase for performance optimization" --orchestration hybrid --priority high
|
||||
# Enterprise-scale operation requiring meta-system coordination
|
||||
```
|
||||
|
||||
## Quality Standards
|
||||
|
||||
### Specialized Validation Criteria
|
||||
- **Orchestration Effectiveness**: Successful coordination of complex multi-domain operations
|
||||
- **Task Breakdown Quality**: Comprehensive and accurate task decomposition with proper dependency mapping
|
||||
- **Execution Efficiency**: Optimal performance through intelligent coordination strategies
|
||||
|
||||
### Custom Success Metrics
|
||||
- **Coordination Success Rate**: Percentage of successful orchestration operations across task hierarchies
|
||||
- **Parallel Execution Efficiency**: Performance gains achieved through parallel coordination patterns
|
||||
- **Meta-System Integration**: Successful integration with SuperClaude framework orchestration layers
|
||||
|
||||
### Specialized Compliance Requirements
|
||||
- **Framework Integration**: Full compliance with SuperClaude meta-system orchestration patterns
|
||||
- **Quality Assurance**: Integration with comprehensive quality gates and validation cycles
|
||||
- **Performance Standards**: Meet or exceed orchestration efficiency and coordination effectiveness targets
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This specialized command will:**
|
||||
- Decompose complex multi-domain operations into coordinated task hierarchies
|
||||
- Provide sophisticated orchestration patterns for parallel and sequential execution
|
||||
- Manage advanced argument processing and meta-system coordination
|
||||
- Integrate with SuperClaude framework orchestration and wave systems
|
||||
|
||||
**This specialized command will not:**
|
||||
- Replace specialized domain commands that have specific technical focuses
|
||||
- Execute simple operations that don't require sophisticated orchestration
|
||||
- Override explicit user coordination preferences or execution strategies
|
||||
- Compromise system stability through experimental orchestration patterns
|
||||
217
Framework/Commands/task.md
Normal file
217
Framework/Commands/task.md
Normal file
@@ -0,0 +1,217 @@
|
||||
---
|
||||
name: task
|
||||
description: "Execute complex tasks with intelligent workflow management, cross-session persistence, hierarchical task organization, and advanced wave system orchestration"
|
||||
allowed-tools: [Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite, Task, WebSearch, sequentialthinking]
|
||||
|
||||
# Command Classification
|
||||
category: orchestration
|
||||
complexity: advanced
|
||||
scope: cross-session
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7, magic, playwright, morphllm, serena]
|
||||
personas: [architect, analyzer, frontend, backend, security, devops, project-manager]
|
||||
wave-enabled: true
|
||||
complexity-threshold: 0.7
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: complex
|
||||
personas: [architect, analyzer, project-manager]
|
||||
---
|
||||
|
||||
# /sc:task - Enhanced Task Management
|
||||
|
||||
## Purpose
|
||||
Execute complex tasks with intelligent workflow management, cross-session persistence, hierarchical task organization, and advanced orchestration capabilities.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:task [action] [target] [--strategy systematic|agile|enterprise] [--depth shallow|normal|deep] [--parallel] [--validate] [--mcp-routing]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `action` - Task management action (create, execute, status, analytics, optimize, delegate, validate)
|
||||
- `target` - Task description, project scope, or existing task ID for comprehensive management
|
||||
- `--strategy` - Task execution strategy selection with specialized orchestration approaches
|
||||
- `--depth` - Task analysis depth and thoroughness level
|
||||
- `--parallel` - Enable parallel task processing with multi-agent coordination
|
||||
- `--validate` - Comprehensive validation and task completion quality gates
|
||||
- `--mcp-routing` - Intelligent MCP server routing for specialized task analysis
|
||||
- `--wave-mode` - Enable wave-based execution with progressive task enhancement
|
||||
- `--cross-session` - Enable cross-session persistence and task continuity
|
||||
- `--persist` - Enable cross-session task persistence
|
||||
- `--hierarchy` - Create hierarchical task breakdown
|
||||
- `--delegate` - Enable multi-agent task delegation
|
||||
|
||||
## Actions
|
||||
- `create` - Create new project-level task hierarchy with advanced orchestration
|
||||
- `execute` - Execute task with intelligent orchestration and wave system integration
|
||||
- `status` - View task status across sessions with comprehensive analytics
|
||||
- `analytics` - Task performance and analytics dashboard with optimization insights
|
||||
- `optimize` - Optimize task execution strategies with wave system coordination
|
||||
- `delegate` - Delegate tasks across multiple agents with intelligent coordination
|
||||
- `validate` - Validate task completion with evidence and quality assurance
|
||||
|
||||
## Execution Modes
|
||||
|
||||
### Systematic Strategy
|
||||
1. **Discovery Phase**: Comprehensive project analysis and scope definition
|
||||
2. **Planning Phase**: Hierarchical task breakdown with dependency mapping
|
||||
3. **Execution Phase**: Sequential execution with validation gates
|
||||
4. **Validation Phase**: Evidence collection and quality assurance
|
||||
5. **Optimization Phase**: Performance analysis and improvement recommendations
|
||||
|
||||
### Agile Strategy
|
||||
1. **Sprint Planning**: Priority-based task organization
|
||||
2. **Iterative Execution**: Short cycles with continuous feedback
|
||||
3. **Adaptive Planning**: Dynamic task adjustment based on outcomes
|
||||
4. **Continuous Integration**: Real-time validation and testing
|
||||
5. **Retrospective Analysis**: Learning and process improvement
|
||||
|
||||
### Enterprise Strategy
|
||||
1. **Stakeholder Analysis**: Multi-domain impact assessment
|
||||
2. **Resource Allocation**: Optimal resource distribution across tasks
|
||||
3. **Risk Management**: Comprehensive risk assessment and mitigation
|
||||
4. **Compliance Validation**: Regulatory and policy compliance checks
|
||||
5. **Governance Reporting**: Detailed progress and compliance reporting
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Task Hierarchy Management
|
||||
- **Epic Level**: Large-scale project objectives (weeks to months)
|
||||
- **Story Level**: Feature-specific implementations (days to weeks)
|
||||
- **Task Level**: Specific actionable items (hours to days)
|
||||
- **Subtask Level**: Granular implementation steps (minutes to hours)
|
||||
|
||||
### Intelligent Task Orchestration
|
||||
- **Dependency Resolution**: Automatic dependency detection and sequencing
|
||||
- **Parallel Execution**: Independent task parallelization
|
||||
- **Resource Optimization**: Intelligent resource allocation and scheduling
|
||||
- **Context Sharing**: Cross-task context and knowledge sharing
|
||||
|
||||
### Cross-Session Persistence
|
||||
- **Task State Management**: Persistent task states across sessions
|
||||
- **Context Continuity**: Preserved context and progress tracking
|
||||
- **Historical Analytics**: Task execution history and learning
|
||||
- **Recovery Mechanisms**: Automatic recovery from interruptions
|
||||
|
||||
### Quality Gates and Validation
|
||||
- **Evidence Collection**: Systematic evidence gathering during execution
|
||||
- **Validation Criteria**: Customizable completion criteria
|
||||
- **Quality Metrics**: Comprehensive quality assessment
|
||||
- **Compliance Checks**: Automated compliance validation
|
||||
|
||||
## Integration Points
|
||||
|
||||
### Wave System Integration
|
||||
- **Wave Coordination**: Multi-wave task execution strategies
|
||||
- **Context Accumulation**: Progressive context building across waves
|
||||
- **Performance Monitoring**: Real-time performance tracking and optimization
|
||||
- **Error Recovery**: Graceful error handling and recovery mechanisms
|
||||
|
||||
### MCP Server Coordination
|
||||
- **Context7**: Framework patterns and library documentation
|
||||
- **Sequential**: Complex analysis and multi-step reasoning
|
||||
- **Magic**: UI component generation and design systems
|
||||
- **Playwright**: End-to-end testing and performance validation
|
||||
|
||||
### Persona Integration
|
||||
- **Architect**: System design and architectural decisions
|
||||
- **Analyzer**: Code analysis and quality assessment
|
||||
- **Project Manager**: Resource allocation and progress tracking
|
||||
- **Domain Experts**: Specialized expertise for specific task types
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Execution Efficiency
|
||||
- **Batch Operations**: Grouped execution for related tasks
|
||||
- **Parallel Processing**: Independent task parallelization
|
||||
- **Context Caching**: Reusable context and analysis results
|
||||
- **Resource Pooling**: Shared resource utilization
|
||||
|
||||
### Intelligence Features
|
||||
- **Predictive Planning**: AI-driven task estimation and planning
|
||||
- **Adaptive Execution**: Dynamic strategy adjustment based on progress
|
||||
- **Learning Systems**: Continuous improvement from execution patterns
|
||||
- **Optimization Recommendations**: Data-driven improvement suggestions
|
||||
|
||||
## Examples
|
||||
|
||||
### Comprehensive Project Analysis
|
||||
```
|
||||
/sc:task create "enterprise authentication system" --strategy systematic --depth deep --validate --mcp-routing
|
||||
# Comprehensive analysis with full orchestration capabilities
|
||||
```
|
||||
|
||||
### Agile Multi-Sprint Coordination
|
||||
```
|
||||
/sc:task execute "feature backlog" --strategy agile --parallel --cross-session
|
||||
# Agile coordination with cross-session persistence
|
||||
```
|
||||
|
||||
### Enterprise-Scale Operation
|
||||
```
|
||||
/sc:task create "digital transformation" --strategy enterprise --wave-mode --all-personas
|
||||
# Enterprise-scale coordination with full persona orchestration
|
||||
```
|
||||
|
||||
### Complex Integration Project
|
||||
```
|
||||
/sc:task execute "microservices platform" --depth deep --parallel --validate --sequential
|
||||
# Complex integration with sequential thinking and validation
|
||||
```
|
||||
|
||||
### Create Project-Level Task Hierarchy
|
||||
```
|
||||
/sc:task create "Implement user authentication system" --hierarchy --persist --strategy systematic
|
||||
```
|
||||
|
||||
### Execute with Multi-Agent Delegation
|
||||
```
|
||||
/sc:task execute AUTH-001 --delegate --wave-mode --validate
|
||||
```
|
||||
|
||||
### Analytics and Optimization
|
||||
```
|
||||
/sc:task analytics --project AUTH --optimization-recommendations
|
||||
```
|
||||
|
||||
### Cross-Session Task Management
|
||||
```
|
||||
/sc:task status --all-sessions --detailed-breakdown
|
||||
```
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This advanced command will:**
|
||||
- Orchestrate complex multi-domain task operations with expert coordination
|
||||
- Provide sophisticated analysis and strategic task planning capabilities
|
||||
- Coordinate multiple MCP servers and personas for optimal task outcomes
|
||||
- Maintain cross-session persistence and progressive enhancement for task continuity
|
||||
- Apply comprehensive quality gates and validation throughout task execution
|
||||
- Execute complex tasks with intelligent workflow management and wave system integration
|
||||
- Create hierarchical task breakdown with advanced orchestration capabilities
|
||||
- Track task performance and analytics with optimization recommendations
|
||||
|
||||
**This advanced command will not:**
|
||||
- Execute without proper analysis and planning phases for task management
|
||||
- Operate without appropriate error handling and recovery mechanisms for tasks
|
||||
- Proceed without stakeholder alignment and clear success criteria for task completion
|
||||
- Compromise quality standards for speed or convenience in task execution
|
||||
|
||||
---
|
||||
|
||||
## Claude Code Integration
|
||||
- **TodoWrite Integration**: Seamless session-level task coordination
|
||||
- **Wave System**: Advanced multi-stage execution orchestration
|
||||
- **Hook System**: Real-time task monitoring and optimization
|
||||
- **MCP Coordination**: Intelligent server routing and resource utilization
|
||||
- **Performance Monitoring**: Sub-100ms execution targets with comprehensive metrics
|
||||
|
||||
## Success Criteria
|
||||
- **Task Completion Rate**: >95% successful task completion
|
||||
- **Performance Targets**: <100ms hook execution, <5s task creation
|
||||
- **Quality Metrics**: >90% validation success rate
|
||||
- **Cross-Session Continuity**: 100% task state preservation
|
||||
- **Intelligence Effectiveness**: >80% accurate predictive planning
|
||||
103
Framework/Commands/test.md
Normal file
103
Framework/Commands/test.md
Normal file
@@ -0,0 +1,103 @@
|
||||
---
|
||||
name: test
|
||||
description: "Execute tests, generate test reports, and maintain test coverage standards with AI-powered automated testing"
|
||||
allowed-tools: [Read, Bash, Grep, Glob, Write]
|
||||
|
||||
# Command Classification
|
||||
category: utility
|
||||
complexity: enhanced
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [playwright] # Playwright MCP for browser testing
|
||||
personas: [qa-specialist] # QA specialist persona activation
|
||||
wave-enabled: true
|
||||
---
|
||||
|
||||
# /sc:test - Testing and Quality Assurance
|
||||
|
||||
## Purpose
|
||||
Execute comprehensive testing workflows across unit, integration, and end-to-end test suites while generating detailed test reports and maintaining coverage standards for project quality assurance.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:test [target] [--type unit|integration|e2e|all] [--coverage] [--watch] [--fix]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `target` - Specific tests, files, directories, or entire test suite to execute
|
||||
- `--type` - Test type specification (unit, integration, e2e, all)
|
||||
- `--coverage` - Generate comprehensive coverage reports with metrics
|
||||
- `--watch` - Run tests in continuous watch mode with file monitoring
|
||||
- `--fix` - Automatically fix failing tests when safe and feasible
|
||||
|
||||
## Execution
|
||||
|
||||
### Traditional Testing Workflow (Default)
|
||||
1. Discover and categorize available tests using test runner patterns and file conventions
|
||||
2. Execute tests with appropriate configuration, environment setup, and parallel execution
|
||||
3. Monitor test execution, collect real-time metrics, and track progress
|
||||
4. Generate comprehensive test reports with coverage analysis and failure diagnostics
|
||||
5. Provide actionable recommendations for test improvements and coverage enhancement
|
||||
|
||||
## Claude Code Integration
|
||||
- **Tool Usage**: Bash for test runner execution, Glob for test discovery, Grep for result parsing
|
||||
- **File Operations**: Reads test configurations, writes coverage reports and test summaries
|
||||
- **Analysis Approach**: Pattern-based test categorization with execution metrics collection
|
||||
- **Output Format**: Structured test reports with coverage percentages and failure analysis
|
||||
|
||||
## Performance Targets
|
||||
- **Execution Time**: <5s for test discovery and setup, variable for test execution
|
||||
- **Success Rate**: >95% for test runner initialization and report generation
|
||||
- **Error Handling**: Clear feedback for test failures, configuration issues, and missing dependencies
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```
|
||||
/sc:test
|
||||
# Executes all available tests with standard configuration
|
||||
# Generates basic test report with pass/fail summary
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```
|
||||
/sc:test src/components --type unit --coverage --fix
|
||||
# Runs unit tests for components directory with coverage reporting
|
||||
# Automatically fixes simple test failures where safe to do so
|
||||
```
|
||||
|
||||
### Browser Testing Usage
|
||||
```
|
||||
/sc:test --type e2e
|
||||
# Runs end-to-end tests using Playwright for browser automation
|
||||
# Comprehensive UI testing with cross-browser compatibility
|
||||
|
||||
/sc:test src/components --coverage --watch
|
||||
# Unit tests for components with coverage reporting in watch mode
|
||||
# Continuous testing during development with live feedback
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
- **Invalid Input**: Validates test targets exist and test runner is available
|
||||
- **Missing Dependencies**: Checks for test framework installation and configuration
|
||||
- **File Access Issues**: Handles permission problems with test files and output directories
|
||||
- **Resource Constraints**: Manages memory and CPU usage during test execution
|
||||
|
||||
## Integration Points
|
||||
- **SuperClaude Framework**: Integrates with build and analyze commands for CI/CD workflows
|
||||
- **Other Commands**: Commonly follows build command and precedes deployment operations
|
||||
- **File System**: Reads test configurations, writes reports to project test output directories
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Execute existing test suites using project's configured test runner
|
||||
- Generate coverage reports and test execution summaries
|
||||
- Provide basic test failure analysis and improvement suggestions
|
||||
|
||||
**This command will not:**
|
||||
- Generate test cases or test files automatically
|
||||
- Modify test framework configuration or setup
|
||||
- Execute tests requiring external services without proper configuration
|
||||
89
Framework/Commands/troubleshoot.md
Normal file
89
Framework/Commands/troubleshoot.md
Normal file
@@ -0,0 +1,89 @@
|
||||
---
|
||||
name: troubleshoot
|
||||
description: "Diagnose and resolve issues in code, builds, deployments, or system behavior"
|
||||
allowed-tools: [Read, Bash, Grep, Glob, Write]
|
||||
|
||||
# Command Classification
|
||||
category: utility
|
||||
complexity: basic
|
||||
scope: project
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [] # No MCP servers required for basic commands
|
||||
personas: [] # No persona activation required
|
||||
wave-enabled: false
|
||||
---
|
||||
|
||||
# /sc:troubleshoot - Issue Diagnosis and Resolution
|
||||
|
||||
## Purpose
|
||||
Execute systematic issue diagnosis and resolution workflows for code defects, build failures, performance problems, and deployment issues using structured debugging methodologies and comprehensive problem analysis.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:troubleshoot [issue] [--type bug|build|performance|deployment] [--trace] [--fix]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `issue` - Problem description, error message, or specific symptoms to investigate
|
||||
- `--type` - Issue classification (bug, build failure, performance issue, deployment problem)
|
||||
- `--trace` - Enable detailed diagnostic tracing and comprehensive logging analysis
|
||||
- `--fix` - Automatically apply safe fixes when resolution is clearly identified
|
||||
|
||||
## Execution
|
||||
1. Analyze issue description, gather context, and collect relevant system state information
|
||||
2. Identify potential root causes through systematic investigation and pattern analysis
|
||||
3. Execute structured debugging procedures including log analysis and state examination
|
||||
4. Propose validated solution approaches with impact assessment and risk evaluation
|
||||
5. Apply appropriate fixes, verify resolution effectiveness, and document troubleshooting process
|
||||
|
||||
## Claude Code Integration
|
||||
- **Tool Usage**: Read for log analysis, Bash for diagnostic commands, Grep for error pattern detection
|
||||
- **File Operations**: Reads error logs and system state, writes diagnostic reports and resolution documentation
|
||||
- **Analysis Approach**: Systematic root cause analysis with hypothesis testing and evidence collection
|
||||
- **Output Format**: Structured troubleshooting reports with findings, solutions, and prevention recommendations
|
||||
|
||||
## Performance Targets
|
||||
- **Execution Time**: <5s for initial issue analysis and diagnostic setup
|
||||
- **Success Rate**: >95% for issue categorization and diagnostic procedure execution
|
||||
- **Error Handling**: Comprehensive handling of incomplete information and ambiguous symptoms
|
||||
|
||||
## Examples
|
||||
|
||||
### Basic Usage
|
||||
```
|
||||
/sc:troubleshoot "Build failing with TypeScript errors"
|
||||
# Analyzes build logs and identifies TypeScript compilation issues
|
||||
# Provides specific error locations and recommended fixes
|
||||
```
|
||||
|
||||
### Advanced Usage
|
||||
```
|
||||
/sc:troubleshoot "Performance degradation in API responses" --type performance --trace --fix
|
||||
# Deep performance analysis with detailed tracing enabled
|
||||
# Identifies bottlenecks and applies safe performance optimizations
|
||||
```
|
||||
|
||||
## Error Handling
|
||||
- **Invalid Input**: Validates issue descriptions provide sufficient context for meaningful analysis
|
||||
- **Missing Dependencies**: Handles cases where diagnostic tools or logs are unavailable
|
||||
- **File Access Issues**: Manages permissions for log files and system diagnostic information
|
||||
- **Resource Constraints**: Optimizes diagnostic procedures for resource-limited environments
|
||||
|
||||
## Integration Points
|
||||
- **SuperClaude Framework**: Coordinates with analyze for code quality issues and test for validation
|
||||
- **Other Commands**: Integrates with build for compilation issues and git for version-related problems
|
||||
- **File System**: Reads system logs and error reports, writes diagnostic summaries and resolution guides
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This command will:**
|
||||
- Perform systematic issue diagnosis using available logs, error messages, and system state
|
||||
- Provide structured troubleshooting procedures with step-by-step resolution guidance
|
||||
- Apply safe, well-validated fixes for clearly identified and understood problems
|
||||
|
||||
**This command will not:**
|
||||
- Execute potentially destructive operations without explicit user confirmation
|
||||
- Modify production systems or critical configuration without proper validation
|
||||
- Diagnose issues requiring specialized domain knowledge beyond general software development
|
||||
566
Framework/Commands/workflow.md
Normal file
566
Framework/Commands/workflow.md
Normal file
@@ -0,0 +1,566 @@
|
||||
---
|
||||
name: workflow
|
||||
description: "Generate structured implementation workflows from PRDs and feature requirements with expert guidance, multi-persona coordination, and advanced orchestration"
|
||||
allowed-tools: [Read, Write, Edit, MultiEdit, Bash, Grep, Glob, TodoWrite, Task, WebSearch, sequentialthinking]
|
||||
|
||||
# Command Classification
|
||||
category: orchestration
|
||||
complexity: advanced
|
||||
scope: cross-session
|
||||
|
||||
# Integration Configuration
|
||||
mcp-integration:
|
||||
servers: [sequential, context7, magic, playwright, morphllm, serena]
|
||||
personas: [architect, analyzer, frontend, backend, security, devops, project-manager]
|
||||
wave-enabled: true
|
||||
complexity-threshold: 0.6
|
||||
|
||||
# Performance Profile
|
||||
performance-profile: complex
|
||||
personas: [architect, analyzer, project-manager]
|
||||
---
|
||||
|
||||
# /sc:workflow - Implementation Workflow Generator
|
||||
|
||||
## Purpose
|
||||
Analyze Product Requirements Documents (PRDs) and feature specifications to generate comprehensive, step-by-step implementation workflows with sophisticated orchestration featuring expert guidance, multi-persona coordination, dependency mapping, automated task orchestration, and cross-session workflow management for enterprise-scale development operations.
|
||||
|
||||
## Usage
|
||||
```
|
||||
/sc:workflow [prd-file|feature-description] [--strategy systematic|agile|enterprise] [--depth shallow|normal|deep] [--parallel] [--validate] [--mcp-routing]
|
||||
```
|
||||
|
||||
## Arguments
|
||||
- `prd-file|feature-description` - Path to PRD file or direct feature description for comprehensive workflow analysis
|
||||
- `--strategy` - Workflow strategy selection with specialized orchestration approaches
|
||||
- `--depth` - Analysis depth and thoroughness level for workflow generation
|
||||
- `--parallel` - Enable parallel workflow processing with multi-agent coordination
|
||||
- `--validate` - Comprehensive validation and workflow completeness quality gates
|
||||
- `--mcp-routing` - Intelligent MCP server routing for specialized workflow analysis
|
||||
- `--wave-mode` - Enable wave-based execution with progressive workflow enhancement
|
||||
- `--cross-session` - Enable cross-session persistence and workflow continuity
|
||||
- `--persona` - Force specific expert persona (architect, frontend, backend, security, devops, etc.)
|
||||
- `--output` - Output format (roadmap, tasks, detailed)
|
||||
- `--estimate` - Include time and complexity estimates
|
||||
- `--dependencies` - Map external dependencies and integrations
|
||||
- `--risks` - Include risk assessment and mitigation strategies
|
||||
- `--milestones` - Create milestone-based project phases
|
||||
|
||||
## MCP Integration Flags
|
||||
- `--c7` / `--context7` - Enable Context7 for framework patterns and best practices
|
||||
- `--sequential` - Enable Sequential thinking for complex multi-step analysis
|
||||
- `--magic` - Enable Magic for UI component workflow planning
|
||||
- `--all-mcp` - Enable all MCP servers for comprehensive workflow generation
|
||||
|
||||
## Execution Strategies
|
||||
|
||||
### Systematic Strategy (Default)
|
||||
1. **Comprehensive Analysis**: Deep PRD analysis with architectural assessment
|
||||
2. **Strategic Planning**: Multi-phase planning with dependency mapping
|
||||
3. **Coordinated Execution**: Sequential workflow execution with validation gates
|
||||
4. **Quality Assurance**: Comprehensive testing and validation cycles
|
||||
5. **Optimization**: Performance and maintainability optimization
|
||||
6. **Documentation**: Comprehensive workflow documentation and knowledge transfer
|
||||
|
||||
### Agile Strategy
|
||||
1. **Rapid Assessment**: Quick scope definition and priority identification
|
||||
2. **Iterative Planning**: Sprint-based organization with adaptive planning
|
||||
3. **Continuous Delivery**: Incremental execution with frequent feedback
|
||||
4. **Adaptive Validation**: Dynamic testing and validation approaches
|
||||
5. **Retrospective Optimization**: Continuous improvement and learning
|
||||
6. **Living Documentation**: Evolving documentation with implementation
|
||||
|
||||
### Enterprise Strategy
|
||||
1. **Stakeholder Analysis**: Multi-domain impact assessment and coordination
|
||||
2. **Governance Planning**: Compliance and policy integration planning
|
||||
3. **Resource Orchestration**: Enterprise-scale resource allocation and management
|
||||
4. **Risk Management**: Comprehensive risk assessment and mitigation strategies
|
||||
5. **Compliance Validation**: Regulatory and policy compliance verification
|
||||
6. **Enterprise Integration**: Large-scale system integration and coordination
|
||||
|
||||
## Advanced Orchestration Features
|
||||
|
||||
### Wave System Integration
|
||||
- **Multi-Wave Coordination**: Progressive workflow execution across multiple coordinated waves
|
||||
- **Context Accumulation**: Building understanding and capability across workflow waves
|
||||
- **Performance Monitoring**: Real-time optimization and resource management for workflows
|
||||
- **Error Recovery**: Sophisticated error handling and recovery across workflow waves
|
||||
|
||||
### Cross-Session Persistence
|
||||
- **State Management**: Maintain workflow operation state across sessions and interruptions
|
||||
- **Context Continuity**: Preserve understanding and progress over time for workflows
|
||||
- **Historical Analysis**: Learn from previous workflow executions and outcomes
|
||||
- **Recovery Mechanisms**: Robust recovery from interruptions and workflow failures
|
||||
|
||||
### Intelligent MCP Coordination
|
||||
- **Dynamic Server Selection**: Choose optimal MCP servers based on workflow context and needs
|
||||
- **Load Balancing**: Distribute workflow processing across available servers for efficiency
|
||||
- **Capability Matching**: Match workflow operations to server capabilities and strengths
|
||||
- **Fallback Strategies**: Graceful degradation when servers are unavailable for workflows
|
||||
|
||||
## Multi-Persona Orchestration
|
||||
|
||||
### Expert Coordination System
|
||||
The command orchestrates multiple domain experts working together on complex workflows:
|
||||
|
||||
#### Primary Coordination Personas
|
||||
- **Architect**: System design for workflows, technology decisions, scalability planning
|
||||
- **Analyzer**: Workflow analysis, quality assessment, technical evaluation
|
||||
- **Project Manager**: Resource coordination, timeline management, stakeholder communication
|
||||
|
||||
#### Domain-Specific Personas (Auto-Activated)
|
||||
- **Frontend Specialist**: UI/UX workflow expertise, client-side optimization, accessibility
|
||||
- **Backend Engineer**: Server-side workflow architecture, data management, API design
|
||||
- **Security Auditor**: Security workflow assessment, threat modeling, compliance validation
|
||||
- **DevOps Engineer**: Infrastructure workflow automation, deployment strategies, monitoring
|
||||
|
||||
### Persona Coordination Patterns
|
||||
- **Sequential Consultation**: Ordered expert consultation for complex workflow decisions
|
||||
- **Parallel Analysis**: Simultaneous workflow analysis from multiple perspectives
|
||||
- **Consensus Building**: Integrating diverse expert opinions into unified workflow approach
|
||||
- **Conflict Resolution**: Handling contradictory recommendations and workflow trade-offs
|
||||
|
||||
## Comprehensive MCP Server Integration
|
||||
|
||||
### Sequential Thinking Integration
|
||||
- **Complex Problem Decomposition**: Break down sophisticated workflow challenges systematically
|
||||
- **Multi-Step Reasoning**: Apply structured reasoning for complex workflow decisions
|
||||
- **Pattern Recognition**: Identify complex workflow patterns across large systems
|
||||
- **Validation Logic**: Comprehensive workflow validation and verification processes
|
||||
|
||||
### Context7 Integration
|
||||
- **Framework Expertise**: Leverage deep framework knowledge and workflow patterns
|
||||
- **Best Practices**: Apply industry standards and proven workflow approaches
|
||||
- **Pattern Libraries**: Access comprehensive workflow pattern and example repositories
|
||||
- **Version Compatibility**: Ensure workflow compatibility across technology stacks
|
||||
|
||||
### Magic Integration
|
||||
- **Advanced UI Generation**: Sophisticated user interface workflow generation
|
||||
- **Design System Integration**: Comprehensive design system workflow coordination
|
||||
- **Accessibility Excellence**: Advanced accessibility workflow and inclusive design
|
||||
- **Performance Optimization**: UI performance workflow and user experience optimization
|
||||
|
||||
### Playwright Integration
|
||||
- **Comprehensive Testing**: End-to-end workflow testing across multiple browsers and devices
|
||||
- **Performance Validation**: Real-world workflow performance testing and validation
|
||||
- **Visual Testing**: Comprehensive visual workflow regression and compatibility testing
|
||||
- **User Experience Validation**: Real user interaction workflow simulation and testing
|
||||
|
||||
### Morphllm Integration
|
||||
- **Intelligent Code Generation**: Advanced workflow code generation with pattern recognition
|
||||
- **Large-Scale Refactoring**: Sophisticated workflow refactoring across extensive codebases
|
||||
- **Pattern Application**: Apply complex workflow patterns and transformations at scale
|
||||
- **Quality Enhancement**: Automated workflow quality improvements and optimization
|
||||
|
||||
### Serena Integration
|
||||
- **Semantic Analysis**: Deep semantic understanding of workflow code and systems
|
||||
- **Knowledge Management**: Comprehensive workflow knowledge capture and retrieval
|
||||
- **Cross-Session Learning**: Accumulate and apply workflow knowledge across sessions
|
||||
- **Memory Coordination**: Sophisticated workflow memory management and organization
|
||||
|
||||
## Advanced Workflow Management
|
||||
|
||||
### Task Hierarchies
|
||||
- **Epic Level**: Large-scale workflow objectives spanning multiple sessions and domains
|
||||
- **Story Level**: Feature-level workflow implementations with clear deliverables
|
||||
- **Task Level**: Specific workflow implementation items with defined outcomes
|
||||
- **Subtask Level**: Granular workflow implementation steps with measurable progress
|
||||
|
||||
### Dependency Management
|
||||
- **Cross-Domain Dependencies**: Coordinate workflow dependencies across different expertise domains
|
||||
- **Temporal Dependencies**: Manage time-based workflow dependencies and sequencing
|
||||
- **Resource Dependencies**: Coordinate shared workflow resources and capacity constraints
|
||||
- **Knowledge Dependencies**: Ensure prerequisite knowledge and context availability for workflows
|
||||
|
||||
### Quality Gate Integration
|
||||
- **Pre-Execution Gates**: Comprehensive readiness validation before workflow execution
|
||||
- **Progressive Gates**: Intermediate quality checks throughout workflow execution
|
||||
- **Completion Gates**: Thorough validation before marking workflow operations complete
|
||||
- **Handoff Gates**: Quality assurance for transitions between workflow phases or systems
|
||||
|
||||
## Performance & Scalability
|
||||
|
||||
### Performance Optimization
|
||||
- **Intelligent Batching**: Group related workflow operations for maximum efficiency
|
||||
- **Parallel Processing**: Coordinate independent workflow operations simultaneously
|
||||
- **Resource Management**: Optimal allocation of tools, servers, and personas for workflows
|
||||
- **Context Caching**: Efficient reuse of workflow analysis and computation results
|
||||
|
||||
### Performance Targets
|
||||
- **Complex Analysis**: <60s for comprehensive workflow project analysis
|
||||
- **Strategy Planning**: <120s for detailed workflow execution planning
|
||||
- **Cross-Session Operations**: <10s for session state management
|
||||
- **MCP Coordination**: <5s for server routing and coordination
|
||||
- **Overall Execution**: Variable based on scope, with progress tracking
|
||||
|
||||
### Scalability Features
|
||||
- **Horizontal Scaling**: Distribute workflow work across multiple processing units
|
||||
- **Incremental Processing**: Process large workflow operations in manageable chunks
|
||||
- **Progressive Enhancement**: Build workflow capabilities and understanding over time
|
||||
- **Resource Adaptation**: Adapt to available resources and constraints for workflows
|
||||
|
||||
## Advanced Error Handling
|
||||
|
||||
### Sophisticated Recovery Mechanisms
|
||||
- **Multi-Level Rollback**: Rollback at workflow phase, session, or entire operation levels
|
||||
- **Partial Success Management**: Handle and build upon partially completed workflow operations
|
||||
- **Context Preservation**: Maintain context and progress through workflow failures
|
||||
- **Intelligent Retry**: Smart retry with improved workflow strategies and conditions
|
||||
|
||||
### Error Classification
|
||||
- **Coordination Errors**: Issues with persona or MCP server coordination during workflows
|
||||
- **Resource Constraint Errors**: Handling of resource limitations and capacity issues
|
||||
- **Integration Errors**: Cross-system integration and communication failures
|
||||
- **Complex Logic Errors**: Sophisticated workflow logic and reasoning failures
|
||||
|
||||
### Recovery Strategies
|
||||
- **Graceful Degradation**: Maintain functionality with reduced workflow capabilities
|
||||
- **Alternative Approaches**: Switch to alternative workflow strategies when primary approaches fail
|
||||
- **Human Intervention**: Clear escalation paths for complex issues requiring human judgment
|
||||
- **Learning Integration**: Incorporate failure learnings into future workflow executions
|
||||
|
||||
### MVP Strategy
|
||||
1. **Core Feature Identification** - Strip down to essential functionality
|
||||
2. **Rapid Prototyping** - Focus on quick validation and feedback
|
||||
3. **Technical Debt Planning** - Identify shortcuts and future improvements
|
||||
4. **Validation Metrics** - Define success criteria and measurement
|
||||
5. **Scaling Roadmap** - Plan for post-MVP feature expansion
|
||||
6. **User Feedback Integration** - Structured approach to user input
|
||||
|
||||
## Expert Persona Auto-Activation
|
||||
|
||||
### Frontend Workflow (`--persona frontend` or auto-detected)
|
||||
- **UI/UX Analysis** - Design system integration and component planning
|
||||
- **State Management** - Data flow and state architecture
|
||||
- **Performance Optimization** - Bundle optimization and lazy loading
|
||||
- **Accessibility Compliance** - WCAG guidelines and inclusive design
|
||||
- **Browser Compatibility** - Cross-browser testing strategy
|
||||
- **Mobile Responsiveness** - Responsive design implementation plan
|
||||
|
||||
### Backend Workflow (`--persona backend` or auto-detected)
|
||||
- **API Design** - RESTful/GraphQL endpoint planning
|
||||
- **Database Schema** - Data modeling and migration strategy
|
||||
- **Security Implementation** - Authentication, authorization, and data protection
|
||||
- **Performance Scaling** - Caching, optimization, and load handling
|
||||
- **Service Integration** - Third-party APIs and microservices
|
||||
- **Monitoring & Logging** - Observability and debugging infrastructure
|
||||
|
||||
### Architecture Workflow (`--persona architect` or auto-detected)
|
||||
- **System Design** - High-level architecture and service boundaries
|
||||
- **Technology Stack** - Framework and tool selection rationale
|
||||
- **Scalability Planning** - Growth considerations and bottleneck prevention
|
||||
- **Security Architecture** - Comprehensive security strategy
|
||||
- **Integration Patterns** - Service communication and data flow
|
||||
- **DevOps Strategy** - CI/CD pipeline and infrastructure as code
|
||||
|
||||
### Security Workflow (`--persona security` or auto-detected)
|
||||
- **Threat Modeling** - Security risk assessment and attack vectors
|
||||
- **Data Protection** - Encryption, privacy, and compliance requirements
|
||||
- **Authentication Strategy** - User identity and access management
|
||||
- **Security Testing** - Penetration testing and vulnerability assessment
|
||||
- **Compliance Validation** - Regulatory requirements (GDPR, HIPAA, etc.)
|
||||
- **Incident Response** - Security monitoring and breach protocols
|
||||
|
||||
### DevOps Workflow (`--persona devops` or auto-detected)
|
||||
- **Infrastructure Planning** - Cloud architecture and resource allocation
|
||||
- **CI/CD Pipeline** - Automated testing, building, and deployment
|
||||
- **Environment Management** - Development, staging, and production environments
|
||||
- **Monitoring Strategy** - Application and infrastructure monitoring
|
||||
- **Backup & Recovery** - Data protection and disaster recovery planning
|
||||
- **Performance Monitoring** - APM tools and performance optimization
|
||||
|
||||
## Output Formats
|
||||
|
||||
### Roadmap Format (`--output roadmap`)
|
||||
```
|
||||
# Feature Implementation Roadmap
|
||||
## Phase 1: Foundation (Week 1-2)
|
||||
- [ ] Architecture design and technology selection
|
||||
- [ ] Database schema design and setup
|
||||
- [ ] Basic project structure and CI/CD pipeline
|
||||
|
||||
## Phase 2: Core Implementation (Week 3-6)
|
||||
- [ ] API development and authentication
|
||||
- [ ] Frontend components and user interface
|
||||
- [ ] Integration testing and security validation
|
||||
|
||||
## Phase 3: Enhancement & Launch (Week 7-8)
|
||||
- [ ] Performance optimization and load testing
|
||||
- [ ] User acceptance testing and bug fixes
|
||||
- [ ] Production deployment and monitoring setup
|
||||
```
|
||||
|
||||
### Tasks Format (`--output tasks`)
|
||||
```
|
||||
# Implementation Tasks
|
||||
## Epic: User Authentication System
|
||||
### Story: User Registration
|
||||
- [ ] Design registration form UI components
|
||||
- [ ] Implement backend registration API
|
||||
- [ ] Add email verification workflow
|
||||
- [ ] Create user onboarding flow
|
||||
|
||||
### Story: User Login
|
||||
- [ ] Design login interface
|
||||
- [ ] Implement JWT authentication
|
||||
- [ ] Add password reset functionality
|
||||
- [ ] Set up session management
|
||||
```
|
||||
|
||||
### Detailed Format (`--output detailed`)
|
||||
```
|
||||
# Detailed Implementation Workflow
|
||||
## Task: Implement User Registration API
|
||||
**Persona**: Backend Developer
|
||||
**Estimated Time**: 8 hours
|
||||
**Dependencies**: Database schema, authentication service
|
||||
**MCP Context**: Express.js patterns, security best practices
|
||||
|
||||
### Implementation Steps:
|
||||
1. **Setup API endpoint** (1 hour)
|
||||
- Create POST /api/register route
|
||||
- Add input validation middleware
|
||||
|
||||
2. **Database integration** (2 hours)
|
||||
- Implement user model
|
||||
- Add password hashing
|
||||
|
||||
3. **Security measures** (3 hours)
|
||||
- Rate limiting implementation
|
||||
- Input sanitization
|
||||
- SQL injection prevention
|
||||
|
||||
4. **Testing** (2 hours)
|
||||
- Unit tests for registration logic
|
||||
- Integration tests for API endpoint
|
||||
|
||||
### Acceptance Criteria:
|
||||
- [ ] User can register with email and password
|
||||
- [ ] Passwords are properly hashed
|
||||
- [ ] Email validation is enforced
|
||||
- [ ] Rate limiting prevents abuse
|
||||
```
|
||||
|
||||
## Advanced Features
|
||||
|
||||
### Dependency Analysis
|
||||
- **Internal Dependencies** - Identify coupling between components and features
|
||||
- **External Dependencies** - Map third-party services and APIs
|
||||
- **Technical Dependencies** - Framework versions, database requirements
|
||||
- **Team Dependencies** - Cross-team coordination requirements
|
||||
- **Infrastructure Dependencies** - Cloud services, deployment requirements
|
||||
|
||||
### Risk Assessment & Mitigation
|
||||
- **Technical Risks** - Complexity, performance, and scalability concerns
|
||||
- **Timeline Risks** - Dependency bottlenecks and resource constraints
|
||||
- **Security Risks** - Data protection and compliance vulnerabilities
|
||||
- **Business Risks** - Market changes and requirement evolution
|
||||
- **Mitigation Strategies** - Fallback plans and alternative approaches
|
||||
|
||||
### Parallel Work Stream Identification
|
||||
- **Independent Components** - Features that can be developed simultaneously
|
||||
- **Shared Dependencies** - Common components requiring coordination
|
||||
- **Critical Path Analysis** - Bottlenecks that block other work
|
||||
- **Resource Allocation** - Team capacity and skill distribution
|
||||
- **Communication Protocols** - Coordination between parallel streams
|
||||
|
||||
## Integration Ecosystem
|
||||
|
||||
### SuperClaude Framework Integration
|
||||
- **Command Coordination**: Orchestrate other SuperClaude commands for comprehensive workflow workflows
|
||||
- **Session Management**: Deep integration with session lifecycle and persistence for workflow continuity
|
||||
- **Quality Framework**: Integration with comprehensive quality assurance systems for workflow validation
|
||||
- **Knowledge Management**: Coordinate with knowledge capture and retrieval systems for workflow insights
|
||||
|
||||
### External System Integration
|
||||
- **Version Control**: Deep integration with Git and version management systems for workflow tracking
|
||||
- **CI/CD Systems**: Coordinate with continuous integration and deployment pipelines for workflow validation
|
||||
- **Project Management**: Integration with project tracking and management tools for workflow coordination
|
||||
- **Documentation Systems**: Coordinate with documentation generation and maintenance for workflow persistence
|
||||
|
||||
### Brainstorm Command Integration
|
||||
- **Natural Input**: Workflow receives PRDs and briefs generated by `/sc:brainstorm`
|
||||
- **Pipeline Position**: Brainstorm discovers requirements → Workflow plans implementation
|
||||
- **Context Flow**: Inherits discovered constraints, stakeholders, and decisions from brainstorm
|
||||
- **Typical Usage**:
|
||||
```bash
|
||||
# After brainstorming session:
|
||||
/sc:brainstorm "project idea" --prd
|
||||
# Workflow takes the generated PRD:
|
||||
/sc:workflow ClaudeDocs/PRD/project-prd.md --strategy systematic
|
||||
```
|
||||
|
||||
### TodoWrite Integration
|
||||
- Automatically creates session tasks for immediate next steps
|
||||
- Provides progress tracking throughout workflow execution
|
||||
- Links workflow phases to actionable development tasks
|
||||
|
||||
### Task Command Integration
|
||||
- Converts workflow into hierarchical project tasks (`/sc:task`)
|
||||
- Enables cross-session persistence and progress tracking
|
||||
- Supports complex orchestration with `/sc:spawn`
|
||||
|
||||
### Implementation Command Integration
|
||||
- Seamlessly connects to `/sc:implement` for feature development
|
||||
- Provides context-aware implementation guidance
|
||||
- Auto-activates appropriate personas for each workflow phase
|
||||
|
||||
### Analysis Command Integration
|
||||
- Leverages `/sc:analyze` for codebase assessment
|
||||
- Integrates existing code patterns into workflow planning
|
||||
- Identifies refactoring opportunities and technical debt
|
||||
|
||||
## Customization & Extension
|
||||
|
||||
### Advanced Configuration
|
||||
- **Strategy Customization**: Customize workflow execution strategies for specific contexts
|
||||
- **Persona Configuration**: Configure persona activation and coordination patterns for workflows
|
||||
- **MCP Server Preferences**: Customize server selection and usage patterns for workflow analysis
|
||||
- **Quality Gate Configuration**: Customize validation criteria and thresholds for workflows
|
||||
|
||||
### Extension Mechanisms
|
||||
- **Custom Strategy Plugins**: Extend with custom workflow execution strategies
|
||||
- **Persona Extensions**: Add custom domain expertise and coordination patterns for workflows
|
||||
- **Integration Extensions**: Extend integration capabilities with external workflow systems
|
||||
- **Workflow Extensions**: Add custom workflow workflow patterns and orchestration logic
|
||||
|
||||
## Success Metrics & Analytics
|
||||
|
||||
### Comprehensive Metrics
|
||||
- **Execution Success Rate**: >90% successful completion for complex workflow operations
|
||||
- **Quality Achievement**: >95% compliance with quality gates and workflow standards
|
||||
- **Performance Targets**: Meeting specified performance benchmarks consistently for workflows
|
||||
- **User Satisfaction**: >85% satisfaction with outcomes and process quality for workflow management
|
||||
- **Integration Success**: >95% successful coordination across all integrated systems for workflows
|
||||
|
||||
### Analytics & Reporting
|
||||
- **Performance Analytics**: Detailed performance tracking and optimization recommendations for workflows
|
||||
- **Quality Analytics**: Comprehensive quality metrics and improvement suggestions for workflow management
|
||||
- **Resource Analytics**: Resource utilization analysis and optimization opportunities for workflows
|
||||
- **Outcome Analytics**: Success pattern analysis and predictive insights for workflow execution
|
||||
|
||||
## Examples
|
||||
|
||||
### Comprehensive Project Analysis
|
||||
```
|
||||
/sc:workflow "enterprise-system-prd.md" --strategy systematic --depth deep --validate --mcp-routing
|
||||
# Comprehensive analysis with full orchestration capabilities
|
||||
```
|
||||
|
||||
### Agile Multi-Sprint Coordination
|
||||
```
|
||||
/sc:workflow "feature-backlog-requirements" --strategy agile --parallel --cross-session
|
||||
# Agile coordination with cross-session persistence
|
||||
```
|
||||
|
||||
### Enterprise-Scale Operation
|
||||
```
|
||||
/sc:workflow "digital-transformation-prd.md" --strategy enterprise --wave-mode --all-personas
|
||||
# Enterprise-scale coordination with full persona orchestration
|
||||
```
|
||||
|
||||
### Complex Integration Project
|
||||
```
|
||||
/sc:workflow "microservices-integration-spec" --depth deep --parallel --validate --sequential
|
||||
# Complex integration with sequential thinking and validation
|
||||
```
|
||||
|
||||
### Generate Workflow from PRD File
|
||||
```
|
||||
/sc:workflow docs/feature-100-prd.md --strategy systematic --c7 --sequential --estimate
|
||||
```
|
||||
|
||||
### Create Frontend-Focused Workflow
|
||||
```
|
||||
/sc:workflow "User dashboard with real-time analytics" --persona frontend --magic --output detailed
|
||||
```
|
||||
|
||||
### MVP Planning with Risk Assessment
|
||||
```
|
||||
/sc:workflow user-authentication-system --strategy mvp --risks --parallel --milestones
|
||||
```
|
||||
|
||||
### Backend API Workflow with Dependencies
|
||||
```
|
||||
/sc:workflow payment-processing-api --persona backend --dependencies --c7 --output tasks
|
||||
```
|
||||
|
||||
### Full-Stack Feature Workflow
|
||||
```
|
||||
/sc:workflow social-media-integration --all-mcp --sequential --parallel --estimate --output roadmap
|
||||
```
|
||||
|
||||
## Boundaries
|
||||
|
||||
**This advanced command will:**
|
||||
- Orchestrate complex multi-domain workflow operations with expert coordination
|
||||
- Provide sophisticated analysis and strategic workflow planning capabilities
|
||||
- Coordinate multiple MCP servers and personas for optimal workflow outcomes
|
||||
- Maintain cross-session persistence and progressive enhancement for workflow continuity
|
||||
- Apply comprehensive quality gates and validation throughout workflow execution
|
||||
- Analyze Product Requirements Documents with comprehensive workflow generation
|
||||
- Generate structured implementation workflows with expert guidance and orchestration
|
||||
- Map dependencies and risks with automated task orchestration capabilities
|
||||
|
||||
**This advanced command will not:**
|
||||
- Execute without proper analysis and planning phases for workflow management
|
||||
- Operate without appropriate error handling and recovery mechanisms for workflows
|
||||
- Proceed without stakeholder alignment and clear success criteria for workflow completion
|
||||
- Compromise quality standards for speed or convenience in workflow execution
|
||||
|
||||
---
|
||||
|
||||
## Quality Gates and Validation
|
||||
|
||||
### Workflow Completeness Check
|
||||
- **Requirements Coverage** - Ensure all PRD requirements are addressed
|
||||
- **Acceptance Criteria** - Validate testable success criteria
|
||||
- **Technical Feasibility** - Assess implementation complexity and risks
|
||||
- **Resource Alignment** - Match workflow to team capabilities and timeline
|
||||
|
||||
### Best Practices Validation
|
||||
- **Architecture Patterns** - Ensure adherence to established patterns
|
||||
- **Security Standards** - Validate security considerations at each phase
|
||||
- **Performance Requirements** - Include performance targets and monitoring
|
||||
- **Maintainability** - Plan for long-term code maintenance and updates
|
||||
|
||||
### Stakeholder Alignment
|
||||
- **Business Requirements** - Ensure business value is clearly defined
|
||||
- **Technical Requirements** - Validate technical specifications and constraints
|
||||
- **Timeline Expectations** - Realistic estimation and milestone planning
|
||||
- **Success Metrics** - Define measurable outcomes and KPIs
|
||||
|
||||
## Performance Optimization
|
||||
|
||||
### Workflow Generation Speed
|
||||
- **PRD Parsing** - Efficient document analysis and requirement extraction
|
||||
- **Pattern Recognition** - Rapid identification of common implementation patterns
|
||||
- **Template Application** - Reusable workflow templates for common scenarios
|
||||
- **Incremental Generation** - Progressive workflow refinement and optimization
|
||||
|
||||
### Context Management
|
||||
- **Memory Efficiency** - Optimal context usage for large PRDs
|
||||
- **Caching Strategy** - Reuse analysis results across similar workflows
|
||||
- **Progressive Loading** - Load workflow details on-demand
|
||||
- **Compression** - Efficient storage and retrieval of workflow data
|
||||
|
||||
## Success Metrics
|
||||
|
||||
### Workflow Quality
|
||||
- **Implementation Success Rate** - >90% successful feature completion following workflows
|
||||
- **Timeline Accuracy** - <20% variance from estimated timelines
|
||||
- **Requirement Coverage** - 100% PRD requirement mapping to workflow tasks
|
||||
- **Stakeholder Satisfaction** - >85% satisfaction with workflow clarity and completeness
|
||||
|
||||
### Performance Targets
|
||||
- **Workflow Generation** - <30 seconds for standard PRDs
|
||||
- **Dependency Analysis** - <60 seconds for complex systems
|
||||
- **Risk Assessment** - <45 seconds for comprehensive evaluation
|
||||
- **Context Integration** - <10 seconds for MCP server coordination
|
||||
|
||||
## Claude Code Integration
|
||||
- **Multi-Tool Orchestration** - Coordinates Read, Write, Edit, Glob, Grep for comprehensive analysis
|
||||
- **Progressive Task Creation** - Uses TodoWrite for immediate next steps and Task for long-term planning
|
||||
- **MCP Server Coordination** - Intelligent routing to Context7, Sequential, and Magic based on workflow needs
|
||||
- **Cross-Command Integration** - Seamless handoff to implement, analyze, design, and other SuperClaude commands
|
||||
- **Evidence-Based Planning** - Maintains audit trail of decisions and rationale throughout workflow generation
|
||||
Reference in New Issue
Block a user