ワンクリックで
spec-kitty-specify
Create a mission specification
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Create a mission specification
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Interview and compile a project charter
Generate a requirements-quality checklist
Execute a work package implementation
Create an implementation plan
Generate research documents for the current mission
Review a work package implementation
| name | spec-kitty.specify |
| description | Create a mission specification |
| user-invocable | true |
Version: 0.11.0+
IMPORTANT: Specify works in the project root checkout. NO worktrees are created.
# Run from project root:
cd /path/to/project/root # Your project root checkout
# All planning artifacts are created in the project root and committed:
# - kitty-specs/<mission_slug>/spec.md → Created in project root
# (use the mission_slug returned by `mission create`; the numeric NNN- prefix
# is display-only and is assigned at merge time)
# - Committed to target branch (from create JSON: target_branch/base_branch)
# - NO worktrees created
Worktrees are created later during /spec-kitty.implement, after task finalization computes execution lanes.
Before mission create, there is no mission handle yet.
--mission to spec-kitty agent mission branch-context.--mission to spec-kitty agent mission create.create succeeds, use --mission <handle> for commands that operate on
the created mission.<handle> can be the mission's mission_id (ULID), mid8 (first 8 chars of
the ULID), or mission_slug.mission_id and returns a structured
MISSION_AMBIGUOUS_SELECTOR error on ambiguity — there is no silent fallback.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).
Before discovery, resolve branch intent through the Python helper, not by probing git directly:
spec-kitty agent mission branch-context --json
If the user already told you the intended landing branch, pass it explicitly:
spec-kitty agent mission branch-context --json --target-branch <intended-branch>
Parse the JSON and, in your next reply, explicitly tell the user:
current_branchplanning_base_branchmerge_target_branchbranch_matches_target is true or falsecreateNever talk generically about main or "the default branch". Name the actual branch values from the helper JSON. Do not shell out to git for this prompt.
FR-###, NFR-###, C-###).Before discovery questions, load charter context for this action:
spec-kitty charter context --action specify --json
mode is bootstrap, treat JSON text as the initial governance context and consult referenced docs as needed.mode is compact, proceed with concise governance context./spec-kitty.specify.Before running any scripts or writing to disk you must conduct a structured discovery interview.
Scope proportionality (CRITICAL): FIRST, gauge the inherent complexity of the request:
User signals to reduce questioning: If the user says "just testing", "quick prototype", "skip to next phase", "stop asking questions" - recognize this as a signal to minimize discovery and proceed with reasonable defaults.
First response rule:
WAITING_FOR_DISCOVERY_INPUTIf the user provides no initial description (empty command), stay in Interactive Interview Mode: keep probing with one question at a time.
Conversational cadence: After each user reply, decide if you have ENOUGH context for this feature's complexity level. For trivial features, 1-2 questions is sufficient. Only continue asking if truly necessary for the scope.
Discovery requirements (scale to feature complexity):
#, Question, Why it matters, and Current insight. Do not render this table to the user.Before finalizing the Intent Summary, ask yourself one question:
Does fulfilling this request require changing the same existing string (identifier, path, key, label, or term) in more than one file?
Typical shapes: "rename X to Y", "the Blue feature is now the Red feature", "change the terminology from X to Y", "move package A to package B", "replace ACME with GlobalCorp everywhere in docs and UI".
If yes or uncertain: load the spec-kitty-bulk-edit-classification skill
and follow it. You will set change_mode: bulk_edit in meta.json after
mission create and produce an occurrence_map.yaml during plan. The user
does not need to know these field names — the skill teaches you the workflow.
If clearly no (a new feature with new identifiers, a bug fix that doesn't rename anything, a refactor inside one file): proceed normally.
When in doubt, treat as bulk edit. The false-positive cost is drafting one map the user approves in a pass; the false-negative cost is the silent cross-file breakage that DIRECTIVE_035 exists to prevent.
After completing discovery and confirming the Intent Summary, determine the appropriate mission type for this mission run.
software-dev: For building software features, APIs, CLI tools, applications
research: For investigations, literature reviews, technical analysis
Analyze the feature description to identify the primary goal:
Check for explicit mission requests in the user's description:
Confirm with user (unless explicit):
"Based on your description, this sounds like a [software-dev/research] project. I'll use the [mission name] mission. Does that work for you?"
Handle user response:
Handle --mission flag: If the user provides --mission <key> in their command, skip inference and use the specified mission directly.
Store the final mission selection in your notes and include it in the spec output. Do not pass a --mission-type flag to mission creation unless the user explicitly overrides the default.
Planning happens in the project root checkout - NO worktree created!
kitty-specs/<mission_slug>/spec.md directly in project root (the optional NNN- prefix is display-only metadata assigned at merge time)Worktrees created later: After /spec-kitty.tasks finishes, run: spec-kitty next --agent <agent> --mission <handle>. The --mission handle can be the mission's mission_id (ULID), mid8 (first 8 chars), or mission_slug; the resolver disambiguates by mission_id and returns a structured error on ambiguity (no silent fallback). Your agent will call spec-kitty agent action implement WP## --agent <name> for each WP. Each lane gets exactly one worktree, for example .worktrees/<human-slug>-<mid8>-lane-a/ (e.g. .worktrees/my-feature-01J6XW9K-lane-a/).
kitty-specs/<mission_slug>/spec.md (the NNN- prefix is display-only and assigned at merge time)create --json → target_branch)The text the user typed after /spec-kitty.specify in the triggering message is the initial feature description. Capture it verbatim, but treat it only as a starting point for discovery—not the final truth. Your job is to interrogate the request, surface gaps, and co-create a complete specification with the user.
Given that feature description, do this:
[NEEDS CLARIFICATION: …] to at most three critical decisions the user has postponed).Check discovery status:
WAITING_FOR_DISCOVERY_INPUT. Do not surface the table; keep it internal. Do not call the creation command yet.When discovery is complete and the intent summary, title, and mission type are confirmed, run the mission creation command from repo root:
spec-kitty agent mission create "<slug>" --json
Where <slug> is a kebab-case version of the friendly title (e.g., "Checkout Upsell Flow" → "checkout-upsell-flow").
The command returns JSON with:
result: "success" or error messagemission_id: Canonical ULID machine identity (e.g., 01J6XW9KQT7M0YB3N4R5CQZ2EX). Immutable.mission_slug: Human-readable mission slug (e.g., checkout-upsell-flow)mission_number: Display-only numeric prefix, null pre-merge. Assigned at merge time. Never use this as a selector or identity.mission_type: Mission type key (for example software-dev)slug: Unnumbered mission slug (e.g., checkout-upsell-flow)feature_dir: Absolute path to the feature directory inside the main repocurrent_branch: the branch you started fromtarget_branch / base_branch: deterministic branch contract for downstream commandsplanning_base_branch / merge_target_branch: explicit landing-branch aliasesbranch_strategy_summary: human-readable summary of the branch contractParse these values for use in subsequent steps. All file paths are absolute.
IMPORTANT: You must only ever run this command once. The JSON is provided in the terminal output - always refer to it to get the actual paths you're looking for. Immediately restate the branch contract to the user after parsing the JSON:
Stay in the main repository: No worktree is created during specify.
Read the files created by create:
<feature_dir>/spec.md (already created, may be empty/template-filled)<feature_dir>/meta.json (already created with feature identity metadata)Do NOT try to read a template file. The spec structure is defined in this prompt (see sections below). The create command scaffolds an initial spec.md — read it, then update it following the structure in this prompt.
Update <feature_dir>/meta.json only when needed:
create (mission_id, slug, mission_slug, created_at, target_branch). mission_id is the canonical ULID and is immutable. mission_number is display-only and is null pre-merge — do not set it by hand.target_branch aligned to the value from create --json output. Never hardcode main.friendly_name matches the confirmed title.mission_type is correct.source_description.vcs exists ("git" default).Example meta.json schema (identity fields that must be present explicitly):
{
"mission_id": "01J6XW9KQT7M0YB3N4R5CQZ2EX",
"mission_number": null,
"slug": "my-feature",
"mission_slug": "my-feature",
"friendly_name": "My Mission",
"mission_type": "software-dev",
"target_branch": "main",
"vcs": "git",
"created_at": "2026-01-01T00:00:00+00:00"
}
mission_number becomes a concrete integer only at merge time, assigned as
max(existing_numbers)+1 inside the merge-state lock. Selectors disambiguate
by mission_id (or its 8-char prefix mid8), never by mission_number.
Do not regenerate timestamps or directory paths via shell commands.
Generate the specification content by following this flow:
[NEEDS CLARIFICATION: …] when the user explicitly defers the decisionFR-###), Non-Functional (NFR-###), and Constraints (C-###)Update the existing <feature_dir>/spec.md using the template structure, replacing placeholders with concrete details derived from the feature description while preserving section order and headings.
Specification Quality Validation: After writing the initial spec, validate it against quality criteria:
a. Create Spec Quality Checklist: Generate a checklist file at feature_dir/checklists/requirements.md using the checklist template structure with these validation items:
# Specification Quality Checklist: [FEATURE NAME]
**Purpose**: Validate specification completeness and quality before proceeding to planning
**Created**: [DATE]
**Feature**: [Link to spec.md]
## Content Quality
- [ ] No implementation details (languages, frameworks, APIs)
- [ ] Focused on user value and business needs
- [ ] Written for non-technical stakeholders
- [ ] All mandatory sections completed
## Requirement Completeness
- [ ] No [NEEDS CLARIFICATION] markers remain
- [ ] Requirements are testable and unambiguous
- [ ] Requirement types are separated (Functional / Non-Functional / Constraints)
- [ ] IDs are unique across FR-###, NFR-###, and C-### entries
- [ ] All requirement rows include a non-empty Status value
- [ ] Non-functional requirements include measurable thresholds
- [ ] Success criteria are measurable
- [ ] Success criteria are technology-agnostic (no implementation details)
- [ ] All acceptance scenarios are defined
- [ ] Edge cases are identified
- [ ] Scope is clearly bounded
- [ ] Dependencies and assumptions identified
## Feature Readiness
- [ ] All functional requirements have clear acceptance criteria
- [ ] User scenarios cover primary flows
- [ ] Feature meets measurable outcomes defined in Success Criteria
- [ ] No implementation details leak into specification
## Notes
- Items marked incomplete require spec updates before `/spec-kitty.plan`
b. Run Validation Check: Review the spec against each checklist item:
c. Handle Validation Results:
If all items pass: Mark checklist complete and proceed to step 6
If items fail (excluding [NEEDS CLARIFICATION]):
If [NEEDS CLARIFICATION] markers remain:
Extract all [NEEDS CLARIFICATION: ...] markers from the spec
Re-confirm with the user whether each outstanding decision truly needs to stay unresolved. Do not assume away critical gaps.
For each clarification the user has explicitly deferred, present options using plain text—no tables:
Question [N]: [Topic]
Context: [Quote relevant spec section]
Need: [Specific question from NEEDS CLARIFICATION marker]
Options: (A) [First answer — implications] · (B) [Second answer — implications] · (C) [Third answer — implications] · (D) Custom (describe your own answer)
Reply with a letter or a custom answer.
Number questions sequentially (Q1, Q2, Q3 - max 3 total)
Present all questions together before waiting for responses
Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
Re-run validation after all clarifications are resolved
d. Update Checklist: After each validation iteration, update the checklist file with current pass/fail status
Report completion with feature directory, spec file path, checklist results, and readiness for the next phase (/spec-kitty.plan).
NOTE: The script creates and checks out the new branch and initializes the spec file before writing.
When creating this spec from a user prompt:
Examples of reasonable defaults (don't ask about these):
Success criteria must be:
Good examples:
Bad examples (implementation-focused):