specweave 0.6.7 → 0.7.0

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 (281) hide show
  1. package/.claude-plugin/README.md +1 -1
  2. package/CLAUDE.md +920 -107
  3. package/README.md +143 -207
  4. package/bin/specweave.js +67 -0
  5. package/dist/adapters/adapter-interface.d.ts +11 -11
  6. package/dist/adapters/adapter-interface.d.ts.map +1 -1
  7. package/dist/adapters/adapter-interface.js +1 -1
  8. package/dist/adapters/adapter-loader.d.ts +1 -2
  9. package/dist/adapters/adapter-loader.d.ts.map +1 -1
  10. package/dist/adapters/adapter-loader.js +3 -6
  11. package/dist/adapters/adapter-loader.js.map +1 -1
  12. package/dist/adapters/agents-md-generator.d.ts +3 -3
  13. package/dist/adapters/agents-md-generator.js +3 -3
  14. package/dist/adapters/generic/adapter.d.ts +2 -2
  15. package/dist/adapters/generic/adapter.d.ts.map +1 -1
  16. package/dist/adapters/generic/adapter.js +28 -9
  17. package/dist/adapters/generic/adapter.js.map +1 -1
  18. package/dist/cli/commands/abandon.d.ts +13 -0
  19. package/dist/cli/commands/abandon.d.ts.map +1 -0
  20. package/dist/cli/commands/abandon.js +15 -0
  21. package/dist/cli/commands/abandon.js.map +1 -0
  22. package/dist/cli/commands/init.d.ts.map +1 -1
  23. package/dist/cli/commands/init.js +141 -40
  24. package/dist/cli/commands/init.js.map +1 -1
  25. package/dist/cli/commands/pause.d.ts +13 -0
  26. package/dist/cli/commands/pause.d.ts.map +1 -0
  27. package/dist/cli/commands/pause.js +15 -0
  28. package/dist/cli/commands/pause.js.map +1 -0
  29. package/dist/cli/commands/qa.d.ts +54 -0
  30. package/dist/cli/commands/qa.d.ts.map +1 -0
  31. package/dist/cli/commands/qa.js +98 -0
  32. package/dist/cli/commands/qa.js.map +1 -0
  33. package/dist/cli/commands/resume.d.ts +12 -0
  34. package/dist/cli/commands/resume.d.ts.map +1 -0
  35. package/dist/cli/commands/resume.js +14 -0
  36. package/dist/cli/commands/resume.js.map +1 -0
  37. package/dist/cli/commands/status.d.ts +12 -0
  38. package/dist/cli/commands/status.d.ts.map +1 -0
  39. package/dist/cli/commands/status.js +23 -0
  40. package/dist/cli/commands/status.js.map +1 -0
  41. package/dist/cli/helpers/issue-tracker/ado.d.ts +57 -0
  42. package/dist/cli/helpers/issue-tracker/ado.d.ts.map +1 -0
  43. package/dist/cli/helpers/issue-tracker/ado.js +223 -0
  44. package/dist/cli/helpers/issue-tracker/ado.js.map +1 -0
  45. package/dist/cli/helpers/issue-tracker/github.d.ts +65 -0
  46. package/dist/cli/helpers/issue-tracker/github.d.ts.map +1 -0
  47. package/dist/cli/helpers/issue-tracker/github.js +284 -0
  48. package/dist/cli/helpers/issue-tracker/github.js.map +1 -0
  49. package/dist/cli/helpers/issue-tracker/index.d.ts +22 -0
  50. package/dist/cli/helpers/issue-tracker/index.d.ts.map +1 -0
  51. package/dist/cli/helpers/issue-tracker/index.js +270 -0
  52. package/dist/cli/helpers/issue-tracker/index.js.map +1 -0
  53. package/dist/cli/helpers/issue-tracker/jira.d.ts +61 -0
  54. package/dist/cli/helpers/issue-tracker/jira.d.ts.map +1 -0
  55. package/dist/cli/helpers/issue-tracker/jira.js +265 -0
  56. package/dist/cli/helpers/issue-tracker/jira.js.map +1 -0
  57. package/dist/cli/helpers/issue-tracker/types.d.ts +86 -0
  58. package/dist/cli/helpers/issue-tracker/types.d.ts.map +1 -0
  59. package/dist/cli/helpers/issue-tracker/types.js +16 -0
  60. package/dist/cli/helpers/issue-tracker/types.js.map +1 -0
  61. package/dist/cli/helpers/issue-tracker/utils.d.ts +103 -0
  62. package/dist/cli/helpers/issue-tracker/utils.d.ts.map +1 -0
  63. package/dist/cli/helpers/issue-tracker/utils.js +240 -0
  64. package/dist/cli/helpers/issue-tracker/utils.js.map +1 -0
  65. package/dist/core/increment/limits.d.ts +68 -0
  66. package/dist/core/increment/limits.d.ts.map +1 -0
  67. package/dist/core/increment/limits.js +224 -0
  68. package/dist/core/increment/limits.js.map +1 -0
  69. package/dist/core/increment/metadata-manager.d.ts +114 -0
  70. package/dist/core/increment/metadata-manager.d.ts.map +1 -0
  71. package/dist/core/increment/metadata-manager.js +320 -0
  72. package/dist/core/increment/metadata-manager.js.map +1 -0
  73. package/dist/core/increment/status-commands.d.ts +43 -0
  74. package/dist/core/increment/status-commands.d.ts.map +1 -0
  75. package/dist/core/increment/status-commands.js +277 -0
  76. package/dist/core/increment/status-commands.js.map +1 -0
  77. package/dist/core/plugin-detector.d.ts +1 -0
  78. package/dist/core/plugin-detector.d.ts.map +1 -1
  79. package/dist/core/plugin-detector.js +25 -0
  80. package/dist/core/plugin-detector.js.map +1 -1
  81. package/dist/core/qa/qa-runner.d.ts +16 -0
  82. package/dist/core/qa/qa-runner.d.ts.map +1 -0
  83. package/dist/core/qa/qa-runner.js +404 -0
  84. package/dist/core/qa/qa-runner.js.map +1 -0
  85. package/dist/core/qa/quality-gate-decider.d.ts +53 -0
  86. package/dist/core/qa/quality-gate-decider.d.ts.map +1 -0
  87. package/dist/core/qa/quality-gate-decider.js +268 -0
  88. package/dist/core/qa/quality-gate-decider.js.map +1 -0
  89. package/dist/core/qa/risk-calculator.d.ts +126 -0
  90. package/dist/core/qa/risk-calculator.d.ts.map +1 -0
  91. package/dist/core/qa/risk-calculator.js +247 -0
  92. package/dist/core/qa/risk-calculator.js.map +1 -0
  93. package/dist/core/qa/types.d.ts +315 -0
  94. package/dist/core/qa/types.d.ts.map +1 -0
  95. package/dist/core/qa/types.js +8 -0
  96. package/dist/core/qa/types.js.map +1 -0
  97. package/dist/core/types/config.d.ts +37 -2
  98. package/dist/core/types/config.d.ts.map +1 -1
  99. package/dist/core/types/config.js +16 -0
  100. package/dist/core/types/config.js.map +1 -1
  101. package/dist/core/types/increment-metadata.d.ts +120 -0
  102. package/dist/core/types/increment-metadata.d.ts.map +1 -0
  103. package/dist/core/types/increment-metadata.js +138 -0
  104. package/dist/core/types/increment-metadata.js.map +1 -0
  105. package/dist/hooks/lib/invoke-translator-skill.d.ts +60 -0
  106. package/dist/hooks/lib/invoke-translator-skill.d.ts.map +1 -0
  107. package/dist/hooks/lib/invoke-translator-skill.js +201 -0
  108. package/dist/hooks/lib/invoke-translator-skill.js.map +1 -0
  109. package/dist/hooks/lib/translate-file.d.ts +59 -0
  110. package/dist/hooks/lib/translate-file.d.ts.map +1 -0
  111. package/dist/hooks/lib/translate-file.js +350 -0
  112. package/dist/hooks/lib/translate-file.js.map +1 -0
  113. package/dist/locales/en/cli.json +3 -1
  114. package/dist/metrics/calculators/change-failure-rate.d.ts +22 -0
  115. package/dist/metrics/calculators/change-failure-rate.d.ts.map +1 -0
  116. package/dist/metrics/calculators/change-failure-rate.js +70 -0
  117. package/dist/metrics/calculators/change-failure-rate.js.map +1 -0
  118. package/dist/metrics/calculators/deployment-frequency.d.ts +20 -0
  119. package/dist/metrics/calculators/deployment-frequency.d.ts.map +1 -0
  120. package/dist/metrics/calculators/deployment-frequency.js +61 -0
  121. package/dist/metrics/calculators/deployment-frequency.js.map +1 -0
  122. package/dist/metrics/calculators/lead-time.d.ts +22 -0
  123. package/dist/metrics/calculators/lead-time.d.ts.map +1 -0
  124. package/dist/metrics/calculators/lead-time.js +82 -0
  125. package/dist/metrics/calculators/lead-time.js.map +1 -0
  126. package/dist/metrics/calculators/mttr.d.ts +21 -0
  127. package/dist/metrics/calculators/mttr.d.ts.map +1 -0
  128. package/dist/metrics/calculators/mttr.js +60 -0
  129. package/dist/metrics/calculators/mttr.js.map +1 -0
  130. package/dist/metrics/dora-calculator.d.ts +24 -0
  131. package/dist/metrics/dora-calculator.d.ts.map +1 -0
  132. package/dist/metrics/dora-calculator.js +104 -0
  133. package/dist/metrics/dora-calculator.js.map +1 -0
  134. package/dist/metrics/github-client.d.ts +51 -0
  135. package/dist/metrics/github-client.d.ts.map +1 -0
  136. package/dist/metrics/github-client.js +133 -0
  137. package/dist/metrics/github-client.js.map +1 -0
  138. package/dist/metrics/types.d.ts +112 -0
  139. package/dist/metrics/types.d.ts.map +1 -0
  140. package/dist/metrics/types.js +10 -0
  141. package/dist/metrics/types.js.map +1 -0
  142. package/dist/metrics/utils/percentile.d.ts +25 -0
  143. package/dist/metrics/utils/percentile.d.ts.map +1 -0
  144. package/dist/metrics/utils/percentile.js +46 -0
  145. package/dist/metrics/utils/percentile.js.map +1 -0
  146. package/dist/metrics/utils/tier-classifier.d.ts +61 -0
  147. package/dist/metrics/utils/tier-classifier.d.ts.map +1 -0
  148. package/dist/metrics/utils/tier-classifier.js +100 -0
  149. package/dist/metrics/utils/tier-classifier.js.map +1 -0
  150. package/dist/utils/auth-helpers.d.ts +58 -0
  151. package/dist/utils/auth-helpers.d.ts.map +1 -0
  152. package/dist/utils/auth-helpers.js +108 -0
  153. package/dist/utils/auth-helpers.js.map +1 -0
  154. package/dist/utils/env-file.d.ts +88 -0
  155. package/dist/utils/env-file.d.ts.map +1 -0
  156. package/dist/utils/env-file.js +180 -0
  157. package/dist/utils/env-file.js.map +1 -0
  158. package/dist/utils/plugin-detection.d.ts +50 -0
  159. package/dist/utils/plugin-detection.d.ts.map +1 -0
  160. package/dist/utils/plugin-detection.js +229 -0
  161. package/dist/utils/plugin-detection.js.map +1 -0
  162. package/dist/utils/secrets-loader.d.ts +88 -0
  163. package/dist/utils/secrets-loader.d.ts.map +1 -0
  164. package/dist/utils/secrets-loader.js +271 -0
  165. package/dist/utils/secrets-loader.js.map +1 -0
  166. package/dist/utils/translation.d.ts +187 -0
  167. package/dist/utils/translation.d.ts.map +1 -0
  168. package/dist/utils/translation.js +414 -0
  169. package/dist/utils/translation.js.map +1 -0
  170. package/package.json +28 -44
  171. package/plugins/specweave/.claude-plugin/plugin.json +3 -3
  172. package/plugins/specweave/agents/pm/AGENT.md +330 -54
  173. package/plugins/specweave/agents/test-aware-planner/AGENT.md +1035 -0
  174. package/plugins/specweave/agents/test-aware-planner/templates/README.md +118 -0
  175. package/plugins/specweave/agents/test-aware-planner/templates/task-non-testable.md.template +24 -0
  176. package/plugins/specweave/agents/test-aware-planner/templates/task-testable.md.template +53 -0
  177. package/plugins/specweave/agents/test-aware-planner/templates/tasks-frontmatter.md.template +11 -0
  178. package/plugins/specweave/commands/README.md +88 -163
  179. package/plugins/specweave/commands/specweave-abandon.md +314 -0
  180. package/plugins/specweave/commands/specweave-check-tests.md +546 -0
  181. package/plugins/specweave/commands/{do.md → specweave-do.md} +5 -5
  182. package/plugins/specweave/commands/{done.md → specweave-done.md} +2 -0
  183. package/plugins/specweave/commands/{increment.md → specweave-increment.md} +231 -4
  184. package/plugins/specweave/commands/specweave-pause.md +189 -0
  185. package/plugins/specweave/commands/specweave-qa.md +245 -0
  186. package/plugins/specweave/commands/specweave-resume.md +216 -0
  187. package/plugins/specweave/commands/specweave-status.md +397 -0
  188. package/plugins/specweave/commands/specweave-sync-tasks.md +256 -0
  189. package/plugins/specweave/commands/{translate.md → specweave-translate.md} +3 -3
  190. package/plugins/specweave/commands/specweave-update-scope.md +351 -0
  191. package/plugins/specweave/commands/{validate.md → specweave-validate.md} +2 -0
  192. package/plugins/specweave/commands/specweave.md +21 -21
  193. package/plugins/specweave/hooks/docs-changed.sh +23 -3
  194. package/plugins/specweave/hooks/human-input-required.sh +23 -3
  195. package/plugins/specweave/hooks/post-increment-planning.sh +335 -0
  196. package/plugins/specweave/hooks/post-task-completion.sh +161 -1
  197. package/plugins/specweave/hooks/pre-implementation.sh +23 -3
  198. package/plugins/specweave/skills/SKILLS-INDEX.md +1 -1
  199. package/plugins/specweave/skills/brownfield-analyzer/SKILL.md +9 -9
  200. package/plugins/specweave/skills/increment-planner/SKILL.md +400 -212
  201. package/plugins/specweave/skills/increment-quality-judge-v2/SKILL.md +499 -0
  202. package/plugins/specweave/skills/plugin-detector/SKILL.md +114 -1
  203. package/plugins/specweave/skills/project-kickstarter/SKILL.md +74 -1
  204. package/plugins/specweave/skills/{rfc-generator → spec-generator}/SKILL.md +22 -29
  205. package/plugins/specweave/skills/specweave-detector/SKILL.md +3 -3
  206. package/plugins/specweave/skills/specweave-framework/SKILL.md +2 -2
  207. package/plugins/specweave-ado/.claude-plugin/plugin.json +18 -4
  208. package/plugins/specweave-ado/agents/ado-manager/AGENT.md +426 -0
  209. package/plugins/specweave-ado/commands/close-workitem.md +52 -0
  210. package/plugins/specweave-ado/commands/create-workitem.md +53 -0
  211. package/plugins/specweave-ado/commands/status.md +53 -0
  212. package/plugins/specweave-ado/commands/sync.md +55 -0
  213. package/plugins/specweave-ado/lib/ado-client.ts +361 -0
  214. package/plugins/specweave-ado/reference/ado-specweave-mapping.md +552 -0
  215. package/plugins/specweave-ado/skills/ado-sync/SKILL.md +344 -193
  216. package/plugins/specweave-docs/skills/docusaurus/SKILL.md +73 -0
  217. package/plugins/specweave-github/agents/github-manager/AGENT.md +49 -0
  218. package/plugins/specweave-github/commands/{github-close-issue.md → close-issue.md} +1 -1
  219. package/plugins/specweave-github/commands/{github-create-issue.md → create-issue.md} +1 -1
  220. package/plugins/specweave-github/commands/{github-status.md → status.md} +1 -1
  221. package/plugins/specweave-github/commands/{github-sync-tasks.md → sync-tasks.md} +1 -1
  222. package/plugins/specweave-github/commands/{github-sync.md → sync.md} +1 -1
  223. package/plugins/specweave-github/reference/github-specweave-mapping.md +377 -0
  224. package/plugins/specweave-github/skills/github-sync/SKILL.md +11 -3
  225. package/plugins/specweave-infrastructure/commands/{specweave.monitor-setup.md → monitor-setup.md} +5 -0
  226. package/plugins/specweave-infrastructure/commands/{specweave.slo-implement.md → slo-implement.md} +5 -0
  227. package/plugins/specweave-jira/agents/jira-manager/AGENT.md +380 -0
  228. package/plugins/specweave-jira/commands/{specweave.sync-jira.md → sync.md} +1 -1
  229. package/plugins/specweave-jira/reference/jira-specweave-mapping.md +508 -0
  230. package/plugins/specweave-ml/commands/ml-deploy.md +1 -1
  231. package/plugins/specweave-ml/commands/ml-evaluate.md +1 -1
  232. package/plugins/specweave-ml/commands/ml-explain.md +1 -1
  233. package/plugins/specweave-ml/commands/{specweave.ml-pipeline.md → ml-pipeline.md} +5 -0
  234. package/src/templates/AGENTS.md.template +652 -1
  235. package/src/templates/CLAUDE.md.template +36 -21
  236. package/src/templates/COMPLETION-REPORT.template.md +128 -0
  237. package/src/templates/README.md.template +17 -16
  238. package/src/templates/docs/README.md +11 -9
  239. package/src/templates/docs/spec-template.md +229 -0
  240. package/dist/adapters/copilot/adapter.d.ts +0 -86
  241. package/dist/adapters/copilot/adapter.d.ts.map +0 -1
  242. package/dist/adapters/copilot/adapter.js +0 -396
  243. package/dist/adapters/copilot/adapter.js.map +0 -1
  244. package/plugins/.specweave/logs/hooks-debug.log +0 -24
  245. package/plugins/.specweave/logs/last-hook-fire +0 -1
  246. package/plugins/.specweave/logs/last-todowrite-time +0 -1
  247. package/plugins/.specweave/logs/tasks.log +0 -6
  248. package/plugins/specweave/commands/inc.md +0 -85
  249. package/plugins/specweave/commands/list-increments.md +0 -180
  250. package/src/adapters/README.md +0 -311
  251. package/src/adapters/adapter-base.ts +0 -182
  252. package/src/adapters/adapter-interface.ts +0 -166
  253. package/src/adapters/adapter-loader.ts +0 -259
  254. package/src/adapters/agents-md-generator.ts +0 -228
  255. package/src/adapters/claude/README.md +0 -233
  256. package/src/adapters/claude/adapter.ts +0 -468
  257. package/src/adapters/claude-md-generator.ts +0 -377
  258. package/src/adapters/codex/README.md +0 -105
  259. package/src/adapters/codex/adapter.ts +0 -333
  260. package/src/adapters/copilot/README.md +0 -240
  261. package/src/adapters/copilot/adapter.ts +0 -444
  262. package/src/adapters/cursor/.cursor/context/docs-context.md +0 -62
  263. package/src/adapters/cursor/.cursor/context/increments-context.md +0 -71
  264. package/src/adapters/cursor/.cursor/context/strategy-context.md +0 -73
  265. package/src/adapters/cursor/.cursor/context/tests-context.md +0 -89
  266. package/src/adapters/cursor/README.md +0 -283
  267. package/src/adapters/cursor/adapter.ts +0 -451
  268. package/src/adapters/doc-generator.ts +0 -331
  269. package/src/adapters/gemini/README.md +0 -97
  270. package/src/adapters/gemini/adapter.ts +0 -298
  271. package/src/adapters/generic/README.md +0 -277
  272. package/src/adapters/generic/adapter.ts +0 -359
  273. package/src/adapters/registry.yaml +0 -187
  274. /package/plugins/specweave/commands/{costs.md → specweave-costs.md} +0 -0
  275. /package/plugins/specweave/commands/{next.md → specweave-next.md} +0 -0
  276. /package/plugins/specweave/commands/{progress.md → specweave-progress.md} +0 -0
  277. /package/plugins/specweave/commands/{sync-docs.md → specweave-sync-docs.md} +0 -0
  278. /package/plugins/specweave/commands/{tdd-cycle.md → specweave-tdd-cycle.md} +0 -0
  279. /package/plugins/specweave/commands/{tdd-green.md → specweave-tdd-green.md} +0 -0
  280. /package/plugins/specweave/commands/{tdd-red.md → specweave-tdd-red.md} +0 -0
  281. /package/plugins/specweave/commands/{tdd-refactor.md → specweave-tdd-refactor.md} +0 -0
