@nano-step/skill-manager 5.6.2 → 5.7.0
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/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/package.json +1 -1
- package/private-catalog.json +2 -2
- package/skills/pr-code-reviewer/CHANGELOG.md +61 -19
- package/skills/pr-code-reviewer/SKILL.md +125 -118
- package/skills/pr-code-reviewer/assets/config.json +14 -1
- package/skills/pr-code-reviewer/checklists/review-checklist.md +37 -4
- package/skills/pr-code-reviewer/references/checkpoint-system.md +58 -0
- package/skills/pr-code-reviewer/references/confidence-scoring.md +98 -0
- package/skills/pr-code-reviewer/references/framework-rules/nextjs.md +58 -0
- package/skills/pr-code-reviewer/references/framework-rules/prisma.md +54 -0
- package/skills/pr-code-reviewer/references/framework-rules/react.md +61 -0
- package/skills/pr-code-reviewer/references/nano-brain-integration.md +14 -29
- package/skills/pr-code-reviewer/references/report-template.md +5 -0
- package/skills/pr-code-reviewer/references/setup-wizard.md +207 -0
- package/skills/pr-code-reviewer/references/subagent-prompts.md +38 -17
- package/skills/pr-code-reviewer/references/verification-protocol.md +56 -0
- package/skills/pr-code-reviewer/skill.json +2 -2
|
@@ -4,6 +4,8 @@ Launch ALL 4 subagents simultaneously with `run_in_background: true`.
|
|
|
4
4
|
|
|
5
5
|
**IMPORTANT**: Include the PR Summary in each subagent's context so they understand the overall change.
|
|
6
6
|
|
|
7
|
+
**IMPORTANT**: Include `$FRAMEWORK_RULES` (resolved in Phase -2 from `.opencode/code-reviewer.json` stack config) in each subagent prompt. This contains ONLY the framework rules relevant to this project's stack — not all framework rules.
|
|
8
|
+
|
|
7
9
|
**IMPORTANT**: If project memory results were gathered in Phase 1, include them as a `## NANO-BRAIN MEMORY` section in each subagent's prompt.
|
|
8
10
|
|
|
9
11
|
**IMPORTANT**: Include `$REVIEW_DIR` (the temp clone path from Phase 0) in each subagent's prompt. All file reads, grep searches, and LSP operations MUST target this path — NOT the original workspace repo. This ensures subagents see the actual PR branch code.
|
|
@@ -50,9 +52,10 @@ What looks wrong? State the specific concern.
|
|
|
50
52
|
### Step 2: TRACE
|
|
51
53
|
Read the surrounding context beyond the changed file. For each concern type:
|
|
52
54
|
- **Error handling**: Trace the throw/error path UP to the HTTP boundary (controller/route handler). Check for try-catch at EVERY layer between the throw and the controller.
|
|
53
|
-
- **Null safety**: Trace the data DOWN to its source (SQL query, API contract, constructor). Check if the source guarantees non-null (e.g., DB primary key, NOT NULL column, JOIN constraint).
|
|
55
|
+
- **Null safety**: Trace the data DOWN to its source (SQL query, API contract, constructor). Check if the source guarantees non-null (e.g., DB primary key, NOT NULL column, JOIN constraint). Verify basic language semantics (e.g., `Array.isArray(null)` returns `false` — no TypeError; `Boolean(undefined)` returns `false`).
|
|
54
56
|
- **Framework patterns**: Check if the specific usage context makes the pattern safe (e.g., Pinia singleton backing a composable, client-only component, intentionally non-reactive value).
|
|
55
57
|
- **Logic errors**: Construct a CONCRETE triggering scenario with specific input values that would cause the bug.
|
|
58
|
+
- **Redundant/unnecessary code**: Find ALL callers of the function before judging its internals. A function called from multiple paths with different inputs may need logic that looks redundant from one caller's perspective but is necessary for another.
|
|
56
59
|
|
|
57
60
|
### Step 3: VERIFY
|
|
58
61
|
Can you PROVE this is a real problem? You need ONE of:
|
|
@@ -103,20 +106,26 @@ delegate_task({
|
|
|
103
106
|
## TRACED DEPENDENCIES
|
|
104
107
|
${tracedDependencies}
|
|
105
108
|
|
|
109
|
+
## AGENTS.MD CONTEXT (workspace domain map + repo relationships)
|
|
110
|
+
${agentsContext || "No AGENTS.md found in workspace root"}
|
|
111
|
+
|
|
106
112
|
## NANO-BRAIN MEMORY (past sessions, reviews, decisions)
|
|
107
113
|
${projectMemory || "No nano-brain memory available for this workspace"}
|
|
108
|
-
|
|
114
|
+
|
|
109
115
|
## LINEAR TICKET CONTEXT (from linked Linear ticket)
|
|
110
116
|
${linearTicketContext || "No Linear ticket linked to this PR"}
|
|
111
|
-
|
|
117
|
+
|
|
112
118
|
## CROSS-REPO TRACING (from Phase 2 — backend data flow analysis)
|
|
113
119
|
${crossRepoTracing || "No cross-repo tracing performed"}
|
|
114
|
-
|
|
120
|
+
|
|
115
121
|
## PREMISE CHECK (for DELETION changes — why the code existed)
|
|
116
122
|
${premiseCheck || "Not a DELETION change — no premise check needed"}
|
|
117
|
-
|
|
123
|
+
|
|
124
|
+
## FRAMEWORK RULES (project-specific — from stack config)
|
|
125
|
+
${frameworkRules || "No framework rules configured — run /review --setup to configure"}
|
|
126
|
+
|
|
118
127
|
${FILTERING_RULES}
|
|
119
|
-
|
|
128
|
+
|
|
120
129
|
## TASK
|
|
121
130
|
Analyze code quality, patterns, and improvement opportunities
|
|
122
131
|
|
|
@@ -173,9 +182,12 @@ delegate_task({
|
|
|
173
182
|
|
|
174
183
|
## PREMISE CHECK (for DELETION changes — why the code existed)
|
|
175
184
|
${premiseCheck || "Not a DELETION change — no premise check needed"}
|
|
176
|
-
|
|
185
|
+
|
|
186
|
+
## FRAMEWORK RULES (project-specific — from stack config)
|
|
187
|
+
${frameworkRules || "No framework rules configured — run /review --setup to configure"}
|
|
188
|
+
|
|
177
189
|
${FILTERING_RULES}
|
|
178
|
-
|
|
190
|
+
|
|
179
191
|
## TASK
|
|
180
192
|
Deep security, logic analysis, and logic improvement opportunities
|
|
181
193
|
|
|
@@ -219,13 +231,16 @@ delegate_task({
|
|
|
219
231
|
All file reads and searches MUST use this path (temp clone of PR branch):
|
|
220
232
|
${REVIEW_DIR}
|
|
221
233
|
Do NOT read from the original workspace repo — it may be on a different branch.
|
|
222
|
-
|
|
234
|
+
|
|
223
235
|
## PR SUMMARY
|
|
224
236
|
${prSummary}
|
|
225
|
-
|
|
237
|
+
|
|
226
238
|
## CHANGED FILES
|
|
227
239
|
${changedFilesWithDiff}
|
|
228
|
-
|
|
240
|
+
|
|
241
|
+
## TRACED DEPENDENCIES
|
|
242
|
+
${tracedDependencies}
|
|
243
|
+
|
|
229
244
|
## NANO-BRAIN MEMORY (past sessions, reviews, decisions)
|
|
230
245
|
${projectMemory || "No nano-brain memory available for this workspace"}
|
|
231
246
|
|
|
@@ -237,14 +252,17 @@ delegate_task({
|
|
|
237
252
|
|
|
238
253
|
## PREMISE CHECK (for DELETION changes — why the code existed)
|
|
239
254
|
${premiseCheck || "Not a DELETION change — no premise check needed"}
|
|
240
|
-
|
|
255
|
+
|
|
256
|
+
## FRAMEWORK RULES (project-specific — from stack config)
|
|
257
|
+
${frameworkRules || "No framework rules configured — run /review --setup to configure"}
|
|
258
|
+
|
|
241
259
|
${FILTERING_RULES}
|
|
242
|
-
|
|
260
|
+
|
|
243
261
|
## TASK
|
|
244
262
|
Best practices review and idiomatic improvement opportunities
|
|
245
|
-
|
|
263
|
+
|
|
246
264
|
## CHECK
|
|
247
|
-
1. Framework anti-patterns (
|
|
265
|
+
1. Framework anti-patterns (check ## FRAMEWORK RULES above for project-specific patterns)
|
|
248
266
|
2. Library misuse — using APIs incorrectly or suboptimally
|
|
249
267
|
3. **Idiomatic improvements** — more idiomatic usage of language/framework features
|
|
250
268
|
4. Missing docs ONLY on public APIs or complex algorithms
|
|
@@ -295,9 +313,12 @@ delegate_task({
|
|
|
295
313
|
|
|
296
314
|
## PREMISE CHECK (for DELETION changes — why the code existed)
|
|
297
315
|
${premiseCheck || "Not a DELETION change — no premise check needed"}
|
|
298
|
-
|
|
316
|
+
|
|
317
|
+
## FRAMEWORK RULES (project-specific — from stack config)
|
|
318
|
+
${frameworkRules || "No framework rules configured — run /review --setup to configure"}
|
|
319
|
+
|
|
299
320
|
${FILTERING_RULES}
|
|
300
|
-
|
|
321
|
+
|
|
301
322
|
## TASK
|
|
302
323
|
Test coverage, integration analysis, and performance improvement opportunities
|
|
303
324
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Verification Protocol (Phase 4.5)
|
|
2
|
+
|
|
3
|
+
The orchestrator verifies each finding with severity `critical` or `warning` by reading the actual code at the cited evidence locations in `$REVIEW_DIR`. This catches false positives that survived subagent self-verification.
|
|
4
|
+
|
|
5
|
+
## Verification Steps
|
|
6
|
+
|
|
7
|
+
For each critical/warning finding:
|
|
8
|
+
|
|
9
|
+
1. **Parse the evidence field** — extract file:line references cited by the subagent
|
|
10
|
+
2. **Read the cited files** from `$REVIEW_DIR` at the referenced line numbers
|
|
11
|
+
3. **Verify the claim** based on finding category (see rules below)
|
|
12
|
+
4. **Mark verification status**:
|
|
13
|
+
- `verified: true` — evidence checks out, issue is real → **KEEP** in report
|
|
14
|
+
- `verified: false` — evidence is wrong (e.g., try-catch DOES exist) → **DROP** from report
|
|
15
|
+
- `verified: "unverifiable"` — can't confirm within timeout → **DOWNGRADE** to `suggestion`
|
|
16
|
+
|
|
17
|
+
## Category-Specific Verification Rules
|
|
18
|
+
|
|
19
|
+
| Category | Verification Method | FALSE if... |
|
|
20
|
+
|----------|---------------------|-------------|
|
|
21
|
+
| **Error handling claims** | Read the controller/route handler that calls this code path | A try-catch exists at the HTTP boundary |
|
|
22
|
+
| **Null safety claims** | Read the data source (SQL query, API contract) | The source guarantees non-null (PK, NOT NULL, JOIN constraint). Also verify basic language semantics first (e.g., `Array.isArray(null)` → `false`, `Boolean(undefined)` → `false`) |
|
|
23
|
+
| **Logic error claims** | Trace the cited execution path | No realistic input triggers the bug |
|
|
24
|
+
| **Framework pattern claims** | Check if the specific usage context makes the pattern safe | The usage context makes the pattern safe |
|
|
25
|
+
| **Redundant/unnecessary code claims** | Find ALL callers of the function (grep/LSP) | The function is called from multiple paths with different inputs — the "redundant" code may be necessary for another path (FALSE or DOWNGRADE to improvement) |
|
|
26
|
+
|
|
27
|
+
## Timeout Policy
|
|
28
|
+
|
|
29
|
+
30 seconds per finding. If verification takes longer, mark as `unverifiable` and move on.
|
|
30
|
+
|
|
31
|
+
## Checkpoint Schema
|
|
32
|
+
|
|
33
|
+
Save results to `.checkpoints/phase-4.5-verification.json`:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"findings_checked": 5,
|
|
38
|
+
"verified_true": 3,
|
|
39
|
+
"verified_false": 1,
|
|
40
|
+
"unverifiable": 1,
|
|
41
|
+
"dropped_findings": [
|
|
42
|
+
{
|
|
43
|
+
"original": { "file": "...", "line": 42, "message": "..." },
|
|
44
|
+
"reason": "try-catch exists at controller.js:28"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"downgraded_findings": [
|
|
48
|
+
{
|
|
49
|
+
"original": { "file": "...", "line": 99, "message": "..." },
|
|
50
|
+
"new_severity": "suggestion"
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Update `manifest.json` (`completed_phase: 4.5`, `next_phase: 4.6`).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pr-code-reviewer",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "3.3.0",
|
|
4
|
+
"description": "Review pull requests and staged changes for bugs, security issues, and code quality. Use this skill whenever the user mentions: review PR, code review, check this PR, review my changes, /review, PR #123, look at this diff, is this safe to merge, or provides a GitHub PR URL. Also triggers on: 'what do you think of these changes', 'review --staged', 'check my code before merge'.",
|
|
5
5
|
"compatibility": "OpenCode with nano-brain",
|
|
6
6
|
"agent": null,
|
|
7
7
|
"commands": [],
|