executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
planning-methodologyCreate minimal-change, reversible implementation plans. Transform requirements into executable blueprints emphasizing simplicity and safety.
Independent GitHub snapshot · Automated classification · Original documentation governs
This skill provides a systematic methodology for creating implementation plans that are surgical, reversible, and minimize risk while maximizing clarity.
Codex will automatically invoke this skill when:
Objective: Understand existing structure before planning changes
Actions:
Structure scan (use Glob tool):
Search patterns:
- Source files: src/**/*.{ext}
- Config files: *.config.{ext}, .{ext}rc
- Test files: **/*.test.{ext}, **/*.spec.{ext}
- Documentation: docs/*.md, README.md
Pattern recognition (use Grep + Read):
Integration point identification:
Constraint discovery:
Output:
Codebase Profile:
- Primary language: [TypeScript/Python/Go/etc.]
- Framework: [Next.js/Django/Gin/etc.]
- Structure: [src/ organization pattern]
- Test framework: [Jest/pytest/etc.]
- Key patterns: [Dependency injection / Factory / etc.]
- Integration points: [config.ts, app.ts, etc.]
Anti-stagnation: Max 90 seconds - if codebase is large, focus on areas relevant to feature only
Objective: Identify the smallest set of changes that accomplishes the goal
Questions to answer:
New vs Modify:
Reuse vs Rebuild:
Scope boundaries:
Reversibility:
Output:
Minimal Change Strategy:
- New files: [N] (primary work here)
- Modified files: [N] (minimal edits)
- Deleted files: 0 (avoid deletions, use deprecation)
- Core files touched: [N] (minimize this)
- Reversibility: [Git revert / Config toggle / Feature flag]
Principles:
Objective: Identify what could go wrong and plan mitigations
Categories of risk:
Breaking changes:
Performance risks:
Security risks:
Integration risks:
Testing gaps:
For each identified risk:
Risk: [Description]
Probability: [High/Medium/Low]
Impact: [High/Medium/Low]
Mitigation: [How to prevent]
Detection: [How we'll know if it happens]
Contingency: [What we'll do if it happens]
Anti-pattern: Don't identify risks without mitigations - every risk needs an answer
Objective: Order the work for safety and clarity
Sequencing principles:
Step structure:
Step N: [Action verb] [What]
- Task: [Detailed description]
- Files: [Which files to change]
- Code: [Specific code examples]
- Verification: [How to confirm success]
- Time estimate: [X minutes]
Verification methods:
npm test path/to/testnpm run buildnpm run test:integrationnpm run benchmark (if applicable)Total time estimate: Sum of all step estimates + 20% buffer
Objective: Ensure every change can be undone safely
Rollback mechanisms (in priority order):
Git revert (simplest):
git reset --hard [checkpoint-commit]
Good when: All changes in one commit, no DB migrations
Feature flag toggle (gradual rollout):
if (featureFlags.newFeature === true) {
// new code
} else {
// old code
}
Good when: Want to test in production, quick rollback needed
Configuration rollback: Restore previous config files Good when: Changes are mostly configuration-driven
Partial rollback: Keep working parts, revert broken parts Good when: Multiple independent changes, some work
Rollback plan must include:
Rollback triggers (when to execute rollback):
Objective: Structure all above findings into clear, executable plan
Implementation Plan Format:
# 🗺️ Implementation Plan: [Feature Name]
## Summary
[2-3 lines: what + why + approach]
## 📁 File Changes
[New: N, Modified: N, with specific purposes]
## 🔢 Implementation Steps
[Numbered steps with verification]
## 🧪 Test Plan
[Unit + integration + manual tests]
## ⚠️ Risks & Mitigations
[Each risk with mitigation and contingency]
## 🔄 Rollback Plan
[Exact rollback procedure]
## ✅ Success Criteria
[Clear definition of "done"]
Checklist before delivering:
❌ Don't:
✅ Do:
Before planning:
Read knowledge-core.md to check for:
After planning: If plan establishes new patterns, note for knowledge-core update:
New Pattern Established:
- Pattern: [Name/description]
- Context: [When to use this]
- Example: [Which files demonstrate this]
Scenario: ResearchPack ready for Redis caching, need implementation plan
Codex (using this skill):
[Internal: Need to plan Redis integration systematically]
📐 Activating planning-methodology skill
🔎 Analyzing codebase structure...
[Follows methodology: discover → analyze → assess → sequence → rollback → document]
# 🗺️ Implementation Plan: Redis Caching
## Summary
Add Redis-based caching layer to ProductService to reduce database load.
Approach: Create separate CacheService wrapper, inject into ProductService,
maintain backward compatibility via optional usage.
## 📁 File Changes (5 files)
### New Files (2)
1. `src/services/CacheService.ts` (~80 lines)
- Purpose: Redis client wrapper with get/set/del/ttl operations
- Exports: CacheService class
- Dependencies: redis@4.6.0, config
[...rest of detailed plan following format]
✅ Plan ready for implementation
This skill ensures plans are safe, minimal, clear, and executable - setting up @code-implementer for success.