plan
Use when the user invokes $spec-kit:plan or /spec-kit:plan, or asks to generate a brownfield-aware implementation plan from the active feature spec.
What this skill does
# Spec Kit Plan
This is a user-invoked Spec Kit workflow. Treat user text after the invocation as the workflow input.
## Plugin Root
Use the spec-kit plugin root when running bundled scripts. In Claude Code, `${CLAUDE_PLUGIN_ROOT}` resolves to this plugin root. If that variable is unavailable, resolve the plugin root as the directory two levels above this `SKILL.md`.
User input:
$ARGUMENTS
Generate an implementation plan from the active feature specification. Optimize
for an existing repository unless the user explicitly says this is greenfield.
## Preflight
Run from the project root:
```bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/setup-plan.sh"
```
Parse JSON for `FEATURE_SPEC`, `IMPL_PLAN`, `SPECS_DIR`, `BRANCH`,
`FEATURE_SOURCE`, and `PROJECT_CONTEXT`. All file paths must be absolute.
If `FEATURE_SOURCE` is `latest`, pause and state that the feature was inferred
from the latest spec directory. Continue only if the user confirms or if the
user explicitly set `SPECIFY_FEATURE`.
Read before planning:
- `FEATURE_SPEC`
- `.specify/memory/constitution.md`, if present
- `PROJECT_CONTEXT`, if present
- Repo docs/config that affect architecture, commands, or tests
## Brownfield Planning Rules
- Prefer existing project structure, dependencies, helper APIs, naming, and test
style.
- Do not introduce a new framework, package manager, architectural layer, or
top-level directory unless the plan explains why existing patterns are
insufficient.
- Name the exact existing modules/directories the feature should fit into.
- If no analogous pattern exists, record the uncertainty and choose the smallest
reversible implementation.
- Use user arguments for tech preferences only when they do not contradict repo
reality or constitution constraints.
## Clarification Gate
Before writing the plan, inspect `FEATURE_SPEC` for `[NEEDS CLARIFICATION]`.
Pause only for material ambiguity: an answer that would change architecture,
data model, task split, tests, safety, UX, or operational behavior. For
non-material ambiguity, document the assumption in the plan and continue.
## Plan Artifact
Write `IMPL_PLAN` with this structure:
```markdown
# Implementation Plan: [FEATURE NAME]
**Branch**: `[BRANCH]` | **Date**: [today] | **Spec**: [relative path]
**Mode**: Brownfield unless explicitly greenfield
## Summary
[Primary requirement plus chosen implementation approach in 2-3 sentences]
## Repo Context
**Existing Area**: [module/package/app this fits]
**Relevant Patterns**: [existing files/classes/routes/tests to follow]
**Verification Commands**: [exact commands or "to confirm from repo docs"]
## Technical Context
**Language/Version**: [detected or provided]
**Primary Dependencies**: [existing deps preferred]
**Storage**: [if applicable]
**Testing**: [repo's actual test tools]
**Target Platform**: [detected]
**Constraints**: [performance, safety, auth, data, ops constraints]
## Constitution Compliance
[For each relevant principle, state compliance or documented deviation]
## Quality Gates
- [ ] Requirements are mapped to implementation areas
- [ ] Existing architecture and style are reused where practical
- [ ] Test/verification commands are identified
- [ ] Non-functional requirements have validation or explicit waiver
- [ ] Risky data migrations, destructive actions, or external calls are flagged
- [ ] Project context update is required or explicitly not needed
## Project Structure
[Concrete files/directories to create or modify. No generic option lists.]
## Phase 0: Research
- **Decision**: [what was chosen]
- **Rationale**: [why]
- **Alternatives considered**: [what else was evaluated]
## Phase 1: Design
### Data Model
[Entities/fields/relationships, only if applicable]
### Contracts / Interfaces
[APIs, CLI contracts, UI contracts, background jobs, schemas, or events]
### Validation Scenarios
[Integration/manual scenarios from acceptance criteria]
## Phase 2: Task Planning Approach
- Task categories: Setup, Tests, Core, Integration, Polish
- Test ordering: tests before or alongside implementation, as appropriate for this repo
- Parallel markers `[P]` only for independent files
- Estimated task count
## Complexity Tracking
| Deviation | Why Needed | Simpler Alternative Rejected Because |
|-----------|------------|-------------------------------------|
## Progress
- [ ] Phase 0: Research complete
- [ ] Phase 1: Design complete
- [ ] Phase 2: Task planning approach described
- [ ] Quality gates reviewed
```
## Supporting Artifacts
Generate only the artifacts that are useful for this feature:
- `research.md` for material technical decisions
- `data-model.md` when the feature changes persistent/domain data
- `contracts/` for API/CLI/schema/event contracts
- `quickstart.md` for integration or manual validation scenarios
Also refresh local-only `.specify/memory/project-context.md` by running the
detector when the plan discovers new stack, commands, or conventions not
captured there.
## Stop Rule
Do not generate `tasks.md`; `/spec-kit:tasks` owns that. Report:
- Plan path
- Generated artifacts
- Key repo-fit decision
- Verification commands/gaps
- Any documented deviations or risks
- Next workflow step: `/spec-kit:tasks`
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.