@gtrabanco/pi-agentic-workflow 0.24.0 → 0.24.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gtrabanco/pi-agentic-workflow",
3
- "version": "0.24.0",
3
+ "version": "0.24.2",
4
4
  "description": "Pi package: canonical agentic-workflow skills, friendly slash commands, and per-command model routing.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: audit-pr
3
3
  user-invocable: true
4
- version: 5.6.0
4
+ version: 5.6.2
5
5
  argument-hint: <pr-number> (optional — defaults to the current branch's PR)
6
6
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -96,7 +96,8 @@ verdict:
96
96
  that route). The check keys the lane-era/legacy split on evidence, not on an
97
97
  author-controlled artifact (fix/285; the lane-era pipeline structurally never
98
98
  writes `progress.md` or `ACCEPTANCE.md`, so demanding them made the gate
99
- unsatisfiable for every lane-era unit — issue #285):
99
+ unsatisfiable for every lane-era unit; the post-feature 61 unit doc's `## Acceptance
100
+ criteria` is the canonical acceptance source — issue #285):
100
101
  - **Legacy path** — opened only when the unit's `progress.md` carries a
101
102
  `## Pre-execution review receipt v1 — plan` whose digest **re-derives**
102
103
  (`scripts/pre-execution-snapshot.mjs verify --stage plan` exits 0 over the
@@ -108,13 +109,15 @@ verdict:
108
109
  `structural.reasonCode`/`changedPaths` name the drifted dimension), and —
109
110
  for a feature unit — its named `— spec` parent re-derives the same way.
110
111
  The acceptance manifest binds when present (fix/285): a unit that carries
111
- `ACCEPTANCE.md` still binds it in the snapshot. Bound artifacts
112
+ `ACCEPTANCE.md` still binds it in the snapshot; post-feature 61 units bind
113
+ the unit doc's `## Acceptance criteria` section instead. Bound artifacts
112
114
  are frozen: new implementation-phase files are allowed, edits to a bound
113
115
  artifact are not. A receipt that does not re-derive — stale, missing,
114
116
  wrong-stage **or impossible-timeline** — is never a pass: the check falls
115
117
  through to the lane-era path, so a planted or stale `progress.md` cannot
116
118
  buy a weaker gate (and a unit doc with no lane-era surface left is then
117
- **BLOCKED**, `→ Next: /unit-lane <unit>`).
119
+ **BLOCKED**, `→ Next: /unit-lane <unit>`). Restoring the bound artifact or obtaining explicit user approval for a
120
+ SPEC amendment and replacement manifest, then write a fresh receipt.
118
121
  - **Lane-era path** (feature 61's single-doc contract) — the unit doc's
119
122
  Evidence section carries the `## Triaged steps` block whose `Steps:` /
120
123
  `Skipped:` / `Budget:` lines re-derive identically from the doc's own
@@ -154,5 +157,6 @@ verdict:
154
157
  A legacy unit with no ledgers is not exempt: the missing ledgers must be constructed
155
158
  and reviewed through the adoption route (the pre-execution gate in `execute-phase`'s
156
159
  preflight) before MERGE-READY. The audit never coerces old evidence into the new
157
- format, never edits `ACCEPTANCE.md`, and never accepts a hand-written table that the
160
+ format, never edits `ACCEPTANCE.md` (legacy (pre-feature 61)) or the unit doc's acceptance
161
+ section (post-feature 61), and never accepts a hand-written table that the
158
162
  plan snapshot does not bind.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: pre-execution-review
3
3
  user-invocable: false
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
@@ -55,7 +55,7 @@ task | implementation-owner | validator | required-evidence | status
55
55
  | `authority-source` | the SPEC/acceptance/criterion or ledger row that *requires* it — never the implementation |
56
56
  | `phase` / `task` | exactly one phase and one task; a row needing two phases means the phase cut is wrong |
57
57
  | `implementation-owner` | the skill/role that performs it (usually `execute-phase`) |
58
- | `validator` | the command or check that proves it, copied from `ACCEPTANCE.md` or the phase's done-when |
58
+ | `validator` | the command or check that proves it, copied from the acceptance artifact (`ACCEPTANCE.md` for legacy (pre-feature 61) units; `sed -n '/^## Acceptance criteria/,/^## /p' <unit>/SPEC.md \| git hash-object --stdin` for post-feature 61) or the phase's done-when |
59
59
  | `required-evidence` | what must be recorded where (test name, receipt line, ledger row) |
60
60
  | `status` | `planned \| in-progress \| verified \| n/a \| deferred` |
61
61
 
@@ -147,7 +147,7 @@ progress | docs/features/<NN>-<slug>/SPEC.md · docs/fix/<issue>-<topic>/SPEC.md
147
147
  known-issues | docs/features/<NN>-<slug>/known-issues.md · docs/fix/<issue>-<topic>/known-issues.md | unit-lane:known-entries + execute-phase:blocker-entries-and-status | none | none | bun test scripts/ledger-ownership.test.mjs
148
148
  decisions | docs/features/<NN>-<slug>/decisions.md · docs/fix/<issue>-<topic>/decisions.md | unit-lane:decisions + execute-phase:phase-decisions + human-owner:ratified-verdicts | none | none | bun test scripts/ledger-ownership.test.mjs
149
149
  roadmap | docs/features/ROADMAP.md · docs/fix/README.md | unit-lane:row-registration + execute-phase:status-and-pr-link + audit-docs:low-risk-row-repair | none | none | bun test scripts/bounded-delivery-loops.test.mjs
150
- acceptance-manifest | docs/features/<NN>-<slug>/ACCEPTANCE.md · docs/fix/<issue>-<topic>/ACCEPTANCE.md | unit-lane:acceptance-freeze + human-owner:approved-amendment | none | none | git hash-object docs/features/<NN>-<slug>/ACCEPTANCE.md
150
+ acceptance-manifest | docs/features/<NN>-<slug>/ACCEPTANCE.md · docs/fix/<issue>-<topic>/ACCEPTANCE.md | unit-lane:acceptance-freeze + human-owner:approved-amendment | none | none | git hash-object docs/features/<NN>-<slug>/ACCEPTANCE.md (legacy pre-feature 61) · sed -n '/^## Acceptance criteria/,/^## /p' <unit>/SPEC.md then git hash-object --stdin (unit doc era, post-feature 61)
151
151
  # no-script-writer: SPEC.md · PLAN.md · TASKS.md · CHECKLIST.md · testing.md · architecture-notes.md · planning-evidence.md · planning-obligations.md · delegated-evidence.md
152
152
  ```
153
153
 
@@ -63,7 +63,7 @@ in the unit's unbound `progress.md`:
63
63
  ## Wording-only determination v1 — <spec|plan>
64
64
  - Determination: <opaque id>
65
65
  - Artifact revision: <the rotated artifactRevisionId>
66
- - Acceptance fingerprint: <the ACCEPTANCE.md blob the batch left unmoved>
66
+ - Acceptance fingerprint: <the acceptance artifact (ACCEPTANCE.md for legacy (pre-feature 61), unit doc ## Acceptance criteria for post-feature 61) blob the batch left unmoved>
67
67
  - Intent and authority unchanged: yes
68
68
  ```
69
69
 
@@ -149,7 +149,8 @@ One rule, same shape for every consumer:
149
149
 
150
150
  - **Construct, never coerce.** Add what the unit is missing — the planning-evidence
151
151
  and obligation ledgers, built from the artifacts as they stand today — and leave
152
- `ACCEPTANCE.md`, `PLAN.md`, `TASKS.md`, the phase commits and any older receipt
152
+ `ACCEPTANCE.md` (legacy (pre-feature 61)), the unit doc's `## Acceptance criteria` (post-feature
153
+ 61), `PLAN.md`, `TASKS.md`, the phase commits and any older receipt
153
154
  byte-identical. Rewriting an old verdict, its digest, or its date is forgery.
