specweave 0.6.8 → 0.7.1

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 (255) hide show
  1. package/.claude-plugin/README.md +1 -1
  2. package/CLAUDE.md +903 -99
  3. package/README.md +143 -207
  4. package/bin/specweave.js +67 -0
  5. package/dist/cli/commands/abandon.d.ts +13 -0
  6. package/dist/cli/commands/abandon.d.ts.map +1 -0
  7. package/dist/cli/commands/abandon.js +15 -0
  8. package/dist/cli/commands/abandon.js.map +1 -0
  9. package/dist/cli/commands/init.d.ts.map +1 -1
  10. package/dist/cli/commands/init.js +94 -18
  11. package/dist/cli/commands/init.js.map +1 -1
  12. package/dist/cli/commands/pause.d.ts +13 -0
  13. package/dist/cli/commands/pause.d.ts.map +1 -0
  14. package/dist/cli/commands/pause.js +15 -0
  15. package/dist/cli/commands/pause.js.map +1 -0
  16. package/dist/cli/commands/qa.d.ts +54 -0
  17. package/dist/cli/commands/qa.d.ts.map +1 -0
  18. package/dist/cli/commands/qa.js +98 -0
  19. package/dist/cli/commands/qa.js.map +1 -0
  20. package/dist/cli/commands/resume.d.ts +12 -0
  21. package/dist/cli/commands/resume.d.ts.map +1 -0
  22. package/dist/cli/commands/resume.js +14 -0
  23. package/dist/cli/commands/resume.js.map +1 -0
  24. package/dist/cli/commands/status.d.ts +12 -0
  25. package/dist/cli/commands/status.d.ts.map +1 -0
  26. package/dist/cli/commands/status.js +23 -0
  27. package/dist/cli/commands/status.js.map +1 -0
  28. package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
  29. package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
  30. package/dist/cli/helpers/issue-tracker/ado.js +223 -0
  31. package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
  32. package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
  33. package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
  34. package/dist/cli/helpers/issue-tracker/github.js +284 -0
  35. package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
  36. package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
  37. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
  38. package/dist/cli/helpers/issue-tracker/index.js +270 -0
  39. package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
  40. package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
  41. package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
  42. package/dist/cli/helpers/issue-tracker/jira.js +265 -0
  43. package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
  44. package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
  45. package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
  46. package/dist/cli/helpers/issue-tracker/types.js +16 -0
  47. package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
  48. package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
  49. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
  50. package/dist/cli/helpers/issue-tracker/utils.js +240 -0
  51. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
  52. package/dist/core/increment/limits.d.ts +68 -0
  53. package/dist/core/increment/limits.d.ts.map +1 -0
  54. package/dist/core/increment/limits.js +224 -0
  55. package/dist/core/increment/limits.js.map +1 -0
  56. package/dist/core/increment/metadata-manager.d.ts +114 -0
  57. package/dist/core/increment/metadata-manager.d.ts.map +1 -0
  58. package/dist/core/increment/metadata-manager.js +320 -0
  59. package/dist/core/increment/metadata-manager.js.map +1 -0
  60. package/dist/core/increment/status-commands.d.ts +43 -0
  61. package/dist/core/increment/status-commands.d.ts.map +1 -0
  62. package/dist/core/increment/status-commands.js +277 -0
  63. package/dist/core/increment/status-commands.js.map +1 -0
  64. package/dist/core/plugin-detector.d.ts +1 -0
  65. package/dist/core/plugin-detector.d.ts.map +1 -1
  66. package/dist/core/plugin-detector.js +25 -0
  67. package/dist/core/plugin-detector.js.map +1 -1
  68. package/dist/core/qa/qa-runner.d.ts +16 -0
  69. package/dist/core/qa/qa-runner.d.ts.map +1 -0
  70. package/dist/core/qa/qa-runner.js +404 -0
  71. package/dist/core/qa/qa-runner.js.map +1 -0
  72. package/dist/core/qa/quality-gate-decider.d.ts +53 -0
  73. package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
  74. package/dist/core/qa/quality-gate-decider.js +268 -0
  75. package/dist/core/qa/quality-gate-decider.js.map +1 -0
  76. package/dist/core/qa/risk-calculator.d.ts +126 -0
  77. package/dist/core/qa/risk-calculator.d.ts.map +1 -0
  78. package/dist/core/qa/risk-calculator.js +247 -0
  79. package/dist/core/qa/risk-calculator.js.map +1 -0
  80. package/dist/core/qa/types.d.ts +315 -0
  81. package/dist/core/qa/types.d.ts.map +1 -0
  82. package/dist/core/qa/types.js +8 -0
  83. package/dist/core/qa/types.js.map +1 -0
  84. package/dist/core/types/config.d.ts +35 -0
  85. package/dist/core/types/config.d.ts.map +1 -1
  86. package/dist/core/types/config.js +16 -0
  87. package/dist/core/types/config.js.map +1 -1
  88. package/dist/core/types/increment-metadata.d.ts +120 -0
  89. package/dist/core/types/increment-metadata.d.ts.map +1 -0
  90. package/dist/core/types/increment-metadata.js +138 -0
  91. package/dist/core/types/increment-metadata.js.map +1 -0
  92. package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
  93. package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
  94. package/dist/hooks/lib/invoke-translator-skill.js +201 -0
  95. package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
  96. package/dist/hooks/lib/translate-file.d.ts +59 -0
  97. package/dist/hooks/lib/translate-file.d.ts.map +1 -0
  98. package/dist/hooks/lib/translate-file.js +350 -0
  99. package/dist/hooks/lib/translate-file.js.map +1 -0
  100. package/dist/locales/en/cli.json +3 -1
  101. package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
  102. package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
  103. package/dist/metrics/calculators/change-failure-rate.js +70 -0
  104. package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
  105. package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
  106. package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
  107. package/dist/metrics/calculators/deployment-frequency.js +61 -0
  108. package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
  109. package/dist/metrics/calculators/lead-time.d.ts +22 -0
  110. package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
  111. package/dist/metrics/calculators/lead-time.js +82 -0
  112. package/dist/metrics/calculators/lead-time.js.map +1 -0
  113. package/dist/metrics/calculators/mttr.d.ts +21 -0
  114. package/dist/metrics/calculators/mttr.d.ts.map +1 -0
  115. package/dist/metrics/calculators/mttr.js +60 -0
  116. package/dist/metrics/calculators/mttr.js.map +1 -0
  117. package/dist/metrics/dora-calculator.d.ts +24 -0
  118. package/dist/metrics/dora-calculator.d.ts.map +1 -0
  119. package/dist/metrics/dora-calculator.js +104 -0
  120. package/dist/metrics/dora-calculator.js.map +1 -0
  121. package/dist/metrics/github-client.d.ts +51 -0
  122. package/dist/metrics/github-client.d.ts.map +1 -0
  123. package/dist/metrics/github-client.js +133 -0
  124. package/dist/metrics/github-client.js.map +1 -0
  125. package/dist/metrics/types.d.ts +112 -0
  126. package/dist/metrics/types.d.ts.map +1 -0
  127. package/dist/metrics/types.js +10 -0
  128. package/dist/metrics/types.js.map +1 -0
  129. package/dist/metrics/utils/percentile.d.ts +25 -0
  130. package/dist/metrics/utils/percentile.d.ts.map +1 -0
  131. package/dist/metrics/utils/percentile.js +46 -0
  132. package/dist/metrics/utils/percentile.js.map +1 -0
  133. package/dist/metrics/utils/tier-classifier.d.ts +61 -0
  134. package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
  135. package/dist/metrics/utils/tier-classifier.js +100 -0
  136. package/dist/metrics/utils/tier-classifier.js.map +1 -0
  137. package/dist/utils/auth-helpers.d.ts +58 -0
  138. package/dist/utils/auth-helpers.d.ts.map +1 -0
  139. package/dist/utils/auth-helpers.js +108 -0
  140. package/dist/utils/auth-helpers.js.map +1 -0
  141. package/dist/utils/env-file.d.ts +88 -0
  142. package/dist/utils/env-file.d.ts.map +1 -0
  143. package/dist/utils/env-file.js +180 -0
  144. package/dist/utils/env-file.js.map +1 -0
  145. package/dist/utils/plugin-detection.d.ts +50 -0
  146. package/dist/utils/plugin-detection.d.ts.map +1 -0
  147. package/dist/utils/plugin-detection.js +229 -0
  148. package/dist/utils/plugin-detection.js.map +1 -0
  149. package/dist/utils/secrets-loader.d.ts +88 -0
  150. package/dist/utils/secrets-loader.d.ts.map +1 -0
  151. package/dist/utils/secrets-loader.js +271 -0
  152. package/dist/utils/secrets-loader.js.map +1 -0
  153. package/dist/utils/translation.d.ts +187 -0
  154. package/dist/utils/translation.d.ts.map +1 -0
  155. package/dist/utils/translation.js +414 -0
  156. package/dist/utils/translation.js.map +1 -0
  157. package/package.json +28 -44
  158. package/plugins/specweave/.claude-plugin/plugin.json +3 -3
  159. package/plugins/specweave/agents/pm/AGENT.md +330 -54
  160. package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
  161. package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
  162. package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
  163. package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
  164. package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
  165. package/plugins/specweave/commands/README.md +88 -163
  166. package/plugins/specweave/commands/specweave-abandon.md +314 -0
  167. package/plugins/specweave/commands/specweave-check-tests.md +546 -0
  168. package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -7
  169. package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
  170. package/plugins/specweave/commands/specweave-pause.md +189 -0
  171. package/plugins/specweave/commands/specweave-qa.md +245 -0
  172. package/plugins/specweave/commands/specweave-resume.md +216 -0
  173. package/plugins/specweave/commands/specweave-status.md +397 -0
  174. package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
  175. package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
  176. package/plugins/specweave/commands/specweave-update-scope.md +351 -0
  177. package/plugins/specweave/commands/specweave.md +21 -21
  178. package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
  179. package/plugins/specweave/hooks/post-task-completion.sh +141 -0
  180. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  181. package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
  182. package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
  183. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
  184. package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
  185. package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
  186. package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
  187. package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
  188. package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
  189. package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
  190. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
  191. package/plugins/specweave-ado/commands/close-workitem.md +52 -0
  192. package/plugins/specweave-ado/commands/create-workitem.md +53 -0
  193. package/plugins/specweave-ado/commands/status.md +53 -0
  194. package/plugins/specweave-ado/commands/sync.md +55 -0
  195. package/plugins/specweave-ado/lib/ado-client.ts +361 -0
  196. package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
  197. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
  198. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
  199. package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
  200. package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
  201. package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
  202. package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
  203. package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
  204. package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
  205. package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
  206. package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
  207. package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
  208. package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
  209. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
  210. package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
  211. package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
  212. package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
  213. package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
  214. package/plugins/specweave-ml/commands/ml-explain.md +1 -1
  215. package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
  216. package/src/templates/AGENTS.md.template +331 -31
  217. package/src/templates/CLAUDE.md.template +36 -21
  218. package/src/templates/COMPLETION-REPORT.template.md +128 -0
  219. package/src/templates/README.md.template +17 -16
  220. package/src/templates/docs/README.md +11 -9
  221. package/src/templates/docs/spec-template.md +229 -0
  222. package/plugins/specweave/commands/inc.md +0 -85
  223. package/plugins/specweave/commands/list-increments.md +0 -180
  224. package/src/adapters/README.md +0 -275
  225. package/src/adapters/adapter-base.ts +0 -182
  226. package/src/adapters/adapter-interface.ts +0 -166
  227. package/src/adapters/adapter-loader.ts +0 -256
  228. package/src/adapters/agents-md-generator.ts +0 -228
  229. package/src/adapters/claude/README.md +0 -233
  230. package/src/adapters/claude/adapter.ts +0 -468
  231. package/src/adapters/claude-md-generator.ts +0 -377
  232. package/src/adapters/codex/README.md +0 -105
  233. package/src/adapters/codex/adapter.ts +0 -333
  234. package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
  235. package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
  236. package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
  237. package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
  238. package/src/adapters/cursor/README.md +0 -283
  239. package/src/adapters/cursor/adapter.ts +0 -451
  240. package/src/adapters/doc-generator.ts +0 -331
  241. package/src/adapters/gemini/README.md +0 -97
  242. package/src/adapters/gemini/adapter.ts +0 -298
  243. package/src/adapters/generic/README.md +0 -277
  244. package/src/adapters/generic/adapter.ts +0 -378
  245. package/src/adapters/registry.yaml +0 -187
  246. /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
  247. /package/plugins/specweave/commands/{done.md → specweave-done.md} +0 -0
  248. /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
  249. /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
  250. /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
  251. /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
  252. /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
  253. /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
  254. /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
  255. /package/plugins/specweave/commands/{validate.md → specweave-validate.md} +0 -0
