@humanbased/crosscheck 1.2.0 → 1.3.0-beta.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +182 -375
  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/assets/skills/code-review/.crosscheck-skill.json +9 -0
  10. package/assets/skills/code-review/LICENSE +21 -0
  11. package/assets/skills/code-review/SKILL.md +89 -0
  12. package/assets/skills/code-review/agents/openai.yaml +3 -0
  13. package/assets/skills/code-review-skill/.crosscheck-skill.json +9 -0
  14. package/assets/skills/code-review-skill/LICENSE +21 -0
  15. package/assets/skills/code-review-skill/SKILL.md +231 -0
  16. package/assets/skills/code-review-skill/assets/pr-review-template.md +137 -0
  17. package/assets/skills/code-review-skill/assets/review-checklist.md +123 -0
  18. package/assets/skills/code-review-skill/reference/angular.md +768 -0
  19. package/assets/skills/code-review-skill/reference/architecture-review-guide.md +472 -0
  20. package/assets/skills/code-review-skill/reference/c.md +890 -0
  21. package/assets/skills/code-review-skill/reference/code-quality-universal.md +488 -0
  22. package/assets/skills/code-review-skill/reference/code-review-best-practices.md +136 -0
  23. package/assets/skills/code-review-skill/reference/common-bugs-checklist.md +286 -0
  24. package/assets/skills/code-review-skill/reference/cpp.md +893 -0
  25. package/assets/skills/code-review-skill/reference/cross-cutting/async-concurrency-patterns.md +515 -0
  26. package/assets/skills/code-review-skill/reference/cross-cutting/error-handling-principles.md +492 -0
  27. package/assets/skills/code-review-skill/reference/cross-cutting/n-plus-one-queries.md +309 -0
  28. package/assets/skills/code-review-skill/reference/cross-cutting/sql-injection-prevention.md +308 -0
  29. package/assets/skills/code-review-skill/reference/cross-cutting/xss-prevention.md +264 -0
  30. package/assets/skills/code-review-skill/reference/csharp.md +525 -0
  31. package/assets/skills/code-review-skill/reference/css-less-sass.md +661 -0
  32. package/assets/skills/code-review-skill/reference/django.md +985 -0
  33. package/assets/skills/code-review-skill/reference/fastapi.md +580 -0
  34. package/assets/skills/code-review-skill/reference/go.md +993 -0
  35. package/assets/skills/code-review-skill/reference/java.md +409 -0
  36. package/assets/skills/code-review-skill/reference/java8.md +586 -0
  37. package/assets/skills/code-review-skill/reference/kotlin.md +1018 -0
  38. package/assets/skills/code-review-skill/reference/nestjs.md +593 -0
  39. package/assets/skills/code-review-skill/reference/performance-review-guide.md +816 -0
  40. package/assets/skills/code-review-skill/reference/php.md +684 -0
  41. package/assets/skills/code-review-skill/reference/python.md +1073 -0
  42. package/assets/skills/code-review-skill/reference/qt.md +757 -0
  43. package/assets/skills/code-review-skill/reference/react.md +871 -0
  44. package/assets/skills/code-review-skill/reference/ruby.md +964 -0
  45. package/assets/skills/code-review-skill/reference/rust.md +846 -0
  46. package/assets/skills/code-review-skill/reference/security-review-guide.md +494 -0
  47. package/assets/skills/code-review-skill/reference/svelte.md +1064 -0
  48. package/assets/skills/code-review-skill/reference/swift.md +936 -0
  49. package/assets/skills/code-review-skill/reference/typescript.md +1016 -0
  50. package/assets/skills/code-review-skill/reference/vue.md +924 -0
  51. package/assets/skills/code-review-skill/reference/zig.md +440 -0
  52. package/assets/skills/code-review-skill/scripts/pr-analyzer.py +435 -0
  53. package/assets/skills/code-review-skill/scripts/test_pr_analyzer.py +380 -0
  54. package/assets/skills/codebase-design/.crosscheck-skill.json +9 -0
  55. package/assets/skills/codebase-design/DEEPENING.md +37 -0
  56. package/assets/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  57. package/assets/skills/codebase-design/LICENSE +21 -0
  58. package/assets/skills/codebase-design/SKILL.md +114 -0
  59. package/assets/skills/codebase-design/agents/openai.yaml +3 -0
  60. package/assets/skills/diagnosing-bugs/.crosscheck-skill.json +9 -0
  61. package/assets/skills/diagnosing-bugs/LICENSE +21 -0
  62. package/assets/skills/diagnosing-bugs/SKILL.md +134 -0
  63. package/assets/skills/diagnosing-bugs/agents/openai.yaml +3 -0
  64. package/assets/skills/diagnosing-bugs/scripts/hitl-loop.template.sh +41 -0
  65. package/crosscheck.config.example.yml +101 -9
  66. package/dist/__tests__/board.test.js +11 -0
  67. package/dist/__tests__/board.test.js.map +1 -1
  68. package/dist/__tests__/can-write-verdict.test.d.ts +2 -0
  69. package/dist/__tests__/can-write-verdict.test.d.ts.map +1 -0
  70. package/dist/__tests__/can-write-verdict.test.js +31 -0
  71. package/dist/__tests__/can-write-verdict.test.js.map +1 -0
  72. package/dist/__tests__/codex.test.js +14 -27
  73. package/dist/__tests__/codex.test.js.map +1 -1
  74. package/dist/__tests__/comment-bodies.test.js +49 -1
  75. package/dist/__tests__/comment-bodies.test.js.map +1 -1
  76. package/dist/__tests__/conflict-resolve.test.js +44 -1
  77. package/dist/__tests__/conflict-resolve.test.js.map +1 -1
  78. package/dist/__tests__/fix.test.js +33 -0
  79. package/dist/__tests__/fix.test.js.map +1 -1
  80. package/dist/__tests__/linear-branding.test.d.ts +2 -0
  81. package/dist/__tests__/linear-branding.test.d.ts.map +1 -0
  82. package/dist/__tests__/linear-branding.test.js +156 -0
  83. package/dist/__tests__/linear-branding.test.js.map +1 -0
  84. package/dist/__tests__/linear-client.test.d.ts +2 -0
  85. package/dist/__tests__/linear-client.test.d.ts.map +1 -0
  86. package/dist/__tests__/linear-client.test.js +120 -0
  87. package/dist/__tests__/linear-client.test.js.map +1 -0
  88. package/dist/__tests__/linear-comment.test.d.ts +2 -0
  89. package/dist/__tests__/linear-comment.test.d.ts.map +1 -0
  90. package/dist/__tests__/linear-comment.test.js +151 -0
  91. package/dist/__tests__/linear-comment.test.js.map +1 -0
  92. package/dist/__tests__/linear-identity.test.d.ts +2 -0
  93. package/dist/__tests__/linear-identity.test.d.ts.map +1 -0
  94. package/dist/__tests__/linear-identity.test.js +253 -0
  95. package/dist/__tests__/linear-identity.test.js.map +1 -0
  96. package/dist/__tests__/linear-notify.test.d.ts +2 -0
  97. package/dist/__tests__/linear-notify.test.d.ts.map +1 -0
  98. package/dist/__tests__/linear-notify.test.js +144 -0
  99. package/dist/__tests__/linear-notify.test.js.map +1 -0
  100. package/dist/__tests__/linear-ref.test.d.ts +2 -0
  101. package/dist/__tests__/linear-ref.test.d.ts.map +1 -0
  102. package/dist/__tests__/linear-ref.test.js +261 -0
  103. package/dist/__tests__/linear-ref.test.js.map +1 -0
  104. package/dist/__tests__/linear-test-ref.test.d.ts +2 -0
  105. package/dist/__tests__/linear-test-ref.test.d.ts.map +1 -0
  106. package/dist/__tests__/linear-test-ref.test.js +81 -0
  107. package/dist/__tests__/linear-test-ref.test.js.map +1 -0
  108. package/dist/__tests__/linear-verify.test.d.ts +2 -0
  109. package/dist/__tests__/linear-verify.test.d.ts.map +1 -0
  110. package/dist/__tests__/linear-verify.test.js +132 -0
  111. package/dist/__tests__/linear-verify.test.js.map +1 -0
  112. package/dist/__tests__/linear-worker.test.d.ts +2 -0
  113. package/dist/__tests__/linear-worker.test.d.ts.map +1 -0
  114. package/dist/__tests__/linear-worker.test.js +83 -0
  115. package/dist/__tests__/linear-worker.test.js.map +1 -0
  116. package/dist/__tests__/linear-write-possible.test.d.ts +2 -0
  117. package/dist/__tests__/linear-write-possible.test.d.ts.map +1 -0
  118. package/dist/__tests__/linear-write-possible.test.js +30 -0
  119. package/dist/__tests__/linear-write-possible.test.js.map +1 -0
  120. package/dist/__tests__/onboard-preservation.test.js +59 -3
  121. package/dist/__tests__/onboard-preservation.test.js.map +1 -1
  122. package/dist/__tests__/optimize.test.js +2 -0
  123. package/dist/__tests__/optimize.test.js.map +1 -1
  124. package/dist/__tests__/repo-picker.test.js +7 -1
  125. package/dist/__tests__/repo-picker.test.js.map +1 -1
  126. package/dist/__tests__/repository-guidance.test.d.ts +2 -0
  127. package/dist/__tests__/repository-guidance.test.d.ts.map +1 -0
  128. package/dist/__tests__/repository-guidance.test.js +107 -0
  129. package/dist/__tests__/repository-guidance.test.js.map +1 -0
  130. package/dist/__tests__/review-comment-body.test.js +35 -0
  131. package/dist/__tests__/review-comment-body.test.js.map +1 -1
  132. package/dist/__tests__/review-models.test.js +19 -3
  133. package/dist/__tests__/review-models.test.js.map +1 -1
  134. package/dist/__tests__/review-strategy.test.d.ts +2 -0
  135. package/dist/__tests__/review-strategy.test.d.ts.map +1 -0
  136. package/dist/__tests__/review-strategy.test.js +397 -0
  137. package/dist/__tests__/review-strategy.test.js.map +1 -0
  138. package/dist/__tests__/runner.test.js +29 -1
  139. package/dist/__tests__/runner.test.js.map +1 -1
  140. package/dist/__tests__/skill-attribution.test.d.ts +2 -0
  141. package/dist/__tests__/skill-attribution.test.d.ts.map +1 -0
  142. package/dist/__tests__/skill-attribution.test.js +53 -0
  143. package/dist/__tests__/skill-attribution.test.js.map +1 -0
  144. package/dist/__tests__/skill-broker.test.d.ts +2 -0
  145. package/dist/__tests__/skill-broker.test.d.ts.map +1 -0
  146. package/dist/__tests__/skill-broker.test.js +144 -0
  147. package/dist/__tests__/skill-broker.test.js.map +1 -0
  148. package/dist/__tests__/skill-catalog.test.d.ts +2 -0
  149. package/dist/__tests__/skill-catalog.test.d.ts.map +1 -0
  150. package/dist/__tests__/skill-catalog.test.js +40 -0
  151. package/dist/__tests__/skill-catalog.test.js.map +1 -0
  152. package/dist/__tests__/skill-installer.test.d.ts +2 -0
  153. package/dist/__tests__/skill-installer.test.d.ts.map +1 -0
  154. package/dist/__tests__/skill-installer.test.js +96 -0
  155. package/dist/__tests__/skill-installer.test.js.map +1 -0
  156. package/dist/__tests__/skills-config.test.d.ts +2 -0
  157. package/dist/__tests__/skills-config.test.d.ts.map +1 -0
  158. package/dist/__tests__/skills-config.test.js +12 -0
  159. package/dist/__tests__/skills-config.test.js.map +1 -0
  160. package/dist/cli.js +29 -0
  161. package/dist/cli.js.map +1 -1
  162. package/dist/commands/linear-test.d.ts +18 -0
  163. package/dist/commands/linear-test.d.ts.map +1 -0
  164. package/dist/commands/linear-test.js +130 -0
  165. package/dist/commands/linear-test.js.map +1 -0
  166. package/dist/commands/onboard.d.ts +36 -3
  167. package/dist/commands/onboard.d.ts.map +1 -1
  168. package/dist/commands/onboard.js +233 -42
  169. package/dist/commands/onboard.js.map +1 -1
  170. package/dist/commands/review.d.ts.map +1 -1
  171. package/dist/commands/review.js +65 -6
  172. package/dist/commands/review.js.map +1 -1
  173. package/dist/commands/run.d.ts.map +1 -1
  174. package/dist/commands/run.js +45 -7
  175. package/dist/commands/run.js.map +1 -1
  176. package/dist/commands/skill.d.ts +2 -0
  177. package/dist/commands/skill.d.ts.map +1 -0
  178. package/dist/commands/skill.js +16 -0
  179. package/dist/commands/skill.js.map +1 -0
  180. package/dist/commands/status.d.ts.map +1 -1
  181. package/dist/commands/status.js +53 -1
  182. package/dist/commands/status.js.map +1 -1
  183. package/dist/commands/watch.d.ts.map +1 -1
  184. package/dist/commands/watch.js +90 -12
  185. package/dist/commands/watch.js.map +1 -1
  186. package/dist/config/loader.d.ts +3 -1
  187. package/dist/config/loader.d.ts.map +1 -1
  188. package/dist/config/loader.js +13 -0
  189. package/dist/config/loader.js.map +1 -1
  190. package/dist/config/review-model-tiers.json +3 -3
  191. package/dist/config/review-strategy.json +204 -0
  192. package/dist/config/schema.d.ts +261 -15
  193. package/dist/config/schema.d.ts.map +1 -1
  194. package/dist/config/schema.js +90 -8
  195. package/dist/config/schema.js.map +1 -1
  196. package/dist/github/client.d.ts +21 -1
  197. package/dist/github/client.d.ts.map +1 -1
  198. package/dist/github/client.js +46 -7
  199. package/dist/github/client.js.map +1 -1
  200. package/dist/github/webhook.d.ts +4 -0
  201. package/dist/github/webhook.d.ts.map +1 -1
  202. package/dist/github/webhook.js.map +1 -1
  203. package/dist/issues/ticket-ref.d.ts.map +1 -1
  204. package/dist/issues/ticket-ref.js +6 -5
  205. package/dist/issues/ticket-ref.js.map +1 -1
  206. package/dist/lib/annotation.d.ts +7 -0
  207. package/dist/lib/annotation.d.ts.map +1 -1
  208. package/dist/lib/annotation.js +11 -1
  209. package/dist/lib/annotation.js.map +1 -1
  210. package/dist/lib/board.d.ts +3 -0
  211. package/dist/lib/board.d.ts.map +1 -1
  212. package/dist/lib/board.js +4 -2
  213. package/dist/lib/board.js.map +1 -1
  214. package/dist/lib/clone.d.ts +1 -0
  215. package/dist/lib/clone.d.ts.map +1 -1
  216. package/dist/lib/clone.js +32 -10
  217. package/dist/lib/clone.js.map +1 -1
  218. package/dist/lib/comment-bodies.d.ts +37 -0
  219. package/dist/lib/comment-bodies.d.ts.map +1 -1
  220. package/dist/lib/comment-bodies.js +47 -9
  221. package/dist/lib/comment-bodies.js.map +1 -1
  222. package/dist/lib/repo-picker.d.ts +3 -0
  223. package/dist/lib/repo-picker.d.ts.map +1 -1
  224. package/dist/lib/repo-picker.js +45 -9
  225. package/dist/lib/repo-picker.js.map +1 -1
  226. package/dist/lib/repository-guidance.d.ts +2 -0
  227. package/dist/lib/repository-guidance.d.ts.map +1 -0
  228. package/dist/lib/repository-guidance.js +55 -0
  229. package/dist/lib/repository-guidance.js.map +1 -0
  230. package/dist/lib/review-models.d.ts +15 -2
  231. package/dist/lib/review-models.d.ts.map +1 -1
  232. package/dist/lib/review-models.js +26 -6
  233. package/dist/lib/review-models.js.map +1 -1
  234. package/dist/lib/review-strategy.d.ts +92 -0
  235. package/dist/lib/review-strategy.d.ts.map +1 -0
  236. package/dist/lib/review-strategy.js +282 -0
  237. package/dist/lib/review-strategy.js.map +1 -0
  238. package/dist/lib/runner.d.ts +92 -0
  239. package/dist/lib/runner.d.ts.map +1 -1
  240. package/dist/lib/runner.js +470 -54
  241. package/dist/lib/runner.js.map +1 -1
  242. package/dist/lib/workflow.d.ts +9 -0
  243. package/dist/lib/workflow.d.ts.map +1 -1
  244. package/dist/lib/workflow.js +20 -0
  245. package/dist/lib/workflow.js.map +1 -1
  246. package/dist/linear/client.d.ts +18 -0
  247. package/dist/linear/client.d.ts.map +1 -0
  248. package/dist/linear/client.js +67 -0
  249. package/dist/linear/client.js.map +1 -0
  250. package/dist/linear/comment.d.ts +20 -0
  251. package/dist/linear/comment.d.ts.map +1 -0
  252. package/dist/linear/comment.js +57 -0
  253. package/dist/linear/comment.js.map +1 -0
  254. package/dist/linear/identity.d.ts +59 -0
  255. package/dist/linear/identity.d.ts.map +1 -0
  256. package/dist/linear/identity.js +187 -0
  257. package/dist/linear/identity.js.map +1 -0
  258. package/dist/linear/notify.d.ts +35 -0
  259. package/dist/linear/notify.d.ts.map +1 -0
  260. package/dist/linear/notify.js +76 -0
  261. package/dist/linear/notify.js.map +1 -0
  262. package/dist/linear/ref.d.ts +13 -0
  263. package/dist/linear/ref.d.ts.map +1 -0
  264. package/dist/linear/ref.js +90 -0
  265. package/dist/linear/ref.js.map +1 -0
  266. package/dist/linear/verify.d.ts +26 -0
  267. package/dist/linear/verify.d.ts.map +1 -0
  268. package/dist/linear/verify.js +67 -0
  269. package/dist/linear/verify.js.map +1 -0
  270. package/dist/reviewers/claude.d.ts +4 -1
  271. package/dist/reviewers/claude.d.ts.map +1 -1
  272. package/dist/reviewers/claude.js +39 -7
  273. package/dist/reviewers/claude.js.map +1 -1
  274. package/dist/reviewers/codex.d.ts +3 -1
  275. package/dist/reviewers/codex.d.ts.map +1 -1
  276. package/dist/reviewers/codex.js +76 -70
  277. package/dist/reviewers/codex.js.map +1 -1
  278. package/dist/reviewers/conflict-resolve.d.ts +3 -1
  279. package/dist/reviewers/conflict-resolve.d.ts.map +1 -1
  280. package/dist/reviewers/conflict-resolve.js +21 -6
  281. package/dist/reviewers/conflict-resolve.js.map +1 -1
  282. package/dist/reviewers/fix.d.ts +5 -2
  283. package/dist/reviewers/fix.d.ts.map +1 -1
  284. package/dist/reviewers/fix.js +26 -10
  285. package/dist/reviewers/fix.js.map +1 -1
  286. package/dist/skills/attribution.d.ts +4 -0
  287. package/dist/skills/attribution.d.ts.map +1 -0
  288. package/dist/skills/attribution.js +14 -0
  289. package/dist/skills/attribution.js.map +1 -0
  290. package/dist/skills/broker-server.d.ts +2 -0
  291. package/dist/skills/broker-server.d.ts.map +1 -0
  292. package/dist/skills/broker-server.js +17 -0
  293. package/dist/skills/broker-server.js.map +1 -0
  294. package/dist/skills/broker.d.ts +42 -0
  295. package/dist/skills/broker.d.ts.map +1 -0
  296. package/dist/skills/broker.js +285 -0
  297. package/dist/skills/broker.js.map +1 -0
  298. package/dist/skills/catalog.d.ts +28 -0
  299. package/dist/skills/catalog.d.ts.map +1 -0
  300. package/dist/skills/catalog.js +104 -0
  301. package/dist/skills/catalog.js.map +1 -0
  302. package/dist/skills/installer.d.ts +10 -0
  303. package/dist/skills/installer.d.ts.map +1 -0
  304. package/dist/skills/installer.js +138 -0
  305. package/dist/skills/installer.js.map +1 -0
  306. package/dist/skills/integrity.d.ts +4 -0
  307. package/dist/skills/integrity.d.ts.map +1 -0
  308. package/dist/skills/integrity.js +36 -0
  309. package/dist/skills/integrity.js.map +1 -0
  310. package/docs/dynamic-thoroughness.md +738 -0
  311. package/docs/linear-identity-contract.md +139 -0
  312. package/docs/linear-identity.md +293 -0
  313. package/get-started.md +207 -11
  314. package/package.json +4 -3
