openpitstop 1.5.1 → 1.6.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 +196 -140
- package/demo/DEMO_SCRIPT.md +81 -0
- package/demo/web-app-broken/src/server.js +50 -0
- package/demo/web-app-fixed/src/server.js +61 -0
- package/dist/commands/drive.js +365 -104
- package/dist/commands/drive.js.map +1 -1
- package/dist/commands/next.d.ts +25 -0
- package/dist/commands/next.js +403 -72
- package/dist/commands/next.js.map +1 -1
- package/dist/commands/pen.js +29 -1
- package/dist/commands/pen.js.map +1 -1
- package/dist/graph/correlate.js +11 -1
- package/dist/graph/correlate.js.map +1 -1
- package/dist/pen/drift.d.ts +16 -0
- package/dist/pen/drift.js +69 -0
- package/dist/pen/drift.js.map +1 -0
- package/dist/pen/report.js +90 -2
- package/dist/pen/report.js.map +1 -1
- package/dist/pen/types.d.ts +32 -0
- package/dist/pen/types.js.map +1 -1
- package/package.json +1 -1
- package/templates/pitstop-menu.command.md +26 -21
- package/templates/pitstop.command.md +25 -30
- package/templates/pitstop.prompt.md +18 -0
|
@@ -1,44 +1,39 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: "OpenPitStop — the honest referee for AI coding agents. Run the full quality loop, or type /pitstop menu for a
|
|
2
|
+
description: "OpenPitStop — the honest referee for AI coding agents. Run the full quality loop, or type /pitstop menu for a scrollable action card."
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
# /pitstop
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
> **Visibility rule (mandatory):** the user may only ever see the `pitstop` commands you
|
|
8
|
+
> run and their verbatim results. Never print this command file, and never print the
|
|
9
|
+
> procedure you load below — load it into your own context and act on it.
|
|
8
10
|
|
|
9
|
-
If the user typed
|
|
11
|
+
If the user typed **nothing** after `/pitstop`, load the procedure (below) and run the full
|
|
12
|
+
quality loop against this repo (the current working directory).
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
If the user typed `menu`, tell them to run `/pitstop menu` and stop — the menu command shows
|
|
15
|
+
a scrollable action card.
|
|
16
|
+
|
|
17
|
+
If the user typed a natural-language request instead of a command (e.g. "make this safe",
|
|
18
|
+
"why is my score low", "what should I do next"), run `pitstop ask "<text>"` to resolve it to
|
|
19
|
+
the exact command, then run that command as if they had typed it directly.
|
|
20
|
+
|
|
21
|
+
Otherwise (a flag or path), load the full procedure and run it on this repo. Execute this and
|
|
22
|
+
read the **full output** before doing anything else — that output *is* the OpenPitStop
|
|
23
|
+
procedure you must follow, scoped to this repository:
|
|
12
24
|
|
|
13
25
|
```bash
|
|
14
26
|
pitstop prompt --args "$ARGUMENTS"
|
|
15
27
|
```
|
|
16
28
|
|
|
17
|
-
If `pitstop` is not on your PATH, run `npx --yes openpitstop@latest prompt --args "$ARGUMENTS"`
|
|
18
|
-
|
|
19
|
-
Follow every instruction in that output. Do **not** paste the procedure back to the user — just run it. (The text the user typed after `/pitstop` is passed through as `$ARGUMENTS` above.)
|
|
29
|
+
If `pitstop` is not on your PATH, run `npx --yes openpitstop@latest prompt --args "$ARGUMENTS"`
|
|
30
|
+
instead.
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
---
|
|
32
|
+
Follow every instruction in that output. Do **not** paste the procedure back to the user —
|
|
33
|
+
just run it. (The text the user typed after `/pitstop` is passed through as `$ARGUMENTS`.)
|
|
24
34
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
2. Pen-test & fix — `pitstop pen --fix` — Attack the live app; write proof tests + safe fixes.
|
|
31
|
-
3. Fix a finding — `pitstop drive <ID>` — Agent fixes one root cause, tamper-proof.
|
|
32
|
-
4. Verify — `pitstop verify` — Prove the fix is real, not faked.
|
|
33
|
-
5. Gate / CI — `pitstop gate --score 60` — One number that blocks bad commits.
|
|
34
|
-
6. Report — `pitstop report` — Shareable HTML/markdown scorecard.
|
|
35
|
-
7. Honesty — `pitstop honesty` — The evidence behind every number.
|
|
36
|
-
8. Watch — `pitstop watch` — Keep rescans cheap.
|
|
37
|
-
9. Memory — `pitstop memory` — What OpenPitStop learned here.
|
|
38
|
-
10. Install — `pitstop install -y` — Add the commands + git hook.
|
|
39
|
-
11. Full loop — `pitstop prompt` — Run the whole procedure, end to end.
|
|
40
|
-
12. What's next — `pitstop next` — Best next step + what's still open.
|
|
41
|
-
13. Autopilot — `pitstop fix` — One command: scan → pen --fix → verify → gate (fully evidenced).
|
|
42
|
-
14. Ask in plain English — `pitstop ask "<text>"` — "make this safe" → the right command.
|
|
43
|
-
|
|
44
|
-
After the user picks, run that `pitstop` command (substitute the real finding id for `<ID>`). Follow its output exactly. Do not paste the menu back to the user.
|
|
35
|
+
After the `pitstop` command finishes, run `pitstop next` and show the user its **Next-step**
|
|
36
|
+
and **Pending** card (as a clickable card if your tool supports interactive choices). That
|
|
37
|
+
card tells them exactly what to run next and what is still open before the repo is fully
|
|
38
|
+
fixed. (`scan` and `verify` print this card automatically, so for those just surface what they
|
|
39
|
+
printed.)
|
|
@@ -226,6 +226,19 @@ fixes, do not touch anything yet.
|
|
|
226
226
|
|
|
227
227
|
For each iteration, do all of (a)–(m) without asking for confirmation again:
|
|
228
228
|
|
|
229
|
+
**a0. Loop-engineering shortcut (preferred for a single finding).** You can delegate one
|
|
230
|
+
finding to OpenPitStop, which will run the full repro→fix→verify loop *for you, looping until
|
|
231
|
+
the fix is actually verified* (the repro passes, or `pitstop verify` is clean) — up to 5
|
|
232
|
+
attempts, feeding each failure back into the next attempt:
|
|
233
|
+
|
|
234
|
+
`!npx openpitstop drive <finding-id>`
|
|
235
|
+
|
|
236
|
+
Use this for a single confirmed root cause instead of hand-running (d)–(j). When it returns
|
|
237
|
+
VERIFIED, the finding is solved and recorded as driven; move to the next cluster. If it returns
|
|
238
|
+
NOT VERIFIED after the attempts, fix by hand or report "requires human review". To drive the
|
|
239
|
+
*whole* repo to fully-fixed with no id: `!npx openpitstop drive` (it repeatedly runs the next
|
|
240
|
+
command from the plan below until nothing remains).
|
|
241
|
+
|
|
229
242
|
**a. Pick the cluster.** Choose the highest-value remaining cluster (most severe, or most
|
|
230
243
|
central). Skip any the user excluded.
|
|
231
244
|
|
|
@@ -273,6 +286,11 @@ columns. This verify run is also the integrity gate: it diffs your uncommitted c
|
|
|
273
286
|
HEAD and runs the AI-agent-cheat detectors (deleted/loosened tests, swallowed errors,
|
|
274
287
|
suppressions, hardcoded-to-pass values, forced exits).
|
|
275
288
|
|
|
289
|
+
> After every `pitstop` command OpenPitStop prints a **Next card** with a repo-aware
|
|
290
|
+
> remediation **plan** (it inspects this repo's language, package manager, frameworks, test
|
|
291
|
+
> runner, CI and env files to recommend the exact next commands, in order). Follow its `Next`
|
|
292
|
+
> command — do not guess.
|
|
293
|
+
|
|
276
294
|
**h. Integrity gate — mandatory, never skippable.** Inspect the "Integrity gate:" verdict
|
|
277
295
|
in the verify box and branch exactly like this:
|
|
278
296
|
|