You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
clean or pass cap, then report once. Use after a tracer-bullet commit (lite), before PR
7
-
is done (full), or on "harden", "harden-pr", "pristine", "review until clean",
8
-
"production-ready pass". Invoking this skill authorizes one harden commit at cycle end.
7
+
is done (full), on "harden", "harden-pr", "pristine", "review until clean",
8
+
"production-ready pass", or "harden-pr reconcile". Invoking this skill authorizes one harden commit at cycle end.
9
9
NEVER stop mid-loop to ask about commits, babysit, or the next pass. NEVER redesign the
10
10
feature or change observable runtime behavior.
11
11
---
@@ -16,9 +16,9 @@ description: >-
16
16
17
17
Local loop: parallel reviewer subagents → merge findings → fix in-bounds → re-verify → repeat until clean or cap → **one final report**.
18
18
19
-
**Invoking this skill (`/harden-pr`, `harden-pr lite`, `harden-pr full`) is a run-to-completion command.** The agent executes the full loop before ending the turn.
19
+
**Invoking this skill (`/harden-pr`, `harden-pr lite`, `harden-pr full`, `harden-pr quick`, `harden-pr reconcile`) is a run-to-completion command.** The agent executes the full loop before ending the turn.
20
20
21
-
Sister skills: [`audit-pr-architecture`](../audit-pr-architecture/SKILL.md) (extended structural reviewer). Mention **`babysit`** only in the final report (full mode) — never mid-loop.
21
+
Sister skills: [`audit-pr-architecture`](../audit-pr-architecture/SKILL.md) (extended structural reviewer). **Ledger:**[LEDGER.md](./LEDGER.md) (rejections + deferred — one file). Mention **`babysit`** only in the final report (full mode) — never mid-loop.
22
22
23
23
## Run-to-completion (read first)
24
24
@@ -42,12 +42,14 @@ Otherwise: resolve anchor → run all passes → fix → verify → next pass
|**Lite**| After each tracer-bullet slice commit ([`tracer-bullets`](../../rules/tracer-bullets.md) cadence) | Files in the slice diff | 2 |
48
+
|**Quick**| Cheap uncertainty pass ("quick harden") | Last commit or slice diff | 1 |
49
+
|**Full**| User intent ("full harden", "PR done", "production-ready pass") **or** offer when an in-flight `docs/plans/<topic>.md` checklist is complete |`origin/main...HEAD`| 3 |
50
+
|**Reconcile**|`/harden-pr reconcile` — process [LEDGER.md § Deferred](./LEDGER.md#deferred), then run **full** if branch still open |`origin/main...HEAD`| 3 |
49
51
50
-
Default to **lite** when invoked immediately after a slice commit. Default to **full** when the user signals branch completion.
52
+
Default to **lite** when invoked immediately after a slice commit. Default to **full** when the user signals branch completion.**Quick** = core 3 reviewers only (no extended roster).
51
53
52
54
## Production bar (what "pristine" means)
53
55
@@ -76,6 +78,27 @@ Resolve in order; stop at the first hit:
76
78
77
79
Reviewers treat the anchor as contract. Findings that would violate it → **report, do not apply**.
78
80
81
+
Record `HEAD` at loop start (`git rev-parse HEAD`) in the final report. If `HEAD` changes mid-loop from unrelated work, re-resolve the anchor before the next pass.
82
+
83
+
## Vet step (parent, after merge — before fix)
84
+
85
+
Subagents over-report. After merge + dedupe:
86
+
87
+
1. Read [LEDGER.md § Rejections](./LEDGER.md#rejections) — drop findings matching a rejection entry.
88
+
2. For each remaining finding: **re-read**`file` at `line` (or the cited region). Drop if the claim is false or by-design.
89
+
3. New by-design drops → append one bullet to **§ Rejections** in [LEDGER.md](./LEDGER.md).
90
+
4. Sort survivors by leverage: `severity` first, then `confidence` desc, then `effort` asc (`S` before `L`).
91
+
92
+
**Anti-pattern:** applying a fix without re-reading the cited location.
93
+
94
+
## Reconcile mode
95
+
96
+
Run-to-completion like other modes:
97
+
98
+
1. Read [LEDGER.md § Deferred](./LEDGER.md#deferred). Re-vet each row (same vet step). Fix in-bounds items; remove fixed lines.
99
+
2. Run **full** harden on `origin/main...HEAD` (same loop as full mode).
100
+
3. On cap: append still-deferred items to **§ Deferred** in [LEDGER.md](./LEDGER.md). Report what was reconciled vs still open.
Numbers are stable for a given fixture + schema; re-run locally after intentional schema or probe changes.
369
369
370
+
### Harden-pr workflow eval
371
+
372
+
Manual A/B harness for [`.agents/skills/harden-pr/`](../.agents/skills/harden-pr/SKILL.md) — complements codemap **query** probes above. Measures whether an agent **detects, fixes, and verifies** production-bar gaps on a branch, not SQL vs grep cost.
| Autonomy | Zero mid-loop commit/babysit/next-pass prompts |
406
+
| Passes | ≤ mode cap (lite 2, full 3) |
407
+
408
+
**A/B skill versions:** same probe dir, two sessions (before/after skill edit); compare recall, false fixes, passes, autonomy.
409
+
410
+
Future: log parser for `Task` reviewer JSON (same spirit as `parse-agent-log.ts`) to automate recall scoring.
411
+
370
412
#### Dual-agent study (codemap self-index, provisional)
371
413
372
414
Exploratory runs on the **codemap repo** index (not `fixtures/minimal`) — four structural tasks, MCP-on vs MCP-forbidden (grep/read/shell only). Not pinned in CI; methodology caveats apply.
Copy file name to clipboardExpand all lines: docs/testing-coverage.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@
14
14
|**In-repo test bench**|`bun run test:golden`| Index `fixtures/minimal/` (bench corpus) → compare `fixtures/golden/minimal/*.json`. Map: `fixtures/CAPABILITIES.json`. |
15
15
|**Golden guard**|`bun run test:scripts`|`scripts/query-golden-coverage-matrix.test.mjs` — every bundled recipe + substrate table has a scenario. |
16
16
|**Agent eval**|`bun run test:agent-eval`| Probe arms vs golden ids (MCP-on vs glob/read). |
17
+
|**Harden-pr probes**|`bun run test:harden-probes`| Schema + pre-fix fail + score oracle; manual agent run + `acceptance.sh` after fix. |
|**Apply CLI e2e**|`src/cli/cmd-apply.test.ts`| Temp project + full index: recipe dry-run/apply, `--rows`, second recipe disk apply. |
@@ -102,6 +103,18 @@ Codemap development uses **only** the committed bench ([fixtures/README.md](../f
102
103
103
104
`scripts/agent-eval/scenarios.json` — one probe per `CAPABILITIES.json` capability id (groups with `unitTests` or `enforcedBy` instead: `recipes.bundled`, `cli.bench-smoke`, `cli.mcp.http`). Each probe’s `goldenId` must appear in that group’s `goldenScenarios`; multiple substrate ids per group are fine — one matching probe is enough. Enforced by `scripts/agent-eval/capability-probes.test.mjs` in `test:scripts`.
104
105
106
+
### Harden-pr workflow probes
107
+
108
+
Manual eval for [`.agents/skills/harden-pr/`](../.agents/skills/harden-pr/SKILL.md) — not automated agent runs in CI yet.
|[`scripts/agent-eval/harden-scenarios.json`](../scripts/agent-eval/harden-scenarios.json)| Scenario index (probe dir, mode, acceptance script) |
114
+
|[`scripts/harden-probes/validate-fixtures.test.mjs`](../scripts/harden-probes/validate-fixtures.test.mjs)| Schema guard in `test:scripts`|
115
+
116
+
Run a probe: open the probe dir in Cursor → `/harden-pr lite` → score findings with `score-probe.mjs` → `bash acceptance.sh`. Mechanical smoke: `bun run test:harden-probes`. Full protocol: [benchmark.md § Harden-pr workflow eval](./benchmark.md#harden-pr-workflow-eval).
Manual workflow eval fixtures for [`.agents/skills/harden-pr/SKILL.md`](../../.agents/skills/harden-pr/SKILL.md). Not shipped in npm.
4
+
5
+
Each probe is a small corpus with **injected production-bar gaps** and a golden finding oracle. Agents run `/harden-pr` against the probe; humans score recall, precision, and autonomy.
0 commit comments