specweave 1.0.550 → 1.0.552
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 +1 -1
- package/bin/specweave.js +23 -1
- package/dist/src/cli/commands/hook.d.ts +15 -0
- package/dist/src/cli/commands/hook.d.ts.map +1 -0
- package/dist/src/cli/commands/hook.js +61 -0
- package/dist/src/cli/commands/hook.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +5 -0
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/refresh-plugins.d.ts.map +1 -1
- package/dist/src/cli/commands/refresh-plugins.js +11 -1
- package/dist/src/cli/commands/refresh-plugins.js.map +1 -1
- package/dist/src/cli/commands/sync-setup.d.ts.map +1 -1
- package/dist/src/cli/commands/sync-setup.js +7 -3
- package/dist/src/cli/commands/sync-setup.js.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/project-mapping-wizard.d.ts +9 -0
- package/dist/src/cli/helpers/issue-tracker/project-mapping-wizard.d.ts.map +1 -1
- package/dist/src/cli/helpers/issue-tracker/project-mapping-wizard.js +9 -3
- package/dist/src/cli/helpers/issue-tracker/project-mapping-wizard.js.map +1 -1
- package/dist/src/config/types.d.ts +2 -2
- package/dist/src/core/config/types.d.ts +18 -2
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/hooks/handlers/hook-router.d.ts +19 -0
- package/dist/src/core/hooks/handlers/hook-router.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/hook-router.js +75 -0
- package/dist/src/core/hooks/handlers/hook-router.js.map +1 -0
- package/dist/src/core/hooks/handlers/index.d.ts +10 -0
- package/dist/src/core/hooks/handlers/index.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/index.js +9 -0
- package/dist/src/core/hooks/handlers/index.js.map +1 -0
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.d.ts +11 -0
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.js +73 -0
- package/dist/src/core/hooks/handlers/post-tool-use-analytics.js.map +1 -0
- package/dist/src/core/hooks/handlers/post-tool-use.d.ts +11 -0
- package/dist/src/core/hooks/handlers/post-tool-use.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/post-tool-use.js +76 -0
- package/dist/src/core/hooks/handlers/post-tool-use.js.map +1 -0
- package/dist/src/core/hooks/handlers/pre-compact.d.ts +11 -0
- package/dist/src/core/hooks/handlers/pre-compact.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/pre-compact.js +77 -0
- package/dist/src/core/hooks/handlers/pre-compact.js.map +1 -0
- package/dist/src/core/hooks/handlers/pre-tool-use.d.ts +11 -0
- package/dist/src/core/hooks/handlers/pre-tool-use.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/pre-tool-use.js +318 -0
- package/dist/src/core/hooks/handlers/pre-tool-use.js.map +1 -0
- package/dist/src/core/hooks/handlers/session-start.d.ts +9 -0
- package/dist/src/core/hooks/handlers/session-start.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/session-start.js +111 -0
- package/dist/src/core/hooks/handlers/session-start.js.map +1 -0
- package/dist/src/core/hooks/handlers/stop-auto.d.ts +16 -0
- package/dist/src/core/hooks/handlers/stop-auto.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/stop-auto.js +122 -0
- package/dist/src/core/hooks/handlers/stop-auto.js.map +1 -0
- package/dist/src/core/hooks/handlers/stop-reflect.d.ts +14 -0
- package/dist/src/core/hooks/handlers/stop-reflect.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/stop-reflect.js +43 -0
- package/dist/src/core/hooks/handlers/stop-reflect.js.map +1 -0
- package/dist/src/core/hooks/handlers/stop-sync.d.ts +15 -0
- package/dist/src/core/hooks/handlers/stop-sync.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/stop-sync.js +68 -0
- package/dist/src/core/hooks/handlers/stop-sync.js.map +1 -0
- package/dist/src/core/hooks/handlers/types.d.ts +63 -0
- package/dist/src/core/hooks/handlers/types.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/types.js +27 -0
- package/dist/src/core/hooks/handlers/types.js.map +1 -0
- package/dist/src/core/hooks/handlers/user-prompt-submit.d.ts +14 -0
- package/dist/src/core/hooks/handlers/user-prompt-submit.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/user-prompt-submit.js +173 -0
- package/dist/src/core/hooks/handlers/user-prompt-submit.js.map +1 -0
- package/dist/src/core/hooks/handlers/utils.d.ts +25 -0
- package/dist/src/core/hooks/handlers/utils.d.ts.map +1 -0
- package/dist/src/core/hooks/handlers/utils.js +64 -0
- package/dist/src/core/hooks/handlers/utils.js.map +1 -0
- package/dist/src/core/increment/completion-validator.d.ts.map +1 -1
- package/dist/src/core/increment/completion-validator.js +32 -0
- package/dist/src/core/increment/completion-validator.js.map +1 -1
- package/dist/src/init/research/types.d.ts +1 -1
- package/dist/src/sync/sync-target-resolver.js.map +1 -1
- package/dist/src/utils/lock-manager.d.ts.map +1 -1
- package/dist/src/utils/lock-manager.js +5 -0
- package/dist/src/utils/lock-manager.js.map +1 -1
- package/dist/src/utils/plugin-copier.d.ts +10 -0
- package/dist/src/utils/plugin-copier.d.ts.map +1 -1
- package/dist/src/utils/plugin-copier.js +63 -35
- package/dist/src/utils/plugin-copier.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/agents/sw-closer.md +3 -2
- package/plugins/specweave/hooks/hooks.json +10 -10
- package/plugins/specweave/skills/code-reviewer/SKILL.md +180 -16
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-comments.md +83 -0
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-silent-failures.md +19 -0
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-spec-compliance.md +19 -0
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-tests.md +101 -0
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-types.md +20 -0
- package/plugins/specweave/skills/done/SKILL.md +56 -21
- package/plugins/specweave/skills/grill/SKILL.md +1 -1
- package/plugins/specweave/skills/team-lead/agents/reviewer-logic.md +19 -0
- package/plugins/specweave/skills/team-lead/agents/reviewer-performance.md +20 -0
- package/plugins/specweave/skills/team-lead/agents/reviewer-security.md +20 -0
- package/src/templates/CLAUDE.md.template +7 -4
- package/plugins/specweave/hooks/README.md +0 -493
- package/plugins/specweave/hooks/_archive/stop-auto-v4-legacy.sh +0 -1319
- package/plugins/specweave/hooks/lib/common-setup.sh +0 -144
- package/plugins/specweave/hooks/lib/hook-errors.sh +0 -414
- package/plugins/specweave/hooks/lib/migrate-increment-work.sh +0 -245
- package/plugins/specweave/hooks/lib/resolve-package.sh +0 -146
- package/plugins/specweave/hooks/lib/scheduler-startup.sh +0 -135
- package/plugins/specweave/hooks/lib/score-increment.sh +0 -87
- package/plugins/specweave/hooks/lib/sync-spec-content.sh +0 -193
- package/plugins/specweave/hooks/lib/update-active-increment.sh +0 -95
- package/plugins/specweave/hooks/lib/update-status-line.sh +0 -233
- package/plugins/specweave/hooks/lib/validate-spec-status.sh +0 -171
- package/plugins/specweave/hooks/llm-judge-validator.sh +0 -219
- package/plugins/specweave/hooks/log-decision.sh +0 -168
- package/plugins/specweave/hooks/pre-compact.sh +0 -64
- package/plugins/specweave/hooks/startup-health-check.sh +0 -64
- package/plugins/specweave/hooks/stop-auto-v5.sh +0 -276
- package/plugins/specweave/hooks/stop-reflect.sh +0 -336
- package/plugins/specweave/hooks/stop-sync.sh +0 -283
- package/plugins/specweave/hooks/tests/test-auto-context-integration.sh +0 -126
- package/plugins/specweave/hooks/tests/test-stop-auto-enriched.sh +0 -128
- package/plugins/specweave/hooks/universal/dispatcher.mjs +0 -336
- package/plugins/specweave/hooks/universal/fail-fast-wrapper.sh +0 -325
- package/plugins/specweave/hooks/universal/hook-wrapper.cmd +0 -26
- package/plugins/specweave/hooks/universal/hook-wrapper.sh +0 -69
- package/plugins/specweave/hooks/universal/run-hook.sh +0 -20
- package/plugins/specweave/hooks/universal/session-start.cmd +0 -16
- package/plugins/specweave/hooks/universal/session-start.ps1 +0 -16
- package/plugins/specweave/hooks/user-prompt-submit.sh +0 -2550
- package/plugins/specweave/hooks/v2/detectors/lifecycle-detector.sh +0 -87
- package/plugins/specweave/hooks/v2/detectors/us-completion-detector.sh +0 -186
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use-analytics.sh +0 -83
- package/plugins/specweave/hooks/v2/dispatchers/post-tool-use.sh +0 -447
- package/plugins/specweave/hooks/v2/dispatchers/pre-tool-use.sh +0 -104
- package/plugins/specweave/hooks/v2/dispatchers/session-start.sh +0 -270
- package/plugins/specweave/hooks/v2/guards/completion-guard.sh +0 -14
- package/plugins/specweave/hooks/v2/guards/increment-duplicate-guard.sh +0 -14
- package/plugins/specweave/hooks/v2/guards/increment-existence-guard.sh +0 -240
- package/plugins/specweave/hooks/v2/guards/interview-enforcement-guard.sh +0 -171
- package/plugins/specweave/hooks/v2/guards/metadata-json-guard.sh +0 -14
- package/plugins/specweave/hooks/v2/guards/skill-chain-enforcement-guard.sh +0 -222
- package/plugins/specweave/hooks/v2/guards/spec-template-enforcement-guard.sh +0 -21
- package/plugins/specweave/hooks/v2/guards/spec-validation-guard.sh +0 -14
- package/plugins/specweave/hooks/v2/guards/status-completion-guard.sh +0 -84
- package/plugins/specweave/hooks/v2/guards/task-ac-sync-guard.sh +0 -475
- package/plugins/specweave/hooks/v2/guards/tdd-enforcement-guard.sh +0 -268
- package/plugins/specweave/hooks/v2/handlers/ac-sync-dispatcher.sh +0 -332
- package/plugins/specweave/hooks/v2/handlers/ac-validation-handler.sh +0 -50
- package/plugins/specweave/hooks/v2/handlers/github-sync-handler.sh +0 -347
- package/plugins/specweave/hooks/v2/handlers/living-docs-handler.sh +0 -83
- package/plugins/specweave/hooks/v2/handlers/living-specs-handler.sh +0 -268
- package/plugins/specweave/hooks/v2/handlers/project-bridge-handler.sh +0 -104
- package/plugins/specweave/hooks/v2/handlers/status-line-handler.sh +0 -165
- package/plugins/specweave/hooks/v2/handlers/status-update.sh +0 -61
- package/plugins/specweave/hooks/v2/handlers/universal-auto-create-dispatcher.sh +0 -270
- package/plugins/specweave/hooks/v2/integrations/ado-post-living-docs-update.sh +0 -367
- package/plugins/specweave/hooks/v2/integrations/ado-post-task.sh +0 -179
- package/plugins/specweave/hooks/v2/integrations/github-auto-create-handler.sh +0 -553
- package/plugins/specweave/hooks/v2/integrations/github-post-task.sh +0 -345
- package/plugins/specweave/hooks/v2/integrations/jira-post-task.sh +0 -180
- package/plugins/specweave/hooks/v2/lib/check-provider-enabled.sh +0 -52
- package/plugins/specweave/hooks/v2/queue/enqueue.sh +0 -81
- package/plugins/specweave/hooks/v2/session-end.sh +0 -139
- package/plugins/specweave/hooks/validate-skill-activations.sh +0 -227
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# hook-wrapper.sh - Resilient hook launcher that prevents crashes
|
|
3
|
-
#
|
|
4
|
-
# Problem: Node.js crashes with "Cannot find module" BEFORE any error handling
|
|
5
|
-
# when dispatcher.mjs is temporarily unavailable (e.g., during marketplace refresh)
|
|
6
|
-
#
|
|
7
|
-
# Solution: Pre-check file existence, retry with delay, output valid JSON on failure
|
|
8
|
-
#
|
|
9
|
-
# Usage: bash hook-wrapper.sh <hook-type>
|
|
10
|
-
# Where hook-type is: session-start, post-tool-use, completion-guard
|
|
11
|
-
#
|
|
12
|
-
# v0.35.3 - Fixed: use set +e for hook safety
|
|
13
|
-
|
|
14
|
-
set +e # CRITICAL: Never use set -e in hooks (causes cascading failures)
|
|
15
|
-
|
|
16
|
-
HOOK_TYPE="${1:-unknown}"
|
|
17
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
18
|
-
DISPATCHER="$SCRIPT_DIR/dispatcher.mjs"
|
|
19
|
-
|
|
20
|
-
# Maximum retry attempts for transient failures
|
|
21
|
-
MAX_RETRIES=3
|
|
22
|
-
RETRY_DELAY_MS=50
|
|
23
|
-
|
|
24
|
-
# Function to output valid JSON and exit gracefully
|
|
25
|
-
safe_exit() {
|
|
26
|
-
local msg="${1:-}"
|
|
27
|
-
if [[ -n "$msg" ]]; then
|
|
28
|
-
echo "{\"continue\":true,\"systemMessage\":\"Hook skipped: $msg\"}"
|
|
29
|
-
else
|
|
30
|
-
echo '{"continue":true}'
|
|
31
|
-
fi
|
|
32
|
-
exit 0
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
# Check if dispatcher exists with retry for transient failures
|
|
36
|
-
check_dispatcher() {
|
|
37
|
-
local attempt=1
|
|
38
|
-
while [[ $attempt -le $MAX_RETRIES ]]; do
|
|
39
|
-
if [[ -f "$DISPATCHER" ]]; then
|
|
40
|
-
return 0
|
|
41
|
-
fi
|
|
42
|
-
|
|
43
|
-
# Wait before retry (convert ms to seconds for sleep)
|
|
44
|
-
if [[ $attempt -lt $MAX_RETRIES ]]; then
|
|
45
|
-
sleep 0.$(printf '%03d' $RETRY_DELAY_MS)
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
((attempt++))
|
|
49
|
-
done
|
|
50
|
-
|
|
51
|
-
return 1
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
# Main execution
|
|
55
|
-
if ! check_dispatcher; then
|
|
56
|
-
safe_exit "dispatcher.mjs not found (marketplace may be refreshing)"
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Execute dispatcher with timeout protection
|
|
60
|
-
if command -v timeout &>/dev/null; then
|
|
61
|
-
# GNU timeout available (Linux)
|
|
62
|
-
timeout 5s node "$DISPATCHER" "$HOOK_TYPE" 2>/dev/null || safe_exit "dispatcher timeout or error"
|
|
63
|
-
elif command -v gtimeout &>/dev/null; then
|
|
64
|
-
# GNU timeout via coreutils (macOS with brew)
|
|
65
|
-
gtimeout 5s node "$DISPATCHER" "$HOOK_TYPE" 2>/dev/null || safe_exit "dispatcher timeout or error"
|
|
66
|
-
else
|
|
67
|
-
# No timeout available, run directly
|
|
68
|
-
node "$DISPATCHER" "$HOOK_TYPE" 2>/dev/null || safe_exit "dispatcher error"
|
|
69
|
-
fi
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
# run-hook.sh - Run a hook script through fail-fast-wrapper
|
|
3
|
-
# Usage: run-hook.sh <hook-path> [fallback: allow|approve|continue]
|
|
4
|
-
#
|
|
5
|
-
# hook-path: relative to $CLAUDE_PLUGIN_ROOT/hooks/ (without .sh)
|
|
6
|
-
# fallback: safe JSON response when wrapper is missing (default: allow)
|
|
7
|
-
|
|
8
|
-
HOOK_REL="$1"
|
|
9
|
-
FALLBACK="${2:-allow}"
|
|
10
|
-
ROOT="${CLAUDE_PLUGIN_ROOT}"
|
|
11
|
-
WRAPPER="$ROOT/hooks/universal/fail-fast-wrapper.sh"
|
|
12
|
-
HOOK="$ROOT/hooks/${HOOK_REL}.sh"
|
|
13
|
-
|
|
14
|
-
[[ -x "$WRAPPER" ]] && exec "$WRAPPER" "$HOOK"
|
|
15
|
-
cat >/dev/null
|
|
16
|
-
case "$FALLBACK" in
|
|
17
|
-
approve) printf '{"decision":"approve"}' ;;
|
|
18
|
-
continue) printf '{"continue":true}' ;;
|
|
19
|
-
*) printf '{"decision":"allow"}' ;;
|
|
20
|
-
esac
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
:: Universal Session Start Hook for Windows
|
|
3
|
-
:: Calls the Node.js dispatcher
|
|
4
|
-
|
|
5
|
-
:: Find node.exe
|
|
6
|
-
where node >nul 2>&1
|
|
7
|
-
if %ERRORLEVEL% neq 0 (
|
|
8
|
-
echo {"continue": true, "error": "Node.js not found"}
|
|
9
|
-
exit /b 0
|
|
10
|
-
)
|
|
11
|
-
|
|
12
|
-
:: Get the directory of this script
|
|
13
|
-
set "SCRIPT_DIR=%~dp0"
|
|
14
|
-
|
|
15
|
-
:: Run the dispatcher
|
|
16
|
-
node "%SCRIPT_DIR%dispatcher.mjs" session-start
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Universal Session Start Hook for Windows PowerShell
|
|
2
|
-
# Calls the Node.js dispatcher for cross-platform compatibility
|
|
3
|
-
|
|
4
|
-
# Find node.exe
|
|
5
|
-
$nodePath = Get-Command node -ErrorAction SilentlyContinue
|
|
6
|
-
|
|
7
|
-
if (-not $nodePath) {
|
|
8
|
-
Write-Host '{"continue": true, "error": "Node.js not found"}'
|
|
9
|
-
exit 0
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
# Get script directory
|
|
13
|
-
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
14
|
-
|
|
15
|
-
# Run the dispatcher
|
|
16
|
-
& node "$scriptDir\dispatcher.mjs" session-start
|