Speckit specify

From foryourhealth111-pixel/Vibe-Skills · View interactive version

Speckit specify is an AI agent skill from the GitHub repository foryourhealth111-pixel/Vibe-Skills. Create or update feature specifications from natural language descriptions. Use when starting new features or refining requirements. Generates spec.md with user stories, functional requirements, and acceptance criteria following spec-driven development methodology.

How to use this skill

Skill file

Speckit Specify Skill

User Input

$ARGUMENTS

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

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 branch:
  1. Check for existing branches before creating new one:

a. First, fetch all remote branches to ensure we have the latest information:

```bash

git fetch --all --prune

```

b. Find the highest feature number across all sources for the short-name:

c. Determine the next available number:

d. Run the script .specify/scripts/powershell/create-new-feature.ps1 -Json "$ARGUMENTS" with the calculated number and short-name:

IMPORTANT:

  1. Load .specify/templates/spec-template.md to understand required sections.
  1. Follow this execution flow:

1. Parse user description from Input

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 FEATURE_DIR/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 with branch name, spec file path, checklist results, and readiness for the next phase (/speckit.clarify or /speckit.plan).

NOTE: The script creates and checks out the new branch and initializes the spec file before writing.

General Guidelines

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.