/claude-planning-with-ai:plan-story <NNN-slug> <story-NN> (e.g. 001-user-auth-api story-01)from claude-planning-with-ai
Orchestrate an atomized story: inspect deterministic state with the shared helper, ensure the story integration branch, run the next eligible task through /plan-task, and finalize only after task PRs are merged.
Ships in claude-planning-with-ai. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole 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 — format: NNN-slug story-NN (e.g. 001-user-auth-api story-01)
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:
.planning/active/<planning-id>/02-deepening/;task-NN-*.md files;01-expansion.md only when called with --write.The skill still owns human judgment:
[CHECK-PHASE-CONTEXT] and [CHECK-STORY-CONTEXT];gh/git evidence proves task PRs are merged;/plan-task;DONE;[RECORD-EDGE-CASE] for blockers, corrections, conflicts, or manual PR gaps.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.
$ARGUMENTS to extract planning id and story id.node .planning/scripts/planning-story.mjs execute-inspect <planning-id> <story-NN> --format markdown
If this is a child planning worktree and the reported story branch lacks the expected <worktree-prefix>/, rerun with --worktree-prefix <worktree-prefix>..planning/ exists, or task files are missing, stop. For missing task files, report: "Run /plan-atomize <planning-id> <story-id> first. /plan-story does not generate task files during execution."[CHECK-PHASE-CONTEXT] for the story's area. If it returns MISSING, stop and list the docs/ files that must be read first.execution.requires_git is false, skip branch setup and continue to task orchestration.[CHECK-STORY-CONTEXT].
git status --porcelain
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 fetch origin
<story-branch> exists locally: git checkout <story-branch> then git pull --ff-only origin <story-branch>.origin: git checkout -b <story-branch> origin/<story-branch> then git pull --ff-only origin <story-branch>.origin: checkout git.base_branch, pull it, create <story-branch>, and push it.TODO, run:
node .planning/scripts/planning-story.mjs execute-start <planning-id> <story-NN> --write
gh is available, check for open task PRs targeting the story branch:
gh pr list --base <story-branch> --state open
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 into <story-branch>.gh is unavailable and any prior task is DONE, ask the user to confirm that all completed task PRs have been reviewed and merged into <story-branch>.git checkout <story-branch>
git pull --ff-only origin <story-branch>
git branch -d <task-branch>
Use git branch -d only. 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.execute-inspect./plan-task <planning-id> <story-id> <task-id>
/plan-task must compact the session with /compact before 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.Execute [EXECUTE-STORY] to verify done criteria are met.
BLOCKED: execute [RECORD-EDGE-CASE] with the unmet criteria and stop.DONE: run execute-finalize and present the helper's closeout report plus any fresh story-level smoke-test evidence needed for software projects.Before setting the status or pushing/opening a PR, present:
## Done Criteria section;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.
If the reviewer requests corrections:
[RECORD-EDGE-CASE] with the requested corrections and the affected story;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.
execution.requires_git is false, skip Git finalize and report that branch, push, PR creation, and branch cleanup were disabled by .planning/config.yml.git fetch origin
git checkout <story-branch>
git pull --ff-only origin <story-branch>
git rebase origin/<base_branch>
If the rebase has conflicts: execute [RECORD-EDGE-CASE] with the conflicting files, stop, list the conflicts, and ask the user to resolve them before continuing.git push -u origin <story-branch>
<base_branch>:
gh pr create \
--title "<story-NN>: <story-name>" \
--body "Closes story <story-id> of planning <planning-id>." \
--base <base_branch> \
--head <story-branch>
If a story PR for <story-branch> already exists, reuse it instead of creating a duplicate. If gh shows that the existing story PR is already merged into <base_branch>, continue to local story branch cleanup. If gh is not available, execute [RECORD-EDGE-CASE] noting that PR creation or PR-state verification had to be completed manually, then print the push URL and instruct the user to open or verify the PR manually.<base_branch> or the user confirms it was merged manually, delete the local story branch now:
git checkout <base_branch>
git pull --ff-only origin <base_branch>
git branch -d <story-branch>
<base_branch>, the local story branch must be deleted with the same commands.
Use git branch -d, not a forced delete. Remote branch deletion remains a repository/PR policy action.<story-branch>, local task branches cleaned, done criteria satisfied, doc files written, branch <story-branch> pushed, story PR URL when git is enabled, and story branch local cleanup status.To find the next story, use
/plan-status, then run/plan-story <planning-id> <next-story-id>. To decompose a story into atomic task files before executing it, use/plan-atomize <planning-id> <story-id>. To execute a single atomic task, use/plan-task.
What SKILL.md sets; muted values are Claude Code's defaults
53 skills in this plugin
/doc-generateGenerate documentation from planning artifacts at task, story, or planning level using the deterministic doc-generate script./doc-storyGenerate documentation for a completed story using the deterministic doc-generate script./doc-taskGenerate documentation for a completed atomic task using the deterministic doc-generate script./epic-enrichAdd missing backlog stories to an existing epic or story container while delegating container inspection, ID assignment, story drafting, and index updates to the shared planning-story script./plan-agent-executeExecute all pending stories in a planning — atomizes and executes independent stories in parallel using subagents, respecting dependency order./plan-agent-planExecute the planning phase autonomously — creates a new planning (if needed) and advances it from INITIAL to EXPANSION without intermediate confirmations.npx claudepluginhub adumun/claude-planning-with-ai --plugin claude-planning-with-aiOther plugins' skills for the same job