specweave 1.0.255 → 1.0.257

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 (117) hide show
  1. package/CLAUDE.md +41 -207
  2. package/README.md +138 -203
  3. package/dist/src/core/ac-checkbox-formatter.d.ts +24 -0
  4. package/dist/src/core/ac-checkbox-formatter.d.ts.map +1 -0
  5. package/dist/src/core/ac-checkbox-formatter.js +35 -0
  6. package/dist/src/core/ac-checkbox-formatter.js.map +1 -0
  7. package/dist/src/core/ac-progress-sync.d.ts +129 -0
  8. package/dist/src/core/ac-progress-sync.d.ts.map +1 -0
  9. package/dist/src/core/ac-progress-sync.js +300 -0
  10. package/dist/src/core/ac-progress-sync.js.map +1 -0
  11. package/dist/src/core/fabric/registry-schema.d.ts +79 -0
  12. package/dist/src/core/fabric/registry-schema.d.ts.map +1 -0
  13. package/dist/src/core/fabric/registry-schema.js +6 -0
  14. package/dist/src/core/fabric/registry-schema.js.map +1 -0
  15. package/dist/src/core/fabric/security-scanner.d.ts +12 -0
  16. package/dist/src/core/fabric/security-scanner.d.ts.map +1 -0
  17. package/dist/src/core/fabric/security-scanner.js +219 -0
  18. package/dist/src/core/fabric/security-scanner.js.map +1 -0
  19. package/dist/src/core/project/project-service.d.ts +10 -1
  20. package/dist/src/core/project/project-service.d.ts.map +1 -1
  21. package/dist/src/core/project/project-service.js +37 -2
  22. package/dist/src/core/project/project-service.js.map +1 -1
  23. package/dist/src/core/types/sync-profile.d.ts +44 -0
  24. package/dist/src/core/types/sync-profile.d.ts.map +1 -1
  25. package/dist/src/core/types/sync-profile.js.map +1 -1
  26. package/dist/src/core/universal-auto-create.d.ts +64 -0
  27. package/dist/src/core/universal-auto-create.d.ts.map +1 -0
  28. package/dist/src/core/universal-auto-create.js +228 -0
  29. package/dist/src/core/universal-auto-create.js.map +1 -0
  30. package/package.json +1 -1
  31. package/plugins/specweave/hooks/stop-sync.sh +34 -5
  32. package/plugins/specweave/hooks/user-prompt-submit.sh +29 -319
  33. package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +23 -9
  34. package/plugins/specweave/hooks/v2/handlers/ac-sync-dispatcher.sh +269 -0
  35. package/plugins/specweave/hooks/v2/handlers/universal-auto-create-dispatcher.sh +181 -0
  36. package/plugins/specweave/scripts/skill-context.sh +145 -0
  37. package/plugins/specweave/skills/architect/SKILL.md +2 -2
  38. package/plugins/specweave/skills/auto/SKILL.md +93 -1039
  39. package/plugins/specweave/skills/cancel-auto/SKILL.md +1 -1
  40. package/plugins/specweave/skills/code-simplifier/SKILL.md +1 -1
  41. package/plugins/specweave/skills/do/SKILL.md +67 -1107
  42. package/plugins/specweave/skills/docs/SKILL.md +94 -44
  43. package/plugins/specweave/skills/docs-updater/SKILL.md +1 -1
  44. package/plugins/specweave/skills/done/SKILL.md +77 -1464
  45. package/plugins/specweave/skills/framework/SKILL.md +2 -2
  46. package/plugins/specweave/skills/grill/SKILL.md +1 -1
  47. package/plugins/specweave/skills/increment/SKILL.md +1 -1
  48. package/plugins/specweave/skills/increment-planner/SKILL.md +21 -17
  49. package/plugins/specweave/skills/lsp/SKILL.md +1 -1
  50. package/plugins/specweave/skills/multi-project-spec-mapper/SKILL.md +1 -1
  51. package/plugins/specweave/skills/pm/SKILL.md +1 -1
  52. package/plugins/specweave/skills/progress/SKILL.md +1 -1
  53. package/plugins/specweave/skills/save/SKILL.md +52 -1373
  54. package/plugins/specweave/skills/security/SKILL.md +1 -1
  55. package/plugins/specweave/skills/security-patterns/SKILL.md +1 -1
  56. package/plugins/specweave/skills/smart-reopen-detector/SKILL.md +1 -1
  57. package/plugins/specweave/skills/tdd-cycle/SKILL.md +1 -1
  58. package/plugins/specweave/skills/tdd-green/SKILL.md +1 -1
  59. package/plugins/specweave/skills/tdd-orchestrator/SKILL.md +2 -2
  60. package/plugins/specweave/skills/tdd-red/SKILL.md +1 -1
  61. package/plugins/specweave/skills/validate/SKILL.md +66 -849
  62. package/plugins/specweave-backend/skills/database-optimizer/SKILL.md +1 -1
  63. package/plugins/specweave-backend/skills/graphql/SKILL.md +1 -1
  64. package/plugins/specweave-frontend/skills/design-system-architect/SKILL.md +1 -1
  65. package/plugins/specweave-frontend/skills/frontend/SKILL.md +1 -1
  66. package/plugins/specweave-frontend/skills/frontend-architect/SKILL.md +1 -1
  67. package/plugins/specweave-frontend/skills/frontend-design/SKILL.md +1 -1
  68. package/plugins/specweave-frontend/skills/i18n-expert/SKILL.md +1 -1
  69. package/plugins/specweave-github/commands/sync.md +1 -22
  70. package/plugins/specweave-payments/skills/billing-automation/SKILL.md +1 -1
  71. package/plugins/specweave-testing/skills/accessibility-testing/SKILL.md +1 -1
  72. package/src/templates/CLAUDE.md.template +50 -356
  73. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts +0 -205
  74. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.d.ts.map +0 -1
  75. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js +0 -685
  76. package/dist/plugins/specweave-github/lib/ThreeLayerSyncManager.js.map +0 -1
  77. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +0 -12
  78. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +0 -1
  79. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js +0 -28
  80. package/dist/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +0 -1
  81. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts +0 -21
  82. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.d.ts.map +0 -1
  83. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js +0 -471
  84. package/dist/plugins/specweave-github/lib/github-increment-sync-cli.js.map +0 -1
  85. package/dist/plugins/specweave-github/lib/github-status-sync.d.ts +0 -53
  86. package/dist/plugins/specweave-github/lib/github-status-sync.d.ts.map +0 -1
  87. package/dist/plugins/specweave-github/lib/github-status-sync.js +0 -120
  88. package/dist/plugins/specweave-github/lib/github-status-sync.js.map +0 -1
  89. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +0 -18
  90. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +0 -1
  91. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js +0 -297
  92. package/dist/plugins/specweave-github/lib/github-sync-increment-changes.js.map +0 -1
  93. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts +0 -94
  94. package/dist/plugins/specweave-github/lib/increment-issue-builder.d.ts.map +0 -1
  95. package/dist/plugins/specweave-github/lib/increment-issue-builder.js +0 -385
  96. package/dist/plugins/specweave-github/lib/increment-issue-builder.js.map +0 -1
  97. package/plugins/specweave-github/hooks/github-ac-sync-handler.sh +0 -255
  98. package/plugins/specweave-github/lib/ThreeLayerSyncManager.js +0 -611
  99. package/plugins/specweave-github/lib/ThreeLayerSyncManager.ts +0 -909
  100. package/plugins/specweave-github/lib/cli-sync-increment-changes.d.js +0 -1
  101. package/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts +0 -12
  102. package/plugins/specweave-github/lib/cli-sync-increment-changes.d.ts.map +0 -1
  103. package/plugins/specweave-github/lib/cli-sync-increment-changes.js +0 -17
  104. package/plugins/specweave-github/lib/cli-sync-increment-changes.js.map +0 -1
  105. package/plugins/specweave-github/lib/cli-sync-increment-changes.ts +0 -33
  106. package/plugins/specweave-github/lib/github-increment-sync-cli.js +0 -474
  107. package/plugins/specweave-github/lib/github-increment-sync-cli.ts +0 -616
  108. package/plugins/specweave-github/lib/github-status-sync.js +0 -107
  109. package/plugins/specweave-github/lib/github-status-sync.ts +0 -163
  110. package/plugins/specweave-github/lib/github-sync-increment-changes.d.js +0 -0
  111. package/plugins/specweave-github/lib/github-sync-increment-changes.d.ts +0 -18
  112. package/plugins/specweave-github/lib/github-sync-increment-changes.d.ts.map +0 -1
  113. package/plugins/specweave-github/lib/github-sync-increment-changes.js +0 -253
  114. package/plugins/specweave-github/lib/github-sync-increment-changes.js.map +0 -1
  115. package/plugins/specweave-github/lib/github-sync-increment-changes.ts +0 -391
  116. package/plugins/specweave-github/lib/increment-issue-builder.js +0 -402
  117. package/plugins/specweave-github/lib/increment-issue-builder.ts +0 -520
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- SW:META template="claude" version="1.0.254" 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.256" 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.254" -->
14
+ <!-- SW:SECTION:header version="1.0.256" -->
15
15
  **Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