@@ -0,0 +1,118 @@
1
+ # Test-Aware Planner Templates
2
+
3
+ This directory contains templates for generating tasks.md with embedded test plans.
4
+
5
+ ## Templates
6
+
7
+ ### 1. task-testable.md.template
8
+
9
+ **Purpose**: Template for tasks that have automated tests (unit/integration/E2E)
10
+
11
+ **Variables**:
12
+ - `{task_number}`: Sequential task number (001, 002, 003, ...)
13
+ - `{task_title}`: Clear, action-oriented task description
14
+ - `{user_story}`: User story ID (US1, US2, ...)
15
+ - `{ac_ids}`: Acceptance criteria IDs (AC-US1-01, AC-US1-02)
16
+ - `{priority}`: Priority level (P0, P1, P2)
17
+ - `{estimate}`: Time estimate in hours (2-8 typical)
18
+
19
+ **Test Plan Variables**:
20
+ - `{given_condition}`: Precondition/setup
21
+ - `{when_action}`: Action or event
22
+ - `{then_outcome}`: Expected result
23
+ - `{and_additional}`: Additional conditions (optional)
24
+
25
+ **Test Cases Variables**:
26
+ - `{unit_test_path}`: Path to unit test file (e.g., `tests/unit/feature.test.ts`)
27
+ - `{testFunction1}`, `{testFunction2}`: Test function names
28
+ - `{test1_description}`: One-line test description
29
+ - `{unit_coverage}`: Coverage target for unit tests (85-95%)
30
+ - `{integration_test_path}`: Path to integration test file
31
+ - `{integration_coverage}`: Coverage target for integration tests (80-90%)
32
+ - `{e2e_test_path}`: Path to E2E test file (optional)
33
+ - `{overall_coverage}`: Overall coverage target (80-90%)
34
+
35
+ **Implementation Variables**:
36
+ - `{step1}`, `{step2}`, ...: Implementation steps
37
+ - `{unit_test_count}`: Number of unit tests
38
+ - `{int_test_count}`: Number of integration tests
39
+ - `{e2e_test_count}`: Number of E2E tests (optional)
40
+ - `{unit_test_command}`: Command to run unit tests
41
+ - `{int_test_command}`: Command to run integration tests
42
+ - `{e2e_test_command}`: Command to run E2E tests
43
+
44
+ **TDD Workflow Variables**:
45
+ - `{total_test_count}`: Total number of tests across all levels
46
+ - `{feature_name}`: Name of feature being implemented
47
+ - `{impl_step_count}`: Number of implementation steps
48
+
49
+ ### 2. task-non-testable.md.template
50
+
51
+ **Purpose**: Template for tasks without automated tests (documentation, configuration, manual processes)
52
+
53
+ **Variables**:
54
+ - Same header variables as testable template (task_number, task_title, etc.)
55
+ - `{task_type}`: Type of task (documentation, configuration, deployment, etc.)
56
+
57
+ **Validation Variables**:
58
+ - `{validation1}`, `{validation2}`: Validation methods
59
+ - `{validation1_description}`: What to check/verify
60
+ - `{validation_command}`: Command to run validation
61
+ - `{review_criteria}`: Manual review criteria
62
+
63
+ ### 3. tasks-frontmatter.md.template
64
+
65
+ **Purpose**: Template for tasks.md file header (YAML frontmatter)
66
+
67
+ **Variables**:
68
+ - `{increment_id}`: Increment ID (e.g., 0007-smart-increment-discipline)
69
+ - `{total_tasks}`: Total number of tasks
70
+ - `{test_mode}`: TDD or standard
71
+ - `{coverage_target}`: Overall coverage target (80-90%)
72
+ - `{tasks_content}`: Concatenated tasks from other templates
73
+
74
+ ## Usage Example
75
+
76
+ ```typescript
77
+ // Pseudo-code for using templates
78
+
79
+ const taskTemplate = fs.readFileSync('task-testable.md.template', 'utf-8');
80
+
81
+ const taskContent = taskTemplate
82
+ .replace('{task_number}', '001')
83
+ .replace('{task_title}', 'Implement User Authentication')
84
+ .replace('{user_story}', 'US1')
85
+ .replace('{ac_ids}', 'AC-US1-01, AC-US1-02')
86
+ .replace('{priority}', 'P1')
87
+ .replace('{estimate}', '6')
88
+ .replace('{given_condition}', 'a registered user with email "test@example.com"')
89
+ .replace('{when_action}', 'they submit valid credentials')
90
+ .replace('{then_outcome}', 'they should be redirected to dashboard')
91
+ .replace('{and_additional}', 'session cookie should be created')
92
+ // ... replace all other variables
93
+
94
+ // Repeat for each task, then assemble into tasks.md
95
+ ```
96
+
97
+ ## Template Design Principles
98
+
99
+ 1. **Consistency**: All tasks follow the same structure
100
+ 2. **Flexibility**: Optional sections (E2E tests, And clauses) can be removed
101
+ 3. **Clarity**: Variable names are self-explanatory
102
+ 4. **Completeness**: All required sections included
103
+ 5. **Validation**: Templates match ARCHITECTURE-PIVOT.md format
104
+
105
+ ## Template Validation
106
+
107
+ Before using templates, verify:
108
+ - [ ] All variables are documented
109
+ - [ ] Format matches ARCHITECTURE-PIVOT.md
110
+ - [ ] Examples in AGENT.md use these templates
111
+ - [ ] Both testable and non-testable scenarios covered
112
+ - [ ] TDD workflow optional but included
113
+
114
+ ## Further Reading
115
+
116
+ - AGENT.md: Complete agent workflow using these templates
117
+ - ARCHITECTURE-PIVOT.md: Rationale for embedded test format
118
+ - tasks.md: Real example of template output (dogfooding in increment 0007)
@@ -0,0 +1,24 @@
1
+ ### T-{task_number}: {task_title}
2
+
3
+ **User Story**: {user_story}
4
+ **Acceptance Criteria**: {ac_ids}
5
+ **Priority**: {priority}
6
+ **Estimate**: {estimate} hours
7
+ **Status**: [ ] pending
8
+
9
+ **Test Plan**: N/A ({task_type} task)
10
+
11
+ **Validation**:
12
+ - {validation1}: {validation1_description}
13
+ - {validation2}: {validation2_description}
14
+ - {validation3}: {validation3_description}
15
+ - {validation4}: {validation4_description} (add more as needed)
16
+
17
+ **Implementation**:
18
+ 1. {step1}
19
+ 2. {step2}
20
+ 3. {step3}
21
+ 4. {step4}
22
+ 5. {step5}
23
+ 6. Run validation: {validation_command}
24
+ 7. Manual review: {review_criteria}
@@ -0,0 +1,53 @@
1
+ ### T-{task_number}: {task_title}
2
+
3
+ **User Story**: {user_story}
4
+ **Acceptance Criteria**: {ac_ids}
5
+ **Priority**: {priority}
6
+ **Estimate**: {estimate} hours
7
+ **Status**: [ ] pending
8
+
9
+ **Test Plan**:
10
+ - **Given** {given_condition}
11
+ - **When** {when_action}
12
+ - **Then** {then_outcome}
13
+ - **And** {and_additional} (optional, remove if not needed)
14
+
15
+ **Test Cases**:
16
+ 1. **Unit**: `{unit_test_path}`
17
+ - {testFunction1}(): {test1_description}
18
+ - {testFunction2}(): {test2_description}
19
+ - {testFunction3}(): {test3_description} (add more as needed)
20
+ - **Coverage Target**: {unit_coverage}%
21
+
22
+ 2. **Integration**: `{integration_test_path}`
23
+ - {testIntegration1}(): {integration1_description}
24
+ - {testIntegration2}(): {integration2_description} (add more as needed)
25
+ - **Coverage Target**: {integration_coverage}%
26
+
27
+ 3. **E2E**: `{e2e_test_path}` (optional, include only for user-facing features)
28
+ - {testE2E1}(): {e2e1_description}
29
+ - **Coverage Target**: 100% (critical path)
30
+
31
+ **Overall Coverage Target**: {overall_coverage}%
32
+
33
+ **Implementation**:
34
+ 1. {step1}
35
+ 2. {step2}
36
+ 3. {step3}
37
+ 4. {step4}
38
+ 5. {step5}
39
+ 6. Write unit tests ({unit_test_count} tests)
40
+ 7. Run unit tests: `{unit_test_command}` (should pass: {unit_test_count}/{unit_test_count})
41
+ 8. Write integration tests ({int_test_count} tests)
42
+ 9. Run integration tests: `{int_test_command}` (should pass: {int_test_count}/{int_test_count})
43
+ 10. (Optional) Write E2E tests ({e2e_test_count} tests)
44
+ 11. (Optional) Run E2E tests: `{e2e_test_command}` (should pass: {e2e_test_count}/{e2e_test_count})
45
+ 12. Verify coverage: `npm run coverage` (should be ≥{overall_coverage}%)
46
+
47
+ **TDD Workflow** (if TDD mode enabled):
48
+ 1. 📝 Write all {total_test_count} tests above (should fail)
49
+ 2. ❌ Run tests: `npm test` (0/{total_test_count} passing)
50
+ 3. ✅ Implement {feature_name} (steps 1-{impl_step_count} from Implementation)
51
+ 4. 🟢 Run tests: `npm test` ({total_test_count}/{total_test_count} passing)
52
+ 5. ♻️ Refactor if needed (maintain green tests)
53
+ 6. ✅ Final check: Coverage ≥{overall_coverage}%
@@ -0,0 +1,11 @@
1
+ ---
2
+ increment: {increment_id}
3
+ total_tasks: {total_tasks}
4
+ completed_tasks: 0
5
+ test_mode: {test_mode}
6
+ coverage_target: {coverage_target}%
7
+ ---
8
+
9
+ # Implementation Tasks
10
+
11
+ {tasks_content}
@@ -1,196 +1,121 @@
1
- # SpecWeave Slash Commands
1
+ # SpecWeave Commands
2
2
 
