specweave 1.0.151 → 1.0.152

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,6 +1,6 @@
1
- <!-- SW:META template="claude" version="1.0.150" 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.151" 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
- <!-- SW:SECTION:header version="1.0.150" -->
3
+ <!-- SW:SECTION:header version="1.0.151" -->
4
4
  **Framework**: SpecWeave | **Truth**: `spec.md` + `tasks.md`
5
5
  <!-- SW:END:header -->
6
6
 
@@ -58,7 +58,7 @@ plugins/specweave/
58
58
  **Old "commands" are just skills with `disable-model-invocation: true`** - they only respond to explicit `/name` invocation, not keyword detection.
59
59
  <!-- SW:END:claude-code-concepts -->
60
60
 
61
- <!-- SW:SECTION:start version="1.0.150" -->
61
+ <!-- SW:SECTION:start version="1.0.151" -->
62
62
  ## Getting Started
63
63
 
64
64
  **Initial increment**: `0001-project-setup` (auto-created by `specweave init`)
@@ -68,7 +68,7 @@ plugins/specweave/
68
68
  2. **Customize**: Edit spec.md and use for setup tasks
69
69
  <!-- SW:END:start -->
70
70
 
71
- <!-- SW:SECTION:autodetect version="1.0.150" -->
71
+ <!-- SW:SECTION:autodetect version="1.0.151" -->
72
72
  ## Auto-Detection
73
73
 
74
74
  SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
@@ -78,7 +78,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
78
78
  **Opt-out phrases**: "Just brainstorm first" | "Don't plan yet" | "Quick discussion" | "Let's explore ideas"
79
79
  <!-- SW:END:autodetect -->
80
80
 
81
- <!-- SW:SECTION:metarule version="1.0.150" -->
81
+ <!-- SW:SECTION:metarule version="1.0.151" -->
82
82
  ## Meta-Rule: Think-Before-Act
83
83
 
84
84
  **Satisfy dependencies BEFORE dependent operations.**
@@ -89,7 +89,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
89
89
  ```
90
90
  <!-- SW:END:metarule -->
91
91
 
92
- <!-- SW:SECTION:rules version="1.0.150" -->
92
+ <!-- SW:SECTION:rules version="1.0.151" -->
93
93
  ## Rules
94
94
 
95
95
  1. **Files** → `.specweave/increments/####-name/` (see Structure section for details)
@@ -100,7 +100,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
100
100
  6. **⛔ Marketplace refresh**: Use `specweave refresh-marketplace` CLI (not `scripts/refresh-marketplace.sh`)
101
101
  <!-- SW:END:rules -->
102
102
 
103
- <!-- SW:SECTION:workflow version="1.0.150" -->
103
+ <!-- SW:SECTION:workflow version="1.0.151" -->
104
104
  ## Workflow
105
105
 
106
106
  `/sw:increment "X"` → `/sw:do` → `/sw:progress` → `/sw:done 0001`
@@ -120,7 +120,7 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
120
120
  **Natural language**: "Let's build X" → `/sw:increment` | "What's status?" → `/sw:progress` | "We're done" → `/sw:done` | "Ship while sleeping" → `/sw:auto`
121
121
  <!-- SW:END:workflow -->
122
122
 
123
- <!-- SW:SECTION:reflect version="1.0.150" -->
123
+ <!-- SW:SECTION:reflect version="1.0.151" -->
124
124
  ## Skill Memories
125
125
 
126
126
  SpecWeave learns from corrections. Learnings saved here automatically. Edit or delete as needed.
@@ -133,7 +133,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
133
133
  <!-- Auto-captured by SpecWeave reflect. Edit or delete as needed. -->
134
134
  <!-- Learnings are organized by skill name. User edits override SpecWeave defaults. -->
135
135
 
136
- <!-- SW:SECTION:context version="1.0.150" -->
136
+ <!-- SW:SECTION:context version="1.0.151" -->
137
137
  ## Context
138
138
 
139
139
  **Before implementing**: Check ADRs at `.specweave/docs/internal/architecture/adr/`
@@ -141,7 +141,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
141
141
  **Load context**: `/sw:context <topic>` loads relevant living docs into conversation
142
142
  <!-- SW:END:context -->
143
143
 
144
- <!-- SW:SECTION:structure version="1.0.150" -->
144
+ <!-- SW:SECTION:structure version="1.0.151" -->
145
145
  ## Structure
146
146
 
147
147
  ```
@@ -156,7 +156,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
156
156
  **Everything else → subfolders**: `reports/` | `logs/` | `scripts/` | `backups/`
157
157
  <!-- SW:END:structure -->
158
158
 
159
- <!-- SW:SECTION:taskformat version="1.0.150" -->
159
+ <!-- SW:SECTION:taskformat version="1.0.151" -->
160
160
  ## Task Format
161
161
 
162
162
  ```markdown