16
16
  <!-- SW:END:header -->
17
17
 
@@ -31,24 +31,15 @@
31
31
  If auto-activation fails, invoke explicitly: `Skill({ skill: "name" })`
32
32
  <!-- SW:END:claude-code-concepts -->
33
33
 
34
- ## Automatic Enforcement
35
-
36
- | Mechanism | Enforcement |
37
- |---|---|
38
- | `task-ac-sync` | Task completion → auto-updates spec.md ACs |
39
- | `tdd-enforcement` | Blocks GREEN if RED not done (strict mode) |
40
- | `grill` | Runs as first `/sw:done` step; blockers halt close |
41
- | `living-specs` | Updates docs on increment done/reopened/archived |
42
-
43
34
  <!-- SW:SECTION:skill-chaining version="1.0.179" -->
44
35
  <!-- Consolidated into Skills & Plugins section above -->
45
36
  <!-- SW:END:skill-chaining -->
46
37
 
47
- ## LSP (Code Intelligence)
38
+ ## LSP
48
39
 
49
- **Native LSP broken in v2.1.0+.** Use: `specweave lsp refs|def|hover src/file.ts SymbolName`
40
+ Use: `specweave lsp refs|def|hover src/file.ts SymbolName`
50
41
 
51
- <!-- SW:SECTION:start version="1.0.254" -->
42
+ <!-- SW:SECTION:start version="1.0.256" -->
52
43
  ## Getting Started
