plan-story
Manages stories by breaking them into tasks and tracking PR status through a controlled pipeline.
Install
mkdir -p .claude/skills/plan-story && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/14323" && unzip -o skill.zip -d .claude/skills/plan-story && rm skill.zipInstalls to .claude/skills/plan-story
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Execute all tasks within a story, following the GENERATE-DOCUMENT workflow for each task.Key capabilities
- →Inspect deterministic state of a story
- →Ensure the story integration branch is correct
- →Run the next eligible task through /plan-task
- →Finalize a story after task PRs are merged
- →Verify task table rows have matching files
- →Report completed task branches for local deletion
How it works
The skill orchestrates an atomized story by inspecting its state, managing the story integration branch, executing tasks, and finalizing the story once all task PRs are merged.
Inputs & outputs
When to use plan-story
- →Start a story
- →Execute task in story
- →Finalize story pull request
About this skill
Orchestrate an atomized story. A story branch is the integration branch for the story. Each task runs in its own branch and opens a PR into the story branch. Task PRs are merged into the story branch incrementally. Only after all tasks are done and merged does the story branch open the final PR into git.base_branch.
/plan-story is optional orchestration. /plan-task must also be able to create or reuse the story branch when a user starts directly from a task.
Reference workflows:
.planning/WORKFLOWS/02-EXECUTION-WORKFLOWS/GENERATE-DOCUMENT.md.planning/WORKFLOWS/04-SUB-WORKFLOWS/EXECUTE-STORY.md.planning/WORKFLOWS/04-SUB-WORKFLOWS/CHECK-PHASE-CONTEXT.md.planning/WORKFLOWS/04-SUB-WORKFLOWS/CHECK-AGNOSTIC-BOUNDARY.md.planning/WORKFLOWS/03-MAINTENANCE-WORKFLOWS/RECORD-EDGE-CASE.md
Arguments
$ARGUMENTS — format: NNN-slug story-NN (e.g. 001-user-auth-api story-01)
Deterministic helper
Use only the current directory's ./.planning/. Do not search parent directories.
Use the shared script for mechanical story inspection and state updates:
node .planning/scripts/planning-story.mjs execute-inspect <planning-id> <story-NN> --format markdown
node .planning/scripts/planning-story.mjs execute-start <planning-id> <story-NN> --write
node .planning/scripts/planning-story.mjs execute-done <planning-id> <story-NN> --write
node .planning/scripts/planning-story.mjs execute-finalize <planning-id> <story-NN> --format markdown
For a child planning running in a dedicated sibling worktree, pass the worktree prefix explicitly when the current branch does not already include it:
node .planning/scripts/planning-story.mjs execute-inspect <planning-id> <story-NN> --worktree-prefix <worktree-prefix>
The helper must own deterministic work only:
- locate the story file under
.planning/active/<planning-id>/02-deepening/; - verify task table rows have matching
task-NN-*.mdfiles; - derive the story branch, preserving a worktree prefix when supplied or already present;
- report the first dependency-eligible task;
- report completed task branches that should be deleted locally after task PR merge;
- render done criteria, task verification summaries, and final git/PR command plans;
- update story status in the story file and
01-expansion.mdonly when called with--write.
The skill still owns human judgment:
- read required workflow/docs context;
- execute
[CHECK-PHASE-CONTEXT]and[CHECK-STORY-CONTEXT]; - decide whether
gh/git evidence proves task PRs are merged; - invoke
/plan-task; - evaluate story done evidence and smoke-test freshness;
- request final human developer review before marking the story
DONE; - execute
[RECORD-EDGE-CASE]for blockers, corrections, conflicts, or manual PR gaps.
Steps
0 — Reset session for a new story
Before starting a new story execution, clear the Claude session with /clear, then rerun /plan-story <planning-id> <story-NN> from the project root. If this invocation is already the resumed context after /clear for this exact story, continue. Do not require another /clear when rerunning /plan-story to continue the same story after a task PR merge or review checkpoint.
1 — Inspect story
- Parse
$ARGUMENTSto extract planning id and story id. - Run:
If this is a child planning worktree and the reported story branch lacks the expectednode .planning/scripts/planning-story.mjs execute-inspect <planning-id> <story-NN> --format markdown<worktree-prefix>/, rerun with--worktree-prefix <worktree-prefix>. - If the helper reports the story is missing, no local
.planning/exists, or task files are missing, stop. For missing task files, report: "Run/plan-atomize <planning-id> <story-id>first./plan-storydoes not generate task files during execution." - Execute
[CHECK-PHASE-CONTEXT]for the story's area. If it returnsMISSING, stop and list thedocs/files that must be read first.
2 — Ensure story branch
- If
execution.requires_gitisfalse, skip branch setup and continue to task orchestration. - Execute
[CHECK-STORY-CONTEXT].- If ABORT: stop immediately; report that the user chose to stay on the current story/task branch.
- If STASHED, COMMITTED, COMMITTED_PUSHED, STANDBY, or OK: continue.
- Validate git state before creating or updating branches:
If there are uncommitted changes, stop and ask the user to commit, stash, or discard them before starting this story. Do not create branches from a dirty worktree.git status --porcelain - Ensure the story integration branch exists and is up to date using the branch reported by the helper:
git fetch origin- If
<story-branch>exists locally:git checkout <story-branch>thengit pull --ff-only origin <story-branch>. - If it exists only on
origin:git checkout -b <story-branch> origin/<story-branch>thengit pull --ff-only origin <story-branch>. - If it does not exist locally or on
origin: checkoutgit.base_branch, pull it, create<story-branch>, and push it.
- If
3 — Run next task or finalize
- If the story status is
TODO, run:node .planning/scripts/planning-story.mjs execute-start <planning-id> <story-NN> --write - Verify task PR integration before choosing the next task:
- If
ghis available, check for open task PRs targeting the story branch:
If any task PR is open, stop and list it. The next task must not start until the previous task PR is reviewed and merged intogh pr list --base <story-branch> --state open<story-branch>. - If
ghis unavailable and any prior task isDONE, ask the user to confirm that all completed task PRs have been reviewed and merged into<story-branch>. - After task PRs are confirmed merged, delete corresponding local task branches reported by the helper:
Usegit checkout <story-branch> git pull --ff-only origin <story-branch> git branch -d <task-branch>git branch -donly. If deletion fails because Git does not recognize the branch as merged, stop and report the branch name so the user can confirm whether the PR was actually merged. Do not delete remote task branches here.
- If
- Rerun
execute-inspect. - If the helper reports a next task, invoke:
/plan-task <planning-id> <story-id> <task-id>/plan-taskmust compact the session with/compactbefore starting the new task implementation; after compaction, continue with the same task command. Then stop. Report that the task PR must be merged into<story-branch>and its local task branch deleted before rerunning/plan-story. - If the helper reports pending tasks blocked by dependencies, stop and list the blocked tasks.
- If no pending tasks exist, continue to story closure.
4 — Close story
-
Execute
[EXECUTE-STORY]to verify done criteria are met.- If
BLOCKED: execute[RECORD-EDGE-CASE]with the unmet criteria and stop. - If
DONE: runexecute-finalizeand present the helper's closeout report plus any fresh story-level smoke-test evidence needed for software projects.
- If
-
Before setting the status or pushing/opening a PR, present:
- the full
## Done Criteriasection; - all task verification summaries;
- for software projects, smoke-test evidence from the final task run or a fresh story-level run if the task evidence is stale;
- test evidence metadata for every applicable generated, detected, or manual gate: type, command, parameters, environment, configuration/scripts, output log or CI/report link, and result;
- the commits that will be pushed.
Then ask explicitly:
"All tasks are complete. Please perform the final human developer code review for this story. Reply with approved to mark the story DONE, push the branch, and create the PR, or list the requested corrections."
Wait for approval before setting story status to
DONE. - the full
-
If the reviewer requests corrections:
- execute
[RECORD-EDGE-CASE]with the requested corrections and the affected story; - implement the corrections;
- rerun relevant task/story verification and refresh the evidence metadata for each impacted gate;
- for software projects, rerun the smoke test plan when code, build, dependencies, migrations, startup, or configuration changed;
- present the updated review summary again;
- wait for a new human review.
- execute
-
After approval, run:
node .planning/scripts/planning-story.mjs execute-done <planning-id> <story-NN> --write -
Invoke
/doc-story <planning-id> <story-id>. If the story area is DO or W this is a silent no-op. Include any files written in the final report.
5 — Git finalize
- If
execution.requires_gitisfalse, skip Git finalize and report that branch, push, PR creation, and branch cleanup were disabled by.planning/config.yml. - Sync the story branch with the base branch before opening the story PR:
If the rebase has conflicts: executegit fetch origin git checkout <story-branch> git pull --ff-only origin <story-branch> git rebase origin/<base_branch>[RECORD-EDGE-CASE]with the conflicting files, stop, list the conflicts, and ask the user to resolve them before continuing. - Push the story branch:
git push -u origin <story-branch> - Open or reuse a pull request targeting
<base_branch>:
If a story PR forgh pr create \ --title "<story-NN>: <story-name>" \ --body "Closes story <story-id> of planning <planning-id>." \ --base <base_branch> \ --head <story-branch><story-branch>already exists, reuse it instead of creating a duplicate. Ifghshows that the existing story PR is already merged into<base_branch>, conti
Content truncated.
When not to use it
- →When a story is not atomized into tasks
- →When task files are missing for a story
Limitations
- →Requires the story to be atomized into tasks beforehand
- →Does not generate task files during execution
- →Requires manual human judgment for certain steps like reading workflow docs or evaluating evidence
How it compares
This skill provides a structured, automated workflow for managing an entire story's lifecycle, ensuring adherence to specific processes and state management, unlike a manual approach that relies on individual developer coordination.
Compared to similar skills
plan-story side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| plan-story (this skill) | 0 | 1mo | Review | Advanced |
| task-master | 22 | 6mo | Review | Intermediate |
| github-project-management | 4 | 6mo | Review | Advanced |
| issue-manage | 2 | 5mo | Review | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
task-master
sfc-gh-dflippo
AI-powered task management for structured, specification-driven development. Use this skill when you need to manage complex projects with PRDs, break down tasks into subtasks, track dependencies, and maintain organized development workflows across features and branches.
github-project-management
ruvnet
Comprehensive GitHub project management with swarm-coordinated issue tracking, project board automation, and sprint planning
issue-manage
catlog22
Interactive issue management with menu-driven CRUD operations. Use when managing issues, viewing issue status, editing issue fields, performing bulk operations, or viewing issue history. Triggers on "manage issue", "list issues", "edit issue", "delete issue", "bulk update", "issue dashboard", "issue history", "completed issues".
issue-maker
pollinations
Create GitHub issues following Pollinations team conventions. Use when asked to create issues, track work, or plan features.
create-issue
dotCMS
Create GitHub issues using repository templates. Use when the user asks to create an issue, bug report, feature request, task, spike, epic, or UX requirement. Also use when the user describes a problem, bug, enhancement, or work item that should be tracked. Supports both English and Spanish input.
issue-discover
catlog22
Unified issue discovery and creation. Create issues from GitHub/text, discover issues via multi-perspective analysis, or prompt-driven iterative exploration. Triggers on "issue:new", "issue:discover", "issue:discover-by-prompt", "create issue", "discover issues", "find issues".