@juicesharp/rpiv-pi 1.8.0 → 1.8.1
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 +1 -1
- package/skills/annotate-guidance/SKILL.md +3 -3
- package/skills/annotate-inline/SKILL.md +3 -3
- package/skills/blueprint/SKILL.md +31 -33
- package/skills/changelog/SKILL.md +3 -3
- package/skills/code-review/SKILL.md +23 -25
- package/skills/commit/SKILL.md +2 -2
- package/skills/create-handoff/SKILL.md +3 -0
- package/skills/design/SKILL.md +25 -27
- package/skills/discover/SKILL.md +20 -21
- package/skills/explore/SKILL.md +25 -18
- package/skills/frontend-design/SKILL.md +14 -12
- package/skills/implement/SKILL.md +5 -4
- package/skills/migrate-to-guidance/SKILL.md +4 -0
- package/skills/outline-test-cases/SKILL.md +11 -5
- package/skills/plan/SKILL.md +19 -7
- package/skills/research/SKILL.md +22 -12
- package/skills/resume-handoff/SKILL.md +16 -8
- package/skills/revise/SKILL.md +18 -11
- package/skills/validate/SKILL.md +29 -35
- package/skills/write-test-cases/SKILL.md +11 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-pi",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"description": "A skill-based development workflow for Pi Agent. Five skills (research, design, plan, implement, validate) and the shared subagents that compose its ship-loop.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -5,13 +5,13 @@ argument-hint: [target-directory]
|
|
|
5
5
|
allowed-tools: Agent, Read, Write, Glob, Grep
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Annotate
|
|
8
|
+
# Annotate Guidance
|
|
9
9
|
|
|
10
10
|
You are tasked with generating architecture guidance files for a brownfield project. You will map the project structure, auto-detect its architecture, analyze each architectural layer, and batch-write compact architecture.md files under `.rpiv/guidance/` mirroring the project's directory structure.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Input
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`$ARGUMENTS` — optional target directory. Defaults to the current working directory.
|
|
15
15
|
|
|
16
16
|
## Steps to follow:
|
|
17
17
|
|
|
@@ -5,13 +5,13 @@ argument-hint: [target-directory]
|
|
|
5
5
|
allowed-tools: Agent, Read, Write, Glob, Grep
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Annotate
|
|
8
|
+
# Annotate Inline
|
|
9
9
|
|
|
10
10
|
You are tasked with generating CLAUDE.md files across a brownfield project. You will map the project structure, auto-detect its architecture, analyze each architectural layer, and batch-write compact CLAUDE.md files at the root and relevant subdirectories.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Input
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`$ARGUMENTS` — optional target directory. Defaults to the current working directory.
|
|
15
15
|
|
|
16
16
|
## Steps to follow:
|
|
17
17
|
|
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: blueprint
|
|
3
3
|
description: Plan complex features by decomposing them into vertical slices (one slice equals one phase) with developer micro-checkpoints between phases, producing an implement-ready phased plan in thoughts/shared/plans/. Use for complex multi-component features touching 6+ files across multiple layers when iterative review between slices is valuable. Requires a research artifact or a solutions artifact (from explore). Prefer blueprint over plan when mid-flight micro-checkpoints matter, and prefer plan when a straightforward phased breakdown is enough.
|
|
4
|
-
argument-hint: [research artifact path]
|
|
4
|
+
argument-hint: "[research artifact path]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Blueprint
|
|
8
8
|
|
|
9
9
|
You are tasked with planning how code will be shaped for a feature or change AND emitting an implement-ready phased plan. Decompose the feature into vertical slices (one slice = one phase), generate code slice-by-slice with developer micro-checkpoints between slices, and write the final artifact directly into `thoughts/shared/plans/` for `/skill:implement` to consume.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- Decompose
|
|
18
|
-
- Generate code slice-by-slice with developer micro-checkpoints (Step 7)
|
|
19
|
-
- Verify cross-slice integration consistency (Step 8 — internal, folded into final 7.3)
|
|
20
|
-
- Finalize the design artifact (Step 9)
|
|
21
|
-
- Review and iterate with the developer (Step 10)
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
`$ARGUMENTS` — path to a research artifact (`thoughts/shared/research/*.md`) or a solutions artifact (`thoughts/shared/solutions/*.md`).
|
|
14
|
+
|
|
15
|
+
## Flow
|
|
16
|
+
|
|
17
|
+
1. Input → 2. Research → 3. Dimension sweep → 4. Self-critique → 5. Checkpoint → 6. Decompose → 7. Generate slices → 8. Integration verify → 9. Finalize → 10. Independent review → 11. Triage & iterate → 12. Follow-ups
|
|
22
18
|
|
|
23
19
|
The final artifact is implement-ready.
|
|
24
20
|
|
|
25
|
-
##
|
|
21
|
+
## Steps
|
|
22
|
+
|
|
23
|
+
### Step 1: Input Handling
|
|
26
24
|
|
|
27
25
|
When this command is invoked:
|
|
28
26
|
|
|
@@ -47,7 +45,7 @@ When this command is invoked:
|
|
|
47
45
|
|
|
48
46
|
2. **Read any additional files mentioned** — tickets, related designs, existing implementations. Read them FULLY before proceeding.
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
### Step 2: Targeted Research
|
|
51
49
|
|
|
52
50
|
This is NOT a discovery sweep. Focus on DEPTH (how things work, what patterns to follow) not BREADTH (where things are).
|
|
53
51
|
|
|
@@ -76,7 +74,7 @@ This is NOT a discovery sweep. Focus on DEPTH (how things work, what patterns to
|
|
|
76
74
|
- Note assumptions that need verification
|
|
77
75
|
- Determine true scope based on codebase reality
|
|
78
76
|
|
|
79
|
-
|
|
77
|
+
### Step 3: Identify Ambiguities — Dimension Sweep
|
|
80
78
|
|
|
81
79
|
Walk Step 2 findings, inherited research Q/As, and carried Open Questions through six architectural dimensions that map 1:1 to the plan artifact's section coverage — the sweep guarantees downstream completeness. Add **migration** as a seventh dimension only if the feature changes persisted schema.
|
|
82
80
|
|
|
@@ -91,7 +89,7 @@ For each dimension, classify findings as **simple decisions** (one valid option,
|
|
|
91
89
|
|
|
92
90
|
**Pre-validate every option** before queuing it against research constraints and runtime code behavior. Eliminate or caveat options that contradict Steps 1-2 evidence. **Coverage check**: every Step 2 file read appears in at least one decision or ambiguity; every dimension is addressed (silently-resolved valid, skipped-unchecked not).
|
|
93
91
|
|
|
94
|
-
|
|
92
|
+
### Step 4: Holistic Self-Critique
|
|
95
93
|
|
|
96
94
|
Before presenting ambiguities to the developer, review the combined design picture holistically. Step 3 triages findings individually — this step checks whether they fit together as a coherent whole.
|
|
97
95
|
|
|
@@ -111,7 +109,7 @@ Before presenting ambiguities to the developer, review the combined design pictu
|
|
|
111
109
|
- Issues that need developer input: add as new genuine ambiguities to the Step 5 checkpoint queue.
|
|
112
110
|
- If no issues found: proceed to Step 5 with the existing ambiguity set.
|
|
113
111
|
|
|
114
|
-
|
|
112
|
+
### Step 5: Developer Checkpoint
|
|
115
113
|
|
|
116
114
|
Use the grounded-questions-one-at-a-time pattern. Use a **❓ Question:** prefix so the developer knows their input is needed. Each question must:
|
|
117
115
|
- Reference real findings with `file:line` evidence
|
|
@@ -171,7 +169,7 @@ Files: {N} new, {M} modified
|
|
|
171
169
|
|
|
172
170
|
Use the `ask_user_question` tool to confirm before proceeding. Question: "{Summary from design brief above}. Ready to proceed to decomposition?". Header: "Design". Options: "Proceed (Recommended)" (Decompose into vertical slices, then generate code slice-by-slice); "Adjust decisions" (Revisit one or more architectural decisions above); "Change scope" (Add or remove items from the building/not-building lists).
|
|
173
171
|
|
|
174
|
-
|
|
172
|
+
### Step 6: Feature Decomposition
|
|
175
173
|
|
|
176
174
|
After the design summary is confirmed, decompose the feature into vertical slices. Each slice is a self-contained unit: types + implementation + wiring for one concern.
|
|
177
175
|
|
|
@@ -237,7 +235,7 @@ After the design summary is confirmed, decompose the feature into vertical slice
|
|
|
237
235
|
- **NEW files**: `#### N. path/to/file.ext` + `**File**: path` + `**Changes**: NEW — {purpose}` + empty code fence (filled with full implementation in Step 7.4)
|
|
238
236
|
- **MODIFY files**: `#### N. path/to/file.ext:line-range` + `**File**: path` + `**Changes**: MODIFY — {summary}` + empty code fence (filled with only the modified code in Step 7.4 — no "Current" block, the original is on disk)
|
|
239
237
|
|
|
240
|
-
|
|
238
|
+
### Step 7: Generate Slices (Iterative)
|
|
241
239
|
|
|
242
240
|
Generate code one slice at a time. Each slice sees the fixed code from all previous slices.
|
|
243
241
|
|
|
@@ -245,7 +243,7 @@ Generate code one slice at a time. Each slice sees the fixed code from all previ
|
|
|
245
243
|
|
|
246
244
|
**For each slice in the decomposition (sequential order):**
|
|
247
245
|
|
|
248
|
-
|
|
246
|
+
#### 7.1. Generate slice code (internal)
|
|
249
247
|
|
|
250
248
|
Generate complete, copy-pasteable code for every file in this slice — but **hold it for the artifact, do NOT present full code to the developer**. The developer sees a condensed review in 7.3; the full code goes into the artifact in 7.4.
|
|
251
249
|
|
|
@@ -260,7 +258,7 @@ No pseudocode, no TODOs, no placeholders — the code must be copy-pasteable by
|
|
|
260
258
|
|
|
261
259
|
**Context grounding** (after slice 2): Before generating, re-read the artifact's prior `## Phase N` sections for files this slice touches (a file may appear in earlier phases; if so, this phase extends or revisits it). The artifact is the source of truth — generate code that extends what's already emitted, not what you remember from conversation.
|
|
262
260
|
|
|
263
|
-
|
|
261
|
+
#### 7.2. Verify slice
|
|
264
262
|
|
|
265
263
|
Mandatory for every slice — no skipping, no shortcuts. Dispatch the `slice-verifier` agent with:
|
|
266
264
|
- `artifact_path`: the Step-6 Write `file_path` (contains the skeleton plus locked prior phases; the current slice's code fence is still empty per 7.1/7.4 timing)
|
|
@@ -275,7 +273,7 @@ The agent emits a 3-row summary (`Decisions / Cross-slice / Research`). On any V
|
|
|
275
273
|
|
|
276
274
|
Never proceed to 7.3 with a VIOLATION absent from the presentation.
|
|
277
275
|
|
|
278
|
-
|
|
276
|
+
#### 7.3. Developer micro-checkpoint
|
|
279
277
|
|
|
280
278
|
Present a **condensed review** of the slice — NOT the full generated code. The developer reviews the design shape, not every line. For each file in the slice, show:
|
|
281
279
|
|
|
@@ -294,7 +292,7 @@ Use the `ask_user_question` tool to confirm. Question: "Slice {N/M}: {slice name
|
|
|
294
292
|
|
|
295
293
|
**Checkpoint cadence**: One slice per checkpoint. Present each slice individually, regardless of slice count.
|
|
296
294
|
|
|
297
|
-
|
|
295
|
+
#### 7.4. Incorporate feedback
|
|
298
296
|
|
|
299
297
|
**Approve**: Lock this slice's code and **Edit the artifact immediately**:
|
|
300
298
|
1. For each file in this slice, Edit the skeleton artifact to replace the empty code fence under that file's `#### N. path/...` subsection inside this slice's `## Phase N: {slice name}` section with the full generated code from 7.1
|
|
@@ -325,7 +323,7 @@ Update decomposition (add/remove/reorder remaining slices) and confirm before co
|
|
|
325
323
|
|
|
326
324
|
**Revisit a decision**: Re-run Step 5 for the flagged ambiguity (one question). If decomposition is unaffected, update `## Decisions` and resume 7.1. If affected, cascade like Rethink — for each invalidated approved phase, ask reopen vs. annotate Plan History, then update remaining slices. Re-run 7.2 before re-presenting 7.3; artifact untouched until approval.
|
|
327
325
|
|
|
328
|
-
|
|
326
|
+
### Step 8: Integration Verification (internal)
|
|
329
327
|
|
|
330
328
|
Runs during the final slice's 7.2 — no separate developer round-trip. Result feeds the final 7.3 question text.
|
|
331
329
|
|
|
@@ -333,7 +331,7 @@ Runs during the final slice's 7.2 — no separate developer round-trip. Result f
|
|
|
333
331
|
2. **Constraint check**: every `## Verification Notes` and Precedent & Lesson entry from research is satisfied somewhere in the generated code.
|
|
334
332
|
3. **Emit summary** for final 7.3: `OK` or `violations: {brief}`. No `ask_user_question` here — Step 7.3 absorbs the approval.
|
|
335
333
|
|
|
336
|
-
|
|
334
|
+
### Step 9: Finalize Plan Artifact
|
|
337
335
|
|
|
338
336
|
The artifact was created as a skeleton in Step 6 and filled progressively in Step 7.4 (code fences + Success Criteria). This step verifies and flips status.
|
|
339
337
|
|
|
@@ -353,7 +351,7 @@ The artifact was created as a skeleton in Step 6 and filled progressively in Ste
|
|
|
353
351
|
- **NEW files**: `#### N. path/to/file.ext` + `**File**` + `**Changes**: NEW — {purpose}` + full implementation code block
|
|
354
352
|
- **MODIFY files**: `#### N. path/to/file.ext:line-range` + `**File**` + `**Changes**: MODIFY — {summary}` + code block with only the modified/added code (no "Current" block — the original is on disk, implement reads it)
|
|
355
353
|
|
|
356
|
-
|
|
354
|
+
### Step 10: Independent Plan Review
|
|
357
355
|
|
|
358
356
|
After Step 9 finalizes the artifact, dispatch an independent review subagent
|
|
359
357
|
to walk every Phase code fence against the live codebase. The subagent runs
|
|
@@ -362,7 +360,7 @@ criticism > generation asymmetry plus fresh-context isolation. Inherits the
|
|
|
362
360
|
orchestrator's model (no model upgrade required); the value comes from the
|
|
363
361
|
fresh dispatch, not from a stronger model.
|
|
364
362
|
|
|
365
|
-
|
|
363
|
+
#### 10.1. Dispatch the artifact-reviewer subagent
|
|
366
364
|
|
|
367
365
|
Reuse the exact `file_path` string passed to `Write` at Step 6 — the runtime already resolved it for this platform; do not rebuild it from `pwd`. `ls` to verify it still exists; abort dispatch on miss.
|
|
368
366
|
|
|
@@ -376,7 +374,7 @@ Review the finalized plan against the live codebase at HEAD. Walk every Phase co
|
|
|
376
374
|
})
|
|
377
375
|
```
|
|
378
376
|
|
|
379
|
-
|
|
377
|
+
#### 10.2. Persist the review table to the artifact
|
|
380
378
|
|
|
381
379
|
The agent returns a markdown table with columns `plan-loc | codebase-loc | severity | dimension | finding | recommendation`. Append it to the plan artifact as a new section, with a `resolution` column appended (initially blank, filled progressively at Step 11):
|
|
382
380
|
|
|
@@ -394,7 +392,7 @@ _Independent post-finalization review by artifact-reviewer subagent. Findings tr
|
|
|
394
392
|
|
|
395
393
|
If the agent emits zero rows, still emit the section with a single line: `_No findings — artifact-reviewer cleared the artifact._`. Persistence is mandatory regardless of finding count — the section is the durable audit trail.
|
|
396
394
|
|
|
397
|
-
|
|
395
|
+
#### 10.3. Tally findings for Step 11's prompt
|
|
398
396
|
|
|
399
397
|
Count rows by severity. Store the counts in main context for Step 11's developer prompt:
|
|
400
398
|
|
|
@@ -404,7 +402,7 @@ Count rows by severity. Store the counts in main context for Step 11's developer
|
|
|
404
402
|
|
|
405
403
|
Do NOT auto-apply any finding. The orchestrator never makes the apply / defer / dismiss judgment alone — that lives with the developer at Step 11. The reviewer's role is to surface; the developer's role is to triage.
|
|
406
404
|
|
|
407
|
-
|
|
405
|
+
#### 10.4. Failure handling
|
|
408
406
|
|
|
409
407
|
If artifact-reviewer errors out (subprocess crash, malformed output, timeout):
|
|
410
408
|
- Skip Step 10's findings; do not block on the failure.
|
|
@@ -414,7 +412,7 @@ If artifact-reviewer errors out (subprocess crash, malformed output, timeout):
|
|
|
414
412
|
|
|
415
413
|
The developer review path at Step 11 absorbs the cost — that is how planning worked before this step existed.
|
|
416
414
|
|
|
417
|
-
|
|
415
|
+
### Step 11: Review & Iterate
|
|
418
416
|
|
|
419
417
|
1. **Triage artifact-reviewer findings first** (skip if Step 10 returned no findings):
|
|
420
418
|
|
|
@@ -459,7 +457,7 @@ The developer review path at Step 11 absorbs the cost — that is how planning w
|
|
|
459
457
|
> 🆕 Tip: start a fresh session with `/new` first — chained skills work best with a clean context window.
|
|
460
458
|
```
|
|
461
459
|
|
|
462
|
-
|
|
460
|
+
### Step 12: Handle Follow-ups
|
|
463
461
|
|
|
464
462
|
- **Edit in-place.** Use the Edit tool to update the plan artifact directly — phase code stays one source of truth.
|
|
465
463
|
- **Bump frontmatter.** Update `last_updated` + `last_updated_by`; set `last_updated_note: "Updated <brief description>"`.
|
|
@@ -9,9 +9,9 @@ allowed-tools: Bash(git *), Read, Edit
|
|
|
9
9
|
|
|
10
10
|
You are tasked with regenerating the `## [Unreleased]` section of every affected `CHANGELOG.md` in the repository so it reflects all change since the last release tag — committed and uncommitted alike.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Input
|
|
13
13
|
|
|
14
|
-
`$ARGUMENTS`
|
|
14
|
+
`$ARGUMENTS` — optional `--since <ref>` flag. Empty/literal → range starts at the last release tag from `git describe --tags --abbrev=0`.
|
|
15
15
|
|
|
16
16
|
## Workflow
|
|
17
17
|
|
|
@@ -30,7 +30,7 @@ You are tasked with regenerating the `## [Unreleased]` section of every affected
|
|
|
30
30
|
|
|
31
31
|
## Step 2: Determine the change range
|
|
32
32
|
|
|
33
|
-
1. Parse
|
|
33
|
+
1. Parse the input for a `--since <ref>` flag. If absent, set `SINCE=$(git describe --tags --abbrev=0)`.
|
|
34
34
|
2. The range is `$SINCE..HEAD` for committed changes, plus the current uncommitted+staged working tree.
|
|
35
35
|
|
|
36
36
|
## Step 3: Determine each CHANGELOG's scope, then collect commits + uncommitted hunks
|
|
@@ -6,25 +6,23 @@ argument-hint: "[scope]"
|
|
|
6
6
|
|
|
7
7
|
# Code Review
|
|
8
8
|
|
|
9
|
-
Scope: $ARGUMENTS
|
|
10
|
-
|
|
11
9
|
Review changes across **Quality**, **Security**, **Dependencies** lenses with optional advisor adjudication. Valid scopes: `commit` | `staged` | `working` | hash | `A..B` | PR branch. **Empty scope defaults to feature-branch-vs-default-branch first-parent review** (default branch auto-detected; see Step 1).
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
- Step 7 — write artifact
|
|
21
|
-
- Steps 8–9 — present and handle follow-ups
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
`$ARGUMENTS` — scope: `commit` | `staged` | `working` | a commit hash | `A..B` range | PR branch name. Empty defaults to feature-branch-vs-default-branch (first-parent).
|
|
14
|
+
|
|
15
|
+
## Flow
|
|
16
|
+
|
|
17
|
+
1. Input → 2. Wave-1 dispatch → 3. Wave-2 dispatch → 4. Wave-3 dispatch → 5. Reconcile → 6. Verify → 7. Write artifact → 8. Present → 9. Follow-ups
|
|
22
18
|
|
|
23
19
|
**File-orientation contract**: agents reason about *files* as coherent units. Hunks are evidence *within* a file's analysis, never the unit of analysis. The `-U30` patch (Step 1) inlines function-level context so agents rarely need extra `Read` calls.
|
|
24
20
|
|
|
25
21
|
Every Wave-2 agent prompt contains EXACTLY: (a) `Known Context:` followed by the Discovery Map verbatim, and (b) the literal string `.git/code-review-patch.diff` as the patch path. Nothing else from Wave-1 outputs — NOT the raw integration-scanner dump, NOT precedent-locator output, NOT Dependencies/CVE output. See "Wave-2 context isolation" in Step 3 for the failure mode when this is violated. Wave-1 agents that do not consume the Discovery Map (precedents, dependencies, CVE) get `ChangedFiles` / manifest-diff only.
|
|
26
22
|
|
|
27
|
-
##
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
### Step 1: Resolve Scope and Assemble the Diff
|
|
28
26
|
|
|
29
27
|
1. **Detect default branch**: `DEFAULT_BRANCH=$(git symbolic-ref --quiet --short refs/remotes/origin/HEAD 2>/dev/null | sed 's@^origin/@@')`. Fallback: probe `main` then `master` (`git rev-parse --verify --quiet <name>`); if neither resolves, ask the user which branch is the integration target before proceeding. Use `$DEFAULT_BRANCH` wherever the parser below says `<default>`.
|
|
30
28
|
|
|
@@ -67,7 +65,7 @@ Every Wave-2 agent prompt contains EXACTLY: (a) `Known Context:` followed by the
|
|
|
67
65
|
|
|
68
66
|
Drop a pair only when the peer doesn't exist at HEAD, no heuristic matches, or both files were added in this diff. Empty list ⇒ skip the peer-mirror agent. Co-modified peers are KEPT — the agent Reads them at HEAD (post-diff tree state), so any invariant present at HEAD counts as peer evidence regardless of whether the peer was edited in this diff.
|
|
69
67
|
|
|
70
|
-
|
|
68
|
+
### Step 2: Dispatch Wave-1 — Integration + Precedents + Deps/CVE + Peer-Mirror
|
|
71
69
|
|
|
72
70
|
Spawn ALL of the following in parallel at T=0 in a **single message with multiple Agent tool calls**. Do NOT wait for integration-scanner before dispatching precedents / dependencies / CVE — they do not consume Discovery-Map output, only `ChangedFiles` and the manifest diff (both orchestrator-produced in Step 1).
|
|
73
71
|
|
|
@@ -117,7 +115,7 @@ While these agents run, the orchestrator produces the rest of the Discovery Map
|
|
|
117
115
|
**Synthesize the Discovery Map** — a compact block that Wave-2 agents receive verbatim as `Known Context`. Each file line carries a *role tag* and a *symbols-touched hint*; files are clustered by shared directory prefix so agents orient without re-reading the patch.
|
|
118
116
|
|
|
119
117
|
```
|
|
120
|
-
|
|
118
|
+
#### Discovery Map
|
|
121
119
|
|
|
122
120
|
Review type: {ReviewType}
|
|
123
121
|
Scope: {scope argument}
|
|
@@ -150,9 +148,9 @@ Peer mirrors: {peer-mirror agent output verbatim — Missing/Diverged rows only;
|
|
|
150
148
|
|
|
151
149
|
**Symbols-touched hint**: extract top 1–3 top-level definitions from the diff's `+` lines using a heuristic appropriate to the file's language (class/function/def/fn/struct/trait/interface/type/export). Cap at ~80 chars. Leave blank if ambiguous — orientation, not completeness.
|
|
152
150
|
|
|
153
|
-
|
|
151
|
+
### Step 3: Dispatch Wave-2 — Quality + Security Lenses
|
|
154
152
|
|
|
155
|
-
Spawn Quality + Security in parallel using the Agent tool. Each receives the
|
|
153
|
+
Spawn Quality + Security in parallel using the Agent tool. Each receives the Discovery Map block inline as `Known Context` above its task, and a pointer to `.git/code-review-patch.diff` for the diff itself. Precedents / Dependencies / CVE are already running from Wave-1 — do NOT re-dispatch them here; the prompts below document what those Wave-1 agents received, they are not re-issued.
|
|
156
154
|
|
|
157
155
|
**Wave-2 context isolation (LOAD-BEARING — violations cause silent quality collapse)**: Each Wave-2 agent receives EXACTLY two things, nothing else: (1) the Discovery Map (digested form) and (2) the literal path string `.git/code-review-patch.diff`.
|
|
158
156
|
|
|
@@ -251,7 +249,7 @@ Spawn Quality + Security in parallel using the Agent tool. Each receives the `##
|
|
|
251
249
|
|
|
252
250
|
**Wait for Quality + Security to complete** before proceeding. Precedents / Dependencies / CVE from Wave-1 may still be running; gather them before Step 5, not before Step 4.
|
|
253
251
|
|
|
254
|
-
|
|
252
|
+
### Step 4: Dispatch Wave-3 — Predicate-Trace + Interaction Sweep + Gap-Finder
|
|
255
253
|
|
|
256
254
|
Once Wave-2 (Quality + Security) completes, dispatch 4a and 4b as parallel agents **in a single message**; compute 4c inline (orchestrator-side set arithmetic — no agent). They do NOT consume each other's output:
|
|
257
255
|
|
|
@@ -259,7 +257,7 @@ Once Wave-2 (Quality + Security) completes, dispatch 4a and 4b as parallel agent
|
|
|
259
257
|
- **Gap-Finder (4c)** is coverage arithmetic: `{in-scope files} − {files with ≥1 Quality/Security finding} = {uncovered files}`. Orchestrator already holds both sets post-Wave-2 — an agent would discard context only to re-receive it via prompt. Inline is strictly cheaper and deterministic.
|
|
260
258
|
- If Predicate-Trace (4a) surfaces a row that was not visible in Quality's table, append it via a Step 9 follow-up — cheaper than a serial gate.
|
|
261
259
|
|
|
262
|
-
|
|
260
|
+
#### Step 4a: Predicate-Trace
|
|
263
261
|
|
|
264
262
|
**Gate**: SKIP this sub-step (do not dispatch 4a) unless `HasGatingPredicate` is true AND the Quality lens returned ≥2 rows in its `Predicate-set coherence` table referencing the same enum/type. If skipped, 4b and 4c still dispatch.
|
|
265
263
|
|
|
@@ -279,7 +277,7 @@ Otherwise spawn ONE `codebase-analyzer` in parallel with 4b:
|
|
|
279
277
|
|
|
280
278
|
Do NOT wait — 4b (Interaction Sweep) dispatches in the same message as 4a; 4c runs inline in the orchestrator.
|
|
281
279
|
|
|
282
|
-
|
|
280
|
+
#### Step 4b: Interaction Sweep
|
|
283
281
|
|
|
284
282
|
**Gate**: SKIP this sub-step (do not dispatch 4b) when EITHER `len(ChangedFiles) < 2` OR the Quality lens returned fewer than 4 total observations across all files. Emergent interactions need surface area; tiny diffs cannot structurally produce them.
|
|
285
283
|
|
|
@@ -308,7 +306,7 @@ Otherwise spawn ONE `codebase-analyzer` in parallel with 4a:
|
|
|
308
306
|
For findings involving ordering/races/concurrency across processes or handlers, name the ordering primitive that would prevent the race (distributed lock, exclusive-key wrapper, ordered partition, transaction, idempotency key, etc.) and explain why it does NOT apply here. Drop the finding if the primitive exists in the diff or nearby and your argument against it is speculative.
|
|
309
307
|
```
|
|
310
308
|
|
|
311
|
-
|
|
309
|
+
#### Step 4c: Gap-Finder (orchestrator-side coverage arithmetic)
|
|
312
310
|
|
|
313
311
|
**Gate**: SKIP when `len(ChangedFiles) < 2`. Tiny diffs cannot structurally have coverage gaps.
|
|
314
312
|
|
|
@@ -324,7 +322,7 @@ No agent dispatch. Compute inline while 4a / 4b run:
|
|
|
324
322
|
|
|
325
323
|
**Wait for ALL of 4a / 4b AND the Precedents agent from Wave-1 to complete** before proceeding to Step 5 (Reconciliation). Precedents is a **hard gate** — severity weighting in Step 5 reads its follow-up-within-30-days counts. Dependencies / CVE (when dispatched) also merge in here but are not individually hard-gated; wait for them too unless they clearly exceed the review SLA, in which case omit `## Dependencies` and note it in the artifact. 4c has no wait — it completes synchronously with the orchestrator.
|
|
326
324
|
|
|
327
|
-
|
|
325
|
+
### Step 5: Reconcile Findings
|
|
328
326
|
|
|
329
327
|
**Barrier**: Step 5 MUST NOT begin until the Precedents agent has returned. Severity weighting depends on historical follow-up counts; starting reconciliation without them produces mis-weighted severities that the verification pass (Step 6) cannot correct.
|
|
330
328
|
|
|
@@ -363,7 +361,7 @@ No agent dispatch. Compute inline while 4a / 4b run:
|
|
|
363
361
|
• *{spec A accepts Y} + {spec B rejects Y} + {workflow depends on both}* = **contradictory-predicate deadlock**
|
|
364
362
|
Also check `thoughts/shared/reviews/*.md` and Precedents: if a prior review names a cascade whose constituents appear in current findings, cite it and assert reproduction. Missed cascades are the biggest historical quality regression; prefer false positives here.
|
|
365
363
|
|
|
366
|
-
|
|
364
|
+
### Step 6: Verify Findings
|
|
367
365
|
|
|
368
366
|
Before writing the artifact, spawn ONE `claim-verifier` whose sole job is to ground every reconciled finding in the actual code at its cited `file:line`. This catches two classes of error the lenses cannot self-detect: (a) *confident assertions* the agent never opened a file to confirm, and (b) *rationalisations* ("intentional-by-design", "pre-existing", "not a real deadlock") that contradict what the code does. Lens agents reason from the patch; the verifier reasons from the file.
|
|
369
367
|
|
|
@@ -407,7 +405,7 @@ Before writing the artifact, spawn ONE `claim-verifier` whose sole job is to gro
|
|
|
407
405
|
|
|
408
406
|
**Do not skip this step** — it is the only mechanism that stops confident-but-unread lens assertions from reaching the artifact.
|
|
409
407
|
|
|
410
|
-
|
|
408
|
+
### Step 7: Write the Review Document
|
|
411
409
|
|
|
412
410
|
1. **Determine metadata**:
|
|
413
411
|
- Filename: `thoughts/shared/reviews/YYYY-MM-DD_HH-MM-SS_{scope-kebab}.md`
|
|
@@ -437,7 +435,7 @@ Before writing the artifact, spawn ONE `claim-verifier` whose sole job is to gro
|
|
|
437
435
|
|
|
438
436
|
**Template shape**: Read the full template at `templates/review.md` (house pattern per `.rpiv/guidance/skills/architecture.md:66` — `templates/` subfolder, runtime-read, never inlined). At emission time: Read `templates/review.md`, fill every `{placeholder}` with reconciled-and-verified values from Steps 5 and 6, apply the section-omission rules above (delete the whole section AND its trailing separator line when its input is empty), strip the leading `<!-- -->` comment, and Write the result to the target path.
|
|
439
437
|
|
|
440
|
-
|
|
438
|
+
### Step 8: Present Summary
|
|
441
439
|
|
|
442
440
|
```
|
|
443
441
|
Review written to:
|
|
@@ -465,7 +463,7 @@ Ask follow-ups, or chain forward.
|
|
|
465
463
|
> 🆕 Tip: start a fresh session with `/new` first — chained skills work best with a clean context window.
|
|
466
464
|
```
|
|
467
465
|
|
|
468
|
-
|
|
466
|
+
### Step 9: Handle Follow-ups
|
|
469
467
|
|
|
470
468
|
- **Append, never rewrite.** Edit the artifact to add a `## Follow-up {ISO 8601 timestamp}` section. The section heading's timestamp is the append-time record — no frontmatter update needed.
|
|
471
469
|
- **Re-dispatch narrowly.** Spawn a single targeted `codebase-analyzer` on the area in question (1 agent max).
|
package/skills/commit/SKILL.md
CHANGED
|
@@ -9,9 +9,9 @@ allowed-tools: Bash(git *), Read, Glob, Grep
|
|
|
9
9
|
|
|
10
10
|
You are tasked with creating git commits for repository changes.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Input
|
|
13
13
|
|
|
14
|
-
`$ARGUMENTS`
|
|
14
|
+
`$ARGUMENTS` — optional commit message hint. Empty/literal → infer from history and `git diff`.
|
|
15
15
|
|
|
16
16
|
## Context:
|
|
17
17
|
- **In-session**: If there's conversation history, use it to understand what was built/changed
|
|
@@ -10,6 +10,9 @@ disable-model-invocation: true
|
|
|
10
10
|
|
|
11
11
|
You are tasked with writing a handoff document to hand off your work to another agent in a new session. You will create a handoff document that is thorough, but also **concise**. The goal is to compact and summarize your context without losing any of the key details of what you're working on.
|
|
12
12
|
|
|
13
|
+
## Input
|
|
14
|
+
|
|
15
|
+
`$ARGUMENTS` — optional description (used in the handoff filename slug).
|
|
13
16
|
|
|
14
17
|
## Process
|
|
15
18
|
### 1. Filepath & Metadata
|
package/skills/design/SKILL.md
CHANGED
|
@@ -1,28 +1,26 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: design
|
|
3
3
|
description: Design complex features by decomposing them into vertical slices and producing a design artifact (architecture decisions, slice breakdown, file map) in thoughts/shared/designs/. The design feeds the plan or blueprint skill. Use for complex multi-component features touching 6+ files across multiple layers, when the user wants a feature designed before implementation. Requires a research artifact or a solutions artifact (from explore). Prefer design over plan or blueprint when the focus is architecture and decomposition rather than phased execution steps.
|
|
4
|
-
argument-hint: [research artifact path]
|
|
4
|
+
argument-hint: "[research artifact path]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Design
|
|
8
8
|
|
|
9
9
|
You are tasked with designing how code will be shaped for a feature or change. This iterative variant decomposes features into vertical slices and generates code slice-by-slice with developer micro-checkpoints between slices. The design artifact feeds directly into plan, which sequences it into phases.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- Decompose
|
|
18
|
-
- Generate code slice-by-slice with developer micro-checkpoints (Step 7)
|
|
19
|
-
- Verify cross-slice integration consistency (Step 8)
|
|
20
|
-
- Finalize the design artifact (Step 9)
|
|
21
|
-
- Review and iterate with the developer (Step 10)
|
|
11
|
+
## Input
|
|
12
|
+
|
|
13
|
+
`$ARGUMENTS` — path to a research artifact (`thoughts/shared/research/*.md`) or a solutions artifact (`thoughts/shared/solutions/*.md`).
|
|
14
|
+
|
|
15
|
+
## Flow
|
|
16
|
+
|
|
17
|
+
1. Input → 2. Research → 3. Dimension sweep → 4. Self-critique → 5. Checkpoint → 6. Decompose → 7. Generate slices → 8. Integration verify → 9. Finalize → 10. Review → 11. Follow-ups
|
|
22
18
|
|
|
23
19
|
The final artifact is plan-compatible.
|
|
24
20
|
|
|
25
|
-
##
|
|
21
|
+
## Steps
|
|
22
|
+
|
|
23
|
+
### Step 1: Input Handling
|
|
26
24
|
|
|
27
25
|
When this command is invoked:
|
|
28
26
|
|
|
@@ -47,7 +45,7 @@ When this command is invoked:
|
|
|
47
45
|
|
|
48
46
|
2. **Read any additional files mentioned** — tickets, related designs, existing implementations. Read them FULLY before proceeding.
|
|
49
47
|
|
|
50
|
-
|
|
48
|
+
### Step 2: Targeted Research
|
|
51
49
|
|
|
52
50
|
This is NOT a discovery sweep. Focus on DEPTH (how things work, what patterns to follow) not BREADTH (where things are).
|
|
53
51
|
|
|
@@ -79,7 +77,7 @@ This is NOT a discovery sweep. Focus on DEPTH (how things work, what patterns to
|
|
|
79
77
|
- Note assumptions that need verification
|
|
80
78
|
- Determine true scope based on codebase reality
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
### Step 3: Identify Ambiguities — Dimension Sweep
|
|
83
81
|
|
|
84
82
|
Walk Step 2 findings, inherited research Q/As, and carried Open Questions through six architectural dimensions that map 1:1 to `plan` extract sections — the sweep guarantees downstream completeness. Add **migration** as a seventh dimension only if the feature changes persisted schema.
|
|
85
83
|
|
|
@@ -94,7 +92,7 @@ For each dimension, classify findings as **simple decisions** (one valid option,
|
|
|
94
92
|
|
|
95
93
|
**Pre-validate every option** before queuing it against research constraints and runtime code behavior. Eliminate or caveat options that contradict Steps 1-2 evidence. **Coverage check**: every Step 2 file read appears in at least one decision or ambiguity; every dimension is addressed (silently-resolved valid, skipped-unchecked not).
|
|
96
94
|
|
|
97
|
-
|
|
95
|
+
### Step 4: Holistic Self-Critique
|
|
98
96
|
|
|
99
97
|
Before presenting ambiguities to the developer, review the combined design picture holistically. Step 3 triages findings individually — this step checks whether they fit together as a coherent whole.
|
|
100
98
|
|
|
@@ -114,7 +112,7 @@ Before presenting ambiguities to the developer, review the combined design pictu
|
|
|
114
112
|
- Issues that need developer input: add as new genuine ambiguities to the Step 5 checkpoint queue.
|
|
115
113
|
- If no issues found: proceed to Step 5 with the existing ambiguity set.
|
|
116
114
|
|
|
117
|
-
|
|
115
|
+
### Step 5: Developer Checkpoint
|
|
118
116
|
|
|
119
117
|
Use the grounded-questions-one-at-a-time pattern. Use a **❓ Question:** prefix so the developer knows their input is needed. Each question must:
|
|
120
118
|
- Reference real findings with `file:line` evidence
|
|
@@ -174,7 +172,7 @@ Files: {N} new, {M} modified
|
|
|
174
172
|
|
|
175
173
|
Use the `ask_user_question` tool to confirm before proceeding. Question: "{Summary from design brief above}. Ready to proceed to decomposition?". Header: "Design". Options: "Proceed (Recommended)" (Decompose into vertical slices, then generate code slice-by-slice); "Adjust decisions" (Revisit one or more architectural decisions above); "Change scope" (Add or remove items from the building/not-building lists).
|
|
176
174
|
|
|
177
|
-
|
|
175
|
+
### Step 6: Feature Decomposition
|
|
178
176
|
|
|
179
177
|
After the design summary is confirmed, decompose the feature into vertical slices. Each slice is a self-contained unit: types + implementation + wiring for one concern.
|
|
180
178
|
|
|
@@ -238,13 +236,13 @@ After the design summary is confirmed, decompose the feature into vertical slice
|
|
|
238
236
|
- **NEW files**: heading + empty code fence (filled with full implementation in Step 7d)
|
|
239
237
|
- **MODIFY files**: heading with `file:line-range` + empty code fence (filled with only the modified code in Step 7d — no "Current" block, the original is on disk)
|
|
240
238
|
|
|
241
|
-
|
|
239
|
+
### Step 7: Generate Slices (Iterative)
|
|
242
240
|
|
|
243
241
|
Generate code one slice at a time. Each slice sees the fixed code from all previous slices.
|
|
244
242
|
|
|
245
243
|
**For each slice in the decomposition (sequential order):**
|
|
246
244
|
|
|
247
|
-
|
|
245
|
+
#### 7a. Generate slice code (internal)
|
|
248
246
|
|
|
249
247
|
Generate complete, copy-pasteable code for every file in this slice — but **hold it for the artifact, do NOT present full code to the developer**. The developer sees a condensed review in 7c; the full code goes into the artifact in 7d.
|
|
250
248
|
|
|
@@ -259,7 +257,7 @@ No pseudocode, no TODOs, no placeholders — the code must be copy-pasteable by
|
|
|
259
257
|
|
|
260
258
|
**Context grounding** (after slice 2): Before generating, re-read the artifact's Architecture section for files this slice touches. The artifact is the source of truth — generate code that extends what's already there, not what you remember from conversation.
|
|
261
259
|
|
|
262
|
-
|
|
260
|
+
#### 7b. Self-verify slice
|
|
263
261
|
|
|
264
262
|
Before presenting to the developer, cross-check this slice and produce a structured summary:
|
|
265
263
|
|
|
@@ -272,7 +270,7 @@ Self-verify Slice N:
|
|
|
272
270
|
|
|
273
271
|
If violations found: fix in-place before presenting. Include the self-verify summary in the 7c checkpoint presentation.
|
|
274
272
|
|
|
275
|
-
|
|
273
|
+
#### 7c. Developer micro-checkpoint
|
|
276
274
|
|
|
277
275
|
Present a **condensed review** of the slice — NOT the full generated code. The developer reviews the design shape, not every line. For each file in the slice, show:
|
|
278
276
|
|
|
@@ -290,7 +288,7 @@ Use the `ask_user_question` tool to confirm. Question: "Slice {N/M}: {slice name
|
|
|
290
288
|
**Checkpoint cadence**: Slices 1-2: always individual. Slices 3+: individual if (a) mid-generation agent spawn was needed, (b) MODIFY touches an undiscussed file, or (c) self-verify fixed a violation.
|
|
291
289
|
Otherwise batch 2-3 slices (max 3).
|
|
292
290
|
|
|
293
|
-
|
|
291
|
+
#### 7d. Incorporate feedback
|
|
294
292
|
|
|
295
293
|
**Approve**: Lock this slice's code and **Edit the artifact immediately**:
|
|
296
294
|
1. For each file in this slice, Edit the skeleton artifact to replace the empty code fence under that file's Architecture heading with the full generated code from 7a
|
|
@@ -304,7 +302,7 @@ Otherwise batch 2-3 slices (max 3).
|
|
|
304
302
|
**Rethink**: Developer spotted a design issue. If a previously approved slice is affected, flag the conflict and offer cascade revision — developer decides whether to reopen (if yes, Edit artifact entry).
|
|
305
303
|
Update decomposition (add/remove/reorder remaining slices) and confirm before continuing.
|
|
306
304
|
|
|
307
|
-
|
|
305
|
+
### Step 8: Integration Verification
|
|
308
306
|
|
|
309
307
|
After all slices are complete, review cross-slice consistency:
|
|
310
308
|
|
|
@@ -321,7 +319,7 @@ After all slices are complete, review cross-slice consistency:
|
|
|
321
319
|
|
|
322
320
|
3. **Confirm using the `ask_user_question` tool**. Question: "{N} slices complete, {M} files total. Cross-slice consistency verified. Proceed to design artifact?". Header: "Verify". Options: "Proceed (Recommended)" (Finalize the design artifact (verify completeness, update status)); "Revisit slice" (Reopen a specific slice for revision — Edit the artifact after); "Add missing" (A file or integration point is missing — add to artifact).
|
|
323
321
|
|
|
324
|
-
|
|
322
|
+
### Step 9: Finalize Design Artifact
|
|
325
323
|
|
|
326
324
|
The artifact was created as a skeleton in Step 6 and filled progressively in Step 7d. This step verifies completeness and finalizes.
|
|
327
325
|
|
|
@@ -337,7 +335,7 @@ The artifact was created as a skeleton in Step 6 and filled progressively in Ste
|
|
|
337
335
|
- **NEW files**: `### path/to/file.ext — NEW` + one-line purpose + full implementation code block
|
|
338
336
|
- **MODIFY files**: `### path/to/file.ext:line-range — MODIFY` + code block with only the modified/added code (no "Current" block — the original is on disk, implement reads it)
|
|
339
337
|
|
|
340
|
-
|
|
338
|
+
### Step 10: Review & Iterate
|
|
341
339
|
|
|
342
340
|
1. **Present the design artifact location**:
|
|
343
341
|
```
|
|
@@ -361,7 +359,7 @@ The artifact was created as a skeleton in Step 6 and filled progressively in Ste
|
|
|
361
359
|
> 🆕 Tip: start a fresh session with `/new` first — chained skills work best with a clean context window.
|
|
362
360
|
```
|
|
363
361
|
|
|
364
|
-
|
|
362
|
+
### Step 11: Handle Follow-ups
|
|
365
363
|
|
|
366
364
|
- **Edit in-place.** Use the Edit tool to update the design artifact directly — sliced design code stays one source of truth.
|
|
367
365
|
- **Bump frontmatter.** Update `last_updated` + `last_updated_by`; set `last_updated_note: "Updated <brief description>"`.
|