154
155
  - **Re-review, then resume.** The adopted unit re-runs the lane's `review` step like any other and
155
156
  `execute-phase` resumes **only** on that current verdict. A pre-lane unit
@@ -61,7 +61,8 @@ Rules the builder enforces and no caller may improvise around:
61
61
  `Depends on:` line plus the closure roadmap rows); the unit's artifacts and the
62
62
  authorities above stay bound.
63
63
  - **A snapshot digest is not a git blob id.** `git hash-object` stays the convention
64
- for the frozen `ACCEPTANCE.md` manifest receipt only; comparing it to a snapshot
64
+ for the frozen `ACCEPTANCE.md` manifest receipt only (legacy pre-feature 61) or the post-feature
65
+ 61 unit doc acceptance section; comparing it to a snapshot
65
66
  digest proves nothing and a sensor that does so is wrong, not cheap.
66
67
 
67
68
  ### Re-verifying a receipt (consumers)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: review-change
3
3
  user-invocable: true
4
- version: 3.12.0
4
+ version: 3.12.1
5
5
  argument-hint: <path-or-glob> [--adversarial N] [--synthesize]
6
6
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -59,7 +59,8 @@ or edits code. A `REVIEW-FAIL`/`NEEDS-DECISION` turn closes when the report
59
59
  block is printed (report step 13).
