@juicesharp/rpiv-pi 2.0.0 → 2.2.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/README.md +121 -271
- package/agents/scope-tracer.md +1 -1
- package/docs/agents.md +70 -0
- package/docs/architecture.md +136 -0
- package/docs/lanes.md +82 -0
- package/docs/models-config.md +200 -0
- package/docs/skills.md +86 -0
- package/docs/workflows.md +109 -0
- package/extensions/rpiv-core/bash-timeout.ts +16 -0
- package/extensions/rpiv-core/built-in-workflows.ts +2363 -278
- package/extensions/rpiv-core/guidance.ts +35 -19
- package/extensions/rpiv-core/lane-list.ts +5 -29
- package/extensions/rpiv-core/lane-progress.ts +5 -76
- package/extensions/rpiv-core/models-config.ts +35 -0
- package/extensions/rpiv-core/run-lane-registry.ts +0 -65
- package/extensions/rpiv-core/sdk-workflow-host.ts +4 -0
- package/extensions/rpiv-core/workflow-execution-host.ts +24 -7
- package/package.json +7 -3
- package/skills/amend/SKILL.md +7 -3
- package/skills/annotate-guidance/SKILL.md +2 -3
- package/skills/annotate-inline/SKILL.md +1 -3
- package/skills/architecture-review/SKILL.md +5 -4
- package/skills/blueprint/SKILL.md +14 -6
- package/skills/changelog/SKILL.md +1 -0
- package/skills/commit/SKILL.md +1 -0
- package/skills/design/SKILL.md +8 -5
- package/skills/design-review/SKILL.md +2 -1
- package/skills/design-slice/SKILL.md +2 -1
- package/skills/discover/SKILL.md +3 -4
- package/skills/elaborate/SKILL.md +17 -5
- package/skills/elaborate/_helpers/validate-workflow-invariant.mjs +88 -0
- package/skills/explore/SKILL.md +1 -0
- package/skills/frontend-design/SKILL.md +1 -0
- package/skills/grade/SKILL.md +20 -3
- package/skills/implement/SKILL.md +10 -2
- package/skills/plan/SKILL.md +10 -6
- package/skills/research/SKILL.md +14 -12
- package/skills/resume-handoff/SKILL.md +2 -1
- package/skills/revise/SKILL.md +1 -0
- package/skills/slice/SKILL.md +3 -2
- package/skills/synthesize/SKILL.md +16 -7
- package/skills/validate/SKILL.md +2 -1
package/skills/research/SKILL.md
CHANGED
|
@@ -137,20 +137,21 @@ Findings go into Precedents & Lessons. Otherwise skip and note "git history unav
|
|
|
137
137
|
- Prioritize live codebase findings as primary source of truth
|
|
138
138
|
- Use `.rpiv/artifacts/` findings as supplementary historical context
|
|
139
139
|
- Include specific file paths and line numbers
|
|
140
|
-
- **Every `file:line` you emit must be VERIFIABLE against the file at this revision.** Before writing a citation, confirm the file exists and the cited line (or range end) is within it — cite what you actually read, never a remembered or guessed range. If you cannot verify a line number, cite the file path alone and omit the `:line`. Write paths **relative to the repo root** (`packages/billing/src/invoice.ts:
|
|
140
|
+
- **Every `file:line` you emit must be VERIFIABLE against the file at this revision.** Before writing a citation, confirm the file exists and the cited line (or range end) is within it — cite what you actually read, never a remembered or guessed range. If you cannot verify a line number, cite the file path alone and omit the `:line`. Write paths **relative to the repo root** (`packages/billing/src/invoice.ts:NN` — not the subdirectory-relative `src/invoice.ts:NN`, nor the bare `invoice.ts:NN`) — downstream artifacts inherit your citation form. A fabricated `file:line` (a range that matches no version of the file) propagates unbacked precision downstream — when the build workflow consumes this research, the slice map that rests on it fails the deterministic citation check at the `slice-check` gate, so an invented citation only bounces the flow.
|
|
141
141
|
- Build Code References as jump-table entries for the planner, not narrative (file:startLine-endLine format)
|
|
142
142
|
- No multi-line code blocks (>3 lines) — use file:line refs + prose. No implementation recipes — facts only.
|
|
143
143
|
- No artifact summaries — link plans/designs in Historical Context, don't summarize their contents. Research describes current codebase state.
|
|
144
144
|
|
|
145
145
|
2. **Developer checkpoint — grounded questions one at a time:**
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
- Every ambiguity checkpoint MUST be self-contained: state observed behavior, at least one `file:line` evidence reference, why the decision matters, and 2-4 concrete decision options in the question or option descriptions.
|
|
148
|
+
Start with grounded questions referencing real findings with `file:line` evidence. Ask ONE question at a time, waiting for the answer before the next. Use a **❓ Question:** prefix. Each question must pull NEW information from the developer — not confirm what you already found:
|
|
148
149
|
|
|
149
150
|
Every question MUST embed at least one `file:line` reference in the question text — not just in surrounding context. Examples:
|
|
150
151
|
|
|
151
|
-
- "❓ Question: `src/events/orders.ts:
|
|
152
|
-
- "❓ Question: Pattern-finder found manual mapping at `src/services/OrderService.ts:
|
|
153
|
-
- "❓ Question: Precedent commit `abc123` required a follow-up fix at `src/handlers/key.ts:
|
|
152
|
+
- "❓ Question: `src/events/orders.ts:NN-NN` has 3 event hooks but no error recovery path. Is there a retry mechanism elsewhere I'm not seeing?"
|
|
153
|
+
- "❓ Question: Pattern-finder found manual mapping at `src/services/OrderService.ts:NN` (8 uses) vs AutoMapper at `src/services/UserService.ts:NN` (2 uses). Which should new code follow?"
|
|
154
|
+
- "❓ Question: Precedent commit `abc123` required a follow-up fix at `src/handlers/key.ts:NN` for connection leak. Should we account for that pattern in this design?"
|
|
154
155
|
|
|
155
156
|
Anti-patterns — NEVER ask these:
|
|
156
157
|
- "Is this research to understand X or prepare for Y?" — confirmatory, pulls zero new information
|
|
@@ -162,21 +163,22 @@ Findings go into Precedents & Lessons. Otherwise skip and note "git history unav
|
|
|
162
163
|
- **Pattern conflict**: "Found 2 implementations of {X} — which is canonical?" with options citing `file:line` + occurrence count
|
|
163
164
|
- **Scope boundary**: "Question {N} references files {A,B,C} but analysis shows {D} is the real integration point. Extend scope?" with yes/no + "describe what I missed"
|
|
164
165
|
- **Priority override**: "Questions Q1 and Q2 have competing implications for {area}. Which is load-bearing?" with options
|
|
165
|
-
- **Integration ambiguity**: "Found no connection between {X} and {Y}.
|
|
166
|
+
- **Integration ambiguity**: "Found no connection between {X} and {Y} at `file:line`. This leaves {impact}. Should the feature wire through {A} or {B}?" — use `ask_user_question`; the automatically appended `Type something.` row captures unexpected custom input.
|
|
166
167
|
|
|
167
168
|
**Choosing question format:**
|
|
168
169
|
|
|
169
|
-
- **`ask_user_question` tool** — when your question has 2-4 concrete options from code analysis (pattern conflicts, integration choices, scope boundaries, priority overrides). The
|
|
170
|
+
- **`ask_user_question` tool** — when your question has 2-4 concrete options from code analysis (pattern conflicts, integration choices, scope boundaries, priority overrides). The automatically appended `Type something.` row captures custom input. Example:
|
|
170
171
|
|
|
171
|
-
>
|
|
172
|
+
> `Header` is capped at ≤16 characters (`MAX_HEADER_LENGTH = 16` — longer values are rejected).
|
|
173
|
+
> Use the `ask_user_question` tool with the following question: "Found 2 patterns for retry logic — which is canonical?". Header: "Pattern". Options: "Event-sourced retry (Recommended)" (`src/events/orders.ts:NN-NN` — 3 hooks, matches precedent commit `abc123`); "Direct retry loop" (`src/services/OrderService.ts:NN` — single use, no event traceability).
|
|
172
174
|
|
|
173
|
-
- **Open-ended** (discovery, "what am I missing?", corrections) — still `ask_user_question`;
|
|
175
|
+
- **Open-ended** (discovery, "what am I missing?", corrections) — still use `ask_user_question`; supply 2-4 concrete hypotheses with behavior, `file:line` evidence, impact, and decision context, then let the automatic `Type something.` row capture unanticipated detail.
|
|
174
176
|
|
|
175
177
|
**Anti-pattern** — do NOT dump a verbose paragraph mixing analysis with a trailing question:
|
|
176
178
|
|
|
177
179
|
❌ "The premise inversion is load-bearing for prioritization — it means Site A is a no-op, and the real bloat only hits general-purpose dispatches. Given this, where is the bloat actually landing? Do your skills dispatch named bundled agents — in which case append-mode is irrelevant — or general-purpose — in which case it IS the dominant source?"
|
|
178
180
|
|
|
179
|
-
✅ Extract the 2 concrete options and call `ask_user_question`: "Where is the prompt bloat landing?". Header: "Bloat source". Options: "Named bundled agents (Recommended)" (Skills dispatch `codebase-analyzer` etc. — `prompt_mode: "replace"`, no parent inheritance); "General-purpose agent" (`default-agents.ts:
|
|
181
|
+
✅ Extract the 2 concrete options and call `ask_user_question`: "Where is the prompt bloat landing?". Header: "Bloat source". Options: "Named bundled agents (Recommended)" (Skills dispatch `codebase-analyzer` etc. — `prompt_mode: "replace"`, no parent inheritance); "General-purpose agent" (`default-agents.ts:NN-NN` — `promptMode: "append"`, inherits full parent prompt).
|
|
180
182
|
|
|
181
183
|
**Batching**: When you have 2-4 independent questions (answers don't depend on each other), you MAY batch them in a single `ask_user_question` call. Keep dependent questions sequential.
|
|
182
184
|
|
|
@@ -261,8 +263,8 @@ Findings go into Precedents & Lessons. Otherwise skip and note "git history unav
|
|
|
261
263
|
...
|
|
262
264
|
|
|
263
265
|
## Code References
|
|
264
|
-
- `path/to/file.py:
|
|
265
|
-
- `another/file.ts:
|
|
266
|
+
- `path/to/file.py:NN` — Description of what's there
|
|
267
|
+
- `another/file.ts:NN-NN` — Description of the code block
|
|
266
268
|
|
|
267
269
|
## Integration Points
|
|
268
270
|
{All connections to the researched area. Enumerate each consumer, dependency, and wiring point with file:line. Source from the questions artifact's Discovery Summary + new connections found by analysis agents.}
|
|
@@ -49,7 +49,7 @@ When this command is invoked:
|
|
|
49
49
|
2. **If no parameters provided**, branch on the `recent handoffs:` listing in the Metadata block:
|
|
50
50
|
- **Empty** — no handoffs exist; tell the user and ask for a path in prose.
|
|
51
51
|
- **Exactly one entry** — confirm with `ask_user_question`: "Resume this handoff?" with options "Resume `<filename>` (Recommended)" and "Pick a different path". Do NOT call `ask_user_question` with a single option (the tool requires ≥2).
|
|
52
|
-
- **Two or more entries** — present the top 4 filenames as `ask_user_question` options
|
|
52
|
+
- **Two or more entries** — present the top 4 filenames as `ask_user_question` options. The tool automatically appends a `Type something.` free-text row; do not list it manually.
|
|
53
53
|
|
|
54
54
|
Direct invocation alternative: `/skill:resume-handoff .rpiv/artifacts/handoffs/<filename>`
|
|
55
55
|
|
|
@@ -122,6 +122,7 @@ When this command is invoked:
|
|
|
122
122
|
|
|
123
123
|
```
|
|
124
124
|
|
|
125
|
+
`Header` is capped at ≤16 characters (`MAX_HEADER_LENGTH = 16` — longer values are rejected).
|
|
125
126
|
Use the `ask_user_question` tool to confirm the approach. Question: "{Summary of recommended next action}. Proceed?". Header: "Resume". Options: "Proceed (Recommended)" (Begin with {recommended action 1}); "Adjust approach" (Change the order or scope of next steps); "Re-analyze" (The codebase has changed — re-verify state first).
|
|
126
127
|
|
|
127
128
|
### Step 4: Create Action Plan
|
package/skills/revise/SKILL.md
CHANGED
|
@@ -155,6 +155,7 @@ I plan to update the plan by:
|
|
|
155
155
|
Does this align with your intent?
|
|
156
156
|
```
|
|
157
157
|
|
|
158
|
+
`Header` is capped at ≤16 characters (`MAX_HEADER_LENGTH = 16` — longer values are rejected).
|
|
158
159
|
Use the `ask_user_question` tool to confirm before editing. Question: "{Summary of planned modifications}. Proceed with these edits?". Header: "Changes". Options: "Proceed (Recommended)" (Apply the planned changes to the existing plan); "Adjust approach" (Modify what will be changed before editing); "Show me first" (Show the exact text changes before applying).
|
|
159
160
|
|
|
160
161
|
### Step 4: Update the Plan
|
package/skills/slice/SKILL.md
CHANGED
|
@@ -90,9 +90,10 @@ A vertical slice is a coherent, independently-buildable capability that cuts thr
|
|
|
90
90
|
## Steps
|
|
91
91
|
|
|
92
92
|
1. **Input.** Read the research path FULLY (no limit/offset) and read the key source files it cites — these are your grounding. A missing, empty, or non-research argument is a dispatch error: print an error and stop (the workflow runs `research` before `slice`, so a research artifact is always available).
|
|
93
|
-
2. **Decompose.** Identify the capabilities the work delivers, then group them into independent vertical slices —
|
|
94
|
-
3. **Resolve ambiguity.** Settle from the research/code wherever you can. When a genuine decomposition fork remains (e.g. "
|
|
93
|
+
2. **Decompose.** Identify the capabilities the work delivers, then group them into independent vertical slices by **mechanism, not by location** — a shared package, file, or subsystem is never itself a reason to group two units; one mechanism may claim many coverage units, or one, and unit count is not the test. First enumerate the brief's **coverage units** — the distinct observable outcomes it asks for, each with a short stable `id` (`c1`, `c2`, …) and a one-line `brief` — then assign every unit to the slice(s) that deliver it via each slice's `covers:`, so every unit is claimed by at least one slice. Every slice's `Draws on:` cites a real `file:line` from the research read in Step 1 — write the **repo-root-relative path** (`packages/billing/src/invoice.ts:NN`), never a subdirectory-relative form (`src/invoice.ts:NN`) or a bare basename (`invoice.ts:NN`): in the build workflow the deterministic `slice-check` floor verifies every citation, and an ambiguous or unresolvable path fails the gate and forces a re-slice loop.
|
|
94
|
+
3. **Resolve ambiguity.** Settle from the research/code wherever you can. When a genuine decomposition fork remains (e.g. "is this finding in scope for the brief, or deferred?"), use `ask_user_question` with 2–4 concrete options — **one at a time**, wait for the answer. **Granularity is not such a fork** — how finely to cut is settled by the `design-readiness` rubric, not by the developer; never offer "N vs M slices" options.
|
|
95
95
|
4. **Confirm the decomposition.** Once, before writing: `ask_user_question` — "{N} slices for {topic}. Slice 1: {name}. Slices 2–N: {brief}. Approve?". Header "Slices". Options: "Approve (Recommended)" (write the map); "Adjust slices" (reorder/merge/split); "Change scope" (add/remove). Apply the answer, then write.
|
|
96
|
+
- `Header` is capped at ≤16 characters (`MAX_HEADER_LENGTH = 16` — longer values are rejected).
|
|
96
97
|
5. **Write the slice map** (below) with `status: ready`.
|
|
97
98
|
6. **Print the path**, then a one-line summary: `<N> slices: <comma-separated titles>`.
|
|
98
99
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: synthesize
|
|
3
3
|
description: Merge N independent per-slice designs (plus the research they rest on) into ONE coherent phased plan in .rpiv/artifacts/plans/ — reconciling cross-slice overlaps, wiring inter-slice integration, and ordering phases by slice dependencies. Single-pass, no subagents, no self-review. The fan-in barrier of a fanout-and-synthesize flow — one phase per slice, plan-compatible so implement/validate consume it unchanged. For large slice maps it also runs hierarchically — as a per-cluster partial (`--as-subplan` turns designs into a subplan) and as the root merge (`--subplans` turns subplans into a plan) — so no single pass must hold every design at once. Use after a per-slice design fanout.
|
|
4
|
-
argument-hint: "--designs <path>... [--research <path>] [--as-subplan] | --subplans <path>... [--research <path>]"
|
|
4
|
+
argument-hint: "--designs <path>... [--research <path>] [--as-subplan] [--cluster <k>] | --subplans <path>... [--research <path>]"
|
|
5
5
|
allowed-tools: Read, Grep, Glob, Write
|
|
6
6
|
shell-timeout: 10
|
|
7
7
|
disable-model-invocation: true
|
|
@@ -57,6 +57,7 @@ You merge several independent per-slice designs into **one coherent phased plan*
|
|
|
57
57
|
- `--subplans <path>` **(repeats)** — partial sub-plans from a cluster fanout (root mode).
|
|
58
58
|
- `--research <path>` *(optional)* — the research the slices rest on, for cross-slice constraints.
|
|
59
59
|
- `--as-subplan` *(flag)* — emit a **sub-plan** (partial mode) instead of a full plan.
|
|
60
|
+
- `--cluster <k>` *(optional, partial mode)* — the ordinal written into the sub-plan's `_cluster-<k>.md` filename. The cluster fanout supplies it; for manual partial invocation pick an unused `<k>` (scan `.rpiv/artifacts/subplans/` for existing `*_cluster-<k>.md` and take the next unused positive integer) so a re-dispatched pass writes a distinct file and never clobbers a sibling sub-plan.
|
|
60
61
|
|
|
61
62
|
If neither `--designs` nor `--subplans` is present, print an error and stop.
|
|
62
63
|
|
|
@@ -91,8 +92,11 @@ Copy values verbatim. `<iso>` is the first tab-separated field; `<slug>` is the
|
|
|
91
92
|
- **Overlap** — when two inputs touch the same file/symbol, merge them into a single coherent change (or split into ordered phases) rather than emitting contradictory edits.
|
|
92
93
|
- **Integration** — wire the seams: an input that depends on another's interface must reference the real shape the other defines. In root mode, this is where each sub-plan's `exports` get connected.
|
|
93
94
|
- **Conflict** — when two inputs make incompatible decisions, resolve to one, and record the resolution in Synthesis Notes (the grade panel's correctness/architecture-fit members will check it).
|
|
94
|
-
- **Risk flags** — a decision you're not confident is correct (an unverified assumption, an edge case wanting a second opinion) goes in the frontmatter `risks:` array as a `{ id, claim }` entry (stable `id`; `claim` = the one-line assertion to rule on) plus a `## Risk Flags` line — **never** buried in prose. This is the first-class channel grade and validate are REQUIRED to rule on; flag anything you'd otherwise write "flagging this so the grade panel can weigh in" about.
|
|
95
|
-
|
|
95
|
+
- **Risk flags** — a decision you're not confident is correct (an unverified assumption, an edge case wanting a second opinion) goes in the frontmatter `risks:` array as a `{ id, claim }` entry (stable `id`; `claim` = the one-line assertion to rule on) plus a `## Risk Flags` line — **never** buried in prose. This is the first-class channel grade and validate are REQUIRED to rule on; flag anything you'd otherwise write "flagging this so the grade panel can weigh in" about. Two optional fields tighten what "passing" means, so the gate can refuse a confident-but-ungrounded assertion (the a777 honest-lazy class):
|
|
96
|
+
- **`claim_type: mechanics`** — the `claim` asserts a verified mechanism (a behavior that holds because code was checked). A grade panel ruling it `pass` MUST cite the checked `file:line` in that ruling's `evidence`, else the gate demotes the pass as un-grounded. Use it for risks like "the revert is byte-identical" or "the helper no-ops on absent fields" where the assertion is checkable against code right now.
|
|
97
|
+
- **`disposition: verify-at-implement`** — the panel may defer the risk to a later phase rather than rule it in this panel. A deferred pass is accepted ONLY when the flag ALSO carries a concrete **`procedure`** (the named command/test the owner phase runs to discharge it) and an **`owner`** (the phase `n` that runs that step); a bare "verify later" with no procedure demotes. Use it for risks that genuinely need the shipped tree (a real `build` run, a coverage gate) the plan-grade panel cannot run.
|
|
98
|
+
- Default (no `claim_type`, no `disposition`) stays the ordinary `{ id, claim }` shape — the panel rules it on the artifact as today, with no evidence or procedure duty.
|
|
99
|
+
3. **Sequence phases** — one phase per slice (flat/partial) or carry the sub-plans' phases through (root), ordered so a phase never precedes one it `depends_on`. Tightly-coupled units may merge into one phase; note any merge. Populate each entry's `files:` from that phase's `### Changes` paths (every repo-root-relative path the phase creates or edits) and `depends_on` only for semantic ordering NOT visible in `files:` (a phase that needs an earlier phase to run first despite no shared file) — lower `n` only.
|
|
96
100
|
4. **Write the output** (below), `status: ready`:
|
|
97
101
|
- **Flat / root** → a standard **plan** in `.rpiv/artifacts/plans/` — phases with concrete changes and Success Criteria that pass through unchanged to `implement`/`validate`.
|
|
98
102
|
- **Partial** (`--as-subplan`) → a **sub-plan** in `.rpiv/artifacts/subplans/` — the same phase shape PLUS a `summary` and an `exports` block naming the seams (files/symbols/interfaces this cluster owns) the root will wire other clusters into. Keep it compact: the root reads it instead of your cluster's designs.
|
|
@@ -103,7 +107,7 @@ This skill is **non-interactive**: when a conflict can't be cleanly resolved, ma
|
|
|
103
107
|
## Output document
|
|
104
108
|
|
|
105
109
|
**Flat / root mode** → Path: `.rpiv/artifacts/plans/<slug>_<topic>.md`.
|
|
106
|
-
**Partial mode** (`--as-subplan`) → Path: `.rpiv/artifacts/subplans/<slug>_cluster-<k>.md
|
|
110
|
+
**Partial mode** (`--as-subplan`) → Path: `.rpiv/artifacts/subplans/<slug>_cluster-<k>.md` — `<k>` is the verbatim `--cluster <k>` value (the cluster fanout always supplies it; for manual partial invocation pick an unused `<k>`: scan `.rpiv/artifacts/subplans/` for existing `*_cluster-<k>.md` and take the next unused positive integer, so a re-dispatched pass never clobbers a sibling sub-plan). Same body shape plus a `summary:` scalar and an `exports:` list in frontmatter, e.g.:
|
|
107
111
|
|
|
108
112
|
```yaml
|
|
109
113
|
summary: "<one-paragraph what this cluster delivers>"
|
|
@@ -125,10 +129,12 @@ topic: "<topic>"
|
|
|
125
129
|
status: ready
|
|
126
130
|
phase_count: <N>
|
|
127
131
|
phases:
|
|
128
|
-
- { n: 1, title: "<title>", slice: 1 }
|
|
129
|
-
- { n: 2, title: "<title>", slice: 2 }
|
|
132
|
+
- { n: 1, title: "<title>", slice: 1, files: ["path/to/file.ts"], depends_on: [] }
|
|
133
|
+
- { n: 2, title: "<title>", slice: 2, files: ["path/to/other.ts"], depends_on: [1] }
|
|
130
134
|
risks:
|
|
131
135
|
- { id: r1, claim: "<a decision you want the grade panel + validate to rule on>" }
|
|
136
|
+
- { id: r2, claim: "<a checkable mechanism>", claim_type: mechanics }
|
|
137
|
+
- { id: r3, claim: "<needs the shipped tree to discharge>", disposition: verify-at-implement, procedure: "<named command/test>", owner: <phase n> }
|
|
132
138
|
sources: [<each --designs path>, <--research path>]
|
|
133
139
|
tags: [plan, synthesized]
|
|
134
140
|
---
|
|
@@ -160,6 +166,9 @@ tags: [plan, synthesized]
|
|
|
160
166
|
## Hard rules
|
|
161
167
|
|
|
162
168
|
- Exactly one `## Phase N:` heading per `phases:` entry; `phase_count` == array length == heading count. Number `n` contiguously `1..N`.
|
|
163
|
-
-
|
|
169
|
+
- **`files:` contract.** Every path a phase creates or edits MUST be listed in that phase's `files:` array (repo-root-relative, never a bare basename) — the same floor-backing reason body citations carry: the plan-time coverage floor (`plan-cite-check`/`code-cite-check`) flags a body edit path absent from `files:`, and a later dep-gated implement fanout derives phase edges from `files:` overlap. A `files:`-less entry degrades to "no check" (legacy-safe), but a `synthesize` plan always declares `files:`.
|
|
170
|
+
- **Write-scope rule (per-phase, mandatory before parallel implement).** Every command in a phase's `#### Automated Verification:` block must be **write-scoped to that phase's own `files:` set** — running it must not modify anything outside the phase's `files:`. Phases run concurrently under build's parallel implement lane, so a command that rewrites the wider tree corrupts a sibling phase's in-flight edit; narrow any formatter or auto-fixer to the phase's paths (take the project's command vocabulary from its guidance `# Commands` table — where the table gives only an unscoped form, narrow it to the phase's paths rather than substituting a different tool). Read-only repo-wide commands (a type check, a non-fixing lint, a scoped test selection) are permitted. Whole-repo build/test verification belongs to the plan's final whole-plan block, owned by `validate` — never to a phase.
|
|
171
|
+
- **Exit-0 contract (the `reconcile` stage re-runs AV lines verbatim).** After implement, `reconcile` re-executes the FIRST backtick span of every `- [ ]` line in `#### Automated Verification:` via `execFileSync` — arg-array (no shell: no `|`/`&&`/redirection), stdin ignored, exit 0 the ONLY pass signal. Prose around the span never executes, and a non-zero exit halts the run with no fix arm. So every AV line must be ONE self-contained command that exits 0 exactly when the criterion holds: name the target file INSIDE the span (never "over `<file>`" in prose — the command then greps an empty stdin and always fails); never assert absence ("returns nothing" — grep exits 1 on no match, so that line can ONLY fail; restate it to exit 0 on success, e.g. a `node -e` probe that inverts the check, or move it to `#### Manual Verification:`); never rely on prose expected counts ("returns `4`" — fold the assertion into the command itself); never point a formatter at paths outside its configured scope (Biome on a doc-only phase's `.md` exits non-zero with "No files were processed"). The `plan-cite-check`/`code-cite-check` floor lints these shapes and routes violations into a plan-fix round; anything it cannot catch statically still kills the run at `reconcile`.
|
|
164
172
|
- **Plan-compatible output.** Phases + Success Criteria in the standard plan shape so `implement` and `validate` consume it with no changes.
|
|
165
173
|
- **No subagents. No self-review. No questions.** Merge, record open risks in Synthesis Notes, write.
|
|
174
|
+
- **`sources:` lists every `--designs` path.** In partial mode especially (each cluster sub-plan lists its own `--designs` paths), the frontmatter `sources:` array MUST contain every `--designs <path>` the orchestrator threaded in — and the `--research` path when given. Omitting one hides a slice from the `subplan-check` cluster-coverage floor, which reconciles dispatched sub-plans against the slice map by reading `sources:` (a design whose slice appears in no sub-plan's `sources:` routes the whole cluster fanout back to a re-dispatch). Mirror the plan template's `sources: [<each --designs path>, <--research path>]` exactly.
|
package/skills/validate/SKILL.md
CHANGED
|
@@ -62,7 +62,7 @@ When invoked:
|
|
|
62
62
|
- Otherwise, branch on the `recent plans:` listing in the Metadata block:
|
|
63
63
|
- **Empty** — no plans under `.rpiv/artifacts/plans/`; ask the user for a path in prose.
|
|
64
64
|
- **Exactly one entry** — confirm with `ask_user_question`: "Validate this plan?" with options "Validate `<filename>` (Recommended)" and "Pick a different path".
|
|
65
|
-
- **Two or more entries** — present the top 4 filenames as `ask_user_question` options
|
|
65
|
+
- **Two or more entries** — present the top 4 filenames as `ask_user_question` options. The tool automatically appends a `Type something.` free-text row; do not list it manually.
|
|
66
66
|
|
|
67
67
|
3. **Read the implementation plan** completely
|
|
68
68
|
|
|
@@ -131,6 +131,7 @@ For each phase in the plan:
|
|
|
131
131
|
7. **Rule every plan risk flag** (when the plan carries a `risks:` frontmatter array):
|
|
132
132
|
- The plan's `risks:` array (each `{ id, claim }`, described under `## Risk Flags`) is the structured channel of decisions the planner asked to have checked. You are REQUIRED to rule on each one against the actual implementation — not skip it.
|
|
133
133
|
- For each flag, verify its `claim` against the delivered code (Read/Grep the relevant `file:line`) and record a `risk_rulings: [{ id, pass }]` entry — `pass: true` when the risk is unfounded or handled, `pass: false` when it is real and unaddressed in the shipped code.
|
|
134
|
+
- **For a `disposition: verify-at-implement` flag**, do not just Read/Grep — RUN its declared `procedure` (the named command/test the plan's `owner` phase promised) against the shipped code and rule `pass: false` if that procedure fails. This is the phase that discharges the deferral the plan-grade panel accepted on trust; a deferred risk whose procedure now fails is exactly the un-addressed-defect class this gate catches. A mechanics (`claim_type: mechanics`) flag is verified against its shipped `file:line` as above.
|
|
134
135
|
- **Any `pass: false` ruling forces `verdict: fail`** and is reported under **Potential Issues**, quoting the flag's claim. A flagged risk that shipped unaddressed is exactly the class of defect this gate exists to catch.
|
|
135
136
|
|
|
136
137
|
### Step 3: Write the Validation Report
|