@gtrabanco/pi-agentic-workflow 0.11.1 → 0.12.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.
Files changed (34) hide show
  1. package/README.md +26 -0
  2. package/dist/config/defaults.js +2 -0
  3. package/dist/config/load.d.ts +3 -0
  4. package/dist/config/load.js +3 -1
  5. package/dist/config/merge.js +2 -0
  6. package/dist/config/path-policy.d.ts +97 -0
  7. package/dist/config/path-policy.js +301 -0
  8. package/dist/config/schema.js +65 -2
  9. package/dist/config/types.d.ts +5 -0
  10. package/dist/extension/index.js +147 -5
  11. package/package.json +1 -1
  12. package/skills/design-feature/SKILL.md +1 -1
  13. package/skills/design-feature/references/REPAIR.md +12 -10
  14. package/skills/execute-phase/SKILL.md +1 -1
  15. package/skills/execute-phase/references/PREFLIGHT.md +28 -0
  16. package/skills/fold-findings/SKILL.md +17 -7
  17. package/skills/fold-findings/references/FOLD_PROCESS.md +10 -4
  18. package/skills/init-workspace/SKILL.md +1 -1
  19. package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +7 -1
  20. package/skills/init-workspace/references/UPGRADE.md +7 -2
  21. package/skills/orchestration-envelope/SKILL.md +1 -1
  22. package/skills/orchestration-envelope/references/TURN_CONTRACT.md +52 -0
  23. package/skills/plan-feature-scaffold/SKILL.md +1 -1
  24. package/skills/plan-feature-scaffold/references/SCAFFOLD_PROCESS.md +8 -0
  25. package/skills/pre-execution-review/SKILL.md +1 -1
  26. package/skills/pre-execution-review/references/LEDGERS.md +8 -4
  27. package/skills/pre-execution-review/references/POLICY.md +40 -14
  28. package/skills/review-plan/SKILL.md +1 -1
  29. package/skills/review-plan/references/CHECKS.md +5 -2
  30. package/skills/review-plan/references/OUTPUT.md +6 -6
  31. package/skills/review-spec/SKILL.md +1 -1
  32. package/skills/review-spec/references/CHECKS.md +4 -1
  33. package/skills/review-spec/references/OUTPUT.md +9 -5
  34. package/skills/verification-contract/SKILL.md +7 -1
@@ -102,7 +102,10 @@ One row per finding in the receipt's `findings` array: stable `id`, `severity`
102
102
  (`info | low | medium | high | critical`), `class` (`product | plan | source |
103
103
  environment | runtime`), `claim` with its section/row pointer, `evidenceRefs`
104
104
  (≥ 1 — a finding without evidence is a hunch and gets dropped), `verification`,
105
- `resolution: open` on emission. Material = anything above `info`; a PASS may not
106
- carry an open or unverified material row. A Product-rooted finding found here
105
+ `resolution: open` on emission. Material = `medium` and above; a `low` row is a
106
+ persisted report-note the stage author resolves without a re-review, and `info`
107
+ is immaterial. Deflating a real defect below the `medium` minimum to unblock a
108
+ pass is itself a finding; a PASS may not carry an open or unverified material
109
+ row. A Product-rooted finding found here
107
110
  keeps `class: product`: the class routes the repair, it is not a record of who
108
111
  noticed what.
@@ -115,16 +115,17 @@ not authority.
115
115
  | Verdict / class | Who acts | What happens next |
116
116
  |---|---|---|
117
117
  | `PLAN-REVIEW-PASS` | nobody | `/execute-phase <NN>` binds this receipt + exact snapshot digest |
118
- | `PLAN-REVIEW-FAIL`, `class: plan` | `plan-feature` / `plan-fix` (the author) | one root-caused repair batch → new `artifactRevisionId` → re-review of the new snapshot |
118
+ | `PLAN-REVIEW-FAIL`, `class: plan` | `plan-feature` / `plan-fix` (the author) | one root-caused repair batch → new `artifactRevisionId` → next cycle (default re-review; a recorded wording-only batch skips it) |
119
119
  | `PLAN-REVIEW-FAIL`, `class: product` | `design-feature` | repair the Product half → `review-spec` → the Plan receipt is re-derived (`stale-parent`) |
120
120
  | `PLAN-REVIEW-FAIL`, `class: source\|environment\|runtime` | its owner, later | record the row, keep it `open`, route it. Do not edit the plan to hide it and do not start `execute-phase` on a plan carrying an open material row |
121
121
 
122
122
  Repeating this review follows the no-progress and convergence rules in
123
123
  `pre-execution-review/references/POLICY.md` §4 — a repeat needs
124
124
  a changed snapshot or a named falsifiable question plus a new evidence route, and
125
- entering a second repair/re-review cycle prints the `CONVERGENCE-ANOMALY` block
126
- before any further edit. A second cycle never grants PASS and never gets folded
127
- into `review-change → fold-findings`, which repairs source, not plan authority.
125
+ a second consecutive repair/re-review cycle prints the `CONVERGENCE-ANOMALY`
126
+ block before any further edit; the orchestrator's `stop-review-loop-cap` refuses
127
+ a third and names `design-feature` (a PASS resets the count). A second cycle
128
+ never grants PASS and never folds into `review-change → fold-findings`.
128
129
 
129
130
  ### Skill-specific turn-contract boxes
130
131
 
@@ -157,10 +158,9 @@ On FAIL, name every finding id once, in order, joined with ` + `:
157
158
 
