evalforge-maestro 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (173) hide show
  1. evalforge_maestro-0.1.0/.agents/skills/speckit-analyze/SKILL.md +280 -0
  2. evalforge_maestro-0.1.0/.agents/skills/speckit-checklist/SKILL.md +384 -0
  3. evalforge_maestro-0.1.0/.agents/skills/speckit-clarify/SKILL.md +292 -0
  4. evalforge_maestro-0.1.0/.agents/skills/speckit-constitution/SKILL.md +180 -0
  5. evalforge_maestro-0.1.0/.agents/skills/speckit-converge/SKILL.md +284 -0
  6. evalforge_maestro-0.1.0/.agents/skills/speckit-implement/SKILL.md +227 -0
  7. evalforge_maestro-0.1.0/.agents/skills/speckit-plan/SKILL.md +167 -0
  8. evalforge_maestro-0.1.0/.agents/skills/speckit-specify/SKILL.md +346 -0
  9. evalforge_maestro-0.1.0/.agents/skills/speckit-tasks/SKILL.md +220 -0
  10. evalforge_maestro-0.1.0/.gitattributes +13 -0
  11. evalforge_maestro-0.1.0/.github/workflows/ci.yml +237 -0
  12. evalforge_maestro-0.1.0/.github/workflows/release.yml +158 -0
  13. evalforge_maestro-0.1.0/.gitignore +54 -0
  14. evalforge_maestro-0.1.0/.specify/.gitignore +14 -0
  15. evalforge_maestro-0.1.0/.specify/init-options.json +10 -0
  16. evalforge_maestro-0.1.0/.specify/integration.json +15 -0
  17. evalforge_maestro-0.1.0/.specify/integrations/agy.manifest.json +16 -0
  18. evalforge_maestro-0.1.0/.specify/integrations/speckit.manifest.json +19 -0
  19. evalforge_maestro-0.1.0/.specify/memory/.constitution-template.json +4 -0
  20. evalforge_maestro-0.1.0/.specify/memory/constitution.md +126 -0
  21. evalforge_maestro-0.1.0/.specify/scripts/bash/check-prerequisites.sh +249 -0
  22. evalforge_maestro-0.1.0/.specify/scripts/bash/common.sh +942 -0
  23. evalforge_maestro-0.1.0/.specify/scripts/bash/create-new-feature.sh +505 -0
  24. evalforge_maestro-0.1.0/.specify/scripts/bash/resolve-template.sh +57 -0
  25. evalforge_maestro-0.1.0/.specify/scripts/bash/setup-plan.sh +89 -0
  26. evalforge_maestro-0.1.0/.specify/scripts/bash/setup-tasks.sh +94 -0
  27. evalforge_maestro-0.1.0/.specify/templates/checklist-template.md +45 -0
  28. evalforge_maestro-0.1.0/.specify/templates/constitution-template.md +50 -0
  29. evalforge_maestro-0.1.0/.specify/templates/plan-template.md +113 -0
  30. evalforge_maestro-0.1.0/.specify/templates/spec-template.md +131 -0
  31. evalforge_maestro-0.1.0/.specify/templates/tasks-template.md +252 -0
  32. evalforge_maestro-0.1.0/.specify/workflows/speckit/workflow.yml +80 -0
  33. evalforge_maestro-0.1.0/.specify/workflows/workflow-registry.json +13 -0
  34. evalforge_maestro-0.1.0/AGENTS.md +31 -0
  35. evalforge_maestro-0.1.0/PKG-INFO +162 -0
  36. evalforge_maestro-0.1.0/README.md +122 -0
  37. evalforge_maestro-0.1.0/docs/intent.md +244 -0
  38. evalforge_maestro-0.1.0/examples/ci/evalforge-ci.yml +58 -0
  39. evalforge_maestro-0.1.0/examples/ci/evalforge.toml +33 -0
  40. evalforge_maestro-0.1.0/examples/ci/executions-sample.jsonl +3 -0
  41. evalforge_maestro-0.1.0/examples/ci/golden-sample.jsonl +3 -0
  42. evalforge_maestro-0.1.0/pyproject.toml +110 -0
  43. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/checklists/requirements.md +36 -0
  44. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/contracts/public-api.md +212 -0
  45. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/contracts/schemas-v1.json +239 -0
  46. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/contracts/storage-layout.md +31 -0
  47. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/data-model.md +184 -0
  48. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/plan.md +122 -0
  49. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/quickstart.md +59 -0
  50. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/research.md +67 -0
  51. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/spec.md +193 -0
  52. evalforge_maestro-0.1.0/specs/001-evaluation-foundation/tasks.md +230 -0
  53. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/checklists/requirements.md +36 -0
  54. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/contracts/public-api.md +177 -0
  55. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/contracts/schemas-v1.json +40 -0
  56. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/data-model.md +79 -0
  57. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/plan.md +102 -0
  58. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/quickstart.md +55 -0
  59. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/research.md +35 -0
  60. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/spec.md +174 -0
  61. evalforge_maestro-0.1.0/specs/002-retrieval-rag-evaluation/tasks.md +200 -0
  62. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/checklists/requirements.md +35 -0
  63. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/contracts/public-api.md +155 -0
  64. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/contracts/schemas-v1.json +490 -0
  65. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/data-model.md +176 -0
  66. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/plan.md +102 -0
  67. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/quickstart.md +54 -0
  68. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/research.md +68 -0
  69. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/spec.md +215 -0
  70. evalforge_maestro-0.1.0/specs/003-experiment-regression-engine/tasks.md +189 -0
  71. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/checklists/requirements.md +35 -0
  72. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/contracts/public-api.md +245 -0
  73. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/contracts/schemas-v1.json +206 -0
  74. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/data-model.md +136 -0
  75. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/plan.md +107 -0
  76. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/quickstart.md +113 -0
  77. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/research.md +141 -0
  78. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/spec.md +176 -0
  79. evalforge_maestro-0.1.0/specs/004-judge-calibration-engine/tasks.md +196 -0
  80. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/checklists/requirements.md +35 -0
  81. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/contracts/cli.md +125 -0
  82. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/contracts/public-api.md +177 -0
  83. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/contracts/schemas-v1.json +321 -0
  84. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/data-model.md +193 -0
  85. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/plan.md +117 -0
  86. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/quickstart.md +94 -0
  87. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/research.md +92 -0
  88. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/spec.md +189 -0
  89. evalforge_maestro-0.1.0/specs/005-cli-reporting-ci/tasks.md +205 -0
  90. evalforge_maestro-0.1.0/src/evalforge_maestro/__init__.py +291 -0
  91. evalforge_maestro-0.1.0/src/evalforge_maestro/_canonical.py +255 -0
  92. evalforge_maestro-0.1.0/src/evalforge_maestro/adapters/__init__.py +10 -0
  93. evalforge_maestro-0.1.0/src/evalforge_maestro/adapters/_shared.py +173 -0
  94. evalforge_maestro-0.1.0/src/evalforge_maestro/adapters/callable.py +87 -0
  95. evalforge_maestro-0.1.0/src/evalforge_maestro/adapters/docpipe.py +263 -0
  96. evalforge_maestro-0.1.0/src/evalforge_maestro/adapters/rag.py +262 -0
  97. evalforge_maestro-0.1.0/src/evalforge_maestro/adapters/replay.py +189 -0
  98. evalforge_maestro-0.1.0/src/evalforge_maestro/cli/__init__.py +15 -0
  99. evalforge_maestro-0.1.0/src/evalforge_maestro/cli/commands.py +761 -0
  100. evalforge_maestro-0.1.0/src/evalforge_maestro/cli/config.py +1010 -0
  101. evalforge_maestro-0.1.0/src/evalforge_maestro/cli/logging_utils.py +94 -0
  102. evalforge_maestro-0.1.0/src/evalforge_maestro/cli/parser.py +511 -0
  103. evalforge_maestro-0.1.0/src/evalforge_maestro/cli/targets.py +374 -0
  104. evalforge_maestro-0.1.0/src/evalforge_maestro/datasets/__init__.py +8 -0
  105. evalforge_maestro-0.1.0/src/evalforge_maestro/datasets/docpipe_fixture.py +327 -0
  106. evalforge_maestro-0.1.0/src/evalforge_maestro/datasets/engine.py +199 -0
  107. evalforge_maestro-0.1.0/src/evalforge_maestro/exceptions.py +92 -0
  108. evalforge_maestro-0.1.0/src/evalforge_maestro/execution/__init__.py +7 -0
  109. evalforge_maestro-0.1.0/src/evalforge_maestro/execution/orchestrator.py +480 -0
  110. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/__init__.py +38 -0
  111. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/base.py +298 -0
  112. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/calibration.py +407 -0
  113. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/metrics.py +242 -0
  114. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/mock.py +339 -0
  115. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/prompts.py +238 -0
  116. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/provider.py +213 -0
  117. evalforge_maestro-0.1.0/src/evalforge_maestro/judges/security.py +226 -0
  118. evalforge_maestro-0.1.0/src/evalforge_maestro/metrics/__init__.py +43 -0
  119. evalforge_maestro-0.1.0/src/evalforge_maestro/metrics/deterministic.py +464 -0
  120. evalforge_maestro-0.1.0/src/evalforge_maestro/metrics/retrieval.py +591 -0
  121. evalforge_maestro-0.1.0/src/evalforge_maestro/py.typed +0 -0
  122. evalforge_maestro-0.1.0/src/evalforge_maestro/regression/__init__.py +17 -0
  123. evalforge_maestro-0.1.0/src/evalforge_maestro/regression/anomaly.py +254 -0
  124. evalforge_maestro-0.1.0/src/evalforge_maestro/regression/compare.py +226 -0
  125. evalforge_maestro-0.1.0/src/evalforge_maestro/regression/drift.py +174 -0
  126. evalforge_maestro-0.1.0/src/evalforge_maestro/regression/gate.py +432 -0
  127. evalforge_maestro-0.1.0/src/evalforge_maestro/regression/trend.py +193 -0
  128. evalforge_maestro-0.1.0/src/evalforge_maestro/reporting/__init__.py +27 -0
  129. evalforge_maestro-0.1.0/src/evalforge_maestro/reporting/builder.py +302 -0
  130. evalforge_maestro-0.1.0/src/evalforge_maestro/reporting/markdown.py +437 -0
  131. evalforge_maestro-0.1.0/src/evalforge_maestro/storage/__init__.py +7 -0
  132. evalforge_maestro-0.1.0/src/evalforge_maestro/storage/local.py +342 -0
  133. evalforge_maestro-0.1.0/src/evalforge_maestro/types.py +2130 -0
  134. evalforge_maestro-0.1.0/tests/conftest.py +76 -0
  135. evalforge_maestro-0.1.0/tests/contract/test_determinism_gate.py +65 -0
  136. evalforge_maestro-0.1.0/tests/contract/test_immutability_gate.py +63 -0
  137. evalforge_maestro-0.1.0/tests/contract/test_m3_schemas.py +184 -0
  138. evalforge_maestro-0.1.0/tests/contract/test_m4_schemas.py +143 -0
  139. evalforge_maestro-0.1.0/tests/contract/test_m5_schemas.py +153 -0
  140. evalforge_maestro-0.1.0/tests/contract/test_metric_formulas.py +133 -0
  141. evalforge_maestro-0.1.0/tests/integration/test_ci_templates.py +77 -0
  142. evalforge_maestro-0.1.0/tests/integration/test_cli_workflow.py +744 -0
  143. evalforge_maestro-0.1.0/tests/integration/test_crash_and_truncation.py +85 -0
  144. evalforge_maestro-0.1.0/tests/integration/test_end_to_end_run.py +77 -0
  145. evalforge_maestro-0.1.0/tests/integration/test_judge_pipeline.py +238 -0
  146. evalforge_maestro-0.1.0/tests/integration/test_rag_decoupled_eval.py +231 -0
  147. evalforge_maestro-0.1.0/tests/integration/test_regression_pipeline.py +147 -0
  148. evalforge_maestro-0.1.0/tests/test_api_stability.py +765 -0
  149. evalforge_maestro-0.1.0/tests/test_library_purity.py +286 -0
  150. evalforge_maestro-0.1.0/tests/unit/test_adapters.py +102 -0
  151. evalforge_maestro-0.1.0/tests/unit/test_anomalies.py +337 -0
  152. evalforge_maestro-0.1.0/tests/unit/test_baselines.py +223 -0
  153. evalforge_maestro-0.1.0/tests/unit/test_calibration.py +373 -0
  154. evalforge_maestro-0.1.0/tests/unit/test_canonical.py +126 -0
  155. evalforge_maestro-0.1.0/tests/unit/test_cli_config.py +158 -0
  156. evalforge_maestro-0.1.0/tests/unit/test_compare_and_drift.py +360 -0
  157. evalforge_maestro-0.1.0/tests/unit/test_datasets.py +176 -0
  158. evalforge_maestro-0.1.0/tests/unit/test_docpipe_adapter.py +459 -0
  159. evalforge_maestro-0.1.0/tests/unit/test_execution.py +229 -0
  160. evalforge_maestro-0.1.0/tests/unit/test_ir_metrics.py +233 -0
  161. evalforge_maestro-0.1.0/tests/unit/test_judge_metrics.py +427 -0
  162. evalforge_maestro-0.1.0/tests/unit/test_judge_provider.py +170 -0
  163. evalforge_maestro-0.1.0/tests/unit/test_judge_security.py +206 -0
  164. evalforge_maestro-0.1.0/tests/unit/test_metrics.py +310 -0
  165. evalforge_maestro-0.1.0/tests/unit/test_pii_security.py +110 -0
  166. evalforge_maestro-0.1.0/tests/unit/test_quality_gate.py +457 -0
  167. evalforge_maestro-0.1.0/tests/unit/test_rag_adapter.py +288 -0
  168. evalforge_maestro-0.1.0/tests/unit/test_replay_adapter.py +136 -0
  169. evalforge_maestro-0.1.0/tests/unit/test_reporting.py +303 -0
  170. evalforge_maestro-0.1.0/tests/unit/test_storage.py +129 -0
  171. evalforge_maestro-0.1.0/tests/unit/test_trend.py +230 -0
  172. evalforge_maestro-0.1.0/tests/unit/test_types.py +605 -0
  173. evalforge_maestro-0.1.0/uv.lock +7274 -0
