pi-gauntlet 8.0.2 → 8.1.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 (29) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +7 -5
  3. package/agents/loop-implementer.md +33 -9
  4. package/bin/gauntlet-performance.mjs +10 -1
  5. package/bin/gauntlet-performance.test.mjs +85 -5
  6. package/bin/gauntlet-telemetry-seal.mjs +1 -1
  7. package/extensions/lib/plan-check.test.ts +4 -2
  8. package/extensions/lib/plan-check.ts +1 -1
  9. package/extensions/lib/telemetry-collect.test.ts +13 -6
  10. package/extensions/lib/telemetry-collect.ts +4 -3
  11. package/extensions/lib/telemetry-record.test.ts +14 -0
  12. package/extensions/lib/telemetry-record.ts +2 -2
  13. package/extensions/phase-tracker.test.ts +45 -0
  14. package/extensions/plan-tracker.test.ts +100 -1
  15. package/extensions/plan-tracker.ts +99 -3
  16. package/extensions/telemetry.test.ts +103 -0
  17. package/extensions/telemetry.ts +19 -6
  18. package/package.json +2 -2
  19. package/skills/brainstorming/reference/amendment-surface.md +1 -1
  20. package/skills/finishing-a-development-branch/SKILL.md +5 -5
  21. package/skills/finishing-a-development-branch/reference/legs.md +4 -4
  22. package/skills/finishing-a-development-branch/reference/verification-set.md +34 -0
  23. package/skills/gauntlet-handoff/SKILL.md +1 -1
  24. package/skills/gauntlet-resume/SKILL.md +4 -5
  25. package/skills/gauntlet-resume/reference/brief-contract.md +7 -7
  26. package/skills/gauntlet-resume/reference/reconstruction.md +28 -6
  27. package/skills/loop-implementation/SKILL.md +48 -32
  28. package/skills/loop-implementation/reference/coordinated-legs.md +8 -18
  29. package/skills/verification-before-completion/reference/conformance-check.md +9 -3
@@ -124,6 +124,12 @@ carried gap's `recommended`. Re-run steps 1-2 above over the **full current
124
124
  open-gap set** each time the reviewer returns a report — never reuse a stale
125
125
  partition from an earlier round.
126
126
 
127
+ ### Ledger subjects
128
+
129
+ Treat a `# Ledger - loop engine` subject as the loop path, never the ad-hoc no-plan path. Read `/skill:loop-implementation`'s `## Gate set` at its absolute skill path and apply it at every test site below, including its missing-`checks:` stop, checkout ownership, fail-fast execution and `LOG_DIR` redirection. Reuse the executing skill's session `LOG_DIR`; on a resumed session mint it once at the first gate-set site. Keep the plan and ad-hoc rules below unchanged for non-ledger subjects.
130
+
131
+ For a ledger repair or Convergence task, pass the failing command, its checkout, exit code and log path, never pasted output. The child reads the log to derive the files to touch, including Convergence (c)'s files named by failing output; the driver does not read it. Feed that single gate failure into the existing fix-round machinery.
132
+
127
133
  ### Fix loop - SDD wave-loop mirror, per round
128
134
 
129
135
  Mirrors `subagent-driven-development`'s wave loop and reuses its
@@ -150,7 +156,7 @@ Per round:
150
156
  whose `evidence` opens with the over-spec provenance (`spec "<section>" - "<clause>" (over-spec)`), the orchestrator adds the spec path to that gap's `touched-files` before dispatch,
151
157
  so the implementer deletes the surface **and** the clause/AC line in the same
152
158
  fix commit; the re-audit then has no `Rn` for it and no `MISSING` echo. The dispatch adds `SCOPED_TEST_COMMANDS`
153
- to the gap block: the gap-relevant plan-declared commands, or `none`; on an ad-hoc no-plan path, the project's canonical test command.
159
+ to the gap block: for a ledger, the complete gate set with owning checkouts and the ledger-subject execution rule above; retain leg identity, remap the child's repaired leg to its actual isolated worktree and run that leg's pairs with `LOG_DIR` from its own `mktemp -d`; preserve the parent's checkout set and session `LOG_DIR` for post-integration runs; otherwise the gap-relevant plan-declared commands, or `none`; on an ad-hoc no-plan path, the project's canonical test command.
154
160
  3. **Integrate** serially via `git -C "<conformance-worktree>" apply` onto the worktree HEAD, one gap's
