@sreetej510/pi-shipd-checks 0.7.3 → 0.8.0

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
@@ -22,44 +22,44 @@ For `/checks`:
22
22
  solver indexes.
23
23
  5. Posts a chat summary and merges solver results into `shipd_report.json` in your project root.
24
24
 
25
- The agent-callable `analyze_task_tests` tool provides the separate test-analysis workflow:
25
+ The agent-callable `gap-finder` tool runs one exhaustive read-only agent over the prompt, repository, and tests. It
26
+ reviews requirements sentence by sentence, performs its own evidence and fairness check, and returns confirmed
27
+ behavioral test gaps in `details.testGaps`.
26
28
 
27
- - `mode: "gaps"` (default) finds and validates sentence-by-sentence behavioral coverage gaps.
28
- - `mode: "test-audit"` runs one exhaustive Auditor over implemented tests, using the
29
- `# Fairness vs. unfairness` rules to classify unfair assertions, prompt ambiguity, and broken fixtures.
30
- - `mode: "solution-audit"` runs one exhaustive Auditor over the implementation, using the
31
- `# Gaps in solution` rules and the same in-memory changed-code diff.
29
+ The agent-callable `solution-precheck` tool runs one exhaustive read-only solution-quality agent and returns findings in
30
+ `details.solutionAuditFindings`. It checks contract gaps, regressions, failure safety, architecture, dead code, and
31
+ unrelated changes.
32
32
 
33
- The agent-callable `submit_shipd` tool runs `create_patches.sh` in the current working directory, reads
33
+ The agent-callable `quality-check` tool runs `create_patches.sh` in the current working directory, reads
34
34
  `agent_prompt.md`, `test.patch`, and `solution.patch`, fills the authenticated Shipd draft fields, starts the Test
35
35
  Quality and then Solution Quality reruns in one browser tab, waits for both jobs, and returns only the useful report data:
36
36
  `details.testQuality.coverageSuggestions`, `details.testQuality.tests` filtered to items whose `fairness` is exactly
37
37
  `"Not fair"`, and the complete `details.solutionQuality.evaluation` block. Its compact UI is labeled `Quality Checks`,
38
38
  shows live elapsed time, and only displays unfair-test count, suggestion count, code-quality score, and
39
- comprehensiveness score. It takes no parameters. Set the session's
40
- job link with `/shipd:link <job-link>`; the link is stored in that chat session only. It uses one fresh headless
41
- browser tab at a time: it closes the browser after starting both jobs, checks after 5 minutes, then reopens every
42
- 90 seconds until both jobs finish. Each browser context blocks images, fonts, and media to reduce memory use. It does not
43
- click the final orange challenge-submit button. Authentication comes from
44
- `SHIPD_STORAGE_STATE` or the saved state created by `scripts/playwright-auth-smoke.mjs`.
45
-
46
- All analysis modes are read-only. Gap analysis uses two agents: a gap finder followed by a fairness reviewer.
47
- Each audit uses one agent to keep the tool affordable. Invoke analysis only when the user asks, never in
48
- parallel, and run repeated requests sequentially after applying each result. `submit_shipd` consumes Shipd tokens;
49
- do not run overlapping invocations for the same challenge.
39
+ comprehensiveness score. It takes no parameters. It uses one fresh headless browser tab at a time: it closes the
40
+ browser after starting both jobs, checks after 5 minutes, then reopens every 90 seconds until both jobs finish. Each
41
+ browser context blocks images, fonts, and media to reduce memory use. It does not click the final orange
42
+ challenge-submit button. Authentication comes from `SHIPD_STORAGE_STATE` or the saved state created by
43
+ `/shipd:auth`. `/shipd:auth` launches the installed browser as a normal visible process and attaches over local CDP,
44
+ which supports Google/SSO sign-in better than an automated browser launch.
45
+
46
+ The analysis tools are read-only and each uses one agent. Invoke them only when the user asks, never in parallel, and
47
+ run repeated requests sequentially after applying each result. `quality-check` consumes Shipd tokens; do not run
48
+ overlapping invocations for the same challenge.
50
49
 
51
50
  ## Commands
52
51
 
53
- `--config` must be used alone; solver-gap-finder is the only `/checks` run mode. Test and solution audits run through `analyze_task_tests`.
52
+ `--config` must be used alone; solver-gap-finder is the only `/checks` run mode. The gap-finder and solution-precheck tools are enabled per project with `/analyze:on`.
54
53
 
55
54
  | Command | Effect |
56
55
  |---|---|
57
56
  | `/checks` | Open a menu with config and solver-gap-finder options |