package/get-started.md CHANGED
@@ -22,6 +22,7 @@
22
22
  - [Multi-PR syntax](#multi-pr-syntax)
23
23
  - [watch](#crosscheck-watch)
24
24
  - [status](#crosscheck-status)
25
+ - [skill install](#crosscheck-skill-install-source)
25
26
  - [diagnose](#crosscheck-diagnose)
26
27
  - [optimize](#crosscheck-optimize)
27
28
  - [impact](#crosscheck-impact)
@@ -156,6 +157,52 @@ export LINEAR_API_KEY=lin_api_...
156
157
  If it's unset while enrichment is on, crosscheck just skips enrichment and
157
158
  reviews the diff as usual — it never errors.
158
159
 
160
+ ### Linear identity — for writing back to Linear (optional)
161
+
162
+ Separate from enrichment above, which only *reads*. When `linear.enabled: true`,
163
+ crosscheck mirrors each review verdict onto the PR's Linear issue.
164
+
165
+ `crosscheck onboard` asks which rung of the attribution ladder you want and writes
166
+ the config for you.
167
+
168
+ **Start with `api_key`.** It reuses `LINEAR_API_KEY`, works immediately, and posts
169
+ the comment — the feature is fully functional. Comments attribute to your Linear
170
+ account, led by a `🤖 crosscheck · <model>` signature line.
171
+
172
+ Climb to `client_credentials` when more than one thing writes to your workspace and
173
+ you need them told apart. It uses an OAuth app — one per workspace, not per user —
174
+ so comments post as crosscheck itself with its own icon:
175
+
176
+ ```bash
177
+ export LINEAR_CLIENT_ID=...
178
+ export LINEAR_CLIENT_SECRET=...
179
+ ```
180
+
181
+ A failed T1 token mint aborts the run rather than falling back to `api_key` —
182
+ a silent downgrade would put agent writes back under a human's name.
183
+
184
+ `crosscheck onboard` walks you through the choice:
185
+
186
+ <p align="center">
187
+ <img src="./assets/linear-onboard.svg" alt="crosscheck onboard — choosing a Linear attribution rung" width="700" />
188
+ </p>
189
+
190
+ Before opening a PR, `crosscheck linear-test` exercises the whole path and posts nothing —
191
+ identity, issue lookup, verdict filter, and the exact comment body:
192
+
193
+ <p align="center">
194
+ <img src="./assets/linear-test.svg" alt="crosscheck linear-test — dry-run verification" width="700" />
195
+ </p>
196
+
197
+ `crosscheck status` shows which rung is active whenever `linear.enabled` is true:
198
+
199
+ <p align="center">
200
+ <img src="./assets/linear-status.svg" alt="crosscheck status — the Linear identity section" width="620" />
201
+ </p>
202
+
203
+ Full walkthrough, including the two Linear UI gotchas that trip people up:
204
+ [docs/linear-identity.md](docs/linear-identity.md).
205
+
159
206
  ---
160
207
 
161
208
  ## Step 1 — Check your setup
@@ -345,6 +392,8 @@ crosscheck onboard --reconfigure # re-run setup even if config already exists
345
392
 
346
393
  **Step 6 — Review quality.** Choose the speed/thoroughness tier for review prompts and reviewer timeouts.
347
394
 
395
+ **Step 6.5 — Agent skills.** Choose which preloaded or custom-installed skills are enabled for coding agents. New setups preselect `code-review-skill (by @awesome-skills, MIT)` and `diagnosing-bugs (by @mattpocock, MIT)`. Matt Pocock's `code-review` and `codebase-design` are available but off by default. Re-running onboard preserves your selection. Skills are made available across workflow operations, and each skill's description plus the coding agent decides when it applies.
396
+
348
397
  **Step 7 — Workflow pipeline.** Choose what happens after a review:
349
398
 
350
399
  ```
@@ -398,6 +447,12 @@ crosscheck onboard
398
447
  [1] fast [2] balanced [3] thorough
399
448
  Choice [2]: 2
400
449
 
450
+ Step 6.5 — agent skills
451
+ [ ] code-review (by @mattpocock, MIT)
452
+ [x] code-review-skill (by @awesome-skills, MIT)
453
+ [x] codebase-design (by @mattpocock, MIT)
454
+ [x] diagnosing-bugs (by @mattpocock, MIT)
455
+
401
456
  Step 7 — workflow pipeline
402
457
  [1] review only [2] review → fix [3] review → fix → re-check
403
458
  Choice [2]: 3
@@ -721,6 +776,8 @@ crosscheck status
721
776
  Config
722
777
  mode cross-vendor
723
778
  quality tier balanced
779
+ installed skills code-review (by @mattpocock, MIT), code-review-skill (by @awesome-skills, MIT), codebase-design (by @mattpocock, MIT), diagnosing-bugs (by @mattpocock, MIT)
780
+ enabled skills code-review-skill (by @awesome-skills, MIT), diagnosing-bugs (by @mattpocock, MIT)
724
781
  codex auth subscription
725
782
  claude model sonnet
726
783
  per-review budget $2.00/review
@@ -744,6 +801,41 @@ crosscheck status
744
801
 
745
802
  ---
746
803
 
804
+ ### `crosscheck skill install <source>`
805
+
806
+ Installs an Agent Skill from a Git URL or local directory into `~/.crosscheck/skills`. Crosscheck validates `SKILL.md`, rejects unsafe names and symbolic links, and records source, revision, author, license, and package integrity. Installation does not enable a skill automatically.
807
+
808
+ Crosscheck itself ships with this preloaded catalog:
809
+
810
+ | Skill | Onboarding default | Best fit |
811
+ |---|---:|---|
812
+ | [`code-review-skill`](https://github.com/awesome-skills/code-review-skill) (by `@awesome-skills`, MIT) | On | General default: broad language, correctness, security, performance, and architecture coverage |
813
+ | [`codebase-design`](https://github.com/mattpocock/skills/tree/main/skills/engineering/codebase-design) (by `@mattpocock`, MIT) | On | Architecture-heavy changes: deep modules, small interfaces, clean seams, and testability |
814
+ | [`diagnosing-bugs`](https://github.com/mattpocock/skills/tree/main/skills/engineering/diagnosing-bugs) (by `@mattpocock`, MIT) | On | Hard bugs and regressions: reproducible signals, ranked hypotheses, and regression evidence |
815
+ | [`code-review`](https://github.com/mattpocock/skills/tree/main/skills/engineering/code-review) (by `@mattpocock`, MIT) | Off | Evidence-rich repositories: separately checks documented standards and issue/PRD fidelity |
816
+
817
+ `code-review` and `code-review-skill` are competing review baselines. The onboarding picker highlights the conflict and will not enable one until the selected counterpart is deselected; the runtime broker also rejects activation of a second baseline. The other bundled skills are complementary.
818
+
819
+ ```bash
820
+ crosscheck skill install https://github.com/owner/my-skill.git
821
+ crosscheck skill install /path/to/my-skill
822
+ crosscheck onboard # enable installed skills
823
+ ```
824
+
825
+ The Git repository or local directory must have `SKILL.md` at its root. For a skill nested in a monorepo, clone it and pass the nested local directory.
826
+
827
+ `crosscheck status` distinguishes the full installed catalog from the enabled selection and renders attributed identities as `skill-name (by @author, license)`.
828
+
829
+ At runtime, Crosscheck distinguishes three states: **installed** skills are in the catalog, **enabled** skills are available to agents, and **activated** skills were actually loaded for one workflow step. A skill becomes activated only when the agent successfully calls the Crosscheck broker's `activate_skill` tool for an enabled skill and receives its `SKILL.md` instructions. Listing enabled skills, seeing a skill description, or merely enabling a skill does not count.
830
+
831
+ Activation is scoped to one step session, such as review, fix, recheck, or conflict resolution. Repeated activation in that session is idempotent, and the receipt survives retries or a reviewer fallback within the same step. Every later step gets a separate empty session, and Crosscheck deletes all step sessions when the workflow run ends. The terminal, logs, and PR comment preserve the completed step's attribution as historical evidence; they do not pre-activate future sessions. For example: `code-review-skill (by @awesome-skills, MIT)`.
832
+
833
+ Upgrading from an earlier Crosscheck release is opt-in: existing configs default to `skills.enabled: []`. Re-run `crosscheck onboard` to choose the recommended bundle or any additional installed skills.
834
+
835
+ Review and recheck also honor repository practices in `AGENTS.md` and `CLAUDE.md`. These repository-defined practices take precedence over bundled skill advice. Crosscheck reads the root files plus any nested files whose directory contains a changed path, orders them from broadest to most specific, and lets nested guidance override root guidance. It reads these files from the PR's base branch and disables vendor-native discovery for the run, so guidance added or modified by the PR cannot influence its own review.
836
+
837
+ ---
838
+
747
839
  ### `crosscheck diagnose`
748
840
 
749
841
  Reads `~/.crosscheck/logs/` and surfaces failure patterns, reviewer performance, and improvement suggestions.
@@ -965,7 +1057,7 @@ If no errors are found in recent logs, crosscheck prints `No errors found in rec
965
1057
 
966
1058
  On re-runs, `onboard` updates only the fields it collected answers for. Everything else survives unchanged.
967
1059
 
968
- **Updated on every run:** `deployment`, `orgs`, `repos`, `mode`, `clone_protocol`, `vendors.*.enabled`, `vendors.*.effort`, `quality.tier`, `tunnel.*`, `post_review.auto_fix.*`
1060
+ **Updated on every run:** `deployment`, `orgs`, `repos`, `mode`, `clone_protocol`, `vendors.*.enabled`, `vendors.*.effort`, `quality.tier`, `skills.enabled`, `tunnel.*`, `post_review.auto_fix.*`
969
1061
 
970
1062
  **Never touched by onboard:** per-repo overrides in `~/.crosscheck/workflows/` (owned by `crosscheck alter`), and `~/.crosscheck/workflow.yml` after its first write
971
1063
 
@@ -1015,7 +1107,8 @@ vendors:
1015
1107
  codex:
1016
1108
  enabled: true
1017
1109
  auth: subscription # subscription | api-key
1018
- model: gpt-5.6-terra # only used when auth: api-key
1110
+ model: gpt-5.6-terra # pins the review model; unset = tier model (api-key) / CLI default (subscription)
1111
+ effort: medium # low | medium | high | xhigh | max | ultra (ultra: terra/sol only)
1019
1112
  # timeout_sec: 1200 # max seconds per CLI call; unset = tier-based (300/600/1200)
1020
1113
 
1021
1114
  claude:
@@ -1026,7 +1119,8 @@ vendors:
1026
1119
 
1027
1120
  # ── Quality ───────────────────────────────────────────────────────────────────
1028
1121
  quality:
1029
- tier: balanced # fast | balanced | thorough
1122
+ mode: smart # smart (default) | fixed see Review thoroughness
1123
+ tier: balanced # fast | balanced | thorough (fallback under smart)
1030
1124
  focus: # narrows review scope (optional)
1031
1125
  - security
1032
1126
  - types
@@ -1034,6 +1128,16 @@ quality:
1034
1128
  custom_prompt: | # appended to every review prompt
1035
1129
  Be concise. Flag only issues that would block a merge.
1036
1130
 
1131
+ # ── Agent skills ──────────────────────────────────────────────────────────────
1132
+ # Enabled means available to every coding-agent operation. The skill description
1133
+ # and agent decide whether to activate it for a particular step.
1134
+ skills:
1135
+ enabled:
1136
+ - code-review-skill # recommended · @awesome-skills, MIT
1137
+ - diagnosing-bugs # recommended · @mattpocock, MIT
1138
+ # - code-review # preloaded, opt-in · @mattpocock, MIT
1139
+ # - codebase-design # preloaded, opt-in · @mattpocock, MIT
1140
+
1037
1141
  # ── Budget ────────────────────────────────────────────────────────────────────
1038
1142
  budget:
1039
1143
  codex_monthly_usd: 20 # null = unlimited; only applies when auth: api-key
@@ -1144,15 +1248,93 @@ post_review:
1144
1248
  server:
1145
1249
  port: 7891
1146
1250
  webhook_path: /webhook
1147
- ```
1251
+
1252
+ linear: # write review verdicts back to a Linear issue (opt-in)
1253
+ enabled: false
1254
+ auth:
1255
+ mode: api_key # api_key | client_credentials
1256
+ api_key_env: LINEAR_API_KEY
1257
+ client_id_env: LINEAR_CLIENT_ID
1258
+ client_secret_env: LINEAR_CLIENT_SECRET
1259
+ scopes: "read,write" # comma-separated; initiative:* are separate scopes
1260
+ identity:
1261
+ actor: crosscheck
1262
+ signature: "🤖 {actor} · {model}" # {actor} {product} {model} {reviewer} {icon}
1263
+ icon_url: "" # rendered where {icon} appears; app avatar is preferred
1264
+ per_step_actor: true # crosscheck/review vs crosscheck/fix in Linear
1265
+ comment_on: # verdicts mirrored to the issue (default omits APPROVE)
1266
+ - NEEDS_WORK
1267
+ - BLOCK
1268
+ team_keys: [] # e.g. [IN] — required to match bare refs like IN-42
1269
+ ```
1270
+
1271
+ ### Review thoroughness
1272
+
1273
+ **`quality.mode: smart` is the default.** Crosscheck classifies each PR from its
1274
+ changed-file list and adjusts model and effort to match, rather than applying one
1275
+ tier to everything. Classification runs on the already-cloned working copy, so it
1276
+ costs one `git diff` and no API call. Set `mode: fixed` to opt out.
1277
+
1278
+ | # | PR class | Detected by | Tier | Steps |
1279
+ |---|---|---|---|---|
1280
+ | 1 | Generated / vendored | every file is a lockfile or build output | — | **PR skipped** |
1281
+ | 2 | Security / data-critical | auth, crypto, payment, migration paths; `risk:T3`; hotfix→default | `thorough` | full loop |
1282
+ | 3 | Deletion-only | ≤ 5 additions with ≥ 20 deletions | `fast` | review |
1283
+ | 4 | Docs / spec | ≥ 50% Markdown | `balanced` | review |
1284
+ | 5 | Test-only | every file is a test | `fast` | review, fix |
1285
+ | 6 | Config / infra | ≥ 50% config, no source | `balanced` | full loop |
1286
+ | 7 | Trivial | ≤ 3 files, ≤ 150 lines | `fast` | review, fix |
1287
+ | 8 | Standard | everything else | `balanced` | full loop |
1288
+
1289
+ First match wins, and security sits second so it dominates every cheapening rule
1290
+ below it — a deletion that removes auth code, or a two-file migration, is never
1291
+ routed to `fast`.
1292
+
1293
+ The class's step set narrows the configured pipeline and never widens it, so a
1294
+ repo pinned to review-only with `crosscheck alter` stays review-only. Rounds past
1295
+ the first escalate on measured non-convergence: effort rises where the model
1296
+ supports it, the tier is promoted where it does not.
1297
+
1298
+ Note that classes 3 and 4 narrow to `review` alone, which also drops
1299
+ `conflict-resolve` — review-only never touches code, and auto-conflict-resolve
1300
+ is code modification. That rule normally follows an operator's explicit
1301
+ `crosscheck alter --review-only`; under smart mode the *classifier* can reach it
1302
+ too, so a docs-only or deletion-only PR with a merge conflict is reviewed but not
1303
+ auto-resolved. Set `mode: fixed` if you want auto-conflict-resolve on every PR.
1304
+
1305
+ Every comment cites the policy that produced it:
1306
+
1307
+ ```
1308
+ <!-- crosscheck: … verdict=BLOCK strategy=1.1.0 class=risky tier=thorough … -->
1309
+ ```
1310
+
1311
+ > **Leave `vendors.*.model` unset under smart mode.** An explicit model outranks
1312
+ > the strategy, so pinning one makes per-PR selection a no-op. When that happens
1313
+ > crosscheck **withholds** the tier from the comment rather than citing one that
1314
+ > did not run. `crosscheck onboard` clears the pin — and prints what it cleared —
1315
+ > when you choose smart.
1316
+
1317
+ Verify the policy is current with `npm run verify:strategy`. Full rationale:
1318
+ [docs/dynamic-thoroughness.md](./docs/dynamic-thoroughness.md).
1148
1319
 
1149
1320
  ### Quality tiers
1150
1321
 
1151
- | Tier | Speed | Depth | Best for |
1152
- |---|---|---|---|
1153
- | `fast` | ~10s | Top issues only | High-volume repos, draft PRs |
1154
- | `balanced` | ~30s | Full review, all issues explained | Default for most teams |
1155
- | `thorough` | ~60–90s | Deep multi-pass, architecture + security | Before merging to main |
1322
+ Under `fixed`, the tier applies to every call. Under `smart`, it is the fallback
1323
+ when a PR's file list cannot be read.
1324
+
1325
+ | Tier | Claude | Codex | Cost per review | Best for |
1326
+ |---|---|---|---|---|
1327
+ | `fast` | Haiku 4.5 | GPT-5.6 Luna | $0.24 · $0.06 | High-volume repos, draft PRs |
1328
+ | `balanced` | Sonnet 5 | GPT-5.6 Terra | $0.72 · $0.58 | Default for most teams |
1329
+ | `thorough` | Opus 5 | GPT-5.6 Sol | $1.20 · $1.44 | Before merging to main |
1330
+
1331
+ Cost is output-token cost at 48k output tokens, the measured median for one
1332
+ review. A review is an agentic session, not a single call — expect 10–16 minutes
1333
+ of wall clock (median 643s, p90 984s across 43 logged runs). Tier changes depth
1334
+ and the subprocess timeout, not seconds-scale latency.
1335
+
1336
+ `claude-fable-5` is banned from review: 2× Opus 5's price for a lower coding
1337
+ benchmark score.
1156
1338
 
1157
1339
  ### Issue enrichment
1158
1340
 
@@ -1274,7 +1456,9 @@ If none match, origin is `human` and the PR is skipped in cross-vendor mode.
1274
1456
  codex review --base <base-branch> --title "<pr-title>"
1275
1457
  ```
1276
1458
 
1277
- The `--base` flag diffs current HEAD against the base branch — exactly the PR diff. With `auth: subscription`, no model flag is passed. With `auth: api-key`, the model is selected by quality tier (`fast` → `gpt-5.6-luna`, `balanced` → `gpt-5.6-terra`, `thorough` → `gpt-5.6-sol`).
1459
+ The `--base` flag diffs current HEAD against the base branch — exactly the PR diff. An explicit `vendors.codex.model` (or matching `model_tiers` entry) is passed as `-c model=...` under either auth mode. When unset: `auth: subscription` passes no model flag (the Codex CLI picks its default), while `auth: api-key` selects the model by quality tier (`fast` → `gpt-5.6-luna`, `balanced` → `gpt-5.6-terra`, `thorough` → `gpt-5.6-sol`).
1460
+
1461
+ Reasoning effort comes from `vendors.codex.effort` and is always passed through as `-c model_reasoning_effort=...` — for the review step and for the auto-fix step (`codex exec`) alike. The values match the codex CLI tiers 1:1 — `low` (Light), `medium`, `high`, `xhigh` (Extra High), `max`, `ultra`. Not every model supports every tier: `ultra` is terra/sol only, and pre-5.6 models stop at `xhigh` — the CLI rejects unsupported combinations. Higher tiers can multiply review wall-clock time; pair them with `timeout_sec`.
1278
1462
 
1279
1463
  ### How Claude reviews run
1280
1464
 
@@ -1289,7 +1473,16 @@ claude \
1289
1473
  "<prompt>"
1290
1474
  ```
1291
1475
 
1292
- `--bare` makes execution fast and deterministic. `--allowedTools` limits Claude to read-only git operations on the cloned repo.
1476
+ `--bare` makes execution fast and deterministic. `--allowedTools` limits Claude to read-only git operations on the cloned repo. `vendors.claude.effort` drives `--effort` for every Claude step — review, recheck, auto-fix and conflict-resolve.
1477
+
1478
+ Every comment crosscheck posts closes with the model and effort the step actually ran with, plus any skills the agent activated:
1479
+
1480
+ ```
1481
+ ---
1482
+ _Reviewed with Claude Code via Crosscheck_ _(Opus 5 · high effort)_
1483
+
1484
+ _Skills: code-review-skill (by @awesome-skills, MIT)_
1485
+ ```
1293
1486
 
1294
1487
  ### Deduplication
1295
1488
 
@@ -1309,6 +1502,9 @@ The fix (file lock for same-machine + GitHub commit status for cross-machine) is
1309
1502
  - **Temp isolation** — each PR cloned into a fresh temp dir, deleted after review
1310
1503
  - **Read-only tools** — Claude restricted to `git diff` and `git log` only
1311
1504
  - **Temp credential isolation** — with `clone_protocol: ssh` (default) no tokens touch disk; with `clone_protocol: https` a short-lived token is embedded in the temp clone's remote URL and removed when the temp dir is deleted after review
1505
+ - **Skill package validation** — installs reject unsafe names, attribution injection, symbolic links, packages over 1,000 files or 10 MiB, and collisions; Git sources record their checked-out commit
1506
+ - **Skill integrity** — Crosscheck verifies every installed package against its SHA-256 receipt before exposing it to agents; modified or malformed packages fail closed and appear as unavailable in `crosscheck status`
1507
+ - **Skill execution boundary** — the activation broker exposes instructions and referenced files but never executes bundled scripts itself. Skills are third-party instructions: inspect their source and license before enabling them; the selected coding agent still operates under its normal sandbox and permissions
1312
1508
 
1313
1509
  ---
1314
1510
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanbased/crosscheck",
3
- "version": "1.2.0",
3
+ "version": "1.3.0-beta.81",
4
4
  "description": "AI code review pipeline that turns agent-written PRs into merge-ready patches",
5
5
  "bin": {
6
6
  "crosscheck": "dist/cli.js",
@@ -23,12 +23,13 @@
23
23
  "node": ">=18"
24
24
  },
25
25
  "scripts": {
26
- "build": "tsc && rm -rf dist/harness && cp -r src/harness dist/harness && cp src/config/review-model-tiers.json dist/config/review-model-tiers.json && chmod +x dist/cli.js dist/ck.js",
26
+ "build": "tsc && rm -rf dist/harness && cp -r src/harness dist/harness && cp src/config/review-model-tiers.json dist/config/review-model-tiers.json && cp src/config/review-strategy.json dist/config/review-strategy.json && chmod +x dist/cli.js dist/ck.js",
27
27
  "dev": "tsx src/cli.ts",
28
28
  "typecheck": "tsc --noEmit",
29
29
  "test": "vitest run",
30
30
  "lint": "eslint src --ext .ts",
31
- "prepublishOnly": "npm run typecheck && npm run build"
31
+ "prepublishOnly": "npm run typecheck && npm run build",
32
+ "verify:strategy": "node scripts/verify-review-strategy.mjs"
32
33
  },
33
34
  "dependencies": {
34
35
  "chalk": "^5.3.0",