@gtrabanco/pi-agentic-workflow 0.11.2 → 0.13.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.
Files changed (69) 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 +2 -2
  12. package/skills/audit-docs/SKILL.md +6 -5
  13. package/skills/audit-pr/SKILL.md +2 -2
  14. package/skills/design-feature/SKILL.md +2 -2
  15. package/skills/design-feature/references/REPAIR.md +12 -10
  16. package/skills/evidence-grounding/SKILL.md +1 -1
  17. package/skills/execute-phase/SKILL.md +2 -2
  18. package/skills/execute-phase/references/EXECUTION_CONTRACT.md +19 -0
  19. package/skills/execute-phase/references/FOLDING.md +9 -2
  20. package/skills/execute-phase/references/PREFLIGHT.md +28 -0
  21. package/skills/fold-findings/SKILL.md +6 -4
  22. package/skills/generate-docs/SKILL.md +1 -1
  23. package/skills/implementation-discovery/SKILL.md +1 -1
  24. package/skills/init-workspace/SKILL.md +2 -2
  25. package/skills/init-workspace/references/BOOTSTRAP_WRITE.md +7 -1
  26. package/skills/init-workspace/references/UPGRADE.md +7 -2
  27. package/skills/log-session/SKILL.md +1 -1
  28. package/skills/orchestration-envelope/SKILL.md +2 -2
  29. package/skills/orchestration-envelope/references/TURN_CONTRACT.md +52 -0
  30. package/skills/phase-contract/SKILL.md +1 -1
  31. package/skills/plan-feature/SKILL.md +5 -4
  32. package/skills/plan-feature-from-issue/SKILL.md +1 -1
  33. package/skills/plan-feature-scaffold/SKILL.md +2 -2
  34. package/skills/plan-feature-scaffold/references/SCAFFOLD_PROCESS.md +8 -0
  35. package/skills/plan-fix/SKILL.md +1 -1
  36. package/skills/planning-preflight/SKILL.md +1 -1
  37. package/skills/pre-execution-review/SKILL.md +2 -2
  38. package/skills/pre-execution-review/references/LEDGERS.md +43 -6
  39. package/skills/pre-execution-review/references/POLICY.md +40 -14
  40. package/skills/product-audit/SKILL.md +4 -4
  41. package/skills/product-audit/references/AUDIT_DIMENSIONS.md +1 -1
  42. package/skills/product-audit/references/AUDIT_PROCESS.md +1 -1
  43. package/skills/replan-findings/SKILL.md +4 -4
  44. package/skills/review-a11y/SKILL.md +1 -1
  45. package/skills/review-brand/SKILL.md +1 -1
  46. package/skills/review-change/SKILL.md +7 -5
  47. package/skills/review-change/references/OUTPUT_AND_GUARDRAILS.md +2 -1
  48. package/skills/review-change/references/PERSIST_AND_DECIDE.md +17 -11
  49. package/skills/review-code/SKILL.md +1 -1
  50. package/skills/review-debt/SKILL.md +1 -1
  51. package/skills/review-design/SKILL.md +1 -1
  52. package/skills/review-implementation/SKILL.md +2 -2
  53. package/skills/review-implementation/references/CLASSIFY.md +55 -0
  54. package/skills/review-perf/SKILL.md +1 -1
  55. package/skills/review-plan/SKILL.md +2 -2
  56. package/skills/review-plan/references/CHECKS.md +5 -2
  57. package/skills/review-plan/references/OUTPUT.md +6 -6
  58. package/skills/review-security/SKILL.md +1 -1
  59. package/skills/review-seo/SKILL.md +1 -1
  60. package/skills/review-spec/SKILL.md +2 -2
  61. package/skills/review-spec/references/CHECKS.md +4 -1
  62. package/skills/review-spec/references/OUTPUT.md +9 -5
  63. package/skills/review-verify/SKILL.md +1 -1
  64. package/skills/triage-issue/SKILL.md +1 -1
  65. package/skills/verification-contract/SKILL.md +8 -2
  66. package/skills/workflow-status/SKILL.md +2 -2
  67. package/skills/workflow-status/references/ENVELOPE_CORE.md +5 -4
  68. package/skills/workflow-status/references/SENSOR_CORE.md +5 -4
  69. package/skills/workflow-status/references/SENSOR_SIGNALS.md +3 -2
@@ -28,6 +28,14 @@
28
28
  - Rotate `artifactRevisionId` for the unit's plan artifacts on this write and
29
29
  carry it in the hand-off. A later revert to these same bytes is a new
30
30
  authoring event and needs a new id.
