specweave 1.0.247 → 1.0.248

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.
package/CLAUDE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- SW:META template="claude" version="1.0.246" 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.247" 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.246" -->
14
+ <!-- SW:SECTION:header version="1.0.247" -->
15
15
  **Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
16
16
  <!-- SW:END:header -->
17
17
 
@@ -48,7 +48,7 @@ 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.246" -->
51
+ <!-- SW:SECTION:start version="1.0.247" -->
52
52
  ## Getting Started
53
53
 
54
54
  **Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
@@ -58,7 +58,7 @@ If auto-activation fails, invoke explicitly: `Skill({ skill: "name" })`
58
58
  2. **Customize**: Edit spec.md and use for setup tasks
59
59
  <!-- SW:END:start -->
60
60
 
61
- <!-- SW:SECTION:autodetect version="1.0.246" -->
61
+ <!-- SW:SECTION:autodetect version="1.0.247" -->
62
62
  ## Auto-Detection
63
63
 
64
64
  SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
@@ -68,7 +68,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
68
68
  **Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
69
69
  <!-- SW:END:autodetect -->
70
70
 
71
- <!-- SW:SECTION:metarule version="1.0.246" -->
71
+ <!-- SW:SECTION:metarule version="1.0.247" -->
72
72
  ## Workflow Orchestration
73
73
 
74
74
  ### 1. Plan Mode Default
@@ -95,7 +95,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
95
95
  ```
96
96
  <!-- SW:END:metarule -->
97
97
 
98
- <!-- SW:SECTION:rules version="1.0.246" -->
98
+ <!-- SW:SECTION:rules version="1.0.247" -->
99
99
  ## Rules
100
100
 
101
101
  1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
@@ -116,7 +116,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
116
116
  Discover org from config: `repository.organization` → `sync.profiles` → `umbrella.childRepos` → filesystem
117
117
  <!-- SW:END:rules -->
118
118
 
119
- <!-- SW:SECTION:workflow version="1.0.246" -->
119
+ <!-- SW:SECTION:workflow version="1.0.247" -->
120
120
  ## Workflow
121
121
 
122
122
  `/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
@@ -142,7 +142,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
142
142
  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
143
  <!-- SW:END:save-nested-repos -->
144
144
 
145
- <!-- SW:SECTION:reflect version="1.0.246" -->
145
+ <!-- SW:SECTION:reflect version="1.0.247" -->
146
146
  ## Skill Memories
147
147
 
148
148
  SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
@@ -163,7 +163,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
163
163
  - Prefer leaderboard-style reporting for analysis
164
164
  - Auto mode: Stop hook creates implicit loops via block/approve pattern
165
165
 
166
- <!-- SW:SECTION:context version="1.0.246" -->
166
+ <!-- SW:SECTION:context version="1.0.247" -->
167
167
  ## Context
168
168
 
169
169
  **Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
@@ -171,7 +171,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
171
171
  **Load context**: `/sw:context <topic>` loads relevant living docs into conversation
172
172
  <!-- SW:END:context -->
173
173
 
174
- <!-- SW:SECTION:structure version="1.0.246" -->
174
+ <!-- SW:SECTION:structure version="1.0.247" -->
175
175
  ## Structure
176
176
 
177
177
  ```
@@ -186,7 +186,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
186
186
  **Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
187
187
  <!-- SW:END:structure -->
188
188
 
189
- <!-- SW:SECTION:taskformat version="1.0.246" -->
189
+ <!-- SW:SECTION:taskformat version="1.0.247" -->
190
190
  ## Task Format
191
191
 
192
192
  ```markdown
