spec-kitty-cli 0.12.1__py3-none-any.whl

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 (242) hide show
  1. spec_kitty_cli-0.12.1.dist-info/METADATA +1767 -0
  2. spec_kitty_cli-0.12.1.dist-info/RECORD +242 -0
  3. spec_kitty_cli-0.12.1.dist-info/WHEEL +4 -0
  4. spec_kitty_cli-0.12.1.dist-info/entry_points.txt +2 -0
  5. spec_kitty_cli-0.12.1.dist-info/licenses/LICENSE +21 -0
  6. specify_cli/__init__.py +171 -0
  7. specify_cli/acceptance.py +627 -0
  8. specify_cli/agent_utils/README.md +157 -0
  9. specify_cli/agent_utils/__init__.py +9 -0
  10. specify_cli/agent_utils/status.py +356 -0
  11. specify_cli/cli/__init__.py +6 -0
  12. specify_cli/cli/commands/__init__.py +46 -0
  13. specify_cli/cli/commands/accept.py +189 -0
  14. specify_cli/cli/commands/agent/__init__.py +22 -0
  15. specify_cli/cli/commands/agent/config.py +382 -0
  16. specify_cli/cli/commands/agent/context.py +191 -0
  17. specify_cli/cli/commands/agent/feature.py +1057 -0
  18. specify_cli/cli/commands/agent/release.py +11 -0
  19. specify_cli/cli/commands/agent/tasks.py +1253 -0
  20. specify_cli/cli/commands/agent/workflow.py +801 -0
  21. specify_cli/cli/commands/context.py +246 -0
  22. specify_cli/cli/commands/dashboard.py +85 -0
  23. specify_cli/cli/commands/implement.py +973 -0
  24. specify_cli/cli/commands/init.py +827 -0
  25. specify_cli/cli/commands/init_help.py +62 -0
  26. specify_cli/cli/commands/merge.py +755 -0
  27. specify_cli/cli/commands/mission.py +240 -0
  28. specify_cli/cli/commands/ops.py +265 -0
  29. specify_cli/cli/commands/orchestrate.py +640 -0
  30. specify_cli/cli/commands/repair.py +175 -0
  31. specify_cli/cli/commands/research.py +165 -0
  32. specify_cli/cli/commands/sync.py +364 -0
  33. specify_cli/cli/commands/upgrade.py +249 -0
  34. specify_cli/cli/commands/validate_encoding.py +186 -0
  35. specify_cli/cli/commands/validate_tasks.py +186 -0
  36. specify_cli/cli/commands/verify.py +310 -0
  37. specify_cli/cli/helpers.py +123 -0
  38. specify_cli/cli/step_tracker.py +91 -0
  39. specify_cli/cli/ui.py +192 -0
  40. specify_cli/core/__init__.py +53 -0
  41. specify_cli/core/agent_context.py +311 -0
  42. specify_cli/core/config.py +96 -0
  43. specify_cli/core/context_validation.py +362 -0
  44. specify_cli/core/dependency_graph.py +351 -0
  45. specify_cli/core/git_ops.py +129 -0
  46. specify_cli/core/multi_parent_merge.py +323 -0
  47. specify_cli/core/paths.py +260 -0
  48. specify_cli/core/project_resolver.py +110 -0
  49. specify_cli/core/stale_detection.py +263 -0
  50. specify_cli/core/tool_checker.py +79 -0
  51. specify_cli/core/utils.py +43 -0
  52. specify_cli/core/vcs/__init__.py +114 -0
  53. specify_cli/core/vcs/detection.py +341 -0
  54. specify_cli/core/vcs/exceptions.py +85 -0
  55. specify_cli/core/vcs/git.py +1304 -0
  56. specify_cli/core/vcs/jujutsu.py +1208 -0
  57. specify_cli/core/vcs/protocol.py +285 -0
  58. specify_cli/core/vcs/types.py +249 -0
  59. specify_cli/core/version_checker.py +261 -0
  60. specify_cli/core/worktree.py +506 -0
  61. specify_cli/dashboard/__init__.py +28 -0
  62. specify_cli/dashboard/diagnostics.py +204 -0
  63. specify_cli/dashboard/handlers/__init__.py +17 -0
  64. specify_cli/dashboard/handlers/api.py +143 -0
  65. specify_cli/dashboard/handlers/base.py +65 -0
  66. specify_cli/dashboard/handlers/features.py +390 -0
  67. specify_cli/dashboard/handlers/router.py +81 -0
  68. specify_cli/dashboard/handlers/static.py +50 -0
  69. specify_cli/dashboard/lifecycle.py +541 -0
  70. specify_cli/dashboard/scanner.py +437 -0
  71. specify_cli/dashboard/server.py +123 -0
  72. specify_cli/dashboard/static/dashboard/dashboard.css +722 -0
  73. specify_cli/dashboard/static/dashboard/dashboard.js +1424 -0
  74. specify_cli/dashboard/static/spec-kitty.png +0 -0
  75. specify_cli/dashboard/templates/__init__.py +36 -0
  76. specify_cli/dashboard/templates/index.html +258 -0
  77. specify_cli/doc_generators.py +621 -0
  78. specify_cli/doc_state.py +408 -0
  79. specify_cli/frontmatter.py +384 -0
  80. specify_cli/gap_analysis.py +915 -0
  81. specify_cli/gitignore_manager.py +300 -0
  82. specify_cli/guards.py +145 -0
  83. specify_cli/legacy_detector.py +83 -0
  84. specify_cli/manifest.py +286 -0
  85. specify_cli/merge/__init__.py +63 -0
  86. specify_cli/merge/executor.py +653 -0
  87. specify_cli/merge/forecast.py +215 -0
  88. specify_cli/merge/ordering.py +126 -0
  89. specify_cli/merge/preflight.py +230 -0
  90. specify_cli/merge/state.py +185 -0
  91. specify_cli/merge/status_resolver.py +354 -0
  92. specify_cli/mission.py +654 -0
  93. specify_cli/missions/documentation/command-templates/implement.md +309 -0
  94. specify_cli/missions/documentation/command-templates/plan.md +275 -0
  95. specify_cli/missions/documentation/command-templates/review.md +344 -0
  96. specify_cli/missions/documentation/command-templates/specify.md +206 -0
  97. specify_cli/missions/documentation/command-templates/tasks.md +189 -0
  98. specify_cli/missions/documentation/mission.yaml +113 -0
  99. specify_cli/missions/documentation/templates/divio/explanation-template.md +192 -0
  100. specify_cli/missions/documentation/templates/divio/howto-template.md +168 -0
  101. specify_cli/missions/documentation/templates/divio/reference-template.md +179 -0
  102. specify_cli/missions/documentation/templates/divio/tutorial-template.md +146 -0
  103. specify_cli/missions/documentation/templates/generators/jsdoc.json.template +18 -0
  104. specify_cli/missions/documentation/templates/generators/sphinx-conf.py.template +36 -0
  105. specify_cli/missions/documentation/templates/plan-template.md +269 -0
  106. specify_cli/missions/documentation/templates/release-template.md +222 -0
  107. specify_cli/missions/documentation/templates/spec-template.md +172 -0
  108. specify_cli/missions/documentation/templates/task-prompt-template.md +140 -0
  109. specify_cli/missions/documentation/templates/tasks-template.md +159 -0
  110. specify_cli/missions/research/command-templates/merge.md +388 -0
  111. specify_cli/missions/research/command-templates/plan.md +125 -0
  112. specify_cli/missions/research/command-templates/review.md +144 -0
  113. specify_cli/missions/research/command-templates/tasks.md +225 -0
  114. specify_cli/missions/research/mission.yaml +115 -0
  115. specify_cli/missions/research/templates/data-model-template.md +33 -0
  116. specify_cli/missions/research/templates/plan-template.md +161 -0
  117. specify_cli/missions/research/templates/research/evidence-log.csv +18 -0
  118. specify_cli/missions/research/templates/research/source-register.csv +18 -0
  119. specify_cli/missions/research/templates/research-template.md +35 -0
  120. specify_cli/missions/research/templates/spec-template.md +64 -0
  121. specify_cli/missions/research/templates/task-prompt-template.md +148 -0
  122. specify_cli/missions/research/templates/tasks-template.md +114 -0
  123. specify_cli/missions/software-dev/command-templates/accept.md +75 -0
  124. specify_cli/missions/software-dev/command-templates/analyze.md +183 -0
  125. specify_cli/missions/software-dev/command-templates/checklist.md +286 -0
  126. specify_cli/missions/software-dev/command-templates/clarify.md +157 -0
  127. specify_cli/missions/software-dev/command-templates/constitution.md +432 -0
  128. specify_cli/missions/software-dev/command-templates/dashboard.md +101 -0
  129. specify_cli/missions/software-dev/command-templates/implement.md +41 -0
  130. specify_cli/missions/software-dev/command-templates/merge.md +383 -0
  131. specify_cli/missions/software-dev/command-templates/plan.md +171 -0
  132. specify_cli/missions/software-dev/command-templates/review.md +32 -0
  133. specify_cli/missions/software-dev/command-templates/specify.md +321 -0
  134. specify_cli/missions/software-dev/command-templates/tasks.md +566 -0
  135. specify_cli/missions/software-dev/mission.yaml +100 -0
  136. specify_cli/missions/software-dev/templates/plan-template.md +132 -0
  137. specify_cli/missions/software-dev/templates/spec-template.md +116 -0
  138. specify_cli/missions/software-dev/templates/task-prompt-template.md +140 -0
  139. specify_cli/missions/software-dev/templates/tasks-template.md +159 -0
  140. specify_cli/orchestrator/__init__.py +75 -0
  141. specify_cli/orchestrator/agent_config.py +224 -0
  142. specify_cli/orchestrator/agents/__init__.py +170 -0
  143. specify_cli/orchestrator/agents/augment.py +112 -0
  144. specify_cli/orchestrator/agents/base.py +243 -0
  145. specify_cli/orchestrator/agents/claude.py +112 -0
  146. specify_cli/orchestrator/agents/codex.py +106 -0
  147. specify_cli/orchestrator/agents/copilot.py +137 -0
  148. specify_cli/orchestrator/agents/cursor.py +139 -0
  149. specify_cli/orchestrator/agents/gemini.py +115 -0
  150. specify_cli/orchestrator/agents/kilocode.py +94 -0
  151. specify_cli/orchestrator/agents/opencode.py +132 -0
  152. specify_cli/orchestrator/agents/qwen.py +96 -0
  153. specify_cli/orchestrator/config.py +455 -0
  154. specify_cli/orchestrator/executor.py +642 -0
  155. specify_cli/orchestrator/integration.py +1230 -0
  156. specify_cli/orchestrator/monitor.py +898 -0
  157. specify_cli/orchestrator/scheduler.py +832 -0
  158. specify_cli/orchestrator/state.py +508 -0
  159. specify_cli/orchestrator/testing/__init__.py +122 -0
  160. specify_cli/orchestrator/testing/availability.py +346 -0
  161. specify_cli/orchestrator/testing/fixtures.py +684 -0
  162. specify_cli/orchestrator/testing/paths.py +218 -0
  163. specify_cli/plan_validation.py +107 -0
  164. specify_cli/scripts/debug-dashboard-scan.py +61 -0
  165. specify_cli/scripts/tasks/acceptance_support.py +695 -0
  166. specify_cli/scripts/tasks/task_helpers.py +506 -0
  167. specify_cli/scripts/tasks/tasks_cli.py +848 -0
  168. specify_cli/scripts/validate_encoding.py +180 -0
  169. specify_cli/task_metadata_validation.py +274 -0
  170. specify_cli/tasks_support.py +447 -0
  171. specify_cli/template/__init__.py +47 -0
  172. specify_cli/template/asset_generator.py +206 -0
  173. specify_cli/template/github_client.py +334 -0
  174. specify_cli/template/manager.py +193 -0
  175. specify_cli/template/renderer.py +99 -0
  176. specify_cli/templates/AGENTS.md +190 -0
  177. specify_cli/templates/POWERSHELL_SYNTAX.md +229 -0
  178. specify_cli/templates/agent-file-template.md +35 -0
  179. specify_cli/templates/checklist-template.md +42 -0
  180. specify_cli/templates/claudeignore-template +58 -0
  181. specify_cli/templates/command-templates/accept.md +141 -0
  182. specify_cli/templates/command-templates/analyze.md +253 -0
  183. specify_cli/templates/command-templates/checklist.md +352 -0
  184. specify_cli/templates/command-templates/clarify.md +224 -0
  185. specify_cli/templates/command-templates/constitution.md +432 -0
  186. specify_cli/templates/command-templates/dashboard.md +175 -0
  187. specify_cli/templates/command-templates/implement.md +190 -0
  188. specify_cli/templates/command-templates/merge.md +374 -0
  189. specify_cli/templates/command-templates/plan.md +171 -0
  190. specify_cli/templates/command-templates/research.md +88 -0
  191. specify_cli/templates/command-templates/review.md +510 -0
  192. specify_cli/templates/command-templates/specify.md +321 -0
  193. specify_cli/templates/command-templates/status.md +92 -0
  194. specify_cli/templates/command-templates/tasks.md +199 -0
  195. specify_cli/templates/git-hooks/pre-commit +22 -0
  196. specify_cli/templates/git-hooks/pre-commit-agent-check +37 -0
  197. specify_cli/templates/git-hooks/pre-commit-encoding-check +142 -0
  198. specify_cli/templates/plan-template.md +108 -0
  199. specify_cli/templates/spec-template.md +118 -0
  200. specify_cli/templates/task-prompt-template.md +165 -0
  201. specify_cli/templates/tasks-template.md +161 -0
  202. specify_cli/templates/vscode-settings.json +13 -0
  203. specify_cli/text_sanitization.py +225 -0
  204. specify_cli/upgrade/__init__.py +18 -0
  205. specify_cli/upgrade/detector.py +239 -0
  206. specify_cli/upgrade/metadata.py +182 -0
  207. specify_cli/upgrade/migrations/__init__.py +65 -0
  208. specify_cli/upgrade/migrations/base.py +80 -0
  209. specify_cli/upgrade/migrations/m_0_10_0_python_only.py +359 -0
  210. specify_cli/upgrade/migrations/m_0_10_12_constitution_cleanup.py +99 -0
  211. specify_cli/upgrade/migrations/m_0_10_14_update_implement_slash_command.py +176 -0
  212. specify_cli/upgrade/migrations/m_0_10_1_populate_slash_commands.py +174 -0
  213. specify_cli/upgrade/migrations/m_0_10_2_update_slash_commands.py +172 -0
  214. specify_cli/upgrade/migrations/m_0_10_6_workflow_simplification.py +174 -0
  215. specify_cli/upgrade/migrations/m_0_10_8_fix_memory_structure.py +252 -0
  216. specify_cli/upgrade/migrations/m_0_10_9_repair_templates.py +168 -0
  217. specify_cli/upgrade/migrations/m_0_11_0_workspace_per_wp.py +182 -0
  218. specify_cli/upgrade/migrations/m_0_11_1_improved_workflow_templates.py +173 -0
  219. specify_cli/upgrade/migrations/m_0_11_1_update_implement_slash_command.py +160 -0
  220. specify_cli/upgrade/migrations/m_0_11_2_improved_workflow_templates.py +173 -0
  221. specify_cli/upgrade/migrations/m_0_11_3_workflow_agent_flag.py +114 -0
  222. specify_cli/upgrade/migrations/m_0_12_0_documentation_mission.py +155 -0
  223. specify_cli/upgrade/migrations/m_0_12_1_remove_kitty_specs_from_gitignore.py +183 -0
  224. specify_cli/upgrade/migrations/m_0_2_0_specify_to_kittify.py +80 -0
  225. specify_cli/upgrade/migrations/m_0_4_8_gitignore_agents.py +118 -0
  226. specify_cli/upgrade/migrations/m_0_5_0_encoding_hooks.py +141 -0
  227. specify_cli/upgrade/migrations/m_0_6_5_commands_rename.py +169 -0
  228. specify_cli/upgrade/migrations/m_0_6_7_ensure_missions.py +228 -0
  229. specify_cli/upgrade/migrations/m_0_7_2_worktree_commands_dedup.py +89 -0
  230. specify_cli/upgrade/migrations/m_0_7_3_update_scripts.py +114 -0
  231. specify_cli/upgrade/migrations/m_0_8_0_remove_active_mission.py +82 -0
  232. specify_cli/upgrade/migrations/m_0_8_0_worktree_agents_symlink.py +148 -0
  233. specify_cli/upgrade/migrations/m_0_9_0_frontmatter_only_lanes.py +346 -0
  234. specify_cli/upgrade/migrations/m_0_9_1_complete_lane_migration.py +656 -0
  235. specify_cli/upgrade/migrations/m_0_9_2_research_mission_templates.py +221 -0
  236. specify_cli/upgrade/registry.py +121 -0
  237. specify_cli/upgrade/runner.py +284 -0
  238. specify_cli/validators/__init__.py +14 -0
  239. specify_cli/validators/paths.py +154 -0
  240. specify_cli/validators/research.py +428 -0
  241. specify_cli/verify_enhanced.py +270 -0
  242. specify_cli/workspace_context.py +224 -0
