Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Identify and resolve ambiguities in specifications through structured questioning. Use when specification has [NEEDS CLARIFICATION] markers, when user mentions unclear or ambiguous requirements, before creating implementation plans, or when planning reveals specification gaps.
.claude/skills/majiayu000-specification-clarification/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 234% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 460% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 224% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 167% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 206% | 0% |
@.claude/shared-imports/constitution.md @.claude/shared-imports/memory-utils.md @.claude/templates/clarification-checklist.md
SDD Phase: Phase 4 (Conditional - only if spec has ambiguities) Command: /clarify Prerequisites: specs/$FEATURE/spec.md with NEEDS CLARIFICATION] markers Creates: Updated specs/$FEATURE/spec.md (resolved ambiguities) Predecessor: Phase 3 - /feature → spec.md Successor: Phase 5 - /plan → plan.md
Phase 1: /define-product → memory/product.md
Phase 2: /generate-constitution → memory/constitution.md
Phase 3: /feature → specs/$FEATURE/spec.md
Phase 4: /clarify (if needed) → updated spec.md (YOU ARE HERE) + consults memory/ for existing patterns
Phase 5: /plan → plan.md + research.md + data-model.md
Phase 6: /tasks (auto) → tasks.md
Phase 7: /audit (auto) → audit-report.md
Phase 8: /implement → code + tests + verification$FEATURE format: NNN-feature-name (e.g., 001-therapy-app)
When to Use: This phase is CONDITIONAL. Only invoked when:
Purpose: Systematically eliminate ambiguity from specifications through structured questioning before implementation planning.
Constitutional Authority: Article IV (Specification-First Development), Article V (Template-Driven Quality)
| Workflow | Key Activities | Output | |----------|---------------|--------| | Clarification | Load spec → Scan ambiguities → Prioritize → Ask questions → Update incrementally | spec.md (resolved) | | Validation | Verify consistency → Update coverage → Report completion | Readiness status |
Detailed Workflows:
Examples:
References:
See: @.claude/skills/clarify-specification/workflows/clarification-workflow.md
Summary:
Step 1.1: Read current specification from specs/<feature>/spec.md
Step 1.2: Scan against 10+ ambiguity categories:
Step 1.3: Assess coverage for each category:
Coverage Formula:
Coverage := ∑(c_i) where c_i ∈ {clear: 10, partial: 5, missing: 0}
Readiness := Coverage / (10 × num_categories) ≥ 70%Step 2.1: Extract existing NEEDS CLARIFICATION] markers (Article IV limit: max 3)
Step 2.2: Prioritize by impact (Article IV order):
Maximum 5 Questions Per Iteration (Article IV requirement)
Step 2.3: Generate questions with structured format:
Step 3.1: Present questions sequentially (ONE AT A TIME for complex topics)
Step 3.2: Capture user response with rationale and additional context
Step 3.3: Update specification incrementally AFTER EACH answer:
Critical: Incremental updates prevent contradictions and lost context
Step 4.1: Verify consistency (no conflicts between new and existing requirements)
Step 4.2: Update clarification checklist with resolved categories
Step 4.3: Report completion:
✓ Clarification complete: N questions resolved
✓ Updated specification with specific requirements
✓ Remaining ambiguities: M markers (≤3 per Article IV)Readiness Gate: Coverage ≥ 70% AND ≤ 3 NEEDS CLARIFICATION] markers remaining
Next Step: Use create-implementation-plan skill to define HOW
Trigger clarification again if:
Each iteration: Max 5 new questions, focus on highest-priority gaps, update incrementally
DO NOT:
DO:
See: @.claude/skills/clarify-specification/examples/clarification-example.md
Summary:
Input: Specification with 4 NEEDS CLARIFICATION] markers (exceeds limit), vague acceptance criteria
Process:
Output:
Time Investment: 15-20 minutes of clarification saved hours of rework
Before using this skill:
Depends On:
Integrates With:
Tool Dependencies:
After clarification completes, typical progression:
If all ambiguities resolved:
clarify-specification (resolves ambiguities)
↓
create-implementation-plan (user invokes /plan or auto-triggered)
↓
generate-tasks (auto-invoked)
↓
/audit (auto-invoked)If new ambiguities discovered during planning:
create-implementation-plan (finds gaps)
↓
clarify-specification (invoked again)
↓
create-implementation-plan (continues after resolution)User Action Required:
Outputs Modified:
specs/$FEATURE/spec.md - Updated incrementally with clarificationsCommands:
This skill operates in the main conversation context but may be invoked by other agents when they encounter ambiguities.
User-Initiated (most common):
User notices ambiguity → runs /clarify → clarify-specification skill executesAgent-Initiated (during planning):
implementation-planner agent (finds ambiguity during plan creation)
↓ invokes
clarify-specification skill via instruction
↓ returns
Updated spec.md with resolved ambiguityWhen: If clarification requires understanding existing codebase patterns for evidence-based recommendations
Agent: code-analyzer
Example Task Tool Invocation:
python# If clarification needs code analysis for evidence Task( subagent_type="code-analyzer", description="Analyze existing authentication patterns", prompt=""" @.claude/agents/code-analyzer.md Analyze existing authentication in codebase to inform clarification question about auth strategy. Use project-intel.mjs to find auth patterns. Output: What auth patterns exist (OAuth, JWT, sessions, etc.) """ )
Use Case: When user asks "What auth should we use?", analyzer provides evidence from existing patterns
Typical Flow:
clarify-specification (resolves all ambiguities)
↓ updates
spec.md (all [NEEDS CLARIFICATION] removed)
↓ ready for
create-implementation-plan skillIterative Flow (if planner discovers new ambiguities):
implementation-planner (finds gap while planning)
↓ invokes
clarify-specification (targeted question on gap)
↓ user answers
↓ updates spec.md
↓ returns to
implementation-planner (continues planning)This skill typically does NOT use Task tool directly. It:
Design Rationale:
See: @.claude/skills/clarify-specification/references/failure-modes.md
Summary of Common Failures:
Diagnostic Workflow: Check Article IV compliance → Question quality → Update process → Answer quality → Evidence → Stopping conditions
Direct Integration:
Workflow Context:
Quality Gates:
Workflow Diagram:
specify-feature (creates spec.md with 0-3 [NEEDS CLARIFICATION] markers)
↓ (if markers exist OR ambiguities detected)
clarify-specification (resolves ambiguities, max 5 questions/iteration)
↓ (when all resolved)
create-implementation-plan (can proceed without specification gaps)Re-Clarification Trigger: If create-implementation-plan discovers new gaps, it can trigger clarify-specification again for iterative refinement
Version: 1.2.0 Last Updated: 2025-01-19 Change Log:
Other measured skills in the registry, with their headline benchmark lift.