31
+ - Declare the test set in the `path-protection-plan@1` block (feature 60),
32
+ placeholder tokens only, never a project glob: `freeze-after: <P<n>|none>`
33
+ plus one justified row per test decision
34
+ (`created | <repo-relative path or glob> | <one-line justification>`,
35
+ `not-created | <test name> | <one-line justification>`,
36
+ `ignored | <test name> | <one-line justification>`). Put it in `PLAN.md` for
37
+ M/L, or in the SPEC's `### Phases` for XS/S; the grammar is
38
+ `path-protection@1` in the turn contract.
31
39
  4. **Scale by size:**
32
40
 
33
41
  - **XS/S:** SPEC + `ACCEPTANCE.md`. Its `### Phases` has checkbox tasks and at least `P1`
@@ -3,7 +3,7 @@ name: plan-fix
3
3
  user-invocable: true
4
4
  version: 3.3.0
5
5
  argument-hint: <issue-number> [<issue-number> …]
6
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
8
8
  description: >
9
9
  Draft and locally commit a tightly scoped, phased fix SPEC from one or more
@@ -2,7 +2,7 @@
2
2
  name: planning-preflight
3
3
  user-invocable: false
4
4
  version: 1.1.1
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal planning gate: consumes the normalized repository state and makes
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: pre-execution-review
3
3
  user-invocable: false
4
- version: 2.2.1
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
4
+ version: 2.5.1
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal owner of the pre-execution review cycle and the planning ledgers:
@@ -90,7 +90,11 @@ status | resolution-evidence | resolving-artifact-revision
90
90
 
91
91
  - `stage` is `spec` or `plan`; `severity` and `class` use the receipt
92
92
  vocabularies (`info|low|medium|high|critical`,
93
- `product|plan|source|environment|runtime`). `info` is the only immaterial one.
93
+ `product|plan|source|environment|runtime`). Material is `medium` and above; a
94
+ `low` row is a persisted **report-note** — visible, non-blocking, and resolved
95
+ by the stage author without a re-review — and `info` is immaterial.
96
+ - Deflating a real defect below the `medium` minimum to unblock a pass is itself
97
+ a finding: the row is re-classified and blocks, never waved through.
94
98
  - `finding-id` is stable across cycles: a repeated finding keeps its id and gains
95
99
  a second resolution row, which is exactly what makes the no-progress and
96
100
  `CONVERGENCE-ANOMALY` rules computable.
@@ -104,9 +108,9 @@ status | resolution-evidence | resolving-artifact-revision
104
108
  - `resolving-artifact-revision` is the `artifactRevisionId` of the write that
105
109
  closed the row — the link that lets a re-review prove the snapshot actually
106
110
  changed.
107
- - A `PASS` may not coexist with an open material/unverified row in this table for
108
- the bound snapshot. `audit-pr` reads it; the merge authority stays
109
- `audit-pr`'s alone.
111
+ - A `PASS` may coexist with open or unverified `low`/`info` report-note rows; it
112
+ is refused while any open or unverified `medium`+ row exists for the bound
113
+ snapshot. `audit-pr` reads it; the merge authority stays `audit-pr`'s alone.
110
114
 
111
115
  ## Durable ledger write ownership (the map)
112
116
 
@@ -114,7 +118,7 @@ The one-owner rule, stated once so every skill and template can cite it here:
114
118
  **a durable ledger has exactly one writer per column set, plus at most one
115
119
  declared mechanical annotator, which may append only the token its own row
116
120
  names.** Nobody else writes a row — not a reviewer, not a later phase, not a
117
- script. So `fold-findings` flips only the `folded:` flag `triage-issue` gives it,
121
+ script. So `fold-findings` flips only the `folded:` flag per the map's `fold-findings:folded-flag` owner entry,
118
122
  and `scripts/ledger-provenance.mjs` appends only the marker it really emits:
119
123
  its `· fold <sha>` (or `· ticked <sha>` on a row that scores 1) plus the
120
124
  `· REOPENED — provenance unproven` note when a tick has no matching
