Speckit specify

From racecraft-lab/Paddock · View interactive version

Speckit specify is an AI agent skill from the GitHub repository racecraft-lab/Paddock. Create or update the feature specification from a natural language feature description.

How to use this skill

Skill file

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Pre-Execution Checks

Check for extension hooks (before specification):

```

## Extension Hooks

Optional Pre-Hook: {extension}

Command: /{command}

Description: {description}

Prompt: {prompt}

To execute: /{command}

```

```

## Extension Hooks

Automatic Pre-Hook: {extension}

Executing: /{command}

EXECUTE_COMMAND: {command}

Wait for the result of the hook command before proceeding to the Outline.

```

Outline

The text the user typed after /speckit-specify in the triggering message is the feature description. Assume you always have it available in this conversation even if $ARGUMENTS appears literally below. Do not ask the user to repeat it unless they provided an empty command.

Given that feature description, do this:

  1. Generate a concise short name (2-4 words) for the feature:
  1. Branch creation (optional, via hook):

If a before_specify hook ran successfully in the Pre-Execution Checks above, it will have created/switched to a git branch and output JSON containing BRANCH_NAME and FEATURE_NUM. Note these values for reference, but the branch name does not dictate the spec directory name.

If the user explicitly provided GIT_BRANCH_NAME, pass it through to the hook so the branch script uses the exact value as the branch name (bypassing all prefix/suffix generation).

  1. Create the spec feature directory:

Specs live under the default specs/ directory unless the user explicitly provides SPECIFY_FEATURE_DIRECTORY.

Resolution order for SPECIFY_FEATURE_DIRECTORY:

1. If the user explicitly provided SPECIFY_FEATURE_DIRECTORY (e.g., via environment variable, argument, or configuration), use it as-is

2. Otherwise, auto-generate it under specs/:

Create the directory and spec file:

```json

{

"feature_directory": "<resolved feature dir>"

}

```

Write the actual resolved directory path value (for example, specs/003-user-auth), not the literal string SPECIFY_FEATURE_DIRECTORY.

This allows downstream commands (/speckit-plan, /speckit-tasks, etc.) to locate the feature directory without relying on git branch name conventions.

IMPORTANT:

  1. Load the resolved active spec-template file to understand required sections.
  1. Follow this execution flow:

1. Parse user description from arguments

If empty: ERROR "No feature description provided"

2. Extract key concepts from description

Identify: actors, actions, data, constraints

3. For unclear aspects:

4. Fill User Scenarios & Testing section

If no clear user flow: ERROR "Cannot determine user scenarios"

5. Generate Functional Requirements

Each requirement must be testable

Use reasonable defaults for unspecified details (document assumptions in Assumptions section)

6. Define Success Criteria

Create measurable, technology-agnostic outcomes

Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)

Each criterion must be verifiable without implementation details

7. Identify Key Entities (if data involved)

8. Return: SUCCESS (spec ready for planning)

  1. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
  1. Specification Quality Validation: After writing the initial spec, validate it against quality criteria:

a. Create Spec Quality Checklist: Generate a checklist file at SPECIFY_FEATURE_DIRECTORY/checklists/requirements.md using the checklist template structure with these validation items:

```markdown

# Specification Quality Checklist: [FEATURE NAME]

Purpose: Validate specification completeness and quality before proceeding to planning

Created: [DATE]

Feature: [Link to spec.md]

## Content Quality

## Requirement Completeness

## Feature Readiness

## Notes

```

b. Run Validation Check: Review the spec against each checklist item:

c. Handle Validation Results:

1. List the failing items and specific issues

2. Update the spec to address each issue

3. Re-run validation until all items pass (max 3 iterations)

4. If still failing after 3 iterations, document remaining issues in checklist notes and warn user

1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec

2. LIMIT CHECK: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest

3. For each clarification needed (max 3), present options to user in this format:

```markdown

## Question [N]: [Topic]

Context: [Quote relevant spec section]

What we need to know: [Specific question from NEEDS CLARIFICATION marker]

Suggested Answers:

| Option | Answer | Implications |

|--------|--------|--------------|

| A | [First suggested answer] | [What this means for the feature] |

| B | [Second suggested answer] | [What this means for the feature] |

| C | [Third suggested answer] | [What this means for the feature] |

| Custom | Provide your own answer | [Explain how to provide custom input] |

Your choice: _[Wait for user response]_

```

4. CRITICAL - Table Formatting: Ensure markdown tables are properly formatted:

5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)

6. Present all questions together before waiting for responses

7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")

8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer

9. Re-run validation after all clarifications are resolved

d. Update Checklist: After each validation iteration, update the checklist file with current pass/fail status

  1. Report completion to the user with:
  1. Check for extension hooks: After reporting completion, check if .specify/extensions.yml exists in the project root.

```

## Extension Hooks

Optional Hook: {extension}

Command: /{command}

Description: {description}

Prompt: {prompt}

To execute: /{command}

```

```

## Extension Hooks

Automatic Hook: {extension}

Executing: /{command}

EXECUTE_COMMAND: {command}

```

NOTE: Branch creation is handled by the before_specify hook (git extension). Spec directory and file creation are always handled by this core command.

Quick Guidelines

Section Requirements

For AI Generation

When creating this spec from a user prompt:

  1. Make informed guesses: Use context, industry standards, and common patterns to fill gaps
  2. Document assumptions: Record reasonable defaults in the Assumptions section
  3. Limit clarifications: Maximum 3 [NEEDS CLARIFICATION] markers - use only for critical decisions that:
  1. Prioritize clarifications: scope > security/privacy > user experience > technical details
  2. Think like a tester: Every vague requirement should fail the "testable and unambiguous" checklist item
  3. Common areas needing clarification (only if no reasonable default exists):

Examples of reasonable defaults (don't ask about these):

Success Criteria Guidelines

Success criteria must be:

  1. Measurable: Include specific metrics (time, percentage, count, rate)
  2. Technology-agnostic: No mention of frameworks, languages, databases, or tools
  3. User-focused: Describe outcomes from user/business perspective, not system internals
  4. Verifiable: Can be tested/validated without knowing implementation details

Good examples:

Bad examples (implementation-focused):

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.