con un clic
speckit-clarify
Wrap core clarification with spec-only ambiguity resolution.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Wrap core clarification with spec-only ambiguity resolution.
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
| name | speckit-clarify |
| description | Wrap core clarification with spec-only ambiguity resolution. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"workflow-preset:.composed/speckit.clarify.md"} |
This wrapper must not redefine core-owned User Input, Pre-Execution Checks, extension hooks, base path resolution, or core file handling.
Use spec.md as the clarification source. Ask and record clarification only for requirement ambiguity that affects product behavior, constraints, non-functional requirement assumptions, acceptance criteria, user roles, permissions, entity states, data semantics, exceptions, validation rules, or boundaries.
Do not read or update behavior draft artifacts. Do not use behavior drafts as clarification inputs, and do not open a separate behavior-question channel. Product requirements stay in spec.md; update spec.md only after user-provided answers make the requirement clear.
Treat $ARGUMENTS as prioritization context for the current clarification run. Do not ask the user to restate requirements already present in spec.md.
Load the active spec.md through the core command. Official hooks still apply: hooks.before_clarify runs before Outline, hooks.after_clarify runs before Completion Report, and mandatory hooks emit EXECUTE_COMMAND. If spec.md is missing, follow the core command error path and do not create a new spec here.
When spec.md was created from Design Requirement Intake or provider-specific evidence such as a Figma Evidence Packet, prioritize clarification questions for design-derived gaps already written in spec.md. Scan spec.md first for Missing / Needs Clarification, [NEEDS CLARIFICATION], Inferred from Structure, and gaps about provider-unprovided states, responsive behavior, business rules, permissions, and error handling.
Do not call Figma MCP. Do not re-extract design facts, re-parse Figma links, or turn clarification into a Figma extraction step. /speckit.specify owns writing qualified evidence-backed design-derived requirements and trace refs into spec.md; it does not write raw Figma evidence into spec.md. /speckit.clarify only selects high-impact questions from existing spec.md gaps and records confirmed answers. Do not ask the user to fix provider extraction artifacts.
Ask at most 5 high-impact questions whose answers materially affect requirements, implementation planning, or validation readiness. Maximum of 5 total questions. Present EXACTLY ONE question at a time. Do NOT output them all at once. Never reveal future queued questions.
Format recommendations as **Recommended:** Option [X] - <brief rationale> when a discrete 2-5 option choice is available. Keep the rationale short and decision-focused. For short-answer gaps, use Suggested and constrain answers to <=5 words. Accept yes, recommended, or suggested as approval of the shown recommendation. Question selection order:
spec.md.After each accepted answer, write confirmed answers back into spec.md in the relevant Requirements, User Scenarios, Acceptance Criteria, Assumptions, Open Questions, or visual/responsive/state sections. Ensure ## Clarifications, ### Session YYYY-MM-DD, and one - Q: ... -> A: ... bullet exist for the session. Save spec.md after each accepted answer. Do not create a separate Figma clarification document.
Do not generate visual restoration checklists. Clarification fills requirement gaps in spec.md; /speckit.checklist remains responsible for checking requirement text quality and readiness.
Run validation after EACH write plus final pass. Confirm the accepted answer appears once in spec.md, Total asked questions is at most 5, the targeted ambiguity is removed or replaced, no contradictory earlier statement remains, and heading structure is preserved.
Do not update checklist artifacts. After each spec.md write, report checklist impact as unresolved readiness context for /speckit.checklist.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Check for extension hooks (before clarification):
.specify/extensions.yml exists in the project root.hooks.before_clarify keyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: true):
## Extension Hooks
**Optional Pre-Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
optional: false):
## Extension Hooks
**Automatic Pre-Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
Wait for the result of the hook command before proceeding to the Outline.
After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook..specify/extensions.yml does not exist, skip silentlyGoal: 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:
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:
FEATURE_DIRFEATURE_SPECIMPL_PLAN, TASKS for future chained flows.)/speckit-specify or verify feature branch environment.IF EXISTS: Load .specify/memory/constitution.md for project principles and governance constraints.
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:
Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
Sequential questioning loop (interactive):
Present EXACTLY ONE question at a time.
For multiple‑choice questions:
**Recommended:** Option [X] - <reasoning>| Option | Description |
|---|---|
| A | |
| B | |
| C | (add D/E as needed up to 5) |
| Short | Provide a different short answer (<=5 words) (Include only if free-form alternative is appropriate) |
You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.For short‑answer style (no meaningful discrete options):
**Suggested:** <your proposed answer> - <brief reasoning>Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.After the user answers:
Stop asking further questions when:
Never reveal future queued questions in advance.
If no valid questions exist at start, immediately report no critical ambiguities.
Integration after EACH accepted answer (incremental update approach):
## Clarifications section exists (create it just after the highest-level contextual/overview section per the spec template if missing).### Session YYYY-MM-DD subheading for today.- Q: <question> → A: <final answer>.(formerly referred to as "X") once.Validation (performed after EACH write plus final pass):
## Clarifications, ### Session YYYY-MM-DD.Write the updated spec back to FEATURE_SPEC.
Re-validate Spec Quality Checklist (if it exists):
FEATURE_DIR/checklists/requirements.md exists.- [ ], - [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).[ ] to [x].[x]/[X] to [ ].[ ]/[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.Behavior rules:
/speckit-specify first (do not create a new spec here).Context for prioritization: $ARGUMENTS
You MUST complete this section before reporting completion to the user.
Check if .specify/extensions.yml exists in the project root.
hooks.after_clarify, skip to the Completion Report.hooks.after_clarify key.enabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementationoptional flag:
optional: false) — You MUST emit EXECUTE_COMMAND: for each mandatory hook:
## Extension Hooks
**Automatic Hook**: {extension}
Executing: `/{command}`
EXECUTE_COMMAND: {command}
After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal {command} id shown above, e.g. a skills-mode agent runs it as /skill:speckit-... or $speckit-...). Emitting the block alone does not run the hook.optional: true):
## Extension Hooks
**Optional Hook**: {extension}
Command: `/{command}`
Description: {description}
Prompt: {prompt}
To execute: `/{command}`
Report completion (after questioning loop ends or early termination):
FEATURE_DIR/checklists/requirements.md was re-validated): show before/after pass counts (e.g., "Spec Quality Checklist: 12/16 → 15/16 items passing") and list any items that changed state — both newly checked (unchecked → checked) and any regressions (checked → unchecked). If any items remain unchecked, list them as areas needing attention./speckit-plan or run /speckit-clarify again later post-plan.FEATURE_DIR/checklists/requirements.md exists)Before finishing, report answered questions, spec.md sections updated, and any unresolved requirement ambiguity that still blocks checklist readiness.
spec.md.Wrap core analysis with behavior-first vertical consistency checks.
Apply approved architecture refactors by updating plan and task artifacts directly.
Perform a framework-agnostic architecture review validating implementation against spec.md, plan.md, tasks.md, and the governance and architecture constitutions.
Perform an architecture-aware verification gate validating implementation against spec.md, plan.md, tasks.md, and the Architecture Constitution.
Run a single architecture workflow that prefers memory-first context and can incorporate security review when available.
Run implementation with memory context, then review the produced implementation against security and architecture constraints.