53
44
 
54
45
  **Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
@@ -58,7 +49,7 @@ If auto-activation fails, invoke explicitly: `Skill({ skill: "name" })`
58
49
  2. **Customize**: Edit spec.md and use for setup tasks
59
50
  <!-- SW:END:start -->
60
51
 
61
- <!-- SW:SECTION:autodetect version="1.0.254" -->
52
+ <!-- SW:SECTION:autodetect version="1.0.256" -->
62
53
  ## Auto-Detection
63
54
 
64
55
  SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
@@ -68,7 +59,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
68
59
  **Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
69
60
  <!-- SW:END:autodetect -->
70
61
 
71
- <!-- SW:SECTION:metarule version="1.0.254" -->
62
+ <!-- SW:SECTION:metarule version="1.0.256" -->
72
63
  ## Workflow Orchestration
73
64
 
74
65
  ### 1. Plan Mode Default
@@ -95,7 +86,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
95
86
  ```
96
87
  <!-- SW:END:metarule -->
97
88
 
98
- <!-- SW:SECTION:rules version="1.0.254" -->
89
+ <!-- SW:SECTION:rules version="1.0.256" -->
99
90
  ## Rules
100
91
 
101
92
  1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
@@ -116,7 +107,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
116
107
  Discover org from config: `repository.organization` → `sync.profiles` → `umbrella.childRepos` → filesystem
117
108
  <!-- SW:END:rules -->
118
109
 
119
- <!-- SW:SECTION:workflow version="1.0.254" -->
110
+ <!-- SW:SECTION:workflow version="1.0.256" -->
120
111
  ## Workflow
121
112
 
122
113
  `/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
