plugins/dev/skills/create-plan/SKILL.md
Create detailed implementation plans through an interactive process. **ALWAYS use when** the user says 'plan this', 'create a plan', 'let's plan the implementation', 'design the approach', or wants a structured TDD implementation plan before writing code. Works best after /research-codebase.
npx skillsauth add coalesce-labs/catalyst create-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.
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.
Replace PROJ in ticket references with your Linear team's prefix from .catalyst/config.json.
# Check project setup (thoughts, CLAUDE.md snippet, config)
if [[ -f "${CLAUDE_PLUGIN_ROOT}/scripts/check-project-setup.sh" ]]; then
"${CLAUDE_PLUGIN_ROOT}/scripts/check-project-setup.sh" || exit 1
fi
# Auto-discover most recent research (workflow context + filesystem fallback)
RECENT_RESEARCH=""
if [[ -f "${CLAUDE_PLUGIN_ROOT}/scripts/workflow-context.sh" ]]; then
RECENT_RESEARCH=$("${CLAUDE_PLUGIN_ROOT}/scripts/workflow-context.sh" recent research)
fi
if [[ -n "$RECENT_RESEARCH" ]]; then
echo "📋 Auto-discovered recent research: $RECENT_RESEARCH"
else
echo "⚠️ No recent research found in workflow context or filesystem"
fi
SESSION_SCRIPT="${CLAUDE_PLUGIN_ROOT}/scripts/catalyst-session.sh"
if [[ -x "$SESSION_SCRIPT" ]]; then
CATALYST_SESSION_ID=$("$SESSION_SCRIPT" start --skill "create-plan" \
--ticket "${TICKET_ID:-}" \
--workflow "${CATALYST_SESSION_ID:-}")
export CATALYST_SESSION_ID
"$SESSION_SCRIPT" phase "$CATALYST_SESSION_ID" "planning" --phase 1
fi
Auto-discovery has already run in Prerequisites above. Check its output and follow this priority:
If user provided parameters (file path or ticket reference):
If no parameters provided AND Prerequisites discovered research (📋):
If no parameters AND no research found (⚠️):
Read all mentioned files immediately and FULLY:
Extract ticket and update Linear state:
If a ticket is detected (from the research document's source_ticket frontmatter, from the
command argument, or from context), update ticket status to stateMap.planning from config
using Linearis CLI (run linearis issues usage for syntax).
If Linearis CLI is not available, skip silently and continue planning.
Gather context using research sub-agents — use the same agent palette and DeepWiki
orientation process as /catalyst-dev:research-codebase (that skill is the single source of
truth for how codebase research works). For planning, focus agents on the specific ticket/task
scope rather than broad exploration:
Read all files identified by research tasks FULLY into the main context
Analyze and verify understanding:
Present informed understanding and focused questions:
After getting initial clarifications:
If the user corrects any misunderstanding:
Create a research todo list using TodoWrite
Spawn parallel sub-tasks for comprehensive research:
For local codebase:
For external research:
For historical context:
Wait for ALL sub-tasks to complete before proceeding
Present findings and design options with pros/cons for each approach
Once aligned on approach:
After structure approval:
Gather metadata:
CURRENT_ISO_DATETIME=$(date -Iseconds)
CURRENT_DATE=$(date +%Y-%m-%d)
GIT_COMMIT_SHORT=$(git rev-parse --short HEAD)
GIT_BRANCH=$(git branch --show-current)
REPO_NAME=$(basename "$(git rev-parse --show-toplevel)")
IMPORTANT: Document Storage Rules
thoughts/shared/plans/thoughts/searchable/ (read-only search index)Write the plan to thoughts/shared/plans/YYYY-MM-DD-PROJ-XXXX-description.md
2025-01-08-PROJ-123-parent-child-tracking.md2025-01-08-improve-error-handling.mdUse this template structure (frontmatter comes BEFORE the heading):
---
date: { CURRENT_ISO_DATETIME }
researcher: claude
git_commit: { GIT_COMMIT_SHORT }
branch: { GIT_BRANCH }
repository: { REPO_NAME }
topic: "{PLAN_TITLE}"
tags: [plan, implementation, { RELEVANT_COMPONENT_TAGS }]
status: ready_for_implementation
last_updated: { CURRENT_DATE }
last_updated_by: claude
type: implementation_plan
source_ticket: { TICKET-ID or null }
source_research: "[[research-doc-filename]]" # or null
---
# [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
[Specification of the desired end state and how to verify it]
### Key Discoveries:
- [Important finding with file:line reference]
- [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]
### Tests First (Red):
Define the expected behavior before writing implementation code.
#### 1. [Test File/Group]
**File**: `tests/path/to/feature.test.ext` **Tests to write**:
```[language]
// Test describing expected behavior — should FAIL before implementation
```
### Implementation (Green):
Write the minimum code to make the tests pass.
#### 1. [Component/File Group]
**File**: `path/to/file.ext` **Changes**: [Summary of changes]
```[language]
// Specific code to add/modify
```
### Refactor (if needed):
[Any cleanup, extraction, or simplification to do while tests stay green]
### Success Criteria:
#### Automated Verification:
- [ ] Unit tests pass: `make test`
- [ ] Type checking passes: `make check`
- [ ] Linting passes: `make lint`
#### Manual Verification:
- [ ] Feature works as expected when tested
- [ ] No regressions in related features
---
## Phase 2: [Descriptive Name]
[Similar structure — always Tests First → Implementation → Refactor]
---
## Testing Strategy (TDD)
**Approach: Test-Driven Development (Red → Green → Refactor)**
Each phase writes tests BEFORE implementation code. This ensures:
- Requirements are encoded as executable specifications
- Implementation stays focused on passing defined behavior
- Refactoring is safe because tests catch regressions
**Test tiers:**
- **Unit tests** — written first for each function with business logic
- **Integration tests** — written first for API endpoints and data flows
- **Edge case tests** — written first for error states, invalid inputs, auth failures
**Per-phase rhythm:**
1. Write failing tests that describe the phase's expected behavior
2. Implement the minimum code to make tests pass
3. Refactor while keeping tests green
[Additional manual testing steps if needed]
## Performance Considerations
[Any performance implications]
## Migration Notes
[If applicable]
## References
- Original ticket: [[PROJ-XXX]]
- Related research: [[YYYY-MM-DD-relevant-research]]
- Similar implementation: `[file:line]`
5a. Sync thoughts:
humanlayer thoughts sync
5b. Present plan and ask for review:
Iterate based on feedback until the user is satisfied
End session tracking:
if [[ -n "${CATALYST_SESSION_ID:-}" && -x "$SESSION_SCRIPT" ]]; then
"$SESSION_SCRIPT" end "$CATALYST_SESSION_ID" --status done
fi
After plan approval, provide implementation command:
Use --team when: 3+ parallel phases, distinct domains, non-overlapping files, 10+ files
Use standard mode when: sequential phases, same directory, <10 files, tightly coupled
## Ready to Implement
Start a new session and run:
/catalyst-dev:implement-plan [--team] thoughts/shared/plans/{PLAN_FILENAME}
Tip: Start a fresh session — implementation needs context for source files and progress tracking.
make check over individual lint/test commands when available.Always separate into two categories:
make test, make lint, type checking, etc.All patterns follow TDD: write tests for each step BEFORE implementing it.
Schema/migration → tests for store methods → store methods → tests for business logic → business logic → tests for API → API → clients
Research patterns → data model → tests for backend logic → backend logic → tests for API endpoints → API endpoints → tests for UI components → UI
Capture existing behavior as tests first → incremental changes (keep tests green) → backwards compatibility → migration strategy
If a ticket is detected (from research document's source_ticket frontmatter, command argument, or
context):
stateMap.planning from config
using Linearis CLI (run linearis issues usage for syntax).linearis comments usage for syntax).testing
Phase-agent that fixes a failing verify verdict so the pipeline self-heals instead of stalling to needs-human (CTL-653). Reads `${ORCH_DIR}/workers/<ticket>/verify.json`, fixes the `findings[]` (every severity:"high" plus the regression_risk drivers) directly via Edit/Write, commits the remediation, and emits `phase.remediate.complete.<ticket>`. The scheduler's router then re-dispatches `verify` to re-check (the verify⇄remediate cycle, cap 3). Dispatched as a `claude --bg` job by `phase-agent-dispatch`, which invokes it via slash command — hence `user-invocable: true`.
development
Phase agent for the verify step of the 9-phase orchestrator pipeline (CTL-450). NEW skill — has no canonical wrapper. Runs read-only adversarial verification against the implement-phase diff: tsc, tests, lint, security scan, reward-hacking scan, code review, test coverage, silent-failure hunt. Writes ${ORCH_DIR}/workers/<TICKET>/verify.json then emits phase.verify.complete.<ticket>. Reads phase-implement.json as its prior-phase artifact. NEVER writes application code — only test files allowed. Spawned via phase-agent-dispatch via slash command — hence `user-invocable: true`.
tools
--- name: phase-triage description: Phase agent that triages a Linear ticket — expands acronyms, classifies (feature/bug/docs/refactor/chore), identifies dependencies, estimates scope, writes triage.json, and posts a triage analysis comment to Linear. Triage completion is signaled by that comment plus the local triage.json — there is no `triaged` label. Emits phase.triage.complete.<TICKET> on success and phase.triage.failed.<TICKET> on error. Dispatched by the phase-agent orchestrator (CTL-452)
testing
Phase agent for the review step of the 9-phase orchestrator pipeline (CTL-450). Wraps the /review skill (gstack) — explicitly skips /ultrareview per user decision. Reads verify.json from the prior phase, runs /review against the diff, writes ${ORCH_DIR}/workers/<TICKET>/review.json, and creates a remediation commit for any HIGH-severity finding that has a deterministic fix. Emits phase.review.complete.<ticket>. Spawned via phase-agent-dispatch via slash command — hence `user-invocable: true`.