specweave 1.0.234 → 1.0.238

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 (240) hide show
  1. package/CLAUDE.md +217 -74
  2. package/README.md +89 -193
  3. package/dist/plugins/specweave-github/lib/github-ac-comment-poster.d.ts +37 -0
  4. package/dist/plugins/specweave-github/lib/github-ac-comment-poster.d.ts.map +1 -0
  5. package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js +176 -0
  6. package/dist/plugins/specweave-github/lib/github-ac-comment-poster.js.map +1 -0
  7. package/dist/plugins/specweave-github/lib/github-batch-sync.d.ts +36 -0
  8. package/dist/plugins/specweave-github/lib/github-batch-sync.d.ts.map +1 -0
  9. package/dist/plugins/specweave-github/lib/github-batch-sync.js +115 -0
  10. package/dist/plugins/specweave-github/lib/github-batch-sync.js.map +1 -0
  11. package/dist/plugins/specweave-github/lib/github-board-resolver-v2.d.ts +37 -0
  12. package/dist/plugins/specweave-github/lib/github-board-resolver-v2.d.ts.map +1 -0
  13. package/dist/plugins/specweave-github/lib/github-board-resolver-v2.js +56 -0
  14. package/dist/plugins/specweave-github/lib/github-board-resolver-v2.js.map +1 -0
  15. package/dist/plugins/specweave-github/lib/github-conflict-resolver.d.ts +68 -0
  16. package/dist/plugins/specweave-github/lib/github-conflict-resolver.d.ts.map +1 -0
  17. package/dist/plugins/specweave-github/lib/github-conflict-resolver.js +102 -0
  18. package/dist/plugins/specweave-github/lib/github-conflict-resolver.js.map +1 -0
  19. package/dist/plugins/specweave-github/lib/github-cross-repo-sync.d.ts +64 -0
  20. package/dist/plugins/specweave-github/lib/github-cross-repo-sync.d.ts.map +1 -0
  21. package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js +162 -0
  22. package/dist/plugins/specweave-github/lib/github-cross-repo-sync.js.map +1 -0
  23. package/dist/plugins/specweave-github/lib/github-field-sync.d.ts +50 -0
  24. package/dist/plugins/specweave-github/lib/github-field-sync.d.ts.map +1 -0
  25. package/dist/plugins/specweave-github/lib/github-field-sync.js +107 -0
  26. package/dist/plugins/specweave-github/lib/github-field-sync.js.map +1 -0
  27. package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts +53 -0
  28. package/dist/plugins/specweave-github/lib/github-graphql-client.d.ts.map +1 -0
  29. package/dist/plugins/specweave-github/lib/github-graphql-client.js +138 -0
  30. package/dist/plugins/specweave-github/lib/github-graphql-client.js.map +1 -0
  31. package/dist/plugins/specweave-github/lib/github-issue-body-generator.d.ts +40 -0
  32. package/dist/plugins/specweave-github/lib/github-issue-body-generator.d.ts.map +1 -0
  33. package/dist/plugins/specweave-github/lib/github-issue-body-generator.js +50 -0
  34. package/dist/plugins/specweave-github/lib/github-issue-body-generator.js.map +1 -0
  35. package/dist/plugins/specweave-github/lib/github-issue-body-parser.d.ts +30 -0
  36. package/dist/plugins/specweave-github/lib/github-issue-body-parser.d.ts.map +1 -0
  37. package/dist/plugins/specweave-github/lib/github-issue-body-parser.js +75 -0
  38. package/dist/plugins/specweave-github/lib/github-issue-body-parser.js.map +1 -0
  39. package/dist/plugins/specweave-github/lib/github-pull-sync.d.ts +94 -0
  40. package/dist/plugins/specweave-github/lib/github-pull-sync.d.ts.map +1 -0
  41. package/dist/plugins/specweave-github/lib/github-pull-sync.js +232 -0
  42. package/dist/plugins/specweave-github/lib/github-pull-sync.js.map +1 -0
  43. package/dist/plugins/specweave-github/lib/github-push-sync.d.ts +50 -0
  44. package/dist/plugins/specweave-github/lib/github-push-sync.d.ts.map +1 -0
  45. package/dist/plugins/specweave-github/lib/github-push-sync.js +114 -0
  46. package/dist/plugins/specweave-github/lib/github-push-sync.js.map +1 -0
  47. package/dist/plugins/specweave-github/lib/github-rate-limiter.d.ts +53 -0
  48. package/dist/plugins/specweave-github/lib/github-rate-limiter.d.ts.map +1 -0
  49. package/dist/plugins/specweave-github/lib/github-rate-limiter.js +109 -0
  50. package/dist/plugins/specweave-github/lib/github-rate-limiter.js.map +1 -0
  51. package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.d.ts +21 -0
  52. package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.d.ts.map +1 -0
  53. package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +161 -0
  54. package/dist/plugins/specweave-github/lib/github-spec-frontmatter-updater.js.map +1 -0
  55. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts +46 -0
  56. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.d.ts.map +1 -0
  57. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js +99 -0
  58. package/dist/plugins/specweave-github/lib/github-sync-orchestrator.js.map +1 -0
  59. package/dist/plugins/specweave-github/lib/github-us-auto-closer.d.ts +43 -0
  60. package/dist/plugins/specweave-github/lib/github-us-auto-closer.d.ts.map +1 -0
  61. package/dist/plugins/specweave-github/lib/github-us-auto-closer.js +153 -0
  62. package/dist/plugins/specweave-github/lib/github-us-auto-closer.js.map +1 -0
  63. package/dist/plugins/specweave-github/lib/index.d.ts +1 -4
  64. package/dist/plugins/specweave-github/lib/index.d.ts.map +1 -1
  65. package/dist/plugins/specweave-github/lib/index.js +1 -4
  66. package/dist/plugins/specweave-github/lib/index.js.map +1 -1
  67. package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts +7 -0
  68. package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts.map +1 -0
  69. package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.js +15 -0
  70. package/dist/plugins/specweave-testing/lib/playwright-ci-defaults.js.map +1 -0
  71. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts +10 -0
  72. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.d.ts.map +1 -0
  73. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js +36 -0
  74. package/dist/plugins/specweave-testing/lib/playwright-cli-detector.js.map +1 -0
  75. package/dist/plugins/specweave-testing/lib/playwright-cli-runner.d.ts +25 -0
  76. package/dist/plugins/specweave-testing/lib/playwright-cli-runner.d.ts.map +1 -0
  77. package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js +57 -0
  78. package/dist/plugins/specweave-testing/lib/playwright-cli-runner.js.map +1 -0
  79. package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts +7 -0
  80. package/dist/plugins/specweave-testing/lib/playwright-routing.d.ts.map +1 -0
  81. package/dist/plugins/specweave-testing/lib/playwright-routing.js +17 -0
  82. package/dist/plugins/specweave-testing/lib/playwright-routing.js.map +1 -0
  83. package/dist/src/cli/commands/lsp.d.ts.map +1 -1
  84. package/dist/src/cli/commands/lsp.js +20 -2
  85. package/dist/src/cli/commands/lsp.js.map +1 -1
  86. package/dist/src/core/config/types.d.ts +8 -0
  87. package/dist/src/core/config/types.d.ts.map +1 -1
  88. package/dist/src/core/config/types.js +3 -0
  89. package/dist/src/core/config/types.js.map +1 -1
  90. package/dist/src/core/hooks/project-scope-guard.d.ts +77 -0
  91. package/dist/src/core/hooks/project-scope-guard.d.ts.map +1 -0
  92. package/dist/src/core/hooks/project-scope-guard.js +202 -0
  93. package/dist/src/core/hooks/project-scope-guard.js.map +1 -0
  94. package/dist/src/core/lsp/lsp-client.d.ts +29 -0
  95. package/dist/src/core/lsp/lsp-client.d.ts.map +1 -1
  96. package/dist/src/core/lsp/lsp-client.js +148 -10
  97. package/dist/src/core/lsp/lsp-client.js.map +1 -1
  98. package/dist/src/core/lsp/lsp-manager.d.ts +4 -1
  99. package/dist/src/core/lsp/lsp-manager.d.ts.map +1 -1
  100. package/dist/src/core/lsp/lsp-manager.js +5 -2
  101. package/dist/src/core/lsp/lsp-manager.js.map +1 -1
  102. package/dist/src/core/types/sync-profile.d.ts +72 -0
  103. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  104. package/dist/src/core/types/sync-profile.js +6 -0
  105. package/dist/src/core/types/sync-profile.js.map +1 -1
  106. package/dist/src/sync/providers/ado.d.ts.map +1 -1
  107. package/dist/src/sync/providers/ado.js +16 -2
  108. package/dist/src/sync/providers/ado.js.map +1 -1
  109. package/dist/src/sync/providers/jira.d.ts.map +1 -1
  110. package/dist/src/sync/providers/jira.js +1 -0
  111. package/dist/src/sync/providers/jira.js.map +1 -1
  112. package/package.json +1 -1
  113. package/plugins/specweave/hooks/user-prompt-submit.sh +290 -32
  114. package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +20 -0
  115. package/plugins/specweave/skills/team-merge/SKILL.md +78 -0
  116. package/plugins/specweave/skills/team-orchestrate/SKILL.md +109 -0
  117. package/plugins/specweave/skills/team-status/SKILL.md +44 -0
  118. package/plugins/specweave-backend/.claude-plugin/plugin.json +8 -3
  119. package/plugins/specweave-backend/PLUGIN.md +10 -12
  120. package/plugins/specweave-backend/skills/go-backend/SKILL.md +624 -0
  121. package/plugins/specweave-backend/skills/graphql/SKILL.md +570 -0
  122. package/plugins/specweave-backend/skills/java-spring/SKILL.md +621 -0
  123. package/plugins/specweave-backend/skills/rust-backend/SKILL.md +626 -0
  124. package/plugins/specweave-blockchain/.claude-plugin/plugin.json +13 -0
  125. package/plugins/specweave-blockchain/PLUGIN.md +25 -0
  126. package/plugins/specweave-blockchain/skills/blockchain/SKILL.md +896 -0
  127. package/plugins/specweave-desktop/.claude-plugin/plugin.json +13 -0
  128. package/plugins/specweave-desktop/PLUGIN.md +25 -0
  129. package/plugins/specweave-desktop/skills/electron/SKILL.md +760 -0
  130. package/plugins/specweave-github/MULTI-PROJECT-SYNC-ARCHITECTURE.md +94 -8
  131. package/plugins/specweave-github/commands/sync.md +17 -3
  132. package/plugins/specweave-github/hooks/github-ac-sync-handler.sh +255 -0
  133. package/plugins/specweave-github/hooks/github-auto-create-handler.sh +455 -0
  134. package/plugins/specweave-github/lib/github-ac-comment-poster.js +150 -0
  135. package/plugins/specweave-github/lib/github-ac-comment-poster.ts +245 -0
  136. package/plugins/specweave-github/lib/github-batch-sync.js +93 -0
  137. package/plugins/specweave-github/lib/github-batch-sync.ts +152 -0
  138. package/plugins/specweave-github/lib/github-board-resolver-v2.js +47 -0
  139. package/plugins/specweave-github/lib/github-board-resolver-v2.ts +73 -0
  140. package/plugins/specweave-github/lib/github-conflict-resolver.js +90 -0
  141. package/plugins/specweave-github/lib/github-conflict-resolver.ts +154 -0
  142. package/plugins/specweave-github/lib/github-cross-repo-sync.js +168 -0
  143. package/plugins/specweave-github/lib/github-cross-repo-sync.ts +252 -0
  144. package/plugins/specweave-github/lib/github-field-sync.js +116 -0
  145. package/plugins/specweave-github/lib/github-field-sync.ts +165 -0
  146. package/plugins/specweave-github/lib/github-graphql-client.js +129 -0
  147. package/plugins/specweave-github/lib/github-graphql-client.ts +181 -0
  148. package/plugins/specweave-github/lib/github-issue-body-generator.js +30 -0
  149. package/plugins/specweave-github/lib/github-issue-body-generator.ts +76 -0
  150. package/plugins/specweave-github/lib/github-issue-body-parser.js +55 -0
  151. package/plugins/specweave-github/lib/github-issue-body-parser.ts +92 -0
  152. package/plugins/specweave-github/lib/github-pull-sync.js +185 -0
  153. package/plugins/specweave-github/lib/github-pull-sync.ts +343 -0
  154. package/plugins/specweave-github/lib/github-push-sync.js +119 -0
  155. package/plugins/specweave-github/lib/github-push-sync.ts +174 -0
  156. package/plugins/specweave-github/lib/github-rate-limiter.js +96 -0
  157. package/plugins/specweave-github/lib/github-rate-limiter.ts +143 -0
  158. package/plugins/specweave-github/lib/github-spec-frontmatter-updater.js +117 -0
  159. package/plugins/specweave-github/lib/github-spec-frontmatter-updater.ts +180 -0
  160. package/plugins/specweave-github/lib/github-sync-orchestrator.js +84 -0
  161. package/plugins/specweave-github/lib/github-sync-orchestrator.ts +156 -0
  162. package/plugins/specweave-github/lib/github-us-auto-closer.js +134 -0
  163. package/plugins/specweave-github/lib/github-us-auto-closer.ts +226 -0
  164. package/plugins/specweave-github/lib/index.js +1 -7
  165. package/plugins/specweave-github/lib/index.ts +1 -4
  166. package/plugins/specweave-github/skills/github-sync/SKILL.md +76 -4
  167. package/plugins/specweave-infrastructure/.claude-plugin/plugin.json +16 -6
  168. package/plugins/specweave-infrastructure/PLUGIN.md +12 -5
  169. package/plugins/specweave-infrastructure/skills/aws-deep-dive/SKILL.md +912 -0
  170. package/plugins/specweave-infrastructure/skills/azure-bicep-aks/SKILL.md +832 -0
  171. package/plugins/specweave-infrastructure/skills/devsecops/SKILL.md +962 -0
  172. package/plugins/specweave-infrastructure/skills/github-actions/SKILL.md +828 -0
  173. package/plugins/specweave-infrastructure/skills/opentelemetry/SKILL.md +726 -0
  174. package/plugins/specweave-infrastructure/skills/secret-management/SKILL.md +724 -0
  175. package/plugins/specweave-infrastructure/skills/terraform-opentofu/SKILL.md +700 -0
  176. package/plugins/specweave-media/skills/image/SKILL.md +200 -100
  177. package/plugins/specweave-media/skills/video/SKILL.md +177 -118
  178. package/plugins/specweave-media/test-providers.sh +308 -0
  179. package/plugins/specweave-ml/.claude-plugin/plugin.json +9 -15
  180. package/plugins/specweave-ml/PLUGIN.md +11 -7
  181. package/plugins/specweave-ml/skills/edge-ml/SKILL.md +921 -0
  182. package/plugins/specweave-ml/skills/huggingface/SKILL.md +828 -0
  183. package/plugins/specweave-ml/skills/langchain-agents/SKILL.md +674 -0
  184. package/plugins/specweave-ml/skills/llm-fine-tuning/SKILL.md +642 -0
  185. package/plugins/specweave-ml/skills/rag-vectordb/SKILL.md +721 -0
  186. package/plugins/specweave-mobile/.claude-plugin/plugin.json +21 -13
  187. package/plugins/specweave-mobile/PLUGIN.md +11 -6
  188. package/plugins/specweave-mobile/skills/capacitor-ionic/SKILL.md +814 -0
  189. package/plugins/specweave-mobile/skills/deep-linking-push/SKILL.md +813 -0
  190. package/plugins/specweave-mobile/skills/expo/SKILL.md +661 -0
  191. package/plugins/specweave-mobile/skills/flutter/SKILL.md +1089 -0
  192. package/plugins/specweave-mobile/skills/jetpack-compose/SKILL.md +881 -0
  193. package/plugins/specweave-mobile/skills/mobile-testing/SKILL.md +706 -0
  194. package/plugins/specweave-mobile/skills/swiftui/SKILL.md +898 -0
  195. package/plugins/specweave-testing/commands/e2e-setup.md +18 -0
  196. package/plugins/specweave-testing/commands/ui-automate.md +2 -0
  197. package/plugins/specweave-testing/commands/ui-inspect.md +8 -0
  198. package/plugins/specweave-testing/lib/playwright-ci-defaults.d.ts +6 -0
  199. package/plugins/specweave-testing/lib/playwright-ci-defaults.js +14 -0
  200. package/plugins/specweave-testing/lib/playwright-ci-defaults.ts +24 -0
  201. package/plugins/specweave-testing/lib/playwright-cli-detector.js +33 -0
  202. package/plugins/specweave-testing/lib/playwright-cli-detector.ts +48 -0
  203. package/plugins/specweave-testing/lib/playwright-cli-runner.js +58 -0
  204. package/plugins/specweave-testing/lib/playwright-cli-runner.ts +80 -0
  205. package/plugins/specweave-testing/lib/playwright-routing.js +16 -0
  206. package/plugins/specweave-testing/lib/playwright-routing.ts +38 -0
  207. package/plugins/specweave-testing/skills/e2e-testing/SKILL.md +38 -0
  208. package/src/templates/CLAUDE.md.template +7 -0
  209. package/src/templates/config.json.template +9 -1
  210. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts +0 -51
  211. package/dist/plugins/specweave-github/lib/subtask-sync.d.ts.map +0 -1
  212. package/dist/plugins/specweave-github/lib/subtask-sync.js +0 -147
  213. package/dist/plugins/specweave-github/lib/subtask-sync.js.map +0 -1
  214. package/dist/plugins/specweave-github/lib/task-parser.d.ts +0 -37
  215. package/dist/plugins/specweave-github/lib/task-parser.d.ts.map +0 -1
  216. package/dist/plugins/specweave-github/lib/task-parser.js +0 -211
  217. package/dist/plugins/specweave-github/lib/task-parser.js.map +0 -1
  218. package/dist/plugins/specweave-github/lib/task-sync.d.ts +0 -56
  219. package/dist/plugins/specweave-github/lib/task-sync.d.ts.map +0 -1
  220. package/dist/plugins/specweave-github/lib/task-sync.js +0 -375
  221. package/dist/plugins/specweave-github/lib/task-sync.js.map +0 -1
  222. package/plugins/specweave-github/lib/subtask-sync.d.ts +0 -51
  223. package/plugins/specweave-github/lib/subtask-sync.d.ts.map +0 -1
  224. package/plugins/specweave-github/lib/subtask-sync.js +0 -154
  225. package/plugins/specweave-github/lib/subtask-sync.js.map +0 -1
  226. package/plugins/specweave-github/lib/subtask-sync.ts +0 -225
  227. package/plugins/specweave-github/lib/task-parser.d.js +0 -0
  228. package/plugins/specweave-github/lib/task-parser.d.ts +0 -37
  229. package/plugins/specweave-github/lib/task-parser.d.ts.map +0 -1
  230. package/plugins/specweave-github/lib/task-parser.js +0 -195
  231. package/plugins/specweave-github/lib/task-parser.js.map +0 -1
  232. package/plugins/specweave-github/lib/task-parser.ts +0 -246
  233. package/plugins/specweave-github/lib/task-sync.d.js +0 -0
  234. package/plugins/specweave-github/lib/task-sync.d.ts +0 -51
  235. package/plugins/specweave-github/lib/task-sync.d.ts.map +0 -1
  236. package/plugins/specweave-github/lib/task-sync.js +0 -415
  237. package/plugins/specweave-github/lib/task-sync.js.map +0 -1
  238. package/plugins/specweave-github/lib/task-sync.ts +0 -451
  239. package/plugins/specweave-github/skills/github-issue-tracker/SKILL.md +0 -496
  240. /package/plugins/{specweave-github/lib/subtask-sync.d.js → specweave-testing/lib/playwright-ci-defaults.d.js} +0 -0
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- SW:META template="claude" version="1.0.231" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
1
+ <!-- SW:META template="claude" version="1.0.234" sections="header,start,autodetect,metarule,rules,workflow,reflect,context,structure,taskformat,secrets,syncing,testing,tdd,api,limits,troubleshooting,lazyloading,principles,linking,mcp,auto,docs" -->
2
2
 
