Create comprehensive implementation plans with detailed file-level changes and test strategies
Creates comprehensive implementation plans with detailed file-level changes and test strategies
npx claudepluginhub synthesys-lab/agentizeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
This skill instructs AI agents on how to create comprehensive implementation plans for new features, refactoring, or bug fixes. The plan should be thorough enough to serve as a blueprint for implementation, with concrete file-level details and quantified complexity estimates.
A good plan is:
open-issue skillCRITICAL: All implementation plans MUST follow this strict ordering:
This design-first test-driven development (TDD) style ensures:
The plan-guideline skill takes the following inputs:
The AI agent MUST follow this systematic process when creating a plan:
Objective: Deeply understand what the user wants to achieve.
Actions:
AskUserQuestion if neededOutput signals:
Bug Fix-Specific Actions (conditional):
If the goal is a bug fix, attempt to reproduce the bug before designing a fix:
When to reproduce:
When to skip reproduction:
Reproduction process:
Safety rules:
cat, grep, git log, make test)Output from reproduction (include in plan if attempted):
Objective: Thoroughly explore the codebase to understand current implementation.
CRITICAL: The audit happens DURING planning, not as a step IN the plan. The plan must contain audit RESULTS, not "TODO: audit the codebase" steps.
Actions:
Glob to find relevant files by patternGrep to search for related functionalityOutput from this phase:
Example of GOOD audit results in plan:
Files to modify:
- `.claude/skills/commit-msg/SKILL.md:15-45` - Add milestone commit logic
- `tests/test_git_commit.sh:23-67` - Update test cases for milestones
Files to create:
- `docs/milestone-workflow.md` - Document milestone commit process
Example of BAD (do not include this):
1. Audit the codebase to find relevant files
2. Determine which files need changes
Objective: Design the public interfaces, APIs, and documentation changes.
Actions:
Output:
Example:
New interfaces:
- Function: `create_milestone_commit(files: list, message: str, test_status: str)`
- Config: Add `milestone.allow_no_verify` to project settings
Modified interfaces:
- Function: `git_commit()` - add optional parameter `is_milestone: bool = False`
Documentation updates:
- `docs/git-msg-tags.md:15-20` - Add milestone tag explanation
- `.claude/skills/commit-msg/SKILL.md:40-60` - Add milestone section
Objective: Design comprehensive test coverage before writing implementation code.
CRITICAL: Testing is not an afterthought. Design tests that validate:
Bug fix-specific guidance:
Actions:
Output:
Example:
Test modifications:
- `tests/test_git_commit.sh:45-67` - Update to verify milestone flag handling
- Test case: Verify `--no-verify` used only for milestone commits
- Test case: Verify milestone commit message format
New test files:
- `tests/test_milestone_workflow.sh` - Test complete milestone workflow
- Test case: Create milestone commit on dev branch (should succeed)
- Test case: Attempt milestone commit on main (should fail)
- Test case: Verify test status included in commit message
- Estimated complexity: ~80 lines
Objective: Create a step-by-step implementation plan with complexity estimates.
CRITICAL: Use lines of code (LOC) to estimate complexity, NOT time durations.
Complexity guidelines:
MANDATORY ORDERING: Implementation steps MUST follow this sequence:
Phase 1: Documentation (always first)
lol usage.docs/lol.md the old usage is in Section X, update it to the new usage for --init is for initialization and --update is for updating existing installations.Phase 2: Test Cases (always second)
Phase 3: Implementation (always last)
Actions:
Understanding Milestone Commits:
Milestone commits are for incremental progress on large features. They allow bypassing pre-commit hooks, but this does NOT mean skipping tests:
Example milestone progression:
Output format:
Step N: [Brief description] (Estimated: X LOC)
- File 1: Specific change description
- File 2: Specific change description
Dependencies: [List steps that must complete first]
Example (following Design-first TDD ordering):
Step 1: Update documentation for milestone commits (Estimated: 60 LOC)
- `docs/git-msg-tags.md:15-20` - Add milestone tag definition and usage
- `.claude/skills/commit-msg/SKILL.md:14-20` - Add milestone to inputs section
- `.claude/skills/commit-msg/SKILL.md:40-60` - Add milestone commit section with examples
Dependencies: None
Step 2: Create test cases for milestone functionality (Estimated: 90 LOC)
- `tests/test_git_commit.sh:45-67` - Add milestone flag tests
- Test: Verify `--no-verify` used only for milestone commits
- Test: Verify milestone commit message format
- `tests/test_milestone_message.sh` - New test file for message validation
- Test: Validate milestone commit on dev branch succeeds
- Test: Validate milestone commit on main fails
Dependencies: Step 1 (documentation must be complete first)
Step 3: Implement milestone detection and handling logic (Estimated: 100 LOC)
- `.claude/skills/commit-msg/SKILL.md:25-35` - Add milestone input handling
- `.claude/skills/commit-msg/SKILL.md:85-88` - Add pre-commit bypass logic
Dependencies: Step 2 (tests must exist before implementation)
Total estimated complexity: 250 LOC (Medium-Large feature)
Recommended approach: Implement in single development session
Note: Follows Design-first TDD: Docs (Step 1) → Tests (Step 2) → Implementation (Step 3)
The final plan should be structured as follows:
# Implementation Plan: [Feature/Goal Name]
## Goal
[1-2 sentence problem statement]
**Success criteria:**
- [Criterion 1]
- [Criterion 2]
**Out of scope:**
- [What we're not doing]
## Bug Reproduction
*(Optional - include only for bug fixes where reproduction was attempted)*
**Steps tried:**
- [Command or action performed]
- [Files examined]
**Observed symptoms:**
- [Error messages, test failures, unexpected behavior]
**Environment snapshot:**
- [Relevant file state, dependencies, configuration]
**Root cause hypothesis:**
- [Diagnosis based on observations]
**Skip reason** *(if reproduction not attempted)*:
- [Why reproduction was skipped - e.g., trivial fix, already has failing test, unsafe to run]
**Unreproducible constraints** *(if reproduction failed)*:
- [What was tried and why it didn't reproduce]
- [Hypothesis for proceeding without reproduction]
## Codebase Analysis
**Files to modify:**
- `path/to/file1:lines` - Purpose
- `path/to/file2:lines` - Purpose
**Files to create:**
- `path/to/new/file1` - Purpose (Estimated: X LOC)
- `path/to/new/file2` - Purpose (Estimated: X LOC)
**Files to delete:**
- `path/to/deprecated/file` - Reason
**Current architecture notes:**
[Key observations about existing code]
## Interface Design
**New interfaces:**
- [Interface signatures and descriptions]
**Modified interfaces:**
- [Before/after comparisons]
**Documentation changes:**
- [Doc files to update with sections]
## Test Strategy
**Test modifications:**
- `test/file1:lines` - What to test
- Test case: Description
- Test case: Description
**New test files:**
- `test/new_file` - Purpose (Estimated: X LOC)
- Test case: Description
- Test case: Description
**Test data required:**
- [Fixtures, sample data, etc.]
## Implementation Steps
**Step 1: [Description]** (Estimated: X LOC)
- File changes
Dependencies: None
**Step 2: [Description]** (Estimated: X LOC)
- File changes
Dependencies: Step 1
...
**Total estimated complexity:** X LOC ([Complexity level])
**Recommended approach:** [Single session / Milestone commits / etc.]
After creating a plan, the AI agent should:
Present to user for approval
Create GitHub issue (once approved)
open-issue skill[plan][tag] prefixBegin implementation (after issue created)
fork-dev-branch skill to create a development branchcommit-msg skill for commits (milestone commits if needed)open-pr skill when implementation is completeUser request: "Add support for milestone commits in the commit-msg skill"
Plan excerpt:
# Implementation Plan: Milestone Commit Support
## Goal
Add milestone commit functionality to allow work-in-progress commits that can
bypass pre-commit hooks on development branches.
**Success criteria:**
- Milestone commits work only on development branches (not main)
- Milestone commits include test status in message
- Pre-commit hooks can be bypassed with explicit milestone flag
**Out of scope:**
- Automatic milestone detection
- Milestone progress tracking UI
## Codebase Analysis
**Files to modify:**
- `.claude/skills/commit-msg/SKILL.md:14-20` - Add milestone input handling
- `.claude/skills/commit-msg/SKILL.md:40-88` - Add milestone message format
- `tests/test_git_commit.sh:45-67` - Add milestone tests
**Files to create:**
- None required
**Current architecture notes:**
- Commit skill currently supports only delivery commits
- Pre-commit hook validation is mandatory for all commits
- Branch detection logic already exists in workflow
## Implementation Steps
**Step 1: Update documentation** (Estimated: 60 LOC)
- `docs/git-msg-tags.md:15-20` - Add milestone tag definition and usage rules
- `.claude/skills/commit-msg/SKILL.md:14-20` - Add milestone to inputs section
- `.claude/skills/commit-msg/SKILL.md:40-60` - Add milestone message format section
Dependencies: None
**Step 2: Create test cases** (Estimated: 85 LOC)
- `tests/test_git_commit.sh:45-67` - Add milestone-specific tests
- Test: Milestone commits bypass hooks on dev branches
- Test: Milestone commits fail on main branch
- Test: Milestone message includes test status
- `tests/test_milestone_format.sh` - New test for message validation
Dependencies: Step 1 (documentation must define behavior first)
**Step 3: Implement milestone commit logic** (Estimated: 95 LOC)
- `.claude/skills/commit-msg/SKILL.md:25-35` - Add milestone input processing
- `.claude/skills/commit-msg/SKILL.md:85-88` - Add pre-commit bypass logic
Dependencies: Step 2 (tests must exist to validate implementation)
**Total estimated complexity:** 240 LOC (Medium feature)
**Recommended approach:** Single development session following Docs → Tests → Implementation
User request: "Refactor the SDK initialization to validate directories"
Plan excerpt:
# Implementation Plan: SDK Init Directory Validation
## Goal
Add comprehensive directory validation to SDK initialization to prevent
initialization in invalid locations and provide clear error messages.
**Success criteria:**
- Validate target directory exists and is writable
- Check for conflicting files before initialization
- Provide actionable error messages
- Support both init and update modes
**Out of scope:**
- Automatic directory creation
- Backup/rollback functionality
## Codebase Analysis
**Files to modify:**
- `Makefile:45-67` - Add validation before template copying
- `docs/lol.md:25-40` - Document validation behavior
**Files to create:**
- `scripts/validate_target_dir.sh` - Directory validation logic (Est: 120 LOC)
- `tests/test_directory_validation.sh` - Validation tests (Est: 180 LOC)
## Test Strategy
**New test files:**
- `tests/test_directory_validation.sh` (Estimated: 180 LOC)
- Test case: Valid empty directory (should pass)
- Test case: Non-existent directory (should fail with error)
- Test case: Directory with conflicting files (should fail with list)
- Test case: Non-writable directory (should fail with permission error)
- Test case: Init mode vs update mode differences
## Implementation Steps
**Step 1: Update documentation** (Estimated: 60 LOC)
- `docs/lol.md:25-40` - Document validation behavior and error messages
- `docs/lol.md:50-65` - Add examples of valid/invalid target directories
Dependencies: None
**Step 2: Create test cases** (Estimated: 180 LOC)
- `tests/test_directory_validation.sh` - New comprehensive validation test suite
- Test: Valid empty directory initialization
- Test: Non-existent directory rejection
- Test: Conflicting files detection
- Test: Permission error handling
- Test: Init vs update mode differences
Dependencies: Step 1 (documentation defines expected behavior)
**Step 3: Implement validation script** (Estimated: 120 LOC)
- `scripts/validate_target_dir.sh` - New validation script with all checks
- Directory existence check
- Write permission validation
- Conflict detection logic
- Mode-specific validation rules
Dependencies: Step 2 (tests define all edge cases)
**Step 4: Integrate validation into Makefile** (Estimated: 60 LOC)
- `Makefile:45-67` - Add validation call before template copying
- `Makefile:70-85` - Add error handling and user feedback
Dependencies: Step 3 (validation script must exist)
**Total estimated complexity:** 420 LOC (Large feature)
**Recommended approach:** Use milestone commits for incremental progress
**Milestone strategy:**
- Milestone 1 (after Step 2): Documentation and tests complete (0/5 tests pass)
- All tests exist but implementation not started yet
- Milestone 2 (after Step 3): Validation script implemented (3/5 tests pass)
- Basic validation working, edge cases still failing
- Delivery commit (after Step 4): Full integration complete (5/5 tests pass)
- All tests pass, ready for PR
**Note:** Follows Design-first TDD strictly: Docs (Step 1) → Tests (Step 2) → Implementation (Steps 3-4)
Tests are run at each milestone; failing tests are accepted temporarily as progress checkpoints.
User request: "Fix the bug where milestone commits fail on feature branches"
Plan excerpt:
# Implementation Plan: Fix Milestone Commit Branch Detection
## Goal
Fix bug where milestone commits incorrectly fail on valid feature branches due to
overly strict branch name pattern matching.
**Success criteria:**
- Milestone commits succeed on all non-main branches
- Branch name pattern accepts common formats (issue-*, feature/*, fix/*)
- Clear error message when attempted on main/master
## Bug Reproduction
**Steps tried:**
1. Created test branch: `git checkout -b issue-42-test-feature`
2. Attempted milestone commit: `claude /commit-msg milestone`
3. Observed error: "Milestone commits only allowed on development branches"
**Observed symptoms:**
- Error appears despite being on `issue-42-test-feature` branch
- Review of `.claude/skills/commit-msg/SKILL.md:78` shows pattern: `^issue-[0-9]+-.*$`
- Regex escaping issue: dash not escaped, matches any character instead of literal dash
**Environment snapshot:**
- Git branch: `issue-42-test-feature`
- Skill version: commit `a1b2c3d` (2024-01-15)
- Regex engine: bash `[[ =~ ]]` operator
**Root cause hypothesis:**
Unescaped dash in regex pattern causes false negative matches. Pattern should be
`^issue-[0-9]+-.*$` with escaped dash: `^issue-[0-9]+\-.*$`.
## Implementation Steps
**Step 1: Update documentation** (Estimated: 20 LOC)
- `docs/git-msg-tags.md:45-50` - Clarify supported branch name patterns
Dependencies: None
**Step 2: Create test case** (Estimated: 35 LOC)
- `tests/test_milestone_branches.sh` - New test for branch pattern matching
- Test: `issue-N-*` branches accept milestone commits
- Test: `feature/*` branches accept milestone commits
- Test: `main` branch rejects milestone commits
Dependencies: Step 1
**Step 3: Fix regex pattern** (Estimated: 15 LOC)
- `.claude/skills/commit-msg/SKILL.md:78` - Escape dash in regex pattern
- `.claude/skills/commit-msg/SKILL.md:80` - Add `feature/*` and `fix/*` patterns
Dependencies: Step 2
**Total estimated complexity:** 70 LOC (Small bugfix)
Use this checklist to validate plan quality before presenting to user:
Required elements:
Bug fix plans only:
Quality checks:
MANDATORY ordering - Design-first TDD: Implementation steps MUST follow this order:
NEVER put implementation before documentation or tests. This is non-negotiable.
No vague audit steps: The plan must contain concrete file names and line ranges, not "audit the codebase" tasks. Auditing happens during planning.
Quantify with LOC: Always use lines of code estimates, never time-based estimates like "2 hours" or "3 days".
Test-first mindset: Design tests before implementation details. Tests clarify requirements and prevent scope creep. Tests must exist before writing implementation.
Break down large steps: If a single step exceeds 400 LOC, break it into substeps. Consider milestone commits for features exceeding 800 LOC total.
Document interfaces early: Interface design comes before implementation planning. Changes to interfaces affect multiple files and should be designed carefully.
Use existing patterns: During audit, identify and follow existing architectural patterns and naming conventions in the codebase.
Be specific: Prefer "Modify file.py:45-67 to add parameter validation" over
"Update the validation logic". The more specific, the better.
Dependencies reflect ordering: Each step's dependencies should enforce the ordering:
Milestone commits run tests: When planning features that require milestone commits:
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill content", or needs guidance on skill structure, progressive disclosure, or skill development best practices for Claude Code plugins.