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,309 @@
1
+ ---
2
+ description: Implement documentation work packages using Divio templates and generators.
3
+ ---
4
+
5
+ # Command Template: /spec-kitty.implement (Documentation Mission)
6
+
7
+ **Phase**: Generate
8
+ **Purpose**: Create documentation from templates, invoke generators for reference docs, populate templates with content.
9
+
10
+ ## ⚠️ CRITICAL: Working Directory Requirement
11
+
12
+ **After running `spec-kitty implement WP##`, you MUST:**
13
+
14
+ 1. **Run the cd command shown in the output** - e.g., `cd .worktrees/###-feature-WP##/`
15
+ 2. **ALL file operations happen in this directory** - Read, Write, Edit tools must target files in the workspace
16
+ 3. **NEVER write deliverable files to the main repository** - This is a critical workflow error
17
+
18
+ **Why this matters:**
19
+ - Each WP has an isolated worktree with its own branch
20
+ - Changes in main repository will NOT be seen by reviewers looking at the WP worktree
21
+ - Writing to main instead of the workspace causes review failures and merge conflicts
22
+
23
+ **Verify you're in the right directory:**
24
+ ```bash
25
+ pwd
26
+ # Should show: /path/to/repo/.worktrees/###-feature-WP##/
27
+ ```
28
+
29
+ ---
30
+
31
+ ## User Input
32
+
33
+ ```text
34
+ $ARGUMENTS
35
+ ```
36
+
37
+ You **MUST** consider the user input before proceeding (if not empty).
38
+
39
+ ## Implementation Workflow
40
+
41
+ Documentation implementation follows the standard workspace-per-WP model:
42
+ - **Worktrees used** - Each WP has its own worktree with dedicated branch (same as code missions)
43
+ - **Templates populated** - Use Divio templates as starting point
44
+ - **Generators invoked** - Run JSDoc/Sphinx/rustdoc to create API reference
45
+ - **Content authored** - Write tutorial/how-to/explanation content in worktree
46
+ - **Quality validated** - Check accessibility, links, build before merging
47
+ - **Release prepared (optional)** - Draft `release.md` when publish is in scope
48
+
49
+ ---
50
+
51
+ ## Per-Work-Package Implementation
52
+
53
+ ### For WP01: Structure & Generator Setup
54
+
55
+ **Objective**: Create directory structure and configure doc generators.
56
+
57
+ **Steps**:
58
+ 1. Create docs/ directory structure:
59
+ ```bash
60
+ mkdir -p docs/{tutorials,how-to,reference/api,explanation}
61
+ ```
62
+ 2. Create index.md landing page:
63
+ ```markdown
64
+ # {Project Name} Documentation
65
+
66
+ Welcome to the documentation for {Project Name}.
67
+
68
+ ## Getting Started
69
+
70
+ - [Tutorials](tutorials/) - Learn by doing
71
+ - [How-To Guides](how-to/) - Solve specific problems
72
+ - [Reference](reference/) - Technical specifications
73
+ - [Explanation](explanation/) - Understand concepts
74
+ ```
75
+ 3. Configure generators (per plan.md):
76
+ - For Sphinx: Create docs/conf.py from template
77
+ - For JSDoc: Create jsdoc.json from template
78
+ - For rustdoc: Update Cargo.toml with metadata
79
+ 4. Create build script:
80
+ ```bash
81
+ #!/bin/bash
82
+ # build-docs.sh
83
+
84
+ # Build Python docs with Sphinx
85
+ sphinx-build -b html docs/ docs/_build/html/
86
+
87
+ # Build JavaScript docs with JSDoc
88
+ npx jsdoc -c jsdoc.json
89
+
90
+ # Build Rust docs
91
+ cargo doc --no-deps
92
+
93
+ echo "Documentation built successfully!"
94
+ ```
95
+ 5. Test build: Run build script, verify no errors
96
+
97
+ **Deliverables**:
98
+ - docs/ directory structure
99
+ - index.md landing page
100
+ - Generator configs (conf.py, jsdoc.json, Cargo.toml)
101
+ - build-docs.sh script
102
+ - Successful test build
103
+
104
+ ---
105
+
106
+ ### For WP02-05: Content Creation (Tutorials, How-Tos, Reference, Explanation)
107
+
108
+ **Objective**: Write documentation content using Divio templates.
109
+
110
+ **Steps**:
111
+ 1. **Select appropriate Divio template**:
112
+ - Tutorial: Use `templates/divio/tutorial-template.md`
113
+ - How-To: Use `templates/divio/howto-template.md`
114
+ - Reference: Use `templates/divio/reference-template.md` (for manual reference)
115
+ - Explanation: Use `templates/divio/explanation-template.md`
116
+
117
+ 2. **Copy template to docs/**:
118
+ ```bash
119
+ # Example for tutorial
120
+ cp templates/divio/tutorial-template.md docs/tutorials/getting-started.md
121
+ ```
122
+
123
+ 3. **Fill in frontmatter**:
124
+ ```yaml
125
+ ---
126
+ type: tutorial
127
+ audience: "beginners"
128
+ purpose: "Learn how to get started with {Project}"
129
+ created: "2026-01-12"
130
+ estimated_time: "15 minutes"
131
+ prerequisites: "Python 3.11+, pip"
132
+ ---
133
+ ```
134
+
135
+ 4. **Replace placeholders with content**:
136
+ - {Title} → Actual title
137
+ - [Description] → Actual description
138
+ - [Step actions] → Actual step-by-step instructions
139
+ - [Examples] → Real code examples
140
+
141
+ 5. **Follow Divio principles for this type**:
142
+ - **Tutorial**: Learning-oriented, step-by-step, show results at each step
143
+ - **How-To**: Goal-oriented, assume experience, solve specific problem
144
+ - **Reference**: Information-oriented, complete, consistent format
145
+ - **Explanation**: Understanding-oriented, conceptual, discuss alternatives
146
+
147
+ 6. **Add real examples and content**:
148
+ - Use actual project APIs, not placeholders
149
+ - Test all code examples (they must work!)
150
+ - Add real screenshots (with alt text)
151
+ - Use diverse example names (not just "John")
152
+
153
+ 7. **Validate against checklists**:
154
+ - Divio compliance (correct type characteristics?)
155
+ - Accessibility (heading hierarchy, alt text, clear language?)
156
+ - Inclusivity (diverse examples, neutral language?)
157
+
158
+ **For Reference Documentation**:
159
+
160
+ **Auto-Generated Reference** (API docs):
161
+ 1. Ensure code has good doc comments:
162
+ - Python: Docstrings with Google/NumPy format
163
+ - JavaScript: JSDoc comments with @param, @returns
164
+ - Rust: /// doc comments
165
+ 2. Run generator:
166
+ ```bash
167
+ # Sphinx (Python)
168
+ sphinx-build -b html docs/ docs/_build/html/
169
+
170
+ # JSDoc (JavaScript)
171
+ npx jsdoc -c jsdoc.json
172
+
173
+ # rustdoc (Rust)
174
+ cargo doc --no-deps --document-private-items
175
+ ```
176
+ 3. Review generated output:
177
+ - Are all public APIs present?
178
+ - Are descriptions clear?
179
+ - Are examples included?
180
+ - Are links working?
181
+ 4. If generated docs have gaps:
182
+ - Add/improve doc comments in source code
183
+ - Regenerate
184
+ - Or supplement with manual reference
185
+
186
+ **Manual Reference** (CLI, config, data formats):
187
+ 1. Use reference template
188
+ 2. Document every option, every command, every field
189
+ 3. Be consistent in format (use tables)
190
+ 4. Include examples for each item
191
+
192
+ **Deliverables**:
193
+ - Completed documentation files in docs/
194
+ - All templates filled with real content
195
+ - All code examples tested and working
196
+ - All Divio type principles followed
197
+ - All accessibility/inclusivity checklists satisfied
198
+
199
+ ---
200
+
201
+ ### For WP06: Quality Validation
202
+
203
+ **Objective**: Validate documentation quality before considering complete.
204
+
205
+ **Steps**:
206
+ 1. **Automated checks**:
207
+ ```bash
208
+ # Check heading hierarchy
209
+ find docs/ -name "*.md" -exec grep -E '^#+' {} + | head -50
210
+
211
+ # Check for broken links
212
+ markdown-link-check docs/**/*.md
213
+
214
+ # Check for missing alt text
215
+ grep -r '!\[.*\](' docs/ | grep -v '\[.*\]' || echo "✓ All images have alt text"
216
+
217
+ # Spell check
218
+ aspell check docs/**/*.md
219
+
220
+ # Build check
221
+ ./build-docs.sh 2>&1 | grep -i error || echo "✓ Build successful"
222
+ ```
223
+
224
+ 2. **Manual checks**:
225
+ - Read each doc as target audience
226
+ - Follow tutorials - do they work?
227
+ - Try how-tos - do they solve problems?
228
+ - Check reference - is it complete?
229
+ - Read explanations - do they clarify?
230
+
231
+ 3. **Divio compliance check**:
232
+ - Is each doc correctly classified?
233
+ - Does it follow principles for its type?
234
+ - Is it solving the right problem for that type?
235
+
236
+ 4. **Accessibility check**:
237
+ - Proper heading hierarchy?
238
+ - All images have alt text?
239
+ - Clear language (not jargon-heavy)?
240
+ - Links are descriptive?
241
+
242
+ 5. **Peer review**:
243
+ - Have someone from target audience review
244
+ - Gather feedback on clarity, completeness, usability
245
+ - Revise based on feedback
246
+
247
+ 6. **Final build and deploy** (if applicable):
248
+ ```bash
249
+ # Build final documentation
250
+ ./build-docs.sh
251
+
252
+ # Deploy to hosting (example for GitHub Pages)
253
+ # (Deployment steps depend on hosting platform)
254
+ ```
255
+
256
+ **Deliverables**:
257
+ - All automated checks passing
258
+ - Manual review completed with feedback addressed
259
+ - Divio compliance verified
260
+ - Accessibility compliance verified
261
+ - Final build successful
262
+ - Documentation deployed (if applicable)
263
+
264
+ ---
265
+
266
+ ## Key Guidelines
267
+
268
+ **For Agents**:
269
+ - Use Divio templates as starting point, not empty files
270
+ - Fill templates with real content, not more placeholders
271
+ - Test all code examples before committing
272
+ - Follow Divio principles strictly for each type
273
+ - Run generators for reference docs (don't write API docs manually)
274
+ - Validate quality at end (automated + manual checks)
275
+
276
+ **For Users**:
277
+ - Implementation creates actual documentation, not just structure
278
+ - Templates provide guidance, you provide content
279
+ - Generators handle API reference, you write the rest
280
+ - Quality validation ensures documentation is actually useful
281
+ - Peer review from target audience is valuable
282
+
283
+ ---
284
+
285
+ ## Common Pitfalls
286
+
287
+ **DON'T**:
288
+ - Mix Divio types (tutorial that explains concepts, how-to that teaches basics)
289
+ - Skip testing code examples (broken examples break trust)
290
+ - Use only Western male names in examples
291
+ - Say "simply" or "just" or "obviously" (ableist language)
292
+ - Skip alt text for images (accessibility barrier)
293
+ - Write jargon-heavy prose (clarity issue)
294
+ - Commit before validating (quality issue)
295
+
296
+ **DO**:
297
+ - Follow Divio principles for each type
298
+ - Test every code example
299
+ - Use diverse names in examples
300
+ - Use welcoming, clear language
301
+ - Add descriptive alt text
302
+ - Define technical terms
303
+ - Validate before considering complete
304
+
305
+ ---
306
+
307
+ ## Status Tracking Note
308
+
309
+ 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.
@@ -0,0 +1,275 @@
1
+ ---
2
+ description: Produce a documentation mission plan with audit/design guidance and generator setup.
3
+ ---
4
+
5
+ # Command Template: /spec-kitty.plan (Documentation Mission)
6
+
7
+ **Phases**: Audit (if gap-filling), Design
8
+ **Purpose**: Plan documentation structure, configure generators, prioritize gaps, design content outline.
9
+
10
+ ## User Input
11
+
12
+ ```text
13
+ $ARGUMENTS
14
+ ```
15
+
16
+ You **MUST** consider the user input before proceeding (if not empty).
17
+
18
+ ## Location Pre-flight Check
19
+
20
+ Verify you are in the main repository (not a worktree). Planning happens in main for ALL missions.
21
+
22
+ ```bash
23
+ git branch --show-current # Should show "main"
24
+ ```
25
+
26
+ **Note**: Planning in main is standard for all spec-kitty missions. Implementation happens in per-WP worktrees.
27
+
28
+ ---
29
+
30
+ ## Planning Interrogation
31
+
32
+ For documentation missions, planning interrogation is lighter than software-dev:
33
+ - **Simple projects** (single language, initial docs): 1-2 questions about structure preferences
34
+ - **Complex projects** (multiple languages, existing docs): 2-3 questions about integration approach
35
+
36
+ **Key Planning Questions**:
37
+
38
+ **Q1: Documentation Framework**
39
+ "Do you have a preferred documentation framework/generator?"
40
+ - Sphinx (Python ecosystem standard)
41
+ - MkDocs (Markdown-focused, simple)
42
+ - Docusaurus (React-based, modern)
43
+ - Jekyll (GitHub Pages native)
44
+ - None (plain Markdown)
45
+
46
+ **Why it matters**: Determines build system, theming options, hosting compatibility.
47
+
48
+ **Q2: Generator Integration Approach** (if multiple languages detected)
49
+ "How should API reference for different languages be organized?"
50
+ - Unified (all APIs in one reference section)
51
+ - Separated (language-specific reference sections)
52
+ - Parallel (side-by-side comparison)
53
+
54
+ **Why it matters**: Affects directory structure, navigation design.
55
+
56
+ ---
57
+
58
+ ## Outline
59
+
60
+ 1. **Setup**: Run `spec-kitty agent feature setup-plan --json` to initialize plan.md
61
+
62
+ 2. **Load context**: Read spec.md, meta.json (especially `documentation_state`)
63
+
64
+ 3. **Phase 0: Research** (if gap-filling mode)
65
+
66
+ ### Gap Analysis (gap-filling mode only)
67
+
68
+ **Objective**: Audit existing documentation and identify gaps.
69
+
70
+ **Steps**:
71
+ 1. Scan existing `docs/` directory (or wherever docs live)
72
+ 2. Detect documentation framework (Sphinx, MkDocs, Jekyll, etc.)
73
+ 3. For each markdown file:
74
+ - Parse frontmatter for `type` field
75
+ - Apply content heuristics if no explicit type
76
+ - Classify as tutorial/how-to/reference/explanation or "unclassified"
77
+ 4. Build coverage matrix:
78
+ - Rows: Project areas/features
79
+ - Columns: Divio types (tutorial, how-to, reference, explanation)
80
+ - Cells: Documentation files (or empty if missing)
81
+ 5. Calculate coverage percentage
82
+ 6. Prioritize gaps:
83
+ - **High**: Missing tutorials (blocks new users)
84
+ - **High**: Missing reference for public APIs
85
+ - **Medium**: Missing how-tos for common tasks
86
+ - **Low**: Missing explanations (nice-to-have)
87
+ 7. Generate `gap-analysis.md` with:
88
+ - Current documentation inventory
89
+ - Coverage matrix (markdown table)
90
+ - Prioritized gap list
91
+ - Recommendations
92
+
93
+ **Output**: `gap-analysis.md` file in feature directory
94
+
95
+ ---
96
+
97
+ ### Generator Research (all modes)
98
+
99
+ **Objective**: Research generator configuration options for detected languages.
100
+
101
+ **For Each Detected Language**:
102
+
103
+ **JavaScript/TypeScript → JSDoc/TypeDoc**:
104
+ - Check if JSDoc installed: `npx jsdoc --version`
105
+ - Research config options: output format (HTML/Markdown), template (docdash, clean-jsdoc)
106
+ - Determine source directories to document
107
+ - Plan integration with manual docs
108
+
109
+ **Python → Sphinx**:
110
+ - Check if Sphinx installed: `sphinx-build --version`
111
+ - Research extensions: autodoc (API from docstrings), napoleon (Google/NumPy style), viewcode (source links)
112
+ - Research theme: sphinx_rtd_theme (Read the Docs), alabaster (default), pydata-sphinx-theme
113
+ - Plan autodoc configuration (which modules to document)
114
+ - Plan integration with manual docs
115
+
116
+ **Rust → rustdoc**:
117
+ - Check if Cargo installed: `cargo doc --help`
118
+ - Research rustdoc options: --no-deps, --document-private-items
119
+ - Plan Cargo.toml metadata configuration
120
+ - Plan integration with manual docs (rustdoc outputs HTML, may need linking)
121
+
122
+ **Output**: research.md with generator findings and decisions
123
+
124
+ 4. **Phase 1: Design**
125
+
126
+ ### Documentation Structure Design
127
+
128
+ **Directory Layout**:
129
+ Design docs/ structure following Divio organization:
130
+
131
+ ```
132
+ docs/
133
+ ├── index.md # Landing page
134
+ ├── tutorials/ # Learning-oriented
135
+ │ ├── getting-started.md
136
+ │ └── advanced-usage.md
137
+ ├── how-to/ # Problem-solving
138
+ │ ├── authentication.md
139
+ │ ├── deployment.md
140
+ │ └── troubleshooting.md
141
+ ├── reference/ # Technical specs
142
+ │ ├── api/ # Generated API docs
143
+ │ │ ├── python/ # Sphinx output
144
+ │ │ ├── javascript/ # JSDoc output
145
+ │ │ └── rust/ # rustdoc output
146
+ │ ├── cli.md # Manual CLI reference
147
+ │ └── configuration.md # Manual config reference
148
+ └── explanation/ # Understanding
149
+ ├── architecture.md
150
+ ├── concepts.md
151
+ └── design-decisions.md
152
+ ```
153
+
154
+ **Adapt based on**:
155
+ - Selected Divio types (only create directories for selected types)
156
+ - Project size (small projects may flatten structure)
157
+ - Existing docs (extend existing structure if gap-filling)
158
+
159
+ ---
160
+
161
+ ### Generator Configuration Design
162
+
163
+ **For Each Generator**:
164
+
165
+ **Sphinx (Python)**:
166
+ ```python
167
+ # docs/conf.py
168
+ project = '{project_name}'
169
+ author = '{author}'
170
+ extensions = [
171
+ 'sphinx.ext.autodoc', # Generate from docstrings
172
+ 'sphinx.ext.napoleon', # Google/NumPy docstring support
173
+ 'sphinx.ext.viewcode', # Link to source
174
+ 'sphinx.ext.intersphinx', # Link to other projects
175
+ ]
176
+ html_theme = 'sphinx_rtd_theme'
177
+ autodoc_default_options = {
178
+ 'members': True,
179
+ 'undoc-members': False,
180
+ 'show-inheritance': True,
181
+ }
182
+ ```
183
+
184
+ **JSDoc (JavaScript)**:
185
+ ```json
186
+ {
187
+ "source": {
188
+ "include": ["src/"],
189
+ "includePattern": ".+\\.js$"
190
+ },
191
+ "opts": {
192
+ "destination": "docs/reference/api/javascript",
193
+ "template": "node_modules/docdash",
194
+ "recurse": true
195
+ }
196
+ }
197
+ ```
198
+
199
+ **rustdoc (Rust)**:
200
+ ```toml
201
+ [package.metadata.docs.rs]
202
+ all-features = true
203
+ rustdoc-args = ["--document-private-items"]
204
+ ```
205
+
206
+ **Output**: Generator config snippets in plan.md, templates ready for implementation
207
+
208
+ ---
209
+
210
+ ### Data Model
211
+
212
+ Generate `data-model.md` with entities:
213
+ - **Documentation Mission**: Iteration state, selected types, configured generators
214
+ - **Divio Documentation Type**: Tutorial, How-To, Reference, Explanation with characteristics
215
+ - **Documentation Generator**: JSDoc, Sphinx, rustdoc configurations
216
+ - **Gap Analysis** (if applicable): Coverage matrix, prioritized gaps
217
+
218
+ ---
219
+
220
+ ### Work Breakdown
221
+
222
+ Outline high-level work packages (detailed in `/spec-kitty.tasks`):
223
+
224
+ **For Initial Mode**:
225
+ 1. WP01: Structure Setup - Create docs/ dirs, configure generators
226
+ 2. WP02: Tutorial Creation - Write selected tutorials
227
+ 3. WP03: How-To Creation - Write selected how-tos
228
+ 4. WP04: Reference Generation - Generate API docs, write manual reference
229
+ 5. WP05: Explanation Creation - Write selected explanations
230
+ 6. WP06: Quality Validation - Accessibility checks, link validation, build
231
+
232
+ **For Gap-Filling Mode**:
233
+ 1. WP01: Gap Analysis Review - Review audit results with user
234
+ 2. WP02: High-Priority Gaps - Fill critical missing docs
235
+ 3. WP03: Medium-Priority Gaps - Fill important missing docs
236
+ 4. WP04: Generator Updates - Regenerate outdated API docs
237
+ 5. WP05: Quality Validation - Validate new and updated docs
238
+
239
+ **For Feature-Specific Mode**:
240
+ 1. WP01: Feature Documentation - Document the specific feature across Divio types
241
+ 2. WP02: Integration - Integrate with existing documentation
242
+ 3. WP03: Quality Validation - Validate feature docs
243
+
244
+ ---
245
+
246
+ ### Quickstart
247
+
248
+ Generate `quickstart.md` with:
249
+ - How to build documentation locally
250
+ - How to add new documentation (which template to use)
251
+ - How to regenerate API reference
252
+ - How to validate documentation quality
253
+
254
+ 5. **Report completion**:
255
+ - Plan file path
256
+ - Artifacts generated (research.md, data-model.md, gap-analysis.md, quickstart.md, release.md when publish is in scope)
257
+ - Next command: `/spec-kitty.tasks`
258
+
259
+ ---
260
+
261
+ ## Key Guidelines
262
+
263
+ **For Agents**:
264
+ - Run gap analysis only for gap-filling mode
265
+ - Auto-detect documentation framework from existing docs
266
+ - Configure generators based on detected languages
267
+ - Design structure following Divio principles
268
+ - Prioritize gaps by user impact (tutorials/reference high, explanations low)
269
+ - Plan includes both auto-generated and manual documentation
270
+
271
+ **For Users**:
272
+ - Planning designs documentation structure, doesn't write content yet
273
+ - Generator configs enable automated API reference
274
+ - Gap analysis (if iterating) shows what needs attention
275
+ - Work breakdown will be detailed in `/spec-kitty.tasks`