specweave 1.0.479 → 1.0.481

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 (58) hide show
  1. package/bin/specweave.js +4 -2
  2. package/dist/src/cli/commands/init.d.ts.map +1 -1
  3. package/dist/src/cli/commands/init.js +1 -0
  4. package/dist/src/cli/commands/init.js.map +1 -1
  5. package/dist/src/cli/commands/refresh-plugins.d.ts +9 -3
  6. package/dist/src/cli/commands/refresh-plugins.d.ts.map +1 -1
  7. package/dist/src/cli/commands/refresh-plugins.js +56 -31
  8. package/dist/src/cli/commands/refresh-plugins.js.map +1 -1
  9. package/dist/src/cli/commands/update.d.ts +1 -1
  10. package/dist/src/cli/commands/update.d.ts.map +1 -1
  11. package/dist/src/cli/helpers/init/plugin-installer.d.ts +2 -0
  12. package/dist/src/cli/helpers/init/plugin-installer.d.ts.map +1 -1
  13. package/dist/src/cli/helpers/init/plugin-installer.js +2 -1
  14. package/dist/src/cli/helpers/init/plugin-installer.js.map +1 -1
  15. package/dist/src/core/hooks/LifecycleHookDispatcher.d.ts.map +1 -1
  16. package/dist/src/core/hooks/LifecycleHookDispatcher.js +19 -6
  17. package/dist/src/core/hooks/LifecycleHookDispatcher.js.map +1 -1
  18. package/dist/src/core/lazy-loading/llm-plugin-detector.js +1 -1
  19. package/dist/src/core/lazy-loading/llm-plugin-detector.js.map +1 -1
  20. package/dist/src/core/skill-gen/signal-collector.d.ts +2 -0
  21. package/dist/src/core/skill-gen/signal-collector.d.ts.map +1 -1
  22. package/dist/src/core/skill-gen/signal-collector.js +3 -2
  23. package/dist/src/core/skill-gen/signal-collector.js.map +1 -1
  24. package/dist/src/utils/cleanup-stale-plugins.d.ts +2 -0
  25. package/dist/src/utils/cleanup-stale-plugins.d.ts.map +1 -1
  26. package/dist/src/utils/cleanup-stale-plugins.js +106 -30
  27. package/dist/src/utils/cleanup-stale-plugins.js.map +1 -1
  28. package/dist/src/utils/plugin-copier.d.ts.map +1 -1
  29. package/dist/src/utils/plugin-copier.js +30 -31
  30. package/dist/src/utils/plugin-copier.js.map +1 -1
  31. package/package.json +1 -1
  32. package/plugins/specweave/hooks/user-prompt-submit.sh +48 -41
  33. package/plugins/specweave/skills/architect/SKILL.md +1 -1
  34. package/plugins/specweave/skills/auto/SKILL.md +1 -1
  35. package/plugins/specweave/skills/brainstorm/SKILL.md +1 -1
  36. package/plugins/specweave/skills/debug/SKILL.md +1 -1
  37. package/plugins/specweave/skills/do/SKILL.md +1 -1
  38. package/plugins/specweave/skills/done/SKILL.md +1 -1
  39. package/plugins/specweave/skills/e2e/SKILL.md +1 -1
  40. package/plugins/specweave/skills/get/SKILL.md +1 -1
  41. package/plugins/specweave/skills/grill/SKILL.md +1 -1
  42. package/plugins/specweave/skills/import/SKILL.md +1 -1
  43. package/plugins/specweave/skills/increment/SKILL.md +1 -1
  44. package/plugins/specweave/skills/judge-llm/SKILL.md +1 -1
  45. package/plugins/specweave/skills/npm/SKILL.md +1 -1
  46. package/plugins/specweave/skills/plan/SKILL.md +1 -1
  47. package/plugins/specweave/skills/pm/SKILL.md +1 -1
  48. package/plugins/specweave/skills/pr/SKILL.md +1 -1
  49. package/plugins/specweave/skills/progress-sync/SKILL.md +1 -1
  50. package/plugins/specweave/skills/sync-docs/SKILL.md +1 -1
  51. package/plugins/specweave/skills/tdd-cycle/SKILL.md +1 -1
  52. package/plugins/specweave/skills/tdd-green/SKILL.md +1 -1
  53. package/plugins/specweave/skills/tdd-red/SKILL.md +1 -1
  54. package/plugins/specweave/skills/tdd-refactor/SKILL.md +1 -1
  55. package/plugins/specweave/skills/team-build/SKILL.md +1 -1
  56. package/plugins/specweave/skills/team-lead/SKILL.md +1 -1
  57. package/plugins/specweave/skills/team-merge/SKILL.md +1 -1
  58. package/plugins/specweave/skills/validate/SKILL.md +1 -1
