2025-06-25 16:51:53 +02:00
|
|
|
**Purpose**: Evidence-based enhancement and optimization
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
@include shared/universal-constants.yml#Universal_Legend
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-25 00:21:27 +02:00
|
|
|
## Command Execution
|
|
|
|
|
Execute: immediate. --plan→show plan first
|
|
|
|
|
Legend: Generated based on symbols used in command
|
|
|
|
|
Purpose: "[Action][Subject] in $ARGUMENTS"
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-25 00:21:27 +02:00
|
|
|
Systematically improve code quality, performance, and architecture in $ARGUMENTS using best practices and optimization techniques.
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
@include shared/flag-inheritance.yml#Universal_Always
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
Examples:
|
|
|
|
|
- `/improve --quality` - Code quality improvements
|
|
|
|
|
- `/improve --perf --iterate` - Performance optimization
|
|
|
|
|
- `/improve --arch --think-hard` - Architecture refactoring
|
2025-06-22 14:02:49 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
## Command-Specific Flags
|
|
|
|
|
--quality: "Code quality improvements (readability, maintainability, DRY)"
|
|
|
|
|
--perf: "Performance optimizations (algorithms, caching, queries)"
|
|
|
|
|
--arch: "Architecture improvements (patterns, coupling, scalability)"
|
|
|
|
|
--refactor: "Safe refactoring preserving behavior"
|
|
|
|
|
--iterate: "Iterative improvement until threshold met"
|
|
|
|
|
--threshold: "Quality threshold (low|medium|high|perfect)"
|
|
|
|
|
--metrics: "Show before/after metrics"
|
|
|
|
|
--safe: "Conservative mode - only safe changes"
|
2025-06-22 14:02:49 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
## Improvement Categories
|
2025-06-22 14:02:49 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**Code Quality:** Naming clarity | Function extraction | Duplication removal | Complexity reduction | Error handling | Type safety
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**Performance:** Algorithm optimization | Query optimization | Caching strategies | Lazy loading | Memory efficiency | Parallel processing
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**Architecture:** Design patterns | Dependency injection | Layer separation | Module boundaries | API design | Scalability patterns
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**Maintainability:** Documentation | Test coverage | Configuration extraction | Magic number removal | Dead code elimination
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
## Improvement Process
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**1. Analysis:** Current state assessment | Identify improvement areas | Prioritize by impact | Set measurable goals
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**2. Planning:** Safe refactoring path | Preserve functionality | Incremental changes | Rollback strategy
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**3. Implementation:** Small atomic changes | Continuous testing | Performance monitoring | Code review ready
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**4. Validation:** Behavior preservation | Performance gains | Quality metrics | Regression testing
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
@include shared/quality-patterns.yml#Code_Quality_Metrics
|
2025-06-24 21:24:14 +02:00
|
|
|
|
|
|
|
|
## Deliverables
|
|
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**Improved Code:** Refactored files | Preserved functionality | Enhanced quality | Better performance
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**Improvement Report:** Before/after metrics | Changes summary | Performance gains | Quality improvements
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-24 22:46:52 +02:00
|
|
|
**Documentation:** Refactoring decisions | Architecture changes | Performance optimizations | Future recommendations
|
2025-06-24 21:24:14 +02:00
|
|
|
|
2025-06-25 00:21:27 +02:00
|
|
|
@include shared/universal-constants.yml#Standard_Messages_Templates
|