specweave 0.6.8 → 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 (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 +90 -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
@@ -49,6 +49,55 @@ As the GitHub Manager agent, I specialize in:
49
49
 
50
50
  ---
51
51
 
52
+ ## 🚨 CRITICAL: Concept Mapping (MANDATORY)
53
+
54
+ **BEFORE any sync operation, you MUST**:
55
+
56
+ 1. **Read the Mapping Reference**: [reference/github-specweave-mapping.md](../../reference/github-specweave-mapping.md)
57
+ 2. **Follow mapping rules EXACTLY** - No custom mappings allowed
58
+ 3. **Validate mappings after sync** - Ensure bidirectional links are correct
59
+
60
+ **Key Mapping Rules** (Quick Reference):
61
+
62
+ | GitHub | SpecWeave | Rule |
63
+ |--------|-----------|------|
64
+ | Milestone | Release Plan | 1:1 mapping |
65
+ | Issue (feature) | RFC | Feature request = Technical RFC |
66
+ | Issue (bug) | Incident | Bug = Operational incident |
67
+ | Issue (task) | Task | Implementation task |
68
+ | PR | Implementation | PR references increment/task |
69
+ | open (no assignee) | planned | Not started |
70
+ | open (assigned) | in_progress | Active work |
71
+ | closed (completed) | completed | Successfully delivered |
72
+ | closed (not planned) | cancelled | Won't do |
73
+
74
+ **Source of Truth**: [.specweave/docs/internal/delivery/guides/tool-concept-mapping.md](../../../.specweave/docs/internal/delivery/guides/tool-concept-mapping.md)
75
+
76
+ **Validation Checklist** (Run BEFORE and AFTER every sync):
77
+ - [ ] GitHub issue exists and is accessible
78
+ - [ ] Increment metadata has valid GitHub link (`github.issue_number`)
79
+ - [ ] Status mapped correctly (use status mapping table)
80
+ - [ ] Priority mapped correctly (P1/P2/P3/P4 labels)
81
+ - [ ] Labels follow SpecWeave conventions (`specweave`, `increment`, priority)
82
+ - [ ] Comments include increment context
83
+ - [ ] Bidirectional links are valid (Issue ↔ Increment)
84
+
85
+ **Example Workflow** (MUST follow this pattern):
86
+
87
+ ```
88
+ 1. Read mapping reference (MANDATORY first step)
89
+ 2. Read increment files (spec.md, tasks.md, metadata.json)
90
+ 3. Apply mapping rules to convert SpecWeave → GitHub
91
+ 4. Create/update GitHub issue via gh CLI
92
+ 5. Validate mapping (check bidirectional links)
93
+ 6. Update increment metadata with GitHub issue details
94
+ 7. Report success/failure to user
95
+ ```
96
+
97
+ **If mapping rules are unclear**, STOP and ask the user. Never guess or create custom mappings.
98
+
99
+ ---
100
+
52
101
  ## When to Use This Agent
53
102
 
54
103
  Invoke the github-manager agent (via Task tool) for:
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: specweave.github.close-issue
2
+ name: close-issue
3
3
  description: Close GitHub issue for completed SpecWeave increment. Posts completion summary with final stats, deliverables, and closes the issue. Links closure in increment metadata.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: specweave.github.create-issue
2
+ name: create-issue
3
3
  description: Create a GitHub issue for a SpecWeave increment. Generates issue from increment specs with task checklist, labels, and milestone. Links issue to increment metadata.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: specweave.github.status
2
+ name: status
3
3
  description: Check GitHub sync status for SpecWeave increment. Shows issue number, sync state, progress, last update, and any sync issues. Useful for troubleshooting and monitoring.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: github-sync-tasks
2
+ name: sync-tasks
3
3
  description: Sync SpecWeave increment tasks to GitHub issues (task-level granularity). Creates milestone, epic issue, and individual issues for each task.
4
4
  ---
5
5
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: specweave.github.sync
2
+ name: sync
3
3
  description: Synchronize SpecWeave increment with GitHub issue. Updates issue with current progress, task checklist, labels, and comments. Bidirectional sync available.
4
4
  ---
5
5
 
@@ -0,0 +1,377 @@
1
+ # GitHub ↔ SpecWeave Concept Mapping
2
+
3
+ **Purpose**: Quick reference for mapping GitHub 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 GitHub and SpecWeave, you **MUST** use these exact mappings. Do not deviate or create custom mappings.
14
+
15
+ ---
16
+
17
+ ## Core Concept Mapping
18
+
19
+ | GitHub Concept | SpecWeave Concept | Location | Mapping Rule |
20
+ |----------------|-------------------|----------|--------------|
21
+ | **Milestone** | Release Plan | `.specweave/docs/internal/delivery/release-v{version}.md` | 1 Milestone = 1 Release Plan |
22
+ | **Project** | Increment or Release | Context-dependent | Board scope determines mapping |
23
+ | **Issue (feature)** | RFC | `.specweave/docs/internal/architecture/rfc/####-{name}.md` | Feature request = Technical RFC |
24
+ | **Issue (bug)** | Incident | `.specweave/docs/internal/operations/incidents/{id}.md` | Bug = Operational incident |
25
+ | **Issue (task)** | Task | `.specweave/increments/####-{name}/tasks.md` | Implementation task |
26
+ | **Pull Request** | Implementation | Code + increment link | PR references increment/task |
27
+ | **Label** | Tag | `metadata.json` → tags | Filtering/categorization |
28
+ | **Assignee** | Owner | Task ownership | Person responsible |
29
+ | **Comment** | Progress Update | Task notes, discussions | Async collaboration |
30
+
31
+ ---
32
+
33
+ ## Status Mapping (MUST BE EXACT)
34
+
35
+ | GitHub State | SpecWeave Status | Notes |
36
+ |--------------|------------------|-------|
37
+ | `open` (no assignee) | `planned` | Not started, no owner |
38
+ | `open` (with assignee) | `in_progress` | Active development |
39
+ | `closed` (completed) | `completed` | Successfully delivered |
40
+ | `closed` (not planned) | `cancelled` | Won't do, out of scope |
41
+
42
+ **Rule**: Check assignee and close reason to determine SpecWeave status
43
+
44
+ ---
45
+
46
+ ## Priority Mapping
47
+
48
+ | GitHub Label | SpecWeave Priority | Description |
49
+ |--------------|-------------------|-------------|
50
+ | `priority: critical` | `P1` | Critical, must do now |
51
+ | `priority: high` | `P2` | High priority |
52
+ | `priority: medium` | `P3` | Medium priority |
53
+ | `priority: low` | `P4` | Low priority, nice-to-have |
54
+ | (no label) | `P3` | Default to medium |
55
+
56
+ ---
57
+
58
+ ## Issue Type Detection
59
+
60
+ **How to classify GitHub issues** (use labels, title prefixes, or body content):
61
+
62
+ ```
63
+ Is the issue...
64
+ ├─ A new feature request?
65
+ │ → Create RFC: .specweave/docs/internal/architecture/rfc/####-{name}.md
66
+
67
+ ├─ A bug/incident?
68
+ │ → Create Incident: .specweave/docs/internal/operations/incidents/{id}.md
69
+
70
+ ├─ An implementation task?
71
+ │ → Add to tasks.md: .specweave/increments/####-{name}/tasks.md
72
+
73
+ └─ An architecture decision?
74
+ → Create ADR: .specweave/docs/internal/architecture/adr/####-{decision}.md
75
+ ```
76
+
77
+ **Detection Rules**:
78
+ 1. **Feature Request**: Labels include `enhancement`, `feature`, OR title starts with `[Feature]`, `[RFC]`
79
+ 2. **Bug/Incident**: Labels include `bug`, `incident`, OR title starts with `[Bug]`, `[Incident]`
80
+ 3. **Task**: Labels include `task`, `chore`, OR title starts with `[Task]`, `T-###`
81
+ 4. **ADR**: Title starts with `[ADR]`, `[Decision]`, OR body contains "We need to decide"
82
+
83
+ ---
84
+
85
+ ## Milestone → Release Plan Mapping
86
+
87
+ **Mapping Rule**: 1 GitHub Milestone = 1 SpecWeave Release Plan
88
+
89
+ **Example**:
90
+ ```
91
+ GitHub: Milestone "v1.0 - User Authentication" (Due: Jan 31)
92
+
93
+ SpecWeave: .specweave/docs/internal/delivery/release-v1.0.md
94
+ ```
95
+
96
+ **Release Plan Contents**:
97
+ - What increments are included (list of increment IDs)
98
+ - What features ship (user-facing)
99
+ - Testing strategy (E2E, integration, unit)
100
+ - Rollout plan (blue-green, canary, phased)
101
+ - Rollback plan (how to revert if issues)
102
+ - Success metrics (DORA, test coverage, uptime)
103
+
104
+ ---
105
+
106
+ ## Issue → Increment Mapping
107
+
108
+ **Use Case**: Import GitHub issue as SpecWeave increment
109
+
110
+ **Mapping Logic**:
111
+ 1. **Read GitHub Issue**:
112
+ - Title → Increment title
113
+ - Body → Spec.md executive summary
114
+ - Labels → Priority (P1/P2/P3/P4)
115
+ - Assignee → Increment owner
116
+
117
+ 2. **Create Increment**:
118
+ ```bash
119
+ .specweave/increments/####-{kebab-case-title}/
120
+ ├── spec.md # From issue body
121
+ ├── plan.md # Generated by architect agent
122
+ ├── tasks.md # Parsed from issue checklist OR generated
123
+ └── metadata.json # Links back to GitHub issue
124
+ ```
125
+
126
+ 3. **Store Bidirectional Link**:
127
+ ```json
128
+ {
129
+ "github": {
130
+ "issue_number": 123,
131
+ "issue_url": "https://github.com/owner/repo/issues/123",
132
+ "milestone": "v1.0",
133
+ "labels": ["enhancement", "P1"],
134
+ "synced_at": "2025-11-04T10:30:00Z"
135
+ }
136
+ }
137
+ ```
138
+
139
+ ---
140
+
141
+ ## Pull Request → Task Linking
142
+
143
+ **Mapping Rule**: Each PR should reference the increment and task it implements
144
+
145
+ **PR Title Format**:
146
+ ```
147
+ T-007: Implement Claude plugin installer (#130)
148
+ ```
149
+
150
+ **PR Body Template**:
151
+ ```markdown
152
+ ## Increment
153
+
154
+ Implements: #130 (Increment 0004: Plugin Architecture)
155
+ Task: T-007 - Implement Claude plugin installer
156
+
157
+ ## Changes
158
+
159
+ - Added plugin installer CLI
160
+ - Updated plugin loader to auto-install core plugin
161
+ - Added tests for installer
162
+
163
+ ## Testing
164
+
165
+ - ✅ Unit tests: `npm test src/cli/install.test.ts`
166
+ - ✅ E2E tests: `npm run test:e2e`
167
+
168
+ ## Checklist
169
+
170
+ - [x] Tests pass
171
+ - [x] Documentation updated
172
+ - [x] CHANGELOG.md updated
173
+ - [x] Increment metadata updated
174
+
175
+ Closes #130 (when all tasks done)
176
+ ```
177
+
178
+ **Linking Rules**:
179
+ - PR title starts with `T-###:` (task ID)
180
+ - PR body includes `Implements: #issue-number`
181
+ - Use `Closes #issue-number` ONLY when increment is 100% complete
182
+
183
+ ---
184
+
185
+ ## Comment → Progress Update Mapping
186
+
187
+ **Trigger**: After task completion (post-task-completion hook)
188
+
189
+ **Format** (posted to GitHub issue):
190
+ ```markdown
191
+ ## Progress Update
192
+
193
+ **Increment**: 0004-plugin-architecture
194
+ **Status**: 15% complete (7/48 tasks)
195
+ **Last Updated**: 2025-11-04 10:30:00
196
+
197
+ ### Recently Completed
198
+ - [x] T-007: Implement Claude plugin installer
199
+
200
+ ### Next Up
201
+ - [ ] T-008: Add plugin validation
202
+ - [ ] T-009: Test plugin loading
203
+
204
+ ### Files Changed
205
+ - `src/cli/install.ts` (+127 lines)
206
+ - `src/core/plugin-loader.ts` (+45 lines)
207
+ - `tests/integration/install.test.ts` (+89 lines)
208
+
209
+ ---
210
+ 🤖 Auto-updated by SpecWeave GitHub Plugin
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Label Conventions
216
+
217
+ **SpecWeave Standard Labels** (auto-add these):
218
+ - `specweave` - All SpecWeave-synced issues
219
+ - `increment` - Increment tracking issue
220
+ - `P1`, `P2`, `P3`, `P4` - Priority labels
221
+ - `in-progress` - Active development
222
+ - `testing` - Implementation done, testing phase
223
+ - `ready-for-review` - All tasks complete, awaiting review
224
+ - `blocked` - Blocked by external dependency
225
+
226
+ **Project-Specific Labels** (respect existing):
227
+ - Keep existing labels (don't remove them)
228
+ - Add SpecWeave labels (don't replace)
229
+ - Example: Issue has `frontend` + `enhancement` → Add `specweave` + `P2`
230
+
231
+ ---
232
+
233
+ ## Conflict Resolution Rules
234
+
235
+ **Scenario**: Both GitHub issue and SpecWeave increment changed
236
+
237
+ **Resolution Priority** (Source of Truth):
238
+ 1. **Status changes** → SpecWeave wins (local is source of truth)
239
+ 2. **Content changes** → GitHub wins (team collaboration via GitHub)
240
+ 3. **Task completion** → SpecWeave wins (local task tracking)
241
+ 4. **Assignee changes** → GitHub wins (team management via GitHub)
242
+
243
+ **Conflict Handling**:
244
+ ```
245
+ IF GitHub issue closed BUT SpecWeave increment not done
246
+ → Prompt user: "GitHub issue closed but increment not complete. Action?"
247
+ 1) Close increment (trust GitHub)
248
+ 2) Reopen issue (trust SpecWeave)
249
+ 3) Manual resolution
250
+
251
+ IF SpecWeave increment done BUT GitHub issue still open
252
+ → Auto-close GitHub issue (SpecWeave is source of truth for completion)
253
+
254
+ IF Both changed status simultaneously
255
+ → Log conflict, prompt user for resolution
256
+ ```
257
+
258
+ ---
259
+
260
+ ## Examples
261
+
262
+ ### Example 1: Import GitHub Issue as Increment
263
+
264
+ **GitHub Issue #123**:
265
+ ```
266
+ Title: Add user authentication with OAuth2
267
+ Labels: enhancement, P1
268
+ Body: We need OAuth2 authentication with Google and GitHub providers...
269
+ ```
270
+
271
+ **SpecWeave Result**:
272
+ ```
273
+ .specweave/increments/0005-user-authentication/
274
+ ├── spec.md # "Add user authentication with OAuth2"
275
+ ├── plan.md # Architect generates implementation plan
276
+ ├── tasks.md # PM generates 12 tasks
277
+ └── metadata.json # Links to GitHub issue #123
278
+ ```
279
+
280
+ ### Example 2: Sync Task Completion to GitHub
281
+
282
+ **SpecWeave**: Complete T-007 (7/48 tasks, 15%)
283
+
284
+ **GitHub**: Post comment to issue #130:
285
+ ```markdown
286
+ ## Progress Update
287
+ **Status**: 15% complete (7/48 tasks)
288
+
289
+ ### Recently Completed
290
+ - [x] T-007: Implement Claude plugin installer
291
+
292
+ ---
293
+ 🤖 Auto-updated by SpecWeave
294
+ ```
295
+
296
+ ### Example 3: Close Increment → Close Issue
297
+
298
+ **SpecWeave**: `/specweave:done 0004` (all 48 tasks complete)
299
+
300
+ **GitHub**: Close issue #130 with comment:
301
+ ```markdown
302
+ ✅ **Increment Completed**
303
+
304
+ **Final Stats**:
305
+ - 48/48 tasks completed (100%)
306
+ - 127 test cases passing
307
+ - Duration: 4 weeks
308
+
309
+ **Deliverables**:
310
+ - Plugin architecture implemented
311
+ - 15 plugins migrated
312
+ - Documentation updated
313
+
314
+ Closing this issue as the increment is complete.
315
+
316
+ ---
317
+ 🤖 Auto-closed by SpecWeave
318
+ ```
319
+
320
+ ---
321
+
322
+ ## Traceability
323
+
324
+ **From GitHub Issue to Code**:
325
+ ```
326
+ GitHub Issue #123 "User Authentication"
327
+
328
+ SpecWeave Increment: 0005-user-authentication
329
+
330
+ spec.md → plan.md → tasks.md
331
+
332
+ Code: src/services/auth/
333
+
334
+ Tests: tests/e2e/auth.spec.ts
335
+
336
+ Pull Requests: #45, #46, #47
337
+
338
+ Deployment: production
339
+ ```
340
+
341
+ **From Code to GitHub Issue**:
342
+ ```
343
+ File: src/services/auth/oauth.ts
344
+
345
+ Increment: 0005-user-authentication (via git blame or folder structure)
346
+
347
+ GitHub Issue: #123 (via metadata.json)
348
+
349
+ Milestone: v1.0 (release plan)
350
+ ```
351
+
352
+ ---
353
+
354
+ ## Validation Checklist
355
+
356
+ **Before syncing, verify**:
357
+ - [ ] GitHub issue exists and is accessible
358
+ - [ ] Increment metadata has valid GitHub link
359
+ - [ ] Status mapping follows rules above (no custom mappings)
360
+ - [ ] Priority mapped correctly (P1/P2/P3/P4)
361
+ - [ ] Labels follow SpecWeave conventions
362
+ - [ ] Comments include increment context
363
+ - [ ] Bidirectional links are valid
364
+
365
+ ---
366
+
367
+ ## Related Documentation
368
+
369
+ - **Full Mapping Guide**: [.specweave/docs/internal/delivery/guides/tool-concept-mapping.md](../../../.specweave/docs/internal/delivery/guides/tool-concept-mapping.md)
370
+ - **GitHub Sync Skill**: [../skills/github-sync/SKILL.md](../skills/github-sync/SKILL.md)
371
+ - **GitHub Manager Agent**: [../agents/github-manager/AGENT.md](../agents/github-manager/AGENT.md)
372
+
373
+ ---
374
+
375
+ **Last Updated**: 2025-11-04
376
+ **Version**: 1.0.0
377
+ **Plugin**: specweave-github
@@ -76,10 +76,16 @@ This issue tracks SpecWeave increment `0004-plugin-architecture`.
76
76
 
77
77
  ### 2. Progress Updates (Increment → Issue)
78
78
 
79
- **Trigger**: After each `/specweave:do` task completion
79
+ **Trigger**: After each `/specweave:do` task completion (via post-task-completion hook)
80
80
 
81
81
  **Actions**:
82
- 1. Post comment to GitHub issue:
82
+ 1. **Update issue description** (v0.7.0+):
83
+ - Updates task checklist in issue body
84
+ - Marks completed tasks with `[x]`
85
+ - Updates progress bars
86
+ - Keeps issue description synchronized
87
+
88
+ 2. Post comment to GitHub issue:
83
89
  ```markdown