60
60
 
61
61
  Consume the internal [verification contract](<../verification-contract/SKILL.md>);
62
- the reviewer checks the same frozen `ACCEPTANCE.md` blob as the executor before
62
+ the reviewer checks the same frozen acceptance artifact (legacy (pre-feature 61) `ACCEPTANCE.md`
63
+ or post-feature-61 unit doc `## Acceptance criteria`) as the executor before
63
64
  mapping candidate evidence.
64
65
 
65
66
  ## When to use
@@ -31,8 +31,8 @@
31
31
  2. Review the **fold diff only** (`git diff <pre-batch HEAD>..<batch HEAD>`
32
32
  over the commits this turn's batch produced);
33
33
  3. Require the **gate green at the reviewed head** and the sibling
34
- `ACCEPTANCE.md` blob recomputed to an **exact match** — the step-2
35
- structural precondition, unchanged and still mandatory;
34
+ acceptance-manifest (step-2 artifact) blob recomputed to an **exact match**
35
+ — the step-2 structural precondition, unchanged and still mandatory.
36
36
  4. Append the normal `review-mark@1` `REVIEW-RAN` mark — delta cycles count
37
37
  toward the two-cycle cap from the unchanged source (marks + forge
38
38
  receipts), never a fresh reset;
@@ -52,13 +52,14 @@
52
52
  read from `git diff --unified=0` hunk headers);
53
53
  - **Size** — added+deleted changed lines **> 200**, or changed files
54
54
  **> 15** (`git diff --numstat`).
55
- 2. **Frozen acceptance + SPEC drift check (structural).** Locate sibling
56
- `ACCEPTANCE.md`, recompute its blob, and require an exact match with the
57
- execution receipt before assessing the candidate. Missing/mismatch is a
58
- `workflow` fix-now finding and no passing receipt may be posted. Legacy units
59
- use the verification contract's committed SPEC-blob fallback. Then build a
60
- **per-criterion coverage table** from the manifest — one row per acceptance
61
- criterion, no free-form comparison:
55
+ 2. **Frozen acceptance + SPEC drift check (structural).** Locate the acceptance
56
+ artifact — legacy (pre-feature 61) `ACCEPTANCE.md` or the unit doc's
57
+ `## Acceptance criteria` section (post-feature 61) — recompute its blob,
58
+ and require an exact match with the execution receipt before assessing the
59
+ candidate. Missing/mismatch is a `workflow` fix-now finding and no passing
60
+ receipt may be posted. Legacy units use the verification contract's
61
+ committed SPEC-blob fallback. Then build a **per-criterion coverage table**
62
+ from the manifest — one row per acceptance criterion, no free-form comparison:
62
63
 
63
64
  ```
64
65
  | criterion | evidence (file:line or command run) | met | unmet | untouched |
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: review-implementation
3
3
  user-invocable: false
4
- version: 1.11.0
4
+ version: 1.11.1
5
5
  argument-hint: <path-or-glob>
6
6
  allowed-tools: Read, Grep, Glob, Bash, WebFetch
7
7
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
@@ -42,7 +42,7 @@ A finding **blocks** only when the reviewer cites which single-owner source
42
42
  fails — blocking is a table lookup over cited sources, never a severity
43
43
  opinion. The four citation categories are:
44
44
 
45
- 1. **ACCEPTANCE criterion** unverified or failed.
45
+ 1. **ACCEPTANCE criterion** (legacy `ACCEPTANCE.md` or post-feature 61 unit doc `## Acceptance criteria`) unverified or failed.
46
46
  2. **Obligation row** in the unit's ledger is not `verified` or `n-a`.
47
47
  3. **Gate is red** at the reviewed head (the project gate exited non-zero at
48
48
  the exact head under review).
