@humanbased/crosscheck 1.0.0 → 1.1.0-beta.12

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 (64) hide show
  1. package/README.md +87 -17
  2. package/crosscheck.config.example.yml +4 -0
  3. package/dist/__tests__/alter.test.d.ts +2 -0
  4. package/dist/__tests__/alter.test.d.ts.map +1 -0
  5. package/dist/__tests__/alter.test.js +59 -0
  6. package/dist/__tests__/alter.test.js.map +1 -0
  7. package/dist/__tests__/onboard-preservation.test.js +15 -4
  8. package/dist/__tests__/onboard-preservation.test.js.map +1 -1
  9. package/dist/__tests__/port.test.d.ts +2 -0
  10. package/dist/__tests__/port.test.d.ts.map +1 -0
  11. package/dist/__tests__/port.test.js +30 -0
  12. package/dist/__tests__/port.test.js.map +1 -0
  13. package/dist/__tests__/pr-status-scan.test.js +21 -0
  14. package/dist/__tests__/pr-status-scan.test.js.map +1 -1
  15. package/dist/__tests__/pr-workflow-state.test.js +7 -7
  16. package/dist/__tests__/pr-workflow-state.test.js.map +1 -1
  17. package/dist/__tests__/repo-workflow.test.d.ts +2 -0
  18. package/dist/__tests__/repo-workflow.test.d.ts.map +1 -0
  19. package/dist/__tests__/repo-workflow.test.js +82 -0
  20. package/dist/__tests__/repo-workflow.test.js.map +1 -0
  21. package/dist/cli.js +37 -4
  22. package/dist/cli.js.map +1 -1
  23. package/dist/commands/alter.d.ts +11 -0
  24. package/dist/commands/alter.d.ts.map +1 -0
  25. package/dist/commands/alter.js +80 -0
  26. package/dist/commands/alter.js.map +1 -0
  27. package/dist/commands/detect-step.d.ts.map +1 -1
  28. package/dist/commands/detect-step.js +2 -1
  29. package/dist/commands/detect-step.js.map +1 -1
  30. package/dist/commands/onboard.d.ts.map +1 -1
  31. package/dist/commands/onboard.js +18 -5
  32. package/dist/commands/onboard.js.map +1 -1
  33. package/dist/commands/run.d.ts.map +1 -1
  34. package/dist/commands/run.js +9 -3
  35. package/dist/commands/run.js.map +1 -1
  36. package/dist/commands/scan.d.ts.map +1 -1
  37. package/dist/commands/scan.js +2 -1
  38. package/dist/commands/scan.js.map +1 -1
  39. package/dist/commands/watch.d.ts +1 -1
  40. package/dist/commands/watch.d.ts.map +1 -1
  41. package/dist/commands/watch.js +57 -26
  42. package/dist/commands/watch.js.map +1 -1
  43. package/dist/config/schema.d.ts +3 -0
  44. package/dist/config/schema.d.ts.map +1 -1
  45. package/dist/config/schema.js +14 -0
  46. package/dist/config/schema.js.map +1 -1
  47. package/dist/lib/port.d.ts +1 -0
  48. package/dist/lib/port.d.ts.map +1 -1
  49. package/dist/lib/port.js +10 -0
  50. package/dist/lib/port.js.map +1 -1
  51. package/dist/lib/pr-status.d.ts.map +1 -1
  52. package/dist/lib/pr-status.js +15 -1
  53. package/dist/lib/pr-status.js.map +1 -1
  54. package/dist/lib/pr-workflow-state.js +3 -3
  55. package/dist/lib/pr-workflow-state.js.map +1 -1
  56. package/dist/lib/repo-workflow.d.ts +19 -0
  57. package/dist/lib/repo-workflow.d.ts.map +1 -0
  58. package/dist/lib/repo-workflow.js +127 -0
  59. package/dist/lib/repo-workflow.js.map +1 -0
  60. package/dist/lib/workflow.d.ts.map +1 -1
  61. package/dist/lib/workflow.js +12 -2
  62. package/dist/lib/workflow.js.map +1 -1
  63. package/get-started.md +42 -4
  64. package/package.json +1 -1