@@ -142,7 +133,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
142
133
  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`
143
134
  <!-- SW:END:save-nested-repos -->
144
135
 
145
- <!-- SW:SECTION:reflect version="1.0.254" -->
136
+ <!-- SW:SECTION:reflect version="1.0.256" -->
146
137
  ## Skill Memories
147
138
 
148
139
  SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
@@ -163,7 +154,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
163
154
  - Prefer leaderboard-style reporting for analysis
164
155
  - Auto mode: Stop hook creates implicit loops via block/approve pattern
165
156
 
166
- <!-- SW:SECTION:context version="1.0.254" -->
157
+ <!-- SW:SECTION:context version="1.0.256" -->
167
158
  ## Context
168
159
 
169
160
  **Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
@@ -171,7 +162,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
171
162
  **Load context**: `/sw:docs <topic>` loads relevant living docs into conversation
172
163
  <!-- SW:END:context -->
173
164
 
174
- <!-- SW:SECTION:structure version="1.0.254" -->
165
+ <!-- SW:SECTION:structure version="1.0.256" -->
175
166
  ## Structure
176
167
 
177
168
  ```
@@ -186,7 +177,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
186
177
  **Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
187
178
  <!-- SW:END:structure -->
188
179
 
189
- <!-- SW:SECTION:taskformat version="1.0.254" -->
180
+ <!-- SW:SECTION:taskformat version="1.0.256" -->
190
181
  ## Task Format
191
182
 
192
183
  ```markdown
@@ -196,163 +187,53 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
196
187
  ```
197
188
  <!-- SW:END:taskformat -->
198
189
 
199
- <!-- SW:SECTION:secrets version="1.0.254" -->
200
- ## Secrets Check
190
+ <!-- SW:SECTION:secrets version="1.0.257" -->
191
+ ## Secrets
201
192
 
202
- **BEFORE CLI tools**: Check existing config first!
203
- ```bash
204
- # Check if credentials EXIST (never display values!)
205
- grep -qE "(GITHUB_TOKEN|GH_TOKEN|JIRA_|AZURE_DEVOPS_|ADO_)" .env 2>/dev/null && echo "Credentials found in .env"
206
- cat .specweave/config.json | grep -A5 '"sync"'
207
- gh auth status
208
- ```
209
-
210
- **SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
193
+ Check credentials exist before CLI tools (`grep -q`, never display values). NEVER `grep TOKEN .env` without `-q`.
211
194
  <!-- SW:END:secrets -->
212
195
 
213
- <!-- SW:SECTION:syncing version="1.0.254" -->
214
- ## External Sync (GitHub/JIRA/ADO)
215
-
216
- **Primary command**: `/sw:progress-sync` — syncs tasks.md → spec.md → living docs → external tools (auto-creates missing issues)
217
-
218
- **Individual commands**:
219
- | Command | Action |
220
- |---------|--------|
221
- | `/sw-github:create {id}` | Create GitHub issue for increment |
222
- | `/sw-github:push {id}` | Push task progress to GitHub issue |
223
- | `/sw-github:close {id}` | Close GitHub issue |
224
- | `/sw-github:status {id}` | Check sync status |
225
- | `/sw:sync-specs` | Sync living docs locally |
196
+ <!-- SW:SECTION:syncing version="1.0.257" -->
197
+ ## External Sync
226
198
 