3
- This directory contains all slash commands for SpecWeave.
3
+ All SpecWeave commands are namespaced for brownfield safety and follow a consistent naming pattern.
4
4
 
5
- ## Available Commands (v0.2.0)
5
+ ## ⚠️ CRITICAL: No Shortcuts Allowed
6
6
 
7
- **IMPORTANT**: All SpecWeave commands are now namespaced with `specweave.` notation to avoid collisions in brownfield projects.
7
+ **IMPORTANT**: SpecWeave commands MUST be invoked with the `/specweave:*` namespace prefix.
8
8
 
9
- ### Core Workflow Commands (Smart Workflow)
9
+ **Why?** Shortcuts like `/inc`, `/do`, `/pause`, `/resume` conflict with Claude Code's native commands and break functionality.
10
10
 
11
- | Command | Shorthand via /specweave | Description |
12
- |---------|--------------------------|-------------|
13
- | `/specweave:increment` | `/specweave inc` | Plan increment (PM-led, auto-closes previous if ready) |
14
- | `/specweave:inc` | `/specweave inc` | Alias for /specweave:increment |
15
- | `/specweave:do` | `/specweave do` | Execute work (smart resume, hooks after every task) |
16
- | `/specweave:next` | `/specweave next` | Smart transition (close + suggest next) |
17
- | `/specweave:progress` | `/specweave progress` | Show status (task %, PM gates, next action) |
18
- | `/specweave:validate` | `/specweave validate` | Validate quality (rule-based + optional LLM judge) |
19
- | `/specweave:done` | `/specweave done` | Close explicitly (optional, /inc auto-closes) |
11
+ **Always use**: `/specweave:increment`, `/specweave:do`, `/specweave:resume`, etc.
20
12
 