@@ -0,0 +1,253 @@
1
+ ---
2
+ description: Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
3
+ scripts:
4
+ sh: spec-kitty agent check-prerequisites --json --require-tasks --include-tasks
5
+ ps: spec-kitty agent -Json -RequireTasks -IncludeTasks
6
+ ---
7
+ **Path reference rule:** When you mention directories or files, provide either the absolute path or a path relative to the project root (for example, `kitty-specs/<feature>/tasks/`). Never refer to a folder by name alone.
8
+
9
+
10
+ *Path: [templates/commands/analyze.md](templates/commands/analyze.md)*
11
+
12
+
13
+ ## User Input
14
+
15
+ ```text
16
+ $ARGUMENTS
17
+ ```
18
+
19
+ You **MUST** consider the user input before proceeding (if not empty).
20
+
21
+ ---
22
+
23
+ ## Location Pre-flight Check
24
+
25
+ **BEFORE PROCEEDING:** Verify you are working in the feature worktree.
26
+
27
+ ```bash
28
+ pwd
29
+ git branch --show-current
30
+ ```
31
+
32
+ **Expected output:**
33
+ - `pwd`: Should end with `.worktrees/001-feature-name` (or similar feature worktree)
34
+ - Branch: Should show your feature branch name like `001-feature-name` (NOT `main`)
35
+
36
+ **If you see the main branch or main repository path:**
37
+
38
+ ⛔ **STOP - You are in the wrong location!**
39
+
40
+ This command reads your feature artifacts (spec, plan, tasks) which are in your feature worktree.
41
+
42
+ **Correct the issue:**
43
+ 1. Navigate to your feature worktree: `cd .worktrees/001-feature-name`
44
+ 2. Verify you're on the correct feature branch: `git branch --show-current`
45
+ 3. Then run this analyze command again
46
+
47
+ ---
48
+
49
+ ## What This Command Analyzes
50
+
51
+ This command performs a comprehensive cross-artifact analysis. It reads (but does NOT modify):
52
+
53
+ **Files analyzed**:
54
+ - **spec.md** – Requirements, user stories, edge cases
55
+ - **plan.md** – Architecture choices, data model, technical design
56
+ - **tasks.md** – Work breakdown, task descriptions, phases
57
+ - **constitution.md** – Project principles (from `.kittify/memory/constitution.md`)
58
+
59
+ **Output**: analysis.md report with consistency findings and recommendations
60
+
61
+ ---
62
+
63
+ ## Workflow Context
64
+
65
+ **Before this**: `/spec-kitty.tasks` created your task breakdown (tasks.md complete)
66
+
67
+ **This command**:
68
+ - Validates consistency across all artifacts
69
+ - Detects gaps, duplications, ambiguities
70
+ - Verifies alignment with project constitution
71
+ - Produces read-only analysis report (no file modifications)
72
+
73
+ **After this**:
74
+ - Review analysis findings
75
+ - Fix any CRITICAL or HIGH severity issues
76
+ - Proceed to `/spec-kitty.implement` when ready
77
+ - Or return to `/spec-kitty.plan` or `/spec-kitty.tasks` if major revisions needed
78
+
79
+ This command is a quality gate before implementation begins.
80
+
81
+ ---
82
+
83
+ ## Goal
84
+
85
+ Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/tasks` has successfully produced a complete `tasks.md`.
86
+
87
+ ## Operating Constraints
88
+
89
+ **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).
90
+
91
+ **Constitution Authority**: The project constitution (`/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 `/analyze`.
92
+
93
+ ## Execution Steps
94
+
95
+ ### 1. Initialize Analysis Context
96
+
97
+ Run `{SCRIPT}` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
98
+
99
+ - SPEC = FEATURE_DIR/spec.md
100
+ - PLAN = FEATURE_DIR/plan.md
101
+ - TASKS = FEATURE_DIR/tasks.md
102
+
103
+ Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
104
+
105
+ ### 2. Load Artifacts (Progressive Disclosure)
106
+
107
+ Load only the minimal necessary context from each artifact:
108
+
109
+ **From spec.md:**
110
+
111
+ - Overview/Context
112
+ - Functional Requirements
113
+ - Non-Functional Requirements
114
+ - User Stories
115
+ - Edge Cases (if present)
116
+
117
+ **From plan.md:**
118
+
119
+ - Architecture/stack choices
120
+ - Data Model references
121
+ - Phases
122
+ - Technical constraints
123
+
124
+ **From tasks.md:**
125
+
126
+ - Task IDs
127
+ - Descriptions
128
+ - Phase grouping
129
+ - Parallel markers [P]
130
+ - Referenced file paths
131
+
132
+ **From constitution:**
133
+
134
+ - Load `/memory/constitution.md` for principle validation
135
+
136
+ ### 3. Build Semantic Models
137
+
138
+ Create internal representations (do not include raw artifacts in output):
139
+
140
+ - **Requirements inventory**: Each functional + non-functional requirement with a stable key (derive slug based on imperative phrase; e.g., "User can upload file" → `user-can-upload-file`)
141
+ - **User story/action inventory**: Discrete user actions with acceptance criteria
142
+ - **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
143
+ - **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements
144
+
145
+ ### 4. Detection Passes (Token-Efficient Analysis)
146
+
147
+ Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.
148
+
149
+ #### A. Duplication Detection
150
+
151
+ - Identify near-duplicate requirements
152
+ - Mark lower-quality phrasing for consolidation
153
+
154
+ #### B. Ambiguity Detection
155
+
156
+ - Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
157
+ - Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)
158
+
159
+ #### C. Underspecification
160
+
161
+ - Requirements with verbs but missing object or measurable outcome
162
+ - User stories missing acceptance criteria alignment
163
+ - Tasks referencing files or components not defined in spec/plan
164
+
165
+ #### D. Constitution Alignment
166
+
167
+ - Any requirement or plan element conflicting with a MUST principle
168
+ - Missing mandated sections or quality gates from constitution
169
+
170
+ #### E. Coverage Gaps
171
+
172
+ - Requirements with zero associated tasks
173
+ - Tasks with no mapped requirement/story
174
+ - Non-functional requirements not reflected in tasks (e.g., performance, security)
175
+
176
+ #### F. Inconsistency
177
+
178
+ - Terminology drift (same concept named differently across files)
179
+ - Data entities referenced in plan but absent in spec (or vice versa)
180
+ - Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
181
+ - Conflicting requirements (e.g., one requires Next.js while other specifies Vue)
182
+
183
+ ### 5. Severity Assignment
184
+
185
+ Use this heuristic to prioritize findings:
186
+
187
+ - **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
188
+ - **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
189
+ - **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
190
+ - **LOW**: Style/wording improvements, minor redundancy not affecting execution order
191
+
192
+ ### 6. Produce Compact Analysis Report
193
+
194
+ Output a Markdown report (no file writes) with the following structure:
195
+
196
+ ## Specification Analysis Report
197
+
198
+ | ID | Category | Severity | Location(s) | Summary | Recommendation |
199
+ |----|----------|----------|-------------|---------|----------------|
200
+ | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
201
+
202
+ (Add one row per finding; generate stable IDs prefixed by category initial.)
203
+
204
+ **Coverage Summary Table:**
205
+
206
+ | Requirement Key | Has Task? | Task IDs | Notes |
207
+ |-----------------|-----------|----------|-------|
208
+
209
+ **Constitution Alignment Issues:** (if any)
210
+
211
+ **Unmapped Tasks:** (if any)
212
+
213
+ **Metrics:**
214
+
215
+ - Total Requirements
216
+ - Total Tasks
217
+ - Coverage % (requirements with >=1 task)
218
+ - Ambiguity Count
219
+ - Duplication Count
220
+ - Critical Issues Count
221
+
222
+ ### 7. Provide Next Actions
223
+
224
+ At end of report, output a concise Next Actions block:
225
+
226
+ - If CRITICAL issues exist: Recommend resolving before `/implement`
227
+ - If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
228
+ - Provide explicit command suggestions: e.g., "Run /spec-kitty.specify with refinement", "Run /plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"
229
+
230
+ ### 8. Offer Remediation
231
+
232
+ Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)
233
+
234
+ ## Operating Principles
235
+
236
+ ### Context Efficiency
237
+
238
+ - **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
239
+ - **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
240
+ - **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
241
+ - **Deterministic results**: Rerunning without changes should produce consistent IDs and counts
242
+
243
+ ### Analysis Guidelines
244
+
245
+ - **NEVER modify files** (this is read-only analysis)
246
+ - **NEVER hallucinate missing sections** (if absent, report them accurately)
247
+ - **Prioritize constitution violations** (these are always CRITICAL)
248
+ - **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
249
+ - **Report zero issues gracefully** (emit success report with coverage statistics)
250
+
251
+ ## Context
252
+
253
+ {ARGS}
@@ -0,0 +1,352 @@
1
+ ---
2
+ description: Generate a custom checklist for the current feature based on user requirements.
3
+ scripts:
4
+ sh: spec-kitty agent check-prerequisites --json
5
+ ps: spec-kitty agent -Json
6
+ ---
7
+ **Path reference rule:** When you mention directories or files, provide either the absolute path or a path relative to the project root (for example, `kitty-specs/<feature>/tasks/`). Never refer to a folder by name alone.
8
+
9
+
10
+ *Path: [templates/commands/checklist.md](templates/commands/checklist.md)*
11
+
12
+
13
+ ## Checklist Purpose: "Unit Tests for English"
14
+
15
+ **CRITICAL CONCEPT**: Checklists are **UNIT TESTS FOR REQUIREMENTS WRITING** - they validate the quality, clarity, and completeness of requirements in a given domain.
16
+
17
+ **NOT for verification/testing**:
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
+ - ✅ "Are visual hierarchy requirements defined for all card types?" (completeness)
25
+ - ✅ "Is 'prominent display' quantified with specific sizing/positioning?" (clarity)
26
+ - ✅ "Are hover state requirements consistent across all interactive elements?" (consistency)
27
+ - ✅ "Are accessibility requirements defined for keyboard navigation?" (coverage)
28
+ - ✅ "Does the spec define what happens when logo image fails to load?" (edge cases)
29
+
30
+ **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.
31
+
32
+ ## User Input
33
+
34
+ ```text
35
+ $ARGUMENTS
36
+ ```
37
+
38
+ You **MUST** consider the user input before proceeding (if not empty).
39
+
40
+ ---
41
+
42
+ ## Location Pre-flight Check
43
+
44
+ **BEFORE PROCEEDING:** Verify you are working in the feature worktree.
45
+
46
+ ```bash
47
+ pwd
48
+ git branch --show-current
49
+ ```
50
+
51
+ **Expected output:**
52
+ - `pwd`: Should end with `.worktrees/001-feature-name` (or similar feature worktree)
53
+ - Branch: Should show your feature branch name like `001-feature-name` (NOT `main`)
54
+
55
+ **If you see the main branch or main repository path:**
56
+
57
+ ⛔ **STOP - You are in the wrong location!**
58
+
59
+ This command creates checklists in your feature directory. You must be in the feature worktree.
60
+
61
+ **Correct the issue:**
62
+ 1. Navigate to your feature worktree: `cd .worktrees/001-feature-name`
63
+ 2. Verify you're on the correct feature branch: `git branch --show-current`
64
+ 3. Then run this checklist command again
65
+
66
+ ---
67
+
68
+ ## What You Have Available
69
+
70
+ After running `{SCRIPT}`, you will have paths to:
71
+ - **FEATURE_DIR**: Absolute path to your feature directory (kitty-specs/001-feature-name/)
72
+ - **AVAILABLE_DOCS**: List of available documents (spec.md, plan.md, tasks.md, etc.)
73
+
74
+ Your checklist will be created at:
75
+ - **FEATURE_DIR/checklists/[domain].md** (e.g., `ux.md`, `api.md`, `security.md`)
76
+
77
+ ---
78
+
79
+ ## Workflow Context
80
+
81
+ **This command**: Creates custom quality checklists for your feature's requirements
82
+
83
+ **When to use**:
84
+ - Before or after `/spec-kitty.plan` to validate requirement quality
85
+ - Anytime during the workflow to validate specific quality dimensions
86
+ - Multiple runs create different checklists (ux.md, api.md, security.md, etc.)
87
+
88
+ **What it does**:
89
+ - Analyzes your spec/plan/tasks documents
90
+ - Creates "unit tests for requirements" (tests the spec quality, not implementation)
91
+ - Validates completeness, clarity, consistency, and coverage of requirements
92
+ - Identifies gaps, ambiguities, and conflicts
93
+
94
+ **This is NOT testing implementation** - it's validating that your requirements are well-written and complete.
95
+
96
+ ---
97
+
98
+ ## Execution Steps
99
+
100
+ 1. **Setup**: Run `{SCRIPT}` from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS list.
101
+ - All file paths must be absolute.
102
+
103
+ 2. **Clarify intent (dynamic)**: Derive up to THREE initial contextual clarifying questions (no pre-baked catalog). They MUST:
104
+ - Be generated from the user's phrasing + extracted signals from spec/plan/tasks
105
+ - Only ask about information that materially changes checklist content
106
+ - Be skipped individually if already unambiguous in `$ARGUMENTS`
107
+ - Prefer precision over breadth
108
+
109
+ Generation algorithm:
110
+ 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").
111
+ 2. Cluster signals into candidate focus areas (max 4) ranked by relevance.
112
+ 3. Identify probable audience & timing (author, reviewer, QA, release) if not explicit.
113
+ 4. Detect missing dimensions: scope breadth, depth/rigor, risk emphasis, exclusion boundaries, measurable acceptance criteria.
114
+ 5. Formulate questions chosen from these archetypes:
115
+ - Scope refinement (e.g., "Should this include integration touchpoints with X and Y or stay limited to local module correctness?")
116
+ - Risk prioritization (e.g., "Which of these potential risk areas should receive mandatory gating checks?")
117
+ - Depth calibration (e.g., "Is this a lightweight pre-commit sanity list or a formal release gate?")
118
+ - Audience framing (e.g., "Will this be used by the author only or peers during PR review?")
119
+ - Boundary exclusion (e.g., "Should we explicitly exclude performance tuning items this round?")
120
+ - Scenario class gap (e.g., "No recovery flows detected—are rollback / partial failure paths in scope?")
121
+
122
+ Question formatting rules:
123
+ - If presenting options, generate a compact table with columns: Option | Candidate | Why It Matters
124
+ - Limit to A–E options maximum; omit table if a free-form answer is clearer
125
+ - Never ask the user to restate what they already said
126
+ - Avoid speculative categories (no hallucination). If uncertain, ask explicitly: "Confirm whether X belongs in scope."
127
+
128
+ Defaults when interaction impossible:
129
+ - Depth: Standard
130
+ - Audience: Reviewer (PR) if code-related; Author otherwise
131
+ - Focus: Top 2 relevance clusters
132
+
133
+ 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.
134
+
135
+ 3. **Understand user request**: Combine `$ARGUMENTS` + clarifying answers:
136
+ - Derive checklist theme (e.g., security, review, deploy, ux)
137
+ - Consolidate explicit must-have items mentioned by user
138
+ - Map focus selections to category scaffolding
139
+ - Infer any missing context from spec/plan/tasks (do NOT hallucinate)
140
+
141
+ 4. **Load feature context**: Read from FEATURE_DIR:
142
+ - spec.md: Feature requirements and scope
143
+ - plan.md (if exists): Technical details, dependencies
144
+ - tasks.md (if exists): Implementation tasks
145
+
146
+ **Context Loading Strategy**:
147
+ - Load only necessary portions relevant to active focus areas (avoid full-file dumping)
148
+ - Prefer summarizing long sections into concise scenario/requirement bullets
149
+ - Use progressive disclosure: add follow-on retrieval only if gaps detected
150
+ - If source docs are large, generate interim summary items instead of embedding raw text
151
+
152
+ 5. **Generate checklist** - Create "Unit Tests for Requirements":
153
+ - Create `FEATURE_DIR/checklists/` directory if it doesn't exist
154
+ - Generate unique checklist filename:
155
+ - Use short, descriptive name based on domain (e.g., `ux.md`, `api.md`, `security.md`)
156
+ - Format: `[domain].md`
157
+ - If file exists, append to existing file
158
+ - Number items sequentially starting from CHK001
159
+ - Each `/spec-kitty.checklist` run creates a NEW file (never overwrites existing checklists)
160
+
161
+ **CORE PRINCIPLE - Test the Requirements, Not the Implementation**:
162
+ Every checklist item MUST evaluate the REQUIREMENTS THEMSELVES for:
163
+ - **Completeness**: Are all necessary requirements present?
164
+ - **Clarity**: Are requirements unambiguous and specific?
165
+ - **Consistency**: Do requirements align with each other?
166
+ - **Measurability**: Can requirements be objectively verified?
167
+ - **Coverage**: Are all scenarios/edge cases addressed?
168
+
169
+ **Category Structure** - Group items by requirement quality dimensions:
170
+ - **Requirement Completeness** (Are all necessary requirements documented?)
171
+ - **Requirement Clarity** (Are requirements specific and unambiguous?)
172
+ - **Requirement Consistency** (Do requirements align without conflicts?)
173
+ - **Acceptance Criteria Quality** (Are success criteria measurable?)
174
+ - **Scenario Coverage** (Are all flows/cases addressed?)
175
+ - **Edge Case Coverage** (Are boundary conditions defined?)
176
+ - **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?)
177
+ - **Dependencies & Assumptions** (Are they documented and validated?)
178
+ - **Ambiguities & Conflicts** (What needs clarification?)
179
+
180
+ **HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
181
+
182
+ ❌ **WRONG** (Testing implementation):
183
+ - "Verify landing page displays 3 episode cards"
184
+ - "Test hover states work on desktop"
185
+ - "Confirm logo click navigates home"
186
+
187
+ ✅ **CORRECT** (Testing requirements quality):
188
+ - "Are the exact number and layout of featured episodes specified?" [Completeness]
189
+ - "Is 'prominent display' quantified with specific sizing/positioning?" [Clarity]
190
+ - "Are hover state requirements consistent across all interactive elements?" [Consistency]
191
+ - "Are keyboard navigation requirements defined for all interactive UI?" [Coverage]
192
+ - "Is the fallback behavior specified when logo image fails to load?" [Edge Cases]
193
+ - "Are loading states defined for asynchronous episode data?" [Completeness]
194
+ - "Does the spec define visual hierarchy for competing UI elements?" [Clarity]
195
+
196
+ **ITEM STRUCTURE**:
197
+ Each item should follow this pattern:
198
+ - Question format asking about requirement quality
199
+ - Focus on what's WRITTEN (or not written) in the spec/plan
200
+ - Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.]
201
+ - Reference spec section `[Spec §X.Y]` when checking existing requirements
202
+ - Use `[Gap]` marker when checking for missing requirements
203
+
204
+ **EXAMPLES BY QUALITY DIMENSION**:
205
+
206
+ Completeness:
207
+ - "Are error handling requirements defined for all API failure modes? [Gap]"
208
+ - "Are accessibility requirements specified for all interactive elements? [Completeness]"
209
+ - "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
210
+
211
+ Clarity:
212
+ - "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
213
+ - "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]"
214
+ - "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
215
+
216
+ Consistency:
217
+ - "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]"
218
+ - "Are card component requirements consistent between landing and detail pages? [Consistency]"
219
+
220
+ Coverage:
221
+ - "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]"
222
+ - "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
223
+ - "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
224
+
225
+ Measurability:
226
+ - "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
227
+ - "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
228
+
229
+ **Scenario Classification & Coverage** (Requirements Quality Focus):
230
+ - Check if requirements exist for: Primary, Alternate, Exception/Error, Recovery, Non-Functional scenarios
231
+ - For each scenario class, ask: "Are [scenario type] requirements complete, clear, and consistent?"
232
+ - If scenario class missing: "Are [scenario type] requirements intentionally excluded or missing? [Gap]"
233
+ - Include resilience/rollback when state mutation occurs: "Are rollback requirements defined for migration failures? [Gap]"
234
+
235
+ **Traceability Requirements**:
236
+ - MINIMUM: ≥80% of items MUST include at least one traceability reference
237
+ - Each item should reference: spec section `[Spec §X.Y]`, or use markers: `[Gap]`, `[Ambiguity]`, `[Conflict]`, `[Assumption]`
238
+ - If no ID system exists: "Is a requirement & acceptance criteria ID scheme established? [Traceability]"
239
+
240
+ **Surface & Resolve Issues** (Requirements Quality Problems):
241
+ Ask questions about the requirements themselves:
242
+ - Ambiguities: "Is the term 'fast' quantified with specific metrics? [Ambiguity, Spec §NFR-1]"
243
+ - Conflicts: "Do navigation requirements conflict between §FR-10 and §FR-10a? [Conflict]"
244
+ - Assumptions: "Is the assumption of 'always available podcast API' validated? [Assumption]"
245
+ - Dependencies: "Are external podcast API requirements documented? [Dependency, Gap]"
246
+ - Missing definitions: "Is 'visual hierarchy' defined with measurable criteria? [Gap]"
247
+
248
+ **Content Consolidation**:
249
+ - Soft cap: If raw candidate items > 40, prioritize by risk/impact
250
+ - Merge near-duplicates checking the same requirement aspect
251
+ - If >5 low-impact edge cases, create one item: "Are edge cases X, Y, Z addressed in requirements? [Coverage]"
252
+
253
+ **🚫 ABSOLUTELY PROHIBITED** - These make it an implementation test, not a requirements test:
254
+ - ❌ Any item starting with "Verify", "Test", "Confirm", "Check" + implementation behavior
255
+ - ❌ References to code execution, user actions, system behavior
256
+ - ❌ "Displays correctly", "works properly", "functions as expected"
257
+ - ❌ "Click", "navigate", "render", "load", "execute"
258
+ - ❌ Test cases, test plans, QA procedures
259
+ - ❌ Implementation details (frameworks, APIs, algorithms)
260
+
261
+ **✅ REQUIRED PATTERNS** - These test requirements quality:
262
+ - ✅ "Are [requirement type] defined/specified/documented for [scenario]?"
263
+ - ✅ "Is [vague term] quantified/clarified with specific criteria?"
264
+ - ✅ "Are requirements consistent between [section A] and [section B]?"
265
+ - ✅ "Can [requirement] be objectively measured/verified?"
266
+ - ✅ "Are [edge cases/scenarios] addressed in requirements?"
267
+ - ✅ "Does the spec define [missing aspect]?"
268
+
269
+ 6. **Structure Reference**: Generate the checklist following the canonical template in `templates/checklist-template.md` for title, meta section, category headings, and ID formatting. If template is unavailable, use: H1 title, purpose/created meta lines, `##` category sections containing `- [ ] CHK### <requirement item>` lines with globally incrementing IDs starting at CHK001.
270
+
271
+ 7. **Report**: Output full path to created checklist, item count, and remind user that each run creates a new file. Summarize:
272
+ - Focus areas selected
273
+ - Depth level
274
+ - Actor/timing
275
+ - Any explicit user-specified must-have items incorporated
276
+
277
+ **Important**: Each `/spec-kitty.checklist` command invocation creates a checklist file using short, descriptive names unless file already exists. This allows:
278
+
279
+ - Multiple checklists of different types (e.g., `ux.md`, `test.md`, `security.md`)
280
+ - Simple, memorable filenames that indicate checklist purpose
281
+ - Easy identification and navigation in the `checklists/` folder
282
+
283
+ To avoid clutter, use descriptive types and clean up obsolete checklists when done.
284
+
285
+ ## Example Checklist Types & Sample Items
286
+
287
+ **UX Requirements Quality:** `ux.md`
288
+
289
+ Sample items (testing the requirements, NOT the implementation):
290
+ - "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]"
291
+ - "Is the number and positioning of UI elements explicitly specified? [Completeness, Spec §FR-1]"
292
+ - "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]"
293
+ - "Are accessibility requirements specified for all interactive elements? [Coverage, Gap]"
294
+ - "Is fallback behavior defined when images fail to load? [Edge Case, Gap]"
295
+ - "Can 'prominent display' be objectively measured? [Measurability, Spec §FR-4]"
296
+
297
+ **API Requirements Quality:** `api.md`
298
+
299
+ Sample items:
300
+ - "Are error response formats specified for all failure scenarios? [Completeness]"
301
+ - "Are rate limiting requirements quantified with specific thresholds? [Clarity]"
302
+ - "Are authentication requirements consistent across all endpoints? [Consistency]"
303
+ - "Are retry/timeout requirements defined for external dependencies? [Coverage, Gap]"
304
+ - "Is versioning strategy documented in requirements? [Gap]"
305
+
306
+ **Performance Requirements Quality:** `performance.md`
307
+
308
+ Sample items:
309
+ - "Are performance requirements quantified with specific metrics? [Clarity]"
310
+ - "Are performance targets defined for all critical user journeys? [Coverage]"
311
+ - "Are performance requirements under different load conditions specified? [Completeness]"
312
+ - "Can performance requirements be objectively measured? [Measurability]"
313
+ - "Are degradation requirements defined for high-load scenarios? [Edge Case, Gap]"
314
+
315
+ **Security Requirements Quality:** `security.md`
316
+
317
+ Sample items:
318
+ - "Are authentication requirements specified for all protected resources? [Coverage]"
319
+ - "Are data protection requirements defined for sensitive information? [Completeness]"
320
+ - "Is the threat model documented and requirements aligned to it? [Traceability]"
321
+ - "Are security requirements consistent with compliance obligations? [Consistency]"
322
+ - "Are security failure/breach response requirements defined? [Gap, Exception Flow]"
323
+
324
+ ## Anti-Examples: What NOT To Do
325
+
326
+ **❌ WRONG - These test implementation, not requirements:**
327
+
328
+ ```markdown
329
+ - [ ] CHK001 - Verify landing page displays 3 episode cards [Spec §FR-001]
330
+ - [ ] CHK002 - Test hover states work correctly on desktop [Spec §FR-003]
331
+ - [ ] CHK003 - Confirm logo click navigates to home page [Spec §FR-010]
332
+ - [ ] CHK004 - Check that related episodes section shows 3-5 items [Spec §FR-005]
333
+ ```
334
+
335
+ **✅ CORRECT - These test requirements quality:**
336
+
337
+ ```markdown
338
+ - [ ] CHK001 - Are the number and layout of featured episodes explicitly specified? [Completeness, Spec §FR-001]
339
+ - [ ] CHK002 - Are hover state requirements consistently defined for all interactive elements? [Consistency, Spec §FR-003]
340
+ - [ ] CHK003 - Are navigation requirements clear for all clickable brand elements? [Clarity, Spec §FR-010]
341
+ - [ ] CHK004 - Is the selection criteria for related episodes documented? [Gap, Spec §FR-005]
342
+ - [ ] CHK005 - Are loading state requirements defined for asynchronous episode data? [Gap]
343
+ - [ ] CHK006 - Can "visual hierarchy" requirements be objectively measured? [Measurability, Spec §FR-001]
344
+ ```
345
+
346
+ **Key Differences:**
347
+ - Wrong: Tests if the system works correctly
348
+ - Correct: Tests if the requirements are written correctly
349
+ - Wrong: Verification of behavior
350
+ - Correct: Validation of requirement quality
351
+ - Wrong: "Does it do X?"
352
+ - Correct: "Is X clearly specified?"