@@ -138,7 +142,7 @@ must pass; the CI node-compat job enforces the fallback.
138
142
  ```text
139
143
  ledger-ownership@1
140
144
  truth-class | ledger | owner | annotator | annotator-token | validator
141
- review-findings | docs/features/<NN>-<slug>/review-findings.md · docs/fix/<issue>-<topic>/review-findings.md | review-change:finding-rows + review-change:finding-mark + review-change:review-mark + audit-pr:audit-rows + triage-issue:triage-rows + fold-findings:folded-flag | scripts/ledger-provenance.mjs | · fold <sha> + · ticked <sha> + · REOPENED | bun test scripts/ledger-provenance.test.mjs
145
+ review-findings | docs/features/<NN>-<slug>/review-findings.md · docs/fix/<issue>-<topic>/review-findings.md | review-change:finding-rows + review-change:finding-mark + review-change:review-mark + review-change:review-gate-ran-marks + audit-pr:audit-rows + triage-issue:triage-rows + execute-phase:gate-ran-marks + fold-findings:folded-flag | scripts/ledger-provenance.mjs | · fold <sha> + · ticked <sha> + · REOPENED | bun test scripts/ledger-provenance.test.mjs
142
146
  planning-findings | docs/features/<NN>-<slug>/planning-findings.md · docs/fix/<issue>-<topic>/planning-findings.md | review-spec:spec-stage-rows + review-plan:plan-stage-rows + design-feature:product-class-resolutions + plan-feature:plan-class-resolutions + plan-fix:fix-plan-class-resolutions + fold-findings:source-class-resolutions | none | none | bun test scripts/pre-execution-quality.test.mjs
143
147
  progress | docs/features/<NN>-<slug>/progress.md · docs/fix/<issue>-<topic>/progress.md | plan-feature-scaffold:create + execute-phase:phase-entries + execute-phase:gate-rejection-traces + review-spec:product-receipt + review-plan:plan-receipt | none | none | bun test scripts/pre-execution-sensor.test.mjs
144
148
  known-issues | docs/features/<NN>-<slug>/known-issues.md · docs/fix/<issue>-<topic>/known-issues.md | plan-feature-scaffold:create + execute-phase:blocker-entries-and-status | none | none | bun test scripts/ledger-ownership.test.mjs
@@ -203,3 +207,36 @@ reproducer as its regression check — it never re-derives it; a `recheck` cell
203
207
  that cannot be materialized yields `BLOCKED <missing input>`. This consumption
204
208
  leaves the row shape, the `VF-` exclusions, and the `review-change`
205
209
  single-writer rule untouched.
210
+
211
+ ### The gate-run mark
212
+
213
+ A gate run — green or red — leaves a durable mark in the unit's
214
+ `review-findings.md` ledger (for features:
215
+ `docs/features/<NN>-<slug>/review-findings.md`, for fixes:
216
+ `docs/fix/<issue>-<topic>/review-findings.md`), owned by the `review-findings`
217
+ truth-class row's owner cell extended with the two recorder column-sets:
218
+
219
+ ```text
220
+ gate-ran@1
221
+ id | file:line | cmds | exit | [additive-slots ...]
222
+ GATE-RAN | HEAD <40-hex sha> | <cmds> | exit <code> | [reserved trailing slot: `manifest <sha>`]
223
+ ```
224
+
225
+ - **Fixed format** (the one grammar; every consumer cites this block):
226
+ `GATE-RAN | HEAD <sha> | <cmds> | exit <code>` — every run records the SHA,
227
+ the commands run, and the exit code (green and red alike; `exit 0` is green).
228
+ `<cmds>` is the runnable command(s) the gate ran, joined by ` | ` when several.
229
+ - **Additive slots**: fields after `HEAD` are additive; consumers ignore unknown
230
+ trailing fields (feature 35's `manifest <sha>` slot is reserved, not yet
231
+ consumed).
232
+ - **Identical-head reuse**: any skill may consume a **green** run only at the
233
+ identical HEAD; a changed head ⇒ re-run the gate. A red mark is never
234
+ consumed as a pass.
235
+ - **Recorder column-sets**: the `review-findings` truth-class row's owner cell
236
+ declares `execute-phase:gate-ran-marks` (executor phase gates) and
237
+ `review-change:review-gate-ran-marks` (reviewer gate runs), distinct column-set
238
+ names per the one-writer-per-column-set rule.
239
+ - **Owner extension**: the identical owner cell is mirrored into both template
240
+ projections (`docs/features/_TEMPLATE/LEDGERS.md` and `docs/fix/_TEMPLATE/LEDGERS.md`).
241
+ - **No new truth-class row**: the grammar admits no new row — the existing
242
+ `review-findings.md` ledger pattern is reused with extended owner cells.
@@ -38,15 +38,34 @@ what is specific to their artifact set.
38
38
  The first review emits one complete unioned findings set — never a drip of
39
39
  successive surprises. Its owner then classifies **every** finding by root cause
40
40
  (`product | plan | source | environment | runtime`) and applies **one**
41
- evidence-bounded repair batch to the owning artifact(s) before a single
42
- re-review of the resulting snapshot.
41
+ evidence-bounded repair batch to the owning artifact(s). The batch rotates
42
+ `artifactRevisionId`; by default it is followed by one re-review of the freshly
43
+ rotated snapshot.
43
44
 
44
45
  | Class | What the batch may do | What it may not do |
45
46
  |---|---|---|
46
47
  | Common root cause | One edit that closes several findings | Split into per-finding micro-edits that leave the shared cause in place |
47
- | Wording-only | Skip a full replan when intent, obligation identity, phase topology, validators, and authority are all unchanged | Proceed without recording that determination in the evidence |
48
+ | Wording-only | Skip the re-review when intent, obligation identity, phase topology, validators, and authority are all unchanged | Proceed without recording the determination, or without rotating `artifactRevisionId` |
48
49
  | Scope-changing | Re-cut the plan or the Product half | Ride through as a "wording fix" |
49
50
 
51
+ A wording-only batch records its machine half and its judgment half as one block
52
+ in the unit's unbound `progress.md`:
53
+
54
+ ```text
55
+ ## Wording-only determination v1 — <spec|plan>
56
+ - Determination: <opaque id>
57
+ - Artifact revision: <the rotated artifactRevisionId>
58
+ - Acceptance fingerprint: <the ACCEPTANCE.md blob the batch left unmoved>
59
+ - Intent and authority unchanged: yes
60
+ ```
61
+
62
+ The revision rotation is **never** skippable: the freshness predicate refuses an
63
+ unrecorded rotation (`stale-source-revision` — bound bytes moved and no matching
64
+ determination was recorded), and a later material movement after an exempted one
65
+ is refused because the recorded revision no longer matches.
66
+ The determination is the exemption's record, never authorization to move bytes
67
+ without one.
68
+
50
69
  Never repair by editing the reviewed claim into agreement with the reviewer: the
51
70
  repair supplies the missing evidence or routes the gap to its owner.
52
71
 
@@ -57,8 +76,8 @@ falsifiable question and a new evidence route**. Identical inputs plus an
57
76
  identical question stop as no-progress: report it and stop, do not re-issue the
58
77
  same verdict with more confidence.
59
78
 
60
- One repair/re-review cycle is the normal correction path. Entering a **second**
61
- cycle is allowed when correctness needs it and never grants PASS, but it is a
79
+ One repair/re-review cycle is the normal correction path. A **second**
80
+ consecutive unconverged repair/re-review cycle is not routine — it is a
62
81
  `CONVERGENCE-ANOMALY`: before any further edit, report
63
82
 
64
83
  ```text