21
- ### Supporting Commands
13
+ ## Command Naming Convention
22
14
 
23
- | Command | Shorthand via /specweave | Description |
24
- |---------|--------------------------|-------------|
25
- | `/specweave:list-increments` | `/specweave list-increments` | List all increments with status and WIP tracking |
26
- | `/specweave:sync-docs` | `/specweave sync-docs` | Review strategic docs vs implementation |
27
- | `/specweave:sync-github` | `/specweave sync-github` | Sync increment to GitHub issues with granular control |
28
- | `/specweave:sync-jira` | `/specweave sync-jira` | Sync increment to Jira epics/stories with granular control |
15
+ **All command files**: `specweave-{command-name}.md`
16
+ **YAML name field**: `{command-name}` (without `specweave-` prefix)
17
+ **Invocation**: `/specweave:{command-name}` (namespace prefix required)
29
18
 
30
- ### Master Router Command
19
+ ### Example:
20
+ - **File**: `specweave-increment.md`
21
+ - **YAML**:
22
+ ```yaml
23
+ ---
24
+ name: increment
25
+ description: Plan new Product Increment
26
+ ---
27
+ ```
28
+ - **Usage**: `/specweave:increment` (ONLY form, no shortcuts)
31
29
 
32
- | Command | Description |
33
- |---------|-------------|
34
- | `/specweave` | Master router for all subcommands (use `/specweave <subcommand>`) |
30
+ ## All Available Commands
35
31
 
