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,142 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # Pre-commit hook to validate UTF-8 encoding in markdown files
4
+ #
5
+ # This hook prevents commits containing Windows-1252 smart quotes and other
6
+ # problematic characters that cause UTF-8 encoding errors in the dashboard.
7
+ #
8
+ # Installation:
9
+ # cp templates/git-hooks/pre-commit-encoding-check .git/hooks/pre-commit
10
+ # chmod +x .git/hooks/pre-commit
11
+ #
12
+ # Or to install during spec-kitty init, this template will be copied automatically.
13
+
14
+ set -e
15
+
16
+ # Colors for output
17
+ RED='\033[0;31m'
18
+ YELLOW='\033[1;33m'
19
+ GREEN='\033[0;32m'
20
+ NC='\033[0m' # No Color
21
+
22
+ # Check if spec-kitty CLI is available
23
+ if ! command -v spec-kitty &> /dev/null; then
24
+ echo -e "${YELLOW}Warning: spec-kitty command not found. Skipping encoding validation.${NC}"
25
+ echo "Install spec-kitty CLI to enable automatic encoding validation."
26
+ exit 0
27
+ fi
28
+
29
+ # Get list of staged markdown files
30
+ STAGED_MD_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.md$' || true)
31
+
32
+ if [ -z "$STAGED_MD_FILES" ]; then
33
+ # No markdown files staged, skip check
34
+ exit 0
35
+ fi
36
+
37
+ echo "Checking encoding for staged markdown files..."
38
+
39
+ # Temporary flag to track if any files have issues
40
+ HAS_ISSUES=false
41
+
42
+ # Check each staged file for encoding issues
43
+ for file in $STAGED_MD_FILES; do
44
+ if [ ! -f "$file" ]; then
45
+ continue
46
+ fi
47
+
48
+ # Use Python to check for problematic characters
49
+ if ! python3 -c "
50
+ import sys
51
+ try:
52
+ with open('$file', 'rb') as f:
53
+ data = f.read()
54
+ # Try strict UTF-8 decode
55
+ data.decode('utf-8')
56
+ sys.exit(0)
57
+ except UnicodeDecodeError as e:
58
+ print(f'${RED}✗ Encoding error in $file at byte {e.start}${NC}', file=sys.stderr)
59
+ sys.exit(1)
60
+ except Exception as e:
61
+ print(f'${YELLOW}Warning: Could not check $file: {e}${NC}', file=sys.stderr)
62
+ sys.exit(0)
63
+ " 2>&1; then
64
+ HAS_ISSUES=true
65
+
66
+ # Show example problematic characters
67
+ echo -e "${YELLOW} Found problematic characters (likely Windows-1252 smart quotes)${NC}"
68
+
69
+ # Try to show the problematic bytes using Python
70
+ python3 - "$file" <<'PYTHON' || true
71
+ import sys
72
+ import re
73
+
74
+ # Problematic characters map
75
+ PROBLEMATIC = {
76
+ '\u2018': "'", # LEFT SINGLE QUOTATION MARK
77
+ '\u2019': "'", # RIGHT SINGLE QUOTATION MARK
78
+ '\u201c': '"', # LEFT DOUBLE QUOTATION MARK
79
+ '\u201d': '"', # RIGHT DOUBLE QUOTATION MARK
80
+ '\u2013': "--", # EN DASH
81
+ '\u2014': "---", # EM DASH
82
+ '\u00b1': "+/-", # PLUS-MINUS SIGN
83
+ '\u00d7': "x", # MULTIPLICATION SIGN
84
+ '\u00b0': " degrees", # DEGREE SIGN
85
+ }
86
+
87
+ file_path = sys.argv[1]
88
+
89
+ try:
90
+ # Try reading with fallback encodings
91
+ try:
92
+ with open(file_path, 'r', encoding='utf-8') as f:
93
+ content = f.read()
94
+ except UnicodeDecodeError:
95
+ with open(file_path, 'rb') as f:
96
+ data = f.read()
97
+ for encoding in ('cp1252', 'latin-1'):
98
+ try:
99
+ content = data.decode(encoding)
100
+ break
101
+ except UnicodeDecodeError:
102
+ continue
103
+ else:
104
+ content = data.decode('utf-8', errors='replace')
105
+
106
+ # Find problematic characters
107
+ lines = content.splitlines()
108
+ found = 0
109
+ for line_num, line in enumerate(lines, 1):
110
+ for char, replacement in PROBLEMATIC.items():
111
+ if char in line:
112
+ col = line.index(char)
113
+ print(f" Line {line_num}, col {col}: '{char}' (U+{ord(char):04X}) → '{replacement}'")
114
+ found += 1
115
+ if found >= 5: # Limit output
116
+ if sum(1 for l in lines for c in PROBLEMATIC if c in l) > 5:
117
+ print(f" ... and more")
118
+ sys.exit(0)
119
+ except Exception as e:
120
+ print(f" Could not analyze file: {e}", file=sys.stderr)
121
+ PYTHON
122
+ fi
123
+ done
124
+
125
+ if [ "$HAS_ISSUES" = true ]; then
126
+ echo ""
127
+ echo -e "${RED}❌ Commit blocked: Encoding errors detected in markdown files${NC}"
128
+ echo ""
129
+ echo -e "${YELLOW}To fix these issues:${NC}"
130
+ echo " 1. Run: spec-kitty validate-encoding --all --fix"
131
+ echo " 2. Review the changes"
132
+ echo " 3. Re-stage the fixed files: git add <files>"
133
+ echo " 4. Commit again"
134
+ echo ""
135
+ echo -e "${YELLOW}Or to bypass this check (not recommended):${NC}"
136
+ echo " git commit --no-verify"
137
+ echo ""
138
+ exit 1
139
+ fi
140
+
141
+ echo -e "${GREEN}✓ All staged markdown files are properly UTF-8 encoded${NC}"
142
+ exit 0
@@ -0,0 +1,108 @@
1
+ # Implementation Plan: [FEATURE]
2
+ *Path: [templates/plan-template.md](templates/plan-template.md)*
3
+
4
+
5
+ **Branch**: `[###-feature-name]` | **Date**: [DATE] | **Spec**: [link]
6
+ **Input**: Feature specification from `/kitty-specs/[###-feature-name]/spec.md`
7
+
8
+ **Note**: This template is filled in by the `/spec-kitty.plan` command. See `.kittify/templates/commands/plan.md` for the execution workflow.
9
+
10
+ The planner will not begin until all planning questions have been answered—capture those answers in this document before progressing to later phases.
11
+
12
+ ## Summary
13
+
14
+ [Extract from feature spec: primary requirement + technical approach from research]
15
+
16
+ ## Technical Context
17
+
18
+ <!--
19
+ ACTION REQUIRED: Replace the content in this section with the technical details
20
+ for the project. The structure here is presented in advisory capacity to guide
21
+ the iteration process.
22
+ -->
23
+
24
+ **Language/Version**: [e.g., Python 3.11, Swift 5.9, Rust 1.75 or NEEDS CLARIFICATION]
25
+ **Primary Dependencies**: [e.g., FastAPI, UIKit, LLVM or NEEDS CLARIFICATION]
26
+ **Storage**: [if applicable, e.g., PostgreSQL, CoreData, files or N/A]
27
+ **Testing**: [e.g., pytest, XCTest, cargo test or NEEDS CLARIFICATION]
28
+ **Target Platform**: [e.g., Linux server, iOS 15+, WASM or NEEDS CLARIFICATION]
29
+ **Project Type**: [single/web/mobile - determines source structure]
30
+ **Performance Goals**: [domain-specific, e.g., 1000 req/s, 10k lines/sec, 60 fps or NEEDS CLARIFICATION]
31
+ **Constraints**: [domain-specific, e.g., <200ms p95, <100MB memory, offline-capable or NEEDS CLARIFICATION]
32
+ **Scale/Scope**: [domain-specific, e.g., 10k users, 1M LOC, 50 screens or NEEDS CLARIFICATION]
33
+
34
+ ## Constitution Check
35
+
36
+ *GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
37
+
38
+ [Gates determined based on constitution file]
39
+
40
+ ## Project Structure
41
+
42
+ ### Documentation (this feature)
43
+
44
+ ```
45
+ kitty-specs/[###-feature]/
46
+ ├── plan.md # This file (/spec-kitty.plan command output)
47
+ ├── research.md # Phase 0 output (/spec-kitty.plan command)
48
+ ├── data-model.md # Phase 1 output (/spec-kitty.plan command)
49
+ ├── quickstart.md # Phase 1 output (/spec-kitty.plan command)
50
+ ├── contracts/ # Phase 1 output (/spec-kitty.plan command)
51
+ └── tasks.md # Phase 2 output (/spec-kitty.tasks command - NOT created by /spec-kitty.plan)
52
+ ```
53
+
54
+ ### Source Code (repository root)
55
+ <!--
56
+ ACTION REQUIRED: Replace the placeholder tree below with the concrete layout
57
+ for this feature. Delete unused options and expand the chosen structure with
58
+ real paths (e.g., apps/admin, packages/something). The delivered plan must
59
+ not include Option labels.
60
+ -->
61
+
62
+ ```
63
+ # [REMOVE IF UNUSED] Option 1: Single project (DEFAULT)
64
+ src/
65
+ ├── models/
66
+ ├── services/
67
+ ├── cli/
68
+ └── lib/
69
+
70
+ tests/
71
+ ├── contract/
72
+ ├── integration/
73
+ └── unit/
74
+
75
+ # [REMOVE IF UNUSED] Option 2: Web application (when "frontend" + "backend" detected)
76
+ backend/
77
+ ├── src/
78
+ │ ├── models/
79
+ │ ├── services/
80
+ │ └── api/
81
+ └── tests/
82
+
83
+ frontend/
84
+ ├── src/
85
+ │ ├── components/
86
+ │ ├── pages/
87
+ │ └── services/
88
+ └── tests/
89
+
90
+ # [REMOVE IF UNUSED] Option 3: Mobile + API (when "iOS/Android" detected)
91
+ api/
92
+ └── [same as backend above]
93
+
94
+ ios/ or android/
95
+ └── [platform-specific structure: feature modules, UI flows, platform tests]
96
+ ```
97
+
98
+ **Structure Decision**: [Document the selected structure and reference the real
99
+ directories captured above]
100
+
101
+ ## Complexity Tracking
102
+
103
+ *Fill ONLY if Constitution Check has violations that must be justified*
104
+
105
+ | Violation | Why Needed | Simpler Alternative Rejected Because |
106
+ |-----------|------------|-------------------------------------|
107
+ | [e.g., 4th project] | [current need] | [why 3 projects insufficient] |
108
+ | [e.g., Repository pattern] | [specific problem] | [why direct DB access insufficient] |
@@ -0,0 +1,118 @@
1
+ # Feature Specification: [FEATURE NAME]
2
+ *Path: [templates/spec-template.md](templates/spec-template.md)*
3
+
4
+ <!-- Replace [FEATURE NAME] with the confirmed friendly title generated during /spec-kitty.specify. -->
5
+
6
+ **Feature Branch**: `[###-feature-name]`
7
+ **Created**: [DATE]
8
+ **Status**: Draft
9
+ **Input**: User description: "$ARGUMENTS"
10
+
11
+ ## User Scenarios & Testing *(mandatory)*
12
+
13
+ <!--
14
+ IMPORTANT: User stories should be PRIORITIZED as user journeys ordered by importance.
15
+ Each user story/journey must be INDEPENDENTLY TESTABLE - meaning if you implement just ONE of them,
16
+ you should still have a viable MVP (Minimum Viable Product) that delivers value.
17
+
18
+ Assign priorities (P1, P2, P3, etc.) to each story, where P1 is the most critical.
19
+ Think of each story as a standalone slice of functionality that can be:
20
+ - Developed independently
21
+ - Tested independently
22
+ - Deployed independently
23
+ - Demonstrated to users independently
24
+ -->
25
+
26
+ ### User Story 1 - [Brief Title] (Priority: P1)
27
+
28
+ [Describe this user journey in plain language]
29
+
30
+ **Why this priority**: [Explain the value and why it has this priority level]
31
+
32
+ **Independent Test**: [Describe how this can be tested independently - e.g., "Can be fully tested by [specific action] and delivers [specific value]"]
33
+
34
+ **Acceptance Scenarios**:
35
+
36
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
37
+ 2. **Given** [initial state], **When** [action], **Then** [expected outcome]
38
+
39
+ ---
40
+
41
+ ### User Story 2 - [Brief Title] (Priority: P2)
42
+
43
+ [Describe this user journey in plain language]
44
+
45
+ **Why this priority**: [Explain the value and why it has this priority level]
46
+
47
+ **Independent Test**: [Describe how this can be tested independently]
48
+
49
+ **Acceptance Scenarios**:
50
+
51
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
52
+
53
+ ---
54
+
55
+ ### User Story 3 - [Brief Title] (Priority: P3)
56
+
57
+ [Describe this user journey in plain language]
58
+
59
+ **Why this priority**: [Explain the value and why it has this priority level]
60
+
61
+ **Independent Test**: [Describe how this can be tested independently]
62
+
63
+ **Acceptance Scenarios**:
64
+
65
+ 1. **Given** [initial state], **When** [action], **Then** [expected outcome]
66
+
67
+ ---
68
+
69
+ [Add more user stories as needed, each with an assigned priority]
70
+
71
+ ### Edge Cases
72
+
73
+ <!--
74
+ ACTION REQUIRED: The content in this section represents placeholders.
75
+ Fill them out with the right edge cases.
76
+ -->
77
+
78
+ - What happens when [boundary condition]?
79
+ - How does system handle [error scenario]?
80
+
81
+ ## Requirements *(mandatory)*
82
+
83
+ <!--
84
+ ACTION REQUIRED: The content in this section represents placeholders.
85
+ Fill them out with the right functional requirements.
86
+ -->
87
+
88
+ ### Functional Requirements
89
+
90
+ - **FR-001**: System MUST [specific capability, e.g., "allow users to create accounts"]
91
+ - **FR-002**: System MUST [specific capability, e.g., "validate email addresses"]
92
+ - **FR-003**: Users MUST be able to [key interaction, e.g., "reset their password"]
93
+ - **FR-004**: System MUST [data requirement, e.g., "persist user preferences"]
94
+ - **FR-005**: System MUST [behavior, e.g., "log all security events"]
95
+
96
+ *Example of marking unclear requirements:*
97
+
98
+ - **FR-006**: System MUST authenticate users via [NEEDS CLARIFICATION: auth method not specified - email/password, SSO, OAuth?]
99
+ - **FR-007**: System MUST retain user data for [NEEDS CLARIFICATION: retention period not specified]
100
+
101
+ ### Key Entities *(include if feature involves data)*
102
+
103
+ - **[Entity 1]**: [What it represents, key attributes without implementation]
104
+ - **[Entity 2]**: [What it represents, relationships to other entities]
105
+
106
+ ## Success Criteria *(mandatory)*
107
+
108
+ <!--
109
+ ACTION REQUIRED: Define measurable success criteria.
110
+ These must be technology-agnostic and measurable.
111
+ -->
112
+
113
+ ### Measurable Outcomes
114
+
115
+ - **SC-001**: [Measurable metric, e.g., "Users can complete account creation in under 2 minutes"]
116
+ - **SC-002**: [Measurable metric, e.g., "System handles 1000 concurrent users without degradation"]
117
+ - **SC-003**: [User satisfaction metric, e.g., "90% of users successfully complete primary task on first attempt"]
118
+ - **SC-004**: [Business metric, e.g., "Reduce support tickets related to [X] by 50%"]
@@ -0,0 +1,165 @@
1
+ ---
2
+ work_package_id: "WPxx"
3
+ subtasks:
4
+ - "Txxx"
5
+ title: "Replace with work package title"
6
+ phase: "Phase N - Replace with phase name"
7
+ lane: "planned" # Edit directly or use: spec-kitty agent tasks move-task <WPID> --to <lane>
8
+ assignee: "" # Optional friendly name when in doing/for_review
9
+ agent: "" # CLI agent identifier (claude, codex, etc.)
10
+ shell_pid: "" # PID captured when the task moved to the current lane
11
+ review_status: "" # empty | has_feedback | acknowledged (populated by reviewers/implementers)
12
+ reviewed_by: "" # Agent ID of the reviewer (if reviewed)
13
+ history:
14
+ - timestamp: "{{TIMESTAMP}}"
15
+ lane: "planned"
16
+ agent: "system"
17
+ shell_pid: ""
18
+ action: "Prompt generated via /spec-kitty.tasks"
19
+ ---
20
+ *Path: [templates/task-prompt-template.md](templates/task-prompt-template.md)*
21
+
22
+
23
+ # Work Package Prompt: {{work_package_id}} – {{title}}
24
+
25
+ ## ⚠️ IMPORTANT: Review Feedback Status
26
+
27
+ **Read this first if you are implementing this task!**
28
+
29
+ - **Has review feedback?**: Check the `review_status` field above. If it says `has_feedback`, scroll to the **Review Feedback** section immediately (right below this notice).
30
+ - **You must address all feedback** before your work is complete. Feedback items are your implementation TODO list.
31
+ - **Mark as acknowledged**: When you understand the feedback and begin addressing it, update `review_status: acknowledged` in the frontmatter.
32
+ - **Report progress**: As you address each feedback item, update the Activity Log explaining what you changed.
33
+
34
+ ---
35
+
36
+ ## Review Feedback
37
+
38
+ > **Populated by `/spec-kitty.review`** – Reviewers add detailed feedback here when work needs changes. Implementation must address every item listed below before returning for re-review.
39
+
40
+ *[This section is empty initially. Reviewers will populate it if the work is returned from review. If you see feedback here, treat each item as a must-do before completion.]*
41
+
42
+ ---
43
+
44
+ ## ⚠️ Dependency Rebase Guidance
45
+
46
+ **If this WP depends on other WPs** (check frontmatter `dependencies:` field):
47
+
48
+ When a parent WP changes during review:
49
+ 1. You'll need to rebase your workspace to get latest changes
50
+ 2. Command: `cd .worktrees/{{feature_slug}}-{{work_package_id}} && git rebase {{feature_slug}}-{{base_wp_id}}`
51
+ 3. Resolve any conflicts
52
+ 4. Continue work on updated foundation
53
+
54
+ **Check if rebase needed**:
55
+ ```bash
56
+ cd .worktrees/{{feature_slug}}-{{work_package_id}}
57
+ git log --oneline main..{{base_branch}} # Shows commits in base not in your workspace
58
+ ```
59
+
60
+ **If this WP has dependent WPs** (other WPs depend on this one):
61
+
62
+ When you make changes:
63
+ 1. Notify agents working on dependent WPs
64
+ 2. They'll need to rebase their workspaces to get your changes
65
+ 3. This is a git limitation - future jj integration will auto-rebase
66
+
67
+ The `spec-kitty implement` command will display warnings when:
68
+ - You resume work and the base has changed
69
+ - You start work and other WPs depend on you
70
+
71
+ ---
72
+
73
+ ## Objectives & Success Criteria
74
+
75
+ - Summarize the exact outcomes that mark this work package complete.
76
+ - Call out key acceptance criteria or success metrics for the bundle.
77
+
78
+ ## Context & Constraints
79
+
80
+ - Reference prerequisite work and related documents.
81
+ - Link to supporting specs: `.kittify/memory/constitution.md`, `kitty-specs/.../plan.md`, `kitty-specs/.../tasks.md`, data model, contracts, research, quickstart.
82
+ - Highlight architectural decisions, constraints, or trade-offs to honor.
83
+
84
+ ## Subtasks & Detailed Guidance
85
+
86
+ ### Subtask TXXX – Replace with summary
87
+ - **Purpose**: Explain why this subtask exists.
88
+ - **Steps**: Detailed, actionable instructions.
89
+ - **Files**: Canonical paths to update or create.
90
+ - **Parallel?**: Note if this can run alongside others.
91
+ - **Notes**: Edge cases, dependencies, or data requirements.
92
+
93
+ ### Subtask TYYY – Replace with summary
94
+ - Repeat the structure above for every included `Txxx` entry.
95
+
96
+ ## Test Strategy (include only when tests are required)
97
+
98
+ - Specify mandatory tests and where they live.
99
+ - Provide commands or scripts to run.
100
+ - Describe fixtures or data seeding expectations.
101
+
102
+ ## Risks & Mitigations
103
+
104
+ - List known pitfalls, performance considerations, or failure modes.
105
+ - Provide mitigation strategies or monitoring notes.
106
+
107
+ ## Review Guidance
108
+
109
+ - Key acceptance checkpoints for `/spec-kitty.review`.
110
+ - Any context reviewers should revisit before approving.
111
+
112
+ ## Activity Log
113
+
114
+ > **CRITICAL**: Activity log entries MUST be in chronological order (oldest first, newest last).
115
+
116
+ ### How to Add Activity Log Entries
117
+
118
+ **When adding an entry**:
119
+ 1. Scroll to the bottom of this file (Activity Log section below "Valid lanes")
120
+ 2. **APPEND the new entry at the END** (do NOT prepend or insert in middle)
121
+ 3. Use exact format: `- YYYY-MM-DDTHH:MM:SSZ – agent_id – lane=<lane> – <action>`
122
+ 4. Timestamp MUST be current time in UTC (check with `date -u "+%Y-%m-%dT%H:%M:%SZ"`)
123
+ 5. Lane MUST match the frontmatter `lane:` field exactly
124
+ 6. Agent ID should identify who made the change (claude-sonnet-4-5, codex, etc.)
125
+
126
+ **Format**:
127
+ ```
128
+ - YYYY-MM-DDTHH:MM:SSZ – <agent_id> – lane=<lane> – <brief action description>
129
+ ```
130
+
131
+ **Example (correct chronological order)**:
132
+ ```
133
+ - 2026-01-12T10:00:00Z – system – lane=planned – Prompt created
134
+ - 2026-01-12T10:30:00Z – claude – lane=doing – Started implementation
135
+ - 2026-01-12T11:00:00Z – codex – lane=for_review – Implementation complete, ready for review
136
+ - 2026-01-12T11:30:00Z – claude – lane=done – Review passed, all tests passing ← LATEST (at bottom)
137
+ ```
138
+
139
+ **Common mistakes (DO NOT DO THIS)**:
140
+ - ❌ Adding new entry at the top (breaks chronological order)
141
+ - ❌ Using future timestamps (causes acceptance validation to fail)
142
+ - ❌ Lane mismatch: frontmatter says `lane: "done"` but log entry says `lane=doing`
143
+ - ❌ Inserting in middle instead of appending to end
144
+
145
+ **Why this matters**: The acceptance system reads the LAST activity log entry as the current state. If entries are out of order, acceptance will fail even when the work is complete.
146
+
147
+ **Initial entry**:
148
+ - {{TIMESTAMP}} – system – lane=planned – Prompt created.
149
+
150
+ ---
151
+
152
+ ### Updating Lane Status
153
+
154
+ To change a work package's lane, either:
155
+
156
+ 1. **Edit directly**: Change the `lane:` field in frontmatter AND append activity log entry
157
+ 2. **Use CLI**: `spec-kitty agent tasks move-task <WPID> --to <lane> --note "message"`
158
+
159
+ The CLI command updates both frontmatter and activity log automatically (recommended).
160
+
161
+ **Valid lanes**: `planned`, `doing`, `for_review`, `done`
162
+
163
+ ### File Structure
164
+
165
+ All WP files live in a flat `tasks/` directory. The lane is determined by the `lane:` frontmatter field, not the directory location.
@@ -0,0 +1,161 @@
1
+ ---
2
+ description: "Work package task list template for feature implementation"
3
+ ---
4
+ *Path: [templates/tasks-template.md](templates/tasks-template.md)*
5
+
6
+
7
+ # Work Packages: [FEATURE NAME]
8
+
9
+ **Inputs**: Design documents from `/kitty-specs/[###-feature-name]/`
10
+ **Prerequisites**: plan.md (required), spec.md (user stories), research.md, data-model.md, contracts/, quickstart.md
11
+
12
+ **Tests**: Only include explicit testing work when stakeholders request it.
13
+
14
+ **Organization**: Fine-grained subtasks (`Txxx`) roll up into work packages (`WPxx`). Each work package must be independently deliverable and testable.
15
+
16
+ **Prompt Files**: Each work package references a matching prompt file in `/tasks/` generated by `/spec-kitty.tasks`. Lane status is stored in YAML frontmatter (`lane: planned|doing|for_review|done`). Treat this file as the high-level checklist; keep deep implementation detail inside the prompt files.
17
+
18
+ ## Subtask Format: `[Txxx] [P?] Description`
19
+ - **[P]** indicates the subtask can proceed in parallel (different files/components).
20
+ - Include precise file paths or modules.
21
+
22
+ ## Path Conventions
23
+ - **Single project**: `src/`, `tests/`
24
+ - **Web app**: `backend/src/`, `frontend/src/`
25
+ - **Mobile**: `api/src/`, `ios/src/`, `android/src/`
26
+ - Adjust paths to match the implementation plan.
27
+
28
+ <!-- SAMPLE CONTENT BELOW. MUST BE REPLACED. -->
29
+
30
+ ---
31
+
32
+ ## Work Package WP01: Setup & Environment (Priority: P0)
33
+
34
+ **Goal**: Establish project skeleton and shared tooling.
35
+ **Independent Test**: Project bootstraps locally with linting and formatter hooks in place.
36
+ **Prompt**: `/tasks/WP01-setup-and-environment.md`
37
+
38
+ ### Included Subtasks
39
+ - [ ] T001 Create project structure per implementation plan
40
+ - [ ] T002 Initialize [language] project with [framework] dependencies
41
+ - [ ] T003 [P] Configure linting and formatting tools
42
+
43
+ ### Implementation Notes
44
+ - Major steps, commands, or configuration files required.
45
+
46
+ ### Parallel Opportunities
47
+ - Highlight subtasks that can proceed concurrently.
48
+
49
+ ### Dependencies
50
+ - None (starting package).
51
+
52
+ ### Risks & Mitigations
53
+ - Example: Tooling compatibility across contributors; pin versions in `.tool-versions`.
54
+
55
+ ---
56
+
57
+ ## Work Package WP02: Foundational Platform (Priority: P0)
58
+
59
+ **Goal**: Deliver shared services all user stories depend on.
60
+ **Independent Test**: Foundational services pass smoke tests; downstream work packages can start.
61
+ **Prompt**: `/tasks/WP02-foundational-platform.md`
62
+
63
+ ### Included Subtasks
64
+ - [ ] T004 Setup database schema and migrations framework
65
+ - [ ] T005 [P] Implement authentication/authorization framework
66
+ - [ ] T006 [P] Setup API routing and middleware structure
67
+ - [ ] T007 Create base models/entities shared across stories
68
+ - [ ] T008 Configure error handling and logging infrastructure
69
+ - [ ] T009 Setup environment configuration management
70
+
71
+ ### Implementation Notes
72
+ - Provide sequencing, infrastructure CLI commands, secrets requirements.
73
+
74
+ ### Parallel Opportunities
75
+ - Authentication and routing can proceed in parallel once schema scaffolding exists.
76
+
77
+ ### Dependencies
78
+ - Depends on WP01.
79
+
80
+ ### Risks & Mitigations
81
+ - Migration drift → enforce migration linting in CI.
82
+
83
+ ---
84
+
85
+ ## Work Package WP03: User Story 1 – [Title] (Priority: P1) 🎯 MVP
86
+
87
+ **Goal**: [Brief description of story outcome]
88
+ **Independent Test**: [Describe how to validate the story independently]
89
+ **Prompt**: `/tasks/WP03-user-story-1.md`
90
+
91
+ ### Included Subtasks
92
+ - [ ] T010 [P] Contract test for [endpoint] in `tests/contract/test_[name].py`
93
+ - [ ] T011 [P] Integration test for [journey] in `tests/integration/test_[name].py`
94
+ - [ ] T012 [P] Create [Entity1] model in `src/models/[entity1].py`
95
+ - [ ] T013 [P] Create [Entity2] model in `src/models/[entity2].py`
96
+ - [ ] T014 Implement [Service] in `src/services/[service].py` (depends on T012, T013)
97
+ - [ ] T015 Implement [endpoint/feature] in `src/[location]/[file].py`
98
+ - [ ] T016 Add validation and error handling
99
+ - [ ] T017 Add story-specific logging and metrics
100
+
101
+ ### Implementation Notes
102
+ - Enumerate the workflow (tests first if required, then models → services → endpoints).
103
+
104
+ ### Parallel Opportunities
105
+ - Mention any subtasks that can be split among engineers safely.
106
+
107
+ ### Dependencies
108
+ - Depends on WP02.
109
+
110
+ ### Risks & Mitigations
111
+ - Data integrity risk → include migration rollback plan.
112
+
113
+ ---
114
+
115
+ ## Work Package WP0N: Polish & Cross-Cutting (Priority: Px)
116
+
117
+ **Goal**: Cross-story improvements and hardening work.
118
+ **Independent Test**: Regression suite passes; observability and documentation updated.
119
+ **Prompt**: `/tasks/WP0N-polish-and-cross-cutting.md`
120
+
121
+ ### Included Subtasks
122
+ - [ ] T0XX Documentation updates in `docs/`
123
+ - [ ] T0XX Code cleanup and refactoring
124
+ - [ ] T0XX Performance optimization across stories
125
+ - [ ] T0XX Security hardening
126
+ - [ ] T0XX Validate quickstart.md scenario
127
+
128
+ ### Implementation Notes
129
+ - Capture finishing touches and validation guidance.
130
+
131
+ ### Parallel Opportunities
132
+ - Identify items safe to run alongside final story testing.
133
+
134
+ ### Dependencies
135
+ - Depends on completion of relevant story packages.
136
+
137
+ ### Risks & Mitigations
138
+ - Regression risk → enforce smoke test before release.
139
+
140
+ ---
141
+
142
+ ## Dependency & Execution Summary
143
+
144
+ - **Sequence**: WP01 → WP02 → Story-driven packages (priority order) → WP0N polish.
145
+ - **Parallelization**: Highlight safe parallel combinations once prerequisites complete.
146
+ - **MVP Scope**: Call out which work packages constitute the minimal release.
147
+
148
+ ---
149
+
150
+ ## Subtask Index (Reference)
151
+
152
+ | Subtask ID | Summary | Work Package | Priority | Parallel? |
153
+ |------------|---------|--------------|----------|-----------|
154
+ | T001 | Example | WP01 | P0 | No |
155
+ | T002 | Example | WP01 | P0 | Yes |
156
+ | T010 | Example | WP03 | P1 | Yes |
157
+ | T014 | Example | WP03 | P1 | No |
158
+
159
+ ---
160
+
161
+ > Replace all placeholder text above with feature-specific content. Keep this template structure intact so downstream automation can parse work packages reliably.