@@ -474,35 +474,10 @@ check_plugin_in_vskill_lock() {
474
474
  fi
475
475
  }
476
476
 
477
- # Helper: Check if plugin is installed by reading installed_plugins.json (v1.0.175)
478
- # This is the SOURCE OF TRUTH - more reliable than `claude plugin list` which can have timing issues.
479
- # Args: $1=plugin name (e.g., "frontend"), $2=marketplace (e.g., "vskill")
480
- # Returns: 0 if installed, 1 if not installed
481
- check_plugin_installed_from_json() {
482
- local plugin="$1"
483
- local marketplace="$2"
484
- local registry_path="${HOME}/.claude/plugins/installed_plugins.json"
485
-
486
- # File must exist
487
- [[ ! -f "$registry_path" ]] && return 1
488
-
489
- # Must have jq for reliable JSON parsing
490
- if ! command -v jq >/dev/null 2>&1; then
491
- return 1 # Fallback to CLI check if jq not available
492
- fi
493
-
494
- # Check if plugin exists in registry
495
- # Format: {"plugins": {"frontend@vskill": [...], ...}}
496
- local full_name="${plugin}@${marketplace}"
497
- local has_plugin
498
- has_plugin=$(jq -r --arg key "$full_name" '.plugins[$key] // null' "$registry_path" 2>/dev/null)
499
-
500
- if [[ "$has_plugin" != "null" ]] && [[ -n "$has_plugin" ]]; then
501
- return 0 # Installed
502
- else
503
- return 1 # Not installed
504
- fi
505
- }
477
+ # ==============================================================================
478
+ # check_plugin_installed_from_json REMOVED (v1.0.535)
479
+ # Plugins are now pre-installed at init time. No runtime installation checks needed.
480
+ # ==============================================================================
506
481
 
507
482
  # ==============================================================================
508
483
  # KEYWORD-BASED PLUGIN DETECTION REMOVED (v1.0.159)