58
- | `/checks --config` | Configure reviewer, solver, gap-analysis, and Auditor models |
57
+ | `/checks --config` | Configure reviewer, solver, and analysis models |
59
58
  | `/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 |
59
+ | `/shipd:auth` | Open a browser for first-time Shipd sign-in and save the session |
60
60
  | `/shipd:link <url>` | Save the Shipd job link for the current chat session |
61
- | `/analyze:on` | Enable the agent-callable test-analysis tool for the current project |
62
- | `/analyze:off` | Disable the agent-callable test-analysis tool for the current project |
61
+ | `/analyze:on` | Enable the gap-finder and solution-precheck tools for the current project |
62
+ | `/analyze:off` | Disable the gap-finder and solution-precheck tools for the current project |
63
63
 
64
64
  **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.
65
65
 
@@ -69,13 +69,10 @@ do not run overlapping invocations for the same challenge.
69
69
 
70
70
  - **Solver**: reviewer model and thinking level for the final solver-result reviewer, plus the
71
71
  solver model, thinking level, timeout, parallel solver count, and artifact-saving setting.
72
- - **Analyze Tool**: timeout plus separate models + thinking levels for the agent-callable gap-analysis
73
- and Auditor modes. The Auditor settings apply to both test-audit and solution-audit. The timeout
74
- applies to each read-only agent phase. The Auditor model defaults to the gap-analysis model until
75
- explicitly changed. These are stored under `analyzeGap.timeoutMinutes`,
76
- `analyzeGap.testAuditProvider`, `analyzeGap.testAuditModelId`, and
77
- `analyzeGap.testAuditThinkingLevel`. Fargate resources are selected automatically and are not
78
- configured in this menu.
72
+ - **Analysis Tools**: timeout, model, and thinking level shared by the agent-callable gap-finder and
73
+ solution-precheck tools. The timeout applies to each read-only agent. These are stored under
74
+ `analyzeGap.timeoutMinutes`, `analyzeGap.provider`, `analyzeGap.modelId`, and
75
+ `analyzeGap.thinkingLevel`. Fargate resources are selected automatically and are not configurable in this menu.
79
76
 
80
77
  AWS credentials stay local. Configure the AWS CLI profile, then set `AWS_PROFILE`/`AWS_REGION` (or add
81
78
  `fargate.awsProfile`/`fargate.region` to `checks-config.json`). The runner discovers the default
@@ -154,13 +151,12 @@ On-Demand fallback. Spot interruptions are retried according to `fargate.maxRetr
154
151
  `/checks --solver-gap-finder`. Projects need `Dockerfile`, `agent_prompt.md`,
155
152
  `solution.patch`, `test.patch`, and `test.sh`.
156
153
 
157
- Use `/analyze:on` and `/analyze:off` to control the tool per project, like HPC. The enabled project
158
- list is stored alongside the other settings in `~/.pi/agent/checks-config.json`.
154
+ Use `/analyze:on` and `/analyze:off` to control the gap-finder and solution-precheck tools per project, like HPC. The
155
+ enabled project list is stored alongside the other settings in `~/.pi/agent/checks-config.json`.
159
156
 
160
- The agent-callable tool accepts `mode: "gaps"` (default), `mode: "test-audit"`, or
161
- `mode: "solution-audit"`. Invoke it only when the user asks, never in parallel, and run repeated
162
- requests sequentially after applying each result. Audits are read-only and return repair
163
- recommendations; the caller changes the tests, prompt, or solution.
157
+ The `gap-finder` and `solution-precheck` tools are read-only and return repair recommendations; the caller changes the
158
+ tests, prompt, or solution. Invoke them only when the user asks, never in parallel, and run repeated requests
159
+ sequentially after applying each result.
164
160
 
165
161
 
166
162
  ```json
@@ -200,9 +196,9 @@ Or, for local development, point at the entry point directly:
200
196
  | File | Responsibility |
201
197
  |---|---|
202
198
  | `src/index.ts` | Extension entry point: message renderer, cancel shortcut, command registration |
203
- | `src/submit.ts` | `submit_shipd`: Playwright draft filling, sequential quality checks, polling, and report extraction |
199
+ | `src/submit.ts` | `quality-check`: Playwright draft filling, sequential quality checks, scheduled polling, and report extraction |
204
200
  | `src/command.ts` | The `/checks` command: argument parsing, `--config` flow, run orchestration |
205
- | `src/agents.ts` | Spawns and races the gap-finder/reviewer/solver agent sessions |
201
+ | `src/agents.ts` | Spawns and races the gap-finder, solution-precheck, reviewer, and solver agent sessions |
206
202
  | `src/solvergap.ts` | Local solver result persistence and comparison artifacts |
207
203
  | `src/fargate-docker.ts` | Supported Dockerfile parsing for remote solver setup |
208
204
  | `src/fargate-runner.ts` | ECS Fargate Spot/S3 orchestration, retries, cleanup, and task telemetry |