3
3
  <!-- SW:SECTION:hook-priority version="1.0.171" -->
4
4
  ## ⛔ Hook Instructions Override Everything
@@ -11,7 +11,7 @@
11
11
  | **"SKILL FIRST"** | Call shown skill FIRST → chain domain skills → implement |
12
12
  <!-- SW:END:hook-priority -->
13
13
 
14
- <!-- SW:SECTION:header version="1.0.231" -->
14
+ <!-- SW:SECTION:header version="1.0.234" -->
15
15
  **Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
16
16
  <!-- SW:END:header -->
17
17
 
@@ -48,56 +48,95 @@ If auto-activation fails, invoke explicitly: `Skill({ skill: "name" })`
48
48
 
49
49
  **Native LSP broken in v2.1.0+.** Use: `specweave lsp refs|def|hover src/file.ts SymbolName`
50
50
 
51
- <!-- SW:SECTION:start version="1.0.231" -->
51
+ <!-- SW:SECTION:start version="1.0.234" -->
52
52
  ## Getting Started
53
53
 
54
- `0001-project-setup` auto-created by `specweave init`. Start fresh: `/sw:increment "your-feature"`, or customize existing spec.md.
54
+ **Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
55
+
56
+ **Options**:
57
+ 1. **Start fresh**: `rm -rf .specweave/increments/0001-project-setup` → `/sw:increment "your-feature"`
58
+ 2. **Customize**: Edit spec.md and use for setup tasks
55
59
  <!-- SW:END:start -->