@@ -76,12 +95,18 @@ on a Product- or Plan-rooted finding is invalid even when the candidate changed:
76
95
  the loop repairs source, not authority. Runtime retry and budget mechanics stay
77
96
  outside this policy and can never be translated into a PASS.
78
97
 
79
- The guards above gate **blind re-reviews** — an identical snapshot with the
80
- identical question — and never a repair performed in response to a persisted
81
- verdict: a repair turn whose input is a FAIL/NEEDS-DESIGN receipt produces a new
82
- snapshot by design, so no cycle cap or anomaly rule may block or end it. The
83
- anomaly is printed and routed, never a stop, and no cap converts a verdict into a
84
- dead end.
98
+ A **third cycle never** starts without explicit user instruction: after two
99
+ consecutive unconverged cycles the orchestrator's `stop-review-loop-cap` refusal
100
+ stops a further `review-spec`/`review-plan` invocation, names `design-feature` as
101
+ the human route, and a PASS resets the count. An unconverged loop ends in the
102
+ `needs-design` verdict where the verdict vocabulary sanctions it (the spec stage)
103
+ and in the refusal plus `design-feature` routing at the plan stage. The guards
104
+ above gate **blind re-reviews** — an identical snapshot with the identical
105
+ question — and never a repair performed in response to a persisted verdict: a
106
+ repair turn whose input is a FAIL/NEEDS-DESIGN receipt produces a new snapshot by
107
+ design, so the count is over review invocations, never over repairs. The cap
108
+ stops the loop and routes a human decision; it never establishes correctness from
109
+ a count and never waives a finding.
85
110
 
86
111
  ### 5. What a cycle can never produce
87
112
 
@@ -170,9 +195,9 @@ reports; a printed verdict whose mark is still "for next turn" is not finished.
170
195
  printed without the pasted self-check output is a contract defect, and every
171
196
  consumer reads a chat-only verdict as `missing-receipt-snapshot` — it does not
172
197
  exist to the sensor.
173
- - **A gate rejection is typed**, from a closed set of four: `dependency`, `status`,
174
- `phase-lint`, `stale-or-missing-receipt`. Each fixed gate block carries its type
175
- and names what it read and where the turn goes:
198
+ - **A gate rejection is typed**, from a closed set of five: `dependency`, `status`,
199
+ `phase-lint`, `path-protection`, `stale-or-missing-receipt`. Each fixed gate
200
+ block carries its type and names what it read and where the turn goes:
176
201
 