@@ -1192,13 +1167,48 @@ if [[ "${SPECWEAVE_DISABLE_AUTO_LOAD:-0}" != "1" ]] && [[ "${SPECWEAVE_DISABLE_H
1192
1167
  fi
1193
1168
 
1194
1169
  # ==================================================================
1195
- # PLUGIN INSTALLATION/SUGGESTION — REMOVED (v1.0.535)
1170
+ # ON-DEMAND PLUGIN INSTALL (v1.0.540 — restored)
1196
1171
  # ==================================================================
1197
- # On-demand plugin installation via `claude plugin install` has been
1198
- # removed. All plugins are now installed at init time by copying
1199
- # SKILL.md files directly into .claude/skills/ (project-local).
1200
- # Use `specweave refresh-plugins` to update plugin skills.
1172
+ # When LLM detect-intent identifies plugins needed for this prompt,
1173
+ # install any that aren't already present. Uses specweave CLI's
1174
+ # --plugin flag for targeted install. Session markers prevent
1175
+ # duplicate installs within the same Claude Code session.
1201
1176
  # ==================================================================
1177
+ DETECTED_PLUGINS=$(echo "$JSON_OUTPUT" | jq -r '.plugins[]? // empty' 2>/dev/null)
1178
+ if [[ -n "$DETECTED_PLUGINS" ]]; then
1179
+ CACHE_BASE="${HOME}/.claude/plugins/cache/specweave"
1180
+ SKILLS_BASE="${SW_PROJECT_ROOT:-.}/.claude/skills"
1181
+ SESSION_MARKER_DIR="${TMPDIR:-/tmp}/specweave-ondemand-$$"
1182
+ mkdir -p "$SESSION_MARKER_DIR" 2>/dev/null
1183
+ ONDEMAND_INSTALL_PID=""
1184
+
1185
+ while IFS= read -r PLUGIN_NAME; do
1186
+ [[ -z "$PLUGIN_NAME" ]] && continue
1187
+ [[ "$PLUGIN_NAME" == "sw" ]] && continue # core always installed
1188
+
1189
+ # Idempotency: skip if already installed or already attempted this session
1190
+ if [[ -d "$CACHE_BASE/$PLUGIN_NAME" ]] || \
1191
+ [[ -d "$SKILLS_BASE/$PLUGIN_NAME" ]] || \
1192
+ [[ -f "$SESSION_MARKER_DIR/$PLUGIN_NAME" ]]; then
1193
+ continue
1194
+ fi
1195
+
1196
+ # Install via CLI (handles both native and direct-copy modes)
1197
+ specweave refresh-plugins --plugin "$PLUGIN_NAME" --quiet 2>/dev/null &
1198
+ ONDEMAND_INSTALL_PID=$!
1199
+ touch "$SESSION_MARKER_DIR/$PLUGIN_NAME" 2>/dev/null
1200
+
1201
+ AUTOLOAD_PLUGINS_MSG="${AUTOLOAD_PLUGINS_MSG}Installed plugin: ${PLUGIN_NAME} (on-demand)."$'\n'
1202
+ done <<< "$DETECTED_PLUGINS"
1203
+
1204
+ # Wait for background install with 5s timeout
1205
+ if [[ -n "$ONDEMAND_INSTALL_PID" ]]; then
1206
+ ( sleep 5 && kill "$ONDEMAND_INSTALL_PID" 2>/dev/null ) &
1207
+ TIMEOUT_PID=$!
1208
+ wait "$ONDEMAND_INSTALL_PID" 2>/dev/null
1209
+ kill "$TIMEOUT_PID" 2>/dev/null
1210
+ fi
1211
+ fi
1202
1212
 
1203
1213
  # ==================================================================
1204
1214
  # EXTRACT ROUTING INFO EARLY (v1.0.155 - needed for agent directives)
@@ -1399,9 +1409,6 @@ After increment, chain domain skills per tech stack (see CLAUDE.md Skill Chainin
1399
1409
  BRAIN_MSG=""
1400
1410
 
1401
1411
  # Compact router output — one line per decision
1402
- [[ -n "$PLUGINS_INSTALLED" ]] && BRAIN_MSG+="Plugins loaded: ${PLUGINS_INSTALLED}. "
1403
- [[ -n "$PLUGINS_ALREADY" ]] && BRAIN_MSG+="Plugins active: ${PLUGINS_ALREADY}. "
1404
-
1405
1412
  if [[ "$INC_ACTION" == "new" || "$INC_ACTION" == "hotfix" ]]; then
1406
1413
  BRAIN_MSG+="Increment: create \\\"${INC_NAME:-new-feature}\\\" (${INC_ACTION}). "
1407
1414
  elif [[ "$INC_ACTION" == "reopen" ]]; then
@@ -1444,11 +1451,11 @@ After increment, chain domain skills per tech stack (see CLAUDE.md Skill Chainin
1444
1451
  fi
1445
1452
 
1446
1453
  # ==================================================================
1447
- # KEYWORD FALLBACK: PLUGIN INSTALLATION — REMOVED (v1.0.535)
1454
+ # KEYWORD FALLBACK: PLUGIN INSTALLATION (v1.0.540 — note)
1448
1455
  # ==================================================================
1449
- # Keyword-based plugin installation removed. All plugins are now
1450
- # installed at init time via `specweave init` (direct file copy
1451
- # to .claude/skills/). No on-demand marketplace lookups.
1456
+ # On-demand plugin installation restored in v1.0.540 via the LLM
1457
+ # detection path above. Keyword-based fallback is not needed here
1458
+ # because the LLM detect-intent already identifies needed plugins.
1452
1459
  # ==================================================================
1453
1460
 
1454
1461
  # ==================================================================
@@ -116,4 +116,4 @@ Output: `plan.md` with architecture decisions and component breakdown.
116
116
 
117
117
  ## Resources
118
118
 
119
- - [Official Documentation](https://verified-skill.com/docs/commands/architect)
119
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#architect)
@@ -237,4 +237,4 @@ In auto mode, execute deployment commands directly using available credentials.
237
237
 
238
238
  ## Resources
239
239
 
240
- - [Official Documentation](https://verified-skill.com/docs/commands/auto)
240
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#auto)
@@ -560,4 +560,4 @@ Before completing a brainstorm session, verify:
560
560
 
561
561
  ## Resources
562
562
 
563
- - [Official Documentation](https://verified-skill.com/docs/commands/brainstorm)
563
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#brainstorm)
@@ -216,4 +216,4 @@ Debug target: $ARGUMENTS
216
216
 
217
217
  ## Resources
218
218
 
219
- - [Official Documentation](https://verified-skill.com/docs/commands/debug)
219
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#debug)
@@ -252,4 +252,4 @@ Run `/sw:validate` after execution to ensure quality before closing with `/sw:do
252
252
 
253
253
  ## Resources
254
254
 
255
- - [Official Documentation](https://verified-skill.com/docs/commands/do)
255
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#do)
@@ -200,4 +200,4 @@ Transfer tasks creates new increment with dependencies on current one.
200
200
 
201
201
  ## Resources
202
202
 
203
- - [Official Documentation](https://verified-skill.com/docs/commands/done)
203
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#done)
@@ -421,4 +421,4 @@ Default: `['wcag2a', 'wcag2aa', 'wcag21aa']` (covers standard compliance).
421
421
 
422
422
  ## Resources
423
423
 
424
- - [Official Documentation](https://verified-skill.com/docs/commands/e2e)
424
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#e2e)
@@ -113,4 +113,4 @@ If the user says "restore repos", "clone all child repos", or "set up on new mac
113
113
 
114
114
  ## Resources
115
115
 
116
- - [Official Documentation](https://verified-skill.com/docs/commands/get)
116
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#get)
@@ -426,4 +426,4 @@ The grill is uncomfortable. That's the point. Better to sweat here than in front
426
426
 
427
427
  ## Resources
428
428
 
429
- - [Official Documentation](https://verified-skill.com/docs/commands/grill)
429
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#grill)
@@ -187,4 +187,4 @@ ADO_PAT=...
187
187
 
188
188
  ## Resources
189
189
 
190
- - [Official Documentation](https://verified-skill.com/docs/commands/import)
190
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#import)
@@ -461,4 +461,4 @@ Created increment 0003-user-authentication
461
461
 
462
462
  ## Resources
463
463
 
464
- - [Official Documentation](https://verified-skill.com/docs/commands/increment)
464
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#increment)
@@ -188,4 +188,4 @@ Progress logged to `.specweave/logs/judge-llm.log`. Default timeout 60s aborts i
188
188
 
189
189
  ## Resources
190
190
 
191
- - [Official Documentation](https://verified-skill.com/docs/commands/judge-llm)
191
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#judge-llm)
@@ -938,4 +938,4 @@ Skip this step entirely — there's only one repo and it was already pushed.
938
938
 
939
939
  ## Resources
940
940
 
941
- - [Official Documentation](https://verified-skill.com/docs/commands/npm)
941
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#npm)
@@ -289,4 +289,4 @@ AskUserQuestion({
289
289
 
290
290
  ## Resources
291
291
 
292
- - [Official Documentation](https://verified-skill.com/docs/commands/plan)
292
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#plan)
@@ -182,4 +182,4 @@ This skill auto-activates when you mention:
182
182
 
183
183
  ## Resources
184
184
 
185
- - [Official Documentation](https://verified-skill.com/docs/commands/pm)
185
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#pm)
@@ -253,4 +253,4 @@ Status: 2/2 PRs created successfully
253
253
 
254
254
  ## Resources
255
255
 
256
- - [Official Documentation](https://verified-skill.com/docs/commands/pr)
256
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#pr)
@@ -448,4 +448,4 @@ Ask me:
448
448
 
449
449
  ## Resources
450
450
 
451
- - [Official Documentation](https://verified-skill.com/docs/commands/progress-sync)
451
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#progress-sync)
@@ -68,4 +68,4 @@ If sync fails:
68
68
 
69
69
  ## Resources
70
70
 
71
- - [Official Documentation](https://verified-skill.com/docs/commands/sync-docs)
71
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#sync-docs)
@@ -225,4 +225,4 @@ TDD implementation for: $ARGUMENTS
225
225
 
226
226
  ## Resources
227
227
 
228
- - [Official Documentation](https://verified-skill.com/docs/commands/tdd-cycle)
228
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#tdd-cycle)
@@ -65,4 +65,4 @@ Tests to make pass: $ARGUMENTS
65
65
 
66
66
  ## Resources
67
67
 
68
- - [Official Documentation](https://verified-skill.com/docs/commands/tdd-green)
68
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#tdd-green)
@@ -71,4 +71,4 @@ Test requirements: $ARGUMENTS
71
71
 
72
72
  ## Resources
73
73
 
74
- - [Official Documentation](https://verified-skill.com/docs/commands/tdd-red)
74
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#tdd-red)
@@ -40,4 +40,4 @@ Code to refactor: $ARGUMENTS
40
40
 
41
41
  ## Resources
42
42
 
43
- - [Official Documentation](https://verified-skill.com/docs/commands/tdd-refactor)
43
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#tdd-refactor)
@@ -477,4 +477,4 @@ Custom presets follow the same execution rules: agents with no `dependsOn` run i
477
477
 
478
478
  ## Resources
479
479
 
480
- - [Official Documentation](https://verified-skill.com/docs/commands/team-build)
480
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#team-build)
@@ -922,4 +922,4 @@ User: /sw:team-lead "Add payment processing" --dry-run
922
922
 
923
923
  ## Resources
924
924
 
925
- - [Official Documentation](https://verified-skill.com/docs/commands/team-lead)
925
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#team-lead)
@@ -203,4 +203,4 @@ All increments merged and synced.
203
203
 
204
204
  ## Resources
205
205
 
206
- - [Official Documentation](https://verified-skill.com/docs/commands/team-merge)
206
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#team-merge)
@@ -136,4 +136,4 @@ Report includes: executive summary, rule-based results by category, AI quality s
136
136
 
137
137
  ## Resources
138
138
 
139
- - [Official Documentation](https://verified-skill.com/docs/commands/validate)
139
+ - [Official Documentation](https://verified-skill.com/docs/reference/skills#validate)