56
60
 
57
- <!-- SW:SECTION:autodetect version="1.0.231" -->
61
+ <!-- SW:SECTION:autodetect version="1.0.234" -->
58
62
  ## Auto-Detection
59
63
 
60
- Routes to `/sw:increment` when 5+ signals detected: Project name | Features list (3+) | Tech stack | Timeline/MVP | Problem statement | Business model
64
+ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
65
+
66
+ **Signals** (5+ = auto-route): Project name | Features list (3+) | Tech stack | Timeline/MVP | Problem statement | Business model
61
67
 
62
- **Opt-out**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion"
68
+ **Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
63
69
  <!-- SW:END:autodetect -->
64
70
 
65
- <!-- SW:SECTION:metarule version="1.0.231" -->
71
+ <!-- SW:SECTION:metarule version="1.0.234" -->
66
72
  ## Workflow Orchestration
67
73
 
68
- 1. **Plan first**: Enter plan mode for non-trivial tasks (3+ steps). If sideways → STOP, re-plan.
69
- 2. **Subagents**: Offload research/exploration. One task per subagent. Use liberally for large analysis.
70
- 3. **Verify before done**: Prove it works. "Would a staff engineer approve this?"
71
- 4. **Dependencies first**: Build before run. Install before import.
74
+ ### 1. Plan Mode Default
75
+ - Enter plan mode for ANY non-trivial task (3+ steps or architectural decisions)
76
+ - If something goes sideways, **STOP and re-plan** - don't keep pushing
77
+ - Write detailed specs upfront to reduce ambiguity
78
+
79
+ ### 2. Subagent Strategy
80
+ - Use subagents liberally to keep main context clean
81
+ - Offload research, exploration, and parallel analysis to subagents
82
+ - One task per subagent for focused execution
83
+ - Append "use subagents" to requests for safe parallelization
84
+
85
+ ### 3. Verification Before Done
86
+ - Never mark a task complete without proving it works
87
+ - Ask yourself: **"Would a staff engineer approve this?"**
88
+ - Run tests, check logs, demonstrate correctness
89
+
90
+ ### 4. Think-Before-Act (Dependencies)
91
+ **Satisfy dependencies BEFORE dependent operations.**
92
+ ```
93
+ ❌ node script.js → Error → npm run build
94
+ ✅ npm run build → node script.js → Success
95
+ ```
72
96
  <!-- SW:END:metarule -->
