pi-gauntlet 7.32.0 → 7.32.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## v7.32.1 - 2026-10-26
4
+
5
+ ### Changed
6
+
7
+ - **The plan-writer retains baseline evidence across spec- and plan-only amendments instead of rerunning every `Tests:` command.** On a Findings or Amend re-dispatch, Baseline step 2 proves once per recorded SHA that the tree outside the spec and plan directories is unchanged (`git diff --quiet <recorded> <BASE> -- . ':!<spec dir>/' ':!<plan dir>/'`, or the jj `diff --from --to --summary` equivalent with an empty filtered summary), then re-stamps unchanged commands' bullets to the current base and appends one `retained <n> bullets: <recorded> -> <BASE>, ...` line to the step-1 provenance note. Any proof failure, a changed command, missing or invalid evidence, an admitted in-flight path outside those directories, or `Findings: rerun baseline` reruns everything and retains nothing; `plan_check` and the one-SHA rule are untouched. Supersedes only the "same base" retention condition of the gh-72 spec (`skills/writing-plans/SKILL.md` Baseline step 2, `agents/plan-writer.md` step 5; spec `doc/specs/2026-10-26-selective-baseline-rerun-on-amend.md`). (#85)
8
+ - Eval sample `baseline-equivalent-restamp` (two scenarios) under `eval/writing-plans/`; `fresh-child-authors-plan` and `pr-subject-threads` expectations clarified. (#85)
9
+
3
10
  ## v7.32.0 - 2026-10-25
4
11
 
5
12
  ### Added
@@ -32,13 +32,13 @@ The task names five absolute paths: the worktree, the approved spec, the plan pa
32
32
  2. Read the plan skill file (`SKILL.md`) from its `## File Structure` heading through the end of its `## Self-Review` section, and the whole plan contract file (`plan-contract.md`). That text is the plan contract; follow it as written.
33
33
  3. Read the spec in full. Recon the code the spec touches by reading it directly: exact paths to create, modify, or delete; call sites and tests with line ranges; the scoped command that runs one test file; scoped and repo-wide lint and format commands; the full-suite verification entrypoint and whether it bundles style checks. Dispatch nothing.
34
34
  4. Write the plan at the plan path with `write` as a full replacement. The plan path is the only file you write; never create or edit any other file.
35
- 5. Run Baseline from the skill's Self-Review before `plan_check({ planPath })`. On Findings/Amend re-dispatch, read provenance once for the current base; retain evidence only for unchanged commands on that same base, rerun missing, invalid, changed-command or changed-SHA evidence, and rerun every command for `Findings: rerun baseline`. Never rewrite SHAs without execution. Baseline owns and regenerates its rows; preserve unresolved contract rows.
35
+ 5. Run Baseline from the skill's Self-Review before `plan_check({ planPath })`. On Findings/Amend re-dispatch, read provenance once for the current base; retain evidence for unchanged commands whose recorded SHA is BASE or proven tree-equivalent per the skill's Baseline step 2. Rerun missing, invalid, or changed-command evidence, every command on any proof failure, and every command for `Findings: rerun baseline`. Rewrite SHAs only after execution or a recorded tree-equivalence. Baseline owns and regenerates its rows; preserve unresolved contract rows.
36
36
  6. Run the deterministic checker and judgment checks in Self-Review, including Contract decisions. Repair `baseline-line` and substantive baseline `open-questions` findings only by Baseline execution, never by authoring evidence or deleting/rewording a row. Normalize malformed Open Questions into rows without changing substantive text. Fix every other finding; with substantive rows remaining, reply `OPEN QUESTIONS <abs plan path>` immediately, without a passing check or repair rounds for those rows. Any ordinary edit returns to step 5.
37
37
  7. Stop when `plan_check` passes and judgment checks cause no edit. Apply the 3-round budget only to ordinary findings: convert an exhausted finding to an Open Questions row and stop. Findings blocks continue that finding's count across dispatches. Omit the section when no rows remain and reply per the output contract.
38
38
 
39
39
  ## Rules
40
40
 
41
- - Use `bash` only for Baseline provenance (`git rev-parse`, `git status --porcelain`, or the contract's jj equivalents) and the plan's own `Tests:` commands in the worktree. Write only the plan. Never edit tracked source, commit, run `stash`, `checkout`, `restore`, `clean`, or mutate jj's working copy or revisions (`new`, `commit`, `abandon`, `restore`, `squash`).
41
+ - Use `bash` only for Baseline provenance (`git rev-parse`, `git status --porcelain`, `git diff --quiet`, `jj -R "<abs worktree path>" diff --from <recorded> --to <BASE> --summary`, or the contract's other jj equivalents) and the plan's own `Tests:` commands in the worktree. Write only the plan. Never edit tracked source, commit, run `stash`, `checkout`, `restore`, `clean`, or mutate jj's working copy or revisions (`new`, `commit`, `abandon`, `restore`, `squash`).
42
42
  - Never leave a placeholder in authored plan prose; retain verbatim failure evidence in row continuation fences. Derive decisions from source per Contract decisions; name only an unsettled decision as an open question.
43
43
  - Never call `plan_tracker`, `phase_tracker`, or `subagent`; the orchestrator owns them.
44
44
  - Never reply with more than the one line.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-gauntlet",
3
- "version": "7.32.0",
3
+ "version": "7.32.1",
4
4
  "description": "Opinionated, gated workflow skills, subagent personas, and runtime extensions for the pi coding agent.",
5
5
  "author": "Jacek Juraszek",
6
6
  "type": "module",
@@ -279,18 +279,26 @@ If a decision is genuinely open, put it in an explicit **Open Questions** sectio
279
279
 
280
280
  The plan-writer runs Baseline, the deterministic checker, then the judgment checks before replying.
281
281
 
282
- - **Baseline.** Execute the numbered procedure below for task `Tests:` commands only; leave header `**Verification:**` to verify. Never author baseline evidence without execution.
282
+ - **Baseline.** Execute the numbered procedure below for task `Tests:` commands only; leave header `**Verification:**` to verify. Never author baseline evidence without execution or a recorded tree-equivalence.
283
283
  1. Read provenance: `BASE=$(git -C "<abs worktree path>" rev-parse --short HEAD)` and `git -C "<abs worktree path>" status --porcelain --untracked-files=all`. Match every `XY <path>` entry (including `??`) against the worktree-relative plan and spec paths, plus only the parent-supplied `In-flight:` paths on an `Amend:` re-dispatch; never infer that set. Also allow untracked paths already recorded in existing baseline bullets' ` - artifacts:` suffixes in the plan at the plan path, excluding every plan `Create:` or `Test:` path. Keep those suffixes on retained bullets. Any other entry blocks all commands: collect `- Baseline: worktree dirty on <BASE>: <paths>`. Allowed in-flight paths outside the spec and plan directories are source edits: collect `- Baseline: in-flight source edits on <BASE>: <paths>` and run nothing. Allow doc-only workflow edits. For plain jj (no `.git`, VCS kind `jj`), use `BASE=$(jj -R "<abs worktree path>" log -r @- --no-graph -T 'commit_id.short()')` and `jj -R "<abs worktree path>" diff --summary`; classify one-letter status and relative paths identically (`A` includes new files). Never revert or clean anything. Record a short baseline provenance note with the initial per-file inventory, BASE, and which exact paths were admitted before running commands; retain it even when a later run is contaminated or blocked.
284
- 2. On Findings/Amend, retain a bullet only for unchanged command text on the same base; rerun commands with missing/invalid bullets, changed text, or different recorded SHA. `Findings: rerun baseline` reruns all commands. Never rewrite recorded SHAs without execution. For each command, split on the contract's separators (`&&`, `||`, `;`, `|`) and classify anchor tokens (a `Test:` path alone or with `::`/`#`/`:` filters) and selectors independently:
284
+ 2. On Findings/Amend, before any command runs, use step 1's BASE and prove endpoint-tree equivalence once per distinct recorded SHA in the plan. Derive `<spec dir>` and `<plan dir>` as the worktree-relative directories of the dispatched spec and plan paths. Run `git -C "<abs worktree path>" diff --quiet <recorded> <BASE> -- . ':!<spec dir>/' ':!<plan dir>/'`; only exit 0 proves equivalence. Keep the trailing `/` directory boundaries. For plain jj, run `jj -R "<abs worktree path>" diff --from <recorded> --to <BASE> --summary`: require exit 0 and empty stdout after dropping entries whose paths all lie under `<spec dir>/` or `<plan dir>/`. Reject entries that do not parse as `<status> <path>`; exclude stderr from filtered evidence. Prove every recorded SHA before rewriting any bullet; retention is all-or-nothing.
285
+
286
+ | Proof outcome | Baseline action |
287
+ |---|---|
288
+ | Every proof holds and every admitted in-flight path lies within those directories | Retain valid evidence for unchanged command text, even when task steps changed; rewrite its SHA to BASE, preserving `skipped`, `pass via`, and ` - artifacts:` forms. Append `retained <n> bullets: <recorded> -> <BASE>, tree-equivalent outside <spec dir>, <plan dir>` once per distinct re-stamped SHA to the existing step-1 provenance note, the sole record. |
289
+ | Any proof fails: missing/unresolvable SHA, git/jj error, nonzero exit, nonempty outside-directory diff, or admitted doc-only in-flight path outside both directories | Rerun every command and retain nothing. Emit no retained-provenance line or Open Questions finding for proof failure. |
290
+
291
+ `Findings: rerun baseline` overrides retention, reruns all commands and re-stamps nothing. Never rewrite recorded SHAs without execution or a recorded tree-equivalence. For each command, split on the contract's separators (`&&`, `||`, `;`, `|`) and classify anchor tokens (a `Test:` path alone or with `::`/`#`/`:` filters) and selectors independently:
285
292
 
286
293
  | Command anchors/selectors | Baseline action |
287
294
  |---|---|
295
+ | Changed command text or missing/invalid evidence on re-dispatch | Rerun regardless of equivalence through the anchor/selector procedure below. |
288
296
  | Every anchor in every segment is a `Create:` path of some task | Append `- baseline: <BASE> skipped - <path>[, <path>] created by this task`, one path per created anchor. Only all-created anchors skip. |
289
297
  | No segment has a created anchor or introduced selector | Run `(cd "<abs worktree path>" && <command>)` unchanged. |
290
298
  | Mixed anchors or introduced selectors | Derive per segment: drop each created-anchor token; strip an introduced attached filter to its path; drop an introduced flag selector and its value. Drop a segment with no existing `Test:` anchor of this task. Join surviving segments with their original separators. Keep at least one segment, each anchored to an existing `Test:` path of this task and no `Create:` path; otherwise skip only for all-created anchors as above. Run the derived base command. |
291
299
 
292
300
  An introduced selector is an attached filter or flag/value pair (`-k <expr>`, `-t <name>`, `-e <name>`, `-n <name>`, `--grep <name>`, `--test-name-pattern <name>`) whose filter/name appears verbatim in a test name the task's steps say they add. Keep selectors the steps do not name and run unchanged. Pass requires exit 0 and a runner summary reporting at least one test executed. Append `- baseline: <BASE> pass` for unchanged runs or `- baseline: <BASE> pass via `<base command>`` for derived runs. Treat non-zero exits, host allowlist/runtime errors, and exit-0 summaries with zero tests as failures; collect task, original command, exit code, summary and last 20 output lines, plus the derived command when used. Record a zero-test result as `exit <n>, no tests ran`, never a harmless skip. `- none:` tasks get no baseline.
293
- 3. After each run reread status and BASE with step 1's commands. New tracked status outside the allowed set, a new `??` (jj `A`) at any plan `Create:` or `Test:` path, or moved BASE contaminates the run: collect the task, original command and `dirtied tracked source: <paths>` or `HEAD moved to <sha>`; stop further runs and record every unrun command. Any other new untracked entry is a disposable generated artifact: keep the result and append ` - artifacts: <path>[, <path>]` to its `pass` or `pass via` bullet. For each rerun (changed command text, missing/invalid bullet, different base, or `Findings: rerun baseline`), carry its recorded artifact paths still present as untracked onto the replacement bullet's ` - artifacts:` suffix, merged with new untracked entries from that run and excluding every plan `Create:` or `Test:` path. Record artifacts, never delete them. Do not give a contaminated command a passing bullet.
301
+ 3. After each run reread status and BASE with step 1's commands. New tracked status outside the allowed set, a new `??` (jj `A`) at any plan `Create:` or `Test:` path, or moved BASE contaminates the run: collect the task, original command and `dirtied tracked source: <paths>` or `HEAD moved to <sha>`; stop further runs and record every unrun command. Any other new untracked entry is a disposable generated artifact: keep the result and append ` - artifacts: <path>[, <path>]` to its `pass` or `pass via` bullet. For each rerun (changed command text, missing/invalid bullet, failed equivalence proof, or `Findings: rerun baseline`), carry its recorded artifact paths still present as untracked onto the replacement bullet's ` - artifacts:` suffix, merged with new untracked entries from that run and excluding every plan `Create:` or `Test:` path. Record artifacts, never delete them. Do not give a contaminated command a passing bullet.
294
302
  4. Regenerate every baseline-form Open Questions row from this pass's collection; resolved rows disappear and `blocked:` lines are recomputed. Preserve unresolved contract rows until Findings answers them. Put `## Open Questions` at the top when any rows remain; omit it otherwise. Use these exact forms:
295
303
 
296
304
  - Failure: `- Task N: `<command>` fails on <BASE> (exit <n>): <one-line result summary>`, quoting the original Tests command. Indent a `ran: `<base command>`` continuation for a derived run, then a fenced block containing the last 20 output lines (or all output when shorter).