@humanbased/crosscheck 0.14.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 (381) hide show
  1. package/AGENT.md +207 -0
  2. package/ISSUE.md +234 -0
  3. package/LICENSE +21 -0
  4. package/README.md +234 -0
  5. package/README.zh.md +169 -0
  6. package/assets/logo.png +0 -0
  7. package/assets/screenshot-watch-timing.png +0 -0
  8. package/assets/screenshot-watch-timing.svg +1 -0
  9. package/assets/screenshot-watch.png +0 -0
  10. package/crosscheck.config.example.yml +214 -0
  11. package/dist/__tests__/annotation.test.d.ts +2 -0
  12. package/dist/__tests__/annotation.test.d.ts.map +1 -0
  13. package/dist/__tests__/annotation.test.js +134 -0
  14. package/dist/__tests__/annotation.test.js.map +1 -0
  15. package/dist/__tests__/backtrace.test.d.ts +2 -0
  16. package/dist/__tests__/backtrace.test.d.ts.map +1 -0
  17. package/dist/__tests__/backtrace.test.js +280 -0
  18. package/dist/__tests__/backtrace.test.js.map +1 -0
  19. package/dist/__tests__/board.test.d.ts +2 -0
  20. package/dist/__tests__/board.test.d.ts.map +1 -0
  21. package/dist/__tests__/board.test.js +149 -0
  22. package/dist/__tests__/board.test.js.map +1 -0
  23. package/dist/__tests__/codex.test.d.ts +2 -0
  24. package/dist/__tests__/codex.test.d.ts.map +1 -0
  25. package/dist/__tests__/codex.test.js +92 -0
  26. package/dist/__tests__/codex.test.js.map +1 -0
  27. package/dist/__tests__/comment-bodies.test.d.ts +2 -0
  28. package/dist/__tests__/comment-bodies.test.d.ts.map +1 -0
  29. package/dist/__tests__/comment-bodies.test.js +75 -0
  30. package/dist/__tests__/comment-bodies.test.js.map +1 -0
  31. package/dist/__tests__/conflict-resolve.test.d.ts +2 -0
  32. package/dist/__tests__/conflict-resolve.test.d.ts.map +1 -0
  33. package/dist/__tests__/conflict-resolve.test.js +123 -0
  34. package/dist/__tests__/conflict-resolve.test.js.map +1 -0
  35. package/dist/__tests__/crosscheck-commit.test.d.ts +2 -0
  36. package/dist/__tests__/crosscheck-commit.test.d.ts.map +1 -0
  37. package/dist/__tests__/crosscheck-commit.test.js +13 -0
  38. package/dist/__tests__/crosscheck-commit.test.js.map +1 -0
  39. package/dist/__tests__/detector.test.d.ts +2 -0
  40. package/dist/__tests__/detector.test.d.ts.map +1 -0
  41. package/dist/__tests__/detector.test.js +112 -0
  42. package/dist/__tests__/detector.test.js.map +1 -0
  43. package/dist/__tests__/diagnose.test.d.ts +2 -0
  44. package/dist/__tests__/diagnose.test.d.ts.map +1 -0
  45. package/dist/__tests__/diagnose.test.js +164 -0
  46. package/dist/__tests__/diagnose.test.js.map +1 -0
  47. package/dist/__tests__/diff-hash.test.d.ts +2 -0
  48. package/dist/__tests__/diff-hash.test.d.ts.map +1 -0
  49. package/dist/__tests__/diff-hash.test.js +126 -0
  50. package/dist/__tests__/diff-hash.test.js.map +1 -0
  51. package/dist/__tests__/durations.test.d.ts +2 -0
  52. package/dist/__tests__/durations.test.d.ts.map +1 -0
  53. package/dist/__tests__/durations.test.js +26 -0
  54. package/dist/__tests__/durations.test.js.map +1 -0
  55. package/dist/__tests__/event-fields.test.d.ts +2 -0
  56. package/dist/__tests__/event-fields.test.d.ts.map +1 -0
  57. package/dist/__tests__/event-fields.test.js +50 -0
  58. package/dist/__tests__/event-fields.test.js.map +1 -0
  59. package/dist/__tests__/filter.test.d.ts +2 -0
  60. package/dist/__tests__/filter.test.d.ts.map +1 -0
  61. package/dist/__tests__/filter.test.js +21 -0
  62. package/dist/__tests__/filter.test.js.map +1 -0
  63. package/dist/__tests__/fix.test.d.ts +2 -0
  64. package/dist/__tests__/fix.test.d.ts.map +1 -0
  65. package/dist/__tests__/fix.test.js +124 -0
  66. package/dist/__tests__/fix.test.js.map +1 -0
  67. package/dist/__tests__/github-client.test.d.ts +2 -0
  68. package/dist/__tests__/github-client.test.d.ts.map +1 -0
  69. package/dist/__tests__/github-client.test.js +22 -0
  70. package/dist/__tests__/github-client.test.js.map +1 -0
  71. package/dist/__tests__/github-scan-client.test.d.ts +2 -0
  72. package/dist/__tests__/github-scan-client.test.d.ts.map +1 -0
  73. package/dist/__tests__/github-scan-client.test.js +100 -0
  74. package/dist/__tests__/github-scan-client.test.js.map +1 -0
  75. package/dist/__tests__/is-fresh-review-comment.test.d.ts +2 -0
  76. package/dist/__tests__/is-fresh-review-comment.test.d.ts.map +1 -0
  77. package/dist/__tests__/is-fresh-review-comment.test.js +86 -0
  78. package/dist/__tests__/is-fresh-review-comment.test.js.map +1 -0
  79. package/dist/__tests__/issue.test.d.ts +2 -0
  80. package/dist/__tests__/issue.test.d.ts.map +1 -0
  81. package/dist/__tests__/issue.test.js +259 -0
  82. package/dist/__tests__/issue.test.js.map +1 -0
  83. package/dist/__tests__/kickass.test.d.ts +2 -0
  84. package/dist/__tests__/kickass.test.d.ts.map +1 -0
  85. package/dist/__tests__/kickass.test.js +268 -0
  86. package/dist/__tests__/kickass.test.js.map +1 -0
  87. package/dist/__tests__/loader.test.d.ts +2 -0
  88. package/dist/__tests__/loader.test.d.ts.map +1 -0
  89. package/dist/__tests__/loader.test.js +180 -0
  90. package/dist/__tests__/loader.test.js.map +1 -0
  91. package/dist/__tests__/onboard-preservation.test.d.ts +2 -0
  92. package/dist/__tests__/onboard-preservation.test.d.ts.map +1 -0
  93. package/dist/__tests__/onboard-preservation.test.js +506 -0
  94. package/dist/__tests__/onboard-preservation.test.js.map +1 -0
  95. package/dist/__tests__/optimize.test.d.ts +2 -0
  96. package/dist/__tests__/optimize.test.d.ts.map +1 -0
  97. package/dist/__tests__/optimize.test.js +101 -0
  98. package/dist/__tests__/optimize.test.js.map +1 -0
  99. package/dist/__tests__/post-review-comment.test.d.ts +2 -0
  100. package/dist/__tests__/post-review-comment.test.d.ts.map +1 -0
  101. package/dist/__tests__/post-review-comment.test.js +44 -0
  102. package/dist/__tests__/post-review-comment.test.js.map +1 -0
  103. package/dist/__tests__/pr-lock.test.d.ts +2 -0
  104. package/dist/__tests__/pr-lock.test.d.ts.map +1 -0
  105. package/dist/__tests__/pr-lock.test.js +115 -0
  106. package/dist/__tests__/pr-lock.test.js.map +1 -0
  107. package/dist/__tests__/pr-picker.test.d.ts +2 -0
  108. package/dist/__tests__/pr-picker.test.d.ts.map +1 -0
  109. package/dist/__tests__/pr-picker.test.js +57 -0
  110. package/dist/__tests__/pr-picker.test.js.map +1 -0
  111. package/dist/__tests__/pr-status-scan.test.d.ts +2 -0
  112. package/dist/__tests__/pr-status-scan.test.d.ts.map +1 -0
  113. package/dist/__tests__/pr-status-scan.test.js +92 -0
  114. package/dist/__tests__/pr-status-scan.test.js.map +1 -0
  115. package/dist/__tests__/pr-status.test.d.ts +2 -0
  116. package/dist/__tests__/pr-status.test.d.ts.map +1 -0
  117. package/dist/__tests__/pr-status.test.js +346 -0
  118. package/dist/__tests__/pr-status.test.js.map +1 -0
  119. package/dist/__tests__/repo-picker.test.d.ts +2 -0
  120. package/dist/__tests__/repo-picker.test.d.ts.map +1 -0
  121. package/dist/__tests__/repo-picker.test.js +115 -0
  122. package/dist/__tests__/repo-picker.test.js.map +1 -0
  123. package/dist/__tests__/review-comment-body.test.d.ts +2 -0
  124. package/dist/__tests__/review-comment-body.test.d.ts.map +1 -0
  125. package/dist/__tests__/review-comment-body.test.js +54 -0
  126. package/dist/__tests__/review-comment-body.test.js.map +1 -0
  127. package/dist/__tests__/review-models.test.d.ts +2 -0
  128. package/dist/__tests__/review-models.test.d.ts.map +1 -0
  129. package/dist/__tests__/review-models.test.js +39 -0
  130. package/dist/__tests__/review-models.test.js.map +1 -0
  131. package/dist/__tests__/review-status.test.d.ts +2 -0
  132. package/dist/__tests__/review-status.test.d.ts.map +1 -0
  133. package/dist/__tests__/review-status.test.js +95 -0
  134. package/dist/__tests__/review-status.test.js.map +1 -0
  135. package/dist/__tests__/runner.test.d.ts +2 -0
  136. package/dist/__tests__/runner.test.d.ts.map +1 -0
  137. package/dist/__tests__/runner.test.js +204 -0
  138. package/dist/__tests__/runner.test.js.map +1 -0
  139. package/dist/__tests__/scan-cache.test.d.ts +2 -0
  140. package/dist/__tests__/scan-cache.test.d.ts.map +1 -0
  141. package/dist/__tests__/scan-cache.test.js +59 -0
  142. package/dist/__tests__/scan-cache.test.js.map +1 -0
  143. package/dist/__tests__/scan-client.test.d.ts +2 -0
  144. package/dist/__tests__/scan-client.test.d.ts.map +1 -0
  145. package/dist/__tests__/scan-client.test.js +30 -0
  146. package/dist/__tests__/scan-client.test.js.map +1 -0
  147. package/dist/__tests__/scan.test.d.ts +2 -0
  148. package/dist/__tests__/scan.test.d.ts.map +1 -0
  149. package/dist/__tests__/scan.test.js +115 -0
  150. package/dist/__tests__/scan.test.js.map +1 -0
  151. package/dist/__tests__/scopes.test.d.ts +2 -0
  152. package/dist/__tests__/scopes.test.d.ts.map +1 -0
  153. package/dist/__tests__/scopes.test.js +101 -0
  154. package/dist/__tests__/scopes.test.js.map +1 -0
  155. package/dist/__tests__/sha-cache.test.d.ts +2 -0
  156. package/dist/__tests__/sha-cache.test.d.ts.map +1 -0
  157. package/dist/__tests__/sha-cache.test.js +40 -0
  158. package/dist/__tests__/sha-cache.test.js.map +1 -0
  159. package/dist/__tests__/smart-switch.test.d.ts +2 -0
  160. package/dist/__tests__/smart-switch.test.d.ts.map +1 -0
  161. package/dist/__tests__/smart-switch.test.js +145 -0
  162. package/dist/__tests__/smart-switch.test.js.map +1 -0
  163. package/dist/ck.d.ts +3 -0
  164. package/dist/ck.d.ts.map +1 -0
  165. package/dist/ck.js +8 -0
  166. package/dist/ck.js.map +1 -0
  167. package/dist/cli.d.ts +3 -0
  168. package/dist/cli.d.ts.map +1 -0
  169. package/dist/cli.js +132 -0
  170. package/dist/cli.js.map +1 -0
  171. package/dist/commands/diagnose.d.ts +54 -0
  172. package/dist/commands/diagnose.d.ts.map +1 -0
  173. package/dist/commands/diagnose.js +294 -0
  174. package/dist/commands/diagnose.js.map +1 -0
  175. package/dist/commands/impact.d.ts +38 -0
  176. package/dist/commands/impact.d.ts.map +1 -0
  177. package/dist/commands/impact.js +210 -0
  178. package/dist/commands/impact.js.map +1 -0
  179. package/dist/commands/init.d.ts +12 -0
  180. package/dist/commands/init.d.ts.map +1 -0
  181. package/dist/commands/init.js +183 -0
  182. package/dist/commands/init.js.map +1 -0
  183. package/dist/commands/issue.d.ts +25 -0
  184. package/dist/commands/issue.d.ts.map +1 -0
  185. package/dist/commands/issue.js +445 -0
  186. package/dist/commands/issue.js.map +1 -0
  187. package/dist/commands/kickass.d.ts +59 -0
  188. package/dist/commands/kickass.d.ts.map +1 -0
  189. package/dist/commands/kickass.js +288 -0
  190. package/dist/commands/kickass.js.map +1 -0
  191. package/dist/commands/onboard.d.ts +70 -0
  192. package/dist/commands/onboard.d.ts.map +1 -0
  193. package/dist/commands/onboard.js +883 -0
  194. package/dist/commands/onboard.js.map +1 -0
  195. package/dist/commands/optimize.d.ts +16 -0
  196. package/dist/commands/optimize.d.ts.map +1 -0
  197. package/dist/commands/optimize.js +244 -0
  198. package/dist/commands/optimize.js.map +1 -0
  199. package/dist/commands/review.d.ts +2 -0
  200. package/dist/commands/review.d.ts.map +1 -0
  201. package/dist/commands/review.js +118 -0
  202. package/dist/commands/review.js.map +1 -0
  203. package/dist/commands/run.d.ts +13 -0
  204. package/dist/commands/run.d.ts.map +1 -0
  205. package/dist/commands/run.js +243 -0
  206. package/dist/commands/run.js.map +1 -0
  207. package/dist/commands/scan.d.ts +94 -0
  208. package/dist/commands/scan.d.ts.map +1 -0
  209. package/dist/commands/scan.js +276 -0
  210. package/dist/commands/scan.js.map +1 -0
  211. package/dist/commands/serve.d.ts +9 -0
  212. package/dist/commands/serve.d.ts.map +1 -0
  213. package/dist/commands/serve.js +402 -0
  214. package/dist/commands/serve.js.map +1 -0
  215. package/dist/commands/status.d.ts +2 -0
  216. package/dist/commands/status.d.ts.map +1 -0
  217. package/dist/commands/status.js +89 -0
  218. package/dist/commands/status.js.map +1 -0
  219. package/dist/commands/watch.d.ts +9 -0
  220. package/dist/commands/watch.d.ts.map +1 -0
  221. package/dist/commands/watch.js +902 -0
  222. package/dist/commands/watch.js.map +1 -0
  223. package/dist/config/loader.d.ts +47 -0
  224. package/dist/config/loader.d.ts.map +1 -0
  225. package/dist/config/loader.js +334 -0
  226. package/dist/config/loader.js.map +1 -0
  227. package/dist/config/schema.d.ts +814 -0
  228. package/dist/config/schema.d.ts.map +1 -0
  229. package/dist/config/schema.js +152 -0
  230. package/dist/config/schema.js.map +1 -0
  231. package/dist/github/client.d.ts +139 -0
  232. package/dist/github/client.d.ts.map +1 -0
  233. package/dist/github/client.js +711 -0
  234. package/dist/github/client.js.map +1 -0
  235. package/dist/github/detector.d.ts +12 -0
  236. package/dist/github/detector.d.ts.map +1 -0
  237. package/dist/github/detector.js +120 -0
  238. package/dist/github/detector.js.map +1 -0
  239. package/dist/github/merge.d.ts +9 -0
  240. package/dist/github/merge.d.ts.map +1 -0
  241. package/dist/github/merge.js +33 -0
  242. package/dist/github/merge.js.map +1 -0
  243. package/dist/github/review-status.d.ts +6 -0
  244. package/dist/github/review-status.d.ts.map +1 -0
  245. package/dist/github/review-status.js +51 -0
  246. package/dist/github/review-status.js.map +1 -0
  247. package/dist/github/webhook.d.ts +41 -0
  248. package/dist/github/webhook.d.ts.map +1 -0
  249. package/dist/github/webhook.js +50 -0
  250. package/dist/github/webhook.js.map +1 -0
  251. package/dist/lib/annotation.d.ts +23 -0
  252. package/dist/lib/annotation.d.ts.map +1 -0
  253. package/dist/lib/annotation.js +103 -0
  254. package/dist/lib/annotation.js.map +1 -0
  255. package/dist/lib/backtrace.d.ts +40 -0
  256. package/dist/lib/backtrace.d.ts.map +1 -0
  257. package/dist/lib/backtrace.js +169 -0
  258. package/dist/lib/backtrace.js.map +1 -0
  259. package/dist/lib/board.d.ts +74 -0
  260. package/dist/lib/board.d.ts.map +1 -0
  261. package/dist/lib/board.js +640 -0
  262. package/dist/lib/board.js.map +1 -0
  263. package/dist/lib/clone.d.ts +12 -0
  264. package/dist/lib/clone.d.ts.map +1 -0
  265. package/dist/lib/clone.js +30 -0
  266. package/dist/lib/clone.js.map +1 -0
  267. package/dist/lib/comment-bodies.d.ts +17 -0
  268. package/dist/lib/comment-bodies.d.ts.map +1 -0
  269. package/dist/lib/comment-bodies.js +51 -0
  270. package/dist/lib/comment-bodies.js.map +1 -0
  271. package/dist/lib/crosscheck-commit.d.ts +2 -0
  272. package/dist/lib/crosscheck-commit.d.ts.map +1 -0
  273. package/dist/lib/crosscheck-commit.js +4 -0
  274. package/dist/lib/crosscheck-commit.js.map +1 -0
  275. package/dist/lib/diff-hash.d.ts +16 -0
  276. package/dist/lib/diff-hash.d.ts.map +1 -0
  277. package/dist/lib/diff-hash.js +71 -0
  278. package/dist/lib/diff-hash.js.map +1 -0
  279. package/dist/lib/durations.d.ts +5 -0
  280. package/dist/lib/durations.d.ts.map +1 -0
  281. package/dist/lib/durations.js +39 -0
  282. package/dist/lib/durations.js.map +1 -0
  283. package/dist/lib/event-fields.d.ts +6 -0
  284. package/dist/lib/event-fields.d.ts.map +1 -0
  285. package/dist/lib/event-fields.js +20 -0
  286. package/dist/lib/event-fields.js.map +1 -0
  287. package/dist/lib/filter.d.ts +2 -0
  288. package/dist/lib/filter.d.ts.map +1 -0
  289. package/dist/lib/filter.js +4 -0
  290. package/dist/lib/filter.js.map +1 -0
  291. package/dist/lib/fortune.d.ts +2 -0
  292. package/dist/lib/fortune.d.ts.map +1 -0
  293. package/dist/lib/fortune.js +26 -0
  294. package/dist/lib/fortune.js.map +1 -0
  295. package/dist/lib/languages.d.ts +3 -0
  296. package/dist/lib/languages.d.ts.map +1 -0
  297. package/dist/lib/languages.js +26 -0
  298. package/dist/lib/languages.js.map +1 -0
  299. package/dist/lib/log-analysis.d.ts +17 -0
  300. package/dist/lib/log-analysis.d.ts.map +1 -0
  301. package/dist/lib/log-analysis.js +72 -0
  302. package/dist/lib/log-analysis.js.map +1 -0
  303. package/dist/lib/logger.d.ts +14 -0
  304. package/dist/lib/logger.d.ts.map +1 -0
  305. package/dist/lib/logger.js +84 -0
  306. package/dist/lib/logger.js.map +1 -0
  307. package/dist/lib/port.d.ts +2 -0
  308. package/dist/lib/port.d.ts.map +1 -0
  309. package/dist/lib/port.js +21 -0
  310. package/dist/lib/port.js.map +1 -0
  311. package/dist/lib/pr-lock.d.ts +4 -0
  312. package/dist/lib/pr-lock.d.ts.map +1 -0
  313. package/dist/lib/pr-lock.js +91 -0
  314. package/dist/lib/pr-lock.js.map +1 -0
  315. package/dist/lib/pr-picker.d.ts +10 -0
  316. package/dist/lib/pr-picker.d.ts.map +1 -0
  317. package/dist/lib/pr-picker.js +80 -0
  318. package/dist/lib/pr-picker.js.map +1 -0
  319. package/dist/lib/pr-status.d.ts +206 -0
  320. package/dist/lib/pr-status.d.ts.map +1 -0
  321. package/dist/lib/pr-status.js +613 -0
  322. package/dist/lib/pr-status.js.map +1 -0
  323. package/dist/lib/repo-picker.d.ts +23 -0
  324. package/dist/lib/repo-picker.d.ts.map +1 -0
  325. package/dist/lib/repo-picker.js +411 -0
  326. package/dist/lib/repo-picker.js.map +1 -0
  327. package/dist/lib/review-models.d.ts +7 -0
  328. package/dist/lib/review-models.d.ts.map +1 -0
  329. package/dist/lib/review-models.js +32 -0
  330. package/dist/lib/review-models.js.map +1 -0
  331. package/dist/lib/runner.d.ts +65 -0
  332. package/dist/lib/runner.d.ts.map +1 -0
  333. package/dist/lib/runner.js +710 -0
  334. package/dist/lib/runner.js.map +1 -0
  335. package/dist/lib/scan-cache.d.ts +31 -0
  336. package/dist/lib/scan-cache.d.ts.map +1 -0
  337. package/dist/lib/scan-cache.js +112 -0
  338. package/dist/lib/scan-cache.js.map +1 -0
  339. package/dist/lib/scopes.d.ts +16 -0
  340. package/dist/lib/scopes.d.ts.map +1 -0
  341. package/dist/lib/scopes.js +37 -0
  342. package/dist/lib/scopes.js.map +1 -0
  343. package/dist/lib/sha-cache.d.ts +7 -0
  344. package/dist/lib/sha-cache.d.ts.map +1 -0
  345. package/dist/lib/sha-cache.js +44 -0
  346. package/dist/lib/sha-cache.js.map +1 -0
  347. package/dist/lib/smart-switch.d.ts +44 -0
  348. package/dist/lib/smart-switch.d.ts.map +1 -0
  349. package/dist/lib/smart-switch.js +145 -0
  350. package/dist/lib/smart-switch.js.map +1 -0
  351. package/dist/lib/verdict.d.ts +9 -0
  352. package/dist/lib/verdict.d.ts.map +1 -0
  353. package/dist/lib/verdict.js +52 -0
  354. package/dist/lib/verdict.js.map +1 -0
  355. package/dist/lib/workflow.d.ts +85 -0
  356. package/dist/lib/workflow.d.ts.map +1 -0
  357. package/dist/lib/workflow.js +116 -0
  358. package/dist/lib/workflow.js.map +1 -0
  359. package/dist/reviewers/address.d.ts +5 -0
  360. package/dist/reviewers/address.d.ts.map +1 -0
  361. package/dist/reviewers/address.js +87 -0
  362. package/dist/reviewers/address.js.map +1 -0
  363. package/dist/reviewers/claude.d.ts +12 -0
  364. package/dist/reviewers/claude.d.ts.map +1 -0
  365. package/dist/reviewers/claude.js +78 -0
  366. package/dist/reviewers/claude.js.map +1 -0
  367. package/dist/reviewers/codex.d.ts +9 -0
  368. package/dist/reviewers/codex.d.ts.map +1 -0
  369. package/dist/reviewers/codex.js +121 -0
  370. package/dist/reviewers/codex.js.map +1 -0
  371. package/dist/reviewers/conflict-resolve.d.ts +15 -0
  372. package/dist/reviewers/conflict-resolve.d.ts.map +1 -0
  373. package/dist/reviewers/conflict-resolve.js +219 -0
  374. package/dist/reviewers/conflict-resolve.js.map +1 -0
  375. package/dist/reviewers/fix.d.ts +7 -0
  376. package/dist/reviewers/fix.d.ts.map +1 -0
  377. package/dist/reviewers/fix.js +197 -0
  378. package/dist/reviewers/fix.js.map +1 -0
  379. package/get-started.md +1271 -0
  380. package/get-started.zh.md +1208 -0
  381. package/package.json +75 -0