73
97
 
74
- <!-- SW:SECTION:rules version="1.0.231" -->
98
+ <!-- SW:SECTION:rules version="1.0.234" -->
75
99
  ## Rules
76
100
 
77
- 1. **Files** → `.specweave/increments/####-name/` (only `metadata.json`, `spec.md`, `plan.md`, `tasks.md` at root; everything else → subfolders)
78
- 2. **Update immediately**: Mark tasks `[x]` + update spec.md ACs on completion
79
- 3. **Unique IDs**: Check all folders: `find .specweave/increments -maxdepth 2 -type d -name "[0-9]*" | grep -oE '[0-9]{4}E?' | sort -u | tail -5`
80
- 4. **Emergency mode**: 1 edit, 50 lines max, no agents
81
- 5. `.specweave/` folders ONLY where `specweave init` was run
82
- 6. ⛔ Use `specweave refresh-marketplace` CLI (not `scripts/refresh-marketplace.sh`)
83
- 7. Before creating `docs/NN-*`, check existing prefixes to avoid collisions
101
+ 1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
102
+ 2. **Update immediately**: `Edit("tasks.md", "[ ] pending", "[x] completed")` + `Edit("spec.md", "[ ] AC-", "[x] AC-")`
103
+ 3. **Unique IDs**: Check ALL folders (active, archive, abandoned):
104
+ ```bash
105
+ find .specweave/increments -maxdepth 2 -type d -name "[0-9]*" | grep -oE '[0-9]{4}E?' | sort -u | tail -5
106
+ ```
107
+ 4. **Emergency**: "emergency mode" 1 edit, 50 lines max, no agents
108
+ 5. **⛔ Project-Scope Guard (v1.0.235)**: SpecWeave skills are **globally visible** but **project-scoped**:
109
+ - Skills appear in ALL projects (Claude Code limitation - plugins enabled globally)
110
+ - Guard **blocks** skill execution in non-initialized projects with helpful 4-option prompt
111
+ - User options: (1) init here, (2) navigate elsewhere, (3) disable plugins, (4) bypass guard
112
+ - Disable: `export SPECWEAVE_DISABLE_GUARD=1` OR `.specweave/config.json` → `guard.enabled: false`
113
+ - Rule: `.specweave/` folders MUST ONLY exist where `specweave init` was run
114
+ 6. **⛔ Marketplace refresh**: Use `specweave refresh-marketplace` CLI (not `scripts/refresh-marketplace.sh`)
115
+ 7. **⛔ Numbered folder collisions**: Before creating `docs/NN-*` folders, CHECK existing prefixes:
116
+ ```bash
117
+ ls docs/ | grep -E '^[0-9]{2}-' | cut -d'-' -f1 | sort -u
118
+ ```
119
+ Use next available number. **NEVER create duplicate prefixes.**
84
120
  <!-- SW:END:rules -->
