@sreetej510/pi-shipd-checks 0.3.10 → 0.4.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/README.md CHANGED
@@ -1,73 +1,61 @@
1
1
  # @sreetej510/pi-shipd-checks
2
2
 
3
- A [pi](https://github.com/earendil-works/pi) coding agent extension that finds behavioral
4
- coverage gaps in a benchmark task's hidden tests.
3
+ A [pi](https://github.com/earendil-works/pi) coding agent extension that analyzes benchmark
4
+ tests for behavioral coverage gaps, fairness, and test strength.
5
5
 
6
6
  ## What it does
7
7
 
8
- For the flags you pass, `/checks`:
8
+ For `/checks`:
9
9
 
10
10
  1. Snapshots the current git `HEAD` into a throwaway temp directory (via
11
11
  `git archive HEAD | tar -x`) — it never touches your working directory, staged, or
12
12
  uncommitted changes.
13
13
  2. Copies `agent_prompt.md`, `solution.patch`, and `test.patch` from your project root into
14
14
  that temp dir.
15
- 3. Optionally runs a two-agent behavioral test-gap analysis: one finder works through every
16
- meaningful prompt sentence, submitting positive and negative candidates for each; a strict
17
- reviewer then filters the combined list for fair, public behavioral assertions.
18
- 4. Optionally runs the solver gap finder: several (configurable, default 3) TDD-style solver
15
+ 3. Optionally runs the solver gap finder: several (configurable, default 3) TDD-style solver
19
16
  agents, each in its own throwaway git repo with `test.patch` and `agent_prompt.md` applied
20
17
  (never `solution.patch`), given write/edit/bash access to iterate until `./test.sh new`
21
- passes or they give up. The extension independently re-verifies each
22
- solver's result and captures its diff (excluding any files `test.patch` touched, and
23
- including any new, previously-uncommitted files the solver created), writes each
24
- solver's diff + test output to `solver_gap_solutions/solver_<n>/` inside the shared
25
- snapshot dir (plus a `manifest.json` summary) — rather than embedding them directly in
26
- a prompt so a read-only comparison reviewer can read only what it needs via its
27
- normal read/grep/find/ls tools, keeping its context usage independent of solver count
28
- and diff size. That reviewer compares the solvers' diffs against the real
29
- `agent_prompt.md`/`solution.patch` to surface behavioral gaps — cases where a passing
30
- solver's approach diverges from the intended behavior, indicating a test that's
31
- under-specified. This is empirical (grounded in real agent attempts) rather than
32
- analytical, so it's reported separately from the `--gap-finder` results. Each solver's full
33
- `trajectory.json` (its raw session entries), `solution.patch`, and `./test.sh new` output
34
- are also persisted to `.pi/shipd-checks/<run-id>/solver_<n>/` in your project root, for
35
- later inspection independent of `shipd_report.json`.
36
- 5. Runs the solver workers in one AWS ECS Fargate Spot task (when the solver finder is enabled),
37
- with the source snapshot and partial results in S3. A Spot interruption retries the task and
38
- resumes solver indexes whose results were already uploaded; the final comparison still runs
39
- locally.
40
- 6. Posts a chat summary and merges the gap-finder results into `shipd_report.json` in your
41
- project root. Running either finder separately builds up one combined report without any
42
- PASS/FAIL verdict.
18
+ passes or they give up. The extension independently re-verifies each solver's result and
19
+ compares passing solver diffs with the reference to surface behavioral gaps.
20
+ 4. Runs solver workers in one AWS ECS Fargate Spot task when enabled, with the source snapshot
21
+ and partial results in S3. A Spot interruption retries the task and resumes completed
22
+ solver indexes.
23
+ 5. Posts a chat summary and merges solver results into `shipd_report.json` in your project root.
24
+
25
+ The agent-callable `analyze_task_tests` tool provides the separate test-analysis workflow:
26
+
27
+ - `mode: "gaps"` (default) finds and validates sentence-by-sentence behavioral coverage gaps.
28
+ - `mode: "audit"` runs an auditor followed by an independent validator over implemented tests,
29
+ filtering unfair assertions, prompt ambiguity, weak assertions, and broken fixtures.
30
+
31
+ Both modes are read-only. Invoke the tool only when the user asks, never in parallel, and run
32
+ repeated requests sequentially after applying each result.
43
33
 
44
34
  ## Commands
45
35
 
46
- The two finder flags are additive/combinable; `--config` must be used alone.
36
+ `--config` must be used alone; solver-gap-finder is the only `/checks` run mode.
47
37
 
48
38
  | Command | Effect |
49
39
  |---|---|
50
- | `/checks` | Open a menu with config, solver-gap-finder, and gap-finder options |
51
- | `/checks --config` | Configure behavioral and solver gap-finder models |
40
+ | `/checks` | Open a menu with config and solver-gap-finder options |
41
+ | `/checks --config` | Configure reviewer, solver, gap-finder, and test-audit models |
52
42
  | `/checks --solver-gap-finder` | Run several solver agents TDD-style against `agent_prompt.md` + `test.patch`, then compare their solutions to the real solution to find gaps |
53
- | `/checks --gap-finder` | Find gaps sentence-by-sentence, then review them for fairness |
54
- | `/analyze:on` | Enable the agent-callable Gap Finder tool for the current project |
55
- | `/analyze:off` | Disable the agent-callable Gap Finder tool for the current project |
43
+ | `/analyze:on` | Enable the agent-callable test-analysis tool for the current project |
44
+ | `/analyze:off` | Disable the agent-callable test-analysis tool for the current project |
56
45
 
57
46
  **Shortcut:** `Ctrl+Shift+X` cancels an in-progress `/checks` run. Cancellation is propagated to active solver sessions and their spawned shell/test process trees; post-cancel verification, comparison, and artifact writing are skipped.
58
47
 
59
48
  ## Configuration
60
49
 
61
- `/checks --config` opens the row-based settings menu with four sections:
50
+ `/checks --config` opens the row-based settings menu with two sections:
62
51
 
63
- - **Reviewer**: model and thinking level used by the behavioral gap finders, validator, and
64
- solver-solution comparison agent.
65
- - **Solver**: model and thinking level for TDD solver agents, plus their timeout, parallel solver
66
- count, and artifact-saving setting.
67
- - **Analyze Tool**: pick the model + thinking level for the agent-callable Gap Finder tool.
68
- - **Fargate**: choose the shared-task resource profile for the current project: `small` (1 vCPU,
69
- 2 GB), `medium` (2 vCPU, 4 GB), or `large` (4 vCPU, 8 GB). Adaptive sizing can select the
70
- next profile from task telemetry after each run.
52
+ - **Solver**: comparison model and thinking level for the final solver-result reviewer, plus the
53
+ TDD solver model, thinking level, timeout, parallel solver count, and artifact-saving setting.
54
+ - **Analyze Tool**: separate models + thinking levels for the agent-callable gap-analysis and Test
55
+ Audit modes. The audit model defaults to the gap-analysis model until explicitly changed. These
56
+ are stored under `analyzeGap.testAuditProvider`, `analyzeGap.testAuditModelId`, and
57
+ `analyzeGap.testAuditThinkingLevel`. Fargate resources are selected automatically and are not
58
+ configured in this menu.
71
59
 
72
60
  AWS credentials stay local. Configure the AWS CLI profile, then set `AWS_PROFILE`/`AWS_REGION` (or add
73
61
  `fargate.awsProfile`/`fargate.region` to `checks-config.json`). The runner discovers the default
@@ -142,12 +130,17 @@ On-Demand fallback. Spot interruptions are retried according to `fargate.maxRetr
142
130
  no telemetry history is retained. Set `projectProfiles` to override resources per repository:
143
131
  `{"C:/path/to/repo":"large"}`.
144
132
 
145
- 5. Restart pi, use `/checks --config` to select the solver model and project resource profile,
146
- then run `/checks --solver-gap-finder`. Projects need `Dockerfile`, `agent_prompt.md`,
133
+ 5. Restart pi, use `/checks --config` to select the solver and comparison models, then run
134
+ `/checks --solver-gap-finder`. Projects need `Dockerfile`, `agent_prompt.md`,
147
135
  `solution.patch`, `test.patch`, and `test.sh`.
148
136
 
149
137
  Use `/analyze:on` and `/analyze:off` to control the tool per project, like HPC. The enabled project
150
- list is stored alongside the other settings in `~/.pi/agent/checks-config.json`:
138
+ list is stored alongside the other settings in `~/.pi/agent/checks-config.json`.
139
+
140
+ The agent-callable tool accepts `mode: "gaps"` (default) or `mode: "audit"`. Invoke it only when the
141
+ user asks, never in parallel, and run repeated requests sequentially after applying each result.
142
+ The audit is read-only and returns repair recommendations; the caller changes the tests or prompt.
143
+
151
144
 
152
145
  ```json
153
146
  {