@humanbased/crosscheck 0.18.0-beta.9 → 0.18.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.
Files changed (65) hide show
  1. package/README.md +45 -6
  2. package/README.zh.md +11 -1
  3. package/dist/__tests__/kickass.test.js +1 -1
  4. package/dist/__tests__/kickass.test.js.map +1 -1
  5. package/dist/__tests__/multi-run.test.d.ts +2 -0
  6. package/dist/__tests__/multi-run.test.d.ts.map +1 -0
  7. package/dist/__tests__/multi-run.test.js +105 -0
  8. package/dist/__tests__/multi-run.test.js.map +1 -0
  9. package/dist/__tests__/pr-spec.test.d.ts +2 -0
  10. package/dist/__tests__/pr-spec.test.d.ts.map +1 -0
  11. package/dist/__tests__/pr-spec.test.js +82 -0
  12. package/dist/__tests__/pr-spec.test.js.map +1 -0
  13. package/dist/__tests__/pr-state.test.d.ts +2 -0
  14. package/dist/__tests__/pr-state.test.d.ts.map +1 -0
  15. package/dist/__tests__/pr-state.test.js +19 -0
  16. package/dist/__tests__/pr-state.test.js.map +1 -0
  17. package/dist/__tests__/run.test.js +48 -1
  18. package/dist/__tests__/run.test.js.map +1 -1
  19. package/dist/__tests__/tips.test.js +9 -0
  20. package/dist/__tests__/tips.test.js.map +1 -1
  21. package/dist/cli.js +70 -29
  22. package/dist/cli.js.map +1 -1
  23. package/dist/commands/kickass.d.ts +2 -12
  24. package/dist/commands/kickass.d.ts.map +1 -1
  25. package/dist/commands/kickass.js +11 -32
  26. package/dist/commands/kickass.js.map +1 -1
  27. package/dist/commands/review.d.ts +8 -0
  28. package/dist/commands/review.d.ts.map +1 -1
  29. package/dist/commands/review.js +61 -0
  30. package/dist/commands/review.js.map +1 -1
  31. package/dist/commands/run.d.ts +8 -0
  32. package/dist/commands/run.d.ts.map +1 -1
  33. package/dist/commands/run.js +179 -1
  34. package/dist/commands/run.js.map +1 -1
  35. package/dist/commands/watch.d.ts.map +1 -1
  36. package/dist/commands/watch.js +107 -11
  37. package/dist/commands/watch.js.map +1 -1
  38. package/dist/lib/board.d.ts.map +1 -1
  39. package/dist/lib/board.js +5 -3
  40. package/dist/lib/board.js.map +1 -1
  41. package/dist/lib/cli-invocation.d.ts +13 -0
  42. package/dist/lib/cli-invocation.d.ts.map +1 -0
  43. package/dist/lib/cli-invocation.js +27 -0
  44. package/dist/lib/cli-invocation.js.map +1 -0
  45. package/dist/lib/multi-run.d.ts +34 -0
  46. package/dist/lib/multi-run.d.ts.map +1 -0
  47. package/dist/lib/multi-run.js +127 -0
  48. package/dist/lib/multi-run.js.map +1 -0
  49. package/dist/lib/pr-spec.d.ts +14 -0
  50. package/dist/lib/pr-spec.d.ts.map +1 -0
  51. package/dist/lib/pr-spec.js +85 -0
  52. package/dist/lib/pr-spec.js.map +1 -0
  53. package/dist/lib/pr-state.d.ts +9 -0
  54. package/dist/lib/pr-state.d.ts.map +1 -0
  55. package/dist/lib/pr-state.js +13 -0
  56. package/dist/lib/pr-state.js.map +1 -0
  57. package/dist/lib/runner.d.ts.map +1 -1
  58. package/dist/lib/runner.js +7 -0
  59. package/dist/lib/runner.js.map +1 -1
  60. package/dist/lib/tips.d.ts +1 -1
  61. package/dist/lib/tips.d.ts.map +1 -1
  62. package/dist/lib/tips.js +4 -0
  63. package/dist/lib/tips.js.map +1 -1
  64. package/get-started.md +103 -10
  65. package/package.json +1 -1
