specweave 1.0.577 → 1.0.578
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/README.md +29 -0
- package/bin/specweave.js +1 -0
- package/dist/src/cli/commands/auto.d.ts +28 -0
- package/dist/src/cli/commands/auto.d.ts.map +1 -1
- package/dist/src/cli/commands/auto.js +73 -0
- package/dist/src/cli/commands/auto.js.map +1 -1
- package/dist/src/cli/commands/create-increment.d.ts +8 -0
- package/dist/src/cli/commands/create-increment.d.ts.map +1 -1
- package/dist/src/cli/commands/create-increment.js +2 -1
- package/dist/src/cli/commands/create-increment.js.map +1 -1
- package/dist/src/cli/dispatcher.d.ts +29 -0
- package/dist/src/cli/dispatcher.d.ts.map +1 -0
- package/dist/src/cli/dispatcher.js +53 -0
- package/dist/src/cli/dispatcher.js.map +1 -0
- package/dist/src/core/cache/static-context-loader.d.ts +39 -0
- package/dist/src/core/cache/static-context-loader.d.ts.map +1 -0
- package/dist/src/core/cache/static-context-loader.js +49 -0
- package/dist/src/core/cache/static-context-loader.js.map +1 -0
- package/dist/src/core/config/types.d.ts +61 -0
- package/dist/src/core/config/types.d.ts.map +1 -1
- package/dist/src/core/config/types.js +16 -0
- package/dist/src/core/config/types.js.map +1 -1
- package/dist/src/core/doctor/checkers/configuration-checker.d.ts +1 -0
- package/dist/src/core/doctor/checkers/configuration-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/configuration-checker.js +50 -0
- package/dist/src/core/doctor/checkers/configuration-checker.js.map +1 -1
- package/dist/src/core/hooks/pretooluse-guard.d.ts +37 -0
- package/dist/src/core/hooks/pretooluse-guard.d.ts.map +1 -0
- package/dist/src/core/hooks/pretooluse-guard.js +64 -0
- package/dist/src/core/hooks/pretooluse-guard.js.map +1 -0
- package/dist/src/core/increment/template-creator.d.ts +7 -0
- package/dist/src/core/increment/template-creator.d.ts.map +1 -1
- package/dist/src/core/increment/template-creator.js +2 -1
- package/dist/src/core/increment/template-creator.js.map +1 -1
- package/dist/src/core/skills/skill-judge.d.ts +56 -0
- package/dist/src/core/skills/skill-judge.d.ts.map +1 -1
- package/dist/src/core/skills/skill-judge.js +95 -8
- package/dist/src/core/skills/skill-judge.js.map +1 -1
- package/dist/src/core/team-lead/template-loader.d.ts +19 -0
- package/dist/src/core/team-lead/template-loader.d.ts.map +1 -0
- package/dist/src/core/team-lead/template-loader.js +33 -0
- package/dist/src/core/team-lead/template-loader.js.map +1 -0
- package/dist/src/core/telemetry/cache-metrics.d.ts +38 -0
- package/dist/src/core/telemetry/cache-metrics.d.ts.map +1 -0
- package/dist/src/core/telemetry/cache-metrics.js +65 -0
- package/dist/src/core/telemetry/cache-metrics.js.map +1 -0
- package/dist/src/core/validators/resource-base.d.ts +29 -0
- package/dist/src/core/validators/resource-base.d.ts.map +1 -0
- package/dist/src/core/validators/resource-base.js +52 -0
- package/dist/src/core/validators/resource-base.js.map +1 -0
- package/package.json +1 -1
- package/plugins/specweave/.lint/skill-lint.test.ts +91 -0
- package/plugins/specweave/.lint/skill-lint.ts +51 -0
- package/plugins/specweave/marketplace.json +114 -0
- package/plugins/specweave/skills/ado-multi-project/SKILL.md +9 -1
- package/plugins/specweave/skills/ado-sync/SKILL.md +16 -1
- package/plugins/specweave/skills/analytics/SKILL.md +45 -0
- package/plugins/specweave/skills/architect/SKILL.md +5 -19
- package/plugins/specweave/skills/auto/SKILL.md +41 -10
- package/plugins/specweave/skills/brainstorm/SKILL.md +15 -15
- package/plugins/specweave/skills/close-all/SKILL.md +21 -51
- package/plugins/specweave/skills/code-reviewer/SKILL.md +114 -57
- package/plugins/specweave/skills/do/SKILL.md +14 -5
- package/plugins/specweave/skills/done/SKILL.md +36 -1
- package/plugins/specweave/skills/github-issue-standard/SKILL.md +8 -224
- package/plugins/specweave/skills/github-multi-project/SKILL.md +9 -1
- package/plugins/specweave/skills/github-sync/SKILL.md +16 -1
- package/plugins/specweave/skills/grill/SKILL.md +56 -9
- package/plugins/specweave/skills/help/SKILL.md +32 -4
- package/plugins/specweave/skills/increment/SKILL.md +41 -8
- package/plugins/specweave/skills/jira-sync/SKILL.md +16 -1
- package/plugins/specweave/skills/judge-llm/SKILL.md +46 -14
- package/plugins/specweave/skills/multi-project/SKILL.md +370 -0
- package/plugins/specweave/skills/plan/SKILL.md +16 -1
- package/plugins/specweave/skills/pm/SKILL.md +12 -47
- package/plugins/specweave/skills/tdd-cycle/SKILL.md +38 -0
- package/plugins/specweave/skills/tdd-green/SKILL.md +16 -1
- package/plugins/specweave/skills/tdd-red/SKILL.md +16 -1
- package/plugins/specweave/skills/tdd-refactor/SKILL.md +16 -1
- package/plugins/specweave/skills/team-build/SKILL.md +16 -462
- package/plugins/specweave/skills/team-lead/SKILL.md +59 -44
- package/plugins/specweave/skills/team-lead/agents/_protocol.md +88 -0
- package/plugins/specweave/skills/team-lead/agents/architect.md +27 -36
- package/plugins/specweave/skills/team-lead/agents/backend.md +26 -56
- package/plugins/specweave/skills/team-lead/agents/database.md +23 -51
- package/plugins/specweave/skills/team-lead/agents/frontend.md +27 -57
- package/plugins/specweave/skills/team-lead/agents/pm.md +7 -11
- package/plugins/specweave/skills/team-lead/agents/researcher.md +29 -55
- package/plugins/specweave/skills/team-lead/agents/reviewer-security.md +43 -59
- package/plugins/specweave/skills/team-lead/agents/security.md +22 -48
- package/plugins/specweave/skills/team-lead/agents/testing.md +26 -53
- package/plugins/specweave/skills/team-merge/SKILL.md +13 -10
- package/plugins/specweave/skills/team-lead/agents/reviewer-logic.md +0 -82
- package/plugins/specweave/skills/team-lead/agents/reviewer-performance.md +0 -83
|
@@ -1,15 +1,58 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "
|
|
3
|
-
argument-hint: "[--pr N] [--changes] [--increment NNNN] [--cross-repo] [path]"
|
|
2
|
+
description: "Multi-agent code review system. Spawns 3 parallel reviewers (security, logic, performance) with inline self-critique. Use when saying 'review code', 'code review', 'audit code', 'review PR', 'review changes', 'check code quality'."
|
|
3
|
+
argument-hint: "[--pr N] [--changes] [--increment NNNN] [--cross-repo] [--full-fanout] [path]"
|
|
4
4
|
context: fork
|
|
5
5
|
model: opus
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Code Reviewer
|
|
9
9
|
|
|
10
|
-
**Parallel multi-agent code review with
|
|
10
|
+
**Parallel multi-agent code review with 3 core reviewers (security, logic, performance) and inline self-critique.**
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Default path spawns **3 reviewer agents** (security, logic, performance) that analyze code simultaneously. Each reviewer re-reads its own findings before emitting, validates evidence claims, and rates confidence 1–5. The 3-reviewer default balances coverage with token cost for typical reviews.
|
|
13
|
+
|
|
14
|
+
**`--full-fanout`** restores the 8-reviewer + 10-validator path for maximum coverage at higher token cost. Reach for it on pre-release audits, large refactors, or security-sensitive PRs where thoroughness beats cost.
|
|
15
|
+
|
|
16
|
+
## Tool-Use Rationale
|
|
17
|
+
|
|
18
|
+
- **Read**: Load spec.md, rubric.md, CLAUDE.md, and the files under review so reviewers share identical context.
|
|
19
|
+
- **Grep**: Locate call sites, try/catch patterns, and AC markers across the touched files.
|
|
20
|
+
- **Bash**: Run `gh pr diff`, `git diff`, and `find` to build the file list and extract PR metadata.
|
|
21
|
+
|
|
22
|
+
## Model Configuration
|
|
23
|
+
|
|
24
|
+
**Default effort**: `xhigh` — recommended for all code-review tasks per Opus 4.7 conventions.
|
|
25
|
+
**Opt-in max**: `--effort max` enables maximum effort with a warning: "max effort risks overthinking on straightforward problems."
|
|
26
|
+
**Legacy mode**: Set `quality.thinkingBudget: "legacy"` in config to pass a fixed `thinking` parameter (for pre-4.7 models only).
|
|
27
|
+
|
|
28
|
+
## Prompt Caching
|
|
29
|
+
|
|
30
|
+
`sw:code-reviewer` uses Anthropic's ephemeral prompt caching so the shared context (project rules, active spec, rubric) is reused across the parallel reviewer fan-out and between fix-loop iterations. This is especially impactful during `sw:done`, where the fix loop can invoke code-reviewer up to 5 times per closure.
|
|
31
|
+
|
|
32
|
+
**Files cached by default** (via `static-context-loader`):
|
|
33
|
+
- `CLAUDE.md` (project root)
|
|
34
|
+
- `.specweave/config.json`
|
|
35
|
+
- The active increment's `spec.md`
|
|
36
|
+
- The active increment's `rubric.md` (if present)
|
|
37
|
+
|
|
38
|
+
**Cache window**: 5-minute TTL (Anthropic's `cache_control: { type: "ephemeral" }` breakpoint). Successive reviewer spawns that share this prefix read from cache.
|
|
39
|
+
|
|
40
|
+
**Extending the list**: Add paths to `cache.staticContextFiles` in `.specweave/config.json`:
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"cache": {
|
|
44
|
+
"staticContextFiles": [
|
|
45
|
+
"CLAUDE.md",
|
|
46
|
+
".specweave/config.json",
|
|
47
|
+
".specweave/docs/internal/architecture/adr/ADR-001-something.md"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Disable caching**: Set `cache.staticContextFiles: []` in `.specweave/config.json`. Reviewer agents will still run, but without the shared prefix cache.
|
|
54
|
+
|
|
55
|
+
See `.specweave/docs/internal/specs/config-reference.md` and `opus-47-migration.md` for the full caching setup.
|
|
13
56
|
|
|
14
57
|
## MANDATORY: Orchestrator Identity
|
|
15
58
|
|
|
@@ -132,75 +175,81 @@ fi
|
|
|
132
175
|
|
|
133
176
|
## 1. Smart Reviewer Routing
|
|
134
177
|
|
|
135
|
-
|
|
178
|
+
**Default (3 reviewers)**: security, logic, performance — each with inline self-critique.
|
|
179
|
+
**`--full-fanout`**: restores the legacy 8-reviewer path (plus the 10-validator finding-validation fan-out).
|
|
136
180
|
|
|
137
|
-
###
|
|
181
|
+
### Default Reviewers (always spawned)
|
|
138
182
|
|
|
139
183
|
| Reviewer | Agent Template | Model | Specialization |
|
|
140
184
|
|----------|---------------|-------|----------------|
|
|
141
|
-
| **Logic** | `agents/reviewer-logic.md` (from team-lead) | **opus** | Bugs, edge cases, error handling |
|
|
142
185
|
| **Security** | `agents/reviewer-security.md` (from team-lead) | **opus** | OWASP, auth, secrets, injection |
|
|
143
|
-
| **
|
|
144
|
-
| **
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
186
|
+
| **Logic** | inline (see §2 Logic Checklist) | **opus** | Bugs, edge cases, error handling, silent failures, type invariants, spec compliance |
|
|
187
|
+
| **Performance** | inline (see §2 Performance Checklist) | sonnet | N+1, memory, blocking ops |
|
|
188
|
+
|
|
189
|
+
The default logic reviewer absorbs silent-failures, types, spec-compliance, comments, and tests checks via its expanded checklist — a single careful reviewer with self-critique typically catches what 5 narrower reviewers would.
|
|
190
|
+
|
|
191
|
+
**Model tiering rationale**: Security and Logic need deep reasoning (Opus). Performance is pattern-matching and uses Sonnet. Non-Claude environments (Cursor, Copilot, etc.) ignore model hints gracefully.
|
|
149
192
|
|
|
150
|
-
|
|
193
|
+
### Full-Fanout Reviewers (`--full-fanout` only)
|
|
194
|
+
|
|
195
|
+
| Reviewer | Agent Template | Model | Specialization |
|
|
196
|
+
|----------|---------------|-------|----------------|
|
|
197
|
+
| Silent Failures | `agents/reviewer-silent-failures.md` | sonnet | Empty catches, swallowed errors |
|
|
198
|
+
| Type Design | `agents/reviewer-types.md` | sonnet | Type quality, invariants, assertions |
|
|
199
|
+
| Spec Compliance | `agents/reviewer-spec-compliance.md` | sonnet | AC verification, scope creep |
|
|
200
|
+
| Comments | `agents/reviewer-comments.md` | sonnet | Stale/misleading comments, JSDoc accuracy |
|
|
201
|
+
| Tests | `agents/reviewer-tests.md` | sonnet | Behavioral test coverage gaps |
|
|
151
202
|
|
|
152
203
|
### Routing Rules
|
|
153
204
|
|
|
154
205
|
```
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
206
|
+
DEFAULT (3 reviewers, always spawned):
|
|
207
|
+
- security (runs on every review)
|
|
208
|
+
- logic (runs on every review, with expanded checklist)
|
|
209
|
+
- performance (runs on every review)
|
|
158
210
|
|
|
159
|
-
|
|
211
|
+
WITH --full-fanout, also include IF file patterns match:
|
|
160
212
|
- reviewer-types → *.ts, *.tsx files present
|
|
161
213
|
- reviewer-silent-failures → *.ts, *.tsx, *.js files with try/catch or .catch patterns
|
|
162
|
-
- reviewer-performance → database files (prisma/, *.sql), API routes, data-heavy code
|
|
163
214
|
- reviewer-spec-compliance → increment scope provided (--increment or active increment found)
|
|
164
215
|
- reviewer-comments → significant changes (> 50 changed lines)
|
|
165
216
|
- reviewer-tests → non-test source files changed
|
|
166
217
|
|
|
167
|
-
Cap: --max-reviewers N (default: 8)
|
|
218
|
+
Cap: --max-reviewers N (default: 3; with --full-fanout: 8)
|
|
168
219
|
```
|
|
169
220
|
|
|
170
221
|
### Routing Decision
|
|
171
222
|
|
|
172
223
|
```bash
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
# TypeScript files → add type reviewer
|
|
176
|
-
if echo "$FILES" | grep -qE '\.(ts|tsx)$'; then
|
|
177
|
-
REVIEWERS+=("types")
|
|
178
|
-
fi
|
|
224
|
+
# Default: security + logic + performance — all three always spawn
|
|
225
|
+
REVIEWERS=("security" "logic" "performance")
|
|
179
226
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
227
|
+
if [ "$FULL_FANOUT" = "true" ]; then
|
|
228
|
+
# TypeScript files → add type reviewer
|
|
229
|
+
if echo "$FILES" | grep -qE '\.(ts|tsx)$'; then
|
|
230
|
+
REVIEWERS+=("types")
|
|
231
|
+
fi
|
|
184
232
|
|
|
185
|
-
#
|
|
186
|
-
if echo "$FILES" | grep -qE '(
|
|
187
|
-
|
|
188
|
-
fi
|
|
233
|
+
# Code files → add silent failures
|
|
234
|
+
if echo "$FILES" | grep -qE '\.(ts|tsx|js|jsx)$'; then
|
|
235
|
+
REVIEWERS+=("silent-failures")
|
|
236
|
+
fi
|
|
189
237
|
|
|
190
|
-
# Increment context → add spec compliance
|
|
191
|
-
if [ "$SCOPE" = "increment" ] || [ -n "$INCREMENT_PATH" ]; then
|
|
192
|
-
|
|
193
|
-
fi
|
|
238
|
+
# Increment context → add spec compliance
|
|
239
|
+
if [ "$SCOPE" = "increment" ] || [ -n "$INCREMENT_PATH" ]; then
|
|
240
|
+
REVIEWERS+=("spec-compliance")
|
|
241
|
+
fi
|
|
194
242
|
|
|
195
|
-
# Significant changes → add comment reviewer
|
|
196
|
-
if [ "$(echo "$FILES" | wc -l)" -gt 10 ]; then
|
|
197
|
-
|
|
198
|
-
fi
|
|
243
|
+
# Significant changes → add comment reviewer
|
|
244
|
+
if [ "$(echo "$FILES" | wc -l)" -gt 10 ]; then
|
|
245
|
+
REVIEWERS+=("comments")
|
|
246
|
+
fi
|
|
199
247
|
|
|
200
|
-
# Source files (non-test) → add test coverage reviewer
|
|
201
|
-
if echo "$FILES" | grep -qE '\.(ts|tsx|js|jsx)$'; then
|
|
202
|
-
|
|
203
|
-
|
|
248
|
+
# Source files (non-test) → add test coverage reviewer
|
|
249
|
+
if echo "$FILES" | grep -qE '\.(ts|tsx|js|jsx)$'; then
|
|
250
|
+
if echo "$FILES" | grep -vqE '\.(test|spec)\.(ts|tsx|js|jsx)$'; then
|
|
251
|
+
REVIEWERS+=("tests")
|
|
252
|
+
fi
|
|
204
253
|
fi
|
|
205
254
|
fi
|
|
206
255
|
```
|
|
@@ -298,20 +347,28 @@ Multiple reviewers may flag the same issue (e.g., logic + silent-failures both c
|
|
|
298
347
|
|
|
299
348
|
---
|
|
300
349
|
|
|
301
|
-
## 3.5
|
|
350
|
+
## 3.5 Inline Self-Critique (default)
|
|
302
351
|
|
|
303
|
-
|
|
352
|
+
Default reviews use **inline self-critique** instead of spawning separate validator subagents. Each reviewer re-reads its own findings before emitting, validates evidence claims, and rates confidence 1–5.
|
|
304
353
|
|
|
305
|
-
###
|
|
354
|
+
### Self-Critique Contract
|
|
355
|
+
|
|
356
|
+
Every reviewer prompt includes this closing instruction:
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
Before emitting REVIEW_COMPLETE, perform self-critique:
|
|
360
|
+
1. Re-read each finding you produced.
|
|
361
|
+
2. For each finding, re-open the cited file at the cited line and confirm the described issue is really there.
|
|
362
|
+
3. Rate confidence 1–5 (5 = certain, 1 = speculative).
|
|
363
|
+
4. Drop any finding where confidence < 3.
|
|
364
|
+
5. Emit remaining findings with a "confidence": N field.
|
|
365
|
+
```
|
|
306
366
|
|
|
307
|
-
|
|
308
|
-
- **HIGH**: ALWAYS validate
|
|
309
|
-
- **MEDIUM/LOW/INFO**: Skip (trust the reviewer)
|
|
310
|
-
- **Skip entirely**: `--fast` flag or `codeReview.skipValidation: true` in config
|
|
367
|
+
Each finding therefore ships with a confidence score. Findings with confidence ≥ 3 keep their severity. Findings with confidence < 3 are dropped during the reviewer's own pass (never emitted).
|
|
311
368
|
|
|
312
|
-
###
|
|
369
|
+
### Full-Fanout Validator Path (`--full-fanout` only)
|
|
313
370
|
|
|
314
|
-
|
|
371
|
+
When `--full-fanout` is passed, the orchestrator additionally spawns (on the haiku tier) up to 10 independent verify-findings subagents for CRITICAL and HIGH findings (original behaviour):
|
|
315
372
|
|
|
316
373
|
```typescript
|
|
317
374
|
Task({
|
|
@@ -343,7 +400,7 @@ RESPOND WITH EXACTLY ONE LINE:
|
|
|
343
400
|
});
|
|
344
401
|
```
|
|
345
402
|
|
|
346
|
-
|
|
403
|
+
Process results (full-fanout only):
|
|
347
404
|
|
|
348
405
|
| Result | Action |
|
|
349
406
|
|--------|--------|
|
|
@@ -515,7 +572,7 @@ Produce a single report with sections per repo:
|
|
|
515
572
|
|
|
516
573
|
```typescript
|
|
517
574
|
// Shutdown each reviewer
|
|
518
|
-
SendMessage({ type: "shutdown_request", recipient: "
|
|
575
|
+
SendMessage({ type: "shutdown_request", recipient: "logic-inline", content: "Review complete" });
|
|
519
576
|
SendMessage({ type: "shutdown_request", recipient: "reviewer-security", content: "Review complete" });
|
|
520
577
|
// ... for each spawned reviewer
|
|
521
578
|
```
|
|
@@ -20,11 +20,20 @@ Execute a SpecWeave increment by running tasks from tasks.md with automatic AC-s
|
|
|
20
20
|
```
|
|
21
21
|
sw:do <increment-id> # Execute specific increment
|
|
22
22
|
sw:do # Auto-select best candidate
|
|
23
|
-
sw:do <id> --model
|
|
23
|
+
sw:do <id> --model <model-id> # Override the model (effort stays at xhigh)
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
- `<increment-id>`: Optional. Supports "001", "0001", "1", "0042", or "0153-feature-name" formats.
|
|
27
|
-
- `--model <
|
|
27
|
+
- `--model <model-id>`: Optional. Overrides the model. Effort stays at `xhigh`.
|
|
28
|
+
|
|
29
|
+
All tasks execute at the `xhigh` effort tier (Opus 4.7 default). Use `--model` to override the model if needed, but effort stays at xhigh.
|
|
30
|
+
|
|
31
|
+
## Tool-Use Rationale
|
|
32
|
+
|
|
33
|
+
- **Read**: Load spec.md, plan.md, tasks.md, and any referenced living docs before executing a task.
|
|
34
|
+
- **Edit**: Apply task-scoped code changes and flip `[ ]` → `[x]` in tasks.md after verification passes.
|
|
35
|
+
- **Write**: Create new files the task defines (source, tests, migrations).
|
|
36
|
+
- **Bash**: Run the task's test command and project-level verification (`npx vitest run`, `pytest`, `go test ./...`).
|
|
28
37
|
|
|
29
38
|
---
|
|
30
39
|
|
|
@@ -133,7 +142,7 @@ If TDD mode active:
|
|
|
133
142
|
### Step 4: Smart Resume
|
|
134
143
|
|
|
135
144
|
1. Parse tasks.md, find first incomplete task (`[ ]`)
|
|
136
|
-
2.
|
|
145
|
+
2. Run every task at the `xhigh` effort tier (Opus 4.7 default) — legacy tiered hints in tasks.md are ignored
|
|
137
146
|
3. Show resume context with completion percentage
|
|
138
147
|
|
|
139
148
|
### Step 5: Update Status
|
|
@@ -155,8 +164,8 @@ Before marking ANY task `[x]`, you MUST run verification and see it pass:
|
|
|
155
164
|
|
|
156
165
|
For each task:
|
|
157
166
|
|
|
158
|
-
1. **Read task details**: ID,
|
|
159
|
-
2. **
|
|
167
|
+
1. **Read task details**: ID, description, ACs, file paths
|
|
168
|
+
2. **Run at xhigh effort**: All tasks execute at the `xhigh` effort tier (Opus 4.7 default). `--model` only overrides the model; effort stays at xhigh.
|
|
160
169
|
3. **Execute**: Follow plan.md architecture, implement, write clean code
|
|
161
170
|
4. **Verify**: Run the task's test command (see Iron Law above). Only proceed if green.
|
|
162
171
|
5. **Mark complete**: Change `[ ]` to `[x]` in tasks.md — ONLY after verification passes
|
|
@@ -5,6 +5,41 @@ argument-hint: "<increment-id> [--auto]"
|
|
|
5
5
|
|
|
6
6
|
# Close Increment (PM Validated)
|
|
7
7
|
|
|
8
|
+
## Tool-Use Rationale
|
|
9
|
+
|
|
10
|
+
- **Bash**: Invoke the CLI closure gate (`specweave complete`), run `npx vitest run` and `npx playwright test` to verify the suite is green, and read `jq` values from `.specweave/config.json`.
|
|
11
|
+
- **Read**: Load `code-review-report.json`, `grill-report.json`, `judge-llm-report.json`, and `rubric.md` to evaluate gate outcomes.
|
|
12
|
+
- **Edit**: Update `metadata.json` status and any inline docs (CLAUDE.md, CHANGELOG.md) touched by the closure step.
|
|
13
|
+
|
|
14
|
+
## Prompt Caching
|
|
15
|
+
|
|
16
|
+
`sw:done` is a closure orchestrator that chains `code-reviewer`, `simplify`, `grill`, and `judge-llm`. Because the same increment context is loaded four times over, Anthropic's ephemeral prompt caching gives closure a substantial cost/latency win.
|
|
17
|
+
|
|
18
|
+
**Files cached by default** (via `static-context-loader`):
|
|
19
|
+
- `CLAUDE.md` (project root)
|
|
20
|
+
- `.specweave/config.json`
|
|
21
|
+
- The active increment's `spec.md`
|
|
22
|
+
- The active increment's `rubric.md` (if present)
|
|
23
|
+
|
|
24
|
+
**Cache window**: 5-minute TTL (Anthropic's `cache_control: { type: "ephemeral" }` breakpoint). Consecutive gate invocations within the TTL read the cached prefix instead of re-tokenizing it.
|
|
25
|
+
|
|
26
|
+
**Extending the list**: Add paths to `cache.staticContextFiles` in `.specweave/config.json`:
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"cache": {
|
|
30
|
+
"staticContextFiles": [
|
|
31
|
+
"CLAUDE.md",
|
|
32
|
+
".specweave/config.json",
|
|
33
|
+
".specweave/docs/internal/specs/team-conventions.md"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
**Disable caching**: Set `cache.staticContextFiles: []` in `.specweave/config.json`. Closure gates will still run but without the shared prefix cache.
|
|
40
|
+
|
|
41
|
+
See `.specweave/docs/internal/specs/config-reference.md` and `opus-47-migration.md` for the full caching setup.
|
|
42
|
+
|
|
8
43
|
## Project Overrides
|
|
9
44
|
|
|
10
45
|
**Skill Memories**: If `.specweave/skill-memories/done.md` exists, read and apply its learnings.
|
|
@@ -46,7 +81,7 @@ If closing a SpecWeave framework increment, show post-closure reminders: update
|
|
|
46
81
|
**The CLI blocks closure if `code-review-report.json` is missing (when required).** Do NOT skip this step.
|
|
47
82
|
|
|
48
83
|
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 //
|
|
84
|
+
2. Read max iterations: `MAX_ITER=$(jq -r '.codeReview.maxFixIterations // 5' .specweave/config.json 2>/dev/null)` — default cap is **5** in SpecWeave 1.1.0 (Opus 4.7 converges faster per iteration, so a higher cap catches edge cases without stalling closure)
|
|
50
85
|
3. Read blocking severities: defaults are `critical`, `high`, `medium` (configurable via `codeReview.blockingSeverities`)
|
|
51
86
|
4. **Iteration loop** (ITERATION=1):
|
|
52
87
|
a. Invoke `Skill({ skill: "sw:code-reviewer", args: "--increment <id>" })`
|
|
@@ -1,229 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
name: sw/github-issue-standard
|
|
3
|
+
description: "[DEPRECATED] GitHub issue formatting standard. See docs/internal/specs/github-issue-standard.md"
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
deprecated: true
|
|
4
6
|
---
|
|
5
7
|
|
|
6
|
-
|
|
8
|
+
> ⚠️ DEPRECATED: Content moved to `.specweave/docs/internal/specs/github-issue-standard.md`
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
- User stories (individual us-*.md files)
|
|
10
|
-
- Epics/Features (FS-* folders)
|
|
11
|
-
- Increments (0001-* folders)
|
|
12
|
-
- Specs (spec-*.md files)
|
|
10
|
+
See: [github-issue-standard.md](../../../.specweave/docs/internal/specs/github-issue-standard.md)
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### ✅ ONLY Allowed Title Formats
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
[FS-XXX][US-YYY] User Story Title ← STANDARD (User Stories)
|
|
20
|
-
[FS-XXX] Feature Title ← Rare (Feature-level only)
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
**Examples**:
|
|
24
|
-
- ✅ `[FS-059][US-003] Hook Optimization (P0)`
|
|
25
|
-
- ✅ `[FS-054][US-001] Fix Reopen Desync Bug (P0)`
|
|
26
|
-
- ✅ `[FS-048] Smart Pagination Feature`
|
|
27
|
-
|
|
28
|
-
### ❌ PROHIBITED Title Formats (NEVER USE)
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
[BUG] Title ← WRONG! Bug is a LABEL, not title prefix
|
|
32
|
-
[HOTFIX] Title ← WRONG! Hotfix is a LABEL
|
|
33
|
-
[FEATURE] Title ← WRONG! Feature is a LABEL
|
|
34
|
-
[DOCS] Title ← WRONG! Docs is a LABEL
|
|
35
|
-
[Increment XXXX] Title ← DEPRECATED! Old format
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Why?** Type-based prefixes like `[BUG]` break traceability:
|
|
39
|
-
- Cannot link to Feature Spec (FS-XXX)
|
|
40
|
-
- Cannot link to User Story (US-YYY)
|
|
41
|
-
- Violates SpecWeave's data flow: `Increment → Living Docs → GitHub`
|
|
42
|
-
|
|
43
|
-
**What to do instead?**
|
|
44
|
-
1. Link work to a Feature (FS-XXX) in living docs
|
|
45
|
-
2. Create User Story (US-YYY) under that feature
|
|
46
|
-
3. Use GitHub **labels** for categorization: `bug`, `enhancement`, `hotfix`
|
|
47
|
-
|
|
48
|
-
### Validation
|
|
49
|
-
|
|
50
|
-
The GitHub client (`github-client-v2.ts`) enforces this:
|
|
51
|
-
- Rejects titles starting with `[BUG]`, `[HOTFIX]`, `[FEATURE]`, etc.
|
|
52
|
-
- Rejects deprecated `[Increment XXXX]` format
|
|
53
|
-
- Only allows `[FS-XXX][US-YYY]` or `[FS-XXX]` formats
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## The Standard Format
|
|
58
|
-
|
|
59
|
-
### ✅ Required Elements
|
|
60
|
-
|
|
61
|
-
Every GitHub issue MUST include:
|
|
62
|
-
|
|
63
|
-
1. **Checkable Acceptance Criteria**
|
|
64
|
-
- Use GitHub task checkbox format: `- [x]` or `- [ ]`
|
|
65
|
-
- Include AC ID, description, priority, and testable flag
|
|
66
|
-
- Example: `- [x] **AC-US4-01**: Description (P1, testable)`
|
|
67
|
-
|
|
68
|
-
2. **Checkable Tasks**
|
|
69
|
-
- Link to increment tasks.md with GitHub URLs (not relative paths)
|
|
70
|
-
- Use GitHub task checkbox format
|
|
71
|
-
- Example: `- [x] [T-008: Title](https://github.com/owner/repo/tree/develop/.specweave/increments/0031/tasks.md#t-008-title)`
|
|
72
|
-
|
|
73
|
-
3. **Working GitHub URLs** (v5.0.0+ - NO _features folder)
|
|
74
|
-
- Feature links: `https://github.com/owner/repo/tree/develop/.specweave/docs/internal/specs/{project}/FS-031`
|
|
75
|
-
- User story links: `https://github.com/owner/repo/tree/develop/.specweave/docs/internal/specs/{project}/FS-031/us-004-*.md`
|
|
76
|
-
- Task links: `https://github.com/owner/repo/tree/develop/.specweave/increments/0031/tasks.md#task-anchor`
|
|
77
|
-
- Increment links: `https://github.com/owner/repo/tree/develop/.specweave/increments/0031`
|
|
78
|
-
|
|
79
|
-
**Note**: Feature ID is DERIVED from increment (0031 → FS-031)
|
|
80
|
-
|
|
81
|
-
4. **Extracted Priority**
|
|
82
|
-
- Extract from ACs (highest priority wins: P1 > P2 > P3)
|
|
83
|
-
- Show ONLY if priority exists (don't show "undefined")
|
|
84
|
-
- Example: `**Priority**: P1`
|
|
85
|
-
|
|
86
|
-
5. **NO Project Field**
|
|
87
|
-
- Don't include `**Project**: ...` - not needed for GitHub issues
|
|
88
|
-
- Project is determined by repository context
|
|
89
|
-
|
|
90
|
-
### ❌ Never Use
|
|
91
|
-
|
|
92
|
-
- ❌ Relative paths (`../../{project}/FS-031`)
|
|
93
|
-
- ❌ Undefined values (`**Priority**: undefined`)
|
|
94
|
-
- ❌ Project field in metadata
|
|
95
|
-
- ❌ Plain bullet points for ACs (must be checkboxes)
|
|
96
|
-
- ❌ Plain bullet points for tasks (must be checkboxes with links)
|
|
97
|
-
|
|
98
|
-
## Implementation
|
|
99
|
-
|
|
100
|
-
### UserStoryContentBuilder (✅ REFERENCE IMPLEMENTATION)
|
|
101
|
-
|
|
102
|
-
**File**: `plugins/specweave-github/lib/user-story-content-builder.ts`
|
|
103
|
-
|
|
104
|
-
This is the **gold standard** implementation. All other builders must follow this pattern.
|
|
105
|
-
|
|
106
|
-
**Key features**:
|
|
107
|
-
```typescript
|
|
108
|
-
// 1. Accept GitHub repo parameter
|
|
109
|
-
async buildIssueBody(githubRepo?: string): Promise<string>
|
|
110
|
-
|
|
111
|
-
// 2. Auto-detect repo from git remote
|
|
112
|
-
private async detectGitHubRepo(): Promise<string | null>
|
|
113
|
-
|
|
114
|
-
// 3. Extract priority from ACs
|
|
115
|
-
private extractPriorityFromACs(criteria: AcceptanceCriterion[]): string | null
|
|
116
|
-
|
|
117
|
-
// 4. Generate GitHub URLs (not relative) - v5.0.0+: No _features folder
|
|
118
|
-
const featureUrl = `https://github.com/${repo}/tree/develop/.specweave/docs/internal/specs/${project}/${featureId}`;
|
|
119
|
-
|
|
120
|
-
// 5. Convert task links to GitHub URLs
|
|
121
|
-
if (repo && taskLink.startsWith('../../')) {
|
|
122
|
-
const relativePath = taskLink.replace(/^\.\.\/\.\.\//, '.specweave/');
|
|
123
|
-
taskLink = `https://github.com/${repo}/tree/develop/${relativePath}`;
|
|
124
|
-
}
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Template
|
|
128
|
-
|
|
129
|
-
```markdown
|
|
130
|
-
**Feature**: [FS-031](https://github.com/owner/repo/tree/develop/.specweave/docs/internal/specs/{project}/FS-031)
|
|
131
|
-
**Status**: complete
|
|
132
|
-
**Priority**: P1
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## User Story
|
|
137
|
-
|
|
138
|
-
**As a** user
|
|
139
|
-
**I want** feature
|
|
140
|
-
**So that** benefit
|
|
141
|
-
|
|
142
|
-
📄 View full story: [`us-004-name.md`](https://github.com/owner/repo/tree/develop/.specweave/docs/internal/specs/{project}/FS-031/us-004-name.md)
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Acceptance Criteria
|
|
147
|
-
|
|
148
|
-
Progress: 4/6 criteria met (67%)
|
|
149
|
-
|
|
150
|
-
- [x] **AC-US4-01**: Description (P1, testable)
|
|
151
|
-
- [x] **AC-US4-02**: Description (P1, testable)
|
|
152
|
-
- [ ] **AC-US4-03**: Description (P2, testable)
|
|
153
|
-
- [ ] **AC-US4-04**: Description (P2, testable)
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Implementation Tasks
|
|
158
|
-
|
|
159
|
-
Progress: 3/6 tasks complete (50%)
|
|
160
|
-
|
|
161
|
-
**Increment**: [0031-name](https://github.com/owner/repo/tree/develop/.specweave/increments/0031-name)
|
|
162
|
-
|
|
163
|
-
- [x] [T-008: Title](https://github.com/owner/repo/tree/develop/.specweave/increments/0031/tasks.md#t-008-title)
|
|
164
|
-
- [x] [T-009: Title](https://github.com/owner/repo/tree/develop/.specweave/increments/0031/tasks.md#t-009-title)
|
|
165
|
-
- [ ] [T-010: Title](https://github.com/owner/repo/tree/develop/.specweave/increments/0031/tasks.md#t-010-title)
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
🤖 Auto-synced by SpecWeave
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
## Implementation
|
|
173
|
-
|
|
174
|
-
### Content Builders
|
|
175
|
-
|
|
176
|
-
All GitHub issue content is generated by these builders:
|
|
177
|
-
|
|
178
|
-
1. **UserStoryIssueBuilder** (`plugins/specweave-github/lib/user-story-issue-builder.ts`)
|
|
179
|
-
- Creates issues from `us-*.md` files
|
|
180
|
-
- Generates `[FS-XXX][US-YYY] Title` format
|
|
181
|
-
- Extracts ACs and tasks as checkboxes
|
|
182
|
-
- Uses GitHub URLs (not relative paths)
|
|
183
|
-
|
|
184
|
-
2. **GitHubFeatureSync** (`plugins/specweave-github/lib/github-feature-sync.ts`)
|
|
185
|
-
- Syncs Features as GitHub Milestones
|
|
186
|
-
- Syncs User Stories as GitHub Issues via UserStoryIssueBuilder
|
|
187
|
-
- Universal Hierarchy: Feature → Milestone, User Story → Issue
|
|
188
|
-
|
|
189
|
-
### Commands
|
|
190
|
-
|
|
191
|
-
All GitHub sync commands use the Universal Hierarchy:
|
|
192
|
-
|
|
193
|
-
- `sw-github:sync` - Sync increments via Feature/UserStory hierarchy
|
|
194
|
-
- `sw-github:create-issue` - Create issue using standard format
|
|
195
|
-
- `sw-github:update-user-story` - Update user story issue
|
|
196
|
-
|
|
197
|
-
## Validation Checklist
|
|
198
|
-
|
|
199
|
-
When creating/updating a GitHub issue, verify:
|
|
200
|
-
|
|
201
|
-
- [ ] Feature link is clickable GitHub URL (not `../../`)
|
|
202
|
-
- [ ] User story link is clickable GitHub URL
|
|
203
|
-
- [ ] All task links are clickable GitHub URLs
|
|
204
|
-
- [ ] ACs are checkable (GitHub checkboxes work in UI)
|
|
205
|
-
- [ ] Tasks are checkable (GitHub checkboxes work in UI)
|
|
206
|
-
- [ ] Priority shows actual value (P1/P2/P3) or is omitted
|
|
207
|
-
- [ ] No "Project: undefined" field
|
|
208
|
-
- [ ] Progress percentages are correct
|
|
209
|
-
- [ ] Increment link is clickable GitHub URL
|
|
210
|
-
|
|
211
|
-
## Benefits
|
|
212
|
-
|
|
213
|
-
- ✅ **Links work**: No more broken relative paths
|
|
214
|
-
- ✅ **Checkable**: ACs and tasks can be checked/unchecked in GitHub UI
|
|
215
|
-
- ✅ **Clean metadata**: No undefined values cluttering the issue
|
|
216
|
-
- ✅ **Consistent**: Same format across all issue types
|
|
217
|
-
- ✅ **Traceable**: Direct links to source files in repository
|
|
218
|
-
|
|
219
|
-
## When to Use
|
|
220
|
-
|
|
221
|
-
**Always!** This is the ONLY acceptable format for GitHub issues created by SpecWeave.
|
|
222
|
-
|
|
223
|
-
No exceptions. No shortcuts. Every issue follows this standard.
|
|
224
|
-
|
|
225
|
-
## Related Files
|
|
226
|
-
|
|
227
|
-
- **User Story Builder**: `plugins/specweave-github/lib/user-story-issue-builder.ts`
|
|
228
|
-
- **Feature Sync**: `plugins/specweave-github/lib/github-feature-sync.ts`
|
|
229
|
-
- **Example Issue**: https://github.com/anton-abyzov/specweave/issues/501
|
|
12
|
+
Migration: This was a documentation standard, not an executable skill.
|
|
13
|
+
Use `sw-github:push` for GitHub sync operations.
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: "[DEPRECATED] Use `sw:multi-project --tool github` instead. Organizes specs and splits tasks across multiple GitHub repositories. This skill will be removed in SpecWeave v1.3.0."
|
|
3
3
|
user-invokable: false
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# GitHub Multi-Project Management Skill
|
|
7
7
|
|
|
8
|
+
## Migration
|
|
9
|
+
|
|
10
|
+
> Deprecated. Use: `sw:multi-project --tool github`
|
|
11
|
+
|
|
12
|
+
This skill has been consolidated into the unified `sw:multi-project` skill. Replace any invocation of `sw:github-multi-project` with `sw:multi-project --tool github`. The flag-based skill supports GitHub, Azure DevOps, and Jira under a single interface. See `plugins/specweave/skills/multi-project/SKILL.md`.
|
|
13
|
+
|
|
14
|
+
Scheduled for removal in SpecWeave v1.3.0.
|
|
15
|
+
|
|
8
16
|
Expert skill for managing SpecWeave projects across multiple GitHub repositories.
|
|
9
17
|
|
|
10
18
|
## Core Capabilities
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Two-way synchronization between SpecWeave specs and GitHub Projects (push & pull by default). Use when asking about GitHub integration setup, troubleshooting sync issues, or configuring sync settings. For actual syncing, use sw-github:sync-spec command.
|
|
2
|
+
description: "[DEPRECATED] Two-way synchronization between SpecWeave specs and GitHub Projects (push & pull by default). Use when asking about GitHub integration setup, troubleshooting sync issues, or configuring sync settings. For actual syncing, use sw-github:sync-spec command."
|
|
3
3
|
user-invokable: false
|
|
4
|
+
deprecated: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
> ⚠️ DEPRECATED: Use `sw-github:sync-spec` instead. This skill will be removed in v1.3.0.
|
|
8
|
+
|
|
9
|
+
## Migration
|
|
10
|
+
|
|
11
|
+
This skill has been deprecated as part of the Opus 4.7 framework alignment (increment 0669).
|
|
12
|
+
|
|
13
|
+
- **Use instead**: `sw-github:sync-spec` for push/pull operations
|
|
14
|
+
- **Removal**: Scheduled for v1.3.0 (2 minor releases after v1.1.0)
|
|
15
|
+
- **Why**: Consolidated sync logic moved to the `sw-github:*` command family. This skill's guidance content is now covered by `sw-github:sync-spec` help text and `.specweave/docs/internal/specs/github-sync.md`.
|
|
16
|
+
|
|
17
|
+
For the migration policy, see `.specweave/docs/internal/specs/skill-deprecation-policy.md`.
|
|
18
|
+
|
|
4
19
|
---
|
|
5
20
|
|
|
6
21
|
# GitHub Sync - Two-way Spec ↔ Project Synchronization
|