@@ -135,7 +135,10 @@ execution work hands off one phase per turn:
135
135
  ```
136
136
 
137
137
  `<k>` is the first unfinished phase (the unit doc's Progress log records the
138
- phases done so far; `bun scripts/unit-route.mjs <NN-slug>` prints it) and
138
+ phases done so far; `bun scripts/unit-route.mjs <NN-slug>` prints it — when every
139
+ phase is recorded but the index still reads `in-progress`, the router refuses with
140
+ `UNIT ROUTE — error … settle the index or roadmap status` and exits 1: settle the
141
+ status, then continue the ladder) and
139
142
  `<tier>` is the `implement` entry of the triage block's `Tiers:` line. Never
140
143
  print the bare whole-unit `/execute-phase <NN-slug>` — whole-unit loop mode
141
144
  survives only as an explicit operator choice. When the last phase's turn
@@ -22,8 +22,10 @@ At each execution boundary, print exactly one phase hand-off and end the turn:
22
22
  ```
23
23
 
24
24
  `<k>` = first unfinished phase (lowest `P<n>` bullet the Progress log does not
25
- record; `bun scripts/unit-route.mjs <NN-slug>` prints it). `<tier>` = the
26
- `implement` entry of the triage block's `Tiers:` line. Never the bare
25
+ record; `bun scripts/unit-route.mjs <NN-slug>` prints it — if every phase is
26
+ recorded while the index still reads `in-progress`, the router refuses with
27
+ `UNIT ROUTE — error … settle the index or roadmap status` and exits 1). `<tier>` =
28
+ the `implement` entry of the triage block's `Tiers:` line. Never the bare
27
29
  whole-unit command.
28
30
 
29
31
  When the last phase's turn closes, `execute-phase` resumes the lane. Verify
@@ -1,13 +1,15 @@
1
1
  ---
2
2
  name: verification-contract
3
3
  user-invocable: false
4
- version: 1.3.0
4
+ version: 1.4.2
5
5
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
- Internal contract: one compact frozen ACCEPTANCE.md per delivery unit, its
9
- validation ladder, anti-weakening rules, and blob-bound execution receipt.
10
- Consumed by planners, execute-phase, and review-change.
8
+ Internal contract: the acceptance artifact per delivery unit — legacy (pre-
9
+ feature 61) units may carry a frozen `ACCEPTANCE.md` (binding if present);
10
+ post-feature 61 units use the unit doc's `## Acceptance criteria` section as
11
+ the canonical acceptance source; the unit doc's `## Evidence` table serves as
12
+ the execution receipt. Consumed by planners, execute-phase, and review-change.
11
13
  ---
12
14
 
13
15
  # Verification Contract (internal)
@@ -17,12 +19,18 @@ strengthen coverage but cannot move it; review checks the same bytes.
17
19
 
18
20
  ## Artifact
19
21
 
20
- Every new feature/fix carries `ACCEPTANCE.md` beside its SPEC. Copy the matching
21
- repository template. Required parts: `Status: frozen`; one stable ID per SPEC
22
- criterion; `Required outcome`; named `Validator`; literal quality floor; project
23
- commands. Prefer commands, otherwise use `read-verified: <evidence>` or
24
- `manual: <exact observation>`. Unlabelled prose is invalid. A planned test may
25
- name its future project runner; it cannot substitute a narrower runner later.
22
+ Legacy (pre-feature 61) units (ACCEPTANCE.md present — binding if present):
23
+ the frozen `ACCEPTANCE.md` beside the SPEC; required parts: `Status: frozen`;
24
+ one stable ID per SPEC criterion; `Required outcome`; named `Validator`; literal
25
+ quality floor; project commands. Prefer commands, otherwise use
26
+ `read-verified: <evidence>` or `manual: <exact observation>`. Unlabelled prose
27
+ is invalid. A planned test may name its future project runner; it cannot
28
+ substitute a narrower runner later.
29
+
30
+ Lane-era units (post-feature 61): the unit doc's `## Acceptance criteria` section is the
31
+ canonical acceptance source. Criteria are numbered, each induced from a concrete
32
+ user scenario, and command-verified where possible (label `read-verified` for
33
+ prose-only checks). Unlabelled prose is invalid.
26
34
 
27
35
  **Validator stability.** A validator must never gate on a surface other workflow
28
36
  actors mutate — the branch diff as a whole, the session log, progress entries,
