Skill1.3k repo starsupdated today
spec-kitty.plan
The spec-kitty.plan Claude Code skill generates a detailed implementation plan for a software project mission. Use this skill after running spec-kitty.specify to create a structured plan document that outlines development steps, timelines, and deliverables. The skill operates within the repository root checkout and commits the generated plan to the target branch without creating worktrees.
Install in Claude Code
Copygit clone --depth 1 https://github.com/Priivacy-ai/spec-kitty /tmp/spec-kitty.plan && cp -r /tmp/spec-kitty.plan/tests/specify_cli/skills/__snapshots__/vibe/plan. ~/.claude/skills/spec-kitty.planThen start a new Claude Code session; the skill loads automatically.
Definition
plan.SKILL.md
## Startup Upgrade Check
Run this at most once per active agent session before the first Spec Kitty command workflow.
If you already ran `spec-kitty upgrade --agent-check --json` in this session, reuse that result and skip this block.
Do not run or announce an upgrade check again for later Spec Kitty commands in the same session.
Otherwise, before continuing, run:
```bash
spec-kitty upgrade --agent-check --json
```
If JSON `action` is `none`, continue.
If `action` is `auto_upgrade`, run `upgrade_command` before continuing. If it fails, tell the user and continue with the current Spec Kitty version.
If `action` is `guidance`, show `upgrade_note` briefly, then continue.
If `action` is `prompt`, ask the user with the host-native question UI when available:
`Spec Kitty {latest_version} is available. You are on {installed_version}. Upgrade now?`
Use these choices:
1. Upgrade now (recommended) - record `upgrade_now`, run `upgrade_command`, then continue.
2. Always keep me up to date - record `always`, run `upgrade_command`, then continue.
3. Not now - record `not_now`, then continue.
4. Never ask again - record `never_ask`, then continue.
Record the selected choice before continuing:
```bash
spec-kitty upgrade --agent-choice <upgrade_now|always|not_now|never_ask> --agent-latest <latest_version> --json
```
If no host-native question UI is available, present the same four choices in plain text and wait for the user.
In non-interactive hosts, choose `not_now` and continue.
# /spec-kitty.plan - Create Implementation Plan
**Version**: 0.11.0+
## 📍 WORKING DIRECTORY: Stay in the repository root checkout
**IMPORTANT**: Plan works in the repository root checkout. NO worktrees created.
```bash
# Run from project root (same directory as /spec-kitty.specify):
# You should already be here if you just ran /spec-kitty.specify
# Creates:
# - kitty-specs/<mission_slug>/plan.md → In repository root checkout
# (the NNN- prefix in the directory listing is display-only metadata)
# - Commits to target branch
# - NO worktrees created
```
**Do NOT cd anywhere**. Stay in the repository root checkout.
## Mission Handle Rule
`/spec-kitty.plan` operates on an existing mission, so use `--mission <handle>`
when the CLI needs a mission selector.
- `<handle>` can be the mission's `mission_id` (ULID), `mid8` (first 8 chars of
the ULID), or `mission_slug`.
- Prefer `mission_id` or `mid8` when the repo has multiple similarly named
missions.
- The resolver disambiguates by `mission_id` and returns a structured
`MISSION_AMBIGUOUS_SELECTOR` error on ambiguity — there is no silent fallback.
## User Input
The content of the user's message that invoked this skill (everything after the skill invocation token, e.g. after `/spec-kitty.<command>` or `$spec-kitty.<command>`) is the User Input referenced elsewhere in these instructions.
You **MUST** consider this user input before proceeding (if not empty).
## Commit Boundary (issue #846)
`/spec-kitty.plan` will refuse to advance the plan phase unless **two**
gates pass:
1. **Entry gate.** `spec.md` must already be both **committed** (tracked +
present at HEAD) and **substantive** (at least one populated `FR-###`
row — not just template placeholders). If either check fails, the CLI
returns `phase_complete=false` with a `blocked_reason` naming "committed
AND substantive" and does **not** create or commit `plan.md`.
2. **Exit gate.** `plan.md` is only auto-committed when its Technical Context
section contains a real `Language/Version` value (and at least one peer
field) — not the `[e.g., …]` / `[NEEDS CLARIFICATION …]` placeholders. If
the plan is left as scaffold, it stays untracked on disk and the CLI
returns `phase_complete=false` with a substantive-plan `blocked_reason`.
Section presence is the only signal — adding arbitrary prose without the
required structural rows does **not** count as substantive (no byte-length
escape hatch).
To advance: populate the Technical Context with real values, then re-run
`spec-kitty agent mission setup-plan --json`. The substantive plan will be
auto-committed and `phase_complete` will report `true`.
Reference: `kitty-specs/charter-e2e-827-followups-01KQAJA0/contracts/specify-plan-commit-boundary.md`.
## Branch Strategy Confirmation (MANDATORY)
Before asking planning questions or generating artifacts, you must make the branch contract explicit.
- Never describe the landing branch vaguely. Always name the actual branch value.
- If the user says the feature should land somewhere else, stop and resolve that before writing `plan.md`.
- You must repeat the branch contract twice during this command:
1. immediately after parsing `setup-plan --json`
2. again in the final report before suggesting `/spec-kitty.tasks`
## Charter Context Bootstrap (required)
Before planning interrogation, load charter context for this action:
```bash
spec-kitty charter context --action plan --json
```
- If JSON `mode` is `bootstrap`, apply JSON `text` as first-run governance context and follow referenced docs as needed.
- If JSON `mode` is `compact`, continue with condensed governance context.
## Location Check (0.11.0+)
This command runs in the **repository root checkout**, not in a worktree.
- Resolve branch context from deterministic JSON output, not from `meta.json` inspection:
- Run `spec-kitty agent mission setup-plan --mission <mission-slug> --json`
- Use `current_branch`, `target_branch` / `base_branch`, and `planning_base_branch` / `merge_target_branch` (plus uppercase aliases) from that payload
- Use `branch_matches_target` from that payload to detect branch mismatch; do not probe branch state manually inside the prompt
- Planning artifacts live in `kitty-specs/<mission_slug>/` (the `NNN-` prefix is display-only metadata)
- The plan template is committed to the target branch after generation
**Path reference rule:** When you mention directories or files, provide either the absolute path or a