85
121
 
86
- <!-- SW:SECTION:workflow version="1.0.231" -->
122
+ <!-- SW:SECTION:workflow version="1.0.234" -->
87
123
  ## Workflow
88
124
 
89
125
  `/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
90
126
 
91
127
  | Cmd | Action |
92
- |---|---|
128
+ |-----|--------|
93
129
  | `/sw:increment` | Plan feature |
94
130
  | `/sw:do` | Execute tasks |
95
- | `/sw:auto` | Autonomous (IMPLEMENT→TEST→FIX→NEXT). Requires explicit stop conditions. |
131
+ | `/sw:auto` | Autonomous execution |
132
+ | `/sw:auto-status` | Check auto session |
133
+ | `/sw:cancel-auto` | ⚠️ EMERGENCY ONLY manual cancel |
96
134
  | `/sw:validate` | Quality check |
97
- | `/sw:done` | Close (grill → validate → sync) |
98
- | `/sw-github:sync` `/sw-jira:sync` | External sync |
135
+ | `/sw:done` | Close |
136
+ | `/sw-github:sync` | GitHub sync |
137
+ | `/sw-jira:sync` | Jira sync |
99
138
 
100
- **Natural language**: "Let's build X" → increment | "What's status?" → progress | "We're done" → done | "Ship while sleeping" → auto
139
+ **Natural language**: "Let's build X" → `/sw:increment` | "What's status?" → `/sw:progress` | "We're done" → `/sw:done` | "Ship while sleeping" → `/sw:auto`
101
140
  <!-- SW:END:workflow -->
102
141
 
103
142
  <!-- SW:SECTION:save-nested-repos version="1.0.194" -->
@@ -106,10 +145,12 @@ Routes to `/sw:increment` when 5+ signals detected: Project name | Features list
106
145
  Before git operations, scan: `for d in repositories packages services apps libs workspace; do [ -d "$d" ] && find "$d" -maxdepth 2 -name ".git" -type d; done`
107
146
  <!-- SW:END:save-nested-repos -->
108
147
 
109
- <!-- SW:SECTION:reflect version="1.0.231" -->
148
+ <!-- SW:SECTION:reflect version="1.0.234" -->
110
149
  ## Skill Memories
111
150
 
112
- Auto-captured learnings. Disable: `"reflect": { "enabled": false }` in config.json
151
+ SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
152
+
153
+ **Disable**: Set `"reflect": { "enabled": false }` in `.specweave/config.json`
113
154
  <!-- SW:END:reflect -->
114
155
 
115
156
  <!-- Auto-captured by SpecWeave reflect. Edit or delete as needed. -->
@@ -123,13 +164,15 @@ Auto-captured learnings. Disable: `"reflect": { "enabled": false }` in config.js
123
164
  - Auto command: explicit stop conditions, visible output
124
165
  - Prefer leaderboard-style reporting for analysis
125
166
 
126
- <!-- SW:SECTION:context version="1.0.231" -->
167
+ <!-- SW:SECTION:context version="1.0.234" -->
127
168
  ## Context
128
169
 
129
- Check ADRs at `.specweave/docs/internal/architecture/adr/` before implementing. Load context: `/sw:context <topic>`
170
+ **Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
171
+
172
+ **Load context**: `/sw:context <topic>` loads relevant living docs into conversation
130
173
  <!-- SW:END:context -->
131
174
 
132
- <!-- SW:SECTION:structure version="1.0.231" -->
175
+ <!-- SW:SECTION:structure version="1.0.234" -->
133
176
  ## Structure
134
177
 
135
178
  ```