177
202
  ```text
178
203
  GATE REJECTION — <type>
@@ -191,6 +216,7 @@ reports; a printed verdict whose mark is still "for next turn" is not finished.
191
216
  dependency | PREFLIGHT.md
192
217
  status | PREFLIGHT.md
193
218
  phase-lint | PREFLIGHT.md
219
+ path-protection | PREFLIGHT.md
194
220
  stale-or-missing-receipt | PRE_EXECUTION_GATE.md
195
221
  ```
196
222
 
@@ -2,11 +2,11 @@
2
2
  name: product-audit
3
3
  user-invocable: true
4
4
  disable-model-invocation: true
5
- version: 3.1.0
5
+ version: 3.2.0
6
6
  metadata:
7
7
  opencode/autoinvoke: false
8
8
  argument-hint: <path-or-area> (optional — defaults to the whole product)
9
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
9
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
10
10
  license: MIT
11
11
  description: >
12
12
  Audit the whole product across code, quality, process, docs, roadmap, and
@@ -97,12 +97,12 @@ Verdict: <one-line honest health verdict>
97
97
  Installed tooling ....... ✓ | ⚠ | ✗ | n-a
98
98
 
99
99
  ## Findings (severity-ranked, one F-sequence for the whole audit)
100
- F1 [SEV] <dimension> — <finding> — evidence: <file:line | metric | doc> — class: <fix-now|postpone|tradeoff>
100
+ F1 [SEV] <dimension> — <finding> — evidence: <file:line | metric | doc> — class: <fix-now|replan-in-unit|decision-required|proposal|ignore>
101
101
  F2 [SEV] ...
102
102
  [example — scope-export recurrence] F<k> [med] Workflow discipline — <N>
103
103
  consecutive units exported scope via `## Amendments`/descope issues —
104
104
  features are being cut too big for real capacity — evidence: <unit list +
105
- amendments/issues> — class: postpone — route: #64 (atomicity/split rules)
105
+ amendments/issues> — class: proposal — route: #64 (atomicity/split rules)
106
106
 
107
107
  ## Delta vs audit <prior-id>
108
108
  New: F<k>
@@ -12,7 +12,7 @@
12
12
  | **Brand / voice** | User-facing copy vs. the brand guide | surfaces with copy |
13
13
  | **Tech debt** | Accumulated shortcuts, TODO/FIXME, stale abstractions | all |
14
14
  | **Process & docs** | Incomplete phases, aging open issues, **solvable known-issues**, doc completeness, missing/optimizable workflow docs, capability-inventory freshness (`docs/CAPABILITIES.md` ↔ code drift) | all |
15
- | **Workflow discipline** | The workflow's own rules held: branch/PR discipline, `done · #<pr>` links, phase naming (`P1…`), per-phase docs, commit format, dependency closures, artifact language — **run `audit-docs` checks 1–13 mechanically** (compose it); never assume a rule held because it "should". **Scope-export recurrence:** across the most recent units (merged or in-flight), each with a non-empty `## Amendments` descope log or a descope-classified born issue (`audit-pr`'s scope-bleed gate) counts as one scope-exporting unit — **≥ 2 consecutive** such units is a planning-quality finding ("features cut too big for real capacity"), routed to the atomicity/split rules (**#64**), not re-litigated as a per-unit defect | all |
15
+ | **Workflow discipline** | The workflow's own rules held: branch/PR discipline, `done · #<pr>` links, phase naming (`P1…`), per-phase docs, commit format, dependency closures, artifact language — **run `audit-docs` checks mechanically** (cite the count from `audit-docs`; never restated in the dimension table); never assume a rule held because it "should". **Scope-export recurrence:** across the most recent units (merged or in-flight), each with a non-empty `## Amendments` descope log or a descope-classified born issue (`audit-pr`'s scope-bleed gate) counts as one scope-exporting unit — **≥ 2 consecutive** such units is a planning-quality finding ("features cut too big for real capacity"), routed to the atomicity/split rules (**#64**), not re-litigated as a per-unit defect | all |
16
16
  | **Roadmap coherence** | Stale/obsolete/superseded features, missing dependencies, gaps & opportunities | all |
17
17
  | **Installed tooling** | Installed skills + connected MCP servers vs. the project's applicable axes and roadmap features — unregistered-but-useful items, and tooling that would change a feature's scope | all |
18
18
 
@@ -4,7 +4,7 @@
4
4
  2. **Sweep code & axes** — run the applicable axes across the codebase: compose
5
5
  `review-implementation` plus the internal review pack's applicable passes
6
6
  (each returns its fixed-format table + PASS|FAIL), and any optional installed
7
- extras. Classify findings (severity + fix-now / postpone / tradeoff).
7
+ extras. Classify findings (severity + closed class set from review-implementation/CLASSIFY.md).
8
8
 
9
9
  **Evidence-provenance gate (fixed):** applies during every evidence-collecting sweep
10
10
  step (2–5). Each item ends with exactly one fallback; never pick another one mid-audit.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: replan-findings
3
3
  user-invocable: false
4
- version: 1.1.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
4
+ version: 1.1.1
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal contract: the conditional replan entry. Loaded only when
@@ -67,8 +67,8 @@ fingerprint: <sha256 over the inputs the answer used>
67
67
  - `read-set` is the bounded intake below: at most 12 paths, then an explicit
68
68
  `… and N more` line — never a silent truncation.
69
69
  - `open-rows`/`rows:` come from the ledger's open rows only (`folded` not
70
- `yes`/`—`/`-`/`n/a`/empty), and the id shapes `VF-<n>` and `REVIEW-RAN` are
71
- marks, never findings.
70
+ `yes`/`—`/`-`/`n/a`/empty), and the id shapes `VF-<n>`, `REVIEW-RAN` and
71
+ `GATE-RAN` are marks, never findings.
72
72
 
