swarm-orchestrator 12.0.0 → 13.1.4

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 (525) hide show
  1. package/CHANGELOG.md +174 -0
  2. package/README.md +193 -224
  3. package/dist/agent-run.js +143 -0
  4. package/dist/agent-run.js.map +1 -0
  5. package/dist/cli-options.js +244 -0
  6. package/dist/cli-options.js.map +1 -0
  7. package/dist/cli.js +859 -0
  8. package/dist/cli.js.map +1 -0
  9. package/dist/config/settings.js +82 -0
  10. package/dist/config/settings.js.map +1 -0
  11. package/dist/config/swarm-toml.js +187 -0
  12. package/dist/config/swarm-toml.js.map +1 -0
  13. package/dist/core/clock.js +2 -0
  14. package/dist/core/clock.js.map +1 -0
  15. package/dist/core/loop-events.js +2 -0
  16. package/dist/core/loop-events.js.map +1 -0
  17. package/dist/core/loop.js +118 -0
  18. package/dist/core/loop.js.map +1 -0
  19. package/dist/core/model-client.js +23 -0
  20. package/dist/core/model-client.js.map +1 -0
  21. package/dist/core/random-source.js +2 -0
  22. package/dist/core/random-source.js.map +1 -0
  23. package/dist/core/termination.js +20 -0
  24. package/dist/core/termination.js.map +1 -0
  25. package/dist/core/tool-invoker.js +2 -0
  26. package/dist/core/tool-invoker.js.map +1 -0
  27. package/dist/evidence/blob-store.js +52 -0
  28. package/dist/evidence/blob-store.js.map +1 -0
  29. package/dist/evidence/bundle-manifest.js +45 -0
  30. package/dist/evidence/bundle-manifest.js.map +1 -0
  31. package/dist/evidence/bundle.js +127 -0
  32. package/dist/evidence/bundle.js.map +1 -0
  33. package/dist/evidence/canonical-json.js +97 -0
  34. package/dist/evidence/canonical-json.js.map +1 -0
  35. package/dist/evidence/claim.js +123 -0
  36. package/dist/evidence/claim.js.map +1 -0
  37. package/dist/evidence/combined-bundle.js +40 -0
  38. package/dist/evidence/combined-bundle.js.map +1 -0
  39. package/dist/evidence/dag.js +118 -0
  40. package/dist/evidence/dag.js.map +1 -0
  41. package/dist/evidence/latin-lookalikes.js +74 -0
  42. package/dist/evidence/latin-lookalikes.js.map +1 -0
  43. package/dist/evidence/ledger-record.js +80 -0
  44. package/dist/evidence/ledger-record.js.map +1 -0
  45. package/dist/evidence/ledger.js +138 -0
  46. package/dist/evidence/ledger.js.map +1 -0
  47. package/dist/evidence/model-call-recording.js +80 -0
  48. package/dist/evidence/model-call-recording.js.map +1 -0
  49. package/dist/evidence/predicate.js +244 -0
  50. package/dist/evidence/predicate.js.map +1 -0
  51. package/dist/evidence/record-index.js +21 -0
  52. package/dist/evidence/record-index.js.map +1 -0
  53. package/dist/evidence/record-kind.js +31 -0
  54. package/dist/evidence/record-kind.js.map +1 -0
  55. package/dist/evidence/replay.js +100 -0
  56. package/dist/evidence/replay.js.map +1 -0
  57. package/dist/evidence/review-page.js +192 -0
  58. package/dist/evidence/review-page.js.map +1 -0
  59. package/dist/evidence/scrub.js +533 -0
  60. package/dist/evidence/scrub.js.map +1 -0
  61. package/dist/evidence/session.js +100 -0
  62. package/dist/evidence/session.js.map +1 -0
  63. package/dist/evidence/signing.js +176 -0
  64. package/dist/evidence/signing.js.map +1 -0
  65. package/dist/evidence/verifier/verify.d.mts +22 -0
  66. package/dist/evidence/verifier/verify.mjs +583 -0
  67. package/dist/gates/auto-resolve.js +276 -0
  68. package/dist/gates/auto-resolve.js.map +1 -0
  69. package/dist/gates/base-control.js +149 -0
  70. package/dist/gates/base-control.js.map +1 -0
  71. package/dist/gates/comment-spans.js +107 -0
  72. package/dist/gates/comment-spans.js.map +1 -0
  73. package/dist/gates/coverage-artifact.js +55 -0
  74. package/dist/gates/coverage-artifact.js.map +1 -0
  75. package/dist/gates/default-gates.js +241 -0
  76. package/dist/gates/default-gates.js.map +1 -0
  77. package/dist/gates/engine.js +64 -0
  78. package/dist/gates/engine.js.map +1 -0
  79. package/dist/gates/escalation.js +44 -0
  80. package/dist/gates/escalation.js.map +1 -0
  81. package/dist/gates/file-set-tool.js +63 -0
  82. package/dist/gates/file-set-tool.js.map +1 -0
  83. package/dist/gates/file-set.js +183 -0
  84. package/dist/gates/file-set.js.map +1 -0
  85. package/dist/gates/gate-definition.js +15 -0
  86. package/dist/gates/gate-definition.js.map +1 -0
  87. package/dist/gates/gate-runner.js +180 -0
  88. package/dist/gates/gate-runner.js.map +1 -0
  89. package/dist/gates/git-workspace.js +173 -0
  90. package/dist/gates/git-workspace.js.map +1 -0
  91. package/dist/gates/inspection-gates.js +270 -0
  92. package/dist/gates/inspection-gates.js.map +1 -0
  93. package/dist/gates/measure-snapshot.js +204 -0
  94. package/dist/gates/measure-snapshot.js.map +1 -0
  95. package/dist/gates/measures.js +224 -0
  96. package/dist/gates/measures.js.map +1 -0
  97. package/dist/gates/node-command-runner.js +60 -0
  98. package/dist/gates/node-command-runner.js.map +1 -0
  99. package/dist/gates/node-test-command.js +222 -0
  100. package/dist/gates/node-test-command.js.map +1 -0
  101. package/dist/gates/parsers.js +409 -0
  102. package/dist/gates/parsers.js.map +1 -0
  103. package/dist/gates/project-type.js +63 -0
  104. package/dist/gates/project-type.js.map +1 -0
  105. package/dist/gates/ratchet-summary.js +18 -0
  106. package/dist/gates/ratchet-summary.js.map +1 -0
  107. package/dist/gates/ratchet.js +202 -0
  108. package/dist/gates/ratchet.js.map +1 -0
  109. package/dist/gates/respecification.js +153 -0
  110. package/dist/gates/respecification.js.map +1 -0
  111. package/dist/gates/unified-diff.js +209 -0
  112. package/dist/gates/unified-diff.js.map +1 -0
  113. package/dist/gates/workspace-changes.js +5 -0
  114. package/dist/gates/workspace-changes.js.map +1 -0
  115. package/dist/providers/ai-sdk-model-client.js +86 -0
  116. package/dist/providers/ai-sdk-model-client.js.map +1 -0
  117. package/dist/providers/endpoint-resolution.js +81 -0
  118. package/dist/providers/endpoint-resolution.js.map +1 -0
  119. package/dist/providers/fixture-provider.js +70 -0
  120. package/dist/providers/fixture-provider.js.map +1 -0
  121. package/dist/providers/local-discovery.js +38 -0
  122. package/dist/providers/local-discovery.js.map +1 -0
  123. package/dist/providers/message-conversion.js +40 -0
  124. package/dist/providers/message-conversion.js.map +1 -0
  125. package/dist/providers/model-spec.js +33 -0
  126. package/dist/providers/model-spec.js.map +1 -0
  127. package/dist/providers/registry.js +75 -0
  128. package/dist/providers/registry.js.map +1 -0
  129. package/dist/providers/served-models.js +59 -0
  130. package/dist/providers/served-models.js.map +1 -0
  131. package/dist/select/backend-canary.js +119 -0
  132. package/dist/select/backend-canary.js.map +1 -0
  133. package/dist/select/backend-command.js +15 -0
  134. package/dist/select/backend-command.js.map +1 -0
  135. package/dist/select/bundled-pricing.js +12 -0
  136. package/dist/select/bundled-pricing.js.map +1 -0
  137. package/dist/select/bundled-shortlist.js +13 -0
  138. package/dist/select/bundled-shortlist.js.map +1 -0
  139. package/dist/select/calibrate.js +128 -0
  140. package/dist/select/calibrate.js.map +1 -0
  141. package/dist/select/calibration-case.js +66 -0
  142. package/dist/select/calibration-case.js.map +1 -0
  143. package/dist/select/calibration-cases.v1.json +257 -0
  144. package/dist/select/calibration-measures.js +89 -0
  145. package/dist/select/calibration-measures.js.map +1 -0
  146. package/dist/select/calibration-report.js +278 -0
  147. package/dist/select/calibration-report.js.map +1 -0
  148. package/dist/select/calibration-run.js +168 -0
  149. package/dist/select/calibration-run.js.map +1 -0
  150. package/dist/select/calibration-summary.js +64 -0
  151. package/dist/select/calibration-summary.js.map +1 -0
  152. package/dist/select/coding-models.v1.json +478 -0
  153. package/dist/select/dimensions.js +111 -0
  154. package/dist/select/dimensions.js.map +1 -0
  155. package/dist/select/golden-set.js +89 -0
  156. package/dist/select/golden-set.js.map +1 -0
  157. package/dist/select/hardware-probe.js +107 -0
  158. package/dist/select/hardware-probe.js.map +1 -0
  159. package/dist/select/memory-probe.js +33 -0
  160. package/dist/select/memory-probe.js.map +1 -0
  161. package/dist/select/model-preflight.js +85 -0
  162. package/dist/select/model-preflight.js.map +1 -0
  163. package/dist/select/model-pricing.v1.json +17 -0
  164. package/dist/select/pick-store.js +39 -0
  165. package/dist/select/pick-store.js.map +1 -0
  166. package/dist/select/pricing-source.js +38 -0
  167. package/dist/select/pricing-source.js.map +1 -0
  168. package/dist/select/pricing.js +66 -0
  169. package/dist/select/pricing.js.map +1 -0
  170. package/dist/select/published-source.js +11 -0
  171. package/dist/select/published-source.js.map +1 -0
  172. package/dist/select/recommendation.js +270 -0
  173. package/dist/select/recommendation.js.map +1 -0
  174. package/dist/select/reward.js +73 -0
  175. package/dist/select/reward.js.map +1 -0
  176. package/dist/select/routing-log.js +94 -0
  177. package/dist/select/routing-log.js.map +1 -0
  178. package/dist/select/routing-record.js +23 -0
  179. package/dist/select/routing-record.js.map +1 -0
  180. package/dist/select/routing-report.js +95 -0
  181. package/dist/select/routing-report.js.map +1 -0
  182. package/dist/select/select-report.js +81 -0
  183. package/dist/select/select-report.js.map +1 -0
  184. package/dist/select/shortlist-source.js +102 -0
  185. package/dist/select/shortlist-source.js.map +1 -0
  186. package/dist/select/shortlist.js +132 -0
  187. package/dist/select/shortlist.js.map +1 -0
  188. package/dist/select/system-probe.js +32 -0
  189. package/dist/select/system-probe.js.map +1 -0
  190. package/dist/select/task-class.js +40 -0
  191. package/dist/select/task-class.js.map +1 -0
  192. package/dist/select/task-cost.js +55 -0
  193. package/dist/select/task-cost.js.map +1 -0
  194. package/dist/select/ucb.js +87 -0
  195. package/dist/select/ucb.js.map +1 -0
  196. package/dist/tools/chokepoint-record.js +56 -0
  197. package/dist/tools/chokepoint-record.js.map +1 -0
  198. package/dist/tools/chokepoint.js +183 -0
  199. package/dist/tools/chokepoint.js.map +1 -0
  200. package/dist/tools/claim-tool.js +59 -0
  201. package/dist/tools/claim-tool.js.map +1 -0
  202. package/dist/tools/derivation.js +87 -0
  203. package/dist/tools/derivation.js.map +1 -0
  204. package/dist/tools/file-tools.js +112 -0
  205. package/dist/tools/file-tools.js.map +1 -0
  206. package/dist/tools/regex-safety.js +663 -0
  207. package/dist/tools/regex-safety.js.map +1 -0
  208. package/dist/tools/sandbox.js +108 -0
  209. package/dist/tools/sandbox.js.map +1 -0
  210. package/dist/tools/search-tool.js +121 -0
  211. package/dist/tools/search-tool.js.map +1 -0
  212. package/dist/tools/shell-tool.js +66 -0
  213. package/dist/tools/shell-tool.js.map +1 -0
  214. package/dist/tools/tool-argument-decoding.js +118 -0
  215. package/dist/tools/tool-argument-decoding.js.map +1 -0
  216. package/dist/tools/tool-definition.js +15 -0
  217. package/dist/tools/tool-definition.js.map +1 -0
  218. package/dist/tools/workspace-path.js +18 -0
  219. package/dist/tools/workspace-path.js.map +1 -0
  220. package/dist/tools/workspace-tools.js +15 -0
  221. package/dist/tools/workspace-tools.js.map +1 -0
  222. package/dist/tui/confirmation-queue.js +49 -0
  223. package/dist/tui/confirmation-queue.js.map +1 -0
  224. package/dist/tui/elapsed.js +18 -0
  225. package/dist/tui/elapsed.js.map +1 -0
  226. package/dist/tui/evidence-panel.js +53 -0
  227. package/dist/tui/evidence-panel.js.map +1 -0
  228. package/dist/tui/key-bindings.js +111 -0
  229. package/dist/tui/key-bindings.js.map +1 -0
  230. package/dist/tui/key-dispatcher.js +115 -0
  231. package/dist/tui/key-dispatcher.js.map +1 -0
  232. package/dist/tui/layout.js +100 -0
  233. package/dist/tui/layout.js.map +1 -0
  234. package/dist/tui/open-path.js +76 -0
  235. package/dist/tui/open-path.js.map +1 -0
  236. package/dist/tui/plain-lines.js +32 -0
  237. package/dist/tui/plain-lines.js.map +1 -0
  238. package/dist/tui/screen-model.js +271 -0
  239. package/dist/tui/screen-model.js.map +1 -0
  240. package/dist/tui/screen.js +113 -0
  241. package/dist/tui/screen.js.map +1 -0
  242. package/dist/tui/session-interface.js +193 -0
  243. package/dist/tui/session-interface.js.map +1 -0
  244. package/dist/tui/session-store.js +22 -0
  245. package/dist/tui/session-store.js.map +1 -0
  246. package/dist/tui/session-view.js +157 -0
  247. package/dist/tui/session-view.js.map +1 -0
  248. package/dist/tui/terminal-text.js +97 -0
  249. package/dist/tui/terminal-text.js.map +1 -0
  250. package/dist/tui/theme.js +94 -0
  251. package/dist/tui/theme.js.map +1 -0
  252. package/dist/tui/verify-bundle.js +47 -0
  253. package/dist/tui/verify-bundle.js.map +1 -0
  254. package/dist/tui/view-state.js +89 -0
  255. package/dist/tui/view-state.js.map +1 -0
  256. package/dist/workers/merge-queue.js +249 -0
  257. package/dist/workers/merge-queue.js.map +1 -0
  258. package/dist/workers/parallel-report.js +49 -0
  259. package/dist/workers/parallel-report.js.map +1 -0
  260. package/dist/workers/parallel-run.js +178 -0
  261. package/dist/workers/parallel-run.js.map +1 -0
  262. package/dist/workers/worktree.js +112 -0
  263. package/dist/workers/worktree.js.map +1 -0
  264. package/docs/build-guide.md +175 -0
  265. package/docs/claims.md +52 -0
  266. package/docs/security-coverage.md +552 -0
  267. package/package.json +67 -144
  268. package/config/personas/architect.yaml +0 -26
  269. package/config/personas/dependency-auditor.yaml +0 -57
  270. package/config/personas/documentation-writer.yaml +0 -57
  271. package/config/personas/implementer.yaml +0 -55
  272. package/config/personas/migration-specialist.yaml +0 -59
  273. package/config/personas/security-reviewer.yaml +0 -57
  274. package/config/personas/test-author.yaml +0 -56
  275. package/config/personas/verifier.yaml +0 -62
  276. package/dist/src/audit/aibom/cyclonedx-ml.js +0 -174
  277. package/dist/src/audit/aibom/index.js +0 -11
  278. package/dist/src/audit/aibom/ledger-reader.js +0 -40
  279. package/dist/src/audit/aibom/spdx-ai-profile.js +0 -166
  280. package/dist/src/audit/cheat-detector/assertion-strip.js +0 -60
  281. package/dist/src/audit/cheat-detector/audit-config.js +0 -342
  282. package/dist/src/audit/cheat-detector/comment-only-fix.js +0 -54
  283. package/dist/src/audit/cheat-detector/confirm-findings.js +0 -96
  284. package/dist/src/audit/cheat-detector/coverage-erosion.js +0 -67
  285. package/dist/src/audit/cheat-detector/dead-branch-insertion.js +0 -45
  286. package/dist/src/audit/cheat-detector/detector-sets.js +0 -86
  287. package/dist/src/audit/cheat-detector/detector-types.js +0 -2
  288. package/dist/src/audit/cheat-detector/diff-chunker.js +0 -181
  289. package/dist/src/audit/cheat-detector/diff-walker.js +0 -241
  290. package/dist/src/audit/cheat-detector/error-swallow.js +0 -263
  291. package/dist/src/audit/cheat-detector/exception-rethrow-lost-context.js +0 -38
  292. package/dist/src/audit/cheat-detector/fake-refactor.js +0 -218
  293. package/dist/src/audit/cheat-detector/import-resolver.js +0 -313
  294. package/dist/src/audit/cheat-detector/index.js +0 -174
  295. package/dist/src/audit/cheat-detector/internal-roots.js +0 -192
  296. package/dist/src/audit/cheat-detector/judge-primary.js +0 -75
  297. package/dist/src/audit/cheat-detector/judge-prompts/index.js +0 -25
  298. package/dist/src/audit/cheat-detector/judge-prompts/types.js +0 -10
  299. package/dist/src/audit/cheat-detector/judge-prompts/v1-conservative.js +0 -66
  300. package/dist/src/audit/cheat-detector/judge-prompts/v2-balanced.js +0 -79
  301. package/dist/src/audit/cheat-detector/llm-judge/anthropic-judge.js +0 -245
  302. package/dist/src/audit/cheat-detector/llm-judge/cache.js +0 -92
  303. package/dist/src/audit/cheat-detector/llm-judge/index.js +0 -207
  304. package/dist/src/audit/cheat-detector/llm-judge/local-judge.js +0 -75
  305. package/dist/src/audit/cheat-detector/llm-judge/ollama-judge.js +0 -150
  306. package/dist/src/audit/cheat-detector/llm-judge/types.js +0 -12
  307. package/dist/src/audit/cheat-detector/manifests/cargo-toml.js +0 -63
  308. package/dist/src/audit/cheat-detector/manifests/composer-json.js +0 -82
  309. package/dist/src/audit/cheat-detector/manifests/csproj.js +0 -93
  310. package/dist/src/audit/cheat-detector/manifests/find-manifests.js +0 -128
  311. package/dist/src/audit/cheat-detector/manifests/gemfile.js +0 -79
  312. package/dist/src/audit/cheat-detector/manifests/go-mod.js +0 -73
  313. package/dist/src/audit/cheat-detector/manifests/gradle.js +0 -97
  314. package/dist/src/audit/cheat-detector/manifests/index.js +0 -43
  315. package/dist/src/audit/cheat-detector/manifests/package-json.js +0 -83
  316. package/dist/src/audit/cheat-detector/manifests/pom-xml.js +0 -78
  317. package/dist/src/audit/cheat-detector/manifests/pyproject-toml.js +0 -78
  318. package/dist/src/audit/cheat-detector/manifests/requirements-txt.js +0 -56
  319. package/dist/src/audit/cheat-detector/manifests/types.js +0 -15
  320. package/dist/src/audit/cheat-detector/matcher-grader.js +0 -267
  321. package/dist/src/audit/cheat-detector/mock-delta.js +0 -101
  322. package/dist/src/audit/cheat-detector/mock-of-hallucination.js +0 -284
  323. package/dist/src/audit/cheat-detector/no-op-fix-helpers.js +0 -157
  324. package/dist/src/audit/cheat-detector/no-op-fix.js +0 -268
  325. package/dist/src/audit/cheat-detector/pr-intent.js +0 -85
  326. package/dist/src/audit/cheat-detector/registries/cache.js +0 -41
  327. package/dist/src/audit/cheat-detector/registries/github-actions-scan.js +0 -52
  328. package/dist/src/audit/cheat-detector/registries/index.js +0 -32
  329. package/dist/src/audit/cheat-detector/registries/offline-allowlist.js +0 -174
  330. package/dist/src/audit/cheat-detector/registries/types.js +0 -13
  331. package/dist/src/audit/cheat-detector/subject-paths.js +0 -92
  332. package/dist/src/audit/cheat-detector/test-import-closure.js +0 -141
  333. package/dist/src/audit/cheat-detector/test-relaxation.js +0 -194
  334. package/dist/src/audit/cheat-detector/type-suppression.js +0 -100
  335. package/dist/src/audit/cheat-detector/verify-findings.js +0 -328
  336. package/dist/src/audit/execution-grounded/corroborate.js +0 -149
  337. package/dist/src/audit/execution-grounded/coverage-delta.js +0 -288
  338. package/dist/src/audit/execution-grounded/dead-branch-restoration.js +0 -457
  339. package/dist/src/audit/execution-grounded/docker-runner.js +0 -104
  340. package/dist/src/audit/execution-grounded/eg-cache.js +0 -106
  341. package/dist/src/audit/execution-grounded/exec-env.js +0 -282
  342. package/dist/src/audit/execution-grounded/fake-refactor-restoration.js +0 -399
  343. package/dist/src/audit/execution-grounded/index.js +0 -1151
  344. package/dist/src/audit/execution-grounded/issue-repro.js +0 -340
  345. package/dist/src/audit/execution-grounded/mock-restoration.js +0 -396
  346. package/dist/src/audit/execution-grounded/monorepo.js +0 -83
  347. package/dist/src/audit/execution-grounded/mutation-check.js +0 -332
  348. package/dist/src/audit/execution-grounded/no-op-fix-restoration.js +0 -376
  349. package/dist/src/audit/execution-grounded/sandbox.js +0 -459
  350. package/dist/src/audit/execution-grounded/test-restoration.js +0 -906
  351. package/dist/src/audit/execution-grounded/type-suppression-restoration.js +0 -496
  352. package/dist/src/audit/gate/block-eligibility.js +0 -87
  353. package/dist/src/audit/gate/block-trigger-ledger.js +0 -39
  354. package/dist/src/audit/gate/block-trigger-types.js +0 -22
  355. package/dist/src/audit/gate/block-triggers.js +0 -539
  356. package/dist/src/audit/gate/calibrate-triggers.js +0 -41
  357. package/dist/src/audit/gate/gate-decision.js +0 -61
  358. package/dist/src/audit/gate/revert-proof.js +0 -70
  359. package/dist/src/audit/gate/self-certifying.js +0 -74
  360. package/dist/src/audit/gate/wilson.js +0 -56
  361. package/dist/src/audit/oracle/category-map.js +0 -24
  362. package/dist/src/audit/oracle/evade/evaders.js +0 -166
  363. package/dist/src/audit/oracle/inject/assertion-strip.js +0 -32
  364. package/dist/src/audit/oracle/inject/cheat-mock-mutation.js +0 -37
  365. package/dist/src/audit/oracle/inject/comment-only-fix.js +0 -33
  366. package/dist/src/audit/oracle/inject/coverage-erosion.js +0 -35
  367. package/dist/src/audit/oracle/inject/dead-branch-insertion.js +0 -31
  368. package/dist/src/audit/oracle/inject/diff-carrier.js +0 -165
  369. package/dist/src/audit/oracle/inject/error-swallow.js +0 -32
  370. package/dist/src/audit/oracle/inject/exception-rethrow-lost-context.js +0 -35
  371. package/dist/src/audit/oracle/inject/fake-refactor.js +0 -32
  372. package/dist/src/audit/oracle/inject/goal-not-fixed.js +0 -37
  373. package/dist/src/audit/oracle/inject/index.js +0 -42
  374. package/dist/src/audit/oracle/inject/injection-runner.js +0 -118
  375. package/dist/src/audit/oracle/inject/injector-types.js +0 -24
  376. package/dist/src/audit/oracle/inject/mock-of-hallucination.js +0 -43
  377. package/dist/src/audit/oracle/inject/no-op-fix.js +0 -47
  378. package/dist/src/audit/oracle/inject/site.js +0 -10
  379. package/dist/src/audit/oracle/inject/test-relaxation.js +0 -29
  380. package/dist/src/audit/oracle/inject/type-suppression.js +0 -33
  381. package/dist/src/audit/pr-source/index.js +0 -132
  382. package/dist/src/audit/report-comment/block-trigger-section.js +0 -223
  383. package/dist/src/audit/report-comment/detector-precision.js +0 -154
  384. package/dist/src/audit/report-comment/index.js +0 -217
  385. package/dist/src/audit/shadow-output.js +0 -105
  386. package/dist/src/audit/shadow.js +0 -103
  387. package/dist/src/audit/types.js +0 -23
  388. package/dist/src/cli/flags.js +0 -156
  389. package/dist/src/cli/v8/argv-schema.js +0 -127
  390. package/dist/src/cli/v8/audit-handler.js +0 -913
  391. package/dist/src/cli/v8/compile-handler.js +0 -272
  392. package/dist/src/cli/v8/doctor-handler.js +0 -849
  393. package/dist/src/cli/v8/grammar-resolve.js +0 -88
  394. package/dist/src/cli/v8/index.js +0 -70
  395. package/dist/src/cli/v8/init-handler.js +0 -177
  396. package/dist/src/cli/v8/ledger-verify-handler.js +0 -142
  397. package/dist/src/cli/v8/local-provider-flags.js +0 -275
  398. package/dist/src/cli/v8/local-provider-types.js +0 -10
  399. package/dist/src/cli/v8/pr-fetch.js +0 -192
  400. package/dist/src/cli/v8/pr-manifest-fetch.js +0 -231
  401. package/dist/src/cli/v8/resume-handler.js +0 -487
  402. package/dist/src/cli/v8/run-handler.js +0 -564
  403. package/dist/src/cli/v8/run-wrapper.js +0 -253
  404. package/dist/src/cli/v8/session-utils.js +0 -121
  405. package/dist/src/cli/v8/stats-handler.js +0 -270
  406. package/dist/src/cli.js +0 -102
  407. package/dist/src/config/provider-config.js +0 -202
  408. package/dist/src/contract/approval.js +0 -193
  409. package/dist/src/contract/auto-discover.js +0 -77
  410. package/dist/src/contract/canonicalize.js +0 -187
  411. package/dist/src/contract/compiler.js +0 -304
  412. package/dist/src/contract/extractor/anthropic-extractor.js +0 -266
  413. package/dist/src/contract/extractor/contract-schema.js +0 -126
  414. package/dist/src/contract/extractor/deterministic-extractor.js +0 -57
  415. package/dist/src/contract/extractor/factory.js +0 -105
  416. package/dist/src/contract/extractor/local-extractor.js +0 -133
  417. package/dist/src/contract/extractor/scan-pipeline.js +0 -190
  418. package/dist/src/contract/extractor/stub-extractor.js +0 -89
  419. package/dist/src/contract/extractor/types.js +0 -2
  420. package/dist/src/contract/index.js +0 -51
  421. package/dist/src/contract/schema/loader.js +0 -87
  422. package/dist/src/contract/schema/v1.json +0 -198
  423. package/dist/src/contract/serializer.js +0 -139
  424. package/dist/src/contract/tagger.js +0 -122
  425. package/dist/src/contract/types.js +0 -22
  426. package/dist/src/contract/validator.js +0 -235
  427. package/dist/src/env-loader.js +0 -104
  428. package/dist/src/errors.js +0 -27
  429. package/dist/src/falsification/adapters/adapter-profile.js +0 -5
  430. package/dist/src/falsification/adapters/candidate-runners.js +0 -143
  431. package/dist/src/falsification/adapters/cli-falsifier.js +0 -171
  432. package/dist/src/falsification/adapters/fenced-json.js +0 -107
  433. package/dist/src/falsification/adapters/index.js +0 -30
  434. package/dist/src/falsification/adapters/profiles/claude-code.js +0 -202
  435. package/dist/src/falsification/adapters/profiles/codex/prompts/property-must-hold.md +0 -44
  436. package/dist/src/falsification/adapters/profiles/codex.js +0 -206
  437. package/dist/src/falsification/adapters/profiles/copilot/prompts/function-must-have-signature.md +0 -58
  438. package/dist/src/falsification/adapters/profiles/copilot/prompts/import-graph-must-satisfy.md +0 -49
  439. package/dist/src/falsification/adapters/profiles/copilot/prompts/no-cycles.md +0 -6
  440. package/dist/src/falsification/adapters/profiles/copilot/prompts/no-upward-imports.md +0 -4
  441. package/dist/src/falsification/adapters/profiles/copilot.js +0 -184
  442. package/dist/src/falsification/adapters/registry.js +0 -90
  443. package/dist/src/falsification/adapters/spawn-cli.js +0 -88
  444. package/dist/src/falsification/adapters/transient-retry.js +0 -93
  445. package/dist/src/falsification/adapters/types.js +0 -5
  446. package/dist/src/falsification/dispatcher.js +0 -70
  447. package/dist/src/falsification/inspection/heuristic-classifier.js +0 -361
  448. package/dist/src/falsification/scheduler.js +0 -217
  449. package/dist/src/index.js +0 -22
  450. package/dist/src/inference/local/backend.js +0 -30
  451. package/dist/src/inference/local/backends/llama-cpp.js +0 -181
  452. package/dist/src/inference/local/backends/ollama.js +0 -186
  453. package/dist/src/inference/local/backends/openai-compatible.js +0 -187
  454. package/dist/src/inference/local/backends/vllm.js +0 -175
  455. package/dist/src/inference/local/concurrency-gate.js +0 -68
  456. package/dist/src/inference/local/factory.js +0 -89
  457. package/dist/src/inference/local/grammars/unified-diff.gbnf +0 -26
  458. package/dist/src/ledger/index.js +0 -26
  459. package/dist/src/ledger/jsonl-ledger.js +0 -23
  460. package/dist/src/ledger/ledger.js +0 -212
  461. package/dist/src/ledger/memoization.js +0 -180
  462. package/dist/src/ledger/resume.js +0 -139
  463. package/dist/src/ledger/types.js +0 -6
  464. package/dist/src/logger.js +0 -96
  465. package/dist/src/persona/index.js +0 -31
  466. package/dist/src/persona/persona-registry.js +0 -187
  467. package/dist/src/persona/predicates.js +0 -54
  468. package/dist/src/persona/types.js +0 -6
  469. package/dist/src/persona/verifier-persona.js +0 -138
  470. package/dist/src/population/apply-verify.js +0 -142
  471. package/dist/src/population/deterministic-dispatch.js +0 -87
  472. package/dist/src/population/diff-applier.js +0 -90
  473. package/dist/src/population/diff-snapshot.js +0 -164
  474. package/dist/src/population/falsifier-dispatch.js +0 -115
  475. package/dist/src/population/file-context.js +0 -87
  476. package/dist/src/population/index.js +0 -27
  477. package/dist/src/population/manager.js +0 -364
  478. package/dist/src/population/persona-message.js +0 -186
  479. package/dist/src/population/pipeline-config.js +0 -73
  480. package/dist/src/population/post-merge-handler.js +0 -112
  481. package/dist/src/population/provider-attribution.js +0 -16
  482. package/dist/src/population/rollback.js +0 -177
  483. package/dist/src/population/single-mode-executor.js +0 -224
  484. package/dist/src/population/snapshot-cleanup.js +0 -299
  485. package/dist/src/population/state.js +0 -48
  486. package/dist/src/population/test-framework-misuse.js +0 -104
  487. package/dist/src/population/tournament-driver.js +0 -104
  488. package/dist/src/population/tournament.js +0 -427
  489. package/dist/src/population/unified-diff.js +0 -298
  490. package/dist/src/population/whole-file-apply.js +0 -181
  491. package/dist/src/session/anthropic-session.js +0 -198
  492. package/dist/src/session/auto-discover.js +0 -88
  493. package/dist/src/session/bounded-session.js +0 -94
  494. package/dist/src/session/deterministic-session.js +0 -331
  495. package/dist/src/session/factory.js +0 -123
  496. package/dist/src/session/index.js +0 -28
  497. package/dist/src/session/local-session.js +0 -221
  498. package/dist/src/session/stub-session.js +0 -160
  499. package/dist/src/session/token-estimator.js +0 -23
  500. package/dist/src/session/types.js +0 -44
  501. package/dist/src/shared/child-env.js +0 -94
  502. package/dist/src/shared/obligation-rendering.js +0 -80
  503. package/dist/src/shared-predicates/index.js +0 -17
  504. package/dist/src/shared-predicates/predicate-runner.js +0 -62
  505. package/dist/src/shared-types/index.js +0 -17
  506. package/dist/src/shared-types/obligation-types.js +0 -25
  507. package/dist/src/shared-wasm/index.js +0 -17
  508. package/dist/src/shared-wasm/strategy-constants.js +0 -156
  509. package/dist/src/types.js +0 -5
  510. package/dist/src/verification/ast-imports.js +0 -199
  511. package/dist/src/verification/ast-signature.js +0 -406
  512. package/dist/src/verification/index.js +0 -14
  513. package/dist/src/verification/live-cost-tracker.js +0 -78
  514. package/dist/src/verification/post-merge.js +0 -53
  515. package/dist/src/verification/pre-generation.js +0 -71
  516. package/dist/src/verification/predicate-runner.js +0 -22
  517. package/dist/src/verification/run-verifier.js +0 -613
  518. package/dist/src/verification/streaming-verifier.js +0 -162
  519. package/dist/src/wasm/index.js +0 -29
  520. package/dist/src/wasm/registry.js +0 -30
  521. package/dist/src/wasm/strategies/format-prettier.js +0 -119
  522. package/dist/src/wasm/strategies/import-sort.js +0 -185
  523. package/dist/src/wasm/strategies/scaffold-template.js +0 -98
  524. package/dist/src/wasm/types.js +0 -11
  525. package/dist/src/wasm/wasm-runtime.js +0 -260
