IMPERATIVE: Orchestrate complex workflows through slash command composition. Multi-step patterns, decision trees, and workflow automation using Claude Code command system.
- Compose Commands: Chain slash commands for complex multi-step workflows
- Decision-Driven: Use conditional logic for workflow branching
- Pattern-Based: Reusable workflow templates for systematic execution
- Reference-Based: Individual commands in
.claude/commands/contain detailed execution
/session-start- Initialize session with tools and context/session-end- Close session with memory sync and staging/context-switch- Switch between projects or contexts/emergency-restore- Recover from session/context failures
/analyze-codebase- Systematic code analysis and architecture understanding/implement-feature- 4-phase feature development with quality gates/debug-issue- Systematic debugging with root cause analysis/review-code- Self-critique review process with improvement cycle/refactor-code- Safe refactoring with regression prevention/explore-code- Code exploration for mental model building/modify-code- Symbol-based code modification with validation
/research-library-docs- Context7 documentation research for libraries/research-web- Playwright web research for live sites and demos/analyze-requirements- Requirements breakdown with decision framework/investigate-performance- Performance analysis and optimization
/assess-quality- 4-dimension quality assessment with scoring/apply-critique- Self-critique cycle for systematic improvement/validate-completion- Completion verification with readiness check
/capture-insight- High-entropy insight capture with cross-referencing/recall-context- Context restoration from distributed memory layers/sync-consciousness- Memory synchronization across all layers/clean-memory- Memory maintenance and consolidation
/test-browser- Browser testing with systematic interaction sequences/modify-code- Code modification through symbol-based editing
/recover-tool-failure- Tool failure recovery with fallback procedures/handle-context-overload- Context optimization for information overload/resolve-memory-inconsistency- Memory reconciliation across layers
1. /session-start
2. /analyze-codebase [target_area]
3. /research-library-docs [dependencies] (if needed)
4. /implement-feature [feature_name]
5. /review-code [implementation]
6. /test-browser [feature_testing] (if UI involved)
7. /validate-completion [feature]
8. /session-end
1. /debug-issue [problem_description]
2. /investigate-performance [area] (if performance-related)
3. /modify-code [fix_implementation]
4. /test-browser [validation] (if UI involved)
5. /apply-critique [fix_review]
6. /validate-completion [fix]
1. /research-library-docs [library_name]
2. /research-web [demo_sites] (if needed)
3. /analyze-requirements [integration_specs]
4. /implement-feature [integration]
5. /assess-quality [implementation]
1. /assess-quality [target_component]
2. /apply-critique [identified_issues]
3. /refactor-code [improvements] (if needed)
4. /validate-completion [improved_version]
1. /recall-context [relevant_domain]
2. [Execute main work]
3. /capture-insight [valuable_discoveries]
4. /sync-consciousness
5. /clean-memory [outdated_items] (periodic)
Need information about:
├── Library/API documentation? → /research-library-docs
├── Live website/demo functionality? → /research-web
├── Performance characteristics? → /investigate-performance
└── Requirements analysis? → /analyze-requirements
Starting development work:
├── New feature? → /implement-feature
├── Bug fix needed? → /debug-issue → /modify-code
├── Code quality issues? → /apply-critique → /refactor-code
└── Exploration needed? → /analyze-codebase → /explore-code
Quality assessment results:
├── Score ≥ 7.5? → /validate-completion
├── Score 6.0-7.4? → /apply-critique → re-assess
├── Score < 6.0? → /refactor-code → /apply-critique → re-assess
└── Critical issues? → /debug-issue → restart workflow
Encountering errors:
├── Tool failure? → /recover-tool-failure
├── Context overload? → /handle-context-overload
├── Memory inconsistency? → /resolve-memory-inconsistency
└── Session corruption? → /emergency-restore
Concurrent research workflow:
- Terminal 1: /research-library-docs [primary_library]
- Terminal 2: /research-web [competitor_analysis]
- Terminal 3: /analyze-codebase [integration_points]
→ Synthesize results → /implement-feature
Quality improvement loop:
1. /assess-quality [component]
2. If score < 7.5: /apply-critique [issues]
3. /modify-code [improvements]
4. Repeat step 1 until score ≥ 7.5
5. /validate-completion [final_version]
Based on ACTIVE_CONTEXT.md objectives:
├── Research phase? → Research Flow pattern
├── Implementation phase? → Development Flow pattern
├── Quality phase? → Quality Improvement Flow pattern
└── Completion phase? → Validation and documentation
Memory management session:
/recall-context [project] →
/capture-insight [discovery1] →
/capture-insight [discovery2] →
/sync-consciousness →
/clean-memory [obsolete]
Browser-heavy workflow:
/research-web [target_site] →
/test-browser [functionality] →
/implement-feature [ui_components] →
/test-browser [validation]
Research-heavy workflow:
/research-library-docs [lib1] →
/research-library-docs [lib2] →
/analyze-requirements [integration] →
/implement-feature [solution]
Resilient development pattern:
1. /session-start
2. Try: /implement-feature [name]
3. On failure: /recover-tool-failure → retry
4. On quality issues: /apply-critique → improve
5. On completion: /validate-completion
6. /session-end
- Identify Repetitive Sequences: Look for command combinations used frequently
- Define Decision Points: Add conditional logic for workflow branching
- Include Error Handling: Plan recovery commands for common failure modes
- Optimize for Context: Consider token efficiency and tool switching overhead
- Document Pattern: Create reusable template with parameter placeholders
### [Pattern Name] Flow
**Purpose**: [Brief description]
**Triggers**: [When to use this workflow]
**Prerequisites**: [Required context or setup]
Workflow:
1. /command1 [parameter]
2. /command2 [parameter]
3. [Conditional logic if needed]
4. /command3 [parameter]
**Success Criteria**: [How to know workflow completed successfully]
**Recovery**: [What to do if workflow fails]
Workflow Philosophy: Compose commands systematically, handle errors gracefully, optimize for efficiency Command Integration: Individual commands provide execution, workflows provide orchestration Pattern Evolution: Document successful patterns, iterate on workflow effectiveness