@@ -139,10 +182,12 @@ Check ADRs at `.specweave/docs/internal/architecture/adr/` before implementing.
139
182
  └── config.json
140
183
  ```
141
184
 
142
- Increment root: ONLY 4 files. Everything else → subfolders (`reports/`, `logs/`, `scripts/`)
185
+ **⛔ Increment root**: ONLY `metadata.json`, `spec.md`, `plan.md`, `tasks.md`
186
+
187
+ **Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
143
188
  <!-- SW:END:structure -->
144
189
 
145
- <!-- SW:SECTION:taskformat version="1.0.231" -->
190
+ <!-- SW:SECTION:taskformat version="1.0.234" -->
146
191
  ## Task Format
147
192
 
148
193
  ```markdown
@@ -152,110 +197,208 @@ Check ADRs at `.specweave/docs/internal/architecture/adr/` before implementing.
152
197
  ```
153
198
  <!-- SW:END:taskformat -->
154
199
 
155
- <!-- SW:SECTION:secrets version="1.0.231" -->
200
+ <!-- SW:SECTION:secrets version="1.0.234" -->
156
201
  ## Secrets Check
157
202
 
158
- Before CLI tools: `grep -qE "(GITHUB_TOKEN|GH_TOKEN|JIRA_|AZURE_DEVOPS_|ADO_)" .env 2>/dev/null && echo "Found"`
203
+ **BEFORE CLI tools**: Check existing config first!
204
+ ```bash
205
+ # Check if credentials EXIST (never display values!)
206
+ grep -qE "(GITHUB_TOKEN|GH_TOKEN|JIRA_|AZURE_DEVOPS_|ADO_)" .env 2>/dev/null && echo "Credentials found in .env"
207
+ cat .specweave/config.json | grep -A5 '"sync"'
208
+ gh auth status
209
+ ```
159
210
 
160
- NEVER `grep TOKEN .env` without `-q` exposes credentials in terminal!
211
+ **SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
161
212
  <!-- SW:END:secrets -->
162
213
 
163
- <!-- SW:SECTION:syncing version="1.0.231" -->
164
- ## External Sync
214
+ <!-- SW:SECTION:syncing version="1.0.234" -->
215
+ ## External Sync (GitHub/JIRA/ADO)
216
+
217
+ **Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
218
+
219
+ **Mapping**: Feature → Milestone | Story → Issue | Task → Checkbox
165
220
 
166
- Commands: `/sw-github:sync {id}` | `/sw:sync-specs` (living docs)
167
- Mapping: Feature → Milestone | Story → Issue | Task → Checkbox
168
- Config: `sync.github.enabled: true` + `canUpdateExternalItems: true`
221
+ **Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
169
222
  <!-- SW:END:syncing -->
170
223
 
171
- <!-- SW:SECTION:testing version="1.0.231" -->
224
+ <!-- SW:SECTION:testing version="1.0.234" -->
172
225
  ## Testing
173
226
 
174
227
  BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
175
228
 
176
229
  ```typescript
