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 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).development
Migrate a single-harness repo to the dual-harness layout so both Claude Code and Codex load the same instructions and skills — AGENTS.md as the portable canonical doc, a thin CLAUDE.md `@AGENTS.md` bridge, and a `.agents/skills` dir with a `.claude/skills` symlink onto it. Use when asked to migrate to dual-harness, make this repo work in both Claude and Codex, or for agent metadata cleanup.
tools
Goal-driven senior-engineer pipeline-unstick sweep (CTL-1176 rung 3). Given the stuck/failed/needs-human set (or ONE ticket handed by the recovery router), its GOAL is to get the pipeline MOVING again — not to fix one ticket's review findings (that is phase-remediate). It runs AFTER the eyes (diagnostician evidence) and the hands (deterministic unstuck-sweep seams) have already tried, and it CONSUMES their output from a recovery-pass.json brief rather than re-diagnosing or redoing their narrow work. It acts like a senior engineer with full tool access — it resolves merge conflicts, rebases, force-pushes, merges green PRs, and re-dispatches stalled phases AUTONOMOUSLY — and escalates to the operator ONLY for a genuine value judgment / something that degrades other functionality / a real cost-benefit trade-off / a serious architecture change / an ADR conflict. On escalation it AUTHORS the operator inbox row + the push notification (executive-voiced). Dispatched as a `claude --bg` job by phase-agent-dispatch via slash command, AND invocable bare by the operator as a sweep — hence `user-invocable: true`. Ships behind CATALYST_RECOVERY_PASS (off by default — no live behavior change until shadow/enforce).
tools
Diagnose and fix Catalyst setup issues. Validates tools, database, config, OTel, direnv, and thoughts. Automatically fixes what it can — creates directories, initializes the database, sets WAL mode, runs migrations. Use for new installs, upgrades, or when something isn't working.
tools
--- name: phase-triage description: Phase agent that triages a Linear ticket — expands acronyms, classifies (feature/bug/docs/refactor/chore), identifies genuine blockers (a semantic second-pass over the backlog — NOT a prose scrape; CTL-838), 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.fai