73
73
  Exit codes are part of the contract: a route prints and exits **0**; an unknown
74
74
  unit, or any argument count other than one, exits **1**; an ambiguous token (a
@@ -2,7 +2,7 @@
2
2
  name: review-a11y
3
3
  user-invocable: false
4
4
  version: 1.1.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal accessibility review pass of the agentic-workflow review pack —
@@ -2,7 +2,7 @@
2
2
  name: review-brand
3
3
  user-invocable: false
4
4
  version: 1.1.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal brand & copy review pass of the agentic-workflow review pack — composed
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: review-change
3
3
  user-invocable: true
4
- version: 3.6.0
4
+ version: 3.7.0
5
5
  argument-hint: <path-or-glob> [--adversarial N] [--synthesize]
6
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
8
8
  description: >
9
9
  Review a change with only applicable internal axes, classify every finding,
@@ -152,12 +152,14 @@ sequential/headless fallbacks; never collapse independent adversarial passes.
152
152
  Orchestrates internal finders (`review-code`, `review-security`, `review-verify`,
153
153
  `review-design`, `review-a11y`, `review-brand`, `review-perf`, `review-seo`), then
154
154
  one `review-implementation` classifier and `review-debt` transform, isolated by
155
- default; installed platform packs are optional. `triage-issue` is user-invoked
156
- only for independent proposals (D3). It is Stage 4: checkpoint reviews are
155
+ default; installed platform packs are optional. `triage-issue` is user-invoked,
156
+ never auto-run (D3), for independent proposals, audit findings, and
157
+ `--prioritize-now` runs. It is Stage 4: checkpoint reviews are
157
158
  optional, the end review is mandatory and fresh. `fix-now` is routed to the
158
159
  unit's fold cycle — a separate `/fold-findings` invocation, never run by this review;
159
160
  `replan-in-unit` adds user-confirmed phases, and independent work becomes
160
- proposals. `audit-pr` consumes only the verified PR-comment receipt, never the
161
+ proposals. `audit-pr` consumes
162
+ only the verified PR-comment receipt, never the
161
163
  chat report; `product-audit` is the periodic sweep. On `REVIEW-FAIL` the manual
162
164
  correction path is `/fold-findings`, then re-run `/review-change` on the changed
163
165
  HEAD (bounded at two cycles — a third cycle never starts without an explicit
@@ -35,7 +35,8 @@ lost, and none becomes reviewer-created backlog (D3):
35
35
  - **fix-now / `decision-required`** → stop and surface the decision to the user;
36
36
  the unit blocks until decided. No issue is created.
37
37
  - **proposal** (independent future capability) → batched in the report with a
38
- trigger; only the **user** routes it to `triage-issue`.
38
+ trigger; only the **user** routes it to `triage-issue` (independent
39
+ proposals, audit findings, or `--prioritize-now` runs).
39
40
  - **ignore** → note the rationale in the report; no further action.
40
41
 
41
42
  The report's `Decision:` line is **three-state** (D10): `REVIEW-PASS` when the
@@ -18,14 +18,17 @@ exact command tokens.
18
18
  `gh pr view --json state` when a PR is open; otherwise the unit is unmerged
19
19
  by definition). Otherwise, for each **fix-now** finding of severity `high`
20
20
  or `med` (only ledger severities; finder scale
21
- `critical`→`high`, `major`→`med`, `minor`→`low`): append a row
21
+ converts through the canonical table in
22
+ `CLASSIFY.md`):
23
+ append a row
22
24
  (create the file with the header row when missing), carrying the
