pi-gauntlet 5.9.0 → 5.9.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.
- package/CHANGELOG.md +4 -0
- package/README.md +2 -0
- package/extensions/lib/checkout.test.ts +59 -0
- package/extensions/lib/checkout.ts +57 -0
- package/extensions/lib/gauntlet-settings-loader.test.ts +32 -0
- package/extensions/lib/gauntlet-settings-loader.ts +11 -7
- package/extensions/lib/phase-tracker-helpers.test.ts +17 -0
- package/extensions/lib/phase-tracker-helpers.ts +16 -17
- package/extensions/lib/telemetry-paths.test.ts +10 -0
- package/extensions/lib/telemetry-paths.ts +9 -5
- package/extensions/phase-tracker.test.ts +75 -23
- package/extensions/phase-tracker.ts +20 -29
- package/extensions/telemetry.test.ts +51 -10
- package/extensions/telemetry.ts +57 -41
- package/extensions/verify-before-ship.test.ts +16 -0
- package/extensions/verify-before-ship.ts +4 -4
- package/package.json +1 -1
- package/skills/brainstorming/SKILL.md +7 -5
- package/skills/finishing-a-development-branch/SKILL.md +51 -88
- package/skills/gauntlet-resume/SKILL.md +1 -3
- package/skills/gauntlet-resume/reference/brief-contract.md +1 -1
- package/skills/roasting-the-spec/SKILL.md +1 -1
- package/skills/subagent-driven-development/SKILL.md +18 -15
- package/skills/using-git-worktrees/SKILL.md +46 -39
- package/skills/verification-before-completion/reference/conformance-check.md +6 -6
- package/skills/verification-before-completion/reference/settings-precedence.md +8 -6
- package/skills/writing-plans/SKILL.md +5 -3
- package/skills/writing-plans/reference/plan-contract.md +1 -1
|
@@ -149,7 +149,7 @@ Per round:
|
|
|
149
149
|
so the implementer deletes the surface **and** the clause/AC line in the same
|
|
150
150
|
fix commit; the re-audit then has no `Rn` for it and no `MISSING` echo. The dispatch adds `SCOPED_TEST_COMMANDS`
|
|
151
151
|
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.
|
|
152
|
-
3. **Integrate** serially via `git apply` onto the worktree HEAD, one gap's
|
|
152
|
+
3. **Integrate** serially via `git -C "<conformance-worktree>" apply` onto the worktree HEAD, one gap's
|
|
153
153
|
patch at a time. Commit each per-gap fix with the message **`conformance fix Gn`** (durable,
|
|
154
154
|
`git log`-readable pre-squash) so the finish gate and any revert can identify
|
|
155
155
|
auto-applied fixes; a Convergence repair wave commits as one **`conformance fix CR`**.
|
|
@@ -162,8 +162,8 @@ Per round:
|
|
|
162
162
|
integrated changes. Every re-run or retry inside this loop is itself a
|
|
163
163
|
one-task `tasks` wave (never a lone `agent: "implementer"`) and counts as a
|
|
164
164
|
wave against `maxFixRounds`. A `BLOCKED`/`NEEDS_CONTEXT` return surfaces to the user.
|
|
165
|
-
4. **Scoped tests** on the integrated tree: the round's `SCOPED_TEST_COMMANDS` union
|
|
166
|
-
5. **Re-audit**: foreground re-dispatch `conformance-reviewer` with `async: false` over the fixes **plus** the
|
|
165
|
+
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.
|
|
166
|
+
5. **Re-audit**: foreground re-dispatch `conformance-reviewer` with `async: false`, `cwd` = the conformance worktree, over the fixes **plus** the
|
|
167
167
|
regression guard (any prior-`DELIVERED` requirement whose `evidence` file
|
|
168
168
|
the fix diff touched). Pass the full prior conformance report (every row,
|
|
169
169
|
including DELIVERED rows and their `evidence` `file:line`) and the round's
|
|
@@ -190,8 +190,8 @@ Per round:
|
|
|
190
190
|
|
|
191
191
|
**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.
|
|
192
192
|
|
|
193
|
-
a. Run the full plan-header `Verification` set once (ad-hoc: the project's canonical test command). After R0 `CONFORMS` with no round run, the pre-R0 full run counts.
|
|
194
|
-
b. Dispatch `code-reviewer` directly (foreground, `async: false`, `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.
|
|
193
|
+
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.
|
|
194
|
+
b. Dispatch `code-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.
|
|
195
195
|
c. Repair items = every failing command from a + every Critical/Moderate finding from b (`Behaviour-change: yes` included; the re-audit is its 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.
|
|
196
196
|
|
|
197
197
|
`conformance fix CR` is not a gap fix: it is absent from the `auto-applied fix commits` index and has no `revert conformance fix Gn` action at the finish gate.
|
|
@@ -371,7 +371,7 @@ commit to the **current working tree**, not to HEAD (a commit-to-commit diff
|
|
|
371
371
|
misses staged/unstaged edits when HEAD has not moved). Run two cheap commands:
|
|
372
372
|
|
|
373
373
|
```bash
|
|
374
|
-
ROOT
|
|
374
|
+
ROOT=<abs worktree path passed in with the audit>
|
|
375
375
|
git -C "$ROOT" diff --stat <audited-base> -- . # tracked changes since the audited commit (staged + unstaged)
|
|
376
376
|
git -C "$ROOT" status --porcelain --untracked-files=all # new/untracked deliverables
|
|
377
377
|
```
|
|
@@ -40,16 +40,18 @@ Do **not** read or merge these files by hand. Resolution is centralized:
|
|
|
40
40
|
report - never fall back to a manual bash/JSON merge (that fallback is exactly
|
|
41
41
|
the failure mode this centralization removes).
|
|
42
42
|
- **Extensions** call `loadGauntletSettings(ctx.cwd)` from
|
|
43
|
-
`extensions/lib/gauntlet-settings-loader.ts`,
|
|
43
|
+
`extensions/lib/gauntlet-settings-loader.ts`, which returns `{ gauntlet, errors, root }`
|
|
44
|
+
with `root` set to that toplevel, then call the matching resolver in
|
|
44
45
|
`extensions/lib/gauntlet-settings.ts`.
|
|
45
46
|
|
|
46
47
|
Both paths go through pi's own `SettingsManager`, so they resolve the same merged
|
|
47
48
|
value. The `phase-tracker.ts` closure guard reads via `loadGauntletSettings` +
|
|
48
49
|
`resolveClosureReview`, resolving the same value the tool returns.
|
|
49
50
|
|
|
50
|
-
## Scope:
|
|
51
|
+
## Scope: the session cwd's checkout
|
|
51
52
|
|
|
52
|
-
The tool and loader
|
|
53
|
-
primary checkout
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
The tool and loader resolve the repo layer from the git toplevel of pi's session cwd
|
|
54
|
+
(`ctx.cwd`): launched in the primary checkout or any of its subdirectories, that is
|
|
55
|
+
`<primary>/.pi/settings.json`; launched inside a linked worktree, that worktree's own
|
|
56
|
+
file. One checkout, one file - a worktree's `.pi/settings.json` is not consulted when
|
|
57
|
+
pi runs in the primary.
|
|
@@ -19,7 +19,7 @@ Before drafting the plan, check `phase_tracker({ action: "status" })`. If `plan`
|
|
|
19
19
|
|
|
20
20
|
**Input:** an approved spec in `<project>/doc/specs/<filename>.md` — produced by `/skill:brainstorming` in this session, or restored from another session by `/skill:gauntlet-resume`. Those two are the only entry points.
|
|
21
21
|
|
|
22
|
-
**Save plans to:** the sibling `doc/plans/` directory next to the spec. The plan filename matches the spec filename exactly — same date, same ticket ID (if any), same topic slug, no `-design` suffix.
|
|
22
|
+
**Save plans to:** the sibling `doc/plans/` directory next to the spec. The plan filename matches the spec filename exactly — same date, same ticket ID (if any), same topic slug, no `-design` suffix. The plan path is absolute under the worktree (`<abs worktree path>/doc/plans/<filename>.md`, the path reported by `using-git-worktrees`), and `plan_check({ planPath })` receives that absolute path - the tool roots its checks at the plan's own checkout, not at the session cwd.
|
|
23
23
|
|
|
24
24
|
| Spec path | Plan path |
|
|
25
25
|
|---|---|
|
|
@@ -161,7 +161,7 @@ Each step is **one action, 2-5 minutes**:
|
|
|
161
161
|
---
|
|
162
162
|
```
|
|
163
163
|
|
|
164
|
-
The full verification entrypoint appears only on the `**Verification:**` line — see [reference/plan-contract.md § Header-only entrypoint](reference/plan-contract.md). The verify phase reads it from the plan; execution runs `Tests:` commands only.
|
|
164
|
+
The full verification entrypoint appears only on the `**Verification:**` line — see [reference/plan-contract.md § Header-only entrypoint](reference/plan-contract.md). The verify phase reads it from the plan; execution runs `Tests:` commands only. Execution runs it in the worktree via the subshell form `(cd "<abs worktree path>" && <command>)`; the process cwd stays in the primary checkout, and dispatch `cwd` is the worktree path.
|
|
165
165
|
|
|
166
166
|
## Task Structure
|
|
167
167
|
|
|
@@ -223,6 +223,8 @@ Each task uses `- [ ]` checkbox steps so execution tools (and humans) can track
|
|
|
223
223
|
|
|
224
224
|
Every code task carries this step (red -> green -> fmt/lint -> commit). Doc-only tasks omit it unless the project formats Markdown.
|
|
225
225
|
|
|
226
|
+
Task commit steps use bare `git`: the implementer subagent runs with the checkout as its cwd (dispatch `cwd`, or its own worktree in Parallel-Wave Mode), so `git -C` would point at the wrong tree.
|
|
227
|
+
|
|
226
228
|
**Anchor rules.** See [reference/plan-contract.md § Spec anchors](reference/plan-contract.md). A task with no anchorable requirement omits the `**Spec:**` line and carries a mechanical-task row in `## Spec coverage` — silence is never valid.
|
|
227
229
|
|
|
228
230
|
## Spec Coverage Table
|
|
@@ -252,7 +254,7 @@ If a decision is genuinely open, put it in an explicit **Open Questions** sectio
|
|
|
252
254
|
|
|
253
255
|
After drafting the plan and before announcing it complete, run the deterministic checker, then the judgment checks yourself — not a subagent dispatch.
|
|
254
256
|
|
|
255
|
-
- **Deterministic checker.** Run `plan_check({ planPath })` on the saved plan. Assess and fix every finding yourself (no human involvement), then re-run until it passes — a pass writes the execution stamp that implement-start verifies mechanically. If the same finding survives 3 fix rounds, convert it to an explicit Open Question and stop (the pre-existing Open-Questions halt, resolved by the human in-session — not a new gate). Findings are defined in [reference/plan-contract.md](reference/plan-contract.md).
|
|
257
|
+
- **Deterministic checker.** Run `plan_check({ planPath: "<abs plan path>" })` on the saved plan. Assess and fix every finding yourself (no human involvement), then re-run until it passes — a pass writes the execution stamp that implement-start verifies mechanically. If the same finding survives 3 fix rounds, convert it to an explicit Open Question and stop (the pre-existing Open-Questions halt, resolved by the human in-session — not a new gate). Findings are defined in [reference/plan-contract.md](reference/plan-contract.md).
|
|
256
258
|
- **Code-vs-anchor sanity.** For each task-owned requirement row, re-read the anchored spec lines and confirm the owner tasks' bodies do what they say - mechanism present, not just the quoted literal. For each `Verification` row, confirm the header command exercises the anchored requirement. Fix the task, don't annotate.
|
|
257
259
|
- **Type / API consistency.** Function signatures and field names that appear in multiple tasks must match exactly. The plan is its own contract — internal contradictions surface as bugs during execution.
|
|
258
260
|
- **Test contract.** Every code task's `Tests:` commands are anchored to its `Test:` path(s); `none:` only where no tests apply; a spec-named seam appears as `via:`, a spec-named fixture path as `Create:`.
|
|
@@ -27,7 +27,7 @@ Every `### Task N` carries a `**Tests:**` block: the bare line `**Tests:**` dire
|
|
|
27
27
|
|
|
28
28
|
Absence is never valid. A `- [ ]` step or any non-bullet line ends the block. `via:` and `none:` are unchecked beyond form.
|
|
29
29
|
|
|
30
|
-
Commands run
|
|
30
|
+
Commands are written repo-relative and run in the worktree via `(cd "<abs worktree path>" && <command>)` - the checker never runs them; the executor does. Each command is split into segments on `&&`, `||`, `;`, `|`; every segment must contain, as a whitespace-delimited token, a `Test:` path of the same task (the path alone, or followed by `::`, `#`, or `:` and a filter). A `Test:` value containing `*`, `?`, `[` or ending in `/` never anchors; any other argument token with those shapes is a broadening selector and fails. `cd `, `sh -c`, `bash -c`, `eval `, `$(` are unsupported. Each `Test:` path must exist or be a `Create:` path of some task. A segment equal to a header `**Verification:**` segment is a full-suite command and fails. Runners with no file-addressable form are out of scope (`go test ./pkg -run X`, `mvn -Dtest=`).
|
|
31
31
|
|
|
32
32
|
## Solo line (`solo-line`)
|
|
33
33
|
|