36
- ## Smart Workflow Features (v0.2.0)
32
+ ### Core Lifecycle (7 commands)
33
+ 1. `specweave-increment.md` - Create increment → `/specweave:increment`
34
+ 2. `specweave-do.md` - Execute tasks → `/specweave:do`
35
+ 3. `specweave-done.md` - Close increment → `/specweave:done`
36
+ 4. `specweave-next.md` - Smart transition → `/specweave:next`
37
+ 5. `specweave-progress.md` - Current progress → `/specweave:progress`
38
+ 6. `specweave-validate.md` - Validate quality → `/specweave:validate`
39
+ 7. `specweave-sync-docs.md` - Sync documentation → `/specweave:sync-docs`
37
40
 
38
- **What makes the workflow "smart"?**
41
+ ### Status & Reporting (4 commands)
42
+ 8. `specweave-status.md` - All increments overview → `/specweave:status`
43
+ 9. `specweave-costs.md` - AI cost dashboard → `/specweave:costs`
44
+ 10. `specweave-update-scope.md` - Update completion report → `/specweave:update-scope`
45
+ 11. `specweave-qa.md` - Quality assessment → `/specweave:qa`
39
46
 
40
- 1. **Auto-resume**: `/specweave do` automatically finds next incomplete task (no manual tracking)
41
- 2. ✅ **Auto-close**: `/specweave inc` auto-closes previous increment if PM gates pass (seamless)
42
- 3. ✅ **Suggest-not-force**: `/specweave inc` presents options if previous incomplete (user control)
43
- 4. ✅ **Progress visibility**: `/specweave progress` shows exactly where you are anytime
44
- 5. ✅ **Natural flow**: finish → start next without administrative overhead
47
+ ### State Management (3 commands)
48
+ 12. `specweave-pause.md` - Pause increment `/specweave:pause`
49
+ 13. `specweave-resume.md` - Resume increment `/specweave:resume`
50
+ 14. `specweave-abandon.md` - Abandon increment `/specweave:abandon`
45
51
 