@@ -0,0 +1,508 @@
1
+ # Jira ↔ SpecWeave Concept Mapping
2
+
3
+ **Purpose**: Quick reference for mapping Jira concepts to SpecWeave architecture
4
+
5
+ **Source of Truth**: [.specweave/docs/internal/delivery/guides/tool-concept-mapping.md](../../../.specweave/docs/internal/delivery/guides/tool-concept-mapping.md)
6
+
7
+ **Last Synced**: 2025-11-04
8
+
9
+ ---
10
+
11
+ ## 🚨 CRITICAL: Agents MUST Follow This Mapping
12
+
13
+ When syncing between Jira and SpecWeave, you **MUST** use these exact mappings. Do not deviate or create custom mappings.
14
+
15
+ ---
16
+
17
+ ## Core Concept Mapping
18
+
19
+ | Jira Concept | SpecWeave Concept | Location | Mapping Rule |
20
+ |--------------|-------------------|----------|--------------|
21
+ | **Epic** | Increment | `.specweave/increments/####-{name}/` | 1 Epic = 1 Increment (1:1) |
22
+ | **Story (business)** | PRD | `.specweave/docs/internal/strategy/prd-{name}.md` | Business requirement stories |
23
+ | **Story (technical)** | RFC | `.specweave/docs/internal/architecture/rfc/####-{name}.md` | Technical design stories |
24
+ | **Task** | Task | `.specweave/increments/####-{name}/tasks.md` | Implementation tasks |
25
+ | **Subtask** | Subtask | Same as Task | Sub-items in tasks.md |
26
+ | **Bug** | Incident | `.specweave/docs/internal/operations/incidents/{id}.md` | Operational issues |
27
+ | **Sprint** | Release Plan | `.specweave/docs/internal/delivery/release-v{version}.md` | Sprint = Release iteration |
28
+ | **Component** | Module | `.specweave/docs/internal/architecture/{module}/` | Code/doc modules |
29
+ | **Label** | Tag | `metadata.json` → tags | Filtering/categorization |
30
+ | **Version** | Release | `.specweave/docs/internal/delivery/release-v{version}.md` | Release versions |
31
+
32
+ ---
33
+
34
+ ## Epic → Increment Mapping (MANDATORY 1:1)
35
+
36
+ **Rule**: **ONE Jira Epic = ONE SpecWeave Increment**
37
+
38
+ This is the **MOST CRITICAL** mapping. Never deviate from this 1:1 relationship.
39
+
40
+ **Bidirectional Link**:
41
+ ```yaml
42
+ # .specweave/increments/####-{name}/metadata.json
43
+ {
44
+ "external_ids": {
45
+ "jira": {
46
+ "epic": "PROJ-123",
47
+ "epic_url": "https://company.atlassian.net/browse/PROJ-123",
48
+ "project_key": "PROJ"
49
+ }
50
+ }
51
+ }
52
+ ```
53
+
54
+ **Example**:
55
+ ```
56
+ Jira Epic: PROJ-123 "User Authentication"
57
+
58
+ SpecWeave: .specweave/increments/0005-user-authentication/
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Story Type Detection (Context-Dependent)
64
+
65
+ **Critical Decision Tree** (use this EXACTLY):
66
+
67
+ ```
68
+ Is the story primarily a business requirement?
69
+ ├─ YES → PRD (.specweave/docs/internal/strategy/prd-{name}.md)
70
+ │ Example: "As a user, I want to log in with email so I can access my account"
71
+
72
+ └─ NO → Is it a technical design/API change?
73
+ ├─ YES → RFC (.specweave/docs/internal/architecture/rfc/####-{name}.md)
74
+ │ Example: "Design OAuth 2.0 authentication API"
75
+
76
+ └─ NO → Is it an architecture decision?
77
+ ├─ YES → ADR (.specweave/docs/internal/architecture/adr/####-{decision}.md)
78
+ │ Example: "Decide between OAuth 2.0 vs SAML"
79
+
80
+ └─ NO → Task (.specweave/increments/####-{name}/tasks.md)
81
+ Example: "Write unit tests for login endpoint"
82
+ ```
83
+
84
+ **Detection Rules** (use Jira fields):
85
+ 1. **Business Story → PRD**:
86
+ - Issue type: Story
87
+ - Labels: `business`, `requirement`, `user-story`
88
+ - Description contains: "As a user", "I want to", "so that"
89
+
90
+ 2. **Technical Story → RFC**:
91
+ - Issue type: Story
92
+ - Labels: `technical`, `design`, `api`, `architecture`
93
+ - Description contains: "Design", "Implement", "API", "Technical"
94
+
95
+ 3. **Architecture Decision → ADR**:
96
+ - Issue type: Story or Task
97
+ - Labels: `decision`, `adr`, `architecture-decision`
98
+ - Summary starts with: "Decide", "Choose", "Select", "Evaluate"
99
+
100
+ 4. **Implementation Task → Task**:
101
+ - Issue type: Task or Subtask
102
+ - No special labels
103
+ - Specific, actionable work
104
+
105
+ ---
106
+
107
+ ## Status Mapping (MUST BE EXACT)
108
+
109
+ | Jira Status | SpecWeave Status | Notes |
110
+ |-------------|------------------|-------|
111
+ | `To Do` | `planned` | Not started |
112
+ | `In Progress` | `in_progress` | Active development |
113
+ | `In Review` | `in_progress` | Code review, still in progress |
114
+ | `Done` | `completed` | Fully complete |
115
+ | `On Hold` | `on_hold` | Temporarily paused |
116
+ | `Won't Do` | `cancelled` | Decided not to do |
117
+
118
+ **Custom Statuses** (map to closest standard):
119
+ - `Backlog` → `planned`
120
+ - `Selected for Development` → `planned`
121
+ - `In Development` → `in_progress`
122
+ - `Code Review` → `in_progress`
123
+ - `Testing` → `in_progress`
124
+ - `Deployed` → `completed`
125
+ - `Rejected` → `cancelled`
126
+
127
+ ---
128
+
129
+ ## Priority Mapping
130
+
131
+ | Jira Priority | SpecWeave Priority | Description |
132
+ |---------------|-------------------|-------------|
133
+ | `Highest` | `P1` | Critical, must do now |
134
+ | `High` | `P2` | High priority |
135
+ | `Medium` | `P3` | Medium priority |
136
+ | `Low` | `P4` | Low priority, nice-to-have |
137
+ | (unset) | `P3` | Default to medium |
138
+
139
+ ---
140
+
141
+ ## Sprint → Release Plan Mapping
142
+
143
+ **Mapping Rule**: 1 Jira Sprint = 1 SpecWeave Release Plan
144
+
145
+ **Example**:
146
+ ```
147
+ Jira: Sprint 1 "Jan 1-14" (User Authentication)
148
+
149
+ SpecWeave: .specweave/docs/internal/delivery/release-v1.0.md
150
+ ```
151
+
152
+ **Release Plan Contents**:
153
+ - **What increments are included**: List of increment IDs (0005, 0006, 0007)
154
+ - **What features ship**: User-facing features (login, password reset, 2FA)
155
+ - **Testing strategy**: E2E, integration, unit test plans
156
+ - **Rollout plan**: Blue-green, canary, phased rollout
157
+ - **Rollback plan**: How to revert if issues
158
+ - **Success metrics**: DORA metrics, test coverage, uptime
159
+
160
+ ---
161
+
162
+ ## Task → Task Mapping (Direct)
163
+
164
+ **Mapping Rule**: Jira Tasks map directly to SpecWeave Tasks
165
+
166
+ **Format**:
167
+ ```markdown
168
+ # tasks.md
169
+
170
+ ## Implementation Tasks
171
+
172
+ - [ ] **T-001**: Set up OAuth 2.0 client config (Jira: PROJ-126)
173
+ - [ ] **T-002**: Implement login endpoint (Jira: PROJ-127)
174
+ - [ ] **T-003**: Write unit tests (Jira: PROJ-128)
175
+ - [ ] **T-004**: Write E2E tests (Jira: PROJ-129)
176
+ - [ ] **T-005**: Deploy to staging (Jira: PROJ-130)
177
+ ```
178
+
179
+ **Bidirectional Link**:
180
+ ```yaml
181
+ # metadata.json
182
+ {
183
+ "external_ids": {
184
+ "jira": {
185
+ "tasks": [
186
+ {"id": "T-001", "jira_key": "PROJ-126"},
187
+ {"id": "T-002", "jira_key": "PROJ-127"},
188
+ {"id": "T-003", "jira_key": "PROJ-128"}
189
+ ]
190
+ }
191
+ }
192
+ }
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Bug → Incident Mapping
198
+
199
+ **Rule**: Bugs are operational incidents, not development tasks
200
+
201
+ **Location**: `.specweave/docs/internal/operations/incidents/{id}.md`
202
+
203
+ **Why**: Bugs discovered in production are operational issues requiring postmortems, not feature work.
204
+
205
+ **Example**:
206
+ ```markdown
207
+ # Incident: Login Failures on 2025-01-20
208
+
209
+ **Incident ID**: INC-001
210
+ **Jira Bug**: PROJ-999
211
+ **Severity**: P1 (Critical)
212
+ **Status**: Resolved
213
+
214
+ ## Timeline
215
+
216
+ - 10:00 AM: Users report login failures
217
+ - 10:15 AM: On-call engineer investigates
218
+ - 10:30 AM: Root cause identified (expired SSL cert)
219
+ - 10:45 AM: SSL cert renewed
220
+ - 11:00 AM: Service restored
221
+
222
+ ## Root Cause
223
+
224
+ SSL certificate expired, causing HTTPS handshake failures.
225
+
226
+ ## Resolution
227
+
228
+ Renewed SSL cert via Let's Encrypt. Implemented automated renewal.
229
+
230
+ ## Prevention
231
+
232
+ - [ ] Set up SSL cert expiration monitoring (created Jira story PROJ-1000)
233
+ - [ ] Automate cert renewal
234
+ ```
235
+
236
+ ---
237
+
238
+ ## Component → Module Mapping
239
+
240
+ **Jira Component** maps to **SpecWeave Module** (architecture folder)
241
+
242
+ **Example**:
243
+ ```
244
+ Jira Component: "Frontend - Authentication"
245
+
246
+ SpecWeave: .specweave/docs/internal/architecture/frontend-auth/
247
+ ```
248
+
249
+ **Module Contents**:
250
+ - HLD (High-Level Design)
251
+ - Component diagrams
252
+ - API contracts
253
+ - Data models
254
+
255
+ ---
256
+
257
+ ## Sync Scenarios (Step-by-Step)
258
+
259
+ ### Scenario 1: New Jira Epic Created
260
+
261
+ **What Happens**:
262
+ 1. Jira webhook fires: "Epic PROJ-123 created"
263
+ 2. SpecWeave receives webhook
264
+ 3. SpecWeave creates new increment:
265
+ ```bash
266
+ .specweave/increments/0001-user-authentication/
267
+ ├── metadata.json # external_ids.jira.epic = PROJ-123
268
+ ├── spec.md
269
+ ├── plan.md
270
+ └── tasks.md
271
+ ```
272
+ 4. SpecWeave creates PRD stub:
273
+ ```bash
274
+ .specweave/docs/internal/strategy/prd-user-authentication.md
275
+ ```
276
+ 5. SpecWeave logs sync in `.specweave/logs/jira-sync.json`
277
+
278
+ ### Scenario 2: Jira Epic Status Changed
279
+
280
+ **What Happens**:
281
+ 1. Jira webhook: "Epic PROJ-123 status changed to In Progress"
282
+ 2. SpecWeave receives webhook
283
+ 3. SpecWeave updates `metadata.json`:
284
+ ```json
285
+ {
286
+ "status": "in_progress",
287
+ "started": "2025-01-20T10:00:00Z",
288
+ "updated": "2025-01-20T10:00:00Z"
289
+ }
290
+ ```
291
+ 4. SpecWeave commits change: `sync: Epic PROJ-123 status → in_progress`
292
+
293
+ ### Scenario 3: New Story Added to Epic
294
+
295
+ **What Happens**:
296
+ 1. Jira: Story PROJ-124 created, linked to Epic PROJ-123
297
+ 2. SpecWeave receives webhook
298
+ 3. SpecWeave analyzes story:
299
+ - Is it business requirement? → Create PRD
300
+ - Is it technical design? → Create RFC
301
+ 4. SpecWeave updates `metadata.json`:
302
+ ```json
303
+ {
304
+ "external_ids": {
305
+ "jira": {
306
+ "stories": ["PROJ-124"]
307
+ }
308
+ },
309
+ "docs": {
310
+ "prd": ".specweave/docs/internal/strategy/prd-user-authentication.md"
311
+ }
312
+ }
313
+ ```
314
+
315
+ ### Scenario 4: SpecWeave ADR Created → Sync to Jira
316
+
317
+ **What Happens**:
318
+ 1. Developer creates ADR locally:
319
+ ```bash
320
+ .specweave/docs/internal/architecture/adr/0001-use-oauth2.md
321
+ ```
322
+ 2. Developer commits and pushes
323
+ 3. SpecWeave post-commit hook detects new ADR
324
+ 4. SpecWeave finds related increment (via `metadata.json` → docs.adrs)
325
+ 5. SpecWeave creates Jira story:
326
+ - Title: "ADR 0001: Use OAuth 2.0"
327
+ - Type: Story
328
+ - Parent: Epic PROJ-123
329
+ - Link: URL to ADR in repo
330
+ 6. SpecWeave updates `metadata.json`:
331
+ ```json
332
+ {
333
+ "external_ids": {
334
+ "jira": {
335
+ "stories": ["PROJ-124", "PROJ-131"]
336
+ }
337
+ },
338
+ "docs": {
339
+ "adrs": [
340
+ ".specweave/docs/internal/architecture/adr/0001-use-oauth2.md"
341
+ ]
342
+ }
343
+ }
344
+ ```
345
+
346
+ ---
347
+
348
+ ## Conflict Resolution
349
+
350
+ ### Conflict: Both Jira and SpecWeave Changed Status
351
+
352
+ **Scenario**:
353
+ - Jira Epic PROJ-123: Status changed from "In Progress" → "Done" (at 10:00 AM)
354
+ - SpecWeave Increment 0001: Status changed from "in_progress" → "on_hold" (at 10:05 AM)
355
+ - Last sync: 9:00 AM
356
+
357
+ **Detection**:
358
+ - Sync runs at 10:15 AM
359
+ - Finds both changed since last sync
360
+
361
+ **Resolution Options**:
362
+
363
+ 1. **Prompt User** (default):
364
+ ```
365
+ Conflict detected for increment 0001-user-authentication:
366
+ - Jira Epic PROJ-123: Done (changed at 10:00 AM)
367
+ - SpecWeave: on_hold (changed at 10:05 AM)
368
+
369
+ Which version to keep?
370
+ 1) Use Jira (Done)
371
+ 2) Use SpecWeave (on_hold)
372
+ 3) Merge manually
373
+ ```
374
+
375
+ 2. **Auto-Resolve (configured)**:
376
+ - SpecWeave wins (local is source of truth)
377
+ - Jira wins (team collaboration via Jira)
378
+
379
+ 3. **Log Conflict**:
380
+ ```json
381
+ // .specweave/logs/jira-sync.json
382
+ {
383
+ "conflicts": [
384
+ {
385
+ "increment": "0001",
386
+ "field": "status",
387
+ "jira_value": "Done",
388
+ "specweave_value": "on_hold",
389
+ "timestamp": "2025-01-20T10:15:00Z",
390
+ "resolution": "manual",
391
+ "resolved_by": "@john-doe",
392
+ "resolved_at": "2025-01-20T10:20:00Z",
393
+ "final_value": "on_hold"
394
+ }
395
+ ]
396
+ }
397
+ ```
398
+
399
+ ---
400
+
401
+ ## Traceability Examples
402
+
403
+ ### Example 1: From Jira Epic to Code
404
+
405
+ **Start**: Jira Epic PROJ-123 "User Authentication"
406
+
407
+ **Trace** (`specweave trace --jira PROJ-123`):
408
+ ```
409
+ Jira Epic: PROJ-123 "User Authentication"
410
+
411
+ SpecWeave Increment: 0001-user-authentication
412
+
413
+ PRD: .specweave/docs/internal/strategy/prd-user-authentication.md
414
+ (Jira Story: PROJ-124)
415
+
416
+ HLD: .specweave/docs/internal/architecture/hld-user-authentication.md
417
+
418
+ ADR: .specweave/docs/internal/architecture/adr/0001-use-oauth2.md
419
+ (Jira Story: PROJ-131)
420
+ ADR: .specweave/docs/internal/architecture/adr/0002-use-auth0.md
421
+ (Jira Story: PROJ-132)
422
+
423
+ RFC: .specweave/docs/internal/architecture/rfc/0001-auth-api.md
424
+ (Jira Story: PROJ-125)
425
+
426
+ Code: src/services/auth/
427
+
428
+ Tests: tests/e2e/auth.spec.ts
429
+
430
+ Runbook: .specweave/docs/internal/operations/runbook-auth-service.md
431
+ ```
432
+
433
+ ### Example 2: From Code to Jira Epic
434
+
435
+ **Start**: Code file `src/services/auth/oauth.ts`
436
+
437
+ **Trace** (`specweave trace --file src/services/auth/oauth.ts`):
438
+ ```
439
+ File: src/services/auth/oauth.ts
440
+
441
+ Increment: 0001-user-authentication
442
+
443
+ Jira Epic: PROJ-123 "User Authentication"
444
+ URL: https://company.atlassian.net/browse/PROJ-123
445
+
446
+ PRD: .specweave/docs/internal/strategy/prd-user-authentication.md
447
+ HLD: .specweave/docs/internal/architecture/hld-user-authentication.md
448
+ ADRs:
449
+ - 0001-use-oauth2.md (Jira: PROJ-131)
450
+ - 0002-use-auth0.md (Jira: PROJ-132)
451
+ RFCs:
452
+ - 0001-auth-api.md (Jira: PROJ-125)
453
+ ```
454
+
455
+ ---
456
+
457
+ ## Validation Checklist
458
+
459
+ **Before syncing, verify**:
460
+ - [ ] Jira Epic exists and is accessible
461
+ - [ ] Increment metadata has valid Jira link
462
+ - [ ] Status mapping follows rules above (no custom mappings)
463
+ - [ ] Priority mapped correctly (P1/P2/P3/P4)
464
+ - [ ] Story type detection used decision tree (PRD vs RFC vs ADR vs Task)
465
+ - [ ] Bidirectional links are valid (Epic ↔ Increment)
466
+ - [ ] Task IDs match between Jira and SpecWeave
467
+ - [ ] Conflicts resolved (if any)
468
+
469
+ ---
470
+
471
+ ## Security: Jira API Token
472
+
473
+ **Required**:
474
+ - Jira API Token (from https://id.atlassian.com/manage-profile/security/api-tokens)
475
+ - Jira Email
476
+ - Jira Domain (e.g., company.atlassian.net)
477
+
478
+ **Storage**:
479
+ ```bash
480
+ # .env (gitignored)
481
+ JIRA_API_TOKEN=your-token-here
482
+ JIRA_EMAIL=your-email@example.com
483
+ JIRA_DOMAIN=company.atlassian.net
484
+ ```
485
+
486
+ **Authentication**:
487
+ ```bash
488
+ # Basic Auth: base64(email:token)
489
+ AUTH=$(echo -n "$JIRA_EMAIL:$JIRA_API_TOKEN" | base64)
490
+ ```
491
+
492
+ **Never**:
493
+ - ❌ Log or commit API token
494
+ - ❌ Share token via Slack/email
495
+ - ❌ Use token with excessive permissions
496
+
497
+ ---
498
+
499
+ ## Related Documentation
500
+
501
+ - **Full Mapping Guide**: [.specweave/docs/internal/delivery/guides/tool-concept-mapping.md](../../../.specweave/docs/internal/delivery/guides/tool-concept-mapping.md)
502
+ - **Jira Sync Skill**: [../skills/jira-sync/SKILL.md](../skills/jira-sync/SKILL.md)
503
+
504
+ ---
505
+
506
+ **Last Updated**: 2025-11-04
507
+ **Version**: 1.0.0
508
+ **Plugin**: specweave-jira
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: ml:deploy
2
+ name: ml-deploy
3
3
  description: Generate deployment artifacts (API, Docker, monitoring)
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: ml:evaluate
2
+ name: ml-evaluate
3
3
  description: Evaluate ML model with comprehensive metrics
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: ml:explain
2
+ name: ml-explain
3
3
  description: Generate model explainability reports (SHAP, LIME, feature importance)
4
4
  ---
5
5
 
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: ml-pipeline
3
+ description: Design and implement a complete ML pipeline with multi-agent MLOps orchestration
4
+ ---
5
+
1
6
  # Machine Learning Pipeline - Multi-Agent MLOps Orchestration
2
7
 
3
8
  Design and implement a complete ML pipeline for: $ARGUMENTS