šØ EXECUTION NOTICE FOR CLAUDE
When you invoke this command via SlashCommand, the system returns THESE INSTRUCTIONS below.
YOU are the executor. This is NOT an autonomous subprocess.
- ā
The phases below are YOUR execution checklist
- ā
YOU must run each phase immediately using tools (Bash, Read, Write, Edit, TodoWrite)
- ā
Complete ALL phases before considering this command done
- ā DON't wait for "the command to complete" - YOU complete it by executing the phases
- ā DON't treat this as status output - it IS your instruction set
Immediately after SlashCommand returns, start executing Phase 0, then Phase 1, etc.
See @CLAUDE.md section "SlashCommand Execution - YOU Are The Executor" for detailed explanation.
Available Skills
This commands has access to the following skills from the iterate plugin:
- sync-patterns: Compare specs with implementation state, update spec status, and generate sync reports. Use when syncing specs, checking implementation status, marking tasks complete, generating sync reports, or when user mentions spec sync, status updates, or implementation tracking.
To use a skill:
!{skill skill-name}
Use skills when you need:
- Domain-specific templates and examples
- Validation scripts and automation
- Best practices and patterns
- Configuration generators
Skills provide pre-built resources to accelerate your work.
Security Requirements
CRITICAL: All generated files must follow security rules:
@docs/security/SECURITY-RULES.md
Key requirements:
- Never hardcode API keys or secrets
- Use placeholders:
your_service_key_here
- Protect
.env files with .gitignore
- Create
.env.example with placeholders only
- Document key acquisition for users
Arguments: $ARGUMENTS
Goal: Enhance existing features by adding improvements, optimizations, and refinements to make them more robust, performant, and user-friendly.
Core Principles:
- Understand existing implementation before enhancing
- Identify meaningful improvement opportunities
- Maintain backward compatibility when possible
- Test enhancements thoroughly before completion
Phase 1: Discovery
Goal: Identify the feature to enhance and gather context
Actions:
- Parse $ARGUMENTS for feature name/path
- If $ARGUMENTS is unclear, use AskUserQuestion to gather:
- What feature should be enhanced?
- What aspects need improvement (performance, UX, reliability)?
- Are there any specific constraints or requirements?
- Locate feature files using Glob
- Example: !{bash find . -name "$ARGUMENTS" -type f 2>/dev/null | head -20}
Phase 2: Analysis
Goal: Understand current implementation
Actions:
- Load the feature's main files identified
- Read related configuration, tests, and documentation
- Understand the feature's purpose, dependencies, and usage patterns
- Document current state and limitations
Phase 3: Enhancement Planning
Goal: Identify improvement opportunities
Actions:
- Review code for optimization opportunities
- Identify edge cases not currently handled
- Look for performance bottlenecks
- Consider UX improvements
- Check for missing error handling
- Present enhancement plan to user for confirmation
Phase 4: Implementation
Goal: Execute enhancements with agent
Actions:
Task(description="Enhance feature", subagent_type="iterate:feature-enhancer", prompt="You are the feature-enhancer agent. Enhance the feature: $ARGUMENTS.
Context: You have analyzed the existing implementation and identified enhancement opportunities.
Your responsibilities:
- Add performance optimizations where beneficial
- Improve error handling and edge case coverage
- Enhance user experience and usability
- Add helpful logging or debugging aids
- Improve code clarity and maintainability
- Update or add relevant tests
- Maintain backward compatibility unless explicitly instructed otherwise
Enhancement guidelines:
- Make incremental, well-tested improvements
- Follow existing code patterns and conventions
- Add comments explaining non-obvious enhancements
- Update documentation if behavior changes
- Ensure all enhancements are tested
Deliverable: Enhanced feature with improvements implemented, tested, and documented")
Phase 5: Verification
Goal: Validate enhancements work correctly
Actions:
- Run tests if they exist
- Example: !{bash npm test 2>/dev/null || pytest 2>/dev/null || echo "No tests found"}
- Run type checking if applicable
- Example: !{bash npm run typecheck 2>/dev/null || mypy . 2>/dev/null || echo "No type checking"}
- Verify the feature still works as expected
- Check for any breaking changes
Phase 6: Summary
Goal: Document completed enhancements
Actions:
- Summarize all improvements made:
- Performance optimizations applied
- New edge cases handled
- UX improvements added
- Code quality enhancements
- List files modified
- Note any breaking changes or migration steps needed
- Suggest follow-up enhancements if applicable