46
- ## Typical Workflow
52
+ ### Testing & Quality (2 commands)
53
+ 15. `specweave-check-tests.md` - Validate test coverage → `/specweave:check-tests`
54
+ 16. `specweave-sync-tasks.md` - Sync tasks with GitHub → `/specweave:sync-tasks`
47
55
 
48
- **Natural append-only workflow** (0001 → 0002 → 0003):
56
+ ### TDD Workflow (4 commands)
57
+ 17. `specweave-tdd-red.md` - Write failing tests → `/specweave:tdd-red`
58
+ 18. `specweave-tdd-green.md` - Make tests pass → `/specweave:tdd-green`
59
+ 19. `specweave-tdd-refactor.md` - Refactor code → `/specweave:tdd-refactor`
60
+ 20. `specweave-tdd-cycle.md` - Full TDD cycle → `/specweave:tdd-cycle`
49
61
 
50
- ```bash
51
- # 1. Initialize project (CLI, before any AI session)
52
- npx specweave init my-saas
62
+ ### Utilities (2 commands)
63
+ 21. `specweave-translate.md` - Batch translation `/specweave:translate`
64
+ 22. `specweave.md` - Master router → `/specweave`
53
65
 
54
- # 2. Plan your first increment (PM-led planning)
55
- /specweave inc "AI-powered customer support chatbot"
56
- # PM creates: spec.md + plan.md + tasks.md (auto-generated!) + tests.md
66
+ **Total**: 22 commands (down from 31, removed 8 duplicates/deprecated, removed 1 redundant)
57
67
 
58
- # 3. Build it (smart resume)
59
- /specweave do
60
- # Auto-resumes from next incomplete task
61
- # Hooks run after EVERY task completion
68
+ ## Command Categories
62
69
 
63
- # 4. Check progress anytime
64
- /specweave progress
65
- # Shows: 5/12 tasks (42%), next: T006, PM gates status
70
+ - **ESSENTIAL**: increment, do, done, next, progress, validate, sync-docs
71
+ - **IMPORTANT**: status, qa, check-tests, update-scope, costs, translate
72
+ - **STATE MANAGEMENT**: pause, resume, abandon
73
+ - **OPTIONAL**: TDD workflow commands, sync-tasks
66
74
 
67
- # 5. Continue building
68
- /specweave do
69
- # Picks up where you left off automatically
75
+ ## Removed/Deprecated Commands
70
76
 
71
- # 6. Start next feature (auto-closes previous!)
72
- /specweave inc "real-time chat dashboard"
73
- # Smart check:
74
- # If 0001 complete (PM gates pass) Auto-close, create 0002
75
- # If 0001 incompletePresent options (never forces)
77
+ **Duplicates removed** (v0.7.0 refactoring):
78
+ - ❌ `inc.md` Use `/specweave:increment`
79
+ - `status.md` → Use `/specweave:status`
80
+ - `pause.md`Use `/specweave:pause`
81
+ - `resume.md`Use `/specweave:resume`
82
+ - ❌ `abandon.md` → Use `/specweave:abandon`
76
83
 
77
- # 7. Keep building
78
- /specweave do
79
- # Auto-finds active increment 0002
84
+ **Deprecated commands**:
85
+ - ❌ `validate-coverage.md` → Use `/specweave:check-tests` (NEW format)
86
+ - ❌ `specweave-validate-coverage.md` Use `/specweave:check-tests`
80
87
 
81
- # Repeat: /specweave inc → /specweave do → /specweave progress → ...
82
- ```
88
+ **Redundant commands**:
89
+ - ❌ `list-increments.md` → Use `/specweave:status` (same functionality)
83
90
 
