Speckit clarify

From racecraft-lab/Paddock · View interactive version

Speckit clarify is an AI agent skill from the GitHub repository racecraft-lab/Paddock. Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.

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 clarification):

```

## 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

Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec file.

Note: This clarification workflow is expected to run (and be completed) BEFORE invoking /speckit-plan. If the user explicitly states they are skipping clarification (e.g., exploratory spike), you may proceed, but must warn that downstream rework risk increases.

Execution steps:

  1. Run .specify/scripts/bash/check-prerequisites.sh --json --paths-only from repo root once (combined --json --paths-only mode / -Json -PathsOnly). Parse minimal JSON payload fields:
  1. IF EXISTS: Load .specify/memory/constitution.md for project principles and governance constraints.
  1. Load the current spec file. Perform a structured ambiguity & coverage scan using this taxonomy. For each category, mark status: Clear / Partial / Missing. Produce an internal coverage map used for prioritization (do not output raw map unless no questions will be asked).

Functional Scope & Behavior:

Domain & Data Model:

Interaction & UX Flow:

Non-Functional Quality Attributes:

Integration & External Dependencies:

Edge Cases & Failure Handling:

Constraints & Tradeoffs:

Terminology & Consistency:

Completion Signals:

Misc / Placeholders:

For each category with Partial or Missing status, add a candidate question opportunity unless:

  1. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
  1. Sequential questioning loop (interactive):

1. If the current Codex mode exposes the request_user_input tool, call it with a single question:

2. If there are more than three meaningful choices, keep the top three by impact and uncertainty, and make clear that the free-form escape hatch can provide a different short answer.

3. If request_user_input is unavailable, ask exactly one plain-text question and wait for the reply. Render the recommendation first, then a compact lettered list; do not use a Markdown table.

  1. Integration after EACH accepted answer (incremental update approach):
  1. Validation (performed after EACH write plus final pass):
  1. Write the updated spec back to FEATURE_SPEC.
  1. Re-validate Spec Quality Checklist (if it exists):

1. Read the checklist file.

2. Identify all GitHub task-list checkbox lines — lines matching - [ ], - [x], or - [X] (case-insensitive, tolerant of leading whitespace for nested items) outside of code fences. Ignore all other content (headings, notes, non-checkbox bullets, metadata).

3. For each checkbox line, record its current marker state (checked or unchecked) and item text into a before-snapshot list.

4. Re-evaluate each checkbox item against the updated spec (the version just saved in step 7).

5. For each checkbox item, update only if the checked/unchecked state actually changes:

6. Save the updated checklist file. Only toggle the [ ]/[x] marker portion of checkbox lines whose state changed. All other file content — headings, metadata, notes, line ordering, whitespace — must remain unchanged to avoid noisy diffs.

7. Compare the before-snapshot with the current state to compute three lists for the Completion Report:

8. Record the before/after pass counts as checked/total checkbox items (e.g., "12/16 → 15/16 items passing").

Behavior rules:

Context for prioritization: $ARGUMENTS

Mandatory Post-Execution Hooks

You MUST complete this section before reporting completion to the user.

Check if .specify/extensions.yml exists in the project root.

```

## Extension Hooks

Automatic Hook: {extension}

Executing: /{command}

EXECUTE_COMMAND: {command}

```

```

## Extension Hooks

Optional Hook: {extension}

Command: /{command}

Description: {description}

Prompt: {prompt}

To execute: /{command}

```

Completion Report

Report completion (after questioning loop ends or early termination):

Done When

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.