@juicesharp/rpiv-pi 2.6.3 → 2.6.4
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/docs/workflows.md
CHANGED
|
@@ -49,7 +49,7 @@ code is elaborated into it. Three automated gates plus one human checkpoint.
|
|
|
49
49
|
|
|
50
50
|
`goal → research → plan → plan-cite-check → grade → implement → implement-scope-check → reconcile → validate → commit`
|
|
51
51
|
|
|
52
|
-
Ship a small, well-understood task in one lightweight forward pass. The verbatim brief is the goal artifact; a trimmed research stage (at most two `codebase-analyzer` dispatches — not a full `/skill:research` pass) grounds a single unsliced plan from `quick-plan`, which receives the verbatim goal alongside the research doc and must explicitly defer any goal ask it narrows out; a deterministic citation floor and one tier-independent three-dimension grade (correctness, completeness, architecture-fit — architecture-fit cannot be dropped from a light roster) gate the plan before `implement`. The citation floor stops the run only on a
|
|
52
|
+
Ship a small, well-understood task in one lightweight forward pass. The verbatim brief is the goal artifact; a trimmed research stage (at most two `codebase-analyzer` dispatches — not a full `/skill:research` pass) grounds a single unsliced plan from `quick-plan`, which receives the verbatim goal alongside the research doc and must explicitly defer any goal ask it narrows out; a deterministic citation floor and one tier-independent three-dimension grade (correctness, completeness, architecture-fit — architecture-fit cannot be dropped from a light roster) gate the plan before `implement`. The citation floor stops the run only on a phase body edit missing from its `files:` declaration (an undeclared write corrupts implement's dependency derivation); every citation-resolution finding — unresolved path, ambiguity, line drift — is advisory (recorded on the verdict, severity `low`) and rides to the grade panel, whose correctness unit receives the floor's verdict as `--cite-check` and adjudicates each finding by symbol instead of the run dying over a resolver limitation. Every gate is stop-on-fail — no fix loops, confirm panels, snapshots, or code-elaboration lane — and a red gate surfaces as `stopped at <gate>: <reason>` in the end-of-run toast and lane recap (never a ✓); a goal-anchored `validate` judges the landing before `commit`. Best for tasks small enough to plan in one pass; prefer `build` for anything needing decomposition.
|
|
53
53
|
|
|
54
54
|
## Review loops
|
|
55
55
|
|
|
@@ -1046,14 +1046,11 @@ const sliceCovers = (entry: Record<string, unknown>): string[] => {
|
|
|
1046
1046
|
* `allDimensionsPass` severity floor rides through, so citation-resolution
|
|
1047
1047
|
* findings are recorded on the trail — and handed to the ship grade panel via
|
|
1048
1048
|
* `--cite-check` for symbol-level adjudication — but never stop a run. The
|
|
1049
|
-
* run-history audit forced this:
|
|
1050
|
-
*
|
|
1051
|
-
*
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1054
|
-
* severity on the shared structure verdict comes ONLY from
|
|
1055
|
-
* `verifyPhaseFilesCoverage` (an undeclared write corrupts dep derivation —
|
|
1056
|
-
* that floor stays load-bearing).
|
|
1049
|
+
* run-history audit forced this: three months of flagged paths held zero
|
|
1050
|
+
* fabrications, while blocking on them cost hours of fix rounds and dead runs
|
|
1051
|
+
* (details in the 2.6.x changelog). Blocking severity on the shared structure
|
|
1052
|
+
* verdict comes ONLY from `verifyPhaseFilesCoverage` (an undeclared write
|
|
1053
|
+
* corrupts dep derivation — that floor stays load-bearing).
|
|
1057
1054
|
*/
|
|
1058
1055
|
/** Trees a citation must never resolve INTO — vendored deps, build copies, or
|
|
1059
1056
|
* prior pipeline artifacts (a stale artifact copy would back a fabricated line).
|
|
@@ -1104,10 +1101,8 @@ const buildBasenameIndex = (cwd: string): BasenameIndex => {
|
|
|
1104
1101
|
for (const e of listDir(dir)) {
|
|
1105
1102
|
if (e.isDirectory()) {
|
|
1106
1103
|
if (!CITATION_WALK_SKIP.has(e.name)) stack.push(join(dir, e.name));
|
|
1107
|
-
//
|
|
1108
|
-
//
|
|
1109
|
-
// under it is a first-class citation target the pipeline itself
|
|
1110
|
-
// edits — carve it back into the walk (missing dir ⇒ empty listing).
|
|
1104
|
+
// The guidance carve-out — see CITATION_WALK_SKIP's note. A missing
|
|
1105
|
+
// guidance dir degrades to an empty listing.
|
|
1111
1106
|
else if (e.name === ".rpiv") stack.push(join(dir, e.name, "guidance"));
|
|
1112
1107
|
continue;
|
|
1113
1108
|
}
|
|
@@ -1326,14 +1321,11 @@ const verifyCitations = (body: string, cwd: string, declared?: ReadonlySet<strin
|
|
|
1326
1321
|
let abs = resolved?.abs;
|
|
1327
1322
|
if (abs === undefined && declared !== undefined) {
|
|
1328
1323
|
// Declared-write-set rescue on a NO-MATCH resolution — the ambiguity
|
|
1329
|
-
// tiebreak's missing twin
|
|
1330
|
-
//
|
|
1331
|
-
//
|
|
1332
|
-
//
|
|
1333
|
-
//
|
|
1334
|
-
// disk; a declared file ABSENT from the tree is a planned CREATE — the
|
|
1335
|
-
// citation is a forward reference to planned content, unverifiable at
|
|
1336
|
-
// this revision, so it yields no finding.
|
|
1324
|
+
// tiebreak's missing twin. A unique whole-segment suffix match inside
|
|
1325
|
+
// the plan's own `files:` names the file the author means: verify
|
|
1326
|
+
// against it when it exists on disk; a declared file ABSENT from the
|
|
1327
|
+
// tree is a planned CREATE — the citation is a forward reference to
|
|
1328
|
+
// planned content, unverifiable at this revision, so no finding.
|
|
1337
1329
|
const matches = [...declared].filter((d) => d === path || `/${d}`.endsWith(`/${path}`));
|
|
1338
1330
|
if (matches.length === 1) {
|
|
1339
1331
|
const cand = join(cwd, matches[0]);
|
|
@@ -1345,10 +1337,8 @@ const verifyCitations = (body: string, cwd: string, declared?: ReadonlySet<strin
|
|
|
1345
1337
|
findings.push({
|
|
1346
1338
|
detail: `Unbacked citation ${key} — the cited file does not exist at this revision. A file:line citation must resolve, or the line numbers must be omitted. Fix the path (repo-root-relative, or node_modules/<pkg>/… for an installed dependency file) or drop the citation.`,
|
|
1347
1339
|
where: key,
|
|
1348
|
-
// Advisory like every citation-resolution finding
|
|
1349
|
-
//
|
|
1350
|
-
// files, and fixture prose — the grade panel adjudicates via
|
|
1351
|
-
// `--cite-check` instead of the floor blocking on it.
|
|
1340
|
+
// Advisory like every citation-resolution finding — see the tier
|
|
1341
|
+
// note in the function header.
|
|
1352
1342
|
advisory: true,
|
|
1353
1343
|
});
|
|
1354
1344
|
continue;
|
|
@@ -1809,10 +1799,9 @@ const EXTENSIONLESS_FILENAME_RE =
|
|
|
1809
1799
|
* with a `:12-30` range appended — carries a line range the bare form rejects).
|
|
1810
1800
|
* Extensionless recognition is allowlist-only (never "any `/`-bearing token"):
|
|
1811
1801
|
* prose like `and/or` must not read as a declared write. The extension is
|
|
1812
|
-
* bounded to 1–5 chars starting with a letter (mirroring
|
|
1813
|
-
*
|
|
1814
|
-
*
|
|
1815
|
-
* coverage finding and a full code-fix round. */
|
|
1802
|
+
* bounded to 1–5 chars starting with a letter (mirroring FILE_LINE_CITATION_RE)
|
|
1803
|
+
* so a dotted IDENTIFIER (`deps.finalize` — an observed false coverage
|
|
1804
|
+
* finding) never reads as a file. */
|
|
1816
1805
|
const isPathLike = (s: string): boolean => {
|
|
1817
1806
|
if (/\s/.test(s)) return false;
|
|
1818
1807
|
if (EXTENSIONLESS_FILENAME_RE.test(s.slice(s.lastIndexOf("/") + 1))) return true;
|
|
@@ -1910,9 +1899,8 @@ const verifyPhaseFilesCoverage = (content: string, who: string, path: string): {
|
|
|
1910
1899
|
// Whole-segment suffix tolerance: a body form citing the file by bare
|
|
1911
1900
|
// basename or partial path (`#### 2. config.ts` for a declared
|
|
1912
1901
|
// `packages/x/config.ts`) is covered by the declaration — exact-match
|
|
1913
|
-
// only
|
|
1914
|
-
// the
|
|
1915
|
-
// floor, the very consumers this floor protects).
|
|
1902
|
+
// only was fixable solely by polluting `files:` with the bare name,
|
|
1903
|
+
// corrupting the very dep derivation this floor protects.
|
|
1916
1904
|
if ([...declared].some((d) => `/${d}`.endsWith(`/${editPath}`) || `/${editPath}`.endsWith(`/${d}`))) continue;
|
|
1917
1905
|
findings.push({
|
|
1918
1906
|
detail: `Phase ${n} names edit path ${editPath} in its body but does not declare it in its frontmatter 'files:' array. Every path a phase creates or edits must be listed in 'files:' (repo-root-relative, never a bare basename) so the plan-time coverage floor and the dep-gated implement fanout see the phase's full write set. Add ${editPath} to phase ${n}'s 'files:' array, or drop the body reference if the write belongs to another phase.`,
|
|
@@ -4151,7 +4139,7 @@ const shipGradeGate: EdgeFn = defineRoute(
|
|
|
4151
4139
|
const shipWorkflow = defineWorkflow({
|
|
4152
4140
|
name: "ship",
|
|
4153
4141
|
description:
|
|
4154
|
-
"Ship, unsliced: capture the verbatim brief as a goal artifact → ground it with at most two targeted codebase-analyzer dispatches (no /skill:research) → one lightweight quick-plan pass → deterministic citation floor (
|
|
4142
|
+
"Ship, unsliced: capture the verbatim brief as a goal artifact → ground it with at most two targeted codebase-analyzer dispatches (no /skill:research) → one lightweight quick-plan pass → deterministic citation floor (files: coverage gaps stop; citation-resolution findings are advisory and adjudicated by the grade panel) → single tier-independent quality gate (correctness/completeness/architecture-fit, stop-on-fail) → implement → implement-scope-check → reconcile → validate → commit. Every gate terminates the run on fail; no fix loops.",
|
|
4155
4143
|
start: "goal",
|
|
4156
4144
|
stages: {
|
|
4157
4145
|
// build's verbatim goal capture — the brief on its own channel, plus the
|
|
@@ -4175,10 +4163,10 @@ const shipWorkflow = defineWorkflow({
|
|
|
4175
4163
|
// explicitly instead of silently inheriting the drop.
|
|
4176
4164
|
plan: produces({ skill: "quick-plan", reads: ["research", "goal"] }),
|
|
4177
4165
|
// Deterministic citation floor BEFORE the LLM gate — build's verifier
|
|
4178
|
-
// verbatim.
|
|
4179
|
-
//
|
|
4180
|
-
//
|
|
4181
|
-
//
|
|
4166
|
+
// verbatim. Only a `files:` coverage gap fails structurally and STOPs the
|
|
4167
|
+
// run; every citation-resolution finding (unresolved path, ambiguity,
|
|
4168
|
+
// drift) is advisory — rates `low`, passes the gate, and reaches the
|
|
4169
|
+
// grade panel's correctness unit as `--cite-check` for adjudication.
|
|
4182
4170
|
"plan-cite-check": produces.script({ reads: ["plans"], run: planCitationCheck("plan-cite-check") }),
|
|
4183
4171
|
// Single PRE-implement grade over the fixed three-dimension roster
|
|
4184
4172
|
// (SHIP_DIMENSION_FANOUT — tier-independent, no confirm/snapshot arms);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juicesharp/rpiv-pi",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"description": "A skill-based development workflow for Pi Agent. 29 contract-carrying skills (discover → research → design → plan → implement → validate → code-review → commit, and more), the 15 named subagents they dispatch, and four built-in /wf workflows that chain them end to end in detached parallel runs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
]
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@juicesharp/rpiv-config": "^2.6.
|
|
53
|
+
"@juicesharp/rpiv-config": "^2.6.4",
|
|
54
54
|
"typebox": "^1.1.24"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
package/skills/grade/SKILL.md
CHANGED
|
@@ -67,7 +67,7 @@ You grade ONE artifact against ONE quality dimension and emit a verdict JSON. Yo
|
|
|
67
67
|
- `--context <path>` *(optional)* — a supporting artifact (e.g. the research doc). **Required for `architecture-fit`.**
|
|
68
68
|
- `--goal <path>` *(optional)* — the user's original brief, captured verbatim at run start. **Read it only for `completeness` and `correctness`** — every other dimension ignores it. Absent, or the file is empty → grade the artifact on its own content as usual.
|
|
69
69
|
- `--prior <path>` *(optional)* — a prior round's verdict JSON for this same `(artifact, dimension)`, passed by a CONFIRM panel. Its presence puts you in **confirm mode** (see "Prior-round adjudication" below). If the path is missing or unreadable, grade normally without it — a stale prior is not a wiring error.
|
|
70
|
-
- `--cite-check <path>` *(optional, `correctness` only)* — the deterministic citation floor's verdict JSON for the same artifact, passed when the floor recorded advisory findings (citation ambiguity or line drift
|
|
70
|
+
- `--cite-check <path>` *(optional, `correctness` only)* — the deterministic citation floor's verdict JSON for the same artifact, passed when the floor recorded advisory findings (an unresolved path, citation ambiguity, or line drift — mechanical resolution results, not verdicts). Treat its `findings[]` as **leads to fold into your spot-check sample**, not conclusions — the Citation-resolution rule (step 4) alone decides whether any becomes a finding of yours (an "unresolved" lead whose file genuinely does not exist anywhere IS one). Every other dimension ignores this flag; it never triggers confirm mode and never produces `finding_rulings`. Missing or unreadable path → grade normally without it.
|
|
71
71
|
|
|
72
72
|
**Plan-authored risk flags (the `correctness` dimension only).** When your `--dimension` is `correctness` and the `--artifact` carries a `risks:` frontmatter array (each `{ id, claim }`, described in the plan's `## Risk Flags` section), you are REQUIRED to rule on every flag — this is a first-class channel, not an optional prose aside. For each flag, verify its `claim` against the real codebase / the plan (Read/Grep the relevant `file:line`) and decide `pass` (the concern is unfounded or already handled) or `fail` (the risk is real and unaddressed). A `fail` ruling blocks the gate (the workflow folds these across the panel), so an assumption the plan flagged for review cannot ride a green pass into commit. Other dimensions ignore `risks:`.
|
|
73
73
|
|