227
- **Mapping**: Feature Milestone | Story Issue | Task Checkbox
228
-
229
- **Auto-configured**: Sync enabled by default during `specweave init` when a tracker is selected.
230
-
231
- **After task completion**: Run `/sw:progress-sync` or `/sw-github:push` to sync changes to external tools.
199
+ Primary: `/sw:progress-sync`. Individual: `/sw-github:push`, `/sw-github:close`. Mapping: Feature→Milestone | Story→Issue | Task→Checkbox.
232
200
  <!-- SW:END:syncing -->
233
201
 
234
- <!-- SW:SECTION:testing version="1.0.254" -->
202
+ <!-- SW:SECTION:testing version="1.0.257" -->
235
203
  ## Testing
236
204
 
237
- BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
238
-
239
- ```typescript
240
- // ESM mocking: vi.hoisted() + vi.mock() (Vitest 4.x+)
241
- const { mockFn } = vi.hoisted(() => ({ mockFn: vi.fn() }));
242
- vi.mock('./module', () => ({ func: mockFn }));
243
- ```
244
-
245
- ### Browser Automation Mode
246
-
247
- **Default**: `@playwright/cli` if installed (98% token reduction vs MCP)
248
- **Fallback**: Playwright MCP plugin (rich DOM introspection)
249
- **Config**: `testing.playwright.preferCli: true|false` in `.specweave/config.json`
250
- **Install CLI**: `npm install -g @playwright/cli@latest`
205
+ BDD in tasks.md | Unit >80% | `.test.ts` (Vitest) | ESM mocking: `vi.hoisted()` + `vi.mock()`
251
206
  <!-- SW:END:testing -->
252
207
 
253
- <!-- SW:SECTION:tdd version="1.0.254" -->
254
- ## TDD Mode (Test-Driven Development)
255
-
256
- **When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
257
-
258
- ### TDD Workflow (MANDATORY when configured)
259
-
260
- ```
261
- 1. RED: Write FAILING test first → verify it fails
262
- 2. GREEN: Write MINIMAL code to pass → no extra features
263
- 3. REFACTOR: Improve code quality → keep tests green
264
- ```
265
-
266
- ### Check TDD Mode Before Implementation
267
-
268
- ```bash
269
- # Check if TDD mode is enabled
270
- jq -r '.testing.defaultTestMode' .specweave/config.json
271
- # Returns: "TDD" | "test-first" | "test-after"
272
- ```
273
-
274
- ### TDD Commands
275
-
276
- | Command | Phase | Purpose |
277
- |---------|-------|---------|
278
- | `/sw:tdd-red` | RED | Write failing tests |
279
- | `/sw:tdd-green` | GREEN | Minimal implementation |
280
- | `/sw:tdd-refactor` | REFACTOR | Code quality improvement |
281
- | `/sw:tdd-cycle` | ALL | Full orchestrated workflow |
282
-
283
- ### Enforcement Levels
284
-
285
- Set `testing.tddEnforcement` in config.json:
208
+ <!-- SW:SECTION:tdd version="1.0.257" -->
209
+ ## TDD
286
210
 
