@humanbased/crosscheck 1.2.0-beta.37 → 1.2.0-beta.57

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 (69) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +126 -393
  3. package/README.zh.md +1 -1
  4. package/assets/icon-256.png +0 -0
  5. package/assets/linear-comment.svg +18 -0
  6. package/assets/linear-onboard.svg +30 -0
  7. package/assets/linear-status.svg +23 -0
  8. package/assets/linear-test.svg +34 -0
  9. package/crosscheck.config.example.yml +12 -3
  10. package/dist/__tests__/codex.test.js +15 -1
  11. package/dist/__tests__/codex.test.js.map +1 -1
  12. package/dist/__tests__/linear-branding.test.d.ts +2 -0
  13. package/dist/__tests__/linear-branding.test.d.ts.map +1 -0
  14. package/dist/__tests__/linear-branding.test.js +156 -0
  15. package/dist/__tests__/linear-branding.test.js.map +1 -0
  16. package/dist/__tests__/linear-identity.test.js +6 -6
  17. package/dist/__tests__/linear-identity.test.js.map +1 -1
  18. package/dist/__tests__/linear-notify.test.js +1 -1
  19. package/dist/__tests__/linear-notify.test.js.map +1 -1
  20. package/dist/__tests__/linear-test-ref.test.d.ts +2 -0
  21. package/dist/__tests__/linear-test-ref.test.d.ts.map +1 -0
  22. package/dist/__tests__/linear-test-ref.test.js +81 -0
  23. package/dist/__tests__/linear-test-ref.test.js.map +1 -0
  24. package/dist/__tests__/linear-verify.test.js +21 -2
  25. package/dist/__tests__/linear-verify.test.js.map +1 -1
  26. package/dist/__tests__/linear-worker.test.js +2 -2
  27. package/dist/__tests__/linear-worker.test.js.map +1 -1
  28. package/dist/__tests__/optimize.test.js +1 -1
  29. package/dist/__tests__/optimize.test.js.map +1 -1
  30. package/dist/cli.js +22 -0
  31. package/dist/cli.js.map +1 -1
  32. package/dist/commands/linear-test.d.ts +18 -0
  33. package/dist/commands/linear-test.d.ts.map +1 -0
  34. package/dist/commands/linear-test.js +130 -0
  35. package/dist/commands/linear-test.js.map +1 -0
  36. package/dist/commands/onboard.d.ts +10 -0
  37. package/dist/commands/onboard.d.ts.map +1 -1
  38. package/dist/commands/onboard.js +81 -1
  39. package/dist/commands/onboard.js.map +1 -1
  40. package/dist/commands/status.d.ts.map +1 -1
  41. package/dist/commands/status.js +6 -3
  42. package/dist/commands/status.js.map +1 -1
  43. package/dist/config/schema.d.ts +25 -10
  44. package/dist/config/schema.d.ts.map +1 -1
  45. package/dist/config/schema.js +19 -3
  46. package/dist/config/schema.js.map +1 -1
  47. package/dist/linear/comment.d.ts.map +1 -1
  48. package/dist/linear/comment.js +5 -1
  49. package/dist/linear/comment.js.map +1 -1
  50. package/dist/linear/identity.d.ts +13 -1
  51. package/dist/linear/identity.d.ts.map +1 -1
  52. package/dist/linear/identity.js +40 -4
  53. package/dist/linear/identity.js.map +1 -1
  54. package/dist/linear/notify.d.ts +1 -1
  55. package/dist/linear/notify.d.ts.map +1 -1
  56. package/dist/linear/notify.js +13 -2
  57. package/dist/linear/notify.js.map +1 -1
  58. package/dist/linear/verify.d.ts +6 -1
  59. package/dist/linear/verify.d.ts.map +1 -1
  60. package/dist/linear/verify.js +2 -0
  61. package/dist/linear/verify.js.map +1 -1
  62. package/dist/reviewers/codex.d.ts +1 -0
  63. package/dist/reviewers/codex.d.ts.map +1 -1
  64. package/dist/reviewers/codex.js +19 -2
  65. package/dist/reviewers/codex.js.map +1 -1
  66. package/docs/linear-identity-contract.md +6 -0
  67. package/docs/linear-identity.md +80 -11
  68. package/get-started.md +35 -7
  69. package/package.json +1 -1
package/README.md CHANGED
@@ -6,509 +6,240 @@
6
6
  <img src="./assets/logo.png" alt="crosscheck" width="160" />
7
7
  </p>
8
8
 
9
- <p align="center"><em>A Humanbased project, built with crosscheck.</em></p>
9
+ <h1 align="center">crosscheck</h1>
10
10
 
11
- # crosscheck
11
+ <p align="center"><strong>Your agents ship fast. Crosscheck makes sure they ship right.</strong></p>
12
12
 
13
13
  <p align="center">
14
- <img src="./assets/screenshot-watch.png" alt="crosscheck watch — live pipeline view" width="860" />
14
+ <a href="https://www.npmjs.com/package/@humanbased/crosscheck"><img src="https://img.shields.io/npm/v/@humanbased/crosscheck?color=2f6feb&label=npm" alt="npm" /></a>
15
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT" /></a>
16
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-18%2B-brightgreen" alt="Node 18+" /></a>
15
17
  </p>
16
18
 