@@ -0,0 +1,280 @@
1
+ ---
2
+ name: "speckit-analyze"
3
+ description: "Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation."
4
+ compatibility: "Requires spec-kit project structure with .specify/ directory"
5
+ metadata:
6
+ author: "github-spec-kit"
7
+ source: "templates/commands/analyze.md"
8
+ version: "1.4.2"
9
+ ---
10
+
11
+
12
+ ## User Input
13
+
14
+ ```text
15
+ $ARGUMENTS
16
+ ```
17
+
18
+ You **MUST** consider the user input before proceeding (if not empty).
19
+
20
+ ## Pre-Execution Checks
21
+
22
+ **Check for extension hooks (before analysis)**:
23
+ - Check if `.specify/extensions.yml` exists in the project root.
24
+ - If it exists, read it and look for entries under the `hooks.before_analyze` key
25
+ - If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that `.specify/extensions.yml` could not be read (include the parser error) and that no hooks were checked, including any mandatory (`optional: false`) hooks registered there, then continue normally
26
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
27
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
28
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
29
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
30
+ - When constructing command invocations from hook command names, replace dots (`.`) with hyphens (`-`). For example, `speckit.git.commit` → `/speckit-git-commit`.
31
+ - For each executable hook, output the following based on its `optional` flag:
32
+ - **Optional hook** (`optional: true`):
33
+ ```
34
+ ## Extension Hooks
35
+
36
+ **Optional Pre-Hook**: {extension}
37
+ Command: `/{command}`
38
+ Description: {description}
39
+
40
+ Prompt: {prompt}
41
+ To execute: `/{command}`
42
+ ```
43
+ - **Mandatory hook** (`optional: false`):
44
+ ```
45
+ ## Extension Hooks
46
+
47
+ **Automatic Pre-Hook**: {extension}
48
+ Executing: `/{command}`
49
+ EXECUTE_COMMAND: {command}
50
+
51
+ Wait for the result of the hook command before proceeding to the Goal.
52
+ ```
53
+ 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.
54
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
55
+
56
+ ## Goal
57
+
58
+ Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. When `data-model.md` exists, also check constrained-field task citations and constraint consistency against it. This command MUST run only after `/speckit-tasks` has successfully produced a complete `tasks.md`.
59
+
60
+ ## Operating Constraints
61
+
62
+ **STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).
63
+
64
+ **Constitution Authority**: The project constitution (`.specify/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `/speckit-analyze`.
65
+
66
+ ## Execution Steps
67
+
68
+ ### 1. Initialize Analysis Context
69
+
70
+ Run `.specify/scripts/bash/check-prerequisites.sh --json --require-spec --require-tasks --include-tasks` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
71
+
72
+ - SPEC = FEATURE_DIR/spec.md
73
+ - PLAN = FEATURE_DIR/plan.md
74
+ - TASKS = FEATURE_DIR/tasks.md
75
+ - DATA_MODEL = FEATURE_DIR/data-model.md (optional)
76
+
77
+ Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
78
+ For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
79
+
80
+ ### 2. Load Artifacts (Progressive Disclosure)
81
+
82
+ Load only the minimal necessary context from each artifact:
83
+
84
+ **From spec.md:**
85
+
86
+ - Overview/Context
87
+ - Functional Requirements
88
+ - Success Criteria (measurable outcomes — e.g., performance, security, availability, user success, business impact)
89
+ - User Stories
90
+ - Edge Cases (if present)
91
+
92
+ **From plan.md:**
93
+
94
+ - Architecture/stack choices
95
+ - Data Model references
96
+ - Phases
97
+ - Technical constraints
98
+
99
+ **From tasks.md:**
100
+
101
+ - Task IDs
102
+ - Descriptions
103
+ - Phase grouping
104
+ - Parallel markers [P]
105
+ - Referenced file paths
106
+
107
+ **From data-model.md (if present):**
108
+
109
+ - Entity and exact field names, canonical source locations, and explicit constraints (max/min length, nullable/required, enum values, validation rules), including constraints encoded in field types
110
+ - If absent or no constrained fields exist, constrained-field checks are not applicable; do not invent fields or constraints or fail analysis for the missing optional document
111
+
112
+ **From constitution:**
113
+
114
+ - Load `.specify/memory/constitution.md` for principle validation
115
+
116
+ ### 3. Build Semantic Models
117
+
118
+ Create internal representations (do not include raw artifacts in output):
119
+
120
+ - **Requirements inventory**: For each Functional Requirement (FR-###) and Success Criterion (SC-###), record a stable key. Use the explicit FR-/SC- identifier as the primary key when present, and optionally also derive an imperative-phrase slug for readability (e.g., "User can upload file" → `user-can-upload-file`). Include only Success Criteria items that require buildable work (e.g., load-testing infrastructure, security audit tooling), and exclude post-launch outcome metrics and business KPIs (e.g., "Reduce support tickets by 50%").
121
+ - **User story/action inventory**: Discrete user actions with acceptance criteria
122
+ - **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
123
+ - **Constrained-field inventory** (when applicable): Record each canonical `Entity.field`, its constraints, and its location in data-model.md; keep identically named fields on different entities distinct
124
+ - **Field citation mapping** (when applicable): Map explicit data-model.md references with exact `Entity.field` identities to implementing task IDs and task locations; retain unresolved references and task-stated constraints for the detection passes
125
+ - **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
126
+
127
+ ### 4. Detection Passes (Token-Efficient Analysis)
128
+
129
+ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
130
+
131
+ #### A. Duplication Detection
132
+
133
+ - Identify near-duplicate requirements
134
+ - Mark lower-quality phrasing for consolidation
135
+
136
+ #### B. Ambiguity Detection
137
+
138
+ - Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
139
+ - Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)
140
+
141
+ #### C. Underspecification
142
+
143
+ - Requirements with verbs but missing object or measurable outcome
144
+ - User stories missing acceptance criteria alignment
145
+ - Tasks referencing files or components not defined in spec/plan
146
+
147
+ #### D. Constitution Alignment
148
+
149
+ - Any requirement or plan element conflicting with a MUST principle
150
+ - Missing mandated sections or quality gates from constitution
151
+
152
+ #### E. Coverage Gaps
153
+
154
+ - Requirements with zero associated tasks
155
+ - Tasks with no mapped requirement/story
156
+ - Success Criteria requiring buildable work (performance, security, availability) not reflected in tasks
157
+ - Each constrained field without an explicit `data-model.md` + `Entity.field` citation in at least one implementing task. Generic document/entity references, bare field names, and test-only references do not count; a shared implementing task may cite multiple fields, including fields implemented before later stories
158
+ - Require an explicit association between each cited field and its canonical definition. Mere co-occurrence of a document reference and a field mention is not a citation; for example, task prose setting `Request.SuspendReason` to 500 is not a citation just because the task cites data-model.md for `Request.Remark`
159
+ - Report unresolved field citations with their task IDs and locations; they must not be guessed as aliases or counted as coverage for another field. Also report any canonical field left uncovered
160
+
161
+ #### F. Inconsistency
162
+
163
+ - Terminology drift (same concept named differently across files)
164
+ - Data entities referenced in plan but absent in spec (or vice versa)
165
+ - Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
166
+ - Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
167
+ - Task-stated field constraints that contradict data-model.md, even when a valid citation is present. Compare any clearly identified field's task prose even when its citation is missing; check length, nullable/required status, enum values, and validation rules
168
+ - For each field mismatch, identify the exact `Entity.field`, task ID, canonical and task-stated restrictions, and both source locations. Do not flag citation-only tasks or semantically matching paraphrases for omitting/rewording constraint values. Do not invent canonical values when the source restriction is unclear; use the existing ambiguity/underspecification passes for unclear definitions
169
+
170
+ ### 5. Severity Assignment
171
+
172
+ Use this heuristic to prioritize findings:
173
+
174
+ - **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
175
+ - **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion, missing/unresolved constrained-field citations (Coverage), or contradictory task constraints (Inconsistency); retain CRITICAL escalation above
176
+ - **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
177
+ - **LOW**: Style/wording improvements, minor redundancy not affecting execution order
178
+
179
+ ### 6. Produce Compact Analysis Report
180
+
181
+ Output a Markdown report (no file writes) with the following structure:
182
+
183
+ ## Specification Analysis Report
184
+
185
+ | ID | Category | Severity | Location(s) | Summary | Recommendation |
186
+ |----|----------|----------|-------------|---------|----------------|
187
+ | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
188
+
189
+ (Add one row per finding; generate stable IDs prefixed by category initial.)
190
+
191
+ **Coverage Summary Table:**
192
+
193
+ | Requirement Key | Has Task? | Task IDs | Notes |
194
+ |-----------------|-----------|----------|-------|
195
+
196
+ **Constrained-Field Coverage (when applicable):**
197
+
198
+ | Field (`Entity.field`) | Canonical Location | Implementing Task IDs | Coverage / Consistency Notes |
199
+ |------------------------|--------------------|-----------------------|------------------------------|
200
+
201
+ Use the existing finding table for field findings, including source locations and actionable recommendations. Field findings share the 50-finding limit and overflow summary; do not change the existing requirement coverage denominator or FR/SC coverage table semantics.
202
+
203
+ **Constitution Alignment Issues:** (if any)
204
+
205
+ **Unmapped Tasks:** (if any)
206
+
207
+ **Metrics:**
208
+
209
+ - Total Requirements
210
+ - Total Tasks
211
+ - Coverage % (requirements with >=1 task)
212
+ - Ambiguity Count
213
+ - Duplication Count
214
+ - Critical Issues Count
215
+
216
+ ### 7. Provide Next Actions
217
+
218
+ At end of report, output a concise Next Actions block:
219
+
220
+ - If CRITICAL issues exist: Recommend resolving before `/speckit-implement`
221
+ - If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
222
+ - Provide explicit command suggestions: e.g., "Run /speckit-specify with refinement", "Run /speckit-plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
223
+
224
+ ### 8. Offer Remediation
225
+
226
+ Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
227
+
228
+ ### 9. Check for extension hooks
229
+
230
+ After reporting, check if `.specify/extensions.yml` exists in the project root.
231
+ - If it exists, read it and look for entries under the `hooks.after_analyze` key
232
+ - If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that `.specify/extensions.yml` could not be read (include the parser error) and that no hooks were checked, including any mandatory (`optional: false`) hooks registered there, then continue normally
233
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
234
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
235
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
236
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
237
+ - When constructing command invocations from hook command names, replace dots (`.`) with hyphens (`-`). For example, `speckit.git.commit` → `/speckit-git-commit`.
238
+ - For each executable hook, output the following based on its `optional` flag:
239
+ - **Optional hook** (`optional: true`):
240
+ ```
241
+ ## Extension Hooks
242
+
243
+ **Optional Hook**: {extension}
244
+ Command: `/{command}`
245
+ Description: {description}
246
+
247
+ Prompt: {prompt}
248
+ To execute: `/{command}`
249
+ ```
250
+ - **Mandatory hook** (`optional: false`):
251
+ ```
252
+ ## Extension Hooks
253
+
254
+ **Automatic Hook**: {extension}
255
+ Executing: `/{command}`
256
+ EXECUTE_COMMAND: {command}
257
+ ```
258
+ 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.
259
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
260
+
261
+ ## Operating Principles
262
+
263
+ ### Context Efficiency
264
+
265
+ - **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
266
+ - **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
267
+ - **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
268
+ - **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
269
+
270
+ ### Analysis Guidelines
271
+
272
+ - **NEVER modify files** (this is read-only analysis)
273
+ - **NEVER hallucinate missing sections** (if absent, report them accurately)
274
+ - **Prioritize constitution violations** (these are always CRITICAL)
275
+ - **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
276
+ - **Report zero issues gracefully** (emit success report with coverage statistics)
277
+
278
+ ## Context
279
+
280
+ $ARGUMENTS
@@ -0,0 +1,384 @@
1
+ ---
2
+ name: "speckit-checklist"
3
+ description: "Generate a custom checklist for the current feature based on user requirements."
4
+ compatibility: "Requires spec-kit project structure with .specify/ directory"
5
+ metadata:
6
+ author: "github-spec-kit"
7
+ source: "templates/commands/checklist.md"
8
+ version: "1.4.2"
9
+ ---
10
+
11
+
12
+ ## Checklist Purpose: "Unit Tests for English"
13
+
14
+ **CRITICAL CONCEPT**: Checklists are **UNIT TESTS FOR REQUIREMENTS WRITING** - they validate the quality, clarity, and completeness of requirements in a given domain.
15
+
16
+ **NOT for verification/testing**:
17
+
18
+ - ❌ NOT "Verify the button clicks correctly"
19
+ - ❌ NOT "Test error handling works"
20
+ - ❌ NOT "Confirm the API returns 200"
21
+ - ❌ NOT checking if code/implementation matches the spec
22
+
23
+ **FOR requirements quality validation**:
24
+
25
+ - ✅ "Are visual hierarchy requirements defined for all card types?" (completeness)
26
+ - ✅ "Is 'prominent display' quantified with specific sizing/positioning?" (clarity)
27
+ - ✅ "Are hover state requirements consistent across all interactive elements?" (consistency)
28
+ - ✅ "Are accessibility requirements defined for keyboard navigation?" (coverage)
29
+ - ✅ "Does the spec define what happens when logo image fails to load?" (edge cases)
30
+
31
+ **Metaphor**: If your spec is code written in English, the checklist is its unit test suite. You're testing whether the requirements are well-written, complete, unambiguous, and ready for implementation - NOT whether the implementation works.
32
+
33
+ **Ownership and checkbox lifecycle**:
34
+
35
+ - Custom checklists generated by this command are reviewer-owned requirements-quality review artifacts.
36
+ - `[x]` means the reviewer determined the requirements-quality criterion is satisfied.
37
+ - `[x]` does NOT mean implementation work is complete.
38
+ - This command generates or appends checklist items; it MUST NOT mark generated items `[x]`.
39
+ - An agent may assist with evaluating items only when explicitly asked by the reviewer.
40
+ - `checklists/requirements.md` is a separate built-in spec-quality checklist maintained by `/speckit-specify` and `/speckit-clarify`; do not treat that exception as applying to custom checklists generated here.
41
+
42
+ ## User Input
43
+
44
+ ```text
45
+ $ARGUMENTS
46
+ ```
47
+
48
+ You **MUST** consider the user input before proceeding (if not empty).
49
+
50
+ ## Pre-Execution Checks
51
+
52
+ **Check for extension hooks (before checklist generation)**:
53
+ - Check if `.specify/extensions.yml` exists in the project root.
54
+ - If it exists, read it and look for entries under the `hooks.before_checklist` key
55
+ - If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that `.specify/extensions.yml` could not be read (include the parser error) and that no hooks were checked, including any mandatory (`optional: false`) hooks registered there, then continue normally
56
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
57
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
58
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
59
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
60
+ - When constructing command invocations from hook command names, replace dots (`.`) with hyphens (`-`). For example, `speckit.git.commit` → `/speckit-git-commit`.
61
+ - For each executable hook, output the following based on its `optional` flag:
62
+ - **Optional hook** (`optional: true`):
63
+ ```
64
+ ## Extension Hooks
65
+
66
+ **Optional Pre-Hook**: {extension}
67
+ Command: `/{command}`
68
+ Description: {description}
69
+
70
+ Prompt: {prompt}
71
+ To execute: `/{command}`
72
+ ```
73
+ - **Mandatory hook** (`optional: false`):
74
+ ```
75
+ ## Extension Hooks
76
+
77
+ **Automatic Pre-Hook**: {extension}
78
+ Executing: `/{command}`
79
+ EXECUTE_COMMAND: {command}
80
+
81
+ Wait for the result of the hook command before proceeding to the Execution Steps.
82
+ ```
83
+ 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.
84
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently
85
+
86
+ ## Execution Steps
87
+
88
+ 1. **Setup**: Run `.specify/scripts/bash/check-prerequisites.sh --json --template checklist-template` from repo root and parse JSON for FEATURE_DIR, AVAILABLE_DOCS list, and TEMPLATE_CONTENT.
89
+ - All file paths must be absolute.
90
+ - For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").
91
+
92
+ 2. **IF EXISTS**: Load `.specify/memory/constitution.md` for project principles and governance constraints.
93
+
94
+ 3. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST:
95
+ - Be generated from the user's phrasing + extracted signals from spec/plan/tasks
96
+ - Only ask about information that materially changes checklist content
97
+ - Be skipped individually if already unambiguous in `$ARGUMENTS`
98
+ - Prefer precision over breadth
99
+
100
+ Generation algorithm:
101
+ 1. 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").
102
+ 2. Cluster signals into candidate focus areas (max 4) ranked by relevance.
103
+ 3. Identify probable audience & timing (author, reviewer, QA, release) if not explicit.
104
+ 4. Detect missing dimensions: scope breadth, depth/rigor, risk emphasis, exclusion boundaries, measurable acceptance criteria.
105
+ 5. Formulate questions chosen from these archetypes:
106
+ - Scope refinement (e.g., "Should this include integration touchpoints with X and Y or stay limited to local module correctness?")
107
+ - Risk prioritization (e.g., "Which of these potential risk areas should receive mandatory gating checks?")
108
+ - Depth calibration (e.g., "Is this a lightweight pre-commit sanity list or a formal release gate?")
109
+ - Audience framing (e.g., "Will this be used by the author only or peers during PR review?")
110
+ - Boundary exclusion (e.g., "Should we explicitly exclude performance tuning items this round?")
111
+ - Scenario class gap (e.g., "No recovery flows detected—are rollback / partial failure paths in scope?")
112
+
113
+ Question formatting rules:
114
+ - If presenting options, generate a compact table with columns: Option | Candidate | Why It Matters
115
+ - Limit to A–E options maximum; omit table if a free-form answer is clearer
116
+ - Never ask the user to restate what they already said
117
+ - Avoid speculative categories (no hallucination). If uncertain, ask explicitly: "Confirm whether X belongs in scope."
118
+
119
+ Defaults when interaction impossible:
120
+ - Depth: Standard
121
+ - Audience: Reviewer (PR) if code-related; Author otherwise
122
+ - Focus: Top 2 relevance clusters
123
+
124
+ Output the questions (label Q1/Q2/Q3). After answers: if ≥2 scenario classes (Alternate / Exception / Recovery / Non-Functional domain) remain unclear, you MAY ask up to TWO more targeted follow‑ups (Q4/Q5) with a one-line justification each (e.g., "Unresolved recovery path risk"). Do not exceed five total questions. Skip escalation if user explicitly declines more.
125
+
126
+ 4. **Understand user request**: Combine `$ARGUMENTS` + clarifying answers:
127
+ - Derive checklist theme (e.g., security, review, deploy, ux)
128
+ - Consolidate explicit must-have items mentioned by user
129
+ - Map focus selections to category scaffolding
130
+ - Infer any missing context from spec/plan/tasks (do NOT hallucinate)
131
+
132
+ 5. **Load feature context**: Read from FEATURE_DIR:
133
+ - spec.md: Feature requirements and scope
134
+ - plan.md (if exists): Technical details, dependencies
135
+ - tasks.md (if exists): Implementation tasks
136
+
137
+ **Context Loading Strategy**:
138
+ - Load only necessary portions relevant to active focus areas (avoid full-file dumping)
139
+ - Prefer summarizing long sections into concise scenario/requirement bullets
140
+ - Use progressive disclosure: add follow-on retrieval only if gaps detected
141
+ - If source docs are large, generate interim summary items instead of embedding raw text
142
+
143
+ 6. **Generate checklist** - Use TEMPLATE_CONTENT as the structural template and create "Unit Tests for Requirements":
144
+ - Create `FEATURE_DIR/checklists/` directory if it doesn't exist
145
+ - Generate unique checklist filename:
146
+ - Use short, descriptive name based on domain (e.g., `ux.md`, `api.md`, `security.md`)
147
+ - Format: `[domain].md`
148
+ - File handling behavior:
149
+ - If file does NOT exist: Create new file and number items starting from CHK001
150
+ - If file exists: Append new items to existing file, continuing from the last CHK ID (e.g., if last item is CHK015, start new items at CHK016)
151
+ - Never delete or replace existing checklist content - always preserve and append
152
+ - Leave every newly generated item unchecked (`[ ]`); checkbox state belongs to the reviewer
153
+
154
+ **CORE PRINCIPLE - Test the Requirements, Not the Implementation**:
155
+ Every checklist item MUST evaluate the REQUIREMENTS THEMSELVES for:
156
+ - **Completeness**: Are all necessary requirements present?
157
+ - **Clarity**: Are requirements unambiguous and specific?
158
+ - **Consistency**: Do requirements align with each other?
159
+ - **Measurability**: Can requirements be objectively verified?
160
+ - **Coverage**: Are all scenarios/edge cases addressed?
161
+
162
+ **Category Structure** - Group items by requirement quality dimensions:
163
+ - **Requirement Completeness** (Are all necessary requirements documented?)
164
+ - **Requirement Clarity** (Are requirements specific and unambiguous?)
165
+ - **Requirement Consistency** (Do requirements align without conflicts?)
166
+ - **Acceptance Criteria Quality** (Are success criteria measurable?)
167
+ - **Scenario Coverage** (Are all flows/cases addressed?)
168
+ - **Edge Case Coverage** (Are boundary conditions defined?)
169
+ - **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?)
170
+ - **Dependencies & Assumptions** (Are they documented and validated?)
171
+ - **Ambiguities & Conflicts** (What needs clarification?)
172
+
173
+ **HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
174
+
175
+ ❌ **WRONG** (Testing implementation):
176
+ - "Verify landing page displays 3 episode cards"
177
+ - "Test hover states work on desktop"
178
+ - "Confirm logo click navigates home"
179
+
180
+ ✅ **CORRECT** (Testing requirements quality):
181
+ - "Are the exact number and layout of featured episodes specified?" [Completeness]
182
+ - "Is 'prominent display' quantified with specific sizing/positioning?" [Clarity]
183
+ - "Are hover state requirements consistent across all interactive elements?" [Consistency]
184
+ - "Are keyboard navigation requirements defined for all interactive UI?" [Coverage]
185
+ - "Is the fallback behavior specified when logo image fails to load?" [Edge Cases]
186
+ - "Are loading states defined for asynchronous episode data?" [Completeness]
187
+ - "Does the spec define visual hierarchy for competing UI elements?" [Clarity]
188
+
189
+ **ITEM STRUCTURE**:
190
+ Each item should follow this pattern:
191
+ - Question format asking about requirement quality
192
+ - Focus on what's WRITTEN (or not written) in the spec/plan
193
+ - Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.]
194
+ - Reference spec section `[Spec §X.Y]` when checking existing requirements
195
+ - Use `[Gap]` marker when checking for missing requirements
196
+
197
+ **EXAMPLES BY QUALITY DIMENSION**:
198
+
199
+ Completeness:
200
+ - "Are error handling requirements defined for all API failure modes? [Gap]"
201
+ - "Are accessibility requirements specified for all interactive elements? [Completeness]"
202
+ - "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
203
+
204
+ Clarity:
205
+ - "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
206
+ - "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]"
207
+ - "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
208
+
209
+ Consistency:
210
+ - "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]"
211
+ - "Are card component requirements consistent between landing and detail pages? [Consistency]"
212
+
213
+ Coverage:
214
+ - "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]"
215
+ - "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
216
+ - "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
217
+
218
+ Measurability:
219
+ - "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
220
+ - "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
221
+
222
+ **Scenario Classification & Coverage** (Requirements Quality Focus):
223
+ - Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios
224
+ - For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?"
225
+ - If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
226
+ - Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]"
227
+
228
+ **Traceability Requirements**:
229
+ - MINIMUM: ≥80% of items MUST include at least one traceability reference
230
+ - Each item should reference: spec section `[Spec §X.Y]`, or use markers: `[Gap]`, `[Ambiguity]`, `[Conflict]`, `[Assumption]`
231
+ - If no ID system exists: "Is a requirement & acceptance criteria ID scheme established? [Traceability]"
232
+
233
+ **Surface & Resolve Issues** (Requirements Quality Problems):
234
+ Ask questions about the requirements themselves:
235
+ - Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
236
+ - Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]"
237
+ - Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]"
238
+ - Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]"
239
+ - Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
240
+
241
+ **Content Consolidation**:
242
+ - Soft cap: If raw candidate items > 40, prioritize by risk/impact
243
+ - Merge near-duplicates checking the same requirement aspect
244
+ - If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]"
245
+
246
+ **🚫 ABSOLUTELY PROHIBITED** - These make it an implementation test, not a requirements test:
247
+ - ❌ Any item starting with "Verify", "Test", "Confirm", "Check" + implementation behavior
248
+ - ❌ References to code execution, user actions, system behavior
249
+ - ❌ "Displays correctly", "works properly", "functions as expected"
250
+ - ❌ "Click", "navigate", "render", "load", "execute"
251
+ - ❌ Test cases, test plans, QA procedures
252
+ - ❌ Implementation details (frameworks, APIs, algorithms)
253
+
254
+ **✅ REQUIRED PATTERNS** - These test requirements quality:
255
+ - ✅ "Are [requirement type] defined/specified/documented for [scenario]?"
256
+ - ✅ "Is [vague term] quantified/clarified with specific criteria?"
257
+ - ✅ "Are requirements consistent between [section A] and [section B]?"
258
+ - ✅ "Can [requirement] be objectively measured/verified?"
259
+ - ✅ "Are [edge cases/scenarios] addressed in requirements?"
260
+ - ✅ "Does the spec define [missing aspect]?"
261
+
262
+ 7. **Structure Reference**: Generate the checklist following the canonical template in `.specify/templates/checklist-template.md` for title, meta section, category headings, ownership note, notes section, and ID formatting. If template is unavailable, use: H1 title, purpose/created meta lines, an ownership note explaining that `[x]` means reviewer approval of requirements quality, `##` category sections containing `- [ ] CHK### <requirement item>` lines with globally incrementing IDs starting at CHK001, and notes that `/speckit-implement` reads checklist state but does not modify markers.
263
+
264
+ 8. **Report**: Output full path to checklist file, item count, and summarize whether the run created a new file or appended to an existing one. Summarize:
265
+ - Focus areas selected
266
+ - Depth level
267
+ - Actor/timing
268
+ - Any explicit user-specified must-have items incorporated
269
+
270
+ **Important**: Each `/speckit-checklist` command invocation uses a short, descriptive checklist filename and either creates a new file or appends to an existing one. This allows:
271
+
272
+ - Multiple checklists of different types (e.g., `ux.md`, `test.md`, `security.md`)
273
+ - Simple, memorable filenames that indicate checklist purpose
274
+ - Easy identification and navigation in the `checklists/` folder
275
+
276
+ To avoid clutter, use descriptive types and clean up obsolete checklists when done.
277
+
278
+ ## Example Checklist Types & Sample Items
279
+
280
+ **UX Requirements Quality:** `ux.md`
281
+
282
+ Sample items (testing the requirements, NOT the implementation):
283
+
284
+ - "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]"
285
+ - "Is the number and positioning of UI elements explicitly specified? [Completeness, Spec §FR-1]"
286
+ - "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]"
287
+ - "Are accessibility requirements specified for all interactive elements? [Coverage, Gap]"
288
+ - "Is fallback behavior defined when images fail to load? [Edge Case, Gap]"
289
+ - "Can 'prominent display' be objectively measured? [Measurability, Spec §FR-4]"
290
+
291
+ **API Requirements Quality:** `api.md`
292
+
293
+ Sample items:
294
+
295
+ - "Are error response formats specified for all failure scenarios? [Completeness]"
296
+ - "Are rate limiting requirements quantified with specific thresholds? [Clarity]"
297
+ - "Are authentication requirements consistent across all endpoints? [Consistency]"
298
+ - "Are retry/timeout requirements defined for external dependencies? [Coverage, Gap]"
299
+ - "Is versioning strategy documented in requirements? [Gap]"
300
+
301
+ **Performance Requirements Quality:** `performance.md`
302
+
303
+ Sample items:
304
+
305
+ - "Are performance requirements quantified with specific metrics? [Clarity]"
306
+ - "Are performance targets defined for all critical user journeys? [Coverage]"
307
+ - "Are performance requirements under different load conditions specified? [Completeness]"
308
+ - "Can performance requirements be objectively measured? [Measurability]"
309
+ - "Are degradation requirements defined for high-load scenarios? [Edge Case, Gap]"
310
+
311
+ **Security Requirements Quality:** `security.md`
312
+
313
+ Sample items:
314
+
315
+ - "Are authentication requirements specified for all protected resources? [Coverage]"
316
+ - "Are data protection requirements defined for sensitive information? [Completeness]"
317
+ - "Is the threat model documented and requirements aligned to it? [Traceability]"
318
+ - "Are security requirements consistent with compliance obligations? [Consistency]"
319
+ - "Are security failure/breach response requirements defined? [Gap, Exception Flow]"
320
+
321
+ ## Anti-Examples: What NOT To Do
322
+
323
+ **❌ WRONG - These test implementation, not requirements:**
324
+
325
+ ```markdown
326
+ - [ ] CHK001 - Verify landing page displays 3 episode cards [Spec §FR-001]
327
+ - [ ] CHK002 - Test hover states work correctly on desktop [Spec §FR-003]
328
+ - [ ] CHK003 - Confirm logo click navigates to home page [Spec §FR-010]
329
+ - [ ] CHK004 - Check that related episodes section shows 3-5 items [Spec §FR-005]
330
+ ```
331
+
332
+ **✅ CORRECT - These test requirements quality:**
333
+
334
+ ```markdown
335
+ - [ ] CHK001 - Are the number and layout of featured episodes explicitly specified? [Completeness, Spec §FR-001]
336
+ - [ ] CHK002 - Are hover state requirements consistently defined for all interactive elements? [Consistency, Spec §FR-003]
337
+ - [ ] CHK003 - Are navigation requirements clear for all clickable brand elements? [Clarity, Spec §FR-010]
338
+ - [ ] CHK004 - Is the selection criteria for related episodes documented? [Gap, Spec §FR-005]
339
+ - [ ] CHK005 - Are loading state requirements defined for asynchronous episode data? [Gap]
340
+ - [ ] CHK006 - Can "visual hierarchy" requirements be objectively measured? [Measurability, Spec §FR-001]
341
+ ```
342
+
343
+ **Key Differences:**
344
+
345
+ - Wrong: Tests if the system works correctly
346
+ - Correct: Tests if the requirements are written correctly
347
+ - Wrong: Verification of behavior
348
+ - Correct: Validation of requirement quality
349
+ - Wrong: "Does it do X?"
350
+ - Correct: "Is X clearly specified?"
351
+
352
+ ## Post-Execution Checks
353
+
354
+ **Check for extension hooks (after checklist generation)**:
355
+ Check if `.specify/extensions.yml` exists in the project root.
356
+ - If it exists, read it and look for entries under the `hooks.after_checklist` key
357
+ - If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that `.specify/extensions.yml` could not be read (include the parser error) and that no hooks were checked, including any mandatory (`optional: false`) hooks registered there, then continue normally
358
+ - Filter out hooks where `enabled` is explicitly `false`. Treat hooks without an `enabled` field as enabled by default.
359
+ - For each remaining hook, do **not** attempt to interpret or evaluate hook `condition` expressions:
360
+ - If the hook has no `condition` field, or it is null/empty, treat the hook as executable
361
+ - If the hook defines a non-empty `condition`, skip the hook and leave condition evaluation to the HookExecutor implementation
362
+ - When constructing command invocations from hook command names, replace dots (`.`) with hyphens (`-`). For example, `speckit.git.commit` → `/speckit-git-commit`.
363
+ - For each executable hook, output the following based on its `optional` flag:
364
+ - **Optional hook** (`optional: true`):
365
+ ```
366
+ ## Extension Hooks
367
+
368
+ **Optional Hook**: {extension}
369
+ Command: `/{command}`
370
+ Description: {description}
371
+
372
+ Prompt: {prompt}
373
+ To execute: `/{command}`
374
+ ```
375
+ - **Mandatory hook** (`optional: false`):
376
+ ```
377
+ ## Extension Hooks
378
+
379
+ **Automatic Hook**: {extension}
380
+ Executing: `/{command}`
381
+ EXECUTE_COMMAND: {command}
382
+ ```
383
+ 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.
384
+ - If no hooks are registered or `.specify/extensions.yml` does not exist, skip silently