84
- ## Namespaced Commands (Brownfield Safety)
91
+ ## Brownfield Safety
85
92
 
86
- **Design decision**: All commands use `specweave.` notation for collision avoidance.
93
+ All commands are namespaced to prevent collisions with existing project commands:
94
+ - ✅ **Namespace form**: `/specweave:increment` (ONLY way, always safe)
95
+ - ❌ **No shortcuts**: Do NOT use `/inc`, `/do`, `/pause`, `/resume` etc.
87
96
 
88
- - No conflicts with existing project commands
89
- - ✅ Clear ownership (framework vs. project commands)
90
- - ✅ Use master router `/specweave` for convenience
91
- - ✅ Brownfield projects can adopt SpecWeave without risk
97
+ ## Command Usage Philosophy
92
98
 
93
- **Most used workflow**:
99
+ **Correct usage** (namespace prefix required):
94
100
  ```bash
95
- /specweave inc "feature" # Create new increment
96
- /specweave do # Execute work
97
- /specweave progress # Check status
98
- /specweave next # Smart transition to next work
99
- ```
100
-
101
- ## Command Design Philosophy
102
-
103
- ### 1. Natural Flow Without Overhead
104
-
105
- **Problem with traditional workflows**:
106
- - Manual task tracking ("which task am I on?")
107
- - Manual closure ("do I need to close this?")
108
- - Administrative overhead ("update project board")
109
-
110
- **SpecWeave solution**:
111
- - `/do` auto-resumes (no tracking needed)
112
- - `/inc` auto-closes if ready (no manual /done needed)
113
- - `/progress` shows status anytime (no board updates)
114
-
115
- ### 2. Suggest, Never Force
116
-
117
- **Critical principle**: User always in control.
118
-
119
- **Example**: When starting new increment while previous incomplete:
101
+ /specweave:increment "feature" # Create increment
102
+ /specweave:do # Execute tasks
103
+ /specweave:status # Check progress
104
+ /specweave:qa 0007 # Quality check
105
+ /specweave:done 0007 # Close increment
120
106
  ```
121
- /inc "new feature"
122
-
123
- 📊 Checking previous increment 0001-authentication...
124
- Status: in-progress
125
- PM Gates: ❌ 2 P1 tasks remaining
126
-
127
- ❌ Cannot auto-close 0001 (incomplete)
128
-
129
- Options:
130
- A) Complete 0001 first (recommended)
131
- → Finish remaining work before starting new
132
-
133
- B) Move incomplete tasks to 0002
134
- → Transfer T006, T007 to new increment
135
- → Close 0001 as "completed with deferrals"
136
-
137
- C) Cancel new increment
138
- → Stay on 0001, continue working
139
- → Retry /inc when ready
140
-
141
- Your choice? _
142
- ```
143
-
144
- **Never**: "Auto-closed 0001 with incomplete work" (surprising, loses context)
145
107
 