@@ -166,7 +166,7 @@ SpecWeave learns from corrections. Learnings saved here automatically. Edit or d
166
166
  ```
167
167
  <!-- SW:END:taskformat -->
168
168
 
169
- <!-- SW:SECTION:secrets version="1.0.150" -->
169
+ <!-- SW:SECTION:secrets version="1.0.151" -->
170
170
  ## Secrets Check
171
171
 
172
172
  **BEFORE CLI tools**: Check existing config first!
@@ -180,7 +180,7 @@ gh auth status
180
180
  **SECURITY**: NEVER use `grep TOKEN .env` without `-q` flag - it exposes credentials in terminal!
181
181
  <!-- SW:END:secrets -->
182
182
 
183
- <!-- SW:SECTION:syncing version="1.0.150" -->
183
+ <!-- SW:SECTION:syncing version="1.0.151" -->
184
184
  ## External Sync (GitHub/JIRA/ADO)
185
185
 
186
186
  **Commands**: `/sw-github:sync {id}` (issues) | `/sw:sync-specs` (living docs only)
@@ -190,7 +190,7 @@ gh auth status
190
190
  **Config**: Set `sync.github.enabled: true` + `canUpdateExternalItems: true` in config.json
191
191
  <!-- SW:END:syncing -->
192
192
 
193
- <!-- SW:SECTION:testing version="1.0.150" -->
193
+ <!-- SW:SECTION:testing version="1.0.151" -->
194
194
  ## Testing
195
195
 
196
196
  BDD in tasks.md | Unit >80% | `.test.ts` (Vitest)
@@ -202,7 +202,7 @@ vi.mock('./module', () => ({ func: mockFn }));
202
202
  ```
203
203
  <!-- SW:END:testing -->
204
204
 
205
- <!-- SW:SECTION:tdd version="1.0.150" -->
205
+ <!-- SW:SECTION:tdd version="1.0.151" -->
206
206
  ## TDD Mode (Test-Driven Development)
207
207
 
208
208
  **When `testing.defaultTestMode: "TDD"` is configured**, follow RED-GREEN-REFACTOR discipline:
@@ -263,7 +263,7 @@ When TDD is enabled, tasks include phase markers:
263
263
  **Rule**: Complete dependencies BEFORE dependent tasks (RED before GREEN).
264
264
  <!-- SW:END:tdd -->
265
265
 
266
- <!-- SW:SECTION:api version="1.0.150" -->
266
+ <!-- SW:SECTION:api version="1.0.151" -->
267
267
  ## API Development (OpenAPI-First)
268
268
 
269
269
  **For API projects only.** Commands: `/sw:api-docs --all` | `--openapi` | `--postman` | `--validate`
@@ -271,13 +271,13 @@ When TDD is enabled, tasks include phase markers:
271
271
  Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
272
272
  <!-- SW:END:api -->
273
273
 
274
- <!-- SW:SECTION:limits version="1.0.150" -->
274
+ <!-- SW:SECTION:limits version="1.0.151" -->
275
275
  ## Limits
276
276
 
277
277
  **Max 1500 lines/file** — extract before adding
278
278
  <!-- SW:END:limits -->
279
279
 
280
- <!-- SW:SECTION:troubleshooting version="1.0.150" -->
280
+ <!-- SW:SECTION:troubleshooting version="1.0.151" -->
281
281
  ## Troubleshooting
282
282
 
283
283
  | Issue | Fix |
@@ -293,7 +293,7 @@ Enable in config: `{"apiDocs":{"enabled":true,"openApiPath":"openapi.yaml"}}`
293
293
  | Marketplace shows 0 | Normal with auto-load; `/plugin list` shows actual |
294
294
  <!-- SW:END:troubleshooting -->
295
295
 
296
- <!-- SW:SECTION:lazyloading version="1.0.150" -->
296
+ <!-- SW:SECTION:lazyloading version="1.0.151" -->
297
297
  ## Plugin Auto-Loading
298
298
 
299
299
  Plugins load automatically based on project type and keywords. Manual install if needed:
@@ -307,7 +307,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
307
307
  **Token savings**: Core ~3-5K tokens vs all plugins ~60K+
308
308
  <!-- SW:END:lazyloading -->
309
309
 
310
- <!-- SW:SECTION:principles version="1.0.150" -->
310
+ <!-- SW:SECTION:principles version="1.0.151" -->
311
311
  ## Principles
312
312
 
313
313
  1. **Spec-first**: `/sw:increment` before coding
