Checklist purpose: "unit tests for Chinese"
Key concepts: A checklist isa unit test written for requirements - they verify the quality, clarity, and completeness of requirements in a specific domain.
Not used for verification/testing:
- ❌ Not "verify the button is clicked correctly"
- ❌ Not "test whether error handling works"
- ❌ Not "confirm the API returns 200"
- ❌ Not checking whether the code/implementation conforms to the specification
Used for requirements quality validation:
- ✅ "Are visual hierarchy requirements defined for all card types?" (completeness)
- ✅ "Is 'prominent display' quantified with specific size/positioning?" (clarity)
- ✅ "Are hover state requirements consistent across all interactive elements?" (consistency)
- ✅ "Are accessibility requirements defined for keyboard navigation?" (coverage)
- ✅ "Does the specification define what happens when the logo image fails to load?" (edge case)
Analogy: If your specification is code that has been written, then the checklist is its unit test suite. You are testing whether the requirements are well-written, complete, unambiguous, and ready for implementation - not testing whether the implementation works.
User input
$ARGUMENTS
Youmustconsider user input (if non-empty) before proceeding.
Execution steps
scripts: sh: .specify/scripts/bash/check-prerequisites.sh --json ps: .specify/scripts/powershell/check-prerequisites.ps1 -Json
-
Setup: Run from the repository root
{SCRIPT}and parse the JSON to obtain FEATURE_DIR and the AVAILABLE_DOCS list.- All file paths must be absolute.
- For single quotes in arguments, such as "I'm Groot", use escape syntax: for example 'I'''m Groot' (or use double quotes if possible: "I'm Groot").
-
Clarify intent (dynamic): Derive up to three initial context clarification questions (no preset catalog). They must:
- Be generated from the user's wording + signals extracted from the spec/plan/tasks
- Only ask for information that would substantially change the checklist content
- If already specified in
$ARGUMENTS, skip it separately - Prioritize precision over breadth
Generation algorithm:
- Extract signals: feature domain keywords (e.g., auth, latency, UX, API), risk indicators ("critical", "must", "compliance"), stakeholder hints ("QA", "review", "security team"), and explicit deliverables ("a11y", "rollback", "contracts").
- Cluster the signals into candidate areas of focus (up to 4) sorted by relevance.
- Identify the likely audience and timing (author, reviewer, QA, release) if unclear.
- Detect missing dimensions: scope breadth, depth/rigor, risk focus, exclusion boundaries, measurable acceptance criteria.
- Formulate questions from these archetypes:
- Scope refinement (e.g., "Should this include integration touchpoints with X and Y or stay limited to local module correctness?")
- Risk prioritization (e.g., "Which of these potential risk areas should receive mandatory gating checks?")
- Depth calibration (e.g., "Is this a lightweight pre-commit sanity list or a formal release gate?")
- Audience framing (e.g., "Will this be used only by the author or by peers during PR review?")
- Boundary exclusion (e.g., "Should we explicitly exclude performance tuning items for this round?")
- Scenario class gaps (e.g., "No recovery flows detected—are rollback/partial failure paths in scope?")
Question formatting rules:
- If options are provided, generate a compact table with columns: Option | Candidate | Why It Matters
- Limit to a maximum of A-E options; omit the table if a free-form answer is clearer
- Never ask the user to restate what they have already said
- Avoid speculative categories (no hallucination). If unsure, explicitly ask: "Confirm whether X is in scope."
Defaults when interaction is not possible:
- Depth: Standard
- Audience: Reviewer (PR) if code-related; otherwise Author
- Focus: Top 2 relevance clusters
Output questions (marked Q1/Q2/Q3). After answers: if ≥2 scenario classes (alternative/exception/recovery/non-functional domains) remain unclear, you may ask up to two more targeted follow-up questions (Q4/Q5), each with a one-line rationale (e.g., "Unresolved recovery path risk"). Do not exceed five total questions. Skip escalation if the user explicitly declines more questions.
-
Understand the user request: combined with
$ARGUMENTS+ clarification answers:- Derive checklist topics (e.g., security, review, deployment, user experience)
- Incorporate explicit must-have items mentioned by the user
- Map focus selections to category scaffolding
- Infer any missing context from the spec/plan/tasks (do not hallucinate)
-
Load feature context: read from FEATURE_DIR:
- spec.md: feature requirements and scope
- plan.md (if present): technical details, dependencies
- tasks.md (if present): implementation tasks
Context loading strategy:
- Load only the necessary parts relevant to the active focus areas (avoid full file dumps)
- Prefer summarizing long passages into concise scenario/requirement bullets
- Use progressive disclosure: add follow-up retrieval only when gaps are detected
- If source documents are large, generate intermediate summary items instead of embedding raw text
-
Generate checklist - create "unit tests for requirements":
- If it does not exist, create the
FEATURE_DIR/checklists/directory - Generate a unique checklist filename:
- Use a short domain-based descriptive name (e.g.,
ux.md,api.md,security.md) - Format:
[domain].md - If the file exists, append to the existing file
- Use a short domain-based descriptive name (e.g.,
- Number items sequentially starting from CHK001
- Each
speckit-checklistrun creates a new file (never overwrites an existing checklist)
Core principle - test requirements, not implementation: Each checklist item must evaluate the requirement itself:
- Completeness: Are all necessary requirements present?
- Clarity: Are the requirements clear and specific?
- Consistency: Are the requirements aligned with each other?
- Measurability: Can the requirements be objectively verified?
- Coverage: Are all scenarios/edge cases addressed?
Category structure - Group items by requirement quality dimension:
- Requirement completeness(Are all necessary requirements documented?)
- Requirement clarity(Are the requirements specific and unambiguous?)
- Requirement consistency(Are the requirements aligned without conflicts?)
- Acceptance criteria quality(Are the success criteria measurable?)
- Scenario coverage(Are all flows/cases addressed?)
- Edge case coverage(Are boundary conditions defined?)
- Non-functional requirements(Performance, security, accessibility, etc. - are they specified?)
- Dependencies and assumptions(Are they documented and verified?)
- Ambiguities and conflicts(What needs clarification?)
How to write checklist items - "unit tests for English":
❌ Wrong(testing implementation):
- "Verify the landing page displays 3 episode cards"
- "Test whether the desktop hover state works"
- "Confirm that clicking the logo navigates to the home page"
✅ Correct(testing requirement quality):
- "Is the exact number and layout of featured episodes clearly specified?" [Completeness]
- "Is 'prominently displayed' quantified with specific dimensions/positioning?" [Clarity]
- "Are the hover state requirements consistent for all interactive elements?" [Consistency]
- "Are keyboard navigation requirements defined for all interactive UI?" [Coverage]
- "Is fallback behavior specified when the logo image fails to load?" [Edge case]
- "Are loading states defined for asynchronous episode data?" [Completeness]
- "Does the specification define the visual hierarchy of competing UI elements?" [Clarity]
Item structure: Each item should follow this pattern:
- Ask a question about requirement quality
- Focus on what is written (or not written) in the spec/plan
- Include the quality dimension in brackets [Completeness/Clarity/Consistency, etc.]
- Reference the spec section when checking existing requirements
[Spec §X.Y] - Use
[Gap]to mark missing requirements
Examples by quality dimension:
Completeness:
- "Are error handling requirements defined for all API failure modes? [Gap]"
- "Are accessibility requirements specified for all interactive elements? [Completeness]"
- "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
Clarity:
- "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
- "Are the selection criteria for 'related episodes' clearly defined? [Clarity, Spec §FR-5]"
- "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
Consistency:
- "Are the navigation requirements aligned across all pages? [Consistency, Spec §FR-10]"
- "Are the card component requirements consistent between the landing page and the detail page? [Consistency]"
Coverage:
- "Are requirements defined for the zero-state scenario (no episodes)? [Coverage, Edge Case]"
- "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
- "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
Measurability:
- "Are the visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
- "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
Scenario Classification and Coverage(Requirement Quality Focus):
- Check whether requirements exist: primary, alternative, exception/error, recovery, non-functional scenarios
- For each scenario category, ask: "Are the [scenario type] requirements complete, clear, and consistent?"
- If a scenario category is missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
- Include resilience/rollback for state changes: "Are rollback requirements defined for migration failures? [Gap]"
Traceability Requirements:
- Minimum requirement: ≥80% of items must contain at least one traceability reference
- Each item should reference: spec section
[Spec §X.Y], or use the marker:[Gap]、[Ambiguity]、[Conflict]、[Assumption] - If no ID system exists: "Has an ID scheme for requirements and acceptance criteria been established? [Traceability]"
Surfacing and Resolving Issues(Requirement Quality Issues): Ask questions about the requirements themselves:
- Ambiguity: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
- Conflict: "Do the navigation requirements in §FR-10 and §FR-10a conflict? [Conflict]"
- Assumption: "Has the assumption of an 'always-available podcast API' been verified? [Assumption]"
- Dependency: "Are the external podcast API requirements documented? [Dependency, Gap]"
- Missing Definition: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
Content Consolidation:
- Soft cap: if raw candidate items > 40, prioritize by risk/impact
- Merge near-duplicates that check the same requirement aspect
- If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in the requirements? [Coverage]"
🚫 Absolutely Forbidden - These make it an implementation test, not a requirements test:
- ❌ Any item starting with "verify", "test", "confirm", "check" + implementation behavior
- ❌ References to code execution, user actions, system behavior
- ❌ "displays correctly", "works properly", "functions as expected"
- ❌ "click", "navigate", "render", "load", "execute"
- ❌ Test cases, test plans, QA procedures
- ❌ Implementation details (frameworks, APIs, algorithms)
✅ Required pattern - These test requirements quality:
- ✅ "Is [requirement type] defined/specified/documented for [scenario]?"
- ✅ "Is [ambiguous term] quantified/clarified with specific criteria?"
- ✅ "Are requirements for [part A] and [part B] consistent?"
- ✅ "Can [requirement] be objectively measured/verified?"
- ✅ "Is [edge case/scenario] addressed in the requirements?"
- ✅ "Does the spec define [missing aspect]?"
- If it does not exist, create the
-
Structure reference: Generate the checklist according to the spec template in
.specify/templates/checklist-template.md, including title, meta section, category headings, and ID format. If the template is unavailable, use: H1 title, Purpose/Created meta lines, containing- [ ] CHK### <要求项目>lines in the##category sections, with globally incrementing IDs starting from CHK001. -
Report: Output the full path of the created checklist, item count, and remind the user that each run creates a new file. Summary:
- Chosen focus area
- Depth level
- Participants/timing
- Any explicitly specified required items included by the user
Important: Each speckit-checklist command invocation creates a checklist file with a short descriptive name, unless the file already exists. This allows:
- Multiple checklists of different types (e.g.,
ux.md,test.md,security.md) - Simple, memorable file names indicating the checklist purpose
- Easy identification and navigation in the
checklists/folder
To avoid confusion, use descriptive types and clean up outdated checklists after completion.
Example checklist types and example items
User experience requirements quality: ux.md
Example items (test requirements, not implementation):
- "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]"
- "Are the number and positioning of UI elements clearly defined? [Completeness, Spec §FR-1]"
- "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]"
- "Are accessibility requirements specified for all interactive elements? [Coverage, Gap]"
- "Is fallback behavior defined when images fail to load? [Edge case, Gap]"
- "Can 'prominently displayed' be objectively measured? [Measurability, Spec §FR-4]"
API requirements quality: api.md
Example items:
- "Are error response formats specified for all failure scenarios? [Completeness]"
- "Are rate limiting requirements quantified with specific thresholds? [Clarity]"
- "Are authentication requirements consistent across all endpoints? [Consistency]"
- "Are retry/timeout requirements defined for external dependencies? [Coverage, Gap]"
- "Is the version control strategy documented in the requirements? [Gap]"
Performance requirement quality: performance.md
Example project:
- "Are performance requirements quantified with specific metrics? [Clarity]"
- "Are performance targets defined for all critical user journeys? [Coverage]"
- "Are performance requirements specified for different load conditions? [Completeness]"
- "Can the performance requirements be measured objectively? [Measurability]"
- "Are degradation requirements defined for high-load scenarios? [Edge case, Gap]"
Security requirement quality: security.md
Example project:
- "Are authentication requirements specified for all protected resources? [Coverage]"
- "Are data protection requirements defined for sensitive information? [Completeness]"
- "Is the threat model documented and aligned with the requirements? [Traceability]"
- "Are the security requirements consistent with compliance obligations? [Consistency]"
- "Are security failure/breach response requirements defined? [Gap, Exception flow]"
Counterexamples: what not to do
❌ Wrong - these test the implementation, not the requirements:
- [ ] CHK001 - 验证着陆页显示 3 个剧集卡片 [Spec §FR-001]
- [ ] CHK002 - 测试桌面端悬停状态是否正确工作 [Spec §FR-003]
- [ ] CHK003 - 确认徽标点击导航到主页 [Spec §FR-010]
- [ ] CHK004 - 检查相关剧集部分显示 3-5 个项目 [Spec §FR-005]
✅ Correct - these test requirement quality:
- [ ] CHK001 - 是否明确定义了特色剧集的数量和布局? [完整性, Spec §FR-001]
- [ ] CHK002 - 是否为所有交互元素一致定义了悬停状态要求? [一致性, Spec §FR-003]
- [ ] CHK003 - 是否为所有可点击品牌元素明确了导航要求? [清晰度, Spec §FR-010]
- [ ] CHK004 - 是否记录了相关剧集的选择标准? [Gap, Spec §FR-005]
- [ ] CHK005 - 是否为异步剧集数据定义了加载状态要求? [Gap]
- [ ] CHK006 - 是否可以客观测量"视觉层次"要求? [可测量性, Spec §FR-001]
Key differences:
- Wrong: testing whether the system works correctly
- Correct: testing whether the requirements are written correctly
- Wrong: behavior verification
- Correct: requirement quality verification
- Wrong: "Does it do X?"
- Correct: "Is X clearly defined?"