287
- | Level | Behavior |
288
- |-------|----------|
289
- | `strict` | **BLOCKS** task completion if RED not done before GREEN |
290
- | `warn` | Shows warning but allows continuation (default) |
291
- | `off` | No enforcement |
292
-
293
- ### TDD Task Format
294
-
295
- When TDD is enabled, tasks include phase markers:
296
-
297
- ```markdown
298
- ### T-001: [RED] Write auth service tests
299
- **Depends On**: None
300
- **Status**: [ ] pending
301
-
302
- ### T-002: [GREEN] Implement auth service
303
- **Depends On**: T-001
304
- **Status**: [ ] pending
305
-
306
- ### T-003: [REFACTOR] Extract token utilities
307
- **Depends On**: T-002
308
- **Status**: [ ] pending
309
- ```
310
-
311
- **Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
211
+ When `testing.defaultTestMode: "TDD"` in config.json: RED→GREEN→REFACTOR. Use `/sw:tdd-cycle`. Enforcement via `testing.tddEnforcement` (strict|warn|off). Tasks use `[RED]`/`[GREEN]`/`[REFACTOR]` markers with dependencies.
312
212
  <!-- SW:END:tdd -->
313
213
 
314
- <!-- SW:SECTION:api version="1.0.254" -->
315
- ## API Development (OpenAPI-First)
316
-
317
- **For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
318
-
319
- Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
214
+ <!-- SW:SECTION:api version="1.0.257" -->
215
+ <!-- API docs: use /sw:api-docs when apiDocs.enabled in config -->
320
216
  <!-- SW:END:api -->
321
217
 
322
- <!-- SW:SECTION:limits version="1.0.254" -->
218
+ <!-- SW:SECTION:limits version="1.0.256" -->
323
219
  ## Limits
324
220
 
325
221
  **Max 1500 lines/file** — extract before adding
326
222
  <!-- SW:END:limits -->
327
223
 
328
- <!-- SW:SECTION:troubleshooting version="1.0.254" -->
224
+ <!-- SW:SECTION:troubleshooting version="1.0.257" -->
329
225
  ## Troubleshooting
330
226
 
331
- | Issue | Fix |
332
- |-------|-----|
333
- | Skills/commands missing | Restart Claude Code |
334
- | Plugins outdated | `specweave refresh-marketplace` |
335
- | Out of sync | `/sw:sync-tasks` |
336
- | Duplicate IDs | `/sw:fix-duplicates` |
337
- | Edits blocked | Add `"additionalDirectories":["repositories"]` to `.claude/settings.json` |
338
- | Session stuck | Kill + `rm -f .specweave/state/*.lock` + restart |
227
+ Skills missing → restart Claude Code | Plugins outdated → `specweave refresh-marketplace` | Stuck → `rm -f .specweave/state/*.lock` + restart
339
228
  <!-- SW:END:troubleshooting -->
340
229
 
341
- <!-- SW:SECTION:lazyloading version="1.0.254" -->
342
- ## Plugin Auto-Loading
343
-
344
- Plugins load automatically based on project type and keywords. Manual install if needed:
345
-
346
- ```bash
347
- claude plugin install sw-frontend@specweave # Install plugin
348
- claude plugin list # Check installed
349
- export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
350
- ```
230
+ <!-- SW:SECTION:lazyloading version="1.0.257" -->
231
+ ## Plugins
351
232
 
352
- **Token savings**: Core ~3-5K tokens vs all plugins ~60K+
233
+ Auto-loaded by project type. Manual: `claude plugin install sw-frontend@specweave`. Disable: `SPECWEAVE_DISABLE_AUTO_LOAD=1`.
353
234
  <!-- SW:END:lazyloading -->
354
235
 
355
- <!-- SW:SECTION:principles version="1.0.254" -->
236
+ <!-- SW:SECTION:principles version="1.0.256" -->
356
237
  ## Principles
357
238
 
358
239
  ### SpecWeave Principles
@@ -368,7 +249,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
368
249
  - **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).
369
250
  <!-- SW:END:principles -->
370
251
 
371
- <!-- SW:SECTION:linking version="1.0.254" -->
252
+ <!-- SW:SECTION:linking version="1.0.256" -->
372
253
  ## Bidirectional Linking
373
254
 
374
255
  Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
@@ -376,46 +257,19 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
376
257
  Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
377
258
  <!-- SW:END:linking -->
378
259
 
