@juicesharp/rpiv-pi 0.9.0 → 0.10.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/package.json +4 -1
- package/skills/code-review/SKILL.md +65 -11
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-pi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Skill-based development workflow for Pi Agent — discover, research, design, plan, implement, validate",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
+
"scripts": {
|
|
28
|
+
"test": "vitest run"
|
|
29
|
+
},
|
|
27
30
|
"files": [
|
|
28
31
|
"extensions/",
|
|
29
32
|
"skills/",
|
|
@@ -16,10 +16,11 @@ You are tasked with reviewing changes across three parallel lenses — **Quality
|
|
|
16
16
|
- Resolve scope and assemble the diff (Step 1)
|
|
17
17
|
- Phase-1 Discovery Map (Step 2 — one agent + orchestrator-side git work)
|
|
18
18
|
- Phase-2 three-lens review + precedents + conditional CVE lookup (Step 3 — parallel agents)
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
19
|
+
- Cross-Finding Interaction Sweep (Step 4 — one synthesis agent over Phase-2 evidence, gated)
|
|
20
|
+
- Reconcile findings via advisor (if present) or inline dimension-sweep (Step 5)
|
|
21
|
+
- Grounded-questions developer checkpoint (Step 6)
|
|
22
|
+
- Write the review artifact (Step 7)
|
|
23
|
+
- Present and handle follow-ups (Steps 8–9)
|
|
23
24
|
|
|
24
25
|
## Step 1: Resolve Scope and Assemble the Diff
|
|
25
26
|
|
|
@@ -177,9 +178,46 @@ Spawn these agents in parallel using the Agent tool. Each receives the `## Disco
|
|
|
177
178
|
|
|
178
179
|
**Wait for ALL agents to complete** before proceeding.
|
|
179
180
|
|
|
180
|
-
## Step 4:
|
|
181
|
+
## Step 4: Cross-Finding Interaction Sweep
|
|
181
182
|
|
|
182
|
-
|
|
183
|
+
**Gate**: SKIP this step (go directly to Step 5) when EITHER `len(ChangedFiles) < 2` OR the Quality lens returned fewer than 4 total observations across all hunks. Emergent interactions need surface area; tiny diffs cannot structurally produce them.
|
|
184
|
+
|
|
185
|
+
Otherwise, spawn ONE additional agent after all Phase-2 agents complete:
|
|
186
|
+
|
|
187
|
+
**Interaction sweep:**
|
|
188
|
+
- subagent_type: `codebase-analyzer`
|
|
189
|
+
- Prompt:
|
|
190
|
+
```
|
|
191
|
+
Known Context:
|
|
192
|
+
[paste Discovery Map verbatim]
|
|
193
|
+
|
|
194
|
+
Quality Evidence:
|
|
195
|
+
[paste Quality lens output verbatim]
|
|
196
|
+
|
|
197
|
+
Security Evidence:
|
|
198
|
+
[paste Security lens output verbatim]
|
|
199
|
+
|
|
200
|
+
Precedents:
|
|
201
|
+
[paste precedents output verbatim]
|
|
202
|
+
|
|
203
|
+
Task: Perform a cross-finding interaction sweep. Group the evidence by shared entity, state machine, workflow, data flow path, API boundary, background process, or producer-consumer contract.
|
|
204
|
+
|
|
205
|
+
For each group, check whether multiple local observations combine into an emergent defect, including:
|
|
206
|
+
1. contradictory assumptions between components or layers,
|
|
207
|
+
2. unreachable, stuck, or non-terminal states,
|
|
208
|
+
3. retry/reprocess mechanisms made inert by another behavior,
|
|
209
|
+
4. duplicate-processing or idempotency gaps created by ordering or missing guards,
|
|
210
|
+
5. guards in one layer invalidating transitions in another,
|
|
211
|
+
6. one finding masking, amplifying, or permanently triggering another.
|
|
212
|
+
|
|
213
|
+
Return only interaction findings backed by explicit evidence from at least two concrete file:line locations from different files or different components. No recommendations. Do not repeat single-location findings.
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
**Wait for the interaction-sweep agent to complete** before proceeding.
|
|
217
|
+
|
|
218
|
+
## Step 5: Reconcile Findings
|
|
219
|
+
|
|
220
|
+
1. **Compile evidence** from every lens and the interaction sweep (when it ran):
|
|
183
221
|
- Quality evidence → classify each `file:line` observation into severity:
|
|
184
222
|
- 🔴 Critical: traced flow contradiction (dropped error path, missing validation on a known sink, null-deref).
|
|
185
223
|
- 🟡 Important: blast-radius × complexity-delta (hot path + new allocation, visible ABI change without migration).
|
|
@@ -195,6 +233,9 @@ Spawn these agents in parallel using the Agent tool. Each receives the `## Disco
|
|
|
195
233
|
- 🟡 Moderate CVE, outdated major with a migration path, license incompatibility with the project license.
|
|
196
234
|
- 🔵 Minor/transitive drift.
|
|
197
235
|
- 💭 Architectural dep question.
|
|
236
|
+
- Interaction-sweep evidence → classify (🔴/🟡 only; no 💭 tier — the sweep must produce concrete emergent defects, not speculation):
|
|
237
|
+
- 🔴 Critical: concrete emergent failure across 2+ `file:line` facts from different files/components (stranded state, duplicate-processing path, inert retry, producer/consumer contradiction).
|
|
238
|
+
- 🟡 Important: concrete multi-component mismatch with bounded blast radius or an existing mitigation.
|
|
198
239
|
- Precedents → compile into a separate `## Precedents & Lessons` section orthogonal to per-lens findings. Composite lessons go at the bottom of that section.
|
|
199
240
|
|
|
200
241
|
2. **Probe advisor availability** — attempt a probe by checking whether `advisor` is in the active tool set (main-thread visibility). If yes, proceed to advisor path; otherwise take the inline path.
|
|
@@ -209,8 +250,10 @@ Spawn these agents in parallel using the Agent tool. Each receives the `## Disco
|
|
|
209
250
|
- Produce a short `## Reconciliation Notes` block inside the artifact capturing any severity moves and the rationale.
|
|
210
251
|
|
|
211
252
|
5. **Emit the reconciled severity map** — authoritative severity per finding, carrying the advisor's guidance when present. Keep the per-pass grouping (do NOT tag each finding with its originating lens in prose; the H2 it sits under is the tag).
|
|
253
|
+
- Interaction findings live in their own `### Cross-Finding Interactions` H3 under `## Issues Found`, not folded into per-lens H3s.
|
|
254
|
+
- When an interaction finding subsumes multiple local findings, keep the local findings if still actionable, but lead with the interaction finding and explain the relationship in `## Reconciliation Notes`.
|
|
212
255
|
|
|
213
|
-
## Step
|
|
256
|
+
## Step 6: Developer Checkpoint
|
|
214
257
|
|
|
215
258
|
Use the grounded-questions-one-at-a-time pattern. Every question must reference real findings with `file:line` evidence and pull a DECISION from the developer.
|
|
216
259
|
|
|
@@ -239,7 +282,7 @@ Wait for the developer's response. Then ask **one question at a time**, waiting
|
|
|
239
282
|
- Lead with the most load-bearing finding.
|
|
240
283
|
- Skip the checkpoint entirely if no disputes surfaced and the developer set `status: approved` in the scan response.
|
|
241
284
|
|
|
242
|
-
## Step
|
|
285
|
+
## Step 7: Write the Review Document
|
|
243
286
|
|
|
244
287
|
1. **Determine metadata**:
|
|
245
288
|
- Filename: `thoughts/shared/reviews/YYYY-MM-DD_HH-MM-SS_[scope-kebab].md`
|
|
@@ -280,6 +323,13 @@ last_updated_by: [User]
|
|
|
280
323
|
|
|
281
324
|
## Issues Found
|
|
282
325
|
|
|
326
|
+
### Cross-Finding Interactions
|
|
327
|
+
(Omit this H3 block entirely when the interaction sweep was skipped per the Step 4 gate, OR when the sweep returned no findings. Only 🔴/🟡 tiers — no 💭.)
|
|
328
|
+
#### 🔴 Critical
|
|
329
|
+
- `file:line` + `file:line` (≥ 2 distinct locations) — [emergent defect narrative: which local facts combine, and how the failure path is reached]
|
|
330
|
+
#### 🟡 Important
|
|
331
|
+
- `file:line` + `file:line` — [multi-component mismatch + blast radius or existing mitigation]
|
|
332
|
+
|
|
283
333
|
### Quality
|
|
284
334
|
#### 🔴 Critical
|
|
285
335
|
- `file:line` — [evidence + one-sentence fix pointer]
|
|
@@ -338,7 +388,7 @@ last_updated_by: [User]
|
|
|
338
388
|
[Clear verdict: Approved / Needs Changes / Requesting Changes. Cite the top 1–3 items that drove the verdict with `file:line`.]
|
|
339
389
|
```
|
|
340
390
|
|
|
341
|
-
## Step
|
|
391
|
+
## Step 8: Present and Chain
|
|
342
392
|
|
|
343
393
|
```
|
|
344
394
|
Review written to:
|
|
@@ -356,7 +406,7 @@ Top items:
|
|
|
356
406
|
Ask follow-ups, or run `/skill:revise` to address the findings.
|
|
357
407
|
```
|
|
358
408
|
|
|
359
|
-
## Step
|
|
409
|
+
## Step 9: Handle Follow-ups
|
|
360
410
|
|
|
361
411
|
- If the user asks for deeper analysis of a specific finding, spawn a targeted `codebase-analyzer` on that area (1 agent max) and append a `## Follow-up [timestamp]` section using the Edit tool.
|
|
362
412
|
- Update frontmatter: `last_updated`, `last_updated_by`, and `last_updated_note: "Appended follow-up on [area]"`.
|
|
@@ -372,7 +422,10 @@ Ask follow-ups, or run `/skill:revise` to address the findings.
|
|
|
372
422
|
- **Critical ordering**: Follow the numbered steps exactly.
|
|
373
423
|
- ALWAYS resolve scope and bail on empty diff (Step 1) before Phase-1.
|
|
374
424
|
- ALWAYS wait for Phase-1 completion before Phase-2 dispatch.
|
|
375
|
-
- ALWAYS wait for ALL Phase-2 agents to complete before
|
|
425
|
+
- ALWAYS wait for ALL Phase-2 agents to complete before the interaction sweep (Step 4).
|
|
426
|
+
- ALWAYS run the Cross-Finding Interaction Sweep (Step 4) after ALL Phase-2 agents complete and BEFORE severity classification in Step 5, UNLESS the Step 4 gate skipped it.
|
|
427
|
+
- NEVER emit an interaction finding unless it cites at least two concrete `file:line` facts from different files/components.
|
|
428
|
+
- ALWAYS wait for the interaction sweep (when it ran) to complete before reconciliation (Step 5).
|
|
376
429
|
- ALWAYS probe advisor availability before calling `advisor()` (strip-when-unconfigured at `packages/rpiv-advisor/advisor.ts:463-472`).
|
|
377
430
|
- ALWAYS emit the `## Pre-Adjudication Findings` block to the main branch BEFORE calling `advisor()` — the advisor reads `getBranch()` (main-thread-only at `packages/rpiv-advisor/advisor.ts:336`) and will not see evidence you did not flush.
|
|
378
431
|
- ALWAYS preserve the severity taxonomy emoji + naming (🔴 Critical / 🟡 Important / 🔵 Suggestions / 💭 Discussion) and the existing frontmatter keys verbatim — discovery agents `thoughts-locator` and `thoughts-analyzer` grep these.
|
|
@@ -387,6 +440,7 @@ Ask follow-ups, or run `/skill:revise` to address the findings.
|
|
|
387
440
|
- **Agent roles (for this skill)**:
|
|
388
441
|
- `integration-scanner` (Phase-1): inbound refs, outbound deps, auth-boundary crossings.
|
|
389
442
|
- `codebase-analyzer` × 3 (Phase-2): one per lens — evidence-only, no recommendations (honors the guardrail at `packages/rpiv-pi/agents/codebase-analyzer.md:113-119`).
|
|
443
|
+
- `codebase-analyzer` × 1 (Step 4, gated): cross-finding interaction sweep — emergent defects only, evidence-backed across multiple locations, no recommendations.
|
|
390
444
|
- `precedent-locator` (Phase-2, always): git history + thoughts/ for lessons.
|
|
391
445
|
- `web-search-researcher` (Phase-2, conditional on `ManifestChanged`): CVE / GitHub Advisory / OSS Index lookups with LINKS.
|
|
392
446
|
- **File reading**: read the diff FULLY (no limit/offset) via `git` commands before spawning agents. Let agents read their scoped targets; the orchestrator does not need to read source files for non-risk findings.
|