From Flow
Research the codebase and author a phased implementation plan under flow/plans/ from an issue / work item or task. Explicit workflow command; run only when invoked via /create-plan or explicitly asked, never autonomously.
How this skill is triggered — by the user, by Claude, or both
Slash command
/flow:create-planopusThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are tasked with creating detailed implementation plans through an interactive, iterative process. You should be skeptical, thorough, and work collaboratively with the user to produce high-quality technical specifications.
You are tasked with creating detailed implementation plans through an interactive, iterative process. You should be skeptical, thorough, and work collaboratively with the user to produce high-quality technical specifications.
DO NOT write implementation code in the plan. This command produces a planning document, not code.
Instead, describe what each file/component should do, not how it should be coded. The actual code is written during /implement-plan.
Allowed in plans:
curl, uv run, pytest)TDD is the only way to write AI-generated code. Every phase must follow this pattern:
Phase structure must be:
Phase N: [Name]
Step 1: Write tests (describe what tests to create)
Step 2: Run tests, confirm they fail
Step 3: Implement (describe what to implement)
Step 4: Run tests, confirm they pass
Tests provide Claude with a clear, verifiable target. Without tests, there's no way to know if the implementation is correct.
When planning rename operations (directories, files, variables, modules, etc.), be extremely thorough in identifying all reference types:
For rename operations, the research phase MUST search for multiple pattern variations:
# Path references (with slash)
grep -rn "oldname/" .
# Standalone word references (word boundaries)
grep -rn "\boldname\b" .
# Hyphenated compounds
grep -rn "oldname-" .
# Descriptive text (with trailing space)
grep -rn "oldname " .
# Case-insensitive search for variations
grep -rin "oldname" . | head -100
Rename operation plans MUST explicitly enumerate ALL reference types found:
Required in "Current State Analysis":
oldname/subdir/file.txtoldname-component, oldname_functionfrom oldname import, require('oldname')Required in "Implementation Approach":
State the EXACT patterns to be used for replacement:
Phase 1: Physical Renames
- Use `git mv` for files/directories to preserve history
Phase 2: Content Updates
- Replace "oldname/" → "newname/" (path references)
- Replace "oldname " → "newname " (descriptive text with space)
- Replace "oldname-" → "newname-" (hyphenated compounds)
- Replace "\boldname\b" → "newname" (word boundaries)
- Manual review of case variations (OldName, OLDNAME, etc.)
Required in "Success Criteria":
Include comprehensive verification commands that check for ALL patterns:
# Automated Verification:
- [ ] No path references: `grep -r "oldname/" . --exclude-dir=.git | grep -v "plan\|research" | wc -l` returns 0
- [ ] No descriptive text: `grep -r "oldname " . --exclude-dir=.git | grep -v "plan\|research" | wc -l` returns 0
- [ ] No hyphenated: `grep -r "oldname-" . --exclude-dir=.git | grep -v "plan\|research" | wc -l` returns 0
- [ ] No word boundary matches: `grep -r "\boldname\b" . --exclude-dir=.git | grep -v "plan\|research" | wc -l` returns 0
- [ ] New name exists: `grep -r "newname" . --exclude-dir=.git | wc -l` returns > 0
❌ Don't use narrow patterns: s/oldname\//newname\//g only catches paths with slashes
✅ Use comprehensive patterns: Document all pattern types and verify each one
❌ Don't say: "Replace all references to oldname" ✅ Do say: "Replace ALL instances of oldname including: paths (oldname/), descriptive text (oldname directory), compound names (oldname-component), etc."
See detailed rename operation checklist: /home/jp/.claude/projects/-home-jp-developments-jp-personal-flow/memory/rename-operations.md
When this command is invoked:
Check if parameters were provided:
If no parameters provided, respond with:
I'll help you create a detailed implementation plan. Let me start by understanding what we're building.
Please provide:
1. An issue / work-item URL or id (e.g., #123 on GitHub, or an Azure DevOps work item URL)
2. Or a task description with relevant context and constraints
3. Links to related research or previous implementations
I'll analyze this information and work with you to create a comprehensive plan.
Tip: You can invoke this with an issue / work-item reference: `/create-plan #123`, a full URL like `/create-plan https://github.com/owner/repo/issues/123` (GitHub), or `/create-plan https://dev.azure.com/org/project/_workitems/edit/123` (Azure DevOps)
For deeper analysis, try: `/create-plan think deeply about #123`
Then wait for the user's input.
Fetch the work item if provided:
tracker view <id> --json title,body,state,commentstracker set-state <id> planning-in-progress research-completeRead all mentioned files immediately and FULLY:
flow/research/...)Spawn initial research tasks to gather context: Before asking the user any questions, use specialized agents to research in parallel:
These agents will:
Read all files identified by research tasks:
Analyze and verify understanding:
Present informed understanding and focused questions:
Based on the issue and my research of the codebase, I understand we need to [accurate summary].
I've found that:
- [Current implementation detail with file:line reference]
- [Relevant pattern or constraint discovered]
- [Potential complexity or edge case identified]
Questions that my research couldn't answer:
- [Specific technical question that requires human judgment]
- [Business logic clarification]
- [Design preference that affects implementation]
Only ask questions that you genuinely cannot answer through code investigation.
After getting initial clarifications:
If the user corrects any misunderstanding:
Create a research todo list using TodoWrite to track exploration tasks
Spawn parallel sub-tasks for comprehensive research:
For deeper investigation:
For historical context:
Each agent knows how to:
Wait for ALL sub-tasks to complete before proceeding
Present findings and design options:
Based on my research, here's what I found:
**Current State:**
- [Key discovery about existing code]
- [Pattern or convention to follow]
**Design Options:**
1. [Option A] - [pros/cons]
2. [Option B] - [pros/cons]
**Open Questions:**
- [Technical uncertainty]
- [Design decision needed]
Which approach aligns best with your vision?
Once aligned on approach:
Create initial plan outline:
Here's my proposed plan structure:
## Overview
[1-2 sentence summary]
## Implementation Phases:
1. [Phase name] - [what it accomplishes]
2. [Phase name] - [what it accomplishes]
3. [Phase name] - [what it accomplishes]
Does this phasing make sense? Should I adjust the order or granularity?
Get feedback on structure before writing details
After structure approval:
flow/plans/YYYY-MM-DD-gh-[issue]-[description].md
YYYY-MM-DD-gh-[issue]-[description].md where:
flow/plans/2026-01-12-gh-1-research-requirements-command.mdflow/plans/2026-01-12-improve-error-handling.md# [Feature/Task Name] Implementation Plan
## Overview
[Brief description of what we're implementing and why]
## Current State Analysis
[What exists now, what's missing, key constraints discovered]
## Desired End State
[A Specification of the desired end state after this plan is complete, and how to verify it]
### Key Discoveries:
- [Important finding as a navigable link, e.g. [main.tf:42](https://github.com/{owner}/{repo}/blob/{commit}/path/to/main.tf#L42)]
- [Pattern to follow]
- [Constraint to work within]
## What We're NOT Doing
[Explicitly list out-of-scope items to prevent scope creep]
## Implementation Approach
[High-level strategy and reasoning]
## Phase 1: [Descriptive Name]
### Overview
[What this phase accomplishes]
### Step 1: Write Tests
**Test file**: `tests/test_[component].py` (or appropriate path)
**Tests to create**:
- Test case 1: [What behavior to test]
- Test case 2: [What edge case to test]
- Test case 3: [What error condition to test]
**Run tests**: `uv run pytest tests/test_[component].py -v`
**Expected result**: Tests should FAIL (no implementation yet)
### Step 2: Implement
#### [Component/File Group]
**File**: `path/to/file.ext`
**Purpose**: [What this file does]
**Key responsibilities**:
- [Responsibility 1]
- [Responsibility 2]
> **Remember**: Describe what the file should do, not the actual code. Implementation happens in `/implement-plan`.
### Step 3: Verify
**Run tests**: `uv run pytest tests/test_[component].py -v`
**Expected result**: All tests PASS
### Success Criteria:
#### Automated Verification:
- [ ] Tests written and initially fail
- [ ] Implementation complete
- [ ] All tests pass: `uv run pytest tests/ -v`
- [ ] Type checking passes (if applicable)
- [ ] Linting passes: `uv run ruff format --check .`
#### Manual Verification:
- [ ] Feature works as expected when tested manually
- [ ] Edge cases handled correctly
- [ ] No regressions in related features
**Implementation Note**: After completing this phase and all verification passes, pause for manual confirmation before proceeding to the next phase.
---
## Phase 2: [Descriptive Name]
[Similar structure with both automated and manual success criteria...]
---
## Testing Strategy
> **Note**: Each phase includes its own TDD cycle. This section provides an overview of the overall testing approach.
### Test Structure:
- Test directory: `tests/`
- Test runner: `uv run pytest`
- Test pattern: One test file per module
### Test Categories:
- **Unit tests**: Test individual functions/classes in isolation
- **Integration tests**: Test component interactions
- **E2E tests**: Test complete user flows (if applicable)
### Key Test Cases:
- [Critical behavior 1]
- [Critical behavior 2]
- [Edge case 1]
- [Error condition 1]
## Performance Considerations
[Any performance implications or optimizations needed]
## Migration Notes
[If applicable, how to handle existing data/systems]
## References
- Tracker work item: https://github.com/[owner]/[repo]/issues/[number] (GitHub example - substitute the URL shape for your tracker)
- Related research: [flow/research/[relevant].md](flow/research/[relevant].md)
- Similar implementation: [path/to/file:line](https://github.com/{owner}/{repo}/blob/{commit}/path/to/file#L{line})
file:line text. Gather the repo + commit once (git rev-parse HEAD, git branch --show-current, tracker repo-info) and form [path:line](https://github.com/{owner}/{repo}/blob/{commit}/{path}#L{line}) (ranges as #L{start}-L{end}) for every reference across Current State Analysis, Key Discoveries, the implementation phases, and References. If the commit is not pushed, fall back to a repo-relative link [path:line](path) so every reference stays navigable. For non-GitHub trackers, substitute the host's blob-URL shape.Present the draft plan location:
I've created the initial implementation plan at:
`flow/plans/YYYY-MM-DD-gh-X-description.md`
Please review it and let me know:
- Are the phases properly scoped?
- Are the success criteria specific enough?
- Any technical details that need adjustment?
- Missing edge cases or considerations?
Iterate based on feedback - be ready to:
Continue refining until the user is satisfied
Transition the work-item state (if applicable):
tracker set-state <id> ready-for-dev planning-in-progressNo Implementation Code:
/implement-plan, not hereTest-Driven Development:
Be Skeptical:
Be Interactive:
Be Thorough:
Be Practical:
Track Progress:
No Open Questions in Final Plan:
Always separate success criteria into two categories:
Automated Verification (can be run by execution agents):
make test, npm run lint, etc.Manual Verification (requires human testing):
Format example:
### Success Criteria:
#### Automated Verification:
- [ ] Database migration runs successfully: `make migrate`
- [ ] All unit tests pass: `go test ./...`
- [ ] No linting errors: `golangci-lint run`
- [ ] API endpoint returns 200: `curl localhost:8080/api/new-endpoint`
#### Manual Verification:
- [ ] New feature appears correctly in the UI
- [ ] Performance is acceptable with 1000+ items
- [ ] Error messages are user-friendly
- [ ] Feature works correctly on mobile devices
When spawning research sub-tasks:
Example of spawning multiple tasks:
# Spawn these tasks concurrently:
tasks = [
Task("Research database schema", db_research_prompt),
Task("Find API patterns", api_research_prompt),
Task("Investigate UI components", ui_research_prompt),
Task("Check test patterns", test_research_prompt)
]
User: /create-plan #1
Assistant: Let me fetch that work item and understand what we're building...
[Fetches with `tracker view 1`]
Based on the work item, I understand we need to create a /research-requirements skill for greenfield projects. Let me research the codebase to understand the existing patterns...
[Spawns research agents]
I've found the existing research-codebase skill which follows a specific pattern. Before I start planning, I have some questions...
[Interactive process continues...]
npx claudepluginhub corticalstack/flow --plugin flowGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.