177
- // ESM mocking (Vitest 4.x+)
230
+ // ESM mocking: vi.hoisted() + vi.mock() (Vitest 4.x+)
178
231
  const { mockFn } = vi.hoisted(() => ({ mockFn: vi.fn() }));
179
232
  vi.mock('./module', () => ({ func: mockFn }));
180
233
  ```
181
234
  <!-- SW:END:testing -->
182
235
 
183
- <!-- SW:SECTION:tdd version="1.0.231" -->
184
- ## TDD Mode
236
+ <!-- SW:SECTION:tdd version="1.0.234" -->
237
+ ## TDD Mode (Test-Driven Development)
238
+
239
+ **When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
240
+
241
+ ### TDD Workflow (MANDATORY when configured)
242
+
243
+ ```
244
+ 1. RED: Write FAILING test first → verify it fails
245
+ 2. GREEN: Write MINIMAL code to pass → no extra features
246
+ 3. REFACTOR: Improve code quality → keep tests green
247
+ ```
248
+
249
+ ### Check TDD Mode Before Implementation
250
+
251
+ ```bash
252
+ # Check if TDD mode is enabled
253
+ jq -r '.testing.defaultTestMode' .specweave/config.json
254
+ # Returns: "TDD" | "test-first" | "test-after"
255
+ ```
256
+
257
+ ### TDD Commands
258
+
259
+ | Command | Phase | Purpose |
260
+ |---------|-------|---------|
261
+ | `/sw:tdd-red` | RED | Write failing tests |
262
+ | `/sw:tdd-green` | GREEN | Minimal implementation |
263
+ | `/sw:tdd-refactor` | REFACTOR | Code quality improvement |
264
+ | `/sw:tdd-cycle` | ALL | Full orchestrated workflow |
265
+
266
+ ### Enforcement Levels
267
+
268
+ Set `testing.tddEnforcement` in config.json:
269
+
270
+ | Level | Behavior |
271
+ |-------|----------|
272
+ | `strict` | **BLOCKS** task completion if RED not done before GREEN |
273
+ | `warn` | Shows warning but allows continuation (default) |
274
+ | `off` | No enforcement |
275
+
276
+ ### TDD Task Format
185
277
 
186
- When `testing.defaultTestMode: "TDD"` in config.json: RED GREEN → REFACTOR.
278
+ When TDD is enabled, tasks include phase markers:
187
279
 
188
- Commands: `/sw:tdd-red` | `/sw:tdd-green` | `/sw:tdd-refactor` | `/sw:tdd-cycle`
280
+ ```markdown
281
+ ### T-001: [RED] Write auth service tests
282
+ **Depends On**: None
283
+ **Status**: [ ] pending
284
+
285
+ ### T-002: [GREEN] Implement auth service
286
+ **Depends On**: T-001
287
+ **Status**: [ ] pending
189
288
 