@@ -196,7 +196,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
196
196
  ```
197
197
  <!-- SW:END:taskformat -->
198
198
 
199
- <!-- SW:SECTION:secrets version="1.0.246" -->
199
+ <!-- SW:SECTION:secrets version="1.0.247" -->
200
200
  ## Secrets Check
201
201
 
202
202
  **BEFORE CLI tools**: Check existing config first!
@@ -210,7 +210,7 @@ gh auth status
210
210
  **SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
211
211
  <!-- SW:END:secrets -->
212
212
 
213
- <!-- SW:SECTION:syncing version="1.0.246" -->
213
+ <!-- SW:SECTION:syncing version="1.0.247" -->
214
214
  ## External Sync (GitHub/JIRA/ADO)
215
215
 
216
216
  **Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
@@ -220,7 +220,7 @@ gh auth status
220
220
  **Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
221
221
  <!-- SW:END:syncing -->
222
222
 
223
- <!-- SW:SECTION:testing version="1.0.246" -->
223
+ <!-- SW:SECTION:testing version="1.0.247" -->
224
224
  ## Testing
225
225
 
226
226
  BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
@@ -239,7 +239,7 @@ vi.mock('./module', () => ({ func: mockFn }));
239
239
  **Install CLI**: `npm install -g @playwright/cli@latest`
240
240
  <!-- SW:END:testing -->
241
241
 
242
- <!-- SW:SECTION:tdd version="1.0.246" -->
242
+ <!-- SW:SECTION:tdd version="1.0.247" -->
243
243
  ## TDD Mode (Test-Driven Development)
244
244
 
245
245
  **When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
@@ -300,7 +300,7 @@ When TDD is enabled, tasks include phase markers:
300
300
  **Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
301
301
  <!-- SW:END:tdd -->
302
302
 
303
- <!-- SW:SECTION:api version="1.0.246" -->
303
+ <!-- SW:SECTION:api version="1.0.247" -->
304
304
  ## API Development (OpenAPI-First)
305
305
 
306
306
  **For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
@@ -308,13 +308,13 @@ When TDD is enabled, tasks include phase markers:
308
308
  Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
309
309
  <!-- SW:END:api -->
310
310
 
311
- <!-- SW:SECTION:limits version="1.0.246" -->
311
+ <!-- SW:SECTION:limits version="1.0.247" -->
312
312
  ## Limits
313
313
 
314
314
  **Max 1500 lines/file** — extract before adding
315
315
  <!-- SW:END:limits -->
316
316
 
317
- <!-- SW:SECTION:troubleshooting version="1.0.246" -->
317
+ <!-- SW:SECTION:troubleshooting version="1.0.247" -->
318
318
  ## Troubleshooting
319
319
 
320
320
  | Issue | Fix |
@@ -327,7 +327,7 @@ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
327
327
  | Session stuck | Kill + `rm -f .specweave/state/*.lock` + restart |
328
328
  <!-- SW:END:troubleshooting -->
329
329
 
330
- <!-- SW:SECTION:lazyloading version="1.0.246" -->
330
+ <!-- SW:SECTION:lazyloading version="1.0.247" -->
331
331
  ## Plugin Auto-Loading
332
332
 
333
333
  Plugins load automatically based on project type and keywords. Manual install if needed:
@@ -341,7 +341,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
341
341
  **Token savings**: Core ~3-5K tokens vs all plugins ~60K+
342
342
  <!-- SW:END:lazyloading -->
343
343
 
344
- <!-- SW:SECTION:principles version="1.0.246" -->
344
+ <!-- SW:SECTION:principles version="1.0.247" -->
345
345
  ## Principles
346
346
 
347
347
  ### SpecWeave Principles
@@ -357,7 +357,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
357
357
  - **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).
358
358
  <!-- SW:END:principles -->
359
359
 
360
- <!-- SW:SECTION:linking version="1.0.246" -->
360
+ <!-- SW:SECTION:linking version="1.0.247" -->
361
361
  ## Bidirectional Linking
362
362
 
363
363
  Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
@@ -365,7 +365,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
365
365
  Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
366
366
  <!-- SW:END:linking -->
367
367
 
368
- <!-- SW:SECTION:mcp version="1.0.246" -->
368
+ <!-- SW:SECTION:mcp version="1.0.247" -->
369
369
  ## External Services
370
370
 
371
371
  **Priority**: CLI tools first (simpler) → MCP for complex integrations
@@ -387,7 +387,7 @@ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server
387
387
  MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
388
388
  <!-- SW:END:mcp -->
389
389
 
390
- <!-- SW:SECTION:auto version="1.0.246" -->
390
+ <!-- SW:SECTION:auto version="1.0.247" -->
391
391
  ## Auto Mode
392
392
 
393
393
  **Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
@@ -404,7 +404,7 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
404
404
  **STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
405
405
  <!-- SW:END:auto -->
406
406
 
407
- <!-- SW:SECTION:docs version="1.0.246" -->
407
+ <!-- SW:SECTION:docs version="1.0.247" -->
408
408
  ## Docs
409
409
 
410
410
  [spec-weave.com](https://spec-weave.com)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specweave",
3
- "version": "1.0.247",
3
+ "version": "1.0.248",
4
4
  "description": "Spec-driven development framework for AI coding agents. First-class support for Claude Code — compatible with any LLM-powered coding tool. Living documentation, autonomous execution, quality gates, and multilingual support (9 languages).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1252,9 +1252,9 @@ ${SKILL_MEMORY}
1252
1252
  You MUST invoke this skill for this task. Do NOT implement directly without using this skill.
1253
1253
 
1254
1254
  **Invoke NOW using Skill tool:**
1255
- \\\`\\\`\\\`typescript
1256
- Skill({ skill: \\\"${SKILL_INVOCATION}\\\" })
1257
- \\\`\\\`\\\`
1255
+ \`\`\`typescript
1256
+ Skill({ skill: \"${SKILL_INVOCATION}\" })
1257
+ \`\`\`
1258
1258
 
1259
1259
  **Why this skill is required:**
1260
1260
  ${SKILL_REASON:-This skill provides specialized support for your task.}
@@ -1269,9 +1269,9 @@ ${SKILL_MEMORY}
1269
1269
  ### 💡 Recommended: Use ${SKILL_INVOCATION} Skill
1270
1270
 
1271
1271
  Consider invoking this skill for better results:
1272
- \\\`\\\`\\\`typescript
1273
- Skill({ skill: \\\"${SKILL_INVOCATION}\\\" })
1274
- \\\`\\\`\\\`
1272
+ \`\`\`typescript
1273
+ Skill({ skill: \"${SKILL_INVOCATION}\" })
1274
+ \`\`\`
1275
1275
  *${SKILL_REASON:-This skill provides specialized support for your task.}*"
1276
1276
  fi
1277
1277
  elif [[ "$ROUTING_SKILLS_COUNT" -gt 0 ]]; then
@@ -1287,13 +1287,13 @@ Skill({ skill: \\\"${SKILL_INVOCATION}\\\" })
1287
1287
  ### 🚀 Then SPAWN Specialized Agent
1288
1288
 
1289
1289
  **After creating increment, use Task tool:**
1290
- \\\`\\\`\\\`typescript
1290
+ \`\`\`typescript
1291
1291
  Task({
1292
- subagent_type: \\\"${AGENT_TYPE}\\\",
1293
- prompt: \\\"Implement the feature...\\\",
1294
- description: \\\"${PRIMARY_REASON:-Implementation}\\\"
1292
+ subagent_type: \"${AGENT_TYPE}\",
1293
+ prompt: \"Implement the feature...\",
1294
+ description: \"${PRIMARY_REASON:-Implementation}\"
1295
1295
  })
1296
- \\\`\\\`\\\`
1296
+ \`\`\`
1297
1297
  *Specialized agents produce better code than direct implementation.*"
1298
1298
  fi
1299
1299
  fi
@@ -1356,9 +1356,9 @@ ${INC_PLANNER_MEMORY_RAW}
1356
1356
  ╚══════════════════════════════════════════════════════════════════════════════╝
1357
1357
 
1358
1358
  **Your FIRST tool call must be:**
1359
- \\\`\\\`\\\`
1360
- Skill({ skill: \\\"sw:increment-planner\\\", args: \\\"${ESCAPED_PROMPT}\\\" })
1361
- \\\`\\\`\\\`
1359
+ \`\`\`
1360
+ Skill({ skill: \"sw:increment-planner\", args: \"${ESCAPED_PROMPT}\" })
1361
+ \`\`\`
1362
1362
 
1363
1363
  **Order matters:**
1364
1364
  1. ✅ Call Skill tool FIRST (as shown above)
@@ -1369,24 +1369,18 @@ Skill({ skill: \\\"sw:increment-planner\\\", args: \\\"${ESCAPED_PROMPT}\\\" })
1369
1369
 
1370
1370
  ---
1371
1371
 
1372
- ⚠️ **SKILL CHAINING REQUIRED** - \\\"SKILL FIRST\\\" does NOT mean \\\"only one skill\\\"!
1372
+ ⚠️ **SKILL CHAINING REQUIRED** - \"SKILL FIRST\" does NOT mean \"only one skill\"!
1373
1373
 
1374
1374
  After sw:increment-planner, ALSO invoke domain skills for your tech stack:
1375
- - React/Vue/Angular → \\\`sw-frontend:frontend-architect\\\`
1376
- - .NET/C# → \\\`sw-backend:dotnet-backend\\\`
1377
- - Stripe → \\\`sw-payments:stripe-integration\\\`
1375
+ - React/Vue/Angular → \`sw-frontend:frontend-architect\`
1376
+ - .NET/C# → \`sw-backend:dotnet-backend\`
1377
+ - Stripe → \`sw-payments:stripe-integration\`
1378
1378
  - After code → LSP works automatically (use findReferences, goToDefinition)
1379
1379
 
1380
- See CLAUDE.md section \\\"MANDATORY: Skill Chaining\\\" for full pattern."
1381
- # When INCREMENT_MANDATORY_CONFIG=true (from config), use block decision
1382
- # to actually prevent execution without increment creation
1383
- if [[ "$INCREMENT_MANDATORY_CONFIG" == "true" ]]; then
1384
- local escaped_block
1385
- escaped_block=$(escape_json_early "$MSG")
1386
- printf '{"decision":"block","reason":"%s"}\n' "$escaped_block"
1387
- else
1388
- output_approve_with_context "$MSG"
1389
- fi
1380
+ See CLAUDE.md section \"MANDATORY: Skill Chaining\" for full pattern."
1381
+ # Use approve+additionalContext so Claude can read and follow
1382
+ # the SKILL FIRST instructions (block erases prompt from context)
1383
+ output_approve_with_context "$MSG"
1390
1384
  exit 0
1391
1385
  else
1392
1386
  # v1.0.169: Also suggest direct skill call for non-mandatory
@@ -1427,14 +1421,7 @@ Or via command: \`/sw:increment --type=hotfix \"${INC_NAME:-urgent-fix}\"\`
1427
1421
  ---
1428
1422
 
1429
1423
  *Tip: Disable with \`incrementAssist.enabled: false\` in config.json*"
1430
- # When INCREMENT_MANDATORY_CONFIG=true, block hotfix too
1431
- if [[ "$INCREMENT_MANDATORY_CONFIG" == "true" ]]; then
1432
- local escaped_hotfix_block
1433
- escaped_hotfix_block=$(escape_json_early "$MSG")
1434
- printf '{"decision":"block","reason":"%s"}\n' "$escaped_hotfix_block"
1435
- else
1436
- output_approve_with_context "$MSG"
1437
- fi
1424
+ output_approve_with_context "$MSG"
1438
1425
  exit 0
1439
1426
  ;;
1440
1427
 
@@ -1479,14 +1466,7 @@ Or via command: \`$CMD_SMALLFIX\`
1479
1466
  ---
1480
1467
 
1481
1468
  *Tip: Disable with \`incrementAssist.enabled: false\` in config.json*"
1482
- # When INCREMENT_MANDATORY_CONFIG=true, block small_fix too
1483
- if [[ "$INCREMENT_MANDATORY_CONFIG" == "true" ]]; then
1484
- local escaped_smallfix_block
1485
- escaped_smallfix_block=$(escape_json_early "$MSG")
1486
- printf '{"decision":"block","reason":"%s"}\n' "$escaped_smallfix_block"
1487
- else
1488
- output_approve_with_context "$MSG"
1489
- fi
1469
+ output_approve_with_context "$MSG"
1490
1470
  exit 0
1491
1471
  ;;
1492
1472
  esac
@@ -1514,9 +1494,9 @@ Or via command: \`$CMD_SMALLFIX\`
1514
1494
  You MUST use this skill for this task. Do NOT proceed without loading it first.
1515
1495
 
1516
1496
  **Invoke NOW using Skill tool:**
1517
- \\\`\\\`\\\`typescript
1518
- Skill({ skill: \\\"${SKILL_INVOCATION}\\\" })
1519
- \\\`\\\`\\\`
1497
+ \`\`\`typescript
1498
+ Skill({ skill: \"${SKILL_INVOCATION}\" })
1499
+ \`\`\`
1520
1500
 
1521
1501
  **Why this skill is required:**
1522
1502
  ${SKILL_REASON:-This skill provides specialized support for your task.}
@@ -1529,10 +1509,10 @@ ${SKILL_REASON:-This skill provides specialized support for your task.}
1529
1509
  # Non-mandatory skill recommendation
1530
1510
  MSG="${SKILL_ONLY_PREFIX}💡 **Skill Recommended**: Consider using a specialized skill.
1531
1511
 
1532
- Use \\\`${SKILL_INVOCATION}\\\` for better results:
1533
- \\\`\\\`\\\`typescript
1534
- Skill({ skill: \\\"${SKILL_INVOCATION}\\\" })
1535
- \\\`\\\`\\\`
1512
+ Use \`${SKILL_INVOCATION}\` for better results:
1513
+ \`\`\`typescript
1514
+ Skill({ skill: \"${SKILL_INVOCATION}\" })
1515
+ \`\`\`
1536
1516
 
1537
1517
  *${SKILL_REASON:-This skill provides specialized support for your task.}*"
1538
1518
  output_approve_with_context "$MSG"