17
- **Your agents ship fast. Crosscheck makes sure they ship right.**
18
-
19
- AI coding agents create PRs faster than review habits can absorb. The failure mode isn't broken builds — it's *early victory*: patches that pass CI, look complete, and still hide regressions, brittle edge cases, or half-finished fixes.
20
-
21
- Crosscheck adds an independent Review → Fix → Recheck loop. One agent writes the patch. Another reviews it. Findings go back to the author to repair. The result gets rechecked before merge. The PR moves toward genuinely merge-ready — not just "looks green."
22
-
23
- No new hosted service. No per-review API bill. Crosscheck runs through the `claude` and `codex` CLIs you already have — your existing subscriptions, your machine or server.
24
-
25
- Built by [Humanbased](https://github.com/humanbased-ai). Read the field report: [What 295 Agentic PRs Taught Us About Code Review](https://blog.humanbased.ai/posts/agentic-pr-quality-crosscheck/) — 295 agentic PRs analyzed, real Crosscheck logs included.
26
-
27
- ## Why crosscheck?
28
-
29
- **Agent velocity without lowering the merge bar.**
30
-
31
- - **Independent eyes, not self-review** — route Claude-authored PRs to Codex and vice versa. Self-review is exactly where early-victory failures hide.
32
- - **Review → Fix → Recheck, not just comments** — findings return to the author agent for repair; a clean recheck follows before merge. PRs move forward, not sideways.
33
- - **No new vendor** — runs through the `claude` and `codex` CLIs you already pay for. No per-review bill, no extra trust surface.
34
- - **Configurable for any team size** — review-only, review + fix, or the full loop. Use one workflow locally, or one always-on team watcher with per-repo overrides via `crosscheck alter`.
35
-
36
- ## Who uses crosscheck
37
-
38
- | Persona | Problem | How crosscheck helps |
39
- |---|---|---|
40
- | **Solo agentic builder** | Same agent that wrote the code may self-approve incomplete work | Independent reviewer from a different vendor, on your machine |
41
- | **Technical founder** | AI PRs look done before delivering stable value | Closes the loop: review finding → agent fix → clean recheck |
42
- | **Engineering lead** | Agent use is hard to supervise or standardize | A default full-loop workflow, per-repo overrides (`crosscheck alter`), and a visible PR audit trail |
43
- | **OSS maintainer** | Review bandwidth is scarce; comments must be actionable | One-shot `crosscheck review` posts concrete findings directly on the PR |
44
-
45
- ### Usage scenarios
46
-
47
- **Local use**
48
-
49
- Use Crosscheck from your own machine when you want an independent review before merge, or a temporary watcher while you work.
50
-
51
- ```bash
52
- # Catch regressions before merging a solo PR
53
- crosscheck run <pr-url>
54
-
55
- # One-shot review of a specific PR
56
- crosscheck review <pr-url>
57
-
58
- # Continuous review while your terminal is open
59
- crosscheck onboard --personal
60
- crosscheck watch
61
-
62
- # Loop until the agent produces an approved patch
63
- crosscheck run <pr-url> --crazy
64
- ```
65
-
66
- **Always-on team server**
67
-
68
- Run one long-lived `watch` process for the whole team or org on a shared machine. Configure the default workflow once, then narrow individual repos only when needed.
69
-
70
- ```bash
71
- # One-time setup on the server
72
- crosscheck onboard --team
73
-
74
- # Example: one repo gets review-only, the rest keep the global workflow
75
- crosscheck alter humanbased-ai/xny-monorepo --review-only
76
-
77
- # Start the team watcher
78
- crosscheck watch
79
- ```
19
+ <p align="center">
20
+ <img src="./assets/screenshot-watch.png" alt="crosscheck watch — live pipeline view" width="860" />
21
+ </p>
80
22
 
81
23
  ---
82
24
 
83
- ## Quick start
84
-
85
- ### First useful review in 10 minutes
86
-
87
- Start with one low-risk PR before turning on continuous watch mode. You only need GitHub CLI plus one authenticated reviewer CLI.
25
+ ## The problem
88
26
 
89
- ```bash
90
- # 1. Install crosscheck
91
- npm install -g @humanbased/crosscheck
27
+ AI coding agents open PRs faster than review habits can absorb them. The failure mode isn't a broken build — it's **early victory**: a patch that passes CI, reads as complete, and quietly carries a regression, a brittle edge case, or a half-finished fix.
92
28
 
93
- # 2. Authenticate GitHub
94
- brew install gh && gh auth login
29
+ Asking the agent that wrote the patch to review it doesn't help. That's exactly where early victory hides.
95
30
 
96
- # 3. Authenticate one reviewer
97
- npm install -g @openai/codex && codex login --device-auth
98
- # or:
99
- npm install -g @anthropic-ai/claude-code && claude
31
+ ## What crosscheck does
100
32
 
101
- # 4. Check your setup
102
- crosscheck status
33
+ One agent writes the patch. **A different one reviews it.** Findings go back to the author agent to repair, and the result is rechecked before merge.
103
34
 
104
- # 5. Review the public fixture PR
105
- crosscheck review https://github.com/humanbased-ai/crosscheck-proof-fixture/pull/1 --reviewer codex
106
35
  ```
107
-
108
- This fixture PR intentionally contains a realistic agentic-code regression, so you can see whether Crosscheck produces a useful review before pointing it at your own repo. Use `--reviewer claude` if Claude Code is the authenticated reviewer. After the fixture review works, swap in one low-risk PR from your repo, then run `crosscheck onboard` to configure repos, workflow mode, and continuous monitoring.
109
-
110
- ### Continuous local mode
111
-
112
- ```bash
113
- # 1. Install crosscheck and the agent CLIs
114
- npm install -g @humanbased/crosscheck
115
- npm install -g @anthropic-ai/claude-code && claude # Claude Pro/Max subscription
116
- npm install -g @openai/codex && codex login --device-auth # ChatGPT Plus/Pro subscription
117
- brew install gh && gh auth login # GitHub CLI
118
-
119
- # 2. Guided setup — repos, review mode, workflow pipeline
120
- crosscheck onboard
121
-
122
- # 3. Start watching
123
- crosscheck watch # continuous review → fix → recheck as PRs arrive
36
+ PR → review → fix → recheck → merge-ready
37
+ (codex) (claude) (codex)
124
38
  ```
125
39
 
126
- > Want reviews only (no auto-fix) for a repo? Make it review-only with
127
- > `crosscheck alter owner/repo --review-only` — see [per-repo overrides](#crosscheck-alter-repo).
40
+ Three properties make that practical:
128
41
 
129
- ### Always-on team mode
42
+ - **Independent eyes.** Claude-authored PRs route to Codex and vice versa. Origin is detected from the PR body, commit trailers, and branch prefix — no manual tagging.
43
+ - **A loop, not a comment.** Findings return to the author agent for repair; a clean recheck follows. The PR moves forward instead of sideways.
44
+ - **No new vendor.** Runs through the `claude` and `codex` CLIs you already pay for. No hosted service, no per-review API bill, no extra trust surface.
130
45
 
131
- ```bash
132
- # 1. Run guided setup on the shared machine
133
- crosscheck onboard --team
134
-
135
- # 2. Optional: tune individual repos without changing the global workflow
136
- crosscheck alter humanbased-ai/xny-monorepo --review-only
137
- crosscheck alter humanbased-ai/api --steps review,fix,recheck
138
-
139
- # 3. Start the long-lived watcher
140
- crosscheck watch
141
- ```
46
+ Built by [Humanbased](https://github.com/humanbased-ai). Field report: [What 295 Agentic PRs Taught Us About Code Review](https://blog.humanbased.ai/posts/agentic-pr-quality-crosscheck/).
142
47
 
143
48
  ---
144
49
 
145
- ## Commands
50
+ ## Install
146
51
 
147
52
  ```bash
148
- crosscheck onboard # guided setup — pick repos, mode, and default pipeline
149
- crosscheck alter <repo> # per-repo override: --steps review,fix | --review-only | --reset | --show
150
- crosscheck watch # continuous use — tunnel + webhook + listening
151
- crosscheck review <pr-urls...> # review one or more PRs (comma lists, ranges, cross-repo)
152
- crosscheck run <pr-urls...> # run the full workflow: review → (fix → recheck) × max_rounds (--review-only for review only)
153
- crosscheck recheck|fix|resolve <pr-urls...> # force one workflow step on one or more PRs
154
- crosscheck scan # show open PR workflow state across monitored repos
155
- crosscheck detect-step <pr-url> # explain the next workflow step for one PR
156
- crosscheck kickass # advance stale PRs from an interactive operator queue
157
- crosscheck init # check prerequisites, write starter config
158
- crosscheck status # auth state, config summary, CLI versions
53
+ npm install -g @humanbased/crosscheck
159
54
  ```
160
55
 
161
- **Operator queue (scan + kickass)**
162
-
163
- `crosscheck scan` tracks two independent dimensions per PR:
164
-
165
- | Workflow stage (`reviewState`) | Meaning | Next action |
166
- |---|---|---|
167
- | `NEEDS_REVIEW` | No crosscheck review for current HEAD | review |
168
- | `NEEDS_FIX` | Reviewed — fix requested | fix |
169
- | `NEEDS_RECHECK` | Fix committed, recheck pending | recheck |
170
- | `APPROVED` | Reviewed and approved | merge |
171
-
172
- | Verdict (`verdict`) | Meaning |
173
- |---|---|
174
- | `UNREVIEWED` | No review found |
175
- | `APPROVE` | AI approved |
176
- | `NEEDS_WORK` | AI requested changes |
177
- | `BLOCK` | AI hard-blocked merge |
178
-
179
- `BLOCK` and `NEEDS_WORK` both map to `NEEDS_FIX` stage — same next action, but the `verdict` field preserves severity so operators can prioritise.
180
-
181
- **How workflow steps are counted**
182
-
183
- Crosscheck reconstructs PR workflow state from visible artifacts:
184
-
185
- | Evidence | Counts as |
186
- |---|---|
187
- | Review or recheck comment with `<!-- crosscheck: ... verdict=... -->` | completed `review` / `recheck` step |
188
- | Fix or conflict-resolve comment, such as `<!-- crosscheck: fix_applied ... -->` | completed `fix` / `conflict-resolve` step |
189
- | PR commit trailer, such as `Crosscheck-Step: fix` | completed step declared by that trailer |
190
-
191
- Commit trailers are accepted as operator-declared workflow state. In practice, a PR author may command Claude, Codex, or another agent to apply a fix outside a standalone Crosscheck post; if the resulting PR commit carries `Crosscheck-Step: fix`, Crosscheck counts it as fix evidence.
192
-
193
- That evidence only advances the next step to `recheck` when the fix commit is the current PR HEAD. If another commit lands after the fix evidence, Crosscheck starts a fresh review round so the newer code is reviewed normally. This prevents an old fix trailer from marking later changes as ready for recheck.
56
+ <details>
57
+ <summary>Other channels</summary>
194
58
 
195
59
  ```bash
196
- crosscheck scan [--tidy] [--stale-after <duration>] [--force] [--json]
197
- crosscheck kickass [--dry-run] [--stale-after <duration>] [--force]
198
- ```
60
+ npm install -g @humanbased/crosscheck@beta # latest features, rougher edges
61
+ npx @humanbased/crosscheck <command> # no install
199
62
 
200
- `crosscheck review --reviewer`, `crosscheck run --reviewer`, `crosscheck run --fixer`, and `crosscheck run --vendor` accept vendor aliases:
201
- - Claude: `claude`, `claude-code`, `cc`, `anthropic`
202
- - Codex: `codex`, `openai`
203
-
204
- **Continuous improvement** *(experimental)*
205
-
206
- ```bash
207
- crosscheck diagnose # surface failure patterns from review logs
208
- crosscheck optimize [--apply] # rewrite reviewer instructions based on diagnose output
209
- crosscheck impact [--money] # time saved, issues caught, code quality trends
210
- crosscheck issue # draft and file a bug report from recent error logs
63
+ git clone https://github.com/humanbased-ai/crosscheck
64
+ cd crosscheck && npm install && npm run build && npm link
211
65
  ```
66
+ </details>
212
67
 
213
- ---
214
-
215
- ### `crosscheck onboard`
216
-
217
- Interactive setup wizard. Picks repos/orgs to monitor, selects single-vendor or cross-vendor mode, configures the review pipeline, and writes `~/.crosscheck/config.yml` and `workflow.yml`.
68
+ You need GitHub CLI plus **at least one** reviewer CLI. Install both only if you want cross-vendor routing.
218
69
 
219
70
  ```bash
220
- crosscheck onboard # guided setup
221
- crosscheck onboard --personal # skip persona prompt, go straight to personal mode
222
- crosscheck onboard --team # skip persona prompt, go straight to team mode
223
- crosscheck onboard -y # accept all defaults non-interactively
71
+ gh auth login
72
+ npm install -g @anthropic-ai/claude-code && claude # Claude Pro or Max
73
+ npm install -g @openai/codex && codex login --device-auth # ChatGPT Plus or Pro
224
74
  ```
225
75
 
226
- ---
227
-
228
- ### `crosscheck alter <repo>`
76
+ Both reviewers run on your existing subscription — no API key required.
229
77
 
230
- Sets the workflow depth for one repo, leaving the global default in place for every other monitored repo. Writes a standalone file at `~/.crosscheck/workflows/<owner>__<repo>.yml` (`alter-workflow` is an alias). This is how you run one watcher for many repos while making one repo review-only. Changes apply on the next PR event — no need to restart `crosscheck watch`.
78
+ ## First review in two minutes
231
79
 
232
80
  ```bash
233
- crosscheck alter humanbased-ai/xny-monorepo --review-only # alias for --steps review
234
- crosscheck alter github.com/humanbased-ai/xny-monorepo --steps review,fix
235
- crosscheck alter https://github.com/humanbased-ai/xny-monorepo --steps review,fix,recheck
236
- crosscheck alter humanbased-ai/xny-monorepo --show # print effective steps
237
- crosscheck alter humanbased-ai/xny-monorepo --reset # revert to the global default
81
+ crosscheck status # confirm auth
82
+ crosscheck review https://github.com/humanbased-ai/crosscheck-proof-fixture/pull/1 --reviewer codex
238
83
  ```
239
84
 
240
- Accepted repo formats: `owner/repo`, `github.com/owner/repo`, and `https://github.com/owner/repo`. The override narrows the global `~/.crosscheck/workflow.yml` it wins over the global default but a repo-committed `.crosscheck/workflow.yml` still wins over it.
241
-
242
- ---
243
-
244
- ### `crosscheck watch`
245
-
246
- Starts an SSH tunnel (localhost.run), registers GitHub webhooks, and listens for PR events. Everything self-cleans on Ctrl+C.
85
+ That clones the branch, reviews it against base, and posts a comment on the PR. Once the fixture produces a useful verdict, point it at one low-risk PR of your own — then set up continuous review:
247
86
 
248
87
  ```bash
249
- crosscheck watch
250
- crosscheck watch --no-backtrace # skip startup scan for unreviewed open PRs
251
- crosscheck watch --reconfigure # re-run deployment setup before starting
88
+ crosscheck onboard # guided: repos, routing, pipeline depth, connection
89
+ crosscheck watch # listen for PR events
252
90
  ```
253
91
 
254
- > For reviews only, make the repo review-only with `crosscheck alter <repo> --review-only` rather than a global flag.
255
-
256
92
  ---
257
93
 
258
- ### `crosscheck review <pr-urls...>`
94
+ ## Where results land
259
95
 
260
- Reviews one or more PRs. Clones, checks out, reviews, and posts the comment. The PR argument accepts the [multi-PR spec syntax](#multi-pr-syntax) — multiple PRs are reviewed concurrently.
96
+ ### On the pull request
261
97
 
262
- ```bash
263
- crosscheck review https://github.com/org/repo/pull/42
264
- crosscheck review <pr-url> --reviewer claude # force Claude regardless of detection
265
- crosscheck review <pr-url> --reviewer codex # force Codex regardless of detection
266
- crosscheck review <pr-url> --reviewer cc # alias for Claude
267
- crosscheck review <pr-url> --reviewer openai # alias for Codex
268
- crosscheck review .../pull/245,255 # review several PRs at once
269
- crosscheck review .../pull/245-256 # review an inclusive range
270
- ```
271
-
272
- ---
273
-
274
- ### `crosscheck run <pr-urls...>`
275
-
276
- Runs the configured workflow against one or more PRs: review → (fix → recheck) × `max_rounds`. Without `--steps`, this honors any repo workflow set by `crosscheck alter`. Loops autonomously through fix→recheck cycles up to the `max_rounds` value configured in `workflow.yml` (default: 1). Use `--crazy` or `--half-crazy` to loop until approved or unblocked, ignoring `max_rounds`. The PR argument accepts the [multi-PR spec syntax](#multi-pr-syntax); multiple PRs run concurrently (one agent per PR by default).
98
+ Every review posts a comment carrying a machine-readable annotation:
277
99
 
278
- ```bash
279
- crosscheck run <pr-url>
280
- crosscheck run <pr-url> --steps review # only the review step
281
- crosscheck run <pr-url> --steps fix,recheck # skip initial review
282
- crosscheck run <pr-url> --reviewer claude # force review/recheck agent
283
- crosscheck run <pr-url> --fixer claude # force fix agent
284
- crosscheck run <pr-url> --vendor claude # force review/recheck/fix agent
285
- crosscheck run <pr-url> --dry-run # review without posting or fixing
286
- crosscheck run <pr-url> --crazy # 🔥🔥 loop until APPROVE
287
- crosscheck run <pr-url> --half-crazy # 🔥 loop until not BLOCK
288
- crosscheck run <pr-url> --timeout 10m # custom reviewer timeout
289
- crosscheck run .../pull/245,255 # several PRs, concurrently
290
- crosscheck run .../pull/245-256 --concurrent 3 # range, max 3 agents in parallel
291
100
  ```
292
-
293
- ---
294
-
295
- ### `crosscheck recheck` / `fix` / `resolve <pr-urls...>`
296
-
297
- Force a single workflow step against one or more PRs, bypassing next-step auto-detection. Each is sugar for `crosscheck run <spec> --steps <type>` and accepts the same [multi-PR spec syntax](#multi-pr-syntax) and `--concurrent` / `--sequential` / `--stagger` flags as `run`.
298
-
299
- | Command | Forces the step |
300
- |---|---|
301
- | `crosscheck recheck <spec>` | `recheck` — re-evaluate against the latest review |
302
- | `crosscheck fix <spec>` | `fix` — apply fixes for the latest review |
303
- | `crosscheck resolve <spec>` | `conflict-resolve` — resolve merge conflicts (Claude only) |
304
-
305
- ```bash
306
- crosscheck recheck https://github.com/org/repo/pull/42
307
- crosscheck fix .../pull/245,255 --fixer claude
308
- crosscheck resolve .../pull/245-256 --vendor claude
101
+ <!-- crosscheck: origin=claude reviewer=codex model=gpt-5.6-terra
102
+ type=review round=1 verdict=NEEDS_WORK service=crosscheck sha=a1b2c3d -->
309
103
  ```
310
104
 
311
- When the step is absent from the active `workflow.yml`, `recheck` and `conflict-resolve` are synthesized with built-in defaults so the command still runs.
105
+ That tag is the audit trail. It's how crosscheck knows which step ran, what verdict came back, and what to do next and it's a stable contract you can parse.
312
106
 
313
- ---
107
+ ### On your Linear issue
314
108
 
315
- ### Multi-PR syntax
109
+ Optional, off by default. When enabled, the verdict is mirrored onto the Linear issue the PR belongs to, so outcomes show up where work is planned:
316
110
 
317
- `run`, `review`, `recheck`, `fix`, and `resolve` accept a single PR URL or a **spec** that expands to many PRs — a comma-separated list of full URLs, bare numbers, and `N-M` ranges:
111
+ <p align="center">
112
+ <img src="./assets/linear-comment.svg" alt="A crosscheck review comment on a Linear issue" width="740" />
113
+ </p>
318
114
 
319
- ```bash
320
- .../pull/245,255 # two PRs in the same repo
321
- .../pull/245-256 # an inclusive range
322
- .../repo/pull/245,https://github.com/o/other/pull/3 # across repos
323
- ```
115
+ Attribution is a ladder — **start at the bottom, climb only if you need to**:
324
116
 
325
- The first token must be a full URL (a bare number inherits the most recent repo). Duplicates are de-duplicated and a spec expands to at most 100 PRs. Multiple PRs run concurrently by default — control parallelism with `--concurrent <n>`, `--sequential`, or `--stagger <ms>`.
117
+ | Rung | Setup | Comments appear as |
118
+ |---|---|---|
119
+ | **api key** | one env var | Your Linear account, with a `🤖 crosscheck · <model>` signature line |
120
+ | **workspace app** | one OAuth app, ~5 min, once per workspace | crosscheck itself, with its own icon |
326
121
 
327
- ---
122
+ The API key rung is fully functional — it finds the issue and posts the comment. What it lacks is *attribution*, not capability. So the question isn't which is better, it's **how many things write to your workspace**. If you're the only one, the app is ceremony.
328
123
 
329
- ### `crosscheck scan`
124
+ `crosscheck onboard` asks which rung you want and writes the config:
330
125
 
331
- Scans every open PR in the configured monitor scope and reports where each one is in the crosscheck workflow. Results are cached for 60 seconds.
126
+ <p align="center">
127
+ <img src="./assets/linear-onboard.svg" alt="crosscheck onboard — choosing a Linear attribution rung" width="700" />
128
+ </p>
332
129
 
333
- States: `NEEDS_REVIEW` · `NEEDS_FIX` · `BLOCK` · `NEEDS_RECHECK` · `APPROVE`
130
+ To check a setup without waiting for a PR, `linear-test` runs the whole path and posts nothing:
334
131
 
335
- ```bash
336
- crosscheck scan # all open PRs, grouped stale/not-stale
337
- crosscheck scan --tidy # stale actionable rows only
338
- crosscheck scan --stale-after 4h # custom staleness threshold (default 24h)
339
- crosscheck scan --force # bypass cache
340
- crosscheck scan --json # machine-readable output
341
- ```
132
+ <p align="center">
133
+ <img src="./assets/linear-test.svg" alt="crosscheck linear-test verifying Linear write-back end to end" width="700" />
134
+ </p>
342
135
 
343
- ---
136
+ <details>
137
+ <summary>Confirming which rung you're on at any time</summary>
344
138
 
345
- ### `crosscheck detect-step`
139
+ `crosscheck status` resolves the configured identity for real and reports what a write would render as:
346
140
 
347
- Explains the workflow history for one PR and prints the next step Crosscheck would run. Use this when a PR has mixed evidence from comments, Crosscheck commits, or ad hoc agent commits with `Crosscheck-Step` trailers.
141
+ <p align="center">
142
+ <img src="./assets/linear-status.svg" alt="crosscheck status — the Linear identity section" width="620" />
143
+ </p>
144
+ </details>
348
145
 
349
- ```bash
350
- crosscheck detect-step <pr-url>
351
- crosscheck detect-step <pr-url> --json
352
- ```
146
+ Full walkthrough: **[docs/linear-identity.md](./docs/linear-identity.md)**.
353
147
 
354
148
  ---
355
149
 
356
- ### `crosscheck kickass`
357
-
358
- Selects stale PRs from the operator queue and advances them — runs `scan` first, presents a multi-select picker, shows a preflight summary, then executes after confirmation.
359
-
360
- ```bash
361
- crosscheck kickass # interactive operator queue
362
- crosscheck kickass --dry-run # preflight only — no mutations
363
- crosscheck kickass --stale-after 2h # tighter staleness threshold
364
- crosscheck kickass --force # bypass scan cache before picking
365
- crosscheck kickass --crazy # 🔥🔥 auto loop until APPROVE
366
- crosscheck kickass --half-crazy # 🔥 auto loop until not BLOCK
367
- ```
368
-
369
- Actions: `NEEDS_REVIEW → CR` · `NEEDS_FIX/BLOCK → Fix` · `NEEDS_RECHECK → Recheck` · `APPROVE → Merge`
370
-
371
- **`kickass` + `watch` combo**
372
-
373
- For the best recovery experience when a batch of PRs is stuck (timed out, stopped before `watch` was running), run both commands together. Each plays a distinct role:
374
-
375
- - `kickass` kicks each stuck PR **one step at a time** — it uses `detect-step` to read live PR history and dispatches only the next needed step (review, fix, or recheck).
376
- - `watch` owns **all continuation** — it listens for the webhooks each completed step produces and runs the full remaining pipeline from there.
377
-
378
- ```
379
- crosscheck kickass
380
- └─ ck run <url> --trigger kickass (one step; detect-step finds where to start)
381
- └─ detect-step → "review" run review only → posts comment
382
- └─ detect-step → "fix" run fix only → pushes commit
383
- └─ detect-step → "recheck" run recheck only → posts verdict
384
-
385
- crosscheck watch
386
- ├─ issue_comment (type=review) → pick up fix step automatically
387
- └─ synchronize (fix commit) → pick up recheck step automatically
388
- ```
389
-
390
- > **Note:** `crosscheck run <pr-url>` invoked directly runs the **full remaining pipeline** from the detected starting step. The one-step behaviour above applies only when kickass dispatches it with `--trigger kickass`.
150
+ ## Commands
391
151
 
392
- Start `watch` first, then run `kickass` in a second terminal:
152
+ | Command | What it does |
153
+ |---|---|
154
+ | `crosscheck onboard` | Guided setup — repos, routing, pipeline depth, connection |
155
+ | `crosscheck status` | Auth, config, Linear identity, logs, impact summary |
156
+ | `crosscheck review <pr>` | One-shot review, posts a comment |
157
+ | `crosscheck run <pr>` | Full pipeline for a PR — review, fix, recheck |
158
+ | `crosscheck recheck` / `fix` / `resolve` | Run one step in isolation |
159
+ | `crosscheck watch` | Listen for PR events and run the pipeline automatically |
160
+ | `crosscheck scan` | Show open PRs with stale crosscheck state |
161
+ | `crosscheck kickass` | Pick a stale PR and drive it to its next step |
162
+ | `crosscheck alter <repo>` | Set a per-repo pipeline depth |
163
+ | `crosscheck detect-step <pr>` | Show step history and the next step to run |
164
+ | `crosscheck linear-test [issue]` | Dry-run Linear write-back |
165
+ | `crosscheck diagnose` / `optimize` / `impact` / `issue` | Analyse logs, tune config, report value, file tickets |
166
+
167
+ Multi-PR forms work where sensible — comma lists, bare numbers, and ranges:
393
168
 
394
169
  ```bash
395
- # terminal 1
396
- crosscheck watch
397
-
398
- # terminal 2
399
- crosscheck scan --force # refresh PR state
400
- crosscheck kickass
170
+ crosscheck review https://github.com/acme/app/pull/245,255
171
+ crosscheck run https://github.com/acme/app/pull/245-256 --concurrent 4
401
172
  ```
402
173
 
403
- > **How the review→fix bridge works:** after `kickass` posts a review comment, GitHub fires an `issue_comment` webhook (not a `pull_request` event). `watch` subscribes to `issue_comment` and, when it sees a crosscheck `type=review` annotation on an open PR, fetches the current PR head and runs the fix step automatically — no new commit required to wake it up. (Introduced in [#193](https://github.com/Motivation-Labs/crosscheck/pull/193).)
404
-
405
- **Autonomous loop modes**
406
-
407
- `--crazy` and `--half-crazy` turn `run` and `kickass` into autonomous fix→recheck loops that keep going until the verdict improves — no manual re-runs needed.
408
-
409
- | Flag | Stops when | Max rounds | Timeout |
410
- |---|---|---|---|
411
- | `--crazy` 🔥🔥 | verdict = `APPROVE` | ∞ | none |
412
- | `--half-crazy` 🔥 | verdict ≠ `BLOCK` | ∞ | none |
413
-
414
- Both flags disable all reviewer subprocess timeout constraints — long fixes on large PRs won't be cut short. Use `--timeout <duration>` (e.g. `--timeout 10m`) without these flags to set a custom cap.
415
-
416
- ```bash
417
- # Run full workflow and keep looping until approved
418
- crosscheck run <pr-url> --crazy
419
-
420
- # Advance every stale PR until it's no longer blocked
421
- crosscheck kickass --half-crazy
422
-
423
- # Custom timeout without looping
424
- crosscheck run <pr-url> --timeout 10m
425
- ```
174
+ Full flag reference: **[get-started.md](./get-started.md)**.
426
175
 
427
176
  ---
428
177
 
429
178
  ## Configuration
430
179
 
431
- Crosscheck uses `~/.crosscheck/config.yml` by default. If that file exists, it wins over `./crosscheck.config.yml` unless you pass `--config ./crosscheck.config.yml`.
180
+ Config lives at `~/.crosscheck/config.yml`. A `./crosscheck.config.yml` in the working directory is treated as a deliberate per-project override.
432
181
 
433
- ### Review depth (`quality.tier`)
182
+ ### Review depth
434
183
 
435
184
  ```yaml
436
- # crosscheck.config.yml
437
185
  quality:
438
186
  tier: balanced # fast | balanced | thorough
439
187
  ```
440
188
 
441
- | Tier | Claude model | Codex model | Latency |
189
+ | Tier | Claude | Codex | Latency |
442
190
  |---|---|---|---|
443
191
  | `fast` | Haiku 4.5 | GPT-5.6 Luna | ~10s |
444
192
  | `balanced` | Sonnet 5 | GPT-5.6 Terra | ~30s |
445
193
  | `thorough` | Opus 4.8 | GPT-5.6 Sol | ~60s |
446
194
 
447
- ### Pipeline (`workflow.yml`)
195
+ ### Pipeline depth
196
+
197
+ The global pipeline lives in `~/.crosscheck/workflow.yml` and defaults to the full loop:
448
198
 
449
199
  ```yaml
450
200
  steps:
451
201
  - name: review
452
202
  type: review
453
- reviewer: auto # auto | claude | codex | origin
454
-
203
+ reviewer: auto # auto | claude | codex | origin
455
204
  - name: fix
456
205
  type: fix
457
206
  reviewer: origin
458
207
  when: review.verdict != 'APPROVE'
459
-
460
208
  - name: recheck
461
209
  type: recheck
462
210
  reviewer: auto
463
211
  when: fix.applied_count > 0
464
212
  ```
465
213
 
466
- ### Per-repo workflow overrides
467
-
468
- The global `workflow.yml` is the default for every repo (out of the box, the full `review → fix → recheck` loop). To run one repo at a narrower depth in the same watcher, use `crosscheck alter` — it writes a standalone override file at `~/.crosscheck/workflows/<owner>__<repo>.yml`:
214
+ To narrow a single repo without touching the global default:
469
215
 
470
216
  ```bash
471
- crosscheck alter humanbased-ai/xny-monorepo --review-only # review only
472
- crosscheck alter humanbased-ai/api --steps review,fix,recheck # full loop, explicit
473
- crosscheck alter humanbased-ai/xny-monorepo --reset # back to the global default
474
- ```
475
-
476
- Each override file lists the review → fix → recheck depth only:
477
-
478
- ```yaml
479
- # ~/.crosscheck/workflows/humanbased-ai__xny-monorepo.yml
480
- steps:
481
- - review
217
+ crosscheck alter acme/app --review-only # or --steps review,fix
482
218
  ```
483
219
 
484
- The override *narrows* the global workflow — it keeps each step's configured instructions and reviewer. `conflict-resolve` is orthogonal to the depth ladder: it stays enabled for any override that permits code modification (`review,fix` or `review,fix,recheck`) and is dropped only for review-only (`review`). Repos without an override file keep the complete global workflow. Resolution order: `{repo}/.crosscheck/workflow.yml` → `~/.crosscheck/workflows/<owner>__<repo>.yml` `~/.crosscheck/workflow.yml` built-in default.
220
+ That writes a standalone override at `~/.crosscheck/workflows/<owner>__<repo>.yml`, live-reloaded per PR no watcher restart.
485
221
 
486
- ### Config snapshot
222
+ Every option, annotated: **[crosscheck.config.example.yml](./crosscheck.config.example.yml)**.
487
223
 
488
- ```yaml
489
- # ~/.crosscheck/config.yml
490
- orgs:
491
- - your-org
224
+ ---
492
225
 
493
- routing:
494
- allowed_authors:
495
- - your-github-login
226
+ ## Running it continuously
496
227
 
497
- mode: cross-vendor # cross-vendor | single-vendor
228
+ **On your machine** a watcher for as long as your terminal is open. Webhooks arrive through a tunnel (`localhost.run` by default, zero config; `smee` if you want events queued while you're offline).
498
229
 
499
- vendors:
500
- claude:
501
- enabled: true
502
- codex:
503
- enabled: true
230
+ ```bash
231
+ crosscheck onboard && crosscheck watch
232
+ ```
504
233
 
505
- quality:
506
- tier: balanced
234
+ **On a server** — one always-on watcher for a team, with per-repo depth where it matters.
507
235
 
508
- clone_protocol: ssh # ssh (default) | https
236
+ ```bash
237
+ crosscheck onboard --team
238
+ crosscheck alter acme/legacy-service --review-only
239
+ crosscheck watch
509
240
  ```
510
241
 
511
- Full reference: [get-started.md](./get-started.md)
242
+ Deployment mode decides scope: `personal` monitors your own repos and reviews only PRs you author; `team` monitors org repos and reviews PRs from any author.
512
243
 
513
244
  ---
514
245
 
@@ -517,8 +248,8 @@ Full reference: [get-started.md](./get-started.md)
517
248
  | | Minimum |
518
249
  |---|---|
519
250
  | Node.js | 18+ |
520
- | Claude Code CLI | latest — `npm install -g @anthropic-ai/claude-code` |
521
- | Codex CLI | latest — `npm install -g @openai/codex` |
251
+ | Claude Code CLI | `npm install -g @anthropic-ai/claude-code` |
252
+ | Codex CLI | `npm install -g @openai/codex` |
522
253
  | GitHub CLI | 2.65+ — `brew install gh` |
523
254
 
524
255
  `GITHUB_TOKEN` is derived automatically from `gh auth login`. No manual export needed.
@@ -529,9 +260,11 @@ Full reference: [get-started.md](./get-started.md)
529
260
 
530
261
  | | |
531
262
  |---|---|
532
- | **[get-started.md](./get-started.md)** | Full setup guide — prerequisites, all flags, complete config reference, FAQ |
533
- | **[What 295 Agentic PRs Taught Us About Code Review](https://blog.humanbased.ai/posts/agentic-pr-quality-crosscheck/)** | Humanbased field report on agentic PR quality, review routing, and why Crosscheck exists |
534
- | **[docs/fixture-pr.md](./docs/fixture-pr.md)** | Safe public fixture PR for the first Crosscheck review |
263
+ | **[get-started.md](./get-started.md)** | Full setup guide — prerequisites, every flag, complete config reference, FAQ |
264
+ | **[docs/linear-identity.md](./docs/linear-identity.md)** | Linear write-back and the attribution ladder |
265
+ | **[docs/linear-identity-contract.md](./docs/linear-identity-contract.md)** | The identity contract, as a spec for other tools |
266
+ | **[What 295 Agentic PRs Taught Us About Code Review](https://blog.humanbased.ai/posts/agentic-pr-quality-crosscheck/)** | Field report on agentic PR quality and why crosscheck exists |
267
+ | **[docs/fixture-pr.md](./docs/fixture-pr.md)** | The safe public fixture PR |
535
268
  | **[crosscheck.config.example.yml](./crosscheck.config.example.yml)** | Annotated config with every option |
536
269
  | **[CHANGELOG.md](./CHANGELOG.md)** | Release notes |
537
270
 
@@ -541,8 +274,8 @@ Full reference: [get-started.md](./get-started.md)
541
274
 
542
275
  Issues and PRs welcome at [github.com/humanbased-ai/crosscheck](https://github.com/humanbased-ai/crosscheck).
543
276
 
544
- ---
545
-
546
277
  ## License
547
278
 
548
- [MIT](./LICENSE) — Copyright (c) 2025–2026 Humanbased PTE LTD.
279
+ [MIT](./LICENSE) — Copyright (c) 2025–2026 Humanbased AI PTE LTD.
280
+
281
+ <p align="center"><em>A Humanbased project, built with crosscheck.</em></p>