package/get-started.md CHANGED
@@ -16,8 +16,10 @@
16
16
  - [Commands](#commands)
17
17
  - [init](#crosscheck-init)
18
18
  - [onboard](#crosscheck-onboard)
19
- - [review](#crosscheck-review-pr-url)
20
- - [run](#crosscheck-run-pr-url)
19
+ - [review](#crosscheck-review-pr-urls)
20
+ - [run](#crosscheck-run-pr-urls)
21
+ - [recheck / fix / resolve](#crosscheck-recheck--fix--resolve-pr-urls)
22
+ - [Multi-PR syntax](#multi-pr-syntax)
21
23
  - [watch](#crosscheck-watch)
22
24
  - [serve](#crosscheck-serve-beta)
23
25
  - [status](#crosscheck-status)
@@ -402,7 +404,7 @@ crosscheck onboard --reconfigure # re-run setup even if config already exists
402
404
 
403
405
  The `review → fix → re-check` option writes a `~/.crosscheck/workflow.yml` with all three pipeline steps configured.
404
406
 
405
- **Step 8 — Fix -> recheck rounds.** When the full loop is selected, choose how many fix/recheck rounds Crosscheck can run before stopping.
407
+ **Step 8 — Fix -> recheck rounds.** When the full loop is selected, choose how many autonomous fixrecheck cycles Crosscheck can run before stopping. Each cycle is one fix commit followed by one recheck: `review → fix¹ → recheck¹ → fix² → recheck² → …`. Crosscheck drives these cycles automatically — no human push needed between rounds. A round stops early when the recheck returns `APPROVE`. The cap prevents runaway loops when issues resist automated fixing.
406
408
 
407
409
  **Step 9 — Auto conflict-resolve.** Optionally add a merge-conflict resolution step before review.
408
410
 
@@ -496,26 +498,41 @@ crosscheck onboard
496
498
 
497
499
  ---
498
500
 
499
- ### `crosscheck review <pr-url>`
501
+ ### `crosscheck review <pr-urls...>`
500
502
 
501
- Manually triggers a review for a single PR.
503
+ Manually triggers a review for one or more PRs. The PR argument accepts the [multi-PR spec syntax](#multi-pr-syntax) — comma-separated URLs, bare numbers, and ranges. When more than one PR is selected they are reviewed concurrently (one agent per PR by default).
502
504
 
503
505
  ```bash
504
506
  crosscheck review https://github.com/owner/repo/pull/123
505
507
  crosscheck review https://github.com/owner/repo/pull/123 --reviewer codex
506
508
  crosscheck review https://github.com/owner/repo/pull/123 --reviewer claude
509
+
510
+ # multiple PRs in the same repo (comma list and ranges)
511
+ crosscheck review https://github.com/owner/repo/pull/245,255
512
+ crosscheck review https://github.com/owner/repo/pull/245-256
513
+
514
+ # PRs across different repos
515
+ crosscheck review https://github.com/owner/repo/pull/245,https://github.com/other/repo/pull/210
507
516
  ```
508
517
 
509
518
  | Flag | Description |
510
519
  |---|---|
511
520
  | `-r, --reviewer codex\|claude` | Skip auto-detection and force a specific reviewer |
521
+ | `--vendor codex\|claude` | Alias for `--reviewer` |
522
+ | `--concurrent [n]` | Multi-PR: cap parallel agents; omit `n` for one agent per PR (default) |
523
+ | `--sequential` | Multi-PR: run PRs one at a time instead of in parallel |
524
+ | `--stagger <ms>` | Multi-PR: delay between concurrent worker starts (default 2000) |
512
525
  | `-c, --config <path>` | Use a specific config file |
513
526
 
514
527
  ---
515
528
 
516
- ### `crosscheck run <pr-url>`
529
+ ### `crosscheck run <pr-urls...>`
530
+
531
+ Runs the configured workflow against one or more PRs: review → (fix → recheck) × `max_rounds`. The PR argument accepts the [multi-PR spec syntax](#multi-pr-syntax). Without `--steps`, `detect-step` determines where to resume from live PR history (skipping steps already completed for the current HEAD), then runs all remaining steps from that point. Pass `--steps` explicitly to restrict to specific steps.
517
532
 
518
- Runs the full configured workflow against a single PR: review → (fix recheck) × `max_rounds`. Without `--steps`, `detect-step` determines where to resume from live PR history (skipping steps already completed for the current HEAD), then runs all remaining steps from that point. Pass `--steps` explicitly to restrict to specific steps.
533
+ Loops autonomously through fix→recheck cycles up to the `max_rounds` value configured in `workflow.yml` (default: 1). Use `--crazy` (loop until `APPROVE`) or `--half-crazy` (loop until not `BLOCK`) to bypass `max_rounds` entirely.
534
+
535
+ When the spec selects more than one PR, each PR runs in its own subprocess and they execute concurrently (one agent per PR by default). Use `--concurrent <n>` to cap parallelism, or `--sequential` to run one at a time.
519
536
 
520
537
  ```bash
521
538
  crosscheck run https://github.com/owner/repo/pull/123
@@ -526,6 +543,12 @@ crosscheck run https://github.com/owner/repo/pull/123 --steps review,fix
526
543
  crosscheck run https://github.com/owner/repo/pull/123 --dry-run
527
544
  crosscheck run https://github.com/owner/repo/pull/123 --crazy # loop until APPROVE
528
545
  crosscheck run https://github.com/owner/repo/pull/123 --halfcrazy
546
+
547
+ # multiple PRs, run concurrently
548
+ crosscheck run https://github.com/owner/repo/pull/245,255
549
+ crosscheck run https://github.com/owner/repo/pull/245-256
550
+ crosscheck run https://github.com/owner/repo/pull/245,https://github.com/other/repo/pull/210
551
+ crosscheck run https://github.com/owner/repo/pull/245-256 --concurrent 3
529
552
  ```
530
553
 
531
554
  The workflow executed is loaded from `.crosscheck/workflow.yml` in the operator repo root if present, then `~/.crosscheck/workflow.yml`, and otherwise falls back to the built-in default pipeline: review, then fix when the verdict is not `APPROVE`. Use `crosscheck run` to test your full pipeline end-to-end against a real PR.
@@ -537,13 +560,64 @@ The workflow executed is loaded from `.crosscheck/workflow.yml` in the operator
537
560
  | `--vendor codex\|claude` | Force review, recheck, and fix steps to use this vendor |
538
561
  | `--steps <list>` | Run only the listed step types, comma-separated: `review`, `fix`, `recheck` |
539
562
  | `--dry-run` | Run the review but do not post a comment or apply fixes |
540
- | `--expected-head-sha <sha>` | Skip if the PR head changed since the command was queued |
563
+ | `--expected-head-sha <sha>` | Skip if the PR head changed since the command was queued (single PR only) |
541
564
  | `--crazy` | After the initial run, loop fix→recheck until APPROVE (ceiling: 2 rounds) |
542
565
  | `--halfcrazy` | After the initial run, loop until verdict is not BLOCK — stops at NEEDS\_WORK or APPROVE |
566
+ | `--concurrent [n]` | Multi-PR: cap parallel agents; omit `n` for one agent per PR (default) |
567
+ | `--sequential` | Multi-PR: run PRs one at a time instead of in parallel |
568
+ | `--stagger <ms>` | Multi-PR: delay between concurrent worker starts (default 2000) |
543
569
  | `-c, --config <path>` | Use a specific config file |
544
570
 
545
571
  ---
546
572
 
573
+ ### `crosscheck recheck` / `fix` / `resolve <pr-urls...>`
574
+
575
+ Force a single workflow step against one or more PRs, bypassing next-step auto-detection. Each is equivalent to `crosscheck run <spec> --steps <type>` but as a first-class command, and each accepts the same [multi-PR spec syntax](#multi-pr-syntax) and concurrency flags as `run`.
576
+
577
+ | Command | Forces | Equivalent |
578
+ |---|---|---|
579
+ | `crosscheck recheck <spec>` | the `recheck` step (re-evaluate against the latest review) | `run <spec> --steps recheck` |
580
+ | `crosscheck fix <spec>` | the `fix` step (apply fixes for the latest review) | `run <spec> --steps fix` |
581
+ | `crosscheck resolve <spec>` | the `conflict-resolve` step (resolve merge conflicts) | `run <spec> --steps conflict-resolve` |
582
+
583
+ ```bash
584
+ crosscheck recheck https://github.com/owner/repo/pull/245
585
+ crosscheck fix https://github.com/owner/repo/pull/245,255 --fixer claude
586
+ crosscheck resolve https://github.com/owner/repo/pull/245-256 --vendor claude
587
+ ```
588
+
589
+ When the named step is not present in the active `workflow.yml`, `recheck` and `conflict-resolve` are synthesized with built-in defaults so the command still runs. `resolve` only supports `claude` (Codex conflict resolution is not yet supported); pass `--vendor claude` if the PR's assigned reviewer is Codex.
590
+
591
+ ---
592
+
593
+ ### Multi-PR syntax
594
+
595
+ The `run`, `review`, `recheck`, `fix`, and `resolve` commands accept a single PR URL or a **spec** that expands to many PRs. A spec is a comma-separated list of tokens:
596
+
597
+ | Token | Meaning | Example |
598
+ |---|---|---|
599
+ | Full PR URL | one PR; also sets the repo for following bare tokens | `https://github.com/owner/repo/pull/245` |
600
+ | Bare number | one PR in the most recent repo | `255` |
601
+ | Range `N-M` | inclusive range of PR numbers (in a URL tail or bare) | `245-256` |
602
+
603
+ ```bash
604
+ # two PRs in the same repo
605
+ .../pull/245,255
606
+
607
+ # an inclusive range
608
+ .../pull/245-256
609
+
610
+ # PRs across different repos (each full URL switches repo)
611
+ .../owner/repo/pull/245,https://github.com/other/repo/pull/210
612
+
613
+ # mix and match
614
+ .../owner/repo/pull/245-247,250,https://github.com/other/repo/pull/3
615
+ ```
616
+
617
+ Rules: the first token must be a full URL (a bare number with no preceding repo is an error), duplicate PRs are de-duplicated, and a spec may expand to at most 100 PRs. Multiple PRs run concurrently by default — control parallelism with `--concurrent <n>` / `--sequential` / `--stagger <ms>`.
618
+
619
+ ---
620
+
547
621
  ### `crosscheck scan`
548
622
 
549
623
  Scans monitored open PRs and shows which crosscheck workflow state each PR is in.
@@ -609,7 +683,7 @@ crosscheck kickass
609
683
 
610
684
  crosscheck watch
611
685
  ├─ issue_comment (type=review) → pick up fix step automatically
612
- └─ synchronize (fix commit) pick up recheck step automatically
686
+ └─ fix commit done auto-loop to next fix→recheck round (up to max_rounds)
613
687
  ```
614
688
 
615
689
  > **Note:** `ck run <url>` invoked directly (without `--trigger kickass`) runs the **full remaining pipeline** from the detected starting step. The one-step behaviour above applies only when kickass dispatches it.
@@ -617,7 +691,7 @@ crosscheck watch
617
691
  `kickass` advances each PR exactly one step using live `detect-step` detection. `watch` owns all continuation via webhooks:
618
692
 
619
693
  - A posted review fires an `issue_comment` webhook → `watch` starts the fix step.
620
- - A fix commit fires a `synchronize` webhook → `watch` starts the recheck step.
694
+ - After a fix commit, `watch` automatically triggers the next fixrecheck round (up to `max_rounds` cycles). No human push needed between rounds.
621
695
 
622
696
  No second `kickass` run is needed. Once `kickass` kicks the first step, the pipeline advances on its own as long as `watch` is running. (Introduced in [#193](https://github.com/Motivation-Labs/crosscheck/pull/193).)
623
697
 
@@ -1359,6 +1433,25 @@ tunnel:
1359
1433
  crosscheck registers the smee channel URL as your GitHub webhook automatically on first `watch` start. The channel URL never changes, so no re-registration is needed on restart. Unlike `localhost.run`, events are queued while you're offline and replayed when you reconnect.
1360
1434
 
1361
1435
 
1436
+ ### What does `max_rounds` mean?
1437
+
1438
+ `max_rounds` on the `fix` and `recheck` steps controls how many autonomous fix→recheck cycles can run for a single PR before the loop stops.
1439
+
1440
+ **Pattern with `max_rounds: 3`:**
1441
+ ```
1442
+ review → fix¹ → recheck¹ → fix² → recheck² → fix³ → recheck³
1443
+ ```
1444
+
1445
+ Each cycle is one `[crosscheck]` fix commit followed by one recheck. The loop stops early when:
1446
+ - the recheck returns `APPROVE` (done), or
1447
+ - `round` reaches `max_rounds` (cap hit — human attention required for remaining issues).
1448
+
1449
+ `max_rounds: 1` (the default) runs one cycle: review → fix → recheck. If the recheck still says `NEEDS WORK` or `BLOCK`, the loop stops and the outstanding issues need manual resolution.
1450
+
1451
+ `max_rounds` is a per-step field. Crosscheck uses the minimum across all fix and recheck steps in the workflow, so setting `max_rounds: 3` on both keeps them in sync. Setting it to different values on fix vs recheck is not recommended.
1452
+
1453
+ `max_rounds` is respected by both `crosscheck watch` and `crosscheck run`. `watch` re-triggers on each pushed fix commit; `run` loops inline within the same session. `crosscheck serve` does not yet implement autonomous looping — use `watch` if you need `max_rounds > 1` in continuous mode.
1454
+
1362
1455
  ### Can I disable the auto-fix step?
1363
1456
 
1364
1457
  Yes. Set `post_review.auto_fix.enabled: false` in your config, or set `trigger: never`. You can also raise `min_severity` to `error` to limit fixes to blocking issues only.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanbased/crosscheck",
3
- "version": "0.18.0-beta.9",
3
+ "version": "0.18.0",
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",