379
- <!-- SW:SECTION:mcp version="1.0.254" -->
260
+ <!-- SW:SECTION:mcp version="1.0.257" -->
380
261
  ## External Services
381
262
 
382
- **Priority**: CLI tools first (simpler) → MCP for complex integrations
383
-
384
- **CLI tools** (check auth first):
385
- ```bash
386
- gh auth status # GitHub
387
- wrangler whoami # Cloudflare
388
- supabase status # Supabase
389
- ```
390
-
391
- **MCP servers** (for richer integrations):
392
- ```bash
393
- claude mcp add --transport http github https://api.github.com/mcp
394
- claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server-postgres
395
- /mcp # Check status in Claude Code
396
- ```
397
-
398
- MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
263
+ CLI tools first (`gh`, `wrangler`, `supabase`) → MCP for complex integrations.
399
264
  <!-- SW:END:mcp -->
400
265
 
401
- <!-- SW:SECTION:auto version="1.0.254" -->
266
+ <!-- SW:SECTION:auto version="1.0.257" -->
402
267
  ## Auto Mode
403
268
 
404
- **Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
405
-
406
- **Pattern**: IMPLEMENT → TEST → FAIL? → FIX → PASS → NEXT
407
-
408
- **TDD in Auto Mode**: If `testing.defaultTestMode: "TDD"` is configured:
409
- - Use `/sw:auto --tdd` for strict enforcement (ALL tests must pass)
410
- - Auto mode reads config and displays TDD banner
411
- - Follow RED → GREEN → REFACTOR order for task triplets
412
-
413
- **Pragmatic completion**: MUST (MVP, security, data integrity) | SHOULD (edge cases) | CAN SKIP (conflicts - ask user)
414
-
415
- **STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
269
+ `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency). Pattern: IMPLEMENT→TEST→FIX→NEXT. STOP & ASK if spec conflicts or ambiguous requirements.
416
270
  <!-- SW:END:auto -->
417
271
 
418
- <!-- SW:SECTION:docs version="1.0.254" -->
272
+ <!-- SW:SECTION:docs version="1.0.256" -->
419
273
  ## Docs
420
274
 
421
275
  [spec-weave.com](https://spec-weave.com)
@@ -423,26 +277,6 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
423
277
 
424
278
  ---
425
279
 
426
- # SpecWeave Contributor Guide
280
+ # Contributor Guide
427
281
 
428
- **Full guide**: [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md)
429
-
430
- | Rule | Detail |
431
- |---|---|
432
- | Completion | `/sw:done` only (NEVER edit metadata.json) |
433
- | Protected dirs | NEVER delete `.specweave/docs/`, `.specweave/increments/` |
434
- | Token budget | ~80k/increment, max 25 tasks, max 1500 lines/file |
435
- | Marketplace | Contributors: `scripts/refresh-marketplace.sh` \| Users: `specweave refresh-marketplace` |
436
- | No `name:` in frontmatter | Strips plugin prefix (`/sw:grill` → `/grill`) |
437
- | Plugin naming | CLI: `sw-*` \| Filesystem: `specweave-*` |
438
- | Imports | ALWAYS `.js` extensions |
439
- | Tests | `.test.ts`, `vi.fn()`, `os.tmpdir()` |
440
- | Logger | `logger` over `console.*` |
441
-
442
- ```bash
443
- npm run rebuild # Clean + build
444
- npm test # All tests
445
-
446
- # Stuck: pkill -f "cat.*EOF" ; pkill -9 -f "bash.*specweave" ; rm -f .specweave/state/*.lock
447
- # Debug: SPECWEAVE_DEBUG_HOOKS=1 | SPECWEAVE_DISABLE_HOOKS=1
448
- ```
282
+ See [.github/CONTRIBUTING.md](.github/CONTRIBUTING.md). Key: `.js` imports | `.test.ts` (Vitest) | `logger` over `console.*` | No `name:` in frontmatter | `npm run rebuild` + `npm test`