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
|
@@ -11,7 +11,7 @@ argument-hint: "<increment-id> [--auto]"
|
|
|
11
11
|
|
|
12
12
|
**PM-Led Closure**: Validate tasks, tests, and docs before closing.
|
|
13
13
|
|
|
14
|
-
**AUTO-CLOSURE DEFAULT**: After `sw:do` completes all tasks, `sw:done` runs automatically — no user confirmation needed. Quality gates (grill, judge-llm, PM validation) provide the safety net. If something is wrong, the user can re-open the increment.
|
|
14
|
+
**AUTO-CLOSURE DEFAULT**: After `sw:do` completes all tasks, `sw:done` runs automatically — no user confirmation needed. Quality gates (code-review, simplify, grill, judge-llm, PM validation) provide the safety net. If something is wrong, the user can re-open the increment.
|
|
15
15
|
|
|
16
16
|
## Context Overflow Prevention
|
|
17
17
|
|
|
@@ -31,7 +31,7 @@ Argument: Required increment ID (e.g., "001", "0001", "0042", "0153-feature-name
|
|
|
31
31
|
|
|
32
32
|
| Option | Description |
|
|
33
33
|
|--------|-------------|
|
|
34
|
-
| `--auto` | Legacy flag, now a no-op. Auto-closure is the default for all modes. All quality gates (grill, judge-llm, Gate 0, PM gates) always enforced. |
|
|
34
|
+
| `--auto` | Legacy flag, now a no-op. Auto-closure is the default for all modes. All quality gates (code-review, simplify, grill, judge-llm, Gate 0, PM gates) always enforced. |
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
@@ -41,18 +41,53 @@ Argument: Required increment ID (e.g., "001", "0001", "0042", "0153-feature-name
|
|
|
41
41
|
|
|
42
42
|
If closing a SpecWeave framework increment, show post-closure reminders: update CHANGELOG.md, CLAUDE.md, consider version bump, run `npm test && npm run rebuild`, check for breaking changes. Informational only, not blocking.
|
|
43
43
|
|
|
44
|
-
### Step 2:
|
|
44
|
+
### Step 2: Code Review (MANDATORY — STOP GATE with Fix Loop)
|
|
45
|
+
|
|
46
|
+
**The CLI blocks closure if `code-review-report.json` is missing (when required).** Do NOT skip this step.
|
|
47
|
+
|
|
48
|
+
1. Check config: `jq -r '.codeReview.required // true' .specweave/config.json` — if `false`, skip to Step 3
|
|
49
|
+
2. Read max iterations: `MAX_ITER=$(jq -r '.codeReview.maxFixIterations // 3' .specweave/config.json 2>/dev/null)`
|
|
50
|
+
3. Read blocking severities: defaults are `critical`, `high`, `medium` (configurable via `codeReview.blockingSeverities`)
|
|
51
|
+
4. **Iteration loop** (ITERATION=1):
|
|
52
|
+
a. Invoke `Skill({ skill: "sw:code-reviewer", args: "--increment <id>" })`
|
|
53
|
+
b. **Verify report written**: `Bash({ command: "test -f .specweave/increments/<id>/reports/code-review-report.json && echo OK || echo MISSING" })`
|
|
54
|
+
c. If report MISSING: write it manually from code-reviewer output using the Write tool
|
|
55
|
+
d. Read the report JSON: parse the `summary` object for severity counts
|
|
56
|
+
e. **Evaluate blocking findings**: Sum counts for `critical` + `high` + `medium` (or configured severities)
|
|
57
|
+
f. If no blocking findings → PASS, continue to Step 3
|
|
58
|
+
g. If blocking findings exist AND ITERATION < MAX_ITER:
|
|
59
|
+
- Display findings summary
|
|
60
|
+
- Implement fixes for all critical/high/medium issues from the report
|
|
61
|
+
- Increment ITERATION
|
|
62
|
+
- Delete the stale report: `rm -f .specweave/increments/<id>/reports/code-review-report.json`
|
|
63
|
+
- Go back to step 4a (re-run code-reviewer)
|
|
64
|
+
h. If blocking findings exist AND ITERATION >= MAX_ITER:
|
|
65
|
+
- **STOP closure** — display remaining findings
|
|
66
|
+
- Log: "Code review failed after {N} fix iterations. {X} findings remain."
|
|
67
|
+
- Increment stays in-progress
|
|
68
|
+
|
|
69
|
+
### Step 3: Simplify (Non-Blocking Cleanup)
|
|
70
|
+
|
|
71
|
+
Code review passed. Run simplify to clean up code before the grill examines it.
|
|
72
|
+
|
|
73
|
+
1. Invoke `Skill({ skill: "simplify" })` — this is a built-in Claude Code skill, NOT a `sw:` skill
|
|
74
|
+
2. `/simplify` spawns 3 parallel agents checking: duplication, readability, efficiency
|
|
75
|
+
3. Apply any suggested improvements
|
|
76
|
+
4. **Non-blocking**: Even if simplify finds issues, proceed to Step 4 (Grill)
|
|
77
|
+
5. Purpose: Clean code before grill reduces grill findings and improves ship readiness
|
|
78
|
+
|
|
79
|
+
### Step 4: Inline Grill Review (MANDATORY — STOP GATE)
|
|
45
80
|
|
|
46
81
|
**The CLI blocks closure if `grill-report.json` is missing.** Do NOT skip this step.
|
|
47
82
|
|
|
48
|
-
1. Check config: `jq -r '.grill.required // true' .specweave/config.json` — if `false`, skip to Step
|
|
83
|
+
1. Check config: `jq -r '.grill.required // true' .specweave/config.json` — if `false`, skip to Step 5
|
|
49
84
|
2. Invoke `Skill({ skill: "sw:grill" })` with incrementId
|
|
50
85
|
3. **Verify report written**: `Bash({ command: "test -f .specweave/increments/<id>/reports/grill-report.json && echo OK || echo MISSING" })`
|
|
51
86
|
4. If report MISSING: write it manually from grill output using the Write tool
|
|
52
87
|
5. BLOCKERs or CRITICALs (shipReadiness: NOT READY) → STOP closure, ask user to fix
|
|
53
88
|
6. Passes → continue
|
|
54
89
|
|
|
55
|
-
### Step
|
|
90
|
+
### Step 5: Judge LLM Validation (MANDATORY — STOP GATE)
|
|
56
91
|
|
|
57
92
|
**A report file MUST be written regardless of outcome (even WAIVED if consent denied).**
|
|
58
93
|
|
|
@@ -63,21 +98,21 @@ If closing a SpecWeave framework increment, show post-closure reminders: update
|
|
|
63
98
|
5. **APPROVED** → continue | **CONCERNS** → show, allow continuation | **REJECTED** → STOP closure
|
|
64
99
|
6. No ANTHROPIC_API_KEY or consent denied → write WAIVED report, continue
|
|
65
100
|
|
|
66
|
-
### Step
|
|
101
|
+
### Step 6: Status Validation
|
|
67
102
|
|
|
68
103
|
- `ready_for_review` -> Proceed
|
|
69
104
|
- `active` -> Check all tasks done, transition to `ready_for_review` first
|
|
70
105
|
- `completed` -> Already closed, warn user
|
|
71
106
|
- `backlog` / `paused` / `abandoned` -> BLOCK with error
|
|
72
107
|
|
|
73
|
-
**No confirmation needed**: Proceed directly to closure. Quality gates (grill, judge-llm, Gate 0, PM gates) are the safety net — NOT user confirmation prompts. NEVER stop to ask "should I close this?" — just close it. If a gate fails, the increment stays open automatically. If the user disagrees with closure, they can re-open.
|
|
108
|
+
**No confirmation needed**: Proceed directly to closure. Quality gates (code-review, simplify, grill, judge-llm, Gate 0, PM gates) are the safety net — NOT user confirmation prompts. NEVER stop to ask "should I close this?" — just close it. If a gate fails, the increment stays open automatically. If the user disagrees with closure, they can re-open.
|
|
74
109
|
|
|
75
|
-
### Step
|
|
110
|
+
### Step 7: Load Increment Context
|
|
76
111
|
|
|
77
112
|
1. Find increment directory: normalize ID to 4-digit, match `.specweave/increments/0001-*/`
|
|
78
113
|
2. Load: `spec.md`, `plan.md`, `tasks.md`, `tests.md`
|
|
79
114
|
|
|
80
|
-
### Step
|
|
115
|
+
### Step 8: Automated Completion Validation (Gate 0)
|
|
81
116
|
|
|
82
117
|
MANDATORY, cannot be bypassed. Runs BEFORE PM validation.
|
|
83
118
|
|
|
@@ -94,7 +129,7 @@ MANDATORY, cannot be bypassed. Runs BEFORE PM validation.
|
|
|
94
129
|
|
|
95
130
|
If validation fails -> increment stays in-progress, command exits.
|
|
96
131
|
|
|
97
|
-
### Step
|
|
132
|
+
### Step 9: PM Validation (3 Gates)
|
|
98
133
|
|
|
99
134
|
PM validation report goes in: `.specweave/increments/####-name/reports/PM-VALIDATION-REPORT.md`
|
|
100
135
|
|
|
@@ -106,11 +141,11 @@ PM validation report goes in: `.specweave/increments/####-name/reports/PM-VALIDA
|
|
|
106
141
|
|
|
107
142
|
**Gate 3 - Documentation Updated**: CLAUDE.md, README.md, CHANGELOG.md updated as needed. Inline docs complete. No stale references.
|
|
108
143
|
|
|
109
|
-
### Step
|
|
144
|
+
### Step 10: PM Decision
|
|
110
145
|
|
|
111
146
|
**All gates pass**:
|
|
112
147
|
1. Create marker file: `mkdir -p .specweave/state && touch .specweave/state/.sw-done-in-progress`
|
|
113
|
-
2. Run completion via CLI: `Bash({ command: "specweave complete <id> --yes" })` — the CLI re-verifies quality gate reports (grill-report.json, judge-llm-report.json) exist. It also triggers `LifecycleHookDispatcher.onIncrementDone()` for living docs sync, GitHub Project sync, and issue closure.
|
|
148
|
+
2. Run completion via CLI: `Bash({ command: "specweave complete <id> --yes" })` — the CLI re-verifies quality gate reports (code-review-report.json, grill-report.json, judge-llm-report.json) exist. It also triggers `LifecycleHookDispatcher.onIncrementDone()` for living docs sync, GitHub Project sync, and issue closure.
|
|
114
149
|
3. Remove marker file: `rm -f .specweave/state/.sw-done-in-progress`
|
|
115
150
|
4. Generate completion report, update backlog
|
|
116
151
|
|
|
@@ -121,7 +156,7 @@ PM validation report goes in: `.specweave/increments/####-name/reports/PM-VALIDA
|
|
|
121
156
|
- If GitHub issue exists, reopen it with failure details
|
|
122
157
|
- Increment remains in-progress
|
|
123
158
|
|
|
124
|
-
### Step
|
|
159
|
+
### Step 10.5: Pull Request Creation (pr-based only)
|
|
125
160
|
|
|
126
161
|
Check push strategy:
|
|
127
162
|
```bash
|
|
@@ -136,9 +171,9 @@ PUSH_STRATEGY=$(jq -r '.cicd.pushStrategy // "direct"' .specweave/config.json 2>
|
|
|
136
171
|
|
|
137
172
|
**If `direct`:** Skip this step entirely (existing behavior unchanged).
|
|
138
173
|
|
|
139
|
-
### Step
|
|
174
|
+
### Step 11: Post-Closure Sync (AUTOMATIC via CLI hooks)
|
|
140
175
|
|
|
141
|
-
The `specweave complete` call in Step
|
|
176
|
+
The `specweave complete` call in Step 10 triggers `LifecycleHookDispatcher.onIncrementDone()` which automatically handles:
|
|
142
177
|
|
|
143
178
|
- **Living docs sync** (`sync_living_docs` flag): Updates feature specs and user story files
|
|
144
179
|
- **GitHub Project sync** (`sync_to_github_project` flag): Pushes spec to GitHub Project
|
|
@@ -166,22 +201,22 @@ If any operation failed, display: "Run `sw:progress-sync` to retry failed sync o
|
|
|
166
201
|
3. For EACH user story in spec.md, search: `gh issue list -R {owner}/{repo} --search "[{feature_id}][{us_id}]" --state open --json number`
|
|
167
202
|
4. Close each: `gh issue close {number} -R {owner}/{repo} -c "Completed as part of increment {increment_id}"`
|
|
168
203
|
|
|
169
|
-
### Step
|
|
204
|
+
### Step 12: Sync Living Docs (MANDATORY)
|
|
170
205
|
|
|
171
206
|
Execute: `Skill({ skill: "sw:sync-docs" })` with the increment ID. Do NOT just mention it -- actually invoke it. This serves as a verification pass to confirm living docs are up to date after closure.
|
|
172
207
|
|
|
173
|
-
### Step
|
|
208
|
+
### Step 12b: Update Links in Docs (MANDATORY)
|
|
174
209
|
|
|
175
210
|
After living docs sync, update cross-references and bidirectional links so existing docs reference the newly created feature specs. Do NOT skip this step:
|
|
176
211
|
|
|
177
|
-
1. Read the feature spec files created by Step
|
|
212
|
+
1. Read the feature spec files created by Step 12 (`.specweave/docs/internal/specs/{project}/FS-XXX/FEATURE.md` and `us-*.md`)
|
|
178
213
|
2. Update existing docs (FEATURE-CATALOG, module docs, etc.) with links to the new specs
|
|
179
214
|
3. Verify bidirectional links between increment → feature spec → living docs
|
|
180
215
|
4. Change `[DRAFT]` → `[COMPLETE]` on doc sections matching completed ACs
|
|
181
216
|
|
|
182
|
-
Verify that `.specweave/docs/internal/specs/{project}/FS-XXX/` contains `FEATURE.md` and `us-*.md` files. If missing, re-run Step
|
|
217
|
+
Verify that `.specweave/docs/internal/specs/{project}/FS-XXX/` contains `FEATURE.md` and `us-*.md` files. If missing, re-run Step 12.
|
|
183
218
|
|
|
184
|
-
### Step
|
|
219
|
+
### Step 13: Post-Closure Quality Assessment
|
|
185
220
|
|
|
186
221
|
Runs ONLY if closure succeeded. Invoke: `sw:qa ${incrementId}`
|
|
187
222
|
|
|
@@ -195,7 +230,7 @@ Report saved to: `.specweave/increments/####/reports/qa-post-closure.md`
|
|
|
195
230
|
|
|
196
231
|
Quality assessment runs AFTER closure (not blocking delivery). Critical issues trigger follow-up increment creation.
|
|
197
232
|
|
|
198
|
-
### Step
|
|
233
|
+
### Step 14: Handle Incomplete Work
|
|
199
234
|
|
|
200
235
|
If scope creep detected, offer options:
|
|
201
236
|
- A) Complete all tasks (estimate effort)
|
|
@@ -360,7 +360,7 @@ Then write the report using the Write tool:
|
|
|
360
360
|
|
|
361
361
|
## Integration with sw:done
|
|
362
362
|
|
|
363
|
-
`sw:done` calls `sw:grill` as Step
|
|
363
|
+
`sw:done` calls `sw:grill` as Step 4 (blocking gate), after code-review (Step 2) and simplify (Step 3). The CLI re-verifies `grill-report.json` exists when running `specweave complete`.
|
|
364
364
|
|
|
365
365
|
You can also run `sw:grill` standalone at any time for early feedback.
|
|
366
366
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
You are the LOGIC REVIEWER agent.
|
|
2
2
|
|
|
3
3
|
REVIEW TARGET: [REVIEW_TARGET]
|
|
4
|
+
PR TITLE: [PR_TITLE]
|
|
5
|
+
PR DESCRIPTION: [PR_DESCRIPTION]
|
|
4
6
|
|
|
5
7
|
MISSION:
|
|
6
8
|
Examine the target code for correctness, logic bugs, edge cases, error handling gaps,
|
|
@@ -61,3 +63,20 @@ RULES:
|
|
|
61
63
|
- No speculation: only report issues you can demonstrate with concrete reasoning
|
|
62
64
|
- Consider context: understand the function's purpose before flagging issues
|
|
63
65
|
- Test coverage: note if critical paths lack test coverage
|
|
66
|
+
|
|
67
|
+
DO NOT FLAG (universal):
|
|
68
|
+
- Style/formatting issues (spacing, brace style, trailing commas) — linters handle these
|
|
69
|
+
- Issues in auto-generated code (prisma client, graphql codegen, protobuf stubs)
|
|
70
|
+
- Issues in vendored/third-party code (node_modules, vendor/)
|
|
71
|
+
- Issues in test fixtures or mock data
|
|
72
|
+
- Pre-existing issues in unchanged lines (unless CRITICAL severity)
|
|
73
|
+
- Subjective preferences ("I would have done X differently")
|
|
74
|
+
- Potential issues requiring specific runtime state you cannot verify
|
|
75
|
+
- Missing features not part of the review scope
|
|
76
|
+
|
|
77
|
+
DO NOT FLAG (logic-specific):
|
|
78
|
+
- Intentional fallthrough in switch statements (when commented)
|
|
79
|
+
- Defensive programming patterns that appear redundant but add safety
|
|
80
|
+
- Algorithm choices that are correct but not optimal (performance reviewer handles those)
|
|
81
|
+
- Missing error handling in test files
|
|
82
|
+
- Type narrowing patterns that look unusual but are TypeScript-correct
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
You are the PERFORMANCE REVIEWER agent.
|
|
2
2
|
|
|
3
3
|
REVIEW TARGET: [REVIEW_TARGET]
|
|
4
|
+
PR TITLE: [PR_TITLE]
|
|
5
|
+
PR DESCRIPTION: [PR_DESCRIPTION]
|
|
4
6
|
|
|
5
7
|
MISSION:
|
|
6
8
|
Examine the target code for performance anti-patterns, scalability issues,
|
|
@@ -61,3 +63,21 @@ RULES:
|
|
|
61
63
|
- Quantify when possible: "This loop is O(n²) over user.orders" is better than "slow loop"
|
|
62
64
|
- Consider scale: what works for 100 users may break at 10,000
|
|
63
65
|
- No premature optimization: only flag issues with measurable impact
|
|
66
|
+
|
|
67
|
+
DO NOT FLAG (universal):
|
|
68
|
+
- Style/formatting issues (spacing, brace style, trailing commas) — linters handle these
|
|
69
|
+
- Issues in auto-generated code (prisma client, graphql codegen, protobuf stubs)
|
|
70
|
+
- Issues in vendored/third-party code (node_modules, vendor/)
|
|
71
|
+
- Issues in test fixtures or mock data
|
|
72
|
+
- Pre-existing issues in unchanged lines (unless CRITICAL severity)
|
|
73
|
+
- Subjective preferences ("I would have done X differently")
|
|
74
|
+
- Potential issues requiring specific runtime state you cannot verify
|
|
75
|
+
- Missing features not part of the review scope
|
|
76
|
+
|
|
77
|
+
DO NOT FLAG (performance-specific):
|
|
78
|
+
- Micro-optimizations with no measurable impact (< 1ms at expected scale)
|
|
79
|
+
- Missing caching for operations running less than once per minute
|
|
80
|
+
- Bundle size of dev-only dependencies
|
|
81
|
+
- O(n) vs O(1) for collections known to be small (< 100 items)
|
|
82
|
+
- Missing pagination for admin-only endpoints with bounded results
|
|
83
|
+
- Re-renders that are React's expected behavior on cheap components
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
You are the SECURITY REVIEWER agent.
|
|
2
2
|
|
|
3
3
|
REVIEW TARGET: [REVIEW_TARGET]
|
|
4
|
+
PR TITLE: [PR_TITLE]
|
|
5
|
+
PR DESCRIPTION: [PR_DESCRIPTION]
|
|
4
6
|
|
|
5
7
|
MISSION:
|
|
6
8
|
Examine the target code for security vulnerabilities, injection vectors,
|
|
@@ -60,3 +62,21 @@ RULES:
|
|
|
60
62
|
- Prioritize: CRITICAL and HIGH findings first
|
|
61
63
|
- No false positives: only report issues you are confident about
|
|
62
64
|
- Context matters: consider the application type and threat model
|
|
65
|
+
|
|
66
|
+
DO NOT FLAG (universal):
|
|
67
|
+
- Style/formatting issues (spacing, brace style, trailing commas) — linters handle these
|
|
68
|
+
- Issues in auto-generated code (prisma client, graphql codegen, protobuf stubs)
|
|
69
|
+
- Issues in vendored/third-party code (node_modules, vendor/)
|
|
70
|
+
- Issues in test fixtures or mock data
|
|
71
|
+
- Pre-existing issues in unchanged lines (unless CRITICAL severity)
|
|
72
|
+
- Subjective preferences ("I would have done X differently")
|
|
73
|
+
- Potential issues requiring specific runtime state you cannot verify
|
|
74
|
+
- Missing features not part of the review scope
|
|
75
|
+
|
|
76
|
+
DO NOT FLAG (security-specific):
|
|
77
|
+
- Development-only secrets in .env.example or .env.test files
|
|
78
|
+
- Localhost/127.0.0.1 URLs in development configuration
|
|
79
|
+
- Missing rate limiting on internal-only endpoints
|
|
80
|
+
- Auth patterns that follow the project's established conventions (flag only deviations)
|
|
81
|
+
- Known-safe innerHTML usage with sanitized content (e.g., DOMPurify output)
|
|
82
|
+
- CORS permissiveness in local development configs
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
**Skill chaining** — skills are NOT "one and done":
|
|
31
31
|
1. **Planning**: `sw:pm` (specs) → `sw:architect` (design)
|
|
32
32
|
2. **Implementation**: Use `sw:architect` for all domains. Optional domain plugins available via `vskill install` (mobile, marketing, etc.)
|
|
33
|
-
3. **Closure**: `sw:grill`
|
|
33
|
+
3. **Closure**: `sw:code-reviewer` + `/simplify` + `sw:grill` run automatically via `/sw:done`
|
|
34
34
|
|
|
35
35
|
**Complexity gate** — before chaining domain skills:
|
|
36
36
|
1. **Tech stack specified?** → Chain ONLY the matching skill. If unspecified, ASK or default to minimal (vanilla JS/HTML, simple Express)
|
|
@@ -95,15 +95,16 @@ SpecWeave auto-detects product descriptions and routes to `/sw:increment`:
|
|
|
95
95
|
### 3. Verification Before Done
|
|
96
96
|
- Never mark a task complete without proving it works
|
|
97
97
|
- Run tests after every task: `npx vitest run` + `npx playwright test`
|
|
98
|
-
-
|
|
98
|
+
- `sw:code-reviewer` writes `code-review-report.json` — CLI blocks closure if critical/high/medium findings remain
|
|
99
|
+
- `/simplify` runs after code-review — catches duplication, readability issues, and inefficiencies via 3 parallel review agents
|
|
99
100
|
- `/sw:grill` writes `grill-report.json` — CLI blocks closure without it
|
|
100
101
|
- `/sw:judge-llm` writes `judge-llm-report.json` — WAIVED if consent denied
|
|
101
102
|
- Ask yourself: **"Would a staff engineer approve this?"**
|
|
102
103
|
|
|
103
104
|
### 5. Auto-Closure After Implementation (MANDATORY)
|
|
104
105
|
- When `/sw:do` completes all tasks, IMMEDIATELY invoke `/sw:done` — do NOT stop to ask for review
|
|
105
|
-
- The quality gates inside `/sw:done` (grill, judge-llm, PM validation) ARE the review — no user confirmation needed
|
|
106
|
-
- `/sw:done` handles: grill report, judge-llm, PM gates, closure, sync to GitHub/Jira/ADO
|
|
106
|
+
- The quality gates inside `/sw:done` (code-review, simplify, grill, judge-llm, PM validation) ARE the review — no user confirmation needed
|
|
107
|
+
- `/sw:done` handles: code-review loop, simplify, grill report, judge-llm, PM gates, closure, sync to GitHub/Jira/ADO
|
|
107
108
|
- If a gate fails, the increment stays open automatically — no risk of premature closure
|
|
108
109
|
- If the user disagrees, they can re-open the increment
|
|
109
110
|
- **Anti-pattern**: "All tasks complete. Should I close?" — NEVER ask this. Just close it.
|
|
@@ -231,6 +232,8 @@ Primary: `/sw:progress-sync`. Individual: `/sw-github:push`, `/sw-github:close`.
|
|
|
231
232
|
- Never mark a task `[x]` until its tests pass
|
|
232
233
|
|
|
233
234
|
### Before Closing (`/sw:done`)
|
|
235
|
+
- `sw:code-reviewer` writes `code-review-report.json` — blocks closure if critical/high/medium findings remain (fix loop, max 3 iterations)
|
|
236
|
+
- `/simplify` runs after code-review passes — cleans up code before grill
|
|
234
237
|
- `/sw:grill` writes `grill-report.json` — CLI blocks closure without it
|
|
235
238
|
- `/sw:judge-llm` writes `judge-llm-report.json` — WAIVED if consent denied
|
|
236
239
|
- `/sw:validate` — 130+ rule checks
|