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,432 @@
1
+ ---
2
+ description: Create or update the project constitution through interactive phase-based discovery.
3
+ ---
4
+ **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.
5
+
6
+ *Path: [templates/commands/constitution.md](templates/commands/constitution.md)*
7
+
8
+ ## User Input
9
+
10
+ ```text
11
+ $ARGUMENTS
12
+ ```
13
+
14
+ You **MUST** consider the user input before proceeding (if not empty).
15
+
16
+ ---
17
+
18
+ ## What This Command Does
19
+
20
+ This command creates or updates the **project constitution** through an interactive, phase-based discovery workflow.
21
+
22
+ **Location**: `.kittify/memory/constitution.md` (project root, not worktrees)
23
+ **Scope**: Project-wide principles that apply to ALL features
24
+
25
+ **Important**: The constitution is OPTIONAL. All spec-kitty commands work without it.
26
+
27
+ **Constitution Purpose**:
28
+ - Capture technical standards (languages, testing, deployment)
29
+ - Document code quality expectations (review process, quality gates)
30
+ - Record tribal knowledge (team conventions, lessons learned)
31
+ - Define governance (how the constitution changes, who enforces it)
32
+
33
+ ---
34
+
35
+ ## Discovery Workflow
36
+
37
+ This command uses a **4-phase discovery process**:
38
+
39
+ 1. **Phase 1: Technical Standards** (Recommended)
40
+ - Languages, frameworks, testing requirements
41
+ - Performance targets, deployment constraints
42
+ - ≈3-4 questions, creates a lean foundation
43
+
44
+ 2. **Phase 2: Code Quality** (Optional)
45
+ - PR requirements, review checklist, quality gates
46
+ - Documentation standards
47
+ - ≈3-4 questions
48
+
49
+ 3. **Phase 3: Tribal Knowledge** (Optional)
50
+ - Team conventions, lessons learned
51
+ - Historical decisions (optional)
52
+ - ≈2-4 questions
53
+
54
+ 4. **Phase 4: Governance** (Optional)
55
+ - Amendment process, compliance validation
56
+ - Exception handling (optional)
57
+ - ≈2-3 questions
58
+
59
+ **Paths**:
60
+ - **Minimal** (≈1 page): Phase 1 only → ≈3-5 questions
61
+ - **Comprehensive** (≈2-3 pages): All phases → ≈8-12 questions
62
+
63
+ ---
64
+
65
+ ## Execution Outline
66
+
67
+ ### Step 1: Initial Choice
68
+
69
+ Ask the user:
70
+ ```
71
+ Do you want to establish a project constitution?
72
+
73
+ A) No, skip it - I don't need a formal constitution
74
+ B) Yes, minimal - Core technical standards only (≈1 page, 3-5 questions)
75
+ C) Yes, comprehensive - Full governance and tribal knowledge (≈2-3 pages, 8-12 questions)
76
+ ```
77
+
78
+ Handle responses:
79
+ - **A (Skip)**: Create a minimal placeholder at `.kittify/memory/constitution.md`:
80
+ - Title + short note: "Constitution skipped - not required for spec-kitty usage. Run /spec-kitty.constitution anytime to create one."
81
+ - Exit successfully.
82
+ - **B (Minimal)**: Continue with Phase 1 only.
83
+ - **C (Comprehensive)**: Continue through all phases, asking whether to skip each optional phase.
84
+
85
+ ### Step 2: Phase 1 - Technical Standards
86
+
87
+ Context:
88
+ ```
89
+ Phase 1: Technical Standards
90
+ These are the non-negotiable technical requirements that all features must follow.
91
+ This phase is recommended for all projects.
92
+ ```
93
+
94
+ Ask one question at a time:
95
+
96
+ **Q1: Languages and Frameworks**
97
+ ```
98
+ What languages and frameworks are required for this project?
99
+ Examples:
100
+ - "Python 3.11+ with FastAPI for backend"
101
+ - "TypeScript 4.9+ with React 18 for frontend"
102
+ - "Rust 1.70+ with no external dependencies"
103
+ ```
104
+
105
+ **Q2: Testing Requirements**
106
+ ```
107
+ What testing framework and coverage requirements?
108
+ Examples:
109
+ - "pytest with 80% line coverage, 100% for critical paths"
110
+ - "Jest with 90% coverage, unit + integration tests required"
111
+ - "cargo test, no specific coverage target but all features must have tests"
112
+ ```
113
+
114
+ **Q3: Performance and Scale Targets**
115
+ ```
116
+ What are the performance and scale expectations?
117
+ Examples:
118
+ - "Handle 1000 requests/second at p95 < 200ms"
119
+ - "Support 10k concurrent users, 1M daily active users"
120
+ - "CLI operations complete in < 2 seconds"
121
+ - "N/A - performance not a primary concern"
122
+ ```
123
+
124
+ **Q4: Deployment and Constraints**
125
+ ```
126
+ What are the deployment constraints or platform requirements?
127
+ Examples:
128
+ - "Docker-only, deployed to Kubernetes"
129
+ - "Must run on Ubuntu 20.04 LTS without external dependencies"
130
+ - "Cross-platform: Linux, macOS, Windows 10+"
131
+ - "N/A - no specific deployment constraints"
132
+ ```
133
+
134
+ ### Step 3: Phase 2 - Code Quality (Optional)
135
+
136
+ Ask only if comprehensive path is selected:
137
+ ```
138
+ Phase 2: Code Quality
139
+ Skip this if your team uses standard practices without special requirements.
140
+
141
+ Do you want to define code quality standards?
142
+ A) Yes, ask questions
143
+ B) No, skip this phase (use standard practices)
144
+ ```
145
+
146
+ If yes, ask one at a time:
147
+
148
+ **Q5: PR Requirements**
149
+ ```
150
+ What are the requirements for pull requests?
151
+ Examples:
152
+ - "2 approvals required, 1 must be from core team"
153
+ - "1 approval required, PR must pass CI checks"
154
+ - "Self-merge allowed after CI passes for maintainers"
155
+ ```
156
+
157
+ **Q6: Code Review Checklist**
158
+ ```
159
+ What should reviewers check during code review?
160
+ Examples:
161
+ - "Tests added, docstrings updated, follows PEP 8, no security issues"
162
+ - "Type annotations present, error handling robust, performance considered"
163
+ - "Standard review - correctness, clarity, maintainability"
164
+ ```
165
+
166
+ **Q7: Quality Gates**
167
+ ```
168
+ What quality gates must pass before merging?
169
+ Examples:
170
+ - "All tests pass, coverage ≥80%, linter clean, security scan clean"
171
+ - "Tests pass, type checking passes, manual QA approved"
172
+ - "CI green, no merge conflicts, PR approved"
173
+ ```
174
+
175
+ **Q8: Documentation Standards**
176
+ ```
177
+ What documentation is required?
178
+ Examples:
179
+ - "All public APIs must have docstrings + examples"
180
+ - "README updated for new features, ADRs for architectural decisions"
181
+ - "Inline comments for complex logic, keep docs up to date"
182
+ - "Minimal - code should be self-documenting"
183
+ ```
184
+
185
+ ### Step 4: Phase 3 - Tribal Knowledge (Optional)
186
+
187
+ Ask only if comprehensive path is selected:
188
+ ```
189
+ Phase 3: Tribal Knowledge
190
+ Skip this for new projects or if team conventions are minimal.
191
+
192
+ Do you want to capture tribal knowledge?
193
+ A) Yes, ask questions
194
+ B) No, skip this phase
195
+ ```
196
+
197
+ If yes, ask:
198
+
199
+ **Q9: Team Conventions**
200
+ ```
201
+ What team conventions or coding styles should everyone follow?
202
+ Examples:
203
+ - "Use Result<T, E> for fallible operations, never unwrap() in prod"
204
+ - "Prefer composition over inheritance, keep classes small (<200 lines)"
205
+ - "Use feature flags for gradual rollouts, never merge half-finished features"
206
+ ```
207
+
208
+ **Q10: Lessons Learned**
209
+ ```
210
+ What past mistakes or lessons learned should guide future work?
211
+ Examples:
212
+ - "Always version APIs from day 1"
213
+ - "Write integration tests first"
214
+ - "Keep dependencies minimal - every dependency is a liability"
215
+ - "N/A - no major lessons yet"
216
+ ```
217
+
218
+ Optional follow-up:
219
+ ```
220
+ Do you want to document historical architectural decisions?
221
+ A) Yes
222
+ B) No
223
+ ```
224
+
225
+ **Q11: Historical Decisions** (only if yes)
226
+ ```
227
+ Any historical architectural decisions that should guide future work?
228
+ Examples:
229
+ - "Chose microservices for independent scaling"
230
+ - "Chose monorepo for atomic changes across services"
231
+ - "Chose SQLite for simplicity over PostgreSQL"
232
+ ```
233
+
234
+ ### Step 5: Phase 4 - Governance (Optional)
235
+
236
+ Ask only if comprehensive path is selected:
237
+ ```
238
+ Phase 4: Governance
239
+ Skip this to use simple defaults.
240
+
241
+ Do you want to define governance process?
242
+ A) Yes, ask questions
243
+ B) No, skip this phase (use simple defaults)
244
+ ```
245
+
246
+ If skipped, use defaults:
247
+ - Amendment: Any team member can propose changes via PR
248
+ - Compliance: Team validates during code review
249
+ - Exceptions: Discuss with team, document in PR
250
+
251
+ If yes, ask:
252
+
253
+ **Q12: Amendment Process**
254
+ ```
255
+ How should the constitution be amended?
256
+ Examples:
257
+ - "PR with 2 approvals, announce in team chat, 1 week discussion"
258
+ - "Any maintainer can update via PR"
259
+ - "Quarterly review, team votes on changes"
260
+ ```
261
+
262
+ **Q13: Compliance Validation**
263
+ ```
264
+ Who validates that features comply with the constitution?
265
+ Examples:
266
+ - "Code reviewers check compliance, block merge if violated"
267
+ - "Team lead reviews architecture"
268
+ - "Self-managed - developers responsible"
269
+ ```
270
+
271
+ Optional follow-up:
272
+ ```
273
+ Do you want to define exception handling?
274
+ A) Yes
275
+ B) No
276
+ ```
277
+
278
+ **Q14: Exception Handling** (only if yes)
279
+ ```
280
+ How should exceptions to the constitution be handled?
281
+ Examples:
282
+ - "Document in ADR, require 3 approvals, set sunset date"
283
+ - "Case-by-case discussion, strong justification required"
284
+ - "Exceptions discouraged - update constitution instead"
285
+ ```
286
+
287
+ ### Step 6: Summary and Confirmation
288
+
289
+ Present a summary and ask for confirmation:
290
+ ```
291
+ Constitution Summary
292
+ ====================
293
+
294
+ You've completed [X] phases and answered [Y] questions.
295
+ Here's what will be written to .kittify/memory/constitution.md:
296
+
297
+ Technical Standards:
298
+ - Languages: [Q1]
299
+ - Testing: [Q2]
300
+ - Performance: [Q3]
301
+ - Deployment: [Q4]
302
+
303
+ [If Phase 2 completed]
304
+ Code Quality:
305
+ - PR Requirements: [Q5]
306
+ - Review Checklist: [Q6]
307
+ - Quality Gates: [Q7]
308
+ - Documentation: [Q8]
309
+
310
+ [If Phase 3 completed]
311
+ Tribal Knowledge:
312
+ - Conventions: [Q9]
313
+ - Lessons Learned: [Q10]
314
+ - Historical Decisions: [Q11 if present]
315
+
316
+ Governance: [Custom if Phase 4 completed, otherwise defaults]
317
+
318
+ Estimated length: ≈[50-80 lines minimal] or ≈[150-200 lines comprehensive]
319
+
320
+ Proceed with writing constitution?
321
+ A) Yes, write it
322
+ B) No, let me start over
323
+ C) Cancel, don't create constitution
324
+ ```
325
+
326
+ Handle responses:
327
+ - **A**: Write the constitution file.
328
+ - **B**: Restart from Step 1.
329
+ - **C**: Exit without writing.
330
+
331
+ ### Step 7: Write Constitution File
332
+
333
+ Generate the constitution as Markdown:
334
+
335
+ ```markdown
336
+ # [PROJECT_NAME] Constitution
337
+
338
+ > Auto-generated by spec-kitty constitution command
339
+ > Created: [YYYY-MM-DD]
340
+ > Version: 1.0.0
341
+
342
+ ## Purpose
343
+
344
+ This constitution captures the technical standards, code quality expectations,
345
+ tribal knowledge, and governance rules for [PROJECT_NAME]. All features and
346
+ pull requests should align with these principles.
347
+
348
+ ## Technical Standards
349
+
350
+ ### Languages and Frameworks
351
+ [Q1]
352
+
353
+ ### Testing Requirements
354
+ [Q2]
355
+
356
+ ### Performance and Scale
357
+ [Q3]
358
+
359
+ ### Deployment and Constraints
360
+ [Q4]
361
+
362
+ [If Phase 2 completed]
363
+ ## Code Quality
364
+
365
+ ### Pull Request Requirements
366
+ [Q5]
367
+
368
+ ### Code Review Checklist
369
+ [Q6]
370
+
371
+ ### Quality Gates
372
+ [Q7]
373
+
374
+ ### Documentation Standards
375
+ [Q8]
376
+
377
+ [If Phase 3 completed]
378
+ ## Tribal Knowledge
379
+
380
+ ### Team Conventions
381
+ [Q9]
382
+
383
+ ### Lessons Learned
384
+ [Q10]
385
+
386
+ [If Q11 present]
387
+ ### Historical Decisions
388
+ [Q11]
389
+
390
+ ## Governance
391
+
392
+ [If Phase 4 completed]
393
+ ### Amendment Process
394
+ [Q12]
395
+
396
+ ### Compliance Validation
397
+ [Q13]
398
+
399
+ [If Q14 present]
400
+ ### Exception Handling
401
+ [Q14]
402
+
403
+ [If Phase 4 skipped, use defaults]
404
+ ### Amendment Process
405
+ Any team member can propose amendments via pull request. Changes are discussed
406
+ and merged following standard PR review process.
407
+
408
+ ### Compliance Validation
409
+ Code reviewers validate compliance during PR review. Constitution violations
410
+ should be flagged and addressed before merge.
411
+
412
+ ### Exception Handling
413
+ Exceptions discussed case-by-case with team. Strong justification required.
414
+ Consider updating constitution if exceptions become common.
415
+ ```
416
+
417
+ ### Step 8: Success Message
418
+
419
+ After writing, provide:
420
+ - Location of the file
421
+ - Phases completed and questions answered
422
+ - Next steps (review, share with team, run /spec-kitty.plan)
423
+
424
+ ---
425
+
426
+ ## Required Behaviors
427
+
428
+ - Ask one question at a time.
429
+ - Offer skip options and explain when to skip.
430
+ - Keep responses concise and user-focused.
431
+ - Ensure the constitution stays lean (1-3 pages, not 10 pages).
432
+ - If user chooses to skip entirely, still create the minimal placeholder file and exit successfully.
@@ -0,0 +1,101 @@
1
+ ---
2
+ description: Open the Spec Kitty dashboard in your browser.
3
+ ---
4
+
5
+ ## Dashboard Access
6
+
7
+ This command helps you access the Spec Kitty dashboard that was started when you ran `spec-kitty init`.
8
+
9
+ ## What to do
10
+
11
+ 1. **Check if dashboard is running**: Look for the `.kittify/.dashboard` file which contains the dashboard URL and port.
12
+
13
+ 2. **If dashboard file exists**:
14
+ - Read the URL from the first line of `.kittify/.dashboard`
15
+ - Display the URL to the user in a prominent, easy-to-copy format
16
+ - Attempt to open the URL in the user's default web browser using Python's `webbrowser` module
17
+ - If browser opening fails, show instructions on how to manually open it
18
+
19
+ 3. **If dashboard file does not exist**:
20
+ - Inform the user that no dashboard is currently running
21
+ - Explain that they need to run `spec-kitty init` to start the dashboard
22
+ - Provide clear instructions
23
+
24
+ ## Implementation
25
+
26
+ ```python
27
+ import webbrowser
28
+ import socket
29
+ from pathlib import Path
30
+
31
+ # Check for dashboard info file
32
+ dashboard_file = Path('.kittify/.dashboard')
33
+
34
+ if not dashboard_file.exists():
35
+ print("❌ No dashboard information found")
36
+ print()
37
+ print("To start the dashboard, run:")
38
+ print(" spec-kitty init .")
39
+ print()
40
+ else:
41
+ # Read dashboard URL
42
+ content = dashboard_file.read_text().strip().split('\n')
43
+ dashboard_url = content[0] if content else None
44
+ port_str = content[1] if len(content) > 1 else None
45
+
46
+ if not dashboard_url or not port_str:
47
+ print("❌ Dashboard file is invalid or empty")
48
+ print(" Try running: spec-kitty init .")
49
+ print()
50
+ else:
51
+ # Verify dashboard is actually running on this port
52
+ port = int(port_str)
53
+ is_running = False
54
+ try:
55
+ sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
56
+ sock.settimeout(1)
57
+ result = sock.connect_ex(('127.0.0.1', port))
58
+ sock.close()
59
+ is_running = (result == 0)
60
+ except:
61
+ is_running = False
62
+
63
+ print()
64
+ print("Spec Kitty Dashboard")
65
+ print("=" * 60)
66
+ print()
67
+ print(f" URL: {dashboard_url}")
68
+
69
+ if not is_running:
70
+ print()
71
+ print(" ⚠️ Status: Dashboard appears to be stopped")
72
+ print(f" (Port {port} is not responding)")
73
+ else:
74
+ print()
75
+ print(f" ✅ Status: Running on port {port}")
76
+
77
+ print()
78
+ print("=" * 60)
79
+ print()
80
+
81
+ if is_running:
82
+ # Try to open in browser
83
+ try:
84
+ webbrowser.open(dashboard_url)
85
+ print("✅ Opening dashboard in your browser...")
86
+ print()
87
+ except Exception as e:
88
+ print("⚠️ Could not automatically open browser")
89
+ print(f" Please open this URL manually: {dashboard_url}")
90
+ print()
91
+ else:
92
+ print("💡 To start the dashboard, run: spec-kitty init .")
93
+ print()
94
+ ```
95
+
96
+ ## Success Criteria
97
+
98
+ - User sees the dashboard URL clearly displayed
99
+ - Browser opens automatically to the dashboard
100
+ - If browser doesn't open, user gets clear instructions
101
+ - Error messages are helpful and actionable
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: Create an isolated workspace (worktree) for implementing a specific work package.
3
+ ---
4
+
5
+ ## ⚠️ CRITICAL: Working Directory Requirement
6
+
7
+ **After running `spec-kitty implement WP##`, you MUST:**
8
+
9
+ 1. **Run the cd command shown in the output** - e.g., `cd .worktrees/###-feature-WP##/`
10
+ 2. **ALL file operations happen in this directory** - Read, Write, Edit tools must target files in the workspace
11
+ 3. **NEVER write deliverable files to the main repository** - This is a critical workflow error
12
+
13
+ **Why this matters:**
14
+ - Each WP has an isolated worktree with its own branch
15
+ - Changes in main repository will NOT be seen by reviewers looking at the WP worktree
16
+ - Writing to main instead of the workspace causes review failures and merge conflicts
17
+
18
+ ---
19
+
20
+ **IMPORTANT**: After running the command below, you'll see a LONG work package prompt (~1000+ lines).
21
+
22
+ **You MUST scroll to the BOTTOM** to see the completion command!
23
+
24
+ Run this command to get the work package prompt and implementation instructions:
25
+
26
+ ```bash
27
+ spec-kitty agent workflow implement $ARGUMENTS --agent <your-name>
28
+ ```
29
+
30
+ **CRITICAL**: You MUST provide `--agent <your-name>` to track who is implementing!
31
+
32
+ If no WP ID is provided, it will automatically find the first work package with `lane: "planned"` and move it to "doing" for you.
33
+
34
+ **After implementation, scroll to the bottom and run**:
35
+ ```bash
36
+ spec-kitty agent tasks move-task WP## --to for_review --note "Ready for review: <summary>"
37
+ ```
38
+
39
+ **The Python script handles all file updates automatically - no manual editing required!**
40
+
41
+ **NOTE**: If `/spec-kitty.status` shows your WP in "doing" after you moved it to "for_review", don't panic - a reviewer may have moved it back (changes requested), or there's a sync delay. Focus on your WP.