@humanbased/crosscheck 1.2.0-beta.79 → 1.2.0-beta.81
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 +51 -5
- package/crosscheck.config.example.yml +39 -8
- package/dist/__tests__/board.test.js +11 -0
- package/dist/__tests__/board.test.js.map +1 -1
- package/dist/__tests__/onboard-preservation.test.js +54 -3
- package/dist/__tests__/onboard-preservation.test.js.map +1 -1
- package/dist/__tests__/repository-guidance.test.js +1 -1
- package/dist/__tests__/repository-guidance.test.js.map +1 -1
- package/dist/__tests__/review-models.test.js +5 -2
- package/dist/__tests__/review-models.test.js.map +1 -1
- package/dist/__tests__/review-strategy.test.d.ts +2 -0
- package/dist/__tests__/review-strategy.test.d.ts.map +1 -0
- package/dist/__tests__/review-strategy.test.js +397 -0
- package/dist/__tests__/review-strategy.test.js.map +1 -0
- package/dist/commands/onboard.d.ts +25 -3
- package/dist/commands/onboard.d.ts.map +1 -1
- package/dist/commands/onboard.js +151 -46
- package/dist/commands/onboard.js.map +1 -1
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +22 -4
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/commands/watch.js +38 -6
- package/dist/commands/watch.js.map +1 -1
- package/dist/config/review-model-tiers.json +3 -3
- package/dist/config/review-strategy.json +204 -0
- package/dist/config/schema.d.ts +7 -5
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +29 -7
- package/dist/config/schema.js.map +1 -1
- package/dist/github/client.d.ts +16 -1
- package/dist/github/client.d.ts.map +1 -1
- package/dist/github/client.js +32 -1
- package/dist/github/client.js.map +1 -1
- package/dist/github/webhook.d.ts +4 -0
- package/dist/github/webhook.d.ts.map +1 -1
- package/dist/github/webhook.js.map +1 -1
- package/dist/lib/annotation.d.ts +7 -0
- package/dist/lib/annotation.d.ts.map +1 -1
- package/dist/lib/annotation.js +11 -1
- package/dist/lib/annotation.js.map +1 -1
- package/dist/lib/board.d.ts +3 -0
- package/dist/lib/board.d.ts.map +1 -1
- package/dist/lib/board.js +4 -2
- package/dist/lib/board.js.map +1 -1
- package/dist/lib/comment-bodies.d.ts +2 -0
- package/dist/lib/comment-bodies.d.ts.map +1 -1
- package/dist/lib/comment-bodies.js +5 -1
- package/dist/lib/comment-bodies.js.map +1 -1
- package/dist/lib/review-models.d.ts +15 -2
- package/dist/lib/review-models.d.ts.map +1 -1
- package/dist/lib/review-models.js +19 -6
- package/dist/lib/review-models.js.map +1 -1
- package/dist/lib/review-strategy.d.ts +92 -0
- package/dist/lib/review-strategy.d.ts.map +1 -0
- package/dist/lib/review-strategy.js +282 -0
- package/dist/lib/review-strategy.js.map +1 -0
- package/dist/lib/runner.d.ts +80 -0
- package/dist/lib/runner.d.ts.map +1 -1
- package/dist/lib/runner.js +289 -17
- package/dist/lib/runner.js.map +1 -1
- package/docs/dynamic-thoroughness.md +738 -0
- package/get-started.md +68 -7
- package/package.json +4 -3
package/get-started.md
CHANGED
|
@@ -1119,7 +1119,8 @@ vendors:
|
|
|
1119
1119
|
|
|
1120
1120
|
# ── Quality ───────────────────────────────────────────────────────────────────
|
|
1121
1121
|
quality:
|
|
1122
|
-
|
|
1122
|
+
mode: smart # smart (default) | fixed — see Review thoroughness
|
|
1123
|
+
tier: balanced # fast | balanced | thorough (fallback under smart)
|
|
1123
1124
|
focus: # narrows review scope (optional)
|
|
1124
1125
|
- security
|
|
1125
1126
|
- types
|
|
@@ -1267,13 +1268,73 @@ linear: # write review verdicts back to a Linear issue (op
|
|
|
1267
1268
|
team_keys: [] # e.g. [IN] — required to match bare refs like IN-42
|
|
1268
1269
|
```
|
|
1269
1270
|
|
|
1271
|
+
### Review thoroughness
|
|
1272
|
+
|
|
1273
|
+
**`quality.mode: smart` is the default.** Crosscheck classifies each PR from its
|
|
1274
|
+
changed-file list and adjusts model and effort to match, rather than applying one
|
|
1275
|
+
tier to everything. Classification runs on the already-cloned working copy, so it
|
|
1276
|
+
costs one `git diff` and no API call. Set `mode: fixed` to opt out.
|
|
1277
|
+
|
|
1278
|
+
| # | PR class | Detected by | Tier | Steps |
|
|
1279
|
+
|---|---|---|---|---|
|
|
1280
|
+
| 1 | Generated / vendored | every file is a lockfile or build output | — | **PR skipped** |
|
|
1281
|
+
| 2 | Security / data-critical | auth, crypto, payment, migration paths; `risk:T3`; hotfix→default | `thorough` | full loop |
|
|
1282
|
+
| 3 | Deletion-only | ≤ 5 additions with ≥ 20 deletions | `fast` | review |
|
|
1283
|
+
| 4 | Docs / spec | ≥ 50% Markdown | `balanced` | review |
|
|
1284
|
+
| 5 | Test-only | every file is a test | `fast` | review, fix |
|
|
1285
|
+
| 6 | Config / infra | ≥ 50% config, no source | `balanced` | full loop |
|
|
1286
|
+
| 7 | Trivial | ≤ 3 files, ≤ 150 lines | `fast` | review, fix |
|
|
1287
|
+
| 8 | Standard | everything else | `balanced` | full loop |
|
|
1288
|
+
|
|
1289
|
+
First match wins, and security sits second so it dominates every cheapening rule
|
|
1290
|
+
below it — a deletion that removes auth code, or a two-file migration, is never
|
|
1291
|
+
routed to `fast`.
|
|
1292
|
+
|
|
1293
|
+
The class's step set narrows the configured pipeline and never widens it, so a
|
|
1294
|
+
repo pinned to review-only with `crosscheck alter` stays review-only. Rounds past
|
|
1295
|
+
the first escalate on measured non-convergence: effort rises where the model
|
|
1296
|
+
supports it, the tier is promoted where it does not.
|
|
1297
|
+
|
|
1298
|
+
Note that classes 3 and 4 narrow to `review` alone, which also drops
|
|
1299
|
+
`conflict-resolve` — review-only never touches code, and auto-conflict-resolve
|
|
1300
|
+
is code modification. That rule normally follows an operator's explicit
|
|
1301
|
+
`crosscheck alter --review-only`; under smart mode the *classifier* can reach it
|
|
1302
|
+
too, so a docs-only or deletion-only PR with a merge conflict is reviewed but not
|
|
1303
|
+
auto-resolved. Set `mode: fixed` if you want auto-conflict-resolve on every PR.
|
|
1304
|
+
|
|
1305
|
+
Every comment cites the policy that produced it:
|
|
1306
|
+
|
|
1307
|
+
```
|
|
1308
|
+
<!-- crosscheck: … verdict=BLOCK strategy=1.1.0 class=risky tier=thorough … -->
|
|
1309
|
+
```
|
|
1310
|
+
|
|
1311
|
+
> **Leave `vendors.*.model` unset under smart mode.** An explicit model outranks
|
|
1312
|
+
> the strategy, so pinning one makes per-PR selection a no-op. When that happens
|
|
1313
|
+
> crosscheck **withholds** the tier from the comment rather than citing one that
|
|
1314
|
+
> did not run. `crosscheck onboard` clears the pin — and prints what it cleared —
|
|
1315
|
+
> when you choose smart.
|
|
1316
|
+
|
|
1317
|
+
Verify the policy is current with `npm run verify:strategy`. Full rationale:
|
|
1318
|
+
[docs/dynamic-thoroughness.md](./docs/dynamic-thoroughness.md).
|
|
1319
|
+
|
|
1270
1320
|
### Quality tiers
|
|
1271
1321
|
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
|
1276
|
-
|
|
1322
|
+
Under `fixed`, the tier applies to every call. Under `smart`, it is the fallback
|
|
1323
|
+
when a PR's file list cannot be read.
|
|
1324
|
+
|
|
1325
|
+
| Tier | Claude | Codex | Cost per review | Best for |
|
|
1326
|
+
|---|---|---|---|---|
|
|
1327
|
+
| `fast` | Haiku 4.5 | GPT-5.6 Luna | $0.24 · $0.06 | High-volume repos, draft PRs |
|
|
1328
|
+
| `balanced` | Sonnet 5 | GPT-5.6 Terra | $0.72 · $0.58 | Default for most teams |
|
|
1329
|
+
| `thorough` | Opus 5 | GPT-5.6 Sol | $1.20 · $1.44 | Before merging to main |
|
|
1330
|
+
|
|
1331
|
+
Cost is output-token cost at 48k output tokens, the measured median for one
|
|
1332
|
+
review. A review is an agentic session, not a single call — expect 10–16 minutes
|
|
1333
|
+
of wall clock (median 643s, p90 984s across 43 logged runs). Tier changes depth
|
|
1334
|
+
and the subprocess timeout, not seconds-scale latency.
|
|
1335
|
+
|
|
1336
|
+
`claude-fable-5` is banned from review: 2× Opus 5's price for a lower coding
|
|
1337
|
+
benchmark score.
|
|
1277
1338
|
|
|
1278
1339
|
### Issue enrichment
|
|
1279
1340
|
|
|
@@ -1418,7 +1479,7 @@ Every comment crosscheck posts closes with the model and effort the step actuall
|
|
|
1418
1479
|
|
|
1419
1480
|
```
|
|
1420
1481
|
---
|
|
1421
|
-
_Reviewed with Claude Code via Crosscheck_ _(Opus
|
|
1482
|
+
_Reviewed with Claude Code via Crosscheck_ _(Opus 5 · high effort)_
|
|
1422
1483
|
|
|
1423
1484
|
_Skills: code-review-skill (by @awesome-skills, MIT)_
|
|
1424
1485
|
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humanbased/crosscheck",
|
|
3
|
-
"version": "1.2.0-beta.
|
|
3
|
+
"version": "1.2.0-beta.81",
|
|
4
4
|
"description": "AI code review pipeline that turns agent-written PRs into merge-ready patches",
|
|
5
5
|
"bin": {
|
|
6
6
|
"crosscheck": "dist/cli.js",
|
|
@@ -23,12 +23,13 @@
|
|
|
23
23
|
"node": ">=18"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "tsc && rm -rf dist/harness && cp -r src/harness dist/harness && cp src/config/review-model-tiers.json dist/config/review-model-tiers.json && chmod +x dist/cli.js dist/ck.js",
|
|
26
|
+
"build": "tsc && rm -rf dist/harness && cp -r src/harness dist/harness && cp src/config/review-model-tiers.json dist/config/review-model-tiers.json && cp src/config/review-strategy.json dist/config/review-strategy.json && chmod +x dist/cli.js dist/ck.js",
|
|
27
27
|
"dev": "tsx src/cli.ts",
|
|
28
28
|
"typecheck": "tsc --noEmit",
|
|
29
29
|
"test": "vitest run",
|
|
30
30
|
"lint": "eslint src --ext .ts",
|
|
31
|
-
"prepublishOnly": "npm run typecheck && npm run build"
|
|
31
|
+
"prepublishOnly": "npm run typecheck && npm run build",
|
|
32
|
+
"verify:strategy": "node scripts/verify-review-strategy.mjs"
|
|
32
33
|
},
|
|
33
34
|
"dependencies": {
|
|
34
35
|
"chalk": "^5.3.0",
|