146
- ### 3. Progressive Disclosure
147
-
148
- **Only show complexity when needed**:
149
- - ✅ Happy path: `/inc` → Auto-close, create new (1 step)
150
- - ⚠️ Issues found: Show options, explain, let user decide
151
-
152
- ## Installation
153
-
154
- Commands are automatically installed when you:
155
- - Run `specweave init` (new projects)
156
- - Install SpecWeave as dependency (`npm install specweave --save-dev`)
157
-
158
- For manual installation:
108
+ **Incorrect usage** (DO NOT USE):
159
109
  ```bash
160
- npm run install:commands
110
+ /inc "feature" # ❌ Conflicts with Claude Code native commands
111
+ /do # ❌ Conflicts with Claude Code native commands
112
+ /status # ❌ Conflicts with Claude Code native commands
113
+ /pause 0007 # ❌ Conflicts with Claude Code native commands
114
+ /resume 0007 # ❌ Conflicts with Claude Code native commands
161
115
  ```
162
116
 
163
- ## Creating Custom Commands
164
-
165
- You can create project-specific commands:
166
-
167
- **1. Create `.claude/commands/custom.md`**:
168
- ```markdown
169
- ---
170
- name: custom
171
- description: Your custom command description
172
- ---
173
-
174
- # Custom Command
175
-
176
- [Your command implementation]
177
- ```
178
-
179
- **2. Use it**:
180
- ```bash
181
- /custom
182
- ```
183
-
184
- ## Documentation
185
-
186
- - **Command Reference**: See `.claude/commands/` for all command implementations
187
- - **CLAUDE.md**: Quick reference table with all commands
188
- - **Official Docs**: https://spec-weave.com/docs/commands
189
-
190
- ---
191
-
192
- **💡 Pro Tip**: Master the smart workflow - natural append-only progression!
193
-
194
- **Core cycle**: `/inc` (plan) → `/do` (implement) → `/progress` (check) → `/inc` (next)
117
+ ## See Also
195
118
 
196
- **One alias to rule them all**: `/inc` (short for `/increment`)
119
+ - **User Documentation**: https://spec-weave.com/docs/commands
120
+ - **CLAUDE.md**: Project contributor guide with complete command reference
121
+ - **Plugin Marketplace**: `.claude-plugin/marketplace.json`