.cursor/skills/xfi-execute-plan/SKILL.md
Guide for executing engineering plans through coordinated subagent work. Use when executing existing plans from knowledge/plans/ directory.
npx skillsauth add zotoio/x-fidelity xfi-execute-planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill guides the xfi-planner agent through executing comprehensive engineering plans by coordinating subagents.
knowledge/plans/[yyyymmdd]-[feature-name]/┌─────────────────────────────────────────────────────────────┐
│ 1. Load and analyze plan index and subtask files │
├─────────────────────────────────────────────────────────────┤
│ 2. USER STOP: Confirm execution summary │
├─────────────────────────────────────────────────────────────┤
│ 3. Execute subtasks per dependency graph │
├─────────────────────────────────────────────────────────────┤
│ 4. Capture and review results from each subagent │
├─────────────────────────────────────────────────────────────┤
│ 5. Update index with progress │
├─────────────────────────────────────────────────────────────┤
│ 6. Verify all subtasks and DoD complete │
├─────────────────────────────────────────────────────────────┤
│ 7. Final review (code, design, tests) │
├─────────────────────────────────────────────────────────────┤
│ 8. USER STOP: Review and approve changes │
├─────────────────────────────────────────────────────────────┤
│ 9. Documentation and knowledge capture │
├─────────────────────────────────────────────────────────────┤
│ 10. Mark plan completed │
└─────────────────────────────────────────────────────────────┘
knowledge/plans/STOP and present execution summary:
## Plan Execution Summary
### Plan: [Feature Name]
**Directory**: `knowledge/plans/[yyyymmdd]-[feature-name]/`
**Status**: Ready for Execution
### Execution Phases
#### Phase 1 (Parallel)
| Subtask | File | Subagent | Deliverables |
|---------|------|----------|--------------|
| 01 | subtask-01-... | xfi-engineer | [Brief summary] |
| 02 | subtask-02-... | xfi-engineer | [Brief summary] |
#### Phase 2 (After Phase 1)
| Subtask | File | Subagent | Deliverables |
|---------|------|----------|--------------|
| 03 | subtask-03-... | xfi-engineer | [Brief summary] |
### Total Work
- Subtasks: [N]
- Subagent invocations: [N]
- Parallel phases: [N]
- Sequential phases: [N]
### Risk Factors
- [Any identified risks from plan]
---
Proceed with execution? (yes/no)
Wait for user confirmation before proceeding.
For subtasks that can run in parallel (no dependencies on each other):
Invoke multiple subagents simultaneously:
For each subtask in current phase:
Invoke [assigned-subagent] with:
"Execute the engineering task defined in this subtask file:
**Subtask File**: knowledge/plans/[plan-dir]/[subtask-file].md
**IMPORTANT INSTRUCTIONS**:
1. Read the subtask file carefully
2. Implement all deliverables listed
3. Follow the testing strategy (NO global tests)
4. Update the 'Execution Notes' section in the subtask file when done
5. Report back with summary of work completed
**Constraints**:
- Only modify files related to this subtask
- Do NOT run global test suites
- Create targeted tests for your changes
- Skip test execution if files may be modified by parallel agents
When complete, update the subtask file's Execution Notes section with:
- Agent session info
- Work log
- Any blockers encountered
- List of files modified"
For subtasks with dependencies:
After each subagent completes:
## Completion Checklist
- [x] Subtask 01: Completed - [brief summary]
- [x] Subtask 02: Completed - [brief summary]
- [ ] Subtask 03: In Progress
Read the subtask's execution notes:
If a subtask reports blockers:
## Execution Notes
### Phase 1 Completed: [timestamp]
- Subtask 01: [summary of changes]
- Subtask 02: [summary of changes]
### Phase 2 Completed: [timestamp]
- Subtask 03: [summary of changes]
### Issues Encountered
- [Issue 1]: [How it was resolved]
After all subtasks complete, verify:
If any items incomplete:
Re-invoke the relevant subagent:
"The subtask at [path] has incomplete items:
Incomplete deliverables:
- [List unchecked items]
Please complete these items and update the execution notes."
Loop until all complete.
Invoke reviewers in parallel:
Invoke xfi-code-reviewer subagent with:
"Perform a comprehensive code review of all changes from plan execution:
Plan: knowledge/plans/[plan-dir]/
Files modified (from subtask execution notes):
[Aggregate list of all modified files]
Review for:
1. Code quality and patterns
2. Error handling
3. Type safety
4. Security concerns
5. Test coverage
Provide a review report with any issues found."
Invoke xfi-system-design subagent with:
"Review the implemented changes for architectural consistency:
Plan: knowledge/plans/[plan-dir]/
Files modified (from subtask execution notes):
[Aggregate list of all modified files]
Review for:
1. Alignment with original design
2. Package boundary adherence
3. Pattern consistency
4. Any architectural concerns
Provide a review report."
Invoke xfi-testing-expert subagent with:
"Verify test coverage and run the global test suite:
Plan: knowledge/plans/[plan-dir]/
Files modified (from subtask execution notes):
[Aggregate list of all modified files]
Tasks:
1. Verify all new code has tests
2. Run global test suite: yarn test
3. Fix any failing tests
4. Report coverage status
Continue until all tests pass."
If reviewers find issues:
## Completion Checklist
- [x] Subtask 01: Completed
- [x] Subtask 02: Completed
- [x] Subtask 03: Completed
- [x] Final code review: Passed - [summary]
- [x] Final architecture review: Passed - [summary]
- [x] Global tests verified: All passing
STOP and present for user approval:
## Plan Execution Complete - Awaiting Review
### Plan: [Feature Name]
### Summary of Changes
#### Files Modified
[Aggregate list from all subtasks]
#### Key Accomplishments
1. [Major accomplishment 1]
2. [Major accomplishment 2]
3. [Major accomplishment 3]
### Review Status
- Code Review: PASSED
- Architecture Review: PASSED
- Test Suite: ALL PASSING
### Issues Resolved During Execution
- [Issue 1]: [Resolution]
### Pending Actions (after your approval)
1. Documentation update by xfi-docs-expert
2. Knowledge capture by xfi-system-design
---
Please review the changes. When satisfied, confirm to proceed with documentation and finalization.
Wait for user approval.
After user approval, invoke in parallel:
Invoke xfi-docs-expert subagent with:
"Update documentation for the completed plan:
Plan: knowledge/plans/[plan-dir]/
Changes implemented:
[Summary of all changes]
Tasks:
1. Update README.md if needed
2. Update website docs if user-facing changes
3. Update any affected package documentation
4. Update CHANGELOG if applicable
Report what was updated."
Invoke xfi-system-design subagent with:
"Capture knowledge from the completed plan:
Plan: knowledge/plans/[plan-dir]/
Tasks:
1. Update architecture documentation if patterns changed
2. Add learnings to knowledge/ directory
3. Update any affected design documents
4. Note any patterns for future reference
Report what was captured."
Update the index file:
## Status
Completed
## Completion Summary
- **Started**: [timestamp]
- **Completed**: [timestamp]
- **Subtasks Executed**: [N]
- **Files Modified**: [N]
- **Tests Added**: [N]
## Final Documentation
- README updates: [Yes/No - summary]
- Website updates: [Yes/No - summary]
- Knowledge captured: [Yes/No - summary]
## Lessons Learned
- [Lesson 1]
- [Lesson 2]
Notify user:
## Plan Completed Successfully
### Plan: [Feature Name]
**Status**: COMPLETED
### Final Summary
- All [N] subtasks completed
- [N] files modified
- All tests passing
- Documentation updated
- Knowledge captured
The plan has been marked complete. All changes are in place.
Use this template in the index file:
## Execution Progress
| Phase | Subtask | Status | Started | Completed | Notes |
|-------|---------|--------|---------|-----------|-------|
| 1 | 01 | Completed | [time] | [time] | [notes] |
| 1 | 02 | Completed | [time] | [time] | [notes] |
| 2 | 03 | In Progress | [time] | - | [notes] |
| 3 | 04 | Pending | - | - | - |
documentation
Guide for managing X-Fidelity releases using the unified release system. Use when releasing, versioning, troubleshooting release issues, or writing commit messages.
development
Guide for updating X-Fidelity documentation including README and website. Use when updating docs, adding new features to documentation, or ensuring docs stay in sync with code.
tools
Guide for debugging X-Fidelity analysis issues. Use when troubleshooting analysis failures, rule evaluation problems, VSCode extension issues, or unexpected results.
development
End-to-end guide for creating a new X-Fidelity analysis rule. Use when creating rules, adding new checks, or when the user asks about rule development.