158
159
  ```
159
160
  → Next: /plan-feature <NN-slug> "<instruction>" (or /plan-fix <N> "<instruction>") —
160
- one repair batch for F1 + P9 + L4, then /review-plan <NN-slug> re-reviews the new
161
+ one repair batch for F1 + P9 + L4, then /review-plan <NN-slug> judges the new
161
162
  artifact revision
162
163
  · class: product → /design-feature <NN-slug> then /review-spec <NN-slug>; the plan
163
164
  re-derives afterwards
164
165
  · a missing product choice → answer it yourself in the instruction; nothing here chooses
165
- · a second cycle about to start → print CONVERGENCE-ANOMALY first, then route to the owner
166
166
  ```
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: review-spec
3
3
  user-invocable: true
4
- version: 1.7.1
4
+ version: 1.8.0
5
5
  argument-hint: <NN-slug | path/to/SPEC.md>
6
6
  author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
@@ -101,5 +101,8 @@ Each finding is one row of the receipt's `findings` array: stable `id`,
101
101
  source | environment | runtime`), `claim` (what is wrong, with the section
102
102
  pointer), `evidenceRefs` (≥ 1 — a finding without evidence is a hunch and gets
103
103
  dropped), `verification` (`verified | unverified`), `resolution` (`open` on
104
- emission). Material = anything above `info`; a `PASS` may not carry an open or
104
+ emission). Material = `medium` and above; a `low` row is a persisted report-note
105
+ the stage author resolves without a re-review, and `info` is immaterial.
106
+ Deflating a real defect below the `medium` minimum to unblock a pass is itself a
107
+ finding; a `PASS` may not carry an open or
105
108
  unverified material row.
@@ -106,8 +106,8 @@ not authority.
106
106
  | Verdict | Who repairs | What happens next |
107
107
  |---|---|---|
108
108
  | `SPEC-REVIEW-PASS` | nobody | `/plan-feature <NN-slug>` binds this receipt + exact snapshot digest |
109
- | `SPEC-REVIEW-FAIL` | `design-feature` (the author) | one root-caused repair batch → new revision → re-review of the new snapshot |
110
- | `NEEDS-DESIGN` | the human, through `design-feature` | dated `## Amendments`/`Product decisions` entry → new revision → re-review |
109
+ | `SPEC-REVIEW-FAIL` | `design-feature` (the author) | one root-caused repair batch → new revision → next cycle (default re-review; a recorded wording-only batch skips it) |
110
+ | `NEEDS-DESIGN` | the human, through `design-feature` | dated `## Amendments`/`Product decisions` entry → new revision → next cycle |
111
111
 
112
112
  A finding whose `class` is `plan`, `source`, `environment`, or `runtime` does not
113
113
  become work here: record it, keep it open, and route it to its owner (`review-plan`
@@ -117,8 +117,11 @@ schedules nothing.
117
117
  Repeating this review follows the no-progress and convergence rules in
118
118
  `pre-execution-review/references/POLICY.md` §4: a repeat needs a
119
119
  changed snapshot or a named falsifiable question plus a new evidence route, and
120
- entering a second repair/re-review cycle prints `CONVERGENCE-ANOMALY` before any
121
- further edit. A `design-feature` repair turn re-reads the union of open findings
120
+ a second consecutive repair/re-review cycle prints `CONVERGENCE-ANOMALY` before
121
+ any further edit. A third cycle never starts without explicit user instruction:
122
+ the orchestrator's `stop-review-loop-cap` refusal stops the invocation and names
123
+ `design-feature` as the human route, and a PASS resets the count. A
124
+ `design-feature` repair turn re-reads the union of open findings
122
125
  from `planning-findings.md`, not just the newest receipt, so nothing recorded here
123
126
  is ever lost between cycles.
124
127
 
@@ -150,7 +153,8 @@ On FAIL or NEEDS-DESIGN, name every finding id once, in order, joined with ` + `
150
153
 
151
154
  ```
152
155
  → Next: /design-feature <NN-slug> "<instruction>" — one repair batch for F1 + F2 + F4,
153
- then /review-spec <NN-slug> re-reviews the new artifact revision
156
+ then /review-spec <NN-slug> judges the new artifact revision
157
+ · a third cycle → explicit user instruction first; the decider refuses it (`stop-review-loop-cap`) and names design-feature
154
158
  · a product choice is missing → answer it in the instruction; nothing here chooses for you
155
159
  · finding class is plan/source/environment/runtime → route to its owner, do not edit the SPEC
156
160
  ```
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: verification-contract
3
3
  user-invocable: false
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
@@ -88,6 +88,12 @@ a cover-up. The sole legitimate amendment is a **proven mis-encoding of external
88
88
  documented semantics of the platform/library/language, cited from authoritative documentation — not a product decision change. Even that surfaces as a
89
89
  **finding plus a SPEC amendment**, never a silent edit to go green.
90
90
 
91
+ The deterministic backstop for this rule is the feature 60 path-protection
92
+ checkpoint (`path-protection@1` in the turn contract): the Tier 1 gate fails a
93
+ protected-path change with no recorded justification/approval, and the pi guard
94
+ blocks the write before it lands. This manifest is the finish line those
95
+ recorded escapes are checked against.
96
+
91
97
  Prevention rides the research gate (**research-before-encode**): platform
92
98
  semantics are verified against authoritative documentation **before a test encodes them**, so **adding stronger tests stays allowed**; **editing expectations never** (except the proven-mis-encoding path above).
93
99