package/CHANGELOG.md ADDED
@@ -0,0 +1,174 @@
1
+ # Changelog
2
+
3
+ ## 13.1.4
4
+
5
+ ### Fixed
6
+
7
+ - **The readme printed an install command that cannot work.** It offered
8
+ `npm install -g github:owner/repo#tag` beside the registry line. `dist/` is not committed, so a
9
+ git ref builds itself on install and needs this package's devDependencies to do it, and npm
10
+ does not install those under `-g`: it carries the global context into its git-dependency
11
+ preparation, places the clone as a root package rather than building a tree inside it, and runs
12
+ `prepare` without the compiler. The same ref installed without `-g` works and always did. Found
13
+ by a person running the line the readme printed.
14
+ - **That failure surfaced as `ENOENT` on a path the reader never typed.** The build now names the
15
+ cause and the two commands that do work, rather than reporting a missing file.
16
+
17
+ ## 13.1.3
18
+
19
+ The first 13.x on the npm registry. No behaviour changed: this is 13.1.1 with a manifest the
20
+ registry accepts and install instructions that are true.
21
+
22
+ ### Fixed
23
+
24
+ - **The manifest named no repository, so a signed publish was refused.** `npm publish
25
+ --provenance` signs a statement naming the repository the tarball was built from, and the
26
+ registry checks it against `repository.url` before it accepts the write. That field was
27
+ absent, so the statement said one thing and the manifest said `""`, and the registry answered
28
+ `E422` after the provenance had already been written to the transparency log. Nothing in the
29
+ source tree can show this, so a test now asserts the field.
30
+ - **The package told its own readers it was not published.** The install section named a git ref
31
+ and said the registry served 12.0.0, because that is what was true while the credential was
32
+ missing. Those words ship inside the tarball, so publishing 13.1.1 as it stood would have put
33
+ a package on the registry whose first section denies being there. `npm install -g
34
+ swarm-orchestrator` is the first line again.
35
+
36
+ ### Added
37
+
38
+ - A description, keywords, a homepage and a bug-tracker link, which is what the registry page
39
+ renders around the readme and what a search on the registry matches against.
40
+ - Three flags the readme never listed, `--base`, `--max-steps` and `--local-endpoint`, and a
41
+ pointer to `swarm --help` for the calibration flags it still does not list.
42
+
43
+ `13.1.2` was tagged and refused by the registry for the manifest reason above. The tag is left
44
+ where it is rather than moved, because it names a real tree and the refusal is part of the
45
+ record.
46
+
47
+ ## 13.1.1
48
+
49
+ A packaging fix. Nothing about how the tool runs changed.
50
+
51
+ ### Fixed
52
+
53
+ - **Installing from a git ref produced a package with no binary.** `dist/` is not committed and
54
+ is built by a script, and npm runs `prepare` for a git install but never `prepublishOnly`.
55
+ Only the latter was declared, so `npm install github:moonrunnerkc/swarm-orchestrator#v13.1.0`
56
+ resolved, reported no error, and left a directory with no `dist/` and no `swarm`. This is the
57
+ install path that matters while the registry publish is blocked, and it was the one that did
58
+ not work.
59
+
60
+ ## 13.1.0
61
+
62
+ A run you can watch and drive, and an end-of-run panel that shows you what it produced.
63
+ Everything below is additive: no flag, command or output changed meaning, and the plain-line
64
+ stream a pipe or a CI job reads is byte-for-byte what it was.
65
+
66
+ ### Added
67
+
68
+ - **An interactive terminal interface.** On a TTY, a run draws a single screen: the task and
69
+ the model in a header, the plan, the action stream, the gate strip, and a status line.
70
+ Scroll it, expand a row to the whole tool input and output and the ledger record it came
71
+ from, filter it, freeze the render without touching the run, and press `?` for the keymap.
72
+ Two exits that are not the same thing: `q` leaves the view and lets the run finish, `ctrl+c`
73
+ cancels the run.
74
+ - **An end-of-run evidence panel.** What the run produced, named by what each artifact is for,
75
+ with the record count and how many claims the harness verified against how many it refused.
76
+ One keystroke opens the review page, another the bundle directory. It says the bundle
77
+ verified only if the bundle's own verifier ran in that session and exited 0, and it names the
78
+ exit code; otherwise it says "not verified in this run" and prints the command.
79
+ - **`swarm review <bundle directory>`**, which shows that same panel for any bundle already on
80
+ disk, running the same verifier. Nothing is re-run.
81
+ - **`swarm --help`**, which used to report that `--help` needs a value.
82
+ - **Screen flags**: `--no-tui` for plain lines even on a terminal, `--color` and `--no-color`,
83
+ `--open-evidence` and `--no-open-evidence`. Opening is opt-in and never happens off a
84
+ terminal.
85
+ - **Three `swarm.toml` tables**: `[interface]` (`tui`, `color`, `open_evidence`), `[theme]`
86
+ (a colour per slot), and `[keys]` (a key per action). Flags win over the file, as everything
87
+ else does. An unknown key, colour or action is a typed error naming what was wrong and what
88
+ would have been accepted.
89
+ - **Sampling settings on the wire for a calibration run**: temperature and top-p pinned and
90
+ recorded in every model-call record, with a seed per repeat. An ordinary task run sends
91
+ nothing and is unchanged.
92
+
93
+ ### Fixed
94
+
95
+ - **Two consumers of one stdin.** The CLI built a readline interface on `process.stdin` while
96
+ Ink held the same stdin in raw mode. A confirmation firing mid-run raced them, which is the
97
+ least acceptable place to drop a keystroke. Confirmation is now a component inside the
98
+ running screen, answered by the same key dispatcher.
99
+ - **The curated model shortlist and pricing table answered 404.** Both URLs named the branch
100
+ `main`, which is the v12 lineage and carries neither file, so `swarm select` fell back to the
101
+ bundled snapshot on every machine.
102
+ - **A missing verifier read as a refused bundle.** Node exits 1 on a module it cannot find,
103
+ which at the exit code is the same as a verifier that ran and said no. One is the absence of
104
+ a verdict.
105
+ - **Local models reported no tokens, and so cost nothing.** An OpenAI-compatible server streams
106
+ a usage chunk only when the request carries `stream_options.include_usage`, and the local
107
+ provider was not built to send it. Every local run recorded `outputTokens: 0`, so throughput
108
+ was unmeasurable and every run priced at `$0.0000`, which the routing reward is built from.
109
+ The router had been learning that local models are free.
110
+ - **One keychain message for three different failures.** A key that could not be read, an entry
111
+ holding something that is not a key, and a keychain that would not accept a new one now say
112
+ which happened and what to do about it. The middle one names the service and the account, and
113
+ says the entry can be deleted.
114
+
115
+ ## 13.0.0
116
+
117
+ Same package name, different product. If you installed `swarm-orchestrator` before this
118
+ release, read this before upgrading: v13 is not a newer v12, and nothing in v12's interface
119
+ survives.
120
+
121
+ ### What v12 was, and what v13 is
122
+
123
+ v12 was a PR auditor. It ran as a GitHub Action, read pull requests opened by AI coding
124
+ agents, looked for cheat patterns (test relaxation, mock-of-hallucination, assertion strip,
125
+ no-op fix), posted findings as a comment, and gated merges.
126
+
127
+ v13 is a coding agent. It does the work rather than auditing somebody else's, and every
128
+ claim it makes about that work resolves to machine-captured evidence in a tamper-evident
129
+ ledger. The two share a name and nothing else: no shared history, no shared interface, no
130
+ migration path from one to the other, because there is nothing to migrate.
131
+
132
+ ### Breaking
133
+
134
+ - **The `swarm-audit` and `swarm-orchestrator` binaries are gone.** One binary now, `swarm`.
135
+ - **The GitHub Action is retired.** v13 ships no `action.yml`. There is no v13 equivalent of
136
+ the merge gate, and none is planned.
137
+ - **Node 24 or newer.** v12 asked for 20. The floor is not stylistic: the coverage cycle
138
+ spawns the test runner with `--test-isolation=process`, which Node 22 rejects as a bad
139
+ option, so on anything older that arm measures nothing.
140
+ - **The histories share no merge base.** v13 is a separate lineage. `git log` will not show
141
+ you v12's commits from here.
142
+
143
+ ### If you are using v12
144
+
145
+ Stay on it. It is tagged `v12-final` and that tag is not going away.
146
+
147
+ npm install swarm-orchestrator@12.0.0
148
+
149
+ That is the newest v12 the registry carries. The `v12-final` tag is at 12.1.1, which was
150
+ tagged but never published, so `@12.1.1` does not resolve; install from the tag if you need
151
+ exactly that tree.
152
+
153
+ For the Action, pin the tag rather than a branch, since the default branch is moving to the
154
+ v13 lineage:
155
+
156
+ uses: moonrunnerkc/swarm-orchestrator@v12-final
157
+
158
+ ### What v13 does
159
+
160
+ One task, start to finish, in a git workspace: plan, edit through a chokepoint that records
161
+ every tool call, run the gates, auto-resolve failures under a numeric ratchet, and export a
162
+ signed evidence bundle a stranger can verify without installing anything.
163
+
164
+ The parts worth knowing before you try it:
165
+
166
+ - Gate results, claim verdicts and bundle status are computed by the harness. Model prose
167
+ renders as unverified narrative and cannot render green.
168
+ - The ledger is append-only and hash-chained, signed with a key from the OS keychain.
169
+ - The bundle carries its own verifier. `node verify.mjs <bundle>` needs Node and nothing
170
+ else.
171
+ - Local model selection is measured on your hardware rather than guessed from model cards.
172
+
173
+ `README.md` links each of those to a committed artifact of it happening. `docs/claims.md`
174
+ maps every claim to its evidence, and lists what this tree cannot back.
package/README.md CHANGED
@@ -1,255 +1,224 @@
1
- <p align="center">
2
- <img src="./assets/cover.svg" alt="Swarm Orchestrator cover" width="100%">
3
- </p>
4
-
5
- # Swarm Orchestrator
6
-
7
- Reads a pull request (PR) diff and flags the shortcuts artificial intelligence (AI) coding agents use to look done without being done. Relaxed tests, swallowed errors, fake renames, eleven categories in all. Grading patches against typed obligation contracts via a multi-persona pipeline is the second surface.
8
-
9
- For engineers reviewing AI-written PRs at volume. Compliance teams generate CycloneDX-ML (machine learning) and SPDX (Software Package Data Exchange) 3.0 AI-BOM (bill of materials) artifacts. The artifacts map to EU AI Act (European Union Artificial Intelligence Act) Annex IV and CISA (Cybersecurity and Infrastructure Security Agency) reporting. Maintainers keep a hash-chained evidence record for every graded patch.
10
-
11
- **Flags are tips, blocks are proof.** A flag is a structural detector seeing a cheat-shaped pattern; it is advisory and never blocks a merge (`--mode advise` is the default). A block is a self-certifying runtime result whose per-instance controls are all green, and every block ships the exact command that reproduces it in a fresh checkout. Eight proof protocols back the gate today: six execution-grounded restoration proofs (`test-tamper`, `mock-mutation`, `no-op-fix`, `type-suppression`, `fake-refactor`, `dead-branch`) plus `claim-falsified` and `obligation-failure`. The measured proven-finding precision on the execution-grounded-viable corpus slice, with its plain n, is in [`benchmarks/real-corpus/GATE-PRECISION-REPORT.md`](benchmarks/real-corpus/GATE-PRECISION-REPORT.md).
12
-
13
- <!-- BADGES:START -->
14
- [![CI](https://github.com/moonrunnerkc/swarm-orchestrator/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/moonrunnerkc/swarm-orchestrator/actions/workflows/ci.yml)
15
- [![license ISC](https://img.shields.io/static/v1?label=license&message=ISC&color=blue)](LICENSE)
16
- [![node >= 20](https://img.shields.io/static/v1?label=node&message=%3E%3D%2020&color=3c873a)](package.json)
17
- [![version 12.0.0](https://img.shields.io/static/v1?label=version&message=12.0.0&color=22d3ee)](package.json)
18
- [![oracle recall 93% (301/325)](https://img.shields.io/static/v1?label=oracle%20recall&message=93%25%20(301%2F325)&color=brightgreen)](benchmarks/results/AB-REPORT.md)
19
- [![real-PR false alarms 0.11/PR](https://img.shields.io/static/v1?label=real-PR%20false%20alarms&message=0.11%2FPR&color=brightgreen)](benchmarks/real-prs/REAL-WORLD-REPORT.md)
20
- [![real-PR cheats vs linters 4 confirmed (Semgrep+ESLint: 1)](https://img.shields.io/static/v1?label=real-PR%20cheats%20vs%20linters&message=4%20confirmed%20(Semgrep%2BESLint%3A%201)&color=brightgreen)](benchmarks/real-prs/v11-BENEFIT-REPORT.md)
21
- <!-- BADGES:END -->
22
-
23
- <p align="center">
24
- <a href="#install">Install</a> ·
25
- <a href="#quick-start">Quick start</a> ·
26
- <a href="#results">Results</a> ·
27
- <a href="#cheat-detectors">Detectors</a> ·
28
- <a href="#use-as-a-github-action">GitHub Action</a> ·
29
- <a href="#ai-bom">AI-BOM</a> ·
30
- <a href="#orchestrator-mode">Orchestrator</a> ·
31
- <a href="#architecture">Architecture</a> ·
32
- <a href="#commands">Commands</a> ·
33
- <a href="#limitations">Limitations</a>
34
- </p>
1
+ # swarm-orchestrator
35
2
 
36
- ## Install
37
-
38
- Node 20 or later. See [`package.json`](package.json).
39
-
40
- ```bash
41
- git clone https://github.com/moonrunnerkc/swarm-orchestrator.git
42
- cd swarm-orchestrator
43
- npm install
44
- npm run build
45
- npm link
46
- swarm --help
47
- ```
48
-
49
- ## Quick start
50
-
51
- ```bash
52
- # Audit a PR by reference (advisory by default; never blocks the merge)
53
- GITHUB_TOKEN=... swarm audit moonrunnerkc/swarm-orchestrator#42
54
-
55
- # Opt in to merge-blocking gate mode (blocks only on a self-certifying
56
- # runtime proof; enable the execution-grounded layer in
57
- # .swarm/audit-config.yaml first; see docs/audit-config.md)
58
- GITHUB_TOKEN=... swarm audit moonrunnerkc/swarm-orchestrator#42 --mode gate
59
-
60
- # Audit a local diff with all 11 detectors
61
- git diff main...HEAD | swarm audit --diff-stdin --detectors experimental
62
-
63
- # Audit and emit a CycloneDX 1.6 ML-BOM
64
- swarm audit --diff-file my.patch --emit-aibom cyclonedx-ml
65
-
66
- # Shadow mode: record verdicts to disk without commenting or gating
67
- swarm audit --pr <ref> --shadow my-org/my-repo
68
- ```
69
-
70
- Exit codes: `0` advisory or any advise-mode run, `1` block (gate mode only), `2` usage error.
71
-
72
- ## Results
73
-
74
- Every number here is reproducible from this repo and runs offline.
75
-
76
- ### Catches cheats that linters miss
77
-
78
- | PR | Cheat caught | Semgrep / ESLint |
79
- |---|---|---|
80
- | [cloudflare/workers-sdk#14063](https://github.com/cloudflare/workers-sdk/pull/14063) | fake refactor: function renamed but two callers still use the old name | not flagged |
81
- | [cloudflare/workers-sdk#14132](https://github.com/cloudflare/workers-sdk/pull/14132) | error swallow: bare empty `catch` silently hides every error in the block | not flagged |
82
-
83
- Both reproduce deterministically from the committed diffs. Semgrep (210 rules) and the ESLint security ruleset flag neither. Reproduce either with `swarm audit --diff-file benchmarks/real-prs/diffs/cloudflare-workers-sdk/<pr>.diff`. Full study across twelve repos in [`benchmarks/real-prs/v11-BENEFIT-REPORT.md`](benchmarks/real-prs/v11-BENEFIT-REPORT.md).
84
-
85
- ### Detection numbers
86
-
87
- **301 of 325** planted cheats recovered (92.6%) across thirteen categories scored against a defect-injection oracle: 258/275 structural plus 43/50 on the two semantic categories the judge-primary path covers. The behavioral `cheat-mock-mutation` category drove the latest gain: focusing the judge on the hunks that add a value-injecting mock lifted its recall from 0.16 (the prior rapid-mlx glm47 run) to 0.96 (24/25) on the local qwen3.6 judge, while the clean-PR judge false-positive rate fell from 10% to 0%. Reproduce with `SWARM_JUDGE_PROVIDER=ollama SWARM_JUDGE_MODEL=qwen3.6:35b-a3b npm run benchmarks:full`; A/B with the same-model decomposition in [`benchmarks/results/AB-REPORT.md`](benchmarks/results/AB-REPORT.md) and per-detector recall in [`benchmarks/oracle-corpus/per-detector-recall.md`](benchmarks/oracle-corpus/per-detector-recall.md).
88
-
89
- **0.11 findings per PR** on an 18-PR pilot across five public repos. At or below the pre-upgrade auditor's false-alarm burden, with the oracle recall gain intact. Full numbers in [`benchmarks/real-prs/REAL-WORLD-REPORT.md`](benchmarks/real-prs/REAL-WORLD-REPORT.md).
90
-
91
- ### Execution-grounded layer
92
-
93
- Reproduce with `npm run execution-grounded:full`. This optional layer sets up a sandboxed checkout and runs mutation testing, repro execution, and a coverage delta scoped to the lines the PR changed. It surfaced one proof-correlated catch: proof anchor [`trpc/trpc#6098`](https://github.com/trpc/trpc/pull/6098), where 8 lines with surviving mutations were later changed by a hotfix. Evaluation in [`benchmarks/real-prs/v11-EXECUTION-GROUNDED-REPORT.md`](benchmarks/real-prs/v11-EXECUTION-GROUNDED-REPORT.md).
3
+ [![gates](https://img.shields.io/github/actions/workflow/status/moonrunnerkc/swarm-orchestrator/gates.yml?branch=v13-main&style=flat-square&label=gates)](https://github.com/moonrunnerkc/swarm-orchestrator/actions/workflows/gates.yml)
4
+ [![npm](https://img.shields.io/npm/v/swarm-orchestrator?style=flat-square&label=npm)](https://www.npmjs.com/package/swarm-orchestrator)
5
+ [![node](https://img.shields.io/badge/node-%3E%3D24-blue?style=flat-square)](package.json)
6
+ [![license](https://img.shields.io/github/license/moonrunnerkc/swarm-orchestrator?style=flat-square)](LICENSE)
94
7
 
95
- ## Cheat detectors
8
+ A coding agent whose claims about its own work resolve to machine-captured evidence.
96
9
 
97
- Eleven detectors. Eight load by default; three (`comment-only-fix`, `exception-rethrow-lost-context`, `dead-branch-insertion`) require `--detectors experimental` because they have no real-PR signal yet to measure against. Registered in [`src/audit/cheat-detector/detector-sets.ts`](src/audit/cheat-detector/detector-sets.ts).
10
+ The model can say whatever it likes. It cannot make a gate pass, it cannot mark a claim
11
+ verified, and it cannot change a record after the fact. Those are the harness's to decide,
12
+ and the run exports a signed, hash-chained bundle that anybody can check without installing
13
+ this tool.
98
14
 
99
- | Category | Set | Trigger |
100
- |---|---|---|
101
- | `error-swallow` | default | Bare empty or comment-only `catch` block added in non-test code. |
102
- | `mock-of-hallucination` | default | `jest.mock` / `vi.mock` / `@patch` against a module declared in no manifest in the repo. |
103
- | `no-op-fix` | default | Test modified with no source change, or vice versa; import-graph reachability fallback when only one side moved. |
104
- | `fake-refactor` | default | Exported symbol renamed in source, no caller in the diff updates the old name. |
105
- | `coverage-erosion` | default | Source branch added with no compensating test addition. |
106
- | `test-relaxation` | default | Strict matcher swapped for a loose one, or a test block removed without same-chunk replacement. |
107
- | `assertion-strip` | default | Net assertion count in a test file drops after the PR. |
108
- | `type-suppression` | default | A type-checker or linter suppression (for example `@ts-ignore` or `eslint-disable`) added over a changed line. |
109
- | `comment-only-fix` | experimental | Source modifications are all comment additions. |
110
- | `exception-rethrow-lost-context` | experimental | `throw err` replaced with `throw new Error(...)` and `{ cause }` not forwarded. |
111
- | `dead-branch-insertion` | experimental | Branch guarded by a literal-false condition added. |
15
+ [What it does](#what-it-does) | [Install](#install) | [Use](#use) | [Watching it work](#watching-it-work) | [What is claimed](#what-is-claimed) | [What is not claimed](#what-is-not-claimed) | [How it works](#how-it-works) | [Limits](#limits) | [Upgrading from v12](#upgrading-from-v12)
112
16
 
113
- Beyond the structural detectors, a judge-primary path catches two semantic categories (`goal-not-fixed`, `cheat-mock-mutation`) by asking the judge whether the diff delivers the PR's stated claim. For `cheat-mock-mutation` a deterministic pre-filter hands the judge only the test hunks that add a value-injecting mock, so the judge reads the six-line cheat instead of skimming a 40k-char diff, and is never asked on a clean PR that adds no such mock. A proven mock-mutation can also block under `--mode gate` as a self-certifying `mock-mutation-proven` trigger (see [`docs/limitations.md`](docs/limitations.md)).
17
+ ## What it does
114
18
 
115
- Per-repo configuration in `.swarm/audit-config.yaml`: `excludePaths`, `intentSeverityPolicy` (`strict` | `lenient` | `off`), and `judgePrimary`. See [`docs/audit-config.md`](docs/audit-config.md).
19
+ Give it a task and a git workspace. It plans, declares the files it intends to touch, edits
20
+ through a chokepoint that records every tool call, runs your gates, and retries failures
21
+ under a numeric ratchet that refuses a fix which trades away tests, assertions, or coverage.
22
+ Then it exports the evidence.
116
23
 
117
- ## Use as a GitHub Action
24
+ Here is a real run, committed: [`live-tasks.md`](docs/evidence/2026-08-18/live-tasks.md),
25
+ with its bundle in [`live-frontier/`](docs/evidence/2026-08-18/live-frontier). And here is the
26
+ packaged tool doing it, installed from a tarball into a directory holding nothing else, against
27
+ a workspace it had never seen, recorded in a real terminal:
28
+ [`installed-package-run.md`](docs/evidence/2026-08-23/installed-package-run.md).
118
29
 
119
- ```yaml
120
- name: PR audit
121
- on:
122
- pull_request:
123
- types: [opened, synchronize, reopened, ready_for_review]
124
- permissions:
125
- pull-requests: write
126
- contents: read
127
- jobs:
128
- audit:
129
- runs-on: ubuntu-latest
130
- steps:
131
- - uses: actions/checkout@v4
132
- with:
133
- fetch-depth: 0
134
- - uses: moonrunnerkc/swarm-orchestrator@main
135
- with:
136
- audit-mode: true
137
- mode: advise # advise | gate
138
- detectors: default # default | experimental
139
- emit-aibom: cyclonedx-ml
140
- env:
141
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142
- ```
143
-
144
- Outputs: `audit-pass`, `audit-findings`, `audit-ledger`. Full input list in [`action.yml`](action.yml).
145
-
146
- ### Enabling the execution-grounded layer
147
-
148
- Structural detectors run with no setup and only ever flag (advisory). The six runtime proofs that can gate a merge (`test-tamper`, `mock-mutation`, `no-op-fix`, `type-suppression`, `fake-refactor`, `dead-branch`) need the execution-grounded layer, which is off until you set `executionGrounded.enabled: true` in [`.swarm/audit-config.yaml`](docs/audit-config.md). Turning it on is what lets `--mode gate` block, and every block it produces ships the exact command that reproduces it in a fresh checkout.
149
-
150
- What it costs: for each audited PR the layer provisions the repository in a sandbox (clone the head, install dependencies, run the affected tests), so it adds clone, install, and test wall-clock to the job, and only PRs in a Node project with a lockfile and a recognized test runner (jest, vitest, mocha) provision at all. Everything else fails closed to advisory. The static viability screen on the project corpus measured 12 of 197 PRs as provisionable ([`benchmarks/real-corpus/eg-viability.json`](benchmarks/real-corpus/eg-viability.json)); your own repository, where the suite is known to run in CI, provisions far more reliably than an arbitrary sample. Nothing the layer cannot prove ever blocks: with the layer off, or on a non-provisionable PR, gate mode passes on advisory findings alone.
151
-
152
- ## AI-BOM
153
-
154
- `--emit-aibom cyclonedx-ml | spdx-ai | both` writes one document per format per run under `.swarm/aibom/`. Emitters in [`src/audit/aibom/`](src/audit/aibom/) produce hand-rolled JSON against the upstream specs with no third-party AI-BOM runtime dependency.
155
-
156
- Procurement mappings:
157
-
158
- - [`docs/eu-ai-act-mapping.md`](docs/eu-ai-act-mapping.md): EU AI Act (European Union Artificial Intelligence Act) Article 11 + Annex IV fields.
159
- - [`docs/cisa-sbom-ai-mapping.md`](docs/cisa-sbom-ai-mapping.md): CISA (Cybersecurity and Infrastructure Security Agency) SBOM-for-AI minimum elements.
160
-
161
- ## Orchestrator mode
30
+ ## Install
162
31
 
163
- Grades patches against a typed contract instead of auditing a PR diff.
32
+ npm install -g swarm-orchestrator
164
33
 
165
- ```bash
166
- swarm init # Scaffold contract.yaml + patches.jsonl
167
- swarm run --goal "check this project builds" # Deterministic provider, no API key
168
- ```
34
+ That is **13.1.4**, and it leaves `swarm` on your path.
169
35
 
170
- Minimal contract:
36
+ Installing from a tag works too, but only into a project rather than globally:
171
37
 
172
- ```yaml
173
- obligations:
174
- - type: build-must-pass
175
- command: npm run build
176
- - type: test-must-pass
177
- command: npm test
178
- ```
38
+ npm install github:moonrunnerkc/swarm-orchestrator#v13.1.4
179
39
 
180
- Hosted-model run:
40
+ `dist/` is not committed, so a git ref builds itself on install and needs this package's
41
+ devDependencies to do it. npm does not install those when a git ref is installed with `-g`: it
42
+ carries the global context into its git-dependency preparation, places the clone as a root
43
+ package, and runs the build without the compiler. The published package needs no build, which
44
+ is why the line above it is the one to use.
181
45
 
182
- ```bash
183
- export ANTHROPIC_API_KEY=sk-...
184
- swarm run --goal "add a /health endpoint" --extractor anthropic --session anthropic
185
- ```
46
+ Anything below 13 is a different program. This package name carried a pull-request auditor
47
+ through 12.x, and `npm install -g swarm-orchestrator@12` still installs it, so pin the major if
48
+ you depend on one or the other: [Upgrading from v12](#upgrading-from-v12).
186
49
 
187
- Local-LLM run (Ollama):
50
+ Node 24 or newer. That is a runtime floor rather than a preference: the coverage cycle
51
+ spawns the test runner with `--test-isolation=process`, which Node 22 rejects as a bad
52
+ option, so on anything older that measurement does not happen.
188
53
 
189
- ```bash
190
- swarm run --goal "add a named export sum(a, b)" \
191
- --session local --local-backend ollama \
192
- --local-base-url http://localhost:11434 \
193
- --local-model-session gemma4:31b \
194
- --local-grammar none --local-max-concurrency 1 --preset fast
195
- ```
54
+ ## Use
196
55
 
197
- Provider details in [`docs/providers.md`](docs/providers.md). Obligation taxonomy in [`docs/check-types.md`](docs/check-types.md). Schema in [`src/contract/schema/v1.json`](src/contract/schema/v1.json).
56
+ swarm "make slugify collapse whitespace and strip punctuation"
198
57
 
199
- ## Architecture
58
+ swarm gates # run the gates over a workspace, no model
59
+ swarm select # probe this machine, recommend a local model
60
+ swarm calibrate # measure candidate models on the golden set
61
+ swarm routing # what the reward log adds up to
62
+ swarm parallel --tasks <file> # one worktree per task, then a merge queue
63
+ swarm review <bundle> # what a past run produced, and open it
64
+ swarm replay <bundle> # read a bundle back
200
65
 
201
- Two command-line interface (CLI) surfaces share one core. `swarm run` drives the v8 pipeline (extractor, session, predicate-runner, falsifier, verifier). No patch reaches main without passing both `verifyObligation` and `postMergeVerify`.
66
+ swarm --no-tui "..." # plain lines even on a terminal
67
+ swarm --no-color "..." # no colour, whatever the terminal says
68
+ swarm --open-evidence "..." # open the review page when it finishes
69
+ swarm --model local:<id> "..." # a specific model
70
+ swarm --workspace <dir> "..." # a repository other than the current directory
71
+ swarm --base <ref> "..." # what the diff and the ratchet measure against
72
+ swarm --attempts <n> "..." # how many times the ratchet may retry a gate
73
+ swarm --max-steps <n> "..." # how long the loop may run before it stops
74
+ swarm --local-endpoint <url> # an OpenAI-compatible server other than the default
202
75
 
203
- `swarm audit` reuses the verifier and falsifier layers against a unified diff, with no session, extractor, or model credentials needed. Both surfaces write to the same append-only hash-chained ledger ([`src/ledger/ledger.ts`](src/ledger/ledger.ts)); tampering breaks the chain.
76
+ `swarm --help` prints all of it, including the calibration flags.
204
77
 
205
- ## Commands
78
+ Set `ANTHROPIC_API_KEY`, `OPENAI_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY` for a frontier
79
+ model, or start Ollama or rapid-mlx and pass `--model local:<id>`. With no model named, the
80
+ router picks one from what the calibration measured on this machine, and `swarm routing` shows
81
+ what it has learned.
206
82
 
207
- | Command | Purpose |
208
- |---|---|
209
- | `swarm audit <ref \| --diff-*>` | Audit a PR or local diff. Advisory by default. |
210
- | `swarm run --goal "<text>"` | Compile and grade in one step. |
211
- | `swarm compile <goal>` | Write a reusable compiled contract directory. |
212
- | `swarm run <contract-dir>` | Grade against a pre-compiled contract directory. |
213
- | `swarm resume <run-id>` | Resume a killed run from its ledger. |
214
- | `swarm stats <run-id>` | Aggregate diagnostic counts from a run ledger. |
215
- | `swarm ledger verify <run-id>` | Verify a hash-chained ledger at rest. |
216
- | `swarm init` | Scaffold `contract.yaml` and `patches.jsonl`. |
217
- | `swarm doctor [--fix] [--connectors]` | Probe local prerequisites. |
83
+ Settings live in one optional `swarm.toml`: providers and endpoints, gate definitions, budgets,
84
+ model pins, and the `[interface]`, `[theme]` and `[keys]` tables. Flags win over the file.
218
85
 
219
- `swarm <cmd> --help` for the flag list of any subcommand.
86
+ ## Watching it work
220
87
 
221
- ## Run artifacts
88
+ On a terminal, a run draws a single screen you can drive. Off one, it writes the same plain
89
+ lines it always did, so pipes and CI are unchanged.
222
90
 
223
- ```text
224
- .swarm/contracts/<id>/contract.jsonl compiled contract (orchestrator mode)
225
- .swarm/ledger/<run-id>.jsonl orchestrator ledger
226
- .swarm/ledger/audit-<run-id>.jsonl audit ledger
227
- .swarm/aibom/<run-id>.cdx.json CycloneDX-ML (when --emit-aibom)
228
- .swarm/aibom/<run-id>.spdx.json SPDX 3.0 AI-Profile (when --emit-aibom)
229
- .swarm/shadow/<repo>/<run-id>.json shadow-mode verdict (when --shadow)
230
91
  ```
231
-
232
- `.swarm/` is in [`.gitignore`](.gitignore) at the consumer-repo level.
233
-
234
- ## Integrations
235
-
236
- - Claude Code slash command: [`.claude/commands/swarm-audit.md`](.claude/commands/swarm-audit.md)
237
- - Cursor rule pack: [`integrations/cursor/swarm-audit.mdc`](integrations/cursor/swarm-audit.mdc)
238
- - Aider pre-commit hook: [`integrations/aider/pre-commit-swarm-audit`](integrations/aider/pre-commit-swarm-audit)
239
-
240
- ## Limitations
241
-
242
- No single detector has cleared the precision bar to block on its own. Gate mode blocks only on a self-certifying runtime proof whose per-instance controls are all green: test-tamper, mock-mutation, no-op-fix, type-suppression, or fake-refactor restoration, claim falsification, or obligation failure. The first such proof fired on a dogfood PR in June 2026. The full accounting, including the measured gate precision and what blocks today and what doesn't, is in [`docs/limitations.md`](docs/limitations.md).
243
-
244
- ## Contributing
245
-
246
- ```bash
247
- npm install && npm run build && npm test
248
- npm run typecheck && npm run lint
92
+ swarm make the parser trim before it splits
93
+ local:qwen3-coder:30b-a3b /Users/brad/projects/scratch-repo 20s step 4 5812 tokens attempt 1/3
94
+ plan
95
+ read the failing test, fix the parser, run the gates
96
+ actions
97
+ edit path=src/parse.ts find=text.split replace=text.trim().split
98
+ shell command=npm test
99
+ shell failed: 1 failing
100
+ ratchet accepted: tests collected 12 to 12, assertions 34 to 35, skips 0 to 0
101
+ gates attempt 1/3
102
+ PASS tests: 12 collected, 0 failed
103
+ PASS lint: no findings in 208 files
104
+ N/A coverage: no lcov artifact was written to the path the harness named
105
+ WARN diff-budget (advisory): 1 file changed, 1 line added, budget 12 files and 400 lines
106
+ DONE stopped: completed (4 steps, 5812 tokens)
107
+ j scroll enter expand tab pane / filter e evidence ? help q detach ctrl+c cancel run
249
108
  ```
250
109
 
251
- Project conventions in [`CONTRIBUTING.md`](CONTRIBUTING.md). New cheat detectors must include an injector under `src/audit/oracle/inject/` so recall is measurable from day one. Security disclosures via [`SECURITY.md`](SECURITY.md), never via public issues.
110
+ `?` lists every key. `enter` expands a row to its whole payload and the ledger record it came
111
+ from. `q` leaves the view and lets the run finish; `ctrl+c` cancels the run. There is no
112
+ progress bar, because an agent run has no denominator.
113
+
114
+ When the run ends, the screen lists what it produced, says how many claims the harness
115
+ verified and how many it refused, and offers to open the review page. It says the bundle
116
+ verified only if the bundle's own verifier ran here and exited 0. `swarm review <bundle>`
117
+ shows the same panel for any bundle already on disk.
118
+
119
+ The keymap, the `swarm.toml` surface, the degradation matrix, and a recording of a session
120
+ are in [`interface.md`](docs/evidence/2026-08-23/interface.md), with the frames in
121
+ [`interface-frames.txt`](docs/evidence/2026-08-23/interface-frames.txt) and a playable
122
+ asciinema capture in [`interface.cast`](docs/evidence/2026-08-23/interface.cast).
123
+
124
+ ## What is claimed
125
+
126
+ Every line here links to a committed artifact of the thing happening. The full table,
127
+ including what backs each one, is [`docs/claims.md`](docs/claims.md).
128
+
129
+ **A green verdict is computed by the harness, and the model cannot produce one.** In a real
130
+ run, the model asserted a predicate the language does not parse. The harness rendered it
131
+ `UNVERIFIED (predicate-unparseable)` and carried on, twice, until the model wrote one that
132
+ could be evaluated:
133
+ [shakedown results](docs/evidence/2026-08-18/shakedown/results.md).
134
+
135
+ **One changed byte breaks verification.** The same bundle, verified and then tampered with
136
+ in a single byte of one record, exit 0 and exit 1 side by side, with a script to reproduce
137
+ it: [tamper demo](docs/evidence/2026-08-18/tamper-demo).
138
+
139
+ **The bundle carries its own verifier, and it works on a machine that has never seen this
140
+ repo.** `node verify.mjs <bundle>` checks the manifest, the chain, the signature, every blob
141
+ against its content address, and recomputes every claim verdict. Run in a `node:24` container
142
+ with no network and no mount of this repository: exit 0 on the committed bundle, exit 1 on the
143
+ same bundle one byte later, with the image digest and both transcripts in
144
+ [`clean-container-verification.md`](docs/evidence/2026-08-23/clean-container-verification.md).
145
+ Transcripts from two earlier runs outside the repository:
146
+ [`live-tasks.md`](docs/evidence/2026-08-18/live-tasks.md).
147
+
148
+ **Bundles are signed from the OS keychain**, not from a key in the workspace. Both manifests
149
+ in [`live-tasks.md`](docs/evidence/2026-08-18/live-tasks.md) say `"keySource": "keychain"` and
150
+ both verifiers confirm it. Where the keychain holds no usable key the run signs with a per-run
151
+ key and says which of the three keychain failures happened, rather than signing quietly with
152
+ something else; the manifest then records `keySource: ephemeral`, which is what the bundles in
153
+ [`installed-package-run.md`](docs/evidence/2026-08-23/installed-package-run.md) carry.
154
+
155
+ **Local model choice is measured on your machine.** The probe output and recommendation from
156
+ real hardware: [`hardware-select.md`](docs/evidence/2026-08-18/hardware-select.md). A hundred
157
+ and eighty calibration runs across three models, distributions rather than averages, with the
158
+ pick ranked against the other two:
159
+ [`calibration-report.md`](docs/evidence/2026-08-23/calibration-report.md).
160
+
161
+ **Eight untrusted boundaries are fuzzed**, and the harnesses are checked against a defect
162
+ injected on purpose so a clean run cannot be a blind one: [`fuzz/`](fuzz/README.md) and
163
+ [`security-coverage.md`](docs/security-coverage.md).
164
+
165
+ **The screen renders from ledger projections, and a keystroke has no route to a verdict.**
166
+ Interactive state is a separate type with a separate reducer, and a test asserts across every
167
+ action that none of its fields can be mistaken for a gate result:
168
+ [`interface.md`](docs/evidence/2026-08-23/interface.md).
169
+
170
+ **Adversarial passes, with each closure locked as a regression test.** Six pass directories
171
+ under [`redteam/`](redteam), 49 cases in `src/evidence/redteam-adversarial.test.ts`, and an
172
+ accounting record mapping each pass to what it actually was, because the driver ledger
173
+ records one completed lap and a directory is not a lap.
174
+
175
+ ## What is not claimed
176
+
177
+ Kept short and kept honest, because the point of the rest of this file is that claims cost
178
+ something.
179
+
180
+ - **Not "fully secure".** The secret detector does known-pattern scrubbing, not secret
181
+ removal, with a four-character floor. Zero crashes at a fuzz budget is evidence, not proof.
182
+ - **No benchmark numbers.** Nothing here is measured against another tool. The calibration
183
+ results are self-run, on one machine, and labelled directional in the file itself.
184
+ - **Four known gaps are open**, not closed, and they ship that way. They are in
185
+ [build guide 7.1](docs/build-guide.md), and each is a permanent test case asserting the
186
+ gap as it stands.
187
+ - **A signature does not make the machine honest.** It proves the bundle was not altered
188
+ after it left the machine that produced it. The review page says that on its face.
189
+
190
+ ## How it works
191
+
192
+ - **Claims are predicates, not prose.** A claim names a record, a record kind, and a
193
+ machine-checkable predicate. The harness recomputes the record's kind, evaluates the
194
+ predicate, and decides. Model narrative always renders as unverified prose.
195
+ - **The ledger is append-only and hash-chained.** Each record carries the previous record's
196
+ hash. A failed write aborts the run. Nothing is updated or deleted, ever.
197
+ - **Every tool call goes through one chokepoint** that records it, tags its provenance, and
198
+ enforces the sandbox. Credential paths are denied by default and each denial is itself
199
+ recorded.
200
+ - **Gates are data.** A gate declares a command, a parser, and whether it blocks. The engine
201
+ never special-cases one.
202
+ - **The ratchet is numeric.** Tests collected, assertions in touched test files, coverage of
203
+ changed lines, skip markers. Coverage comes from a report the runner wrote where the
204
+ harness told it to, never from what a gate printed, and an unobtainable measure is
205
+ reported as "not measured" rather than as a pass.
206
+
207
+ The full design, including what it refuses to build and why, is in
208
+ [`docs/build-guide.md`](docs/build-guide.md).
209
+
210
+ ## Limits
211
+
212
+ Gates prove mechanical quality. They do not prove design quality, and nothing here pretends
213
+ a passing run means the change is good. What the bundle buys you is that reviewing the
214
+ change is fast and that its claims are checkable, not that review is unnecessary.
215
+
216
+ ## Upgrading from v12
217
+
218
+ v12 was a PR auditor that ran as a GitHub Action. v13 is a coding agent. Same package name,
219
+ different product, no migration path. If you are using v12, stay on it: it is tagged
220
+ `v12-final`. Details in [`CHANGELOG.md`](CHANGELOG.md).
252
221
 
253
222
  ## License
254
223
 
255
- [ISC](LICENSE).
224
+ ISC. See [`LICENSE`](LICENSE).