@@ -33,31 +41,36 @@ diff-based validator enumerates the unit's paths or excludes the
33
41
  workflow-mutated surfaces explicitly (docs/LOGS.md, the unit's own docs
34
42
  directory, harness/toolstate).
35
43
 
36
- ## Freeze and receipt
44
+ **Validator determinism.** A frozen validator must be deterministic — pin network,
45
+ clock, randomness, and unordered-concurrency dependencies (fixed version,
46
+ frozen fixture, recorded input) or downgrade the row to `read-verified:`/
47
+ `manual:`.
37
48
 
38
- At first execution run `git hash-object <unit>/ACCEPTANCE.md` and append to the
39
- unit progress file:
49
+ **Property / fuzz validators.** A planner may emit a property or fuzz validator as
50
+ a bounded `commands` row — deterministic, bounded runtime within the project's
51
+ per-command timeout budgets. No new validator kind in `VerificationPlan
52
+ v1` is needed: property/fuzz rides the existing `commands` class.
40
53
 
41
- ```text
42
- ## Acceptance receipt v1
43
- - Manifest: <path> · Blob: <sha> · Status: frozen · Verified: <date>
44
- ```
54
+ ## Freeze and receipt
45
55
 
46
- Before every phase and final review, recompute it. Exact match continues;
47
- missing/mismatched evidence stops before edits:
56
+ The unit doc's `## Evidence` table is the execution receipt: each Evidence row
57
+ records a validator command, its exit code or blob digest, output excerpt, and
58
+ who verified it. A frozen criterion's receipt is the Evidence row for that
59
+ criterion — exact match continues; missing/mismatched evidence stops before
60
+ edits:
48
61
 
49
62
  ```text
50
63
  ACCEPTANCE GATE — <unit> BLOCKED
51
- Expected blob: <sha|missing> · Actual: <sha|missing>
52
- Reason: the frozen finish line is missing or changed.
64
+ Expected Evidence row for AC<N>: present with blob <sha> · Actual: missing/changed
65
+ Reason: the frozen finish line evidence is missing or changed.
53
66
 
54
67
  → Next: restore the frozen manifest, or obtain explicit user approval for a
55
- SPEC amendment and replacement manifest; then write a fresh receipt
68
+ SPEC amendment and replacement manifest; then record a fresh Evidence row
56
69
  · never edit tests, commands, or acceptance to make the current candidate pass
57
70
  ```
58
71
 
59
72
  A legitimate change requires, in order: explicit user approval; dated SPEC
60
- `## Amendments` row; replacement manifest; committed fresh receipt. The
73
+ `## Amendments` row; replacement manifest; committed fresh Evidence row. The
61
74
  executor never self-authorizes it.
62
75
 
63
76
  Legacy unit with no manifest mention: fingerprint committed `SPEC.md` and record
@@ -99,5 +112,4 @@ semantics are verified against authoritative documentation **before a test encod
99
112
 
100
113
  ## Done when
101
114
 
102
- Frozen manifest + current blob receipt + named validators + literal quality
103
- floor; executor and reviewer evaluate identical bytes.
115
+ Execution receipt (unit doc `## Evidence` table for post-feature 61 units; legacy `ACCEPTANCE.md` manifest binding-if-present) + named validators + literal quality floor; executor and reviewer evaluate identical evidence.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: workflow-status
3
3
  user-invocable: true
4
- version: 3.9.1
4
+ version: 3.9.2
5
5
  author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  argument-hint: "[--json-only] [--last-envelope <json|path>] [--compact]"
@@ -24,7 +24,8 @@ For every unit whose resolved status is `defined`, `planned` or `in-progress`:
24
24
  name the dimension that stopped being true, which is what the sensor labels
25
25
  `stale`. A snapshot digest is a canonical
26
26
  SHA-256 over the snapshot object, so `git hash-object` is never a substitute: it
27
- stays correct only for the frozen `ACCEPTANCE.md` manifest blob.
27
+ stays correct only for the frozen acceptance artifact: `ACCEPTANCE.md` (legacy (pre-feature 61)) or the
28
+ unit doc's `## Acceptance criteria` section (post-feature 61).
28
29
  3. The verdict, the reviewed `unit`, the stage, and the author fields
29
30
  (`reviewer` and `authorId` — the receipt's `Reviewer:` / `Author:` lines — and
30
31
  `authorExclusion`).