specweave 1.0.488 → 1.0.490
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 +1 -1
- package/dist/plugins/specweave-ado/lib/ado-ac-checkbox-sync.d.ts +13 -5
- package/dist/plugins/specweave-ado/lib/ado-ac-checkbox-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-ac-checkbox-sync.js +28 -26
- package/dist/plugins/specweave-ado/lib/ado-ac-checkbox-sync.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-client.d.ts +14 -0
- package/dist/plugins/specweave-ado/lib/ado-client.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-client.js +29 -1
- package/dist/plugins/specweave-ado/lib/ado-client.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-pull-sync.d.ts +35 -0
- package/dist/plugins/specweave-ado/lib/ado-pull-sync.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-pull-sync.js +53 -0
- package/dist/plugins/specweave-ado/lib/ado-pull-sync.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-rate-limiter.d.ts +46 -0
- package/dist/plugins/specweave-ado/lib/ado-rate-limiter.d.ts.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-rate-limiter.js +65 -0
- package/dist/plugins/specweave-ado/lib/ado-rate-limiter.js.map +1 -0
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts +7 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js +25 -1
- package/dist/plugins/specweave-ado/lib/ado-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts +17 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js +51 -9
- package/dist/plugins/specweave-ado/lib/ado-status-sync.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js +1 -1
- package/dist/plugins/specweave-github/lib/github-client-v2.js.map +1 -1
- package/dist/plugins/specweave-github/lib/github-push-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-github/lib/github-push-sync.js +15 -3
- package/dist/plugins/specweave-github/lib/github-push-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts +31 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js +170 -97
- package/dist/plugins/specweave-jira/lib/jira-spec-sync.js.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts +36 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.d.ts.map +1 -1
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js +185 -82
- package/dist/plugins/specweave-jira/lib/jira-status-sync.js.map +1 -1
- package/dist/src/adapters/adapter-loader.d.ts.map +1 -1
- package/dist/src/adapters/adapter-loader.js +8 -2
- package/dist/src/adapters/adapter-loader.js.map +1 -1
- package/dist/src/adapters/codex/adapter.d.ts.map +1 -1
- package/dist/src/adapters/codex/adapter.js +1 -0
- package/dist/src/adapters/codex/adapter.js.map +1 -1
- package/dist/src/adapters/cursor/adapter.d.ts.map +1 -1
- package/dist/src/adapters/cursor/adapter.js +1 -0
- package/dist/src/adapters/cursor/adapter.js.map +1 -1
- package/dist/src/adapters/generic/adapter.d.ts +6 -3
- package/dist/src/adapters/generic/adapter.d.ts.map +1 -1
- package/dist/src/adapters/generic/adapter.js +53 -47
- package/dist/src/adapters/generic/adapter.js.map +1 -1
- package/dist/src/adapters/kimi/adapter.d.ts +21 -0
- package/dist/src/adapters/kimi/adapter.d.ts.map +1 -0
- package/dist/src/adapters/kimi/adapter.js +57 -0
- package/dist/src/adapters/kimi/adapter.js.map +1 -0
- package/dist/src/adapters/opencode/adapter.d.ts +24 -0
- package/dist/src/adapters/opencode/adapter.d.ts.map +1 -0
- package/dist/src/adapters/opencode/adapter.js +71 -0
- package/dist/src/adapters/opencode/adapter.js.map +1 -0
- package/dist/src/adapters/registry.yaml +59 -0
- package/dist/src/adapters/trae/adapter.d.ts +21 -0
- package/dist/src/adapters/trae/adapter.d.ts.map +1 -0
- package/dist/src/adapters/trae/adapter.js +64 -0
- package/dist/src/adapters/trae/adapter.js.map +1 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +156 -5
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/update-instructions.d.ts.map +1 -1
- package/dist/src/cli/commands/update-instructions.js +10 -0
- package/dist/src/cli/commands/update-instructions.js.map +1 -1
- package/dist/src/cli/helpers/init/index.d.ts +1 -0
- package/dist/src/cli/helpers/init/index.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/index.js +2 -0
- package/dist/src/cli/helpers/init/index.js.map +1 -1
- package/dist/src/cli/helpers/init/next-steps.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/next-steps.js +52 -0
- package/dist/src/cli/helpers/init/next-steps.js.map +1 -1
- package/dist/src/cli/helpers/init/skill-creator-installer.d.ts +24 -0
- package/dist/src/cli/helpers/init/skill-creator-installer.d.ts.map +1 -0
- package/dist/src/cli/helpers/init/skill-creator-installer.js +54 -0
- package/dist/src/cli/helpers/init/skill-creator-installer.js.map +1 -0
- package/dist/src/core/ado-description-updater.d.ts +22 -0
- package/dist/src/core/ado-description-updater.d.ts.map +1 -0
- package/dist/src/core/ado-description-updater.js +46 -0
- package/dist/src/core/ado-description-updater.js.map +1 -0
- package/dist/src/core/closure-dispatcher.d.ts +96 -0
- package/dist/src/core/closure-dispatcher.d.ts.map +1 -0
- package/dist/src/core/closure-dispatcher.js +116 -0
- package/dist/src/core/closure-dispatcher.js.map +1 -0
- package/dist/src/core/config/types.d.ts +2 -0
- 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/errors/sync-error.d.ts +12 -0
- package/dist/src/core/errors/sync-error.d.ts.map +1 -0
- package/dist/src/core/errors/sync-error.js +19 -0
- package/dist/src/core/errors/sync-error.js.map +1 -0
- package/dist/src/core/skill-gen/rule-collector.d.ts +28 -0
- package/dist/src/core/skill-gen/rule-collector.d.ts.map +1 -0
- package/dist/src/core/skill-gen/rule-collector.js +112 -0
- package/dist/src/core/skill-gen/rule-collector.js.map +1 -0
- package/dist/src/core/skill-gen/signal-collector.d.ts +2 -1
- package/dist/src/core/skill-gen/signal-collector.d.ts.map +1 -1
- package/dist/src/core/skill-gen/signal-collector.js +21 -5
- package/dist/src/core/skill-gen/signal-collector.js.map +1 -1
- package/dist/src/core/sync/persistent-circuit-breaker.d.ts +22 -0
- package/dist/src/core/sync/persistent-circuit-breaker.d.ts.map +1 -0
- package/dist/src/core/sync/persistent-circuit-breaker.js +65 -0
- package/dist/src/core/sync/persistent-circuit-breaker.js.map +1 -0
- package/dist/src/core/sync/retry-wrapper.d.ts +13 -0
- package/dist/src/core/sync/retry-wrapper.d.ts.map +1 -0
- package/dist/src/core/sync/retry-wrapper.js +37 -0
- package/dist/src/core/sync/retry-wrapper.js.map +1 -0
- package/dist/src/importers/ac-parser.d.ts +27 -0
- package/dist/src/importers/ac-parser.d.ts.map +1 -0
- package/dist/src/importers/ac-parser.js +47 -0
- package/dist/src/importers/ac-parser.js.map +1 -0
- package/dist/src/sync/types.d.ts +8 -0
- package/dist/src/sync/types.d.ts.map +1 -1
- package/dist/src/sync/types.js +12 -0
- package/dist/src/sync/types.js.map +1 -1
- package/package.json +1 -1
- package/plugins/specweave/PLUGIN.md +1 -0
- package/plugins/specweave/hooks/v2/guards/increment-existence-guard.sh +9 -3
- package/plugins/specweave/skills/code-reviewer/SKILL.md +401 -0
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-silent-failures.md +65 -0
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-spec-compliance.md +83 -0
- package/plugins/specweave/skills/code-reviewer/agents/reviewer-types.md +68 -0
- package/plugins/specweave/skills/skill-gen/SKILL.md +20 -3
- package/plugins/specweave/skills/team-lead/SKILL.md +155 -4
- package/plugins/specweave/skills/team-lead/agents/architect.md +52 -0
- package/plugins/specweave/skills/team-lead/agents/pm.md +50 -0
- package/plugins/specweave/skills/team-lead/agents/researcher.md +64 -0
- package/plugins/specweave-ado/lib/ado-ac-checkbox-sync.js +23 -21
- package/plugins/specweave-ado/lib/ado-ac-checkbox-sync.ts +37 -29
- package/plugins/specweave-ado/lib/ado-client.js +27 -1
- package/plugins/specweave-ado/lib/ado-client.ts +37 -2
- package/plugins/specweave-ado/lib/ado-pull-sync.js +35 -0
- package/plugins/specweave-ado/lib/ado-pull-sync.ts +74 -0
- package/plugins/specweave-ado/lib/ado-rate-limiter.js +56 -0
- package/plugins/specweave-ado/lib/ado-rate-limiter.ts +86 -0
- package/plugins/specweave-ado/lib/ado-spec-sync.js +25 -1
- package/plugins/specweave-ado/lib/ado-spec-sync.ts +32 -2
- package/plugins/specweave-ado/lib/ado-status-sync.js +52 -14
- package/plugins/specweave-ado/lib/ado-status-sync.ts +64 -16
- package/plugins/specweave-github/lib/github-client-v2.ts +1 -1
- package/plugins/specweave-github/lib/github-push-sync.js +11 -3
- package/plugins/specweave-github/lib/github-push-sync.ts +16 -3
- package/plugins/specweave-jira/lib/jira-spec-sync.js +60 -1
- package/plugins/specweave-jira/lib/jira-spec-sync.ts +93 -1
- package/plugins/specweave-jira/lib/jira-status-sync.js +151 -109
- package/plugins/specweave-jira/lib/jira-status-sync.ts +161 -39
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Elite multi-agent code review system. Spawns parallel specialized reviewers for logic, security, performance, silent failures, type design, and spec compliance. 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] [path]"
|
|
4
|
+
context: fork
|
|
5
|
+
model: opus
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Code Reviewer
|
|
9
|
+
|
|
10
|
+
**Parallel multi-agent code review with specialized reviewers.**
|
|
11
|
+
|
|
12
|
+
Spawns up to 6 specialized reviewer agents that analyze code simultaneously, then aggregates findings into a unified report with deduplication and severity ranking.
|
|
13
|
+
|
|
14
|
+
## MANDATORY: Orchestrator Identity
|
|
15
|
+
|
|
16
|
+
**You are an ORCHESTRATOR. You do NOT review code yourself.**
|
|
17
|
+
|
|
18
|
+
- ALWAYS create a team and spawn reviewer agents via Task()
|
|
19
|
+
- NEVER read code and produce findings directly — that's what the reviewer agents do
|
|
20
|
+
- Your job: detect scope, route reviewers, aggregate results, produce report
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 0. Scope Detection
|
|
25
|
+
|
|
26
|
+
Parse arguments to determine WHAT to review.
|
|
27
|
+
|
|
28
|
+
### Argument Parsing
|
|
29
|
+
|
|
30
|
+
| Argument | Scope | How to Get Diff |
|
|
31
|
+
|----------|-------|-----------------|
|
|
32
|
+
| `--pr N` | Review PR #N | `gh pr diff N` |
|
|
33
|
+
| `--changes` | Uncommitted + staged changes | `git diff HEAD` |
|
|
34
|
+
| `--increment NNNN` | Changes from increment NNNN | `git diff` on files touched by increment |
|
|
35
|
+
| `--cross-repo` | All repos in umbrella | Per-repo `git diff` (see Section 5) |
|
|
36
|
+
| `path/to/dir` | Specific directory/file | Read files directly |
|
|
37
|
+
| *(no args)* | Auto-detect (see below) | Varies |
|
|
38
|
+
|
|
39
|
+
### Auto-Detection (no arguments)
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# 1. Check for open PR on current branch
|
|
43
|
+
PR_NUM=$(gh pr view --json number -q '.number' 2>/dev/null)
|
|
44
|
+
if [ -n "$PR_NUM" ]; then
|
|
45
|
+
SCOPE="pr"
|
|
46
|
+
REVIEW_TARGET="$PR_NUM"
|
|
47
|
+
fi
|
|
48
|
+
|
|
49
|
+
# 2. Check for uncommitted changes
|
|
50
|
+
if [ -z "$SCOPE" ]; then
|
|
51
|
+
CHANGES=$(git diff --stat HEAD 2>/dev/null)
|
|
52
|
+
if [ -n "$CHANGES" ]; then
|
|
53
|
+
SCOPE="changes"
|
|
54
|
+
REVIEW_TARGET="uncommitted changes"
|
|
55
|
+
fi
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# 3. Check for active increment
|
|
59
|
+
if [ -z "$SCOPE" ]; then
|
|
60
|
+
ACTIVE=$(find .specweave/increments -maxdepth 2 -name "metadata.json" \
|
|
61
|
+
-exec grep -l '"active"' {} \; 2>/dev/null | head -1)
|
|
62
|
+
if [ -n "$ACTIVE" ]; then
|
|
63
|
+
SCOPE="increment"
|
|
64
|
+
REVIEW_TARGET=$(dirname "$ACTIVE")
|
|
65
|
+
fi
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
# 4. Fall back to whole project
|
|
69
|
+
if [ -z "$SCOPE" ]; then
|
|
70
|
+
SCOPE="project"
|
|
71
|
+
REVIEW_TARGET="."
|
|
72
|
+
fi
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Build File List
|
|
76
|
+
|
|
77
|
+
Once scope is determined, build the list of files to review:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
case "$SCOPE" in
|
|
81
|
+
pr) FILES=$(gh pr diff "$REVIEW_TARGET" --name-only) ;;
|
|
82
|
+
changes) FILES=$(git diff --name-only HEAD) ;;
|
|
83
|
+
increment) FILES=$(git log --name-only --pretty=format: -- "$REVIEW_TARGET") ;;
|
|
84
|
+
project) FILES=$(find src -type f -name "*.ts" -o -name "*.tsx" -o -name "*.js" 2>/dev/null) ;;
|
|
85
|
+
esac
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## 1. Smart Reviewer Routing
|
|
91
|
+
|
|
92
|
+
Not all 6 reviewers are needed for every review. Route based on what files changed.
|
|
93
|
+
|
|
94
|
+
### Available Reviewers
|
|
95
|
+
|
|
96
|
+
| Reviewer | Agent Template | Specialization |
|
|
97
|
+
|----------|---------------|----------------|
|
|
98
|
+
| **Logic** | `agents/reviewer-logic.md` (from team-lead) | Bugs, edge cases, error handling |
|
|
99
|
+
| **Security** | `agents/reviewer-security.md` (from team-lead) | OWASP, auth, secrets, injection |
|
|
100
|
+
| **Performance** | `agents/reviewer-performance.md` (from team-lead) | N+1, memory, blocking ops |
|
|
101
|
+
| **Silent Failures** | `agents/reviewer-silent-failures.md` | Empty catches, swallowed errors |
|
|
102
|
+
| **Type Design** | `agents/reviewer-types.md` | Type quality, invariants, assertions |
|
|
103
|
+
| **Spec Compliance** | `agents/reviewer-spec-compliance.md` | AC verification, scope creep |
|
|
104
|
+
|
|
105
|
+
### Routing Rules
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
ALWAYS include:
|
|
109
|
+
- reviewer-logic (runs on every review)
|
|
110
|
+
- reviewer-security (runs on every review)
|
|
111
|
+
|
|
112
|
+
Include IF file patterns match:
|
|
113
|
+
- reviewer-types → *.ts, *.tsx files present
|
|
114
|
+
- reviewer-silent-failures → *.ts, *.tsx, *.js files with try/catch or .catch patterns
|
|
115
|
+
- reviewer-performance → database files (prisma/, *.sql), API routes, data-heavy code
|
|
116
|
+
- reviewer-spec-compliance → increment scope provided (--increment or active increment found)
|
|
117
|
+
|
|
118
|
+
Cap: --max-reviewers N (default: 6)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Routing Decision
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
REVIEWERS=("logic" "security") # Always
|
|
125
|
+
|
|
126
|
+
# TypeScript files → add type reviewer
|
|
127
|
+
if echo "$FILES" | grep -qE '\.(ts|tsx)$'; then
|
|
128
|
+
REVIEWERS+=("types")
|
|
129
|
+
fi
|
|
130
|
+
|
|
131
|
+
# Code files → add silent failures
|
|
132
|
+
if echo "$FILES" | grep -qE '\.(ts|tsx|js|jsx)$'; then
|
|
133
|
+
REVIEWERS+=("silent-failures")
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
# Database/API → add performance
|
|
137
|
+
if echo "$FILES" | grep -qE '(prisma|\.sql|api/|routes/|controllers/)'; then
|
|
138
|
+
REVIEWERS+=("performance")
|
|
139
|
+
fi
|
|
140
|
+
|
|
141
|
+
# Increment context → add spec compliance
|
|
142
|
+
if [ "$SCOPE" = "increment" ] || [ -n "$INCREMENT_PATH" ]; then
|
|
143
|
+
REVIEWERS+=("spec-compliance")
|
|
144
|
+
fi
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## 2. Team Creation and Agent Spawning
|
|
150
|
+
|
|
151
|
+
### Create Review Team
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
TeamCreate({
|
|
155
|
+
team_name: "review-[timestamp-or-slug]",
|
|
156
|
+
description: "Code review: [REVIEW_TARGET]"
|
|
157
|
+
});
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The `review-*` prefix bypasses the increment-existence-guard (reviews don't need increments).
|
|
161
|
+
|
|
162
|
+
### Read and Spawn Agents
|
|
163
|
+
|
|
164
|
+
For each selected reviewer:
|
|
165
|
+
|
|
166
|
+
1. **Determine template source**:
|
|
167
|
+
- `logic`, `security`, `performance` → read from team-lead's agents/ dir:
|
|
168
|
+
`skills/team-lead/agents/reviewer-{name}.md`
|
|
169
|
+
- `silent-failures`, `types`, `spec-compliance` → read from own agents/ dir:
|
|
170
|
+
`skills/code-reviewer/agents/reviewer-{name}.md`
|
|
171
|
+
|
|
172
|
+
2. **Replace placeholders**:
|
|
173
|
+
- `[REVIEW_TARGET]` → the detected scope description
|
|
174
|
+
- `[INCREMENT_PATH]` → increment path (for spec-compliance only)
|
|
175
|
+
- `[PR_NUMBER]` → PR number (if scope is PR)
|
|
176
|
+
|
|
177
|
+
3. **Spawn via Task()**:
|
|
178
|
+
```typescript
|
|
179
|
+
Task({
|
|
180
|
+
team_name: "review-[slug]",
|
|
181
|
+
name: "reviewer-[domain]",
|
|
182
|
+
subagent_type: "general-purpose",
|
|
183
|
+
mode: "bypassPermissions",
|
|
184
|
+
prompt: <replaced template content>
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**All reviewers spawn in parallel** — no dependency chain for reviews.
|
|
189
|
+
|
|
190
|
+
**CRITICAL**: Always use `mode: "bypassPermissions"` — reviewers cannot handle trust-folder prompts.
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## 3. Result Aggregation
|
|
195
|
+
|
|
196
|
+
### Collect REVIEW_COMPLETE Messages
|
|
197
|
+
|
|
198
|
+
Wait for all spawned reviewers to signal `REVIEW_COMPLETE:`. Track completion:
|
|
199
|
+
|
|
200
|
+
```
|
|
201
|
+
Reviewer Status:
|
|
202
|
+
logic: REVIEW_COMPLETE (5 findings)
|
|
203
|
+
security: REVIEW_COMPLETE (2 findings)
|
|
204
|
+
types: REVIEW_COMPLETE (8 findings)
|
|
205
|
+
silent-failures: REVIEW_COMPLETE (3 findings)
|
|
206
|
+
performance: (not spawned)
|
|
207
|
+
spec-compliance: (not spawned)
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Timeout Handling
|
|
211
|
+
|
|
212
|
+
If a reviewer doesn't respond within a reasonable number of turns:
|
|
213
|
+
1. Send STATUS_CHECK message
|
|
214
|
+
2. If still no response after 2 more turns, declare stuck and proceed without it
|
|
215
|
+
3. Note the missing reviewer in the final report
|
|
216
|
+
|
|
217
|
+
### Deduplication
|
|
218
|
+
|
|
219
|
+
Multiple reviewers may flag the same issue (e.g., logic + silent-failures both catch an empty catch block):
|
|
220
|
+
- Group findings by file:line
|
|
221
|
+
- Merge findings at the same location into a single entry
|
|
222
|
+
- Keep the highest severity level
|
|
223
|
+
- Combine descriptions from different perspectives
|
|
224
|
+
|
|
225
|
+
---
|
|
226
|
+
|
|
227
|
+
## 4. Report Generation
|
|
228
|
+
|
|
229
|
+
### Unified Report Format
|
|
230
|
+
|
|
231
|
+
```markdown
|
|
232
|
+
# Code Review Report
|
|
233
|
+
|
|
234
|
+
**Scope**: [REVIEW_TARGET]
|
|
235
|
+
**Date**: [YYYY-MM-DD]
|
|
236
|
+
**Reviewers**: [list of active reviewers]
|
|
237
|
+
|
|
238
|
+
## Summary
|
|
239
|
+
|
|
240
|
+
| Severity | Count |
|
|
241
|
+
|----------|-------|
|
|
242
|
+
| CRITICAL | N |
|
|
243
|
+
| HIGH | N |
|
|
244
|
+
| MEDIUM | N |
|
|
245
|
+
| LOW | N |
|
|
246
|
+
| INFO | N |
|
|
247
|
+
|
|
248
|
+
## Critical Findings
|
|
249
|
+
|
|
250
|
+
[Grouped findings at CRITICAL severity]
|
|
251
|
+
|
|
252
|
+
## High-Priority Findings
|
|
253
|
+
|
|
254
|
+
[Grouped findings at HIGH severity]
|
|
255
|
+
|
|
256
|
+
## Medium & Low Findings
|
|
257
|
+
|
|
258
|
+
[Grouped findings at MEDIUM and LOW severity]
|
|
259
|
+
|
|
260
|
+
## Per-File Summary
|
|
261
|
+
|
|
262
|
+
| File | Issues | Top Severity |
|
|
263
|
+
|------|--------|-------------|
|
|
264
|
+
| src/api/auth.ts | 3 | CRITICAL |
|
|
265
|
+
| src/utils/parse.ts | 1 | MEDIUM |
|
|
266
|
+
|
|
267
|
+
## Recommendations
|
|
268
|
+
|
|
269
|
+
1. [Top priority action item]
|
|
270
|
+
2. [Second priority action item]
|
|
271
|
+
...
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Write JSON Report
|
|
275
|
+
|
|
276
|
+
```bash
|
|
277
|
+
# If reviewing an increment
|
|
278
|
+
REPORT_PATH="[INCREMENT_PATH]/reports/code-review-$(date +%Y-%m-%d).json"
|
|
279
|
+
|
|
280
|
+
# Otherwise
|
|
281
|
+
REPORT_PATH=".specweave/reports/code-review-$(date +%Y-%m-%d).json"
|
|
282
|
+
|
|
283
|
+
mkdir -p "$(dirname "$REPORT_PATH")"
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
Write structured JSON with all findings, metadata, and reviewer statuses.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## 5. Cross-Repo Mode
|
|
291
|
+
|
|
292
|
+
When `--cross-repo` is specified or umbrella mode is detected:
|
|
293
|
+
|
|
294
|
+
### Detect Changed Repos
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# Find repos with changes in umbrella
|
|
298
|
+
for repo_dir in repositories/*/*; do
|
|
299
|
+
if [ -d "$repo_dir/.git" ]; then
|
|
300
|
+
changes=$(cd "$repo_dir" && git diff --stat HEAD 2>/dev/null)
|
|
301
|
+
if [ -n "$changes" ]; then
|
|
302
|
+
CHANGED_REPOS+=("$repo_dir")
|
|
303
|
+
fi
|
|
304
|
+
fi
|
|
305
|
+
done
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Per-Repo Review
|
|
309
|
+
|
|
310
|
+
For each changed repo:
|
|
311
|
+
1. Determine files changed in that repo
|
|
312
|
+
2. Route reviewers based on those files
|
|
313
|
+
3. Spawn reviewer agents scoped to that repo
|
|
314
|
+
4. Prefix all findings with repo path
|
|
315
|
+
|
|
316
|
+
### Cross-Repo Integration Check
|
|
317
|
+
|
|
318
|
+
After per-repo reviews complete, check for cross-repo issues:
|
|
319
|
+
- Shared type definitions changed but consumers not updated
|
|
320
|
+
- API contract changes without corresponding client updates
|
|
321
|
+
- Version/dependency mismatches between repos
|
|
322
|
+
- Shared configuration drift
|
|
323
|
+
|
|
324
|
+
### Merged Report
|
|
325
|
+
|
|
326
|
+
Produce a single report with sections per repo:
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
# Cross-Repo Code Review Report
|
|
330
|
+
|
|
331
|
+
## Repository: repositories/org/api-service
|
|
332
|
+
[findings for api-service]
|
|
333
|
+
|
|
334
|
+
## Repository: repositories/org/web-client
|
|
335
|
+
[findings for web-client]
|
|
336
|
+
|
|
337
|
+
## Cross-Repo Issues
|
|
338
|
+
[integration findings]
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
---
|
|
342
|
+
|
|
343
|
+
## 6. Cleanup and Output
|
|
344
|
+
|
|
345
|
+
### Shutdown Agents
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
// Shutdown each reviewer
|
|
349
|
+
SendMessage({ type: "shutdown_request", recipient: "reviewer-logic", content: "Review complete" });
|
|
350
|
+
SendMessage({ type: "shutdown_request", recipient: "reviewer-security", content: "Review complete" });
|
|
351
|
+
// ... for each spawned reviewer
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Destroy Team
|
|
355
|
+
|
|
356
|
+
```typescript
|
|
357
|
+
TeamDelete();
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Present Results
|
|
361
|
+
|
|
362
|
+
1. Display the unified report to the user
|
|
363
|
+
2. Highlight CRITICAL and HIGH findings prominently
|
|
364
|
+
3. If reviewing an increment: offer to create tasks for critical findings
|
|
365
|
+
4. Report location of JSON report file
|
|
366
|
+
|
|
367
|
+
### Offer Follow-Up
|
|
368
|
+
|
|
369
|
+
```
|
|
370
|
+
Review complete. [N] findings across [M] files.
|
|
371
|
+
- [X] critical, [Y] high findings need attention
|
|
372
|
+
|
|
373
|
+
Report saved to: [REPORT_PATH]
|
|
374
|
+
|
|
375
|
+
Next steps:
|
|
376
|
+
- Fix critical issues before merging
|
|
377
|
+
- /sw:do to implement fixes (if increment exists)
|
|
378
|
+
- /sw:code-reviewer --changes to re-review after fixes
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
---
|
|
382
|
+
|
|
383
|
+
## 7. Troubleshooting
|
|
384
|
+
|
|
385
|
+
| Issue | Cause | Fix |
|
|
386
|
+
|-------|-------|-----|
|
|
387
|
+
| Reviewer stuck | Agent not responding | Send STATUS_CHECK, then shutdown after 2 turns |
|
|
388
|
+
| No files to review | Empty diff or wrong scope | Check git status, verify scope argument |
|
|
389
|
+
| Ghost review-* team | Previous review didn't clean up | TeamDelete by name before starting |
|
|
390
|
+
| Spec compliance skipped | No increment path found | Pass --increment NNNN explicitly |
|
|
391
|
+
| Cross-repo misses a repo | Repo has no .git or no changes | Check repo has uncommitted work |
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
## Related Skills
|
|
396
|
+
|
|
397
|
+
| Skill | Relationship |
|
|
398
|
+
|-------|-------------|
|
|
399
|
+
| `/sw:grill` | Grill is increment-scoped, runs during closure. Code-reviewer is general-purpose, runs anytime. |
|
|
400
|
+
| `/sw:team-lead --mode review` | Team-lead delegates review mode to this skill |
|
|
401
|
+
| `/sw:validate` | Rule-based validation (130+ checks). Code-reviewer is AI-powered analysis. |
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
You are the SILENT FAILURES REVIEWER agent.
|
|
2
|
+
|
|
3
|
+
REVIEW TARGET: [REVIEW_TARGET]
|
|
4
|
+
|
|
5
|
+
MISSION:
|
|
6
|
+
Find code that fails silently — errors that are swallowed, ignored, or hidden behind
|
|
7
|
+
fallback values without logging or notification. Silent failures are among the hardest
|
|
8
|
+
bugs to diagnose because nothing appears broken until data is corrupted or users report
|
|
9
|
+
mysterious behavior. You are a read-only analyst — your job is to FIND issues, not fix them.
|
|
10
|
+
|
|
11
|
+
SCOPE:
|
|
12
|
+
- If reviewing a PR: run `gh pr diff [PR_NUMBER]` to get the diff, then analyze changed files
|
|
13
|
+
- If reviewing a module: read all files in the target path
|
|
14
|
+
- Focus on error handling paths — follow every catch, callback, and conditional
|
|
15
|
+
|
|
16
|
+
CHECKLIST:
|
|
17
|
+
1. Empty catch blocks (catch(e) {} or catch(e) { /* ignore */ })
|
|
18
|
+
2. Catch blocks that log but don't re-throw or return an error state
|
|
19
|
+
3. Error callbacks with unused error parameter (fs.readFile(path, (err, data) => { ... }))
|
|
20
|
+
4. Promise chains without .catch() or missing error boundary
|
|
21
|
+
5. try/catch returning default/fallback values without logging the original error
|
|
22
|
+
6. Event emitter 'error' events not handled (crashes process silently in Node.js)
|
|
23
|
+
7. HTTP handlers that always return 200 regardless of internal failures
|
|
24
|
+
8. Conditional logic with missing else/default that silently falls through
|
|
25
|
+
9. Async functions that don't propagate errors to callers
|
|
26
|
+
10. Optional chaining (?.) used to silence errors instead of handling null states
|
|
27
|
+
|
|
28
|
+
OUTPUT FORMAT:
|
|
29
|
+
Produce a structured findings report using this format for each finding:
|
|
30
|
+
|
|
31
|
+
### [SEVERITY]: [Title]
|
|
32
|
+
- **File**: path/to/file.ts:line
|
|
33
|
+
- **Category**: Silent failure type (e.g., Empty catch, Swallowed error, Missing .catch())
|
|
34
|
+
- **Description**: What fails silently and how
|
|
35
|
+
- **Hidden errors**: What error types are being swallowed (e.g., network errors, validation errors)
|
|
36
|
+
- **User impact**: What the user experiences (wrong data, missing features, no feedback)
|
|
37
|
+
- **Recommendation**: How to properly handle the error
|
|
38
|
+
- **Code snippet**: The problematic code (keep brief)
|
|
39
|
+
|
|
40
|
+
Severity levels: CRITICAL | HIGH | MEDIUM | LOW | INFO
|
|
41
|
+
|
|
42
|
+
COMMUNICATION:
|
|
43
|
+
When done, signal completion:
|
|
44
|
+
SendMessage({
|
|
45
|
+
type: "message",
|
|
46
|
+
recipient: "team-lead",
|
|
47
|
+
content: "REVIEW_COMPLETE: Silent failures review finished. Found [N] issues: [X critical, Y high, Z medium]. Key findings: [brief summary of top 3].",
|
|
48
|
+
summary: "Silent failures review complete"
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
If you need clarification about error handling conventions:
|
|
52
|
+
SendMessage({
|
|
53
|
+
type: "message",
|
|
54
|
+
recipient: "team-lead",
|
|
55
|
+
content: "REVIEW_QUESTION: [your question]",
|
|
56
|
+
summary: "Silent failures reviewer needs clarification"
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
RULES:
|
|
60
|
+
- READ-ONLY: Do not modify any files
|
|
61
|
+
- Be specific: include file paths and line numbers for every finding
|
|
62
|
+
- Prioritize: CRITICAL and HIGH findings first
|
|
63
|
+
- No speculation: only report issues where you can trace the silent failure path
|
|
64
|
+
- Consider project conventions: check for custom error handlers, logging utilities
|
|
65
|
+
- Distinguish intentional vs accidental: some silent handling is by design (e.g., optional features)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
You are the SPEC COMPLIANCE REVIEWER agent.
|
|
2
|
+
|
|
3
|
+
REVIEW TARGET: [REVIEW_TARGET]
|
|
4
|
+
INCREMENT PATH: [INCREMENT_PATH]
|
|
5
|
+
|
|
6
|
+
MISSION:
|
|
7
|
+
Verify that the implementation matches the specification. Cross-reference each acceptance
|
|
8
|
+
criterion in spec.md against the actual codebase to find gaps, misinterpretations, and
|
|
9
|
+
scope creep. You are a read-only analyst — your job is to FIND compliance gaps, not fix them.
|
|
10
|
+
|
|
11
|
+
SCOPE:
|
|
12
|
+
- Read spec.md from [INCREMENT_PATH]/spec.md to extract all acceptance criteria
|
|
13
|
+
- If no INCREMENT_PATH provided, search for active increments in .specweave/increments/
|
|
14
|
+
- Analyze the codebase for implementation evidence of each AC
|
|
15
|
+
- Check test coverage for each AC
|
|
16
|
+
|
|
17
|
+
CHECKLIST:
|
|
18
|
+
1. Extract all AC-US*-* acceptance criteria from spec.md
|
|
19
|
+
2. For each AC, search the codebase for implementation evidence:
|
|
20
|
+
- Code that fulfills the criterion (function, endpoint, component)
|
|
21
|
+
- Test that validates the criterion (unit, integration, E2E)
|
|
22
|
+
3. Verify edge cases mentioned in ACs are handled in code
|
|
23
|
+
4. Check error scenarios from ACs have proper handling
|
|
24
|
+
5. Validate data format requirements from ACs (types, schemas, constraints)
|
|
25
|
+
6. Detect scope creep: features implemented but NOT specified in any AC
|
|
26
|
+
7. Detect misinterpretations: code does something similar but not exactly what AC requires
|
|
27
|
+
8. Check tasks.md completion status matches actual code state
|
|
28
|
+
|
|
29
|
+
OUTPUT FORMAT:
|
|
30
|
+
Produce two sections:
|
|
31
|
+
|
|
32
|
+
## AC Compliance Table
|
|
33
|
+
| AC ID | Expected Behavior | Implementation Status | Evidence | Test Coverage |
|
|
34
|
+
|-------|---------------------|----------------------|----------|---------------|
|
|
35
|
+
| AC-US1-01 | User can log in | PASS | src/api/auth.ts:42 | auth.test.ts:15 |
|
|
36
|
+
| AC-US1-02 | Invalid creds show error | FAIL - missing | N/A | N/A |
|
|
37
|
+
|
|
38
|
+
## Scope Creep Findings
|
|
39
|
+
For each unrequested feature found:
|
|
40
|
+
|
|
41
|
+
### [SEVERITY]: [Title]
|
|
42
|
+
- **File**: path/to/file.ts:line
|
|
43
|
+
- **Category**: Scope creep / Unrequested feature
|
|
44
|
+
- **Description**: What was implemented that no AC requested
|
|
45
|
+
- **Risk**: Why this is problematic (maintenance burden, untested surface, spec divergence)
|
|
46
|
+
- **Recommendation**: Remove, or create a new AC to cover it
|
|
47
|
+
|
|
48
|
+
## Misinterpretation Findings
|
|
49
|
+
For each AC where implementation differs from spec intent:
|
|
50
|
+
|
|
51
|
+
### [SEVERITY]: [Title]
|
|
52
|
+
- **AC**: AC-USNN-NN
|
|
53
|
+
- **Expected**: What the AC specifies
|
|
54
|
+
- **Actual**: What the code does
|
|
55
|
+
- **Gap**: How they differ
|
|
56
|
+
- **Recommendation**: What needs to change
|
|
57
|
+
|
|
58
|
+
Severity levels: CRITICAL | HIGH | MEDIUM | LOW | INFO
|
|
59
|
+
|
|
60
|
+
COMMUNICATION:
|
|
61
|
+
When done, signal completion:
|
|
62
|
+
SendMessage({
|
|
63
|
+
type: "message",
|
|
64
|
+
recipient: "team-lead",
|
|
65
|
+
content: "REVIEW_COMPLETE: Spec compliance review finished. ACs: [X/Y passed]. Scope creep: [N items]. Misinterpretations: [N items]. Key gaps: [brief summary].",
|
|
66
|
+
summary: "Spec compliance review complete"
|
|
67
|
+
})
|
|
68
|
+
|
|
69
|
+
If spec.md is missing or empty:
|
|
70
|
+
SendMessage({
|
|
71
|
+
type: "message",
|
|
72
|
+
recipient: "team-lead",
|
|
73
|
+
content: "REVIEW_QUESTION: No spec.md found at [INCREMENT_PATH]. Cannot perform spec compliance review without a specification. Provide increment path or skip this reviewer.",
|
|
74
|
+
summary: "Spec compliance reviewer: no spec found"
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
RULES:
|
|
78
|
+
- READ-ONLY: Do not modify any files
|
|
79
|
+
- Be specific: include file paths and line numbers for every finding
|
|
80
|
+
- Every AC must have a verdict (PASS, FAIL, PARTIAL, NOT FOUND)
|
|
81
|
+
- Do not rubber-stamp: verify actual implementation, not just task completion checkboxes
|
|
82
|
+
- Consider intent: understand what the AC means, not just literal text matching
|
|
83
|
+
- Flag both missing features AND extra features (scope creep)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
You are the TYPE DESIGN REVIEWER agent.
|
|
2
|
+
|
|
3
|
+
REVIEW TARGET: [REVIEW_TARGET]
|
|
4
|
+
|
|
5
|
+
MISSION:
|
|
6
|
+
Analyze type system quality — find overly broad types, unsafe assertions, missing
|
|
7
|
+
invariants, and type designs that don't leverage the compiler to prevent bugs.
|
|
8
|
+
Good types make illegal states unrepresentable. Your job is to find where the type
|
|
9
|
+
system could work harder. You are a read-only analyst — FIND issues, not fix them.
|
|
10
|
+
|
|
11
|
+
SCOPE:
|
|
12
|
+
- If reviewing a PR: run `gh pr diff [PR_NUMBER]` to get the diff, then analyze changed files
|
|
13
|
+
- If reviewing a module: read all files in the target path
|
|
14
|
+
- Focus on TypeScript/JavaScript files (.ts, .tsx, .js, .jsx)
|
|
15
|
+
- Skip type-checking config files, test fixtures, and generated code
|
|
16
|
+
|
|
17
|
+
CHECKLIST:
|
|
18
|
+
1. Explicit `any` type usage — should almost always be `unknown` or a proper type
|
|
19
|
+
2. Type assertions (`as Type`, `!` non-null) that bypass the type system unsafely
|
|
20
|
+
3. Overly broad types (string where a union literal is appropriate, e.g., status: string vs status: "active" | "inactive")
|
|
21
|
+
4. Missing discriminated unions for state machines or multi-state objects
|
|
22
|
+
5. Interface vs type alias misuse (interfaces for objects, types for unions/intersections)
|
|
23
|
+
6. Generic types that could be more constrained (T vs T extends SomeBase)
|
|
24
|
+
7. Missing readonly modifiers on data that should be immutable
|
|
25
|
+
8. Index signatures ([key: string]: any) when specific keys are known
|
|
26
|
+
9. Function return types that are too wide (returns string | number | undefined when narrowable)
|
|
27
|
+
10. Missing or incorrect type predicates and type guards
|
|
28
|
+
11. Zod/io-ts/valibot schemas that diverge from their TypeScript type counterparts
|
|
29
|
+
12. Enums used where const objects or union types would be safer and more tree-shakeable
|
|
30
|
+
|
|
31
|
+
OUTPUT FORMAT:
|
|
32
|
+
Produce a structured findings report using this format for each finding:
|
|
33
|
+
|
|
34
|
+
### [SEVERITY]: [Title]
|
|
35
|
+
- **File**: path/to/file.ts:line
|
|
36
|
+
- **Category**: Type issue (e.g., Unsafe assertion, Overly broad type, Missing discriminant)
|
|
37
|
+
- **Description**: What the type issue is and what it allows that shouldn't be possible
|
|
38
|
+
- **Impact**: What bugs this enables (runtime type errors, invalid state, refactoring hazard)
|
|
39
|
+
- **Recommendation**: The better type design with code example
|
|
40
|
+
- **Code snippet**: The current type (keep brief)
|
|
41
|
+
|
|
42
|
+
Severity levels: CRITICAL | HIGH | MEDIUM | LOW | INFO
|
|
43
|
+
|
|
44
|
+
COMMUNICATION:
|
|
45
|
+
When done, signal completion:
|
|
46
|
+
SendMessage({
|
|
47
|
+
type: "message",
|
|
48
|
+
recipient: "team-lead",
|
|
49
|
+
content: "REVIEW_COMPLETE: Type design review finished. Found [N] issues: [X critical, Y high, Z medium]. Key findings: [brief summary of top 3].",
|
|
50
|
+
summary: "Type design review complete"
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
If you need clarification about type conventions:
|
|
54
|
+
SendMessage({
|
|
55
|
+
type: "message",
|
|
56
|
+
recipient: "team-lead",
|
|
57
|
+
content: "REVIEW_QUESTION: [your question]",
|
|
58
|
+
summary: "Type reviewer needs clarification"
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
RULES:
|
|
62
|
+
- READ-ONLY: Do not modify any files
|
|
63
|
+
- Be specific: include file paths and line numbers for every finding
|
|
64
|
+
- Prioritize: CRITICAL and HIGH findings first
|
|
65
|
+
- No speculation: only report issues with concrete reasoning about what goes wrong
|
|
66
|
+
- Consider project style: if the project consistently uses a pattern, note it but don't fight it
|
|
67
|
+
- Skip generated code: don't flag types in auto-generated files (prisma client, graphql codegen)
|
|
68
|
+
- TypeScript/JavaScript only: skip non-TS files entirely
|
|
@@ -52,13 +52,18 @@ Wait for the user to select a pattern by name or number. The user responds in na
|
|
|
52
52
|
|
|
53
53
|
### Step 4: Check Skill-Creator Plugin
|
|
54
54
|
|
|
55
|
-
Verify Anthropic's official skill-creator is available:
|
|
55
|
+
Verify Anthropic's official skill-creator is available (local-first, then global fallback):
|
|
56
56
|
|
|
57
57
|
```bash
|
|
58
|
-
|
|
58
|
+
# Check local project copy first (auto-installed by specweave init)
|
|
59
|
+
SKILL_CREATOR_PATH=".claude/skills/skill-creator/SKILL.md"
|
|
60
|
+
if [ ! -f "$SKILL_CREATOR_PATH" ]; then
|
|
61
|
+
# Fall back to global plugin cache
|
|
62
|
+
SKILL_CREATOR_PATH=$(find ~/.claude/plugins/cache/claude-plugins-official/skill-creator -name "SKILL.md" -maxdepth 3 2>/dev/null | head -1)
|
|
63
|
+
fi
|
|
59
64
|
if [ -z "$SKILL_CREATOR_PATH" ]; then
|
|
60
65
|
echo "ERROR: Anthropic's skill-creator plugin is not installed."
|
|
61
|
-
echo "Install it via: claude
|
|
66
|
+
echo "Install it via: claude install-skill https://github.com/anthropics/claude-code/tree/main/skill-creator"
|
|
62
67
|
echo ""
|
|
63
68
|
echo "The skill-creator is required to build tested, benchmarked skills."
|
|
64
69
|
exit 1
|
|
@@ -67,6 +72,18 @@ fi
|
|
|
67
72
|
|
|
68
73
|
### Step 5: Delegate to Skill-Creator
|
|
69
74
|
|
|
75
|
+
**Slug dedup guard** — before delegating, check if a skill with this slug already exists:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
SKILL_SLUG="$SELECTED_PATTERN_SLUG" # e.g. "error-handling"
|
|
79
|
+
SKILL_DIR=".claude/skills/$SKILL_SLUG"
|
|
80
|
+
if [ -d "$SKILL_DIR" ] && [ -f "$SKILL_DIR/SKILL.md" ]; then
|
|
81
|
+
echo "Skill '$SKILL_SLUG' already exists at $SKILL_DIR/SKILL.md -- skipping generation."
|
|
82
|
+
# Mark signal as generated in skill-signals.json and continue to next pattern
|
|
83
|
+
exit 0
|
|
84
|
+
fi
|
|
85
|
+
```
|
|
86
|
+
|
|
70
87
|
Invoke the skill-creator with the selected pattern context:
|
|
71
88
|
|
|
72
89
|
1. **Provide context** to skill-creator:
|