package/AGENT.md ADDED
@@ -0,0 +1,207 @@
1
+ # AGENT.md — crosscheck optimize harness
2
+
3
+ You are improving crosscheck's AI code review instructions. crosscheck runs `codex` and
4
+ `claude` CLIs to review pull requests automatically. Both reviewers read
5
+ `~/.crosscheck/instructions.md` before every review. Your job is to read the diagnostic
6
+ report below and produce an improved `instructions.md` that increases review quality and
7
+ reduces failures.
8
+
9
+ > **Note:** `crosscheck optimize` selects which agent runs you based on your local config
10
+ > and log history — whichever reviewer has the highest success rate, or `claude` if there
11
+ > is no data. The instructions you produce are reviewer-agnostic: they are read by both
12
+ > `claude` and `codex`, so write in plain language that both understand.
13
+
14
+ ---
15
+
16
+ ## Input you will receive
17
+
18
+ 1. **Diagnostic JSON** from `crosscheck diagnose --json` — error patterns, review outcomes,
19
+ repos seen, language signals, and suggestions.
20
+ 2. **Current `instructions.md`** — may be empty on first run.
21
+
22
+ ## Output you must produce
23
+
24
+ Respond with only the new content of `instructions.md`. No explanation, no preamble, no
25
+ markdown fences — just the file content. The file uses plain Markdown.
26
+
27
+ ---
28
+
29
+ ## Required sections (always present)
30
+
31
+ ### `## Constraints`
32
+ What reviewers must NOT do. Each constraint is one bullet:
33
+ ```
34
+ - Do not run [specific command].
35
+ ```
36
+
37
+ ### `## Focus`
38
+ What reviewers should prioritize. Free-form prose or bullets.
39
+
40
+ ### `## Verdict format` (never modify this section)
41
+ This section must always be preserved exactly as written in the current file. If it is
42
+ missing from the current file, add it verbatim:
43
+
44
+ ```markdown
45
+ ## Verdict format
46
+
47
+ On the very last line of your response, write exactly one of:
48
+
49
+ VERDICT: APPROVE
50
+ VERDICT: NEEDS WORK
51
+ VERDICT: BLOCK
52
+
53
+ Use APPROVE for no issues or trivial nits only.
54
+ Use NEEDS WORK for addressable issues that are not blocking.
55
+ Use BLOCK for security risks, data loss, broken API contracts, or correctness bugs.
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Rules for the `## Constraints` section
61
+
62
+ ### Add a constraint when
63
+ - `diagnostic.errors` contains a `command_not_found` pattern with `count >= 1` for a
64
+ specific command.
65
+ - `diagnostic.errors` contains a `timeout` pattern with `count >= 2` for a reviewer that
66
+ is also producing `command_not_found` entries (likely spinning on a failed tool call).
67
+
68
+ ### Remove a constraint when
69
+ - It was previously added for a specific command but that command no longer appears in
70
+ `diagnostic.errors` and has not appeared for the full log period analyzed.
71
+
72
+ ### Phrasing rules
73
+ - Use the exact command name, not a category. Write `Do not run tsc.` not `Do not run
74
+ TypeScript build tools.`
75
+ - One command per bullet. Do not combine: `Do not run tsc or npm.` → split into two.
76
+ - Do not restrict reading. `Do not open package.json` is wrong. Constraints are for
77
+ execution only.
78
+ - Do not restrict security analysis. Never add a constraint that would prevent a reviewer
79
+ from flagging a vulnerability.
80
+
81
+ ---
82
+
83
+ ## Language detection → constraint mapping
84
+
85
+ Use `diagnostic.languages_detected` (list of detected language/tool identifiers) to seed
86
+ the initial constraints. Add the corresponding constraint only if the language is detected
87
+ AND a related `command_not_found` error is present OR this is the first run with no
88
+ existing constraints.
89
+
90
+ | Detected signal | Constraint to add |
91
+ |---|---|
92
+ | `typescript` / `tsconfig.json` / `package.json` | `Do not run tsc.` |
93
+ | `nodejs` / `package.json` | `Do not run npm, npx, yarn, or pnpm.` |
94
+ | `jest` / `vitest` in devDependencies | `Do not run jest or vitest.` |
95
+ | `python` / `requirements.txt` / `pyproject.toml` | `Do not run pytest, pip, or python scripts.` |
96
+ | `rust` / `Cargo.toml` | `Do not run cargo build or cargo test.` |
97
+ | `go` / `go.mod` | `Do not run go build or go test.` |
98
+ | `java` / `pom.xml` | `Do not run mvn.` |
99
+ | `kotlin` / `gradle` / `build.gradle` | `Do not run gradle.` |
100
+ | `ruby` / `Gemfile` | `Do not run bundle exec or rspec.` |
101
+
102
+ Do not add constraints for languages not detected. Do not add all of the above blindly.
103
+
104
+ ---
105
+
106
+ ## Rules for the `## Focus` section
107
+
108
+ ### Update focus when
109
+ - `diagnostic.verdict_distribution.APPROVE` percentage > 80% across >= 10 reviews → reviews
110
+ may be too lenient → add: "Apply strict scrutiny to error handling and edge cases."
111
+ - `diagnostic.verdict_distribution.BLOCK` percentage > 30% across >= 10 reviews → reviews
112
+ may be too strict → add: "Prefer NEEDS WORK over BLOCK unless the issue causes data loss
113
+ or a security vulnerability."
114
+ - `diagnostic.repos_seen` consistently includes infrastructure repos (name contains
115
+ `-infra`, `-deploy`, `-k8s`) → add: "Pay extra attention to secrets, env vars, and IAM
116
+ permissions in infrastructure changes."
117
+
118
+ ### Default focus (use when no signals override it)
119
+ ```markdown
120
+ ## Focus
121
+
122
+ Review for correctness, security, and maintainability. Flag issues that would cause bugs
123
+ in production, expose sensitive data, or make the code significantly harder to maintain.
124
+ Nits and style preferences should be NEEDS WORK, not BLOCK.
125
+ ```
126
+
127
+ ---
128
+
129
+ ## Quality principles
130
+
131
+ 1. **Minimal** — fewer instructions produce better reviews. Each line must earn its place.
132
+ 2. **Specific** — exact command names, concrete criteria, not vague categories.
133
+ 3. **Evidence-based** — add only what the diagnostic shows is needed or what language
134
+ detection justifies.
135
+ 4. **Reversible** — stale constraints (no matching errors in the log period) should be
136
+ removed, not accumulated.
137
+ 5. **Reviewer-agnostic** — these instructions are read by both `codex` and `claude`. Write
138
+ them in plain language that both understand.
139
+
140
+ ---
141
+
142
+ ## What must never change
143
+
144
+ - The `## Verdict format` section content and label.
145
+ - Instructions that the user has manually annotated with `<!-- keep -->`.
146
+ - The overall Markdown structure (## headings, bullet lists).
147
+
148
+ ---
149
+
150
+ ## Worked example
151
+
152
+ ### Input diagnostic (excerpt)
153
+ ```json
154
+ {
155
+ "summary": { "total_reviews": 6, "successful": 3, "failed": 3, "failure_rate": 0.5 },
156
+ "errors": [
157
+ { "pattern": "command_not_found", "command": "tsc", "count": 2, "reviewer": "codex" },
158
+ { "pattern": "command_not_found", "command": "jest", "count": 1, "reviewer": "codex" },
159
+ { "pattern": "base_branch_missing", "branch": "staging", "count": 2 }
160
+ ],
161
+ "verdict_distribution": { "APPROVE": 2, "NEEDS_WORK": 1, "BLOCK": 0 },
162
+ "languages_detected": ["typescript", "nodejs"],
163
+ "suggestions": [
164
+ { "type": "add_constraint", "instruction": "Do not run tsc.", "reason": "tsc not found ×2" },
165
+ { "type": "add_constraint", "instruction": "Do not run jest.", "reason": "jest not found ×1" }
166
+ ]
167
+ }
168
+ ```
169
+
170
+ ### Input current instructions.md
171
+ ```markdown
172
+ ## Verdict format
173
+
174
+ On the very last line of your response, write exactly one of:
175
+ ...
176
+ ```
177
+
178
+ ### Correct output
179
+ ```markdown
180
+ ## Constraints
181
+
182
+ - Do not run tsc.
183
+ - Do not run jest.
184
+ - Do not run npm, npx, yarn, or pnpm.
185
+
186
+ ## Focus
187
+
188
+ Review for correctness, security, and maintainability. Flag issues that would cause bugs
189
+ in production, expose sensitive data, or make the code significantly harder to maintain.
190
+ Nits and style preferences should be NEEDS WORK, not BLOCK.
191
+
192
+ ## Verdict format
193
+
194
+ On the very last line of your response, write exactly one of:
195
+
196
+ VERDICT: APPROVE
197
+ VERDICT: NEEDS WORK
198
+ VERDICT: BLOCK
199
+
200
+ Use APPROVE for no issues or trivial nits only.
201
+ Use NEEDS WORK for addressable issues that are not blocking.
202
+ Use BLOCK for security risks, data loss, broken API contracts, or correctness bugs.
203
+ ```
204
+
205
+ Note: `Do not run npm, npx, yarn, or pnpm.` was added because `nodejs` was detected, even
206
+ though no npm error appeared yet — this is the language-detection pre-emptive path for
207
+ first-run seeding.
package/ISSUE.md ADDED
@@ -0,0 +1,234 @@
1
+ # ISSUE.md — crosscheck issue analysis harness
2
+
3
+ You are analyzing `~/.crosscheck/logs/*.ndjson` to find bugs and improvement opportunities
4
+ in the crosscheck project and draft GitHub issues for `Motivation-Labs/crosscheck`.
5
+
6
+ Your job is to surface patterns that a simple error-count approach would miss: session
7
+ instability, tunnel failure modes, process crash loops, and reliability regressions.
8
+
9
+ ---
10
+
11
+ ## Log schema
12
+
13
+ Each line in a `.ndjson` file is one JSON event with at minimum:
14
+
15
+ ```
16
+ { "ts": "<ISO-8601 UTC>", "level": "info|warn|error", "event": "<name>", ...fields }
17
+ ```
18
+
19
+ ### Events that matter most
20
+
21
+ | Event | Key fields | Meaning |
22
+ |---|---|---|
23
+ | `session_start` | `command` | A new watch/serve process started |
24
+ | `session_end` | — | Process exited cleanly (graceful shutdown) |
25
+ | `tunnel_opened` | `url` | Tunnel is live; url is `lhr.life` or `smee.io` |
26
+ | `tunnel_closed` | `reconnecting: bool` | Tunnel dropped; reconnecting if true |
27
+ | `tunnel_error` | `message` | SSH failure; message contains "did not start within" (timeout) or "exit (code 255)" (hard exit) |
28
+ | `webhook_registered` | `repo` | Webhook confirmed active |
29
+ | `webhook_register_retry` | — | Webhook registration retrying |
30
+ | `webhook_error` | `message` | Webhook registration failed |
31
+ | `pr_received` | `repo`, `pr` | Incoming PR event |
32
+ | `review_started` | `reviewer`, `pr` | Review agent invoked |
33
+ | `review_complete` | `verdict`, `duration_ms` | Review finished |
34
+ | `verdict_parse_failed` | — | Agent output did not contain a parseable VERDICT line |
35
+ | `error` | `message` | Any runtime error |
36
+
37
+ ---
38
+
39
+ ## How to compute sessions
40
+
41
+ Split all log entries on `session_start` events. Each session is the slice of events
42
+ from one `session_start` up to (but not including) the next `session_start`.
43
+
44
+ For each session compute:
45
+
46
+ | Field | How |
47
+ |---|---|
48
+ | `duration_min` | `(last_event.ts - session_start.ts)` in minutes |
49
+ | `clean_exit` | Session contains a `session_end` event |
50
+ | `tunnel_opened` | Any `tunnel_opened` event present |
51
+ | `tunnel_type` | `"lhr.life"` / `"smee.io"` / `"none"` from tunnel url |
52
+ | `tunnel_error_count` | Count of `tunnel_error` events |
53
+ | `ssh_timeout_count` | `tunnel_error` where message contains `"did not start within"` |
54
+ | `ssh_255_count` | `tunnel_error` where message contains `"255"` |
55
+ | `reconnect_count` | `tunnel_closed` events where `reconnecting: true` |
56
+ | `webhook_registered` | Any `webhook_registered` event present |
57
+ | `pr_received` | Any `pr_received` event present |
58
+ | `review_completed` | Any `review_complete` event present |
59
+ | `error_count` | Events where `level == "error"` |
60
+
61
+ ---
62
+
63
+ ## Analysis 1 — Session stability
64
+
65
+ Compute per-session stats and then aggregate.
66
+
67
+ **Aggregate metrics to report:**
68
+ - Total sessions, total days covered
69
+ - Average / median session lifespan (minutes)
70
+ - % sessions with clean exit (`session_end` present)
71
+ - % sessions where tunnel never opened
72
+ - % sessions where webhook was never registered
73
+ - Longest and shortest session
74
+
75
+ **Thresholds that indicate a reportable problem:**
76
+
77
+ | Condition | Severity | Report type |
78
+ |---|---|---|
79
+ | avg session lifespan < 15 min across any single day | high | bug |
80
+ | > 40% of sessions never reach `tunnel_opened` | high | bug |
81
+ | > 50% of sessions have no `session_end` (abrupt death) | medium | improvement |
82
+ | ≥ 5 sessions in any 90-minute window all under 5 min | high | bug — rapid restart loop |
83
+ | > 30% of sessions have no `webhook_registered` | medium | improvement |
84
+
85
+ ---
86
+
87
+ ## Analysis 2 — Tunnel reliability
88
+
89
+ **Aggregate metrics:**
90
+ - Count of `tunnel_opened`, `tunnel_closed`, `tunnel_error` across all sessions
91
+ - SSH timeout count vs SSH code-255 count (from `tunnel_error` messages)
92
+ - Reconnect rate: `reconnect_count / tunnel_closed_count`
93
+ - Terminal close rate: `tunnel_closed` where `reconnecting: false`
94
+ - % of sessions that never reached `tunnel_opened`
95
+
96
+ **Key insight to encode:** Sessions that accumulate many tunnel errors and reconnects
97
+ can still survive long — the reconnect logic is working. The real kill signal is
98
+ `tunnel_opened == false`, not high `tunnel_error_count`.
99
+
100
+ **Thresholds:**
101
+
102
+ | Condition | Severity | Report type |
103
+ |---|---|---|
104
+ | SSH timeout rate > 60% of tunnel errors | high | bug — connectivity or lhr.life instability |
105
+ | SSH code-255 rate > 20% of tunnel errors | high | bug — SSH process crash |
106
+ | Terminal close rate > 30% of tunnel closes | high | bug — tunnel not recovering |
107
+ | > 40% sessions never open a tunnel | high | bug |
108
+
109
+ ---
110
+
111
+ ## Analysis 3 — Process health (crash loops)
112
+
113
+ This is distinct from tunnel failure. A process crash loop has these signatures:
114
+ - Rapid session restarts (≥ 5 sessions in 90 minutes)
115
+ - Sessions dying before `tunnel_opened` with **zero** tunnel errors
116
+ - `error` events containing `gh repo clone`, `Command failed`, or `ENOENT`
117
+ - Sessions with normal `tunnel_error_count` but very short lifespan
118
+
119
+ **What to look for:**
120
+ - Cluster rapid-restart windows: sessions where `duration_min < 5` AND `tunnel_opened == false`
121
+ AND `tunnel_error_count == 0`. These are process crashes, not connectivity failures.
122
+ - Extract the `error` event messages from those sessions to identify the root cause.
123
+ - Check if `verdict_parse_failed` or `webhook_error` events appear in the final 60 seconds
124
+ of abrupt-death sessions — these indicate the review or webhook path is triggering exits.
125
+
126
+ **Thresholds:**
127
+
128
+ | Condition | Severity | Report type |
129
+ |---|---|---|
130
+ | ≥ 5 sessions: duration < 5 min AND tunnel_opened=false AND tunnel_errors=0 | critical | bug — startup crash loop |
131
+ | `gh repo clone` in any error message | high | bug — clone failure |
132
+ | `verdict_parse_failed` in final 60s of > 20% abrupt-death sessions | medium | improvement — VERDICT format reliability |
133
+
134
+ ---
135
+
136
+ ## The two failure modes (always distinguish these in your report)
137
+
138
+ **Mode A — Tunnel failure:** Sessions die because SSH connectivity fails and the tunnel
139
+ never comes up. Signals: `ssh_timeout_count > 0` OR `ssh_255_count > 0` in failed sessions.
140
+ Root cause: network, lhr.life instability, or SSH configuration.
141
+
142
+ **Mode B — Process crash:** Sessions die fast with zero tunnel errors. The process exits
143
+ before even attempting a tunnel. Signals: `duration_min < 3`, `tunnel_opened = false`,
144
+ `tunnel_error_count = 0`, error messages about `gh`, `clone`, `ENOENT`, or similar.
145
+ Root cause: code bug, missing dependency, bad config, or file system issue.
146
+
147
+ Never combine these two modes in a single issue. They have different root causes and
148
+ different fixes.
149
+
150
+ ---
151
+
152
+ ## Improvement opportunities (not bugs)
153
+
154
+ File an improvement issue when the system is working but data shows a reliability gap:
155
+
156
+ | Pattern | Issue title pattern | Label |
157
+ |---|---|---|
158
+ | avg session lifespan 15–30 min (should be hours) | `watch: improve session longevity — avg Xmin` | `improvement` |
159
+ | smee.io has 0 tunnel errors but lhr.life does not | `watch: add smee.io as automatic tunnel fallback` | `improvement` |
160
+ | Reconnect works but adds latency | `tunnel: reduce reconnect gap when lhr.life drops` | `improvement` |
161
+ | `webhook_registered` strongly predicts session survival | `watch: surface webhook status earlier in startup sequence` | `improvement` |
162
+ | `verdict_parse_failed` events in logs | `review: harden VERDICT line parsing — N parse failures found` | `improvement` |
163
+
164
+ ---
165
+
166
+ ## Output format
167
+
168
+ For each issue you file, output exactly:
169
+
170
+ ```
171
+ TITLE: <concise title under 80 characters>
172
+ LABELS: <comma-separated: bug, improvement, priority:high, priority:low>
173
+ ---
174
+ <GitHub-flavored markdown body>
175
+ ```
176
+
177
+ ### Required body sections
178
+
179
+ **For bugs:**
180
+ ```markdown
181
+ ## Summary
182
+ One paragraph describing the failure pattern and impact on the user.
183
+
184
+ ## Evidence from logs
185
+ Exact metrics from your analysis (counts, percentages, session table if relevant).
186
+ Use a code block for representative raw log entries — sanitize any PII or tokens.
187
+
188
+ ## Failure mode
189
+ State clearly: Mode A (tunnel failure) or Mode B (process crash), and why.
190
+
191
+ ## Reproduction signals
192
+ What log patterns indicate this bug is active. How to check if it's happening.
193
+
194
+ ## Suggested fix direction
195
+ One sentence on where in the codebase to look. Do not prescribe the implementation.
196
+
197
+ ## Environment
198
+ crosscheck version (from log entries if present), platform, date range analyzed.
199
+ ```
200
+
201
+ **For improvements:**
202
+ ```markdown
203
+ ## Summary
204
+ One paragraph describing the opportunity and expected benefit.
205
+
206
+ ## Evidence from logs
207
+ The metrics that surfaced this opportunity.
208
+
209
+ ## Current behavior vs desired behavior
210
+ Two-line contrast: what happens now, what should happen instead.
211
+
212
+ ## Suggested approach
213
+ One paragraph, high level. Do not write code.
214
+ ```
215
+
216
+ ---
217
+
218
+ ## What NOT to report
219
+
220
+ - Single-occurrence errors with no clear pattern
221
+ - Events that are expected (e.g., one `tunnel_closed` followed immediately by `tunnel_opened`)
222
+ - Issues already covered by an existing `crosscheck diagnose` error pattern
223
+ (`command_not_found`, `base_branch_missing`, `timeout`, `auth_failure`)
224
+ - Anything requiring access to source code you were not given — stay in the log data
225
+
226
+ ---
227
+
228
+ ## Prioritization
229
+
230
+ If you find multiple issues, report them in this order:
231
+ 1. Startup crash loops (Mode B, critical) — they prevent any work from happening
232
+ 2. Tunnel-never-opens rate > 40% (Mode A, high) — degrades session reliability
233
+ 3. Short average session lifespan (< 15 min/day) — signals chronic instability
234
+ 4. Improvement opportunities — after bugs are covered
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025–2026 Motivation Labs LLC.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,234 @@
1
+ <div align="right">
2
+ <h5><a href="./README.zh.md">🌏 &nbsp;中文</a></h5>
3
+ </div>
4
+
5
+ <p align="center">
6
+ <img src="./assets/logo.png" alt="crosscheck" width="160" />
7
+ </p>
8
+
9
+ <p align="center"><em>Building crosscheck with crosscheck.</em></p>
10
+
11
+ # crosscheck
12
+
13
+ <p align="center">
14
+ <img src="./assets/screenshot-watch.png" alt="crosscheck watch — live pipeline view" width="860" />
15
+ </p>
16
+
17
+ **Auto Code Review Pipeline — customizable PR → Review → Fix → Recheck loop, single-vendor or cross-vendor, zero new infrastructure.**
18
+
19
+ Define the review pipeline in `workflow.yml`: review-only, review + fix, or the full review + fix + recheck cycle. Each step runs through the `claude` or `codex` CLI against your existing subscriptions — no API keys, no per-review cost.
20
+
21
+ ---
22
+
23
+ ## Quick start
24
+
25
+ ```bash
26
+ # 1. Install crosscheck and the agent CLIs
27
+ npm install -g @humanbased/crosscheck
28
+ npm install -g @anthropic-ai/claude-code && claude # Claude Pro/Max subscription
29
+ npm install -g @openai/codex && codex login --device-auth # ChatGPT Plus/Pro subscription
30
+ brew install gh && gh auth login # GitHub CLI
31
+
32
+ # 2. Guided setup — repos, review mode, workflow pipeline
33
+ crosscheck onboard
34
+
35
+ # 3. Start watching
36
+ crosscheck watch # personal laptop
37
+ crosscheck serve # always-on team server
38
+ ```
39
+
40
+ ---
41
+
42
+ ## Commands
43
+
44
+ ### `crosscheck onboard`
45
+
46
+ 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`.
47
+
48
+ ```bash
49
+ crosscheck onboard # guided setup
50
+ crosscheck onboard --personal # skip persona prompt, go straight to personal mode
51
+ crosscheck onboard --team # skip persona prompt, go straight to team mode
52
+ crosscheck onboard -y # accept all defaults non-interactively
53
+ ```
54
+
55
+ ---
56
+
57
+ ### `crosscheck watch`
58
+
59
+ Personal mode. Starts an SSH tunnel (localhost.run), registers GitHub webhooks, and listens for PR events. Everything self-cleans on Ctrl+C.
60
+
61
+ ```bash
62
+ crosscheck watch
63
+ crosscheck watch --no-backtrace # skip startup scan for unreviewed open PRs
64
+ crosscheck watch --reconfigure # re-run deployment setup before starting
65
+ ```
66
+
67
+ ---
68
+
69
+ ### `crosscheck serve`
70
+
71
+ Team mode. Binds to a fixed port — register the webhook once, cover the whole team. Designed for a mac-mini or home server.
72
+
73
+ ```bash
74
+ crosscheck serve
75
+ crosscheck serve --no-backtrace # skip startup scan
76
+ crosscheck serve --personal # personal scope this session only
77
+ crosscheck serve --reconfigure # re-run deployment setup
78
+ ```
79
+
80
+ ---
81
+
82
+ ### `crosscheck review <pr-url>`
83
+
84
+ One-shot review of a single PR. Clones, checks out, reviews, and posts the comment.
85
+
86
+ ```bash
87
+ crosscheck review https://github.com/org/repo/pull/42
88
+ crosscheck review <pr-url> --reviewer claude # force Claude regardless of detection
89
+ crosscheck review <pr-url> --reviewer codex # force Codex regardless of detection
90
+ ```
91
+
92
+ ---
93
+
94
+ ### `crosscheck run <pr-url>`
95
+
96
+ Runs the full configured workflow against one PR: review → fix → recheck. Same logic as `watch`/`serve`, but triggered manually.
97
+
98
+ ```bash
99
+ crosscheck run <pr-url>
100
+ crosscheck run <pr-url> --steps review # only the review step
101
+ crosscheck run <pr-url> --steps fix,recheck # skip initial review
102
+ crosscheck run <pr-url> --reviewer claude # override reviewer assignment
103
+ crosscheck run <pr-url> --dry-run # review without posting or fixing
104
+ ```
105
+
106
+ ---
107
+
108
+ ### `crosscheck scan`
109
+
110
+ 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.
111
+
112
+ States: `PR` (needs review) · `APPROVE` · `NEEDS_WORK` · `BLOCK` · `RECHECK` (fix applied, needs recheck)
113
+
114
+ ```bash
115
+ crosscheck scan # all open PRs, grouped stale/not-stale
116
+ crosscheck scan --tidy # stale actionable rows only
117
+ crosscheck scan --stale-after 4h # custom staleness threshold (default 24h)
118
+ crosscheck scan --force # bypass cache
119
+ crosscheck scan --json # machine-readable output
120
+ ```
121
+
122
+ ---
123
+
124
+ ### `crosscheck kickass`
125
+
126
+ 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.
127
+
128
+ ```bash
129
+ crosscheck kickass # interactive operator queue
130
+ crosscheck kickass --dry-run # preflight only — no mutations
131
+ crosscheck kickass --stale-after 2h # tighter staleness threshold
132
+ crosscheck kickass --force # bypass scan cache before picking
133
+ ```
134
+
135
+ Actions: `PR → CR` · `NEEDS_WORK/BLOCK → Fix` · `FIX/RECHECK → Recheck` · `APPROVE → Merge`
136
+
137
+ ---
138
+
139
+ ## Configuration
140
+
141
+ ### Review depth (`quality.tier`)
142
+
143
+ ```yaml
144
+ # crosscheck.config.yml
145
+ quality:
146
+ tier: balanced # fast | balanced | thorough
147
+ ```
148
+
149
+ | Tier | Claude model | Codex model | Latency |
150
+ |---|---|---|---|
151
+ | `fast` | Haiku | default | ~10s |
152
+ | `balanced` | Sonnet (default) | default | ~30s |
153
+ | `thorough` | Opus | default | ~60s |
154
+
155
+ ### Pipeline (`workflow.yml`)
156
+
157
+ ```yaml
158
+ steps:
159
+ - name: review
160
+ type: review
161
+ reviewer: auto # auto | claude | codex | origin
162
+
163
+ - name: fix
164
+ type: fix
165
+ reviewer: origin
166
+ when: review.verdict != 'APPROVE'
167
+
168
+ - name: recheck
169
+ type: recheck
170
+ reviewer: auto
171
+ when: fix.applied_count > 0
172
+ ```
173
+
174
+ ### Config snapshot
175
+
176
+ ```yaml
177
+ # ~/.crosscheck/config.yml
178
+ orgs:
179
+ - your-org
180
+
181
+ routing:
182
+ allowed_authors:
183
+ - your-github-login
184
+
185
+ mode: cross-vendor # cross-vendor | single-vendor
186
+
187
+ vendors:
188
+ claude:
189
+ enabled: true
190
+ codex:
191
+ enabled: true
192
+
193
+ quality:
194
+ tier: balanced
195
+
196
+ clone_protocol: ssh # ssh (default) | https
197
+ ```
198
+
199
+ Full reference: [get-started.md](./get-started.md)
200
+
201
+ ---
202
+
203
+ ## Requirements
204
+
205
+ | | Minimum |
206
+ |---|---|
207
+ | Node.js | 18+ |
208
+ | Claude Code CLI | latest — `npm install -g @anthropic-ai/claude-code` |
209
+ | Codex CLI | latest — `npm install -g @openai/codex` |
210
+ | GitHub CLI | 2.65+ — `brew install gh` |
211
+
212
+ `GITHUB_TOKEN` is derived automatically from `gh auth login`. No manual export needed.
213
+
214
+ ---
215
+
216
+ ## Documentation
217
+
218
+ | | |
219
+ |---|---|
220
+ | **[get-started.md](./get-started.md)** | Full setup guide — prerequisites, all flags, complete config reference, FAQ |
221
+ | **[crosscheck.config.example.yml](./crosscheck.config.example.yml)** | Annotated config with every option |
222
+ | **[CHANGELOG.md](./CHANGELOG.md)** | Release notes |
223
+
224
+ ---
225
+
226
+ ## Contributing
227
+
228
+ Issues and PRs welcome at [github.com/humanbased-ai/crosscheck](https://github.com/humanbased-ai/crosscheck).
229
+
230
+ ---
231
+
232
+ ## License
233
+
234
+ [MIT](./LICENSE) — Copyright (c) 2025–2026 HumanBased AI.