package/get-started.md CHANGED
@@ -217,8 +217,13 @@ You can override the saved choice for a single session without touching the conf
217
217
  ```bash
218
218
  crosscheck watch --personal # personal mode this session only
219
219
  crosscheck watch --team # team mode this session only
220
+ crosscheck watch --port 8080 # force a specific webhook port this session (overrides config; not saved)
220
221
  ```
221
222
 
223
+ `--port <n>` forces the local webhook server onto that exact port for this session
224
+ without editing `server.port` in config — useful for running a second instance or
225
+ avoiding a port already in use. If the port is taken, `watch` exits with an error.
226
+
222
227
  To re-run the prompt and permanently change your choice:
223
228
 
224
229
  ```bash
@@ -256,13 +261,13 @@ When you press `Ctrl+C`, the SSH tunnel and any registered webhooks are cleaned
256
261
 
257
262
  **Token scope for org webhooks:** `GITHUB_TOKEN` needs `write:org` scope for org-level coverage. For repo-level, `repo` scope is sufficient.
258
263
 
259
- **Review-only mode:** pass `--only-review` to post reviews and nothing else — crosscheck never runs the fix, recheck, or conflict-resolve steps, and never pushes commits to your PRs:
264
+ **Review-only for a repo:** make a repo post reviews and nothing else with `crosscheck alter <repo> --review-only` — crosscheck never runs the fix, recheck, or conflict-resolve steps for it, and never pushes commits to its PRs:
260
265
 
261
266
  ```bash
262
- crosscheck watch --only-review
267
+ crosscheck alter humanbased-ai/xny-monorepo --review-only
263
268
  ```
264
269
 
265
- Each PR (and each new pushed SHA) gets a fresh review comment; content that has already been reviewed at the current SHA is skipped. Use this when you want crosscheck's verdicts but want to apply fixes yourself.
270
+ Each PR (and each new pushed SHA) on a review-only repo gets a fresh review comment; content that has already been reviewed at the current SHA is skipped. Use this when you want crosscheck's verdicts on a repo but want to apply fixes yourself. Review-only is a per-repo setting now — there is no global `--only-review` flag.
266
271
 
267
272
  ---
268
273
 
@@ -428,6 +433,31 @@ crosscheck onboard
428
433
  | `--team` | Use team deployment mode for this session only |
429
434
  | `--reconfigure` | Re-run setup even if `deployment` is already set in config |
430
435
 
436
+ Onboard never touches per-repo workflow overrides written by `crosscheck alter` — those live in their own files under `~/.crosscheck/workflows/`.
437
+
438
+ ---
439
+
440
+ ### `crosscheck alter`
441
+
442
+ Sets the workflow depth for one repo without changing the global default. Writes a standalone file at `~/.crosscheck/workflows/<owner>__<repo>.yml` that narrows the global `~/.crosscheck/workflow.yml` for that repo only. Use it when one watcher should run different depths for different repos. `alter-workflow` is an alias.
443
+
444
+ ```bash
445
+ crosscheck alter humanbased-ai/xny-monorepo --review-only # alias for --steps review
446
+ crosscheck alter github.com/humanbased-ai/xny-monorepo --steps review,fix
447
+ crosscheck alter https://github.com/humanbased-ai/xny-monorepo --steps review,fix,recheck
448
+ crosscheck alter humanbased-ai/xny-monorepo --show # print effective steps, no write
449
+ crosscheck alter humanbased-ai/xny-monorepo --reset # remove the override
450
+ ```
451
+
452
+ | Flag | Description |
453
+ |---|---|
454
+ | `--steps <list>` | `review`, `review,fix`, or `review,fix,recheck` |
455
+ | `--review-only` | Alias for `--steps review` |
456
+ | `--show` | Print the repo's effective steps without writing |
457
+ | `--reset` | Remove the override; revert to the global default |
458
+
459
+ Accepted repo formats: `owner/repo`, `github.com/owner/repo`, and `https://github.com/owner/repo`. Changes apply on the next PR event — no need to restart a running `crosscheck watch`.
460
+
431
461
  ---