23
25
  verbatim `Sev` value into `severity`; `folded` always starts `no` — that
24
26
  row comes from a **confirmed** candidate only and carries its
25
27
  `finding-mark@1` signature on a **separate `VF-` row** (reviewer, head SHA,
26
28
  recheck + reproducer), as modeled in `LEDGERS.md` (§finding-mark@1) and the
27
29
  fixture.
28
- `execute-phase`'s fold cycle is the only step that ever flips it to `yes`.
30
+ `ledger-ownership@1` / `fold-findings:folded-flag` is the sole writer of
31
+ the `folded: no → yes` flip.
29
32
  A `low` finding is **never persisted to the fold ledger** — report-only
30
33
  note (step 13), never blocking (finders' materiality floor). Re-runs
31
34
  **dedupe by `file:line` + axis**:
@@ -35,16 +38,19 @@ exact command tokens.
35
38
  **Non-fix-now findings are never written here** — they keep
36
39
  their destinations from step 11 (outcome routing): independent future
37
40
  capabilities batch as proposals; only the user routes them to `triage-issue`
38
- (D3).
39
- **Commit the ledger append** — rows + `REVIEW-RAN` mark, one commit
40
- (`docs(<unit>): persist review findings F<n>–F<m>`), pushed when a PR is open;
41
+ (independent proposals, audit findings, or `--prioritize-now` runs) (D3).
42
+ **Commit the ledger append** — rows + `REVIEW-RAN` + `GATE-RAN` marks,
43
+ one commit (a reviewer records a `GATE-RAN` mark for the gate run the review
44
+ performed and consumes an identical-head green mark instead of re-running,
45
+ see `LEDGERS.md` §gate-ran@1; `docs(<unit>): persist review findings`);
46
+ pushed when a PR is open;
41
47
  an uncommitted append hands the next review a dirty-tree stop. On
42
- `REVIEW-PASS` with an open PR no ledger write happens (the SHA-bound
43
- receipt is the durable record): head and posted receipt stay identical.
44
- This skill's only mutations are this ledger commit (step 11) and, on
45
- `REVIEW-PASS` with a PR, the receipt comment (step 12) — it never runs a
46
- fold, executes a phase, or edits source (see the review-end turn boundary in
47
- the SKILL.md Turn contract).
48
+ `REVIEW-PASS` with an open PR the SHA-bound receipt is the durable record:
49
+ head and posted receipt stay identical.
50
+ This skill's only mutations are the rows + `REVIEW-RAN` + `GATE-RAN` marks
51
+ (all in the step 11 commit), and, on `REVIEW-PASS` with a PR, the receipt
52
+ comment (step 12) — it never runs a fold, executes a phase, or edits source
53
+ (see the review-end turn boundary in the SKILL.md Turn contract).
48
54
  12. **Close out the final-review receipt before reporting.** Derive the
49
55
  `Decision` from step 7 and persist step 11 first. Then — **only on
50
56
  `Decision: REVIEW-PASS` and when the PR exists** — run the receipt emitter,
@@ -2,7 +2,7 @@
2
2
  name: review-code
3
3
  user-invocable: false
4
4
  version: 1.2.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal correctness + simplification review pass of the agentic-workflow
@@ -2,7 +2,7 @@
2
2
  name: review-debt
3
3
  user-invocable: false
4
4
  version: 1.1.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal tech-debt transform pass of the agentic-workflow review pack —
@@ -2,7 +2,7 @@
2
2
  name: review-design
3
3
  user-invocable: false
4
4
  version: 1.1.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal UI/UX design review pass of the agentic-workflow review pack —
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: review-implementation
3
3
  user-invocable: false
4
- version: 1.8.0
4
+ version: 1.9.0
5
5
  argument-hint: <path-or-glob>
6
6
  allowed-tools: Read, Grep, Glob, Bash, WebFetch
7
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
7
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
8
8
  license: MIT
9
9
  description: >
10
10
  Internal scope/classification engine composed by review-change (and reused by
@@ -5,6 +5,61 @@ the **synthesized** findings table (D5). Classify each finding into exactly one
5
5
  class, in this order. Never reopen source files to classify; the table's
6
6
  evidence is authoritative.
7
7
 
8
+ ### Severity conversion (canonical table)
9
+
10
+ The single-owner table below maps every severity scale the review pack emits
11
+ onto the classification scale (`high | med | low`). Only this section may
12
+ convert — a consumer facing an unknown scale **fails closed** (no ad-hoc
13
+ conversion). The table replaces the ad-hoc mapping that lived at
14
+ `PERSIST_AND_DECIDE.md`.
15
+
16
+ The sensor's own `SEVERITY_VOCABULARY` map (`scripts/workflow-status.mjs:718-721`)
17
+ is a direct projection of this table onto the envelope schema's `high|med|low`
18
+ enum, not a competing converter; it always produces a value listed here.
19
+
20
+ | Producer scale | → `high` | → `med` | → `low` |
21
+ |---|---|---|---|
22
+ | Ledger (`CLASSIFY.md` itself): `high` | self | — | — |
23
+ | Ledger: `med` | — | self | — |
24
+ | Ledger: `low` | — | — | self |
25
+ | Finder (nine review passes): `critical` → `high` | ✓ | — | — |
26
+ | Finder: `major` → `med` | — | ✓ | — |
27
+ | Finder: `minor` → `low` | — | — | ✓ |
28
+ | Planning: `critical` → `high` | ✓ | — | — |
29
+ | Planning: `high` → `high` | ✓ | — | — |
30
+ | Planning: `medium` → `med` | — | ✓ | — |
31
+ | Planning: `low` → `low` | — | — | ✓ |
32
+ | Planning: `info` → `low` | — | — | ✓ |
33
+ | `audit-docs`: `high` → `high` | ✓ | — | — |
34
+ | `audit-docs`: `low` → `low` | — | — | ✓ |
35
+
36
+ **Unknown scale → fail closed.** A scale not listed above is an error; the
37
+ consuming skill must not guess.
38
+
39
+ ### Derived blocking gate
40
+
41
+ A finding **blocks** only when the reviewer cites which single-owner source
42
+ fails — blocking is a table lookup over cited sources, never a severity
43
+ opinion. The four citation categories are:
44
+
45
+ 1. **ACCEPTANCE criterion** unverified or failed.
46
+ 2. **Obligation row** in the unit's ledger is not `verified` or `n-a`.
47
+ 3. **Gate is red** at the reviewed head (the project gate exited non-zero at
48
+ the exact head under review).
49
+ 4. **Open confirmed `fix-now` row** on the fold ledger (a finding already
50
+ persisted as `fix-now` with `folded: no`).
51
+
52
+ No citation among these four categories → the finding is a **report-note** or
53
+ **proposal**, never blocking. D10's verdict rule (the three-way `REVIEW-PASS |
54
+ REVIEW-FAIL | NEEDS-DECISION` verdict) remains **unchanged** — the derived gate
55
+ operates inside the `REVIEW-FAIL` branch as the evidence that determines whether
56
+ a finding truly blocks.
57
+
58
+ **`report-note` definition owner.** The `report-note` classification is owned by
59
+ `LEDGERS.md` §3 (`:91-96`): material is `medium`+, a `low` row is a persisted
60
+ report-note. Classifying surfaces cite this owner instead of restating the
61
+ materiality bar.
62
+
8
63
  ### Step 1 — `ignore` first (the claim, not a class choice)
9
64
 
10
65
  `ignore` claims **"this is not a real defect"** — a false positive or a
@@ -2,7 +2,7 @@
2
2
  name: review-perf
3
3
  user-invocable: false
4
4
  version: 1.2.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal performance review pass of the agentic-workflow review pack — composed
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: review-plan
3
3
  user-invocable: true
4
- version: 1.6.1
4
+ version: 1.7.0
5
5
  argument-hint: <NN-slug | fix-N | path/to/SPEC.md> [--adversarial N]
6
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
8
8
  description: >
9
9
  Independent read-only review of a frozen Engineering plan before execution, in a
@@ -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
  ```
@@ -2,7 +2,7 @@
2
2
  name: review-security
3
3
  user-invocable: false
4
4
  version: 1.1.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal security review pass of the agentic-workflow review pack — composed
@@ -2,7 +2,7 @@
2
2
  name: review-seo
3
3
  user-invocable: false
4
4
  version: 1.1.0
5
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
5
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
6
6
  license: MIT
7
7
  description: >
8
8
  Internal SEO review pass of the agentic-workflow review pack — composed
@@ -1,9 +1,9 @@
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
- author: "Gabriel Trabanco <gtrabanco@users.noreply.github.com>"
6
+ author: "Gabriel Trabanco <1969593+gtrabanco@users.noreply.github.com>"
7
7
  license: MIT
8
8
  description: >
9
9
  Independent read-only review of a frozen Product half before engineering