@@ -316,7 +316,7 @@ export SPECWEAVE_DISABLE_AUTO_LOAD=1 # Disable auto-load
316
316
  4. **Traceable**: All work → specs → ACs
317
317
  <!-- SW:END:principles -->
318
318
 
319
- <!-- SW:SECTION:linking version="1.0.150" -->
319
+ <!-- SW:SECTION:linking version="1.0.151" -->
320
320
  ## Bidirectional Linking
321
321
 
322
322
  Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
@@ -324,7 +324,7 @@ Tasks ↔ User Stories auto-linked via AC-IDs: `AC-US1-01` → `US-001`
324
324
  Task format: `**AC**: AC-US1-01, AC-US1-02` (CRITICAL for linking)
325
325
  <!-- SW:END:linking -->
326
326
 
327
- <!-- SW:SECTION:mcp version="1.0.150" -->
327
+ <!-- SW:SECTION:mcp version="1.0.151" -->
328
328
  ## External Services
329
329
 
330
330
  **Priority**: CLI tools first (simpler) → MCP for complex integrations
@@ -346,7 +346,7 @@ claude mcp add --transport stdio postgres -- npx -y @modelcontextprotocol/server
346
346
  MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
347
347
  <!-- SW:END:mcp -->
348
348
 
349
- <!-- SW:SECTION:auto version="1.0.150" -->
349
+ <!-- SW:SECTION:auto version="1.0.151" -->
350
350
  ## Auto Mode
351
351
 
352
352
  **Commands**: `/sw:auto` (start) | `/sw:auto-status` (check) | `/sw:cancel-auto` (emergency only)
@@ -363,7 +363,7 @@ MCP supports lazy-loading (auto mode) - tools load on-demand when >10% context.
363
363
  **STOP & ASK** if: Spec conflicts | Task unnecessary | Requirement ambiguous
364
364
  <!-- SW:END:auto -->
365
365
 
366
- <!-- SW:SECTION:docs version="1.0.150" -->
366
+ <!-- SW:SECTION:docs version="1.0.151" -->
367
367
  ## Docs
368
368
 
369
369
  [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.151",
3
+ "version": "1.0.152",
4
4
  "description": "Spec-driven development framework for Claude Code. AI-native workflow with living documentation, intelligent agents, and multilingual support (9 languages). Enterprise-grade traceability with permanent specs and temporary increments.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,7 @@
1
1
  #!/bin/bash
2
2
  # fail-fast-wrapper.sh - Non-blocking timeout wrapper for hooks
3
3
  #
4
+ # v1.0.153: Hook-specific timeouts (user-prompt-submit: 30s for LLM detection)
4
5
  # v1.0.102+: Cross-platform support (Linux, macOS, BSD, Windows Git Bash)
5
6
  #
6
7
  # CRITICAL DESIGN PRINCIPLE:
@@ -20,7 +21,30 @@
20
21
  set +e # CRITICAL: Never exit on error
21
22
 
22
23
  HOOK_TIMEOUT="${HOOK_TIMEOUT:-5}"
23
- WRAPPER_VERSION="1.0.102"
24
+ WRAPPER_VERSION="1.0.153"
25
+
26
+ # ============================================================================
27
+ # HOOK-SPECIFIC TIMEOUT OVERRIDES (v1.0.153)
28
+ # ============================================================================
29
+ # Some hooks require longer timeouts due to LLM calls or network operations.
30
+ # user-prompt-submit.sh: LLM-based detect-intent (~15s) + plugin installs (~4s)
31
+ # Override defaults here while keeping fast timeouts for simple hooks.
32
+ #
33
+ # Environment overrides (if you need custom values):
34
+ # HOOK_TIMEOUT_USER_PROMPT - timeout for user-prompt-submit (default: 30)
35
+ # HOOK_TIMEOUT_SESSION_START - timeout for session-start (default: 20)
36
+
37
+ script_name=$(basename "${1:-}" 2>/dev/null)
38
+ case "$script_name" in
39
+ user-prompt-submit.sh)
40
+ # LLM-based plugin detection (~15s) + plugin installs (~4s) + buffer
41
+ HOOK_TIMEOUT="${HOOK_TIMEOUT_USER_PROMPT:-30}"
42
+ ;;
43
+ session-start.sh)
44
+ # Project detection may involve file scanning and optional LLM
45
+ HOOK_TIMEOUT="${HOOK_TIMEOUT_SESSION_START:-20}"
46
+ ;;
47
+ esac
24
48
 
25
49
  # ============================================================================
26
50
  # PROJECT ROOT DETECTION (for logging) - CRITICAL: must NOT fallback to pwd!