432
462
 
433
463
  ### `crosscheck review <pr-urls...>`
@@ -643,7 +673,6 @@ Uses `localhost.run` (SSH) to open a public tunnel — SSH is pre-installed on m
643
673
  | Flag | Description |
644
674
  |---|---|
645
675
  | `-c, --config <path>` | Use a specific config file |
646
- | `--only-review` | Review-only mode: post reviews but never fix, recheck, or resolve |
647
676
  | `--personal` / `--team` | Override the saved deployment mode for this session only |
648
677
  | `--reconfigure` | Re-run deployment setup and save the new choice |
649
678
  | `--backtrace` / `--no-backtrace` | Force on/off the startup scan for unreviewed open PRs |
@@ -916,6 +945,8 @@ On re-runs, `onboard` updates only the fields it collected answers for. Everythi
916
945
 
917
946
  **Updated on every run:** `deployment`, `orgs`, `repos`, `mode`, `clone_protocol`, `vendors.*.enabled`, `vendors.*.effort`, `quality.tier`, `tunnel.*`, `post_review.auto_fix.*`
918
947
 
948
+ **Never touched by onboard:** per-repo overrides in `~/.crosscheck/workflows/` (owned by `crosscheck alter`), and `~/.crosscheck/workflow.yml` after its first write
949
+
919
950
  **Initialised on first run, never overwritten:** `routing.allowed_authors`, `routing.author_routes`, `routing.fallback_reviewer`
920
951
 
921
952
  **Never touched by onboard:** `quality.focus`, `quality.custom_prompt`, `budget.*`, `branding.*`, `server.*`, `logs.*`, `backtrace.*`, `workflow.yml` (after first write), harness files
@@ -1001,9 +1032,14 @@ users:
1001
1032
 
1002
1033
  # ── Repos — for monitoring specific repos only ────────────────────────────────
1003
1034
  # Omit when using `orgs`/`users`. Auto-detected from git remote if all are empty.
1035
+ # To run one repo at a narrower workflow depth, do NOT add fields here — run
1036
+ # `crosscheck alter <owner>/<repo> --review-only` (or --steps review,fix). That
1037
+ # writes ~/.crosscheck/workflows/<owner>__<repo>.yml, live-reloaded per PR.
1004
1038
  repos:
1005
1039
  - owner: acme
1006
1040
  name: specific-repo
1041
+ - owner: humanbased-ai
1042
+ name: xny-monorepo
1007
1043
 
1008
1044
  # ── Routing ───────────────────────────────────────────────────────────────────
1009
1045
  routing:
@@ -1309,6 +1345,8 @@ To reset the review step instructions to defaults, delete `~/.crosscheck/workflo
1309
1345
 
1310
1346
  Yes. Create `.crosscheck/workflow.yml` in your repo root. crosscheck loads it automatically and uses it instead of the built-in default pipeline. This is the recommended way to customize reviewer behavior — it keeps all per-project settings in one file under version control.
1311
1347
 
1348
+ For one always-on watcher that monitors many repos, use `crosscheck alter owner/repo --review-only` (or `--steps review,fix`) instead. That writes `~/.crosscheck/workflows/<owner>__<repo>.yml`, which narrows the global workflow for that one repo — live-reloaded, no restart — while the rest keep the global workflow.
1349
+
1312
1350
  ### What is `AGENT.md`?
1313
1351
 
1314
1352
  `AGENT.md` is the harness document that guides the AI during `crosscheck optimize`. It defines the input/output contract, language-detection rules, constraint-writing guidelines, and quality principles. It ships bundled with crosscheck so `optimize` works out of the box.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanbased/crosscheck",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-beta.12",
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",