155
161
  patch at a time. Commit each per-gap fix with the message **`conformance fix Gn`** (durable,
156
162
  `git log`-readable pre-squash) so the finish gate and any revert can identify
@@ -164,7 +170,7 @@ Per round:
164
170
  integrated changes. Every re-run or retry inside this loop is itself a
165
171
  one-task `tasks` wave (never a lone `agent: "implementer"`) and counts as a
166
172
  wave against `maxFixRounds`. A `BLOCKED`/`NEEDS_CONTEXT` return surfaces to the user.
167
- 4. **Scoped tests** on the integrated tree: run the round's `SCOPED_TEST_COMMANDS` union as `(cd "<conformance-worktree>" && <command>)`. A failure re-enters the failure-handling rules above.
173
+ 4. **Scoped tests** on the integrated tree: for a ledger, run the complete gate set per Ledger subjects above. Otherwise run the round's `SCOPED_TEST_COMMANDS` union as `(cd "<conformance-worktree>" && <command>)`. A failure re-enters the failure-handling rules above.
168
174
  5. **Re-audit**: Happy-path re-run first, when the prior audit received a happy-path input: if `$HP_DIR` no longer exists (finish-time `fix-now` in a resumed session), re-derive the row per step 3.1 from the overrides table, then re-run the step-3 procedure when `git -C "<worktree>" diff --name-only <audited-base>..HEAD` contains a path inside that row's `Paths` or an open gap's `evidence:` cites the summary path, else pass `not run - no prior transcript`. Otherwise re-run the step-3 procedure into a fresh `$HP_DIR` when either (a) `git -C "<worktree>" diff --name-only <head from current summary.txt>..HEAD` contains a path inside the current row's `Paths` (the summary's `head:` line is the diff base, so changes from skipped rounds accumulate into the next comparison); (b) an open gap's `evidence:` cites the summary path. Otherwise pass the previous summary unchanged. When the re-run's outcome differs from the previous one, extend this re-audit's scope to every row whose `evidence:` cites the summary. Rounds touching only paths outside every row never re-run. Then foreground re-dispatch `conformance-reviewer` with `async: false`, `cwd` = the conformance worktree, over the fixes **plus** the
169
175
  regression guard (any prior-`DELIVERED` requirement whose `evidence` file
170
176
  the fix diff touched). Pass the full prior conformance report (every row,
@@ -192,7 +198,7 @@ Per round:
192
198
 
193
199
  **Convergence** — runs after R0 `CONFORMS` and after every `CONFORMS` re-audit. `r0-head` is HEAD when the loop was entered (the R0 dispatch, or the finish-time `fix-now` entry) - the parent of the oldest `conformance fix` commit; `audited-base` stays the last audit's HEAD SHA.
194
200
 
195
- a. Run the full plan-header `Verification` set once as `(cd "<conformance-worktree>" && <command>)` (ad-hoc: the project's canonical test command). After R0 `CONFORMS` with no round run, the pre-R0 full run counts.
201
+ a. For a ledger, run the complete gate set per Ledger subjects above. Otherwise: Run the full plan-header `Verification` set once as `(cd "<conformance-worktree>" && <command>)` (ad-hoc: the project's canonical test command). After R0 `CONFORMS` with no round run, the pre-R0 run of the applicable set counts.
196
202
  b. Dispatch `wave-reviewer` directly (foreground, `async: false`, `cwd` = the conformance worktree, `SCOPED_TEST_COMMANDS: none`) over `git diff <r0-head>..HEAD`; never via `/skill:requesting-code-review`. An empty diff is nothing to review - no dispatch.
197
203
  c. Repair items = every failing command from a + every Critical/Moderate finding from b (the re-audit is their origin check). None → write the closure block; done. Any at the cap → escalate per step 6 with the test/CR trail (an explicit human approval re-enters via `grant_fix_rounds`, as step 6 describes). Any under the cap → re-enter step 2 as a one-task `tasks` wave: one `implementer` whose task is every repair item verbatim (ownership boundary = the files in `git diff <r0-head>..HEAD`, the CR findings' `touched-files`, and the files each failing command's output names, `SCOPED_TEST_COMMANDS: none`, no `Gn` tracker task, no gap selection), integrate as one `conformance fix CR`, re-audit, then Convergence again. That wave counts against `maxFixRounds`. Later Convergence CRs keep the same `<r0-head>..HEAD` range.
198
204