190
- Enforcement (`testing.tddEnforcement`): `strict` (blocks GREEN until RED) | `warn` (default) | `off`
289
+ ### T-003: [REFACTOR] Extract token utilities
290
+ **Depends On**: T-002
291
+ **Status**: [ ] pending
292
+ ```
191
293
 
192
- TDD tasks use phase markers: `[RED] Write tests` → `[GREEN] Implement` → `[REFACTOR] Optimize`. Complete dependencies in order.
294
+ **Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
193
295
  <!-- SW:END:tdd -->
194
296
 
195
- <!-- SW:SECTION:api version="1.0.231" -->
196
- ## API Development
297
+ <!-- SW:SECTION:api version="1.0.234" -->
298
+ ## API Development (OpenAPI-First)
197
299
 
198
- OpenAPI-first. Commands: `/sw:api-docs --all|--openapi|--postman|--validate`. Enable: `apiDocs.enabled: true`
300
+ **For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
301
+
302
+ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
199
303
  <!-- SW:END:api -->
200
304
 
201
- <!-- SW:SECTION:limits version="1.0.231" -->
305
+ <!-- SW:SECTION:limits version="1.0.234" -->
202
306
  ## Limits
203
307
 
204
- Max 1500 lines/file — extract before adding
308
+ **Max 1500 lines/file** — extract before adding
205
309
  <!-- SW:END:limits -->
206
310
 
207
- <!-- SW:SECTION:troubleshooting version="1.0.231" -->
311
+ <!-- SW:SECTION:troubleshooting version="1.0.234" -->
208
312
  ## Troubleshooting
209
313
 
210
314
  | Issue | Fix |
211
- |---|---|
212
- | Skills missing | Restart Claude Code |
315
+ |-------|-----|
316
+ | Skills/commands missing | Restart Claude Code |
213
317
  | Plugins outdated | `specweave refresh-marketplace` |
214
318
  | Out of sync | `/sw:sync-tasks` |
319
+ | Duplicate IDs | `/sw:fix-duplicates` |
215
320
  | Edits blocked | Add `"additionalDirectories":["repositories"]` to `.claude/settings.json` |
216
- | Session stuck | `rm -f .specweave/state/*.lock` + restart |
321
+ | Session stuck | Kill + `rm -f .specweave/state/*.lock` + restart |
217
322
  <!-- SW:END:troubleshooting -->
218
323
 
219
- <!-- SW:SECTION:lazyloading version="1.0.231" -->
324
+ <!-- SW:SECTION:lazyloading version="1.0.234" -->
220
325
  ## Plugin Auto-Loading
221
326
 
222
- Auto-loads by project type. Manual: `claude plugin install sw-frontend@specweave`. Disable: `SPECWEAVE_DISABLE_AUTO_LOAD=1`
327
+ Plugins load automatically based on project type and keywords. Manual install if needed:
328
+
329
+ ```bash
330
+ claude plugin install sw-frontend@specweave # Install plugin
331
+ claude plugin list # Check installed
332
+ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
333
+ ```
334
+
335
+ **Token savings**: Core ~3-5K tokens vs all plugins ~60K+
223
336
  <!-- SW:END:lazyloading -->
224
337
 
225
- <!-- SW:SECTION:principles version="1.0.231" -->
338
+ <!-- SW:SECTION:principles version="1.0.234" -->
226
339
  ## Principles
227
340
 
228
- 1. **Spec-first**: `/sw:increment` before coding. Docs = truth. Small increments. All work traceable to ACs.
229
- 2. **Simplicity**: Simplest solution. Minimal impact. Only change what's needed.
230
- 3. **No laziness**: Root causes. No temp fixes. Senior developer standards.
231
- 4. **Elegance**: Pause for non-trivial changes — "is there a more elegant way?" Pragmatic > perfect.
341
+ ### SpecWeave Principles
342
+ 1. **Spec-first**: `/sw:increment` before coding
343
+ 2. **Docs = truth**: Specs guide implementation
344
+ 3. **Incremental**: Small, validated increments
345
+ 4. **Traceable**: All work → specs → ACs
346
+
347
+ ### Core Principles (Quality)
348
+ - **Simplicity First**: Make every change as simple as possible. Impact minimal code.
349
+ - **No Laziness**: Find root causes. No temporary fixes. Senior developer standards.
350
+ - **Minimal Impact**: Changes should only touch what's necessary. Avoid introducing bugs.
351
+ - **Demand Elegance**: For non-trivial changes, pause and ask "is there a more elegant way?" - but skip this for simple, obvious fixes (don't over-engineer).
232
352
  <!-- SW:END:principles -->
233
353
 
234
- <!-- SW:SECTION:linking version="1.0.231" -->
354
+ <!-- SW:SECTION:linking version="1.0.234" -->
235
355
  ## Bidirectional Linking
236
356
 
237
357
  Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
358
+
359
+ Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
238
360
  <!-- SW:END:linking -->
239
361
 
240
- <!-- SW:SECTION:mcp version="1.0.231" -->
362
+ <!-- SW:SECTION:mcp version="1.0.234" -->
241
363
  ## External Services
242
364
 
243
- CLI first → MCP for complex integrations. Check auth: `gh auth status` | `wrangler whoami` | `supabase status`
365
+ **Priority**: CLI tools first (simpler) → MCP for complex integrations
366
+
367
+ **CLI tools** (check auth first):
368
+ ```bash
369
+ gh auth status # GitHub
370
+ wrangler whoami # Cloudflare
371
+ supabase status # Supabase
372
+ ```
373
+
374
+ **MCP servers** (for richer integrations):
375
+ ```bash
376
+ claude mcp add --transport http github https://api.github.com/mcp
377
+ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server-postgres
378
+ /mcp # Check status in Claude Code
379
+ ```
244
380
 
245
- MCP: `claude mcp add --transport http github https://api.github.com/mcp` | `/mcp` to check status
381
+ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
246
382
  <!-- SW:END:mcp -->
247
383
 
248
- <!-- SW:SECTION:auto version="1.0.231" -->
384
+ <!-- SW:SECTION:auto version="1.0.234" -->
249
385
  ## Auto Mode
250
386
 
251
- **TDD in auto**: `/sw:auto --tdd` for strict enforcement. Follows RED GREEN → REFACTOR per task triplet.
387
+ **Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
388
+
389
+ **Pattern**: IMPLEMENT → TEST → FAIL? → FIX → PASS → NEXT
390
+
391
+ **TDD in Auto Mode**: If `testing.defaultTestMode: "TDD"` is configured:
392
+ - Use `/sw:auto --tdd` for strict enforcement (ALL tests must pass)
393
+ - Auto mode reads config and displays TDD banner
394
+ - Follow RED → GREEN → REFACTOR order for task triplets
252
395
 
253
- **Pragmatic completion**: MUST (MVP, security) | SHOULD (edge cases) | CAN SKIP (conflicts ask user)
396
+ **Pragmatic completion**: MUST (MVP, security, data integrity) | SHOULD (edge cases) | CAN SKIP (conflicts - ask user)
254
397
 
255
- **STOP & ASK**: Spec conflicts | Task unnecessary | Requirement ambiguous
398
+ **STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
256
399
  <!-- SW:END:auto -->
257
400
 
258
- <!-- SW:SECTION:docs version="1.0.231" -->
401
+ <!-- SW:SECTION:docs version="1.0.234" -->
259
402
  ## Docs
260
403
 
261
404
  [spec-weave.com](https://spec-weave.com)