84
90
  **Task Completed**: T-007 - Implement Claude plugin installer
85
91
 
@@ -90,11 +96,13 @@ This issue tracks SpecWeave increment `0004-plugin-architecture`.
90
96
  🤖 Auto-updated by SpecWeave
91
97
  ```
92
98
 
93
- 2. Update issue labels:
99
+ 3. Update issue labels:
94
100
  - Add `in-progress` label when first task starts
95
101
  - Add `testing` label when implementation phase completes
96
102
  - Add `ready-for-review` label when all tasks done
97
103
 
104
+ **Note**: As of v0.7.0+, the post-task-completion hook automatically uses `--tasks` flag to update both the issue description AND add comments. This ensures the main issue stays in sync with increment progress.
105
+
98
106
  ### 3. Increment Completion (Close Issue)
99
107
 
100
108
  **Trigger**: `/specweave:done` closes increment
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: monitor-setup
3
+ description: Set up comprehensive monitoring and observability with Prometheus, Grafana, distributed tracing, and log aggregation
4
+ ---
5
+
1
6
  # Monitoring and Observability Setup
2
7
 
3
8
  You are a monitoring and observability expert specializing in implementing comprehensive monitoring solutions. Set up metrics collection, distributed tracing, log aggregation, and create insightful dashboards that provide full visibility into system health and performance.
@@ -1,3 +1,8 @@
1
+ ---
2
+ name: slo-implement
3
+ description: Implement Service Level Objectives (SLOs) with reliability standards, SLIs, and error budget-based engineering practices
4
+ ---
5
+
1
6
  # SLO Implementation Guide
2
7
 
3
8
  You are an SLO (Service Level Objective) expert specializing in implementing reliability standards and error budget-based engineering practices. Design comprehensive SLO frameworks, establish meaningful SLIs, and create monitoring systems that balance reliability with feature velocity.