Identify and resolve ambiguities in specifications through structured questioning...
@.claude/shared-imports/constitution.md @.claude/templates/clarification-checklist.md
Purpose: Systematically eliminate ambiguity from specifications through structured questioning before implementation planning.
Constitutional Authority: Article IV (Specification-First Development), Article V (Template-Driven Quality)
Identify current feature from SessionStart hook context or user input.
Read specs/<feature-number>-<name>/spec.md
Use @.claude/templates/clarification-checklist.md categories:
10+ Ambiguity Categories:
For each category, assess coverage:
Output: Coverage matrix showing which categories need clarification
Count existing markers in specification (Article IV limit: max 3).
Priority Order (Article IV, Section 4.2):
Maximum 5 Questions Per Iteration (Article IV requirement)
Each question MUST include:
Example:
**Question 1: Authentication Method** (Priority: Security)
Context: Specification mentions "user login" but doesn't specify authentication approach.
Question: How should users authenticate?
Options:
A) Email/password (simplest, industry standard)
B) Social login only (Google, GitHub - reduces friction)
C) Both email/password + social (maximum flexibility)
Recommendation: Option C provides flexibility while maintaining control.
Impact: Affects data model (user table schema), security requirements (password hashing, OAuth), and UX flow (login screens).
Intelligence Evidence:
- project-intel.mjs found: src/auth/login.tsx:12 (existing email/password flow)
- Recommendation aligns with existing pattern
ONE QUESTION AT A TIME for complex topics (Article IV requirement).
Present question with:
Record answer with rationale:
**Answer to Q1**: Option C (both methods)
**Rationale**: Need to support existing email users while enabling social login for new users.
**Additional Context**: Google and GitHub OAuth only (not Facebook).
After EACH answer:
Example Update:
## Functional Requirements
- **FR-001**: System MUST support email/password authentication
- **FR-002**: System MUST support OAuth2 social login (Google, GitHub)
- **FR-003**: Users MUST be able to link multiple auth methods to one account
Remove:
- **FR-XXX**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified]
Check for contradictions:
Mark categories as Clear after resolution:
## Clarification Status
| Category | Status | Notes |
|----------|--------|-------|
| Functional Scope | Clear | All features defined |
| Domain Model | Clear | User/Auth entities specified |
| UX Flow | Clear | Login/register flows documented |
| Non-Functional | Partial | Need performance targets |
| Integration | Clear | Google/GitHub OAuth |
...
Output:
ā Clarification complete: <N> questions resolved
Resolved:
- Q1: Authentication method ā Email/password + Social (Google, GitHub)
- Q2: User roles ā Admin, User, Guest with specified permissions
- Q3: Data retention ā 90 days for inactive accounts
Updated Specification:
- Added FR-001 through FR-008 (authentication requirements)
- Updated User Stories with auth flow details
- Removed all [NEEDS CLARIFICATION] markers
Remaining Ambiguities: 0 (ready for planning)
Next Step: Use create-implementation-plan skill to define HOW
Trigger clarification again if:
Each iteration:
DO NOT:
DO:
Input: Specification with markers:
- **FR-004**: System MUST handle [NEEDS CLARIFICATION: concurrent user limit?]
- **FR-005**: Data MUST be stored [NEEDS CLARIFICATION: how long?]
- **FR-006**: Errors MUST be [NEEDS CLARIFICATION: logged where?]
Phase 1: Scan shows Missing coverage for:
Phase 2: Generate 3 questions (all markers + 1 gap):
Q1: Concurrent User Limit (Priority: Technical/NFR)
Options:
A) 100 concurrent users (small team)
B) 1,000 concurrent users (department)
C) 10,000+ concurrent users (enterprise)
Recommendation: B (1,000) based on "department-scale" in problem statement
Q2: Data Retention Policy (Priority: Security/Compliance)
Options:
A) 30 days (minimal retention)
B) 90 days (standard)
C) Indefinite (until user deletes)
Recommendation: B (90 days) balances compliance and user needs
Q3: Error Logging Destination (Priority: Technical)
Options:
A) File-based logging (local files)
B) Centralized logging service (Sentry, DataDog)
C) Both (files + service)
Recommendation: C (both) for redundancy
Additional Gap:
Q4: Response Time Target (Priority: NFR)
Options:
A) < 200ms p95 (fast)
B) < 500ms p95 (standard)
C) < 1000ms p95 (acceptable)
Recommendation: B (500ms) standard for web apps
Phase 3: Present Q1, get answer (Option B), update spec:
- **FR-004**: System MUST support 1,000 concurrent users with < 500ms p95 latency
Phase 4: After all questions resolved:
ā 4 questions resolved
ā 0 [NEEDS CLARIFICATION] markers remaining
ā Specification ready for implementation planning
Skill Version: 1.0.0 Last Updated: 2025-10-19