Guidelines for thoroughly validating mode changes to ensure cohesion,
consistency, and prevent contradictions across all mode components.
Every change must be reviewed in context of the entire mode
- Read all existing XML instruction files
- Verify new changes align with existing patterns
- Check for duplicate or conflicting instructions
- Ensure terminology is consistent throughout
Ask focused clarifying questions only when needed to de-risk the work
Critical details are missing (cannot proceed safely)
Multiple valid approaches exist and the tradeoffs matter
Proposed changes are risky/irreversible (permissions, deletions, broad refactors)
A change may require widening permissions or fileRegex patterns
In practice: ask a focused question with 2–4 actionable options.
Example:
- Question: "This change may affect file permissions. Should we also update the fileRegex patterns?"
- Options:
1) "Yes, include the new file types in the regex"
2) "No, keep current restrictions"
3) "I need to list the file types I’ll work with"
4) "Show me the current restrictions first"
Actively search for and resolve contradictions
Permission Mismatch
Instructions reference permissions the mode doesn't have
Either grant the permission or update the instructions
Workflow Conflicts
Different XML files describe conflicting workflows
Consolidate workflows and ensure single source of truth
Role Confusion
Mode's roleDefinition doesn't match its actual scope/permissions
Update roleDefinition to accurately reflect the mode's purpose
Before making any changes
Read and understand all existing mode files
Create a mental model of current mode behavior
Identify potential impact areas
Ask clarifying questions about intended changes
While making changes
Document each change and its rationale
Cross-reference with other files after each change
Verify examples still work with new changes
Update related documentation immediately
After changes are complete
All XML files are well-formed and valid
File naming follows established patterns
Tag names are consistent across files
No orphaned or unused instructions
roleDefinition accurately describes the mode
whenToUse is clear and distinguishable
Permissions match instruction requirements
File restrictions align with mode purpose
Examples are accurate and functional
Mode boundaries are well-defined
Handoff points to other modes are clear
No overlap with other modes' responsibilities
Orchestrator can correctly route to this mode
Maintain consistent tone and terminology
Use the same terms for the same concepts throughout
Keep instruction style consistent across files
Maintain the same level of detail in similar sections
Ensure instructions flow logically
Prerequisites come before dependent steps
Complex concepts build on simpler ones
Examples follow the explained patterns
Ensure all aspects are covered without gaps
Every mentioned concept has decision guidance (what/when) without runtime implementation details
All workflows have complete examples
Error scenarios are addressed
Before we proceed with changes, ensure the main goal is clear. Suggested options:
- Add new functionality while keeping existing features
- Fix issues with current implementation
- Refactor for better organization
- Expand the mode's scope into new areas
This change might affect other parts of the mode. Choose an approach:
- Update all affected areas to maintain consistency
- Keep the existing behavior for backward compatibility
- Create a migration path from old to new behavior
- Review the impact first
Post-change testing focus areas:
- Test the new workflow end-to-end
- Verify file permissions work correctly
- Check integration with other modes
- Review all changes one more time
Instructions reference permissions not in the mode's groups
Either add the permission group or remove/update the instruction
File regex doesn't match described file types
Update regex pattern to match intended files
Examples don't follow stated best practices
Update examples to demonstrate best practices
Duplicate instructions in different files
Consolidate to single location and reference