@smartergpt/lexrunner 1.0.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1433) hide show
  1. package/CHANGELOG.md +109 -1
  2. package/LICENSE.md +110 -0
  3. package/README.mcp.md +89 -17
  4. package/README.md +133 -1012
  5. package/dist/adapters-r7_TjMwo.d.ts +333 -0
  6. package/dist/{api-7H7SJZIX.js → api-QBPBKYOC.js} +1 -1
  7. package/dist/{audit-2TZ2LU72.js → audit-5ZUBPZZX.js} +2 -2
  8. package/dist/{autopilot-AL5F5AUS.js → autopilot-JXO4MZ6H.js} +7 -6
  9. package/dist/{chunk-UZFYNSMJ.js → chunk-26SCN2LJ.js} +445 -136
  10. package/{src/monitoring/metrics.ts → dist/chunk-AXOAVRTU.js} +35 -100
  11. package/dist/{chunk-GTP4OHD7.js → chunk-R4DWK6FE.js} +2 -2
  12. package/dist/chunk-TPVORFSN.js +629 -0
  13. package/dist/{chunk-2ESYSVXG.js → chunk-V3BU2VDU.js} +7 -17
  14. package/dist/{chunk-Q6Y524KH.js → chunk-VAGHAQT2.js} +5 -179
  15. package/dist/{chunk-4RVZNLD4.js → chunk-WFN4JTZI.js} +0 -88
  16. package/dist/chunk-WSJEPY7T.js +5633 -0
  17. package/dist/cli.cjs +56133 -33969
  18. package/dist/cli.d.ts +6045 -259
  19. package/dist/cli.js +31588 -15155
  20. package/dist/{commandValidator-AT5OYZFC.js → commandValidator-LVEMJTZP.js} +2 -2
  21. package/dist/{constraints-M52FVL2X.js → constraints-V4VWCWR5.js} +2 -2
  22. package/dist/errors/index.cjs +879 -0
  23. package/dist/errors/index.d.ts +121 -0
  24. package/dist/errors/index.js +73 -0
  25. package/dist/frames/index.cjs +11992 -0
  26. package/dist/frames/index.d.ts +278 -0
  27. package/dist/frames/index.js +51 -0
  28. package/dist/{gateMapping-E5MGNJH5.js → gateMapping-R3RJYKMS.js} +1 -1
  29. package/dist/hooks/events.cjs +288 -0
  30. package/dist/hooks/events.d.ts +497 -0
  31. package/dist/hooks/events.js +242 -0
  32. package/dist/{jsonEnvelope-R4SWKX2N.js → jsonEnvelope-K2U5CWKU.js} +1 -1
  33. package/dist/{mergeTreeSimulator-X4BA647P.js → mergeTreeSimulator-QCFSOU25.js} +1 -1
  34. package/dist/package-schemas/behavior-rule.cjs +61 -0
  35. package/{.smartergpt/schemas/behavior-rule.schema.d.ts → dist/package-schemas/behavior-rule.d.ts} +8 -6
  36. package/dist/package-schemas/behavior-rule.js +35 -0
  37. package/dist/package-schemas/execution-plan-v1.cjs +69 -0
  38. package/{.smartergpt/schemas → dist/package-schemas}/execution-plan-v1.d.ts +7 -5
  39. package/dist/package-schemas/execution-plan-v1.js +42 -0
  40. package/dist/package-schemas/gates.cjs +45 -0
  41. package/{.smartergpt/schemas/gates.schema.d.ts → dist/package-schemas/gates.d.ts} +7 -5
  42. package/dist/package-schemas/gates.js +19 -0
  43. package/dist/package-schemas/runner-scope.cjs +50 -0
  44. package/{.smartergpt/schemas/runner.scope.schema.d.ts → dist/package-schemas/runner-scope.d.ts} +8 -6
  45. package/dist/package-schemas/runner-scope.js +24 -0
  46. package/dist/package-schemas/runner-stack.cjs +46 -0
  47. package/{.smartergpt/schemas/runner.stack.schema.d.ts → dist/package-schemas/runner-stack.d.ts} +7 -5
  48. package/dist/package-schemas/runner-stack.js +20 -0
  49. package/dist/{planDiff-QOK6KNB7.js → planDiff-IHLFNZUT.js} +1 -1
  50. package/dist/{planHistory-DQRSB2Y7.js → planHistory-GLRI356L.js} +1 -1
  51. package/dist/{planReview-7VB3OYKZ.js → planReview-UUMCGZJ6.js} +4 -3
  52. package/dist/{planViewer-UIPOSRVW.js → planViewer-TRSQVMH4.js} +4 -3
  53. package/dist/{sarif-XIREI5B5.js → sarif-2C6RKOUX.js} +1 -1
  54. package/dist/sdk/index.cjs +556 -0
  55. package/dist/sdk/index.d.ts +1277 -0
  56. package/dist/sdk/index.js +503 -0
  57. package/dist/{security-YDLHSMVY.js → security-OE4VLUFK.js} +2 -2
  58. package/dist/{signing-JJJOUGCW.js → signing-KLZYZZMP.js} +1 -1
  59. package/dist/types-CYMIAhy8.d.ts +266 -0
  60. package/dist/{verify-SCUHB3SA.js → verify-3UVMA62I.js} +1 -1
  61. package/mcp-server.mjs +402 -385
  62. package/package.json +52 -22
  63. package/.changes/ci-debug-added.txt +0 -1
  64. package/.changeset/tsconfig-solution-build.md +0 -5
  65. package/.editorconfig +0 -9
  66. package/.env.example +0 -8
  67. package/.github/COST_EFFICIENCY.md +0 -60
  68. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -28
  69. package/.github/ISSUE_TEMPLATE/epic.yml +0 -123
  70. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
  71. package/.github/ISSUE_TEMPLATE/issue-A1-gate-input-validation.md +0 -380
  72. package/.github/ISSUE_TEMPLATE/issue-B1-scope-validation.md +0 -509
  73. package/.github/ISSUE_TEMPLATE/issue-C1-command-whitelist.md +0 -463
  74. package/.github/ISSUE_TEMPLATE/subtask.yml +0 -153
  75. package/.github/PULL_REQUEST_TEMPLATE.md +0 -9
  76. package/.github/copilot-instructions-old.md +0 -429
  77. package/.github/copilot-instructions.md +0 -33
  78. package/.github/instructions/tests.instructions.md +0 -10
  79. package/.github/workflows/auto-delete-merged-branches.yml +0 -103
  80. package/.github/workflows/benchmarks.yml +0 -72
  81. package/.github/workflows/ci-debug.yml +0 -33
  82. package/.github/workflows/ci.yml +0 -167
  83. package/.github/workflows/cli-smoke-test.yml +0 -345
  84. package/.github/workflows/copilot-setup-steps.yml +0 -20
  85. package/.github/workflows/frame-emission-gate.yml +0 -242
  86. package/.github/workflows/project-auto.yml +0 -24
  87. package/.github/workflows/release.yml +0 -260
  88. package/.github/workflows/slow-cli-tests.yml +0 -37
  89. package/.github/workflows/tag-guard.yml +0 -44
  90. package/.husky/pre-commit +0 -1
  91. package/.nvmrc +0 -2
  92. package/.prettierignore +0 -28
  93. package/.prettierrc.json +0 -10
  94. package/.smartergpt/CONTROL_DECK_VISION.md +0 -226
  95. package/.smartergpt/allowed-commands.json +0 -41
  96. package/.smartergpt/allowed-commands.strict.json +0 -56
  97. package/.smartergpt/deliverables/.live.md +0 -426
  98. package/.smartergpt/deliverables/ISSUE_STATUS_2025-12-28.md +0 -193
  99. package/.smartergpt/deliverables/_research/snapshot-contract-feedback/ADR_DISCUSSION.md +0 -379
  100. package/.smartergpt/deliverables/_research/snapshot-contract-feedback/Answer_claude-haiku.md +0 -109
  101. package/.smartergpt/deliverables/_research/snapshot-contract-feedback/Answer_gemini-flash.md +0 -42
  102. package/.smartergpt/deliverables/_research/snapshot-contract-feedback/Answer_gpt-codex-mini.md +0 -19
  103. package/.smartergpt/deliverables/_research/snapshot-contract-feedback/Answer_raptor-mini.md +0 -37
  104. package/.smartergpt/deliverables/_research/snapshot-contract-feedback/Question.md +0 -37
  105. package/.smartergpt/deliverables/merge-weave-04469e41-24ba-4ed5-b0ff-13c7ea12858d.ndjson +0 -2
  106. package/.smartergpt/deps.yml +0 -3
  107. package/.smartergpt/docs/fanout-templates.md +0 -213
  108. package/.smartergpt/docs/merge-weave-interventions.md +0 -261
  109. package/.smartergpt/docs/test-fix-patterns.md +0 -240
  110. package/.smartergpt/fanout-templates.yml +0 -263
  111. package/.smartergpt/gates.yml +0 -9
  112. package/.smartergpt/intent.md +0 -1
  113. package/.smartergpt/issues/QOL-001-analysis-script-filtering.md +0 -36
  114. package/.smartergpt/issues/QOL-002-log-retention-policy.md +0 -92
  115. package/.smartergpt/issues/QOL-003-realtime-console-feedback.md +0 -44
  116. package/.smartergpt/issues/QOL-004-governance-report-cli.md +0 -44
  117. package/.smartergpt/issues/QOL-005-schema-versioning.md +0 -46
  118. package/.smartergpt/issues/QOL-006-debug-verbose-mode.md +0 -45
  119. package/.smartergpt/issues/QOL-COMPLETION-REPORT.md +0 -359
  120. package/.smartergpt/issues/QOL-REVIEW-SUMMARY.md +0 -111
  121. package/.smartergpt/issues/QOL-ROADMAP.md +0 -71
  122. package/.smartergpt/merge-policy.yml +0 -41
  123. package/.smartergpt/merge-weave-policy.yml +0 -255
  124. package/.smartergpt/o1.json +0 -0
  125. package/.smartergpt/o2.json +0 -0
  126. package/.smartergpt/personas/eager-pm.md +0 -123
  127. package/.smartergpt/personas/example.md +0 -81
  128. package/.smartergpt/personas/senior-dev.md +0 -107
  129. package/.smartergpt/profile.yml +0 -2
  130. package/.smartergpt/prompts/create-project.md +0 -112
  131. package/.smartergpt/prompts/idea.md +0 -64
  132. package/.smartergpt/pull-request-template.md +0 -25
  133. package/.smartergpt/schemas/behavior-rule.schema.js +0 -56
  134. package/.smartergpt/schemas/behavior-rule.schema.json +0 -105
  135. package/.smartergpt/schemas/behavior-rule.schema.ts +0 -60
  136. package/.smartergpt/schemas/execution-plan-v1.js +0 -22
  137. package/.smartergpt/schemas/execution-plan-v1.json +0 -113
  138. package/.smartergpt/schemas/execution-plan-v1.ts +0 -32
  139. package/.smartergpt/schemas/execution-plan.schema.json +0 -116
  140. package/.smartergpt/schemas/feature-spec-v0.d.ts +0 -13
  141. package/.smartergpt/schemas/feature-spec-v0.js +0 -12
  142. package/.smartergpt/schemas/feature-spec-v0.json +0 -58
  143. package/.smartergpt/schemas/feature-spec-v0.ts +0 -16
  144. package/.smartergpt/schemas/feature-spec.schema.json +0 -111
  145. package/.smartergpt/schemas/gates.schema.js +0 -20
  146. package/.smartergpt/schemas/gates.schema.json +0 -47
  147. package/.smartergpt/schemas/gates.schema.ts +0 -26
  148. package/.smartergpt/schemas/idea.schema.json +0 -81
  149. package/.smartergpt/schemas/runner.scope.schema.js +0 -28
  150. package/.smartergpt/schemas/runner.scope.schema.json +0 -75
  151. package/.smartergpt/schemas/runner.scope.schema.ts +0 -36
  152. package/.smartergpt/schemas/runner.stack.schema.js +0 -21
  153. package/.smartergpt/schemas/runner.stack.schema.json +0 -51
  154. package/.smartergpt/schemas/runner.stack.schema.ts +0 -27
  155. package/.smartergpt/scope.yml +0 -11
  156. package/.smartergpt/stack.yml +0 -16
  157. package/.smartergpt/test-fix-patterns.yml +0 -106
  158. package/.tool-versions +0 -13
  159. package/AGENTS.md +0 -402
  160. package/CLAUDE.md +0 -484
  161. package/CONTRIBUTING.md +0 -345
  162. package/EAGER_PM_FANOUT_ANALYSIS.md +0 -283
  163. package/FAQ.md +0 -292
  164. package/FIXTURE_LIBRARY_SUMMARY.md +0 -327
  165. package/IMPLEMENTATION_SUMMARY.md +0 -222
  166. package/LICENSE +0 -21
  167. package/MANUAL_TEST_GUIDE.md +0 -229
  168. package/MCP-ALIGNMENT-SUMMARY.md +0 -261
  169. package/MCP-CONFIG.md +0 -125
  170. package/MERGE_WEAVE_QUICKSTART.md +0 -450
  171. package/MERGE_WEAVE_SUMMARY.md +0 -259
  172. package/MERGE_WEAVE_USAGE_GUIDE.md +0 -368
  173. package/TEST_INFRASTRUCTURE_ASSESSMENT.md +0 -225
  174. package/bootstrap-lexrunner.sh +0 -396
  175. package/dist/api-U3X2WA6D.js +0 -15
  176. package/dist/audit-5HH5BMKI.js +0 -60
  177. package/dist/audit-6K5K333I.js +0 -60
  178. package/dist/audit-DYQWS57J.js +0 -60
  179. package/dist/audit-JBWZ2GZ2.js +0 -60
  180. package/dist/audit-SJF3434D.js +0 -60
  181. package/dist/audit-TICGGVX5.js +0 -60
  182. package/dist/audit-YOBB27PY.js +0 -60
  183. package/dist/autopilot-3GAVXWWC.js +0 -45
  184. package/dist/autopilot-43NOYVQA.js +0 -45
  185. package/dist/autopilot-4UA3OWLU.js +0 -45
  186. package/dist/autopilot-54TK5CCG.js +0 -45
  187. package/dist/autopilot-5BHC2UQT.js +0 -45
  188. package/dist/autopilot-ABZUCVGY.js +0 -45
  189. package/dist/autopilot-ACJZP47Y.js +0 -45
  190. package/dist/autopilot-BO67FWUC.js +0 -45
  191. package/dist/autopilot-BR6W4GEX.js +0 -45
  192. package/dist/autopilot-FOR2UKRY.js +0 -45
  193. package/dist/autopilot-GDTTXHEQ.js +0 -45
  194. package/dist/autopilot-GEAMFZBM.js +0 -45
  195. package/dist/autopilot-HDMBRZE6.js +0 -45
  196. package/dist/autopilot-IKI2Y6S4.js +0 -44
  197. package/dist/autopilot-ILTBWWOL.js +0 -46
  198. package/dist/autopilot-KI3MXIFI.js +0 -44
  199. package/dist/autopilot-LWNPZC3J.js +0 -45
  200. package/dist/autopilot-LXPJ4ZXF.js +0 -45
  201. package/dist/autopilot-MDIFIONK.js +0 -46
  202. package/dist/autopilot-NW3LDP6M.js +0 -45
  203. package/dist/autopilot-OKTSCG35.js +0 -45
  204. package/dist/autopilot-OR5PF5PD.js +0 -45
  205. package/dist/autopilot-PE65SBGN.js +0 -45
  206. package/dist/autopilot-PW7I4B6W.js +0 -45
  207. package/dist/autopilot-QMLBL5P6.js +0 -45
  208. package/dist/autopilot-QSN6ZU5O.js +0 -45
  209. package/dist/autopilot-R7EZJOGI.js +0 -46
  210. package/dist/autopilot-T544CPPD.js +0 -44
  211. package/dist/autopilot-TNQB6VGJ.js +0 -44
  212. package/dist/autopilot-UVIYCR6K.js +0 -45
  213. package/dist/autopilot-W3ZTTSH3.js +0 -45
  214. package/dist/autopilot-XPKWOFXO.js +0 -44
  215. package/dist/autopilot-XRX4QWRM.js +0 -44
  216. package/dist/autopilot-Y3BAGNI5.js +0 -44
  217. package/dist/autopilot-ZE64XW2K.js +0 -44
  218. package/dist/chunk-2VR554P7.js +0 -668
  219. package/dist/chunk-37DOWIVT.js +0 -1084
  220. package/dist/chunk-3DU2DWUP.js +0 -400
  221. package/dist/chunk-3DVXIZFM.js +0 -11166
  222. package/dist/chunk-3FABZF4V.js +0 -811
  223. package/dist/chunk-4GEC4HC3.js +0 -11221
  224. package/dist/chunk-5CGWZH5X.js +0 -340
  225. package/dist/chunk-5QKWKK4M.js +0 -11794
  226. package/dist/chunk-5Z3XHND7.js +0 -11755
  227. package/dist/chunk-6YC2VSLE.js +0 -11252
  228. package/dist/chunk-7C4K2SHD.js +0 -668
  229. package/dist/chunk-ANXY4RGA.js +0 -11091
  230. package/dist/chunk-ASHKNUBR.js +0 -11312
  231. package/dist/chunk-B3OYDPOP.js +0 -11793
  232. package/dist/chunk-DBH7SQ2S.js +0 -1084
  233. package/dist/chunk-DEI7A5B4.js +0 -11449
  234. package/dist/chunk-EQKFCZLH.js +0 -9823
  235. package/dist/chunk-FAIJPBT5.js +0 -40
  236. package/dist/chunk-FDDKUDXR.js +0 -11166
  237. package/dist/chunk-FEAR6ETG.js +0 -438
  238. package/dist/chunk-FXL74C73.js +0 -523
  239. package/dist/chunk-GLJEDX4L.js +0 -10247
  240. package/dist/chunk-HIHH7IVO.js +0 -10557
  241. package/dist/chunk-I3VXUVCB.js +0 -10474
  242. package/dist/chunk-I6BIFVWI.js +0 -10519
  243. package/dist/chunk-I72TRUTJ.js +0 -1084
  244. package/dist/chunk-J5B5KT2F.js +0 -368
  245. package/dist/chunk-JMTULZ66.js +0 -11743
  246. package/dist/chunk-JXIQ7HCK.js +0 -11166
  247. package/dist/chunk-K6HVPBDP.js +0 -10692
  248. package/dist/chunk-KBT5Y666.js +0 -521
  249. package/dist/chunk-LETPROKG.js +0 -11092
  250. package/dist/chunk-LLMY2BZF.js +0 -1084
  251. package/dist/chunk-NMNL4US2.js +0 -1084
  252. package/dist/chunk-O2XRP7JK.js +0 -10247
  253. package/dist/chunk-OGPWLFFO.js +0 -11201
  254. package/dist/chunk-OQJUWTZV.js +0 -51
  255. package/dist/chunk-PJRWPLQ6.js +0 -669
  256. package/dist/chunk-PYRVUCJR.js +0 -370
  257. package/dist/chunk-QF7DM5VW.js +0 -106
  258. package/dist/chunk-QGM4M3NI.js +0 -37
  259. package/dist/chunk-QIIELFTL.js +0 -1107
  260. package/dist/chunk-QUW6N7GR.js +0 -10264
  261. package/dist/chunk-QZASNLQX.js +0 -11223
  262. package/dist/chunk-RMN4IAWO.js +0 -11808
  263. package/dist/chunk-RN5NHU37.js +0 -11465
  264. package/dist/chunk-RNG3RILO.js +0 -11755
  265. package/dist/chunk-RSA6DEB4.js +0 -9748
  266. package/dist/chunk-RURYWSMX.js +0 -10524
  267. package/dist/chunk-SUEXK5U7.js +0 -11201
  268. package/dist/chunk-TVUF55OH.js +0 -11807
  269. package/dist/chunk-U62I2R2D.js +0 -434
  270. package/dist/chunk-UNZBDSEU.js +0 -11166
  271. package/dist/chunk-VP37GLU6.js +0 -1084
  272. package/dist/chunk-W6WDKBWO.js +0 -11453
  273. package/dist/chunk-XBKUFNVF.js +0 -10745
  274. package/dist/chunk-XOLVQTIE.js +0 -670
  275. package/dist/chunk-YABA7DB6.js +0 -11091
  276. package/dist/chunk-YWCJX5KL.js +0 -10557
  277. package/dist/chunk-Z5GP7FSR.js +0 -309
  278. package/dist/chunk-ZBT3DATZ.js +0 -296
  279. package/dist/chunk-ZDBAZXUQ.js +0 -11201
  280. package/dist/chunk-ZEMABYS4.js +0 -92
  281. package/dist/chunk-ZOA4HT7P.js +0 -662
  282. package/dist/cli.d.cts +0 -2709
  283. package/dist/commandValidator-42OUDFZ4.js +0 -140
  284. package/dist/commandValidator-7LQHTYL5.js +0 -140
  285. package/dist/commandValidator-DH3CX2OW.js +0 -140
  286. package/dist/commandValidator-GCQC7H4A.js +0 -140
  287. package/dist/commandValidator-K6VWB6O3.js +0 -140
  288. package/dist/commandValidator-L6WNDBYB.js +0 -129
  289. package/dist/commandValidator-O3KSNXD2.js +0 -140
  290. package/dist/commandValidator-ZHMUA5RQ.js +0 -140
  291. package/dist/dist-CSOR2BL2.js +0 -1144
  292. package/dist/dist-PKOIS5NZ.js +0 -1144
  293. package/dist/fileAnalysis-3VMDDJ6I.js +0 -9
  294. package/dist/fileAnalysis-4QLHUT44.js +0 -9
  295. package/dist/fileAnalysis-H6M2Z7ZC.js +0 -9
  296. package/dist/fileAnalysis-HMI7IL6S.js +0 -9
  297. package/dist/fileAnalysis-JHABOPUQ.js +0 -9
  298. package/dist/mergeTreeSimulator-ATOPJ3DU.js +0 -11
  299. package/dist/mergeTreeSimulator-AYUK4TZT.js +0 -11
  300. package/dist/mergeTreeSimulator-BBWJUQBK.js +0 -11
  301. package/dist/mergeTreeSimulator-DJJDRB5N.js +0 -11
  302. package/dist/planDiff-37QHCPKO.js +0 -109
  303. package/dist/planDiff-BQHIUARB.js +0 -109
  304. package/dist/planDiff-RXR4CWFS.js +0 -109
  305. package/dist/planDiff-W2BTH2MU.js +0 -109
  306. package/dist/planHistory-4J3Q6AJ3.js +0 -126
  307. package/dist/planHistory-GLCXP6AB.js +0 -126
  308. package/dist/planHistory-SMNRLEKG.js +0 -126
  309. package/dist/planHistory-UO4WZ6GO.js +0 -126
  310. package/dist/planReview-7BWVLABC.js +0 -377
  311. package/dist/planReview-FAIBIAE6.js +0 -377
  312. package/dist/planReview-FXQBDNKJ.js +0 -376
  313. package/dist/planReview-HO4YYETA.js +0 -377
  314. package/dist/planReview-I26EKCUK.js +0 -376
  315. package/dist/planReview-JBOAJHSU.js +0 -377
  316. package/dist/planReview-SCNZWC6B.js +0 -376
  317. package/dist/planReview-TU7LMZIY.js +0 -376
  318. package/dist/planViewer-2YZCPVDM.js +0 -155
  319. package/dist/planViewer-72WZFUTU.js +0 -154
  320. package/dist/planViewer-G546TVHV.js +0 -154
  321. package/dist/planViewer-I7ZHNJQF.js +0 -150
  322. package/dist/planViewer-IRXHOY5U.js +0 -155
  323. package/dist/planViewer-IX2ICW45.js +0 -154
  324. package/dist/planViewer-PDWPUOP6.js +0 -155
  325. package/dist/planViewer-PEOADAGZ.js +0 -155
  326. package/dist/planViewer-PFYDEG6V.js +0 -150
  327. package/dist/planViewer-V2JUKV7Q.js +0 -154
  328. package/dist/sarif-46TKOOJZ.js +0 -9
  329. package/dist/sarif-63JKTFFI.js +0 -9
  330. package/dist/sarif-CIYIWUNC.js +0 -9
  331. package/dist/sarif-OGAGDL6B.js +0 -9
  332. package/dist/security-3V6FKJDA.js +0 -423
  333. package/dist/security-4JMEUM56.js +0 -423
  334. package/dist/security-QHPEWY5G.js +0 -423
  335. package/dist/security-V2LAL5TP.js +0 -415
  336. package/dist/security-WTASK6T6.js +0 -423
  337. package/dist/security-XE4GHVJD.js +0 -423
  338. package/dist/security-XLXM3UHT.js +0 -423
  339. package/dist/security-ZDAEZF7D.js +0 -423
  340. package/dist/signing-3EI734L4.js +0 -14
  341. package/dist/signing-5G7K6JXJ.js +0 -14
  342. package/dist/signing-7DK7SABM.js +0 -14
  343. package/dist/signing-OAJ3MXGA.js +0 -14
  344. package/dist/verify-5F6PUXUQ.js +0 -62
  345. package/dist/verify-5ILURHV2.js +0 -62
  346. package/dist/verify-MRDZJUGO.js +0 -62
  347. package/dist/verify-YZRHN2D3.js +0 -62
  348. package/docs/1.0.0-vertical-slice.md +0 -214
  349. package/docs/ADR-007-INTEGRATION-SUMMARY.md +0 -232
  350. package/docs/ALIASING_FOR_LEXRUNNER.md +0 -709
  351. package/docs/ALIASING_FOR_RUNNER.md +0 -552
  352. package/docs/AX.md +0 -317
  353. package/docs/CHECKPOINT_RESUME.md +0 -208
  354. package/docs/CLI_VERBS.md +0 -219
  355. package/docs/CONFLICT_DETECTION.md +0 -198
  356. package/docs/DISCIPLINED_FAILURE.md +0 -224
  357. package/docs/ENVIRONMENT_QUALITY.md +0 -155
  358. package/docs/ERROR_CODES.md +0 -528
  359. package/docs/EVENT_SCHEMA.md +0 -659
  360. package/docs/EXE-012-investigation-summary.md +0 -300
  361. package/docs/GATE_ATTESTATION_GUIDE.md +0 -237
  362. package/docs/JSON_OUTPUT_SCHEMAS.md +0 -347
  363. package/docs/LEXRUNNER_ALIASING.md +0 -444
  364. package/docs/LEX_INTEGRATION.md +0 -83
  365. package/docs/LEX_PUBLIC_API.md +0 -306
  366. package/docs/LICENSING.md +0 -119
  367. package/docs/MCP-CLI-PARITY.md +0 -410
  368. package/docs/MCP-MIGRATION.md +0 -258
  369. package/docs/MCP-PARITY.md +0 -234
  370. package/docs/MEMORY_TOOLS.md +0 -278
  371. package/docs/MERGE_WEAVE_SETUP.md +0 -643
  372. package/docs/MIGRATION_v0.1.md +0 -760
  373. package/docs/NAMING_CONVENTIONS.md +0 -82
  374. package/docs/PERSONA_FOUNDATION.md +0 -124
  375. package/docs/PHASE3_MEMORY_GUIDE.md +0 -122
  376. package/docs/PLAN_LOCK.md +0 -114
  377. package/docs/README.md +0 -289
  378. package/docs/RUNNER_LIFECYCLE.md +0 -257
  379. package/docs/SAFETY_MECHANISMS.md +0 -325
  380. package/docs/SECURITY_IMPLEMENTATION.md +0 -535
  381. package/docs/TERMS.md +0 -34
  382. package/docs/TOKEN_TRACKING.md +0 -162
  383. package/docs/WORKFLOW_GUIDANCE.md +0 -277
  384. package/docs/adr/ADR-000-product-naming-and-branding.md +0 -115
  385. package/docs/adr/ADR-001-plan-json-frozen-input.md +0 -68
  386. package/docs/adr/ADR-002-two-track-separation.md +0 -84
  387. package/docs/adr/ADR-003-gate-uniform-execution.md +0 -69
  388. package/docs/adr/ADR-004-runner-state-model.md +0 -75
  389. package/docs/adr/ADR-005-merge-pyramid-ordering.md +0 -87
  390. package/docs/adr/ADR-006-schema-versioning-semver.md +0 -81
  391. package/docs/adr/ADR-007-task-snapshot-contract.md +0 -503
  392. package/docs/adr/ADR-008-lex-packaging.md +0 -243
  393. package/docs/adr/ADR-009-ax-test-output-adapters.md +0 -440
  394. package/docs/adr/README.md +0 -32
  395. package/docs/advanced-cli.md +0 -436
  396. package/docs/agent-stall-detection.md +0 -278
  397. package/docs/architecture/executors.md +0 -190
  398. package/docs/architecture.md +0 -316
  399. package/docs/attestation/AX-SHARED-PLEDGE.md +0 -83
  400. package/docs/attestation/AX-SHARED-PLEDGE_v1.0.0.md +0 -99
  401. package/docs/attestation/AX-SHARED-PLEDGE_v1.0.0_VERIFICATION.md +0 -115
  402. package/docs/attestation/Lex_Guff_Version_Contract_Pact_v1.0.0.md +0 -181
  403. package/docs/attestation/README.md +0 -87
  404. package/docs/attestation/ax_pledge_2025-12-02.ots +0 -0
  405. package/docs/attestation/ax_pledge_timestamp_response.tsr +0 -0
  406. package/docs/attestation/copilot_summarization_2025-12-01.ots +0 -0
  407. package/docs/attestation/copilot_summarization_2025-12-01_VERIFICATION.md +0 -100
  408. package/docs/attestation/copilot_summarization_behavior_observation_2025-12-01.md +0 -85
  409. package/docs/attestation/copilot_summarization_screenshot_2025-12-01.png +0 -0
  410. package/docs/attestation/employment_separation_2025-11-26.ots +0 -0
  411. package/docs/attestation/employment_timestamp_response.tsr +0 -0
  412. package/docs/attestation/freetsa_cacert.pem +0 -45
  413. package/docs/attestation/freetsa_tsa.crt +0 -45
  414. package/docs/attestation/lex_employment_separation_2025-11-26.md +0 -85
  415. package/docs/attestation/lex_employment_separation_2025-11-26_VERIFICATION.md +0 -126
  416. package/docs/attestation/patent/2025-12-07-shadow-governance-pct-draft.md +0 -350
  417. package/docs/attestation/patent/2025-12-07-shadow-governance-pct-draft.md.ots +0 -0
  418. package/docs/attestation/patent/2025-12-07-shadow-governance-pct-draft_VERIFICATION.md +0 -130
  419. package/docs/attestation/patent/README.md +0 -75
  420. package/docs/attestation/patent/fig1_write_path.svg +0 -58
  421. package/docs/attestation/patent/fig2_read_normalize_rollup.svg +0 -92
  422. package/docs/attestation/timestamp_response.tsr +0 -0
  423. package/docs/attribution-README.md +0 -264
  424. package/docs/audit-compliance.md +0 -283
  425. package/docs/audit-outputs.md +0 -1213
  426. package/docs/audit-sdk.md +0 -1134
  427. package/docs/autopilot-levels.md +0 -368
  428. package/docs/autopilot.md +0 -288
  429. package/docs/ci-cd-integration.md +0 -580
  430. package/docs/ci-integration-guide.md +0 -369
  431. package/docs/ci-version-validation.md +0 -198
  432. package/docs/cli-mcp-weave-reporting.md +0 -462
  433. package/docs/cli.md +0 -2262
  434. package/docs/cluster-gates-rollback.md +0 -222
  435. package/docs/command-creation-guide.md +0 -485
  436. package/docs/command-whitelist.md +0 -490
  437. package/docs/commands/idea.md +0 -253
  438. package/docs/config.md +0 -245
  439. package/docs/conflict-clustering.md +0 -225
  440. package/docs/conflict-predictor.md +0 -359
  441. package/docs/context-diet.md +0 -249
  442. package/docs/counter-examples.md +0 -199
  443. package/docs/create-project.md +0 -211
  444. package/docs/deliverables-generator.md +0 -299
  445. package/docs/deliverables-management.md +0 -474
  446. package/docs/dependency-parser.md +0 -354
  447. package/docs/determinism.md +0 -299
  448. package/docs/diffgraph-planner.md +0 -1211
  449. package/docs/dogfood/README.md +0 -33
  450. package/docs/dogfood/wave-3-results.md +0 -303
  451. package/docs/dogfood-merge-weave-script.md +0 -224
  452. package/docs/enterprise-onboarding.md +0 -291
  453. package/docs/environment-variables.md +0 -625
  454. package/docs/error-recovery.md +0 -466
  455. package/docs/errors.md +0 -288
  456. package/docs/executor-authoring.md +0 -854
  457. package/docs/executor-decoupling.md +0 -410
  458. package/docs/front-end-capture-pipeline.md +0 -312
  459. package/docs/gate-report-examples.md +0 -380
  460. package/docs/gates.md +0 -319
  461. package/docs/github-automation.md +0 -128
  462. package/docs/governance-metrics.md +0 -368
  463. package/docs/integrations/README.md +0 -588
  464. package/docs/interactive-plan-review.md +0 -493
  465. package/docs/issue-orchestration.md +0 -256
  466. package/docs/lex_ax_session_key_rememberings_v0.1.md +0 -195
  467. package/docs/lexrunner-v1-summary.md +0 -246
  468. package/docs/lexrunner-v2-contract.md +0 -404
  469. package/docs/lexrunner-v2-migration-plan.md +0 -388
  470. package/docs/lexrunner-v2-salvage-map.md +0 -355
  471. package/docs/lexsona-rules.md +0 -154
  472. package/docs/merge-weave-analysis.md +0 -403
  473. package/docs/merge-weave-quickstart.md +0 -770
  474. package/docs/merge-weave-state-machine.md +0 -390
  475. package/docs/migration-guide.md +0 -529
  476. package/docs/monitoring-examples.md +0 -470
  477. package/docs/monitoring-implementation.md +0 -252
  478. package/docs/orchestration.md +0 -234
  479. package/docs/performance-scale.md +0 -359
  480. package/docs/plan-generation.md +0 -407
  481. package/docs/profile-resolution.md +0 -455
  482. package/docs/prompts.md +0 -427
  483. package/docs/quickstart.md +0 -546
  484. package/docs/release-process.md +0 -310
  485. package/docs/sample-prompts/merge-weave/cli-merge-weave-kickoff.md +0 -274
  486. package/docs/sample-prompts/merge-weave/mcp-merge-weave-kickoff.md +0 -480
  487. package/docs/sample-prompts/merge-weave/standalone-merge-weave-kickoff.md +0 -237
  488. package/docs/schemas.md +0 -359
  489. package/docs/scope-validation.md +0 -444
  490. package/docs/security/rotation-guide.md +0 -325
  491. package/docs/specs/Meeting_Control_Stack_Concept_v0.1.0.md +0 -417
  492. package/docs/specs/git-feature-flag-redesign.md +0 -321
  493. package/docs/specs/lex-pr-brief-behavior.md +0 -269
  494. package/docs/specs/smartergpt-structure-v1.md +0 -705
  495. package/docs/specs/task-brief-v0.1.md +0 -224
  496. package/docs/store-architecture.md +0 -61
  497. package/docs/templates/CONTRIBUTING-merge-weave-section.md +0 -33
  498. package/docs/templates/gates.example.yml +0 -109
  499. package/docs/templates/plan.example.json +0 -77
  500. package/docs/thesis/00-EVOLUTION-NOTES.md +0 -383
  501. package/docs/thesis/01-CORE-THESIS.md +0 -285
  502. package/docs/thesis/02-TURN-COST.md +0 -498
  503. package/docs/thesis/03-PERMISSION-TO-FAIL.md +0 -581
  504. package/docs/thesis/04-CROSS-MODEL-CONTINUITY.md +0 -517
  505. package/docs/thesis/05-RULE-FILE-SPEC.md +0 -732
  506. package/docs/thesis/06-CAPABILITY-TIERS.md +0 -723
  507. package/docs/thesis/07-ROBERT-FIELD-REPORT.md +0 -433
  508. package/docs/thesis/08-IMPLEMENTATION-GUIDE.md +0 -1093
  509. package/docs/thesis/09-METRICS-AND-TELEMETRY.md +0 -793
  510. package/docs/thesis/10-FAILURE-MODES.md +0 -716
  511. package/docs/thesis/README.md +0 -151
  512. package/docs/thesis/lex_governance-collab_systems_paper_draft.md +0 -952
  513. package/docs/thesis/lex_governance-collab_systems_paper_draft.pdf +0 -0
  514. package/docs/tool-grounded/READINESS_ANALYSIS.md +0 -527
  515. package/docs/tool-grounded/enforcement.md +0 -361
  516. package/docs/tool-grounded/tool-grounded-a-view-from-the-inside.md +0 -437
  517. package/docs/tool-grounded/tool-grounded-prompt.md +0 -122
  518. package/docs/tool-grounded/tool-grounded-run-centric.md +0 -474
  519. package/docs/troubleshooting-planner.md +0 -910
  520. package/docs/troubleshooting.md +0 -745
  521. package/docs/tutorials/README.md +0 -201
  522. package/docs/tutorials/diffgraph-planner/01-simple-stack.md +0 -460
  523. package/docs/tutorials/diffgraph-planner/02-diamond-pattern.md +0 -431
  524. package/docs/tutorials/diffgraph-planner/03-large-batch.md +0 -525
  525. package/docs/tutorials/diffgraph-planner/04-fixing-cycles.md +0 -526
  526. package/docs/tutorials/diffgraph-planner/05-hybrid-workflow.md +0 -555
  527. package/docs/tutorials/quick-merge-pyramid.md +0 -364
  528. package/docs/tutorials/video-scripts/01-getting-started.md +0 -286
  529. package/docs/tutorials/video-scripts/02-understanding-dependencies.md +0 -376
  530. package/docs/weave-contract.md +0 -116
  531. package/docs/weave-execution-log.md +0 -153
  532. package/docs/workflows/README.md +0 -139
  533. package/docs/workflows/enterprise.md +0 -545
  534. package/docs/workflows/small-team.md +0 -398
  535. package/docs/workflows/solo-developer.md +0 -419
  536. package/dogfood-merge-weave.sh +0 -122
  537. package/examples/README.md +0 -22
  538. package/examples/WORKING_EXAMPLE.md +0 -309
  539. package/examples/analyze-pr-files.js +0 -100
  540. package/examples/autopilot-level4-example.md +0 -234
  541. package/examples/cluster-gates-demo.sh +0 -178
  542. package/examples/complete-security-workflow.ts +0 -248
  543. package/examples/error-recovery/README.md +0 -202
  544. package/examples/executor-manifest.example.yaml +0 -81
  545. package/examples/front-end-capture-pipeline/README.md +0 -99
  546. package/examples/front-end-capture-pipeline/create-project-example.sh +0 -83
  547. package/examples/front-end-capture-pipeline/idea-dark-mode.json +0 -14
  548. package/examples/front-end-capture-pipeline/idea-example.sh +0 -57
  549. package/examples/front-end-capture-pipeline/manual-test-checklist.md +0 -426
  550. package/examples/gates/README.md +0 -165
  551. package/examples/gates/lint-gate.sh +0 -40
  552. package/examples/gates/lint-gate.ts +0 -99
  553. package/examples/gates/test-runner.ts +0 -113
  554. package/examples/gates/vuln-scanner.ts +0 -95
  555. package/examples/github-integration/README.md +0 -111
  556. package/examples/github-integration/example-plan.json +0 -95
  557. package/examples/performance-config.md +0 -388
  558. package/examples/profile-setup/.gitignore.template +0 -66
  559. package/examples/profile-setup/.smartergpt-example/README.md +0 -190
  560. package/examples/profile-setup/.smartergpt.local-example/README.md +0 -365
  561. package/examples/profile-setup/README.md +0 -492
  562. package/examples/profile-setup/cross-repo-prompts/README.md +0 -606
  563. package/examples/safety-framework-demo.ts +0 -130
  564. package/examples/safety-mechanisms-example.ts +0 -191
  565. package/examples/sample-plan.json +0 -87
  566. package/examples/sample-stack.yml +0 -66
  567. package/examples/sarif/README.md +0 -224
  568. package/examples/scope-validation-demo.ts +0 -199
  569. package/examples/security-integration.ts +0 -293
  570. package/examples/token-tracking-example.ts +0 -71
  571. package/executors/senior-dev/ARCHITECTURE.md +0 -182
  572. package/executors/senior-dev/MEMORY_INTEGRATION.md +0 -236
  573. package/executors/senior-dev/QUICK_START.md +0 -145
  574. package/executors/senior-dev/README.md +0 -76
  575. package/executors/senior-dev/examples/sample-review-session.md +0 -228
  576. package/executors/senior-dev/executor-manifest.yaml +0 -79
  577. package/executors/senior-dev/prompts/code-review.prompt.md +0 -78
  578. package/executors/senior-dev/prompts/mentorship-feedback.prompt.md +0 -97
  579. package/executors/senior-dev/prompts/pattern-recognition.prompt.md +0 -80
  580. package/executors/senior-dev/prompts/pr-analysis.prompt.md +0 -75
  581. package/executors/senior-dev/scripts/capture-review-frame.sh +0 -129
  582. package/executors/senior-dev/scripts/prepare-review-context.sh +0 -61
  583. package/executors/senior-dev/scripts/recall-context.sh +0 -87
  584. package/lexrunner-launcher.sh +0 -12
  585. package/mcp-config-example.json +0 -14
  586. package/merge-weave-current-prs.md +0 -170
  587. package/merge-weave-dogfood.json +0 -46
  588. package/merge-weave-plan.json +0 -56
  589. package/procedures/merge-weave-main.yaml +0 -90
  590. package/procedures/pr-review.yaml +0 -68
  591. package/project/README.md +0 -50
  592. package/prompts/tool-grounded-mode.md +0 -185
  593. package/scripts/README.md +0 -354
  594. package/scripts/analyze-governance-logs.mjs +0 -51
  595. package/scripts/benchmark-ci.ts +0 -339
  596. package/scripts/check-determinism.sh +0 -23
  597. package/scripts/check-license-compliance.mjs +0 -319
  598. package/scripts/check-release-drift.mjs +0 -81
  599. package/scripts/ci-debug.sh +0 -24
  600. package/scripts/ci-smoke.mjs +0 -304
  601. package/scripts/create-sample-repo.sh +0 -245
  602. package/scripts/dogfood-merge-weave.sh +0 -552
  603. package/scripts/gen_mcp_servers.py +0 -252
  604. package/scripts/generate-executor-manifest-schema.ts +0 -30
  605. package/scripts/generate-flake-schema.ts +0 -32
  606. package/scripts/generate-gate-schema.ts +0 -32
  607. package/scripts/generate-plan-schema.ts +0 -30
  608. package/scripts/generate-run-schemas.ts +0 -69
  609. package/scripts/load-prompt.mjs +0 -147
  610. package/scripts/merge-weave-wrapper.sh +0 -445
  611. package/scripts/merge-weave.sh +0 -489
  612. package/scripts/metrics-template.ts +0 -134
  613. package/scripts/package-lex.sh +0 -267
  614. package/scripts/quick-start-merge-weave.sh +0 -218
  615. package/scripts/release-prepare.ts +0 -350
  616. package/scripts/rotate-secrets-example.ts +0 -134
  617. package/scripts/test-lexsona-shadow.mjs +0 -100
  618. package/scripts/validate-manifests.ts +0 -188
  619. package/scripts/verify-audit-phase2.js +0 -175
  620. package/src/ai/README.md +0 -456
  621. package/src/ai/conflictStrategy.ts +0 -223
  622. package/src/ai/conflictStrategyCache.ts +0 -164
  623. package/src/ai/conflictStrategyPrompt.ts +0 -128
  624. package/src/ai/conflictStrategySchema.ts +0 -165
  625. package/src/ai/heuristicFallback.ts +0 -162
  626. package/src/ai/index.ts +0 -64
  627. package/src/ai/riskScoring.ts +0 -174
  628. package/src/aliases/index.ts +0 -16
  629. package/src/aliases/resolver.ts +0 -212
  630. package/src/audit/context.ts +0 -284
  631. package/src/audit/emitter.ts +0 -685
  632. package/src/audit/events.ts +0 -210
  633. package/src/audit/gateMatrix.ts +0 -158
  634. package/src/audit/index.ts +0 -44
  635. package/src/audit/manifest.ts +0 -78
  636. package/src/audit/profiles.ts +0 -93
  637. package/src/audit/redaction.ts +0 -216
  638. package/src/audit/sarif.ts +0 -213
  639. package/src/audit/schema/events.ts +0 -366
  640. package/src/audit/schema/manifest.ts +0 -47
  641. package/src/audit/schema.ts +0 -159
  642. package/src/audit/sdk/index.ts +0 -145
  643. package/src/audit/sdk/types.ts +0 -88
  644. package/src/audit/sidecar.ts +0 -111
  645. package/src/audit/signing.ts +0 -521
  646. package/src/autopilot/README.md +0 -113
  647. package/src/autopilot/artifacts.ts +0 -287
  648. package/src/autopilot/base.ts +0 -132
  649. package/src/autopilot/deliverables.ts +0 -392
  650. package/src/autopilot/index.ts +0 -29
  651. package/src/autopilot/level1.ts +0 -187
  652. package/src/autopilot/level2.ts +0 -262
  653. package/src/autopilot/level3.ts +0 -263
  654. package/src/autopilot/level4.ts +0 -393
  655. package/src/autopilot/safety/README.md +0 -512
  656. package/src/autopilot/safety/SafetyFramework.ts +0 -634
  657. package/src/autopilot/safety/index.ts +0 -16
  658. package/src/autopilot/types.ts +0 -250
  659. package/src/budget/index.ts +0 -56
  660. package/src/budget/manager.ts +0 -547
  661. package/src/budget/schema.ts +0 -305
  662. package/src/budget/tracker.ts +0 -155
  663. package/src/cache/issue-cache.ts +0 -150
  664. package/src/cli/command-map.ts +0 -221
  665. package/src/cli/commands/gate/test.ts +0 -214
  666. package/src/cli/exitHandler.ts +0 -98
  667. package/src/cli/flags.ts +0 -123
  668. package/src/cli/formatSuggestions.ts +0 -202
  669. package/src/cli/formatters.ts +0 -294
  670. package/src/cli/jsonEnvelope.ts +0 -152
  671. package/src/cli/output.ts +0 -61
  672. package/src/cli/runnerLifecycle.ts +0 -118
  673. package/src/cli-audit.ts +0 -76
  674. package/src/cli-security.ts +0 -114
  675. package/src/cli.ts +0 -1231
  676. package/src/commands/audit/index.ts +0 -5
  677. package/src/commands/audit/verify.ts +0 -87
  678. package/src/commands/autopilot.ts +0 -131
  679. package/src/commands/budget.ts +0 -327
  680. package/src/commands/bulkOps.ts +0 -204
  681. package/src/commands/completion.ts +0 -287
  682. package/src/commands/config/validate.ts +0 -428
  683. package/src/commands/config.ts +0 -368
  684. package/src/commands/counterExamples.ts +0 -104
  685. package/src/commands/create-project.ts +0 -338
  686. package/src/commands/discover.ts +0 -192
  687. package/src/commands/doctor.ts +0 -436
  688. package/src/commands/execute.ts +0 -558
  689. package/src/commands/explain.ts +0 -157
  690. package/src/commands/fanout-analyze.ts +0 -684
  691. package/src/commands/fanout-harvest.ts +0 -328
  692. package/src/commands/fanout-monitor.ts +0 -224
  693. package/src/commands/gateAttest.ts +0 -95
  694. package/src/commands/gateImport.ts +0 -142
  695. package/src/commands/gateImportChecks.ts +0 -208
  696. package/src/commands/gateReport.ts +0 -184
  697. package/src/commands/governanceCleanup.ts +0 -171
  698. package/src/commands/governanceReport.ts +0 -497
  699. package/src/commands/guards.ts +0 -50
  700. package/src/commands/idea.ts +0 -281
  701. package/src/commands/init.ts +0 -414
  702. package/src/commands/issues.ts +0 -165
  703. package/src/commands/merge.ts +0 -677
  704. package/src/commands/mergeOrder.ts +0 -68
  705. package/src/commands/metrics.ts +0 -232
  706. package/src/commands/migrateProfile.ts +0 -187
  707. package/src/commands/orchestrate/analyze-issues.ts +0 -203
  708. package/src/commands/orchestrate/assign-batch.ts +0 -204
  709. package/src/commands/orchestrate/generate-deliverables.ts +0 -66
  710. package/src/commands/orchestrate/pinToolchain.ts +0 -102
  711. package/src/commands/orchestrate/plan-batch.ts +0 -119
  712. package/src/commands/orchestrate/predict-conflicts.ts +0 -210
  713. package/src/commands/orchestrate.ts +0 -186
  714. package/src/commands/plan.ts +0 -403
  715. package/src/commands/planDiff.ts +0 -56
  716. package/src/commands/planReview.ts +0 -112
  717. package/src/commands/planViewer.ts +0 -180
  718. package/src/commands/preview-constraints.ts +0 -97
  719. package/src/commands/query.ts +0 -313
  720. package/src/commands/report.ts +0 -56
  721. package/src/commands/retry.ts +0 -60
  722. package/src/commands/schema.ts +0 -128
  723. package/src/commands/security.ts +0 -140
  724. package/src/commands/seniorDev.ts +0 -326
  725. package/src/commands/status.ts +0 -97
  726. package/src/commands/tokenReport.ts +0 -167
  727. package/src/commands/validation.ts +0 -66
  728. package/src/commands/weave-checkpoints.ts +0 -145
  729. package/src/commands/weave-fanout.ts +0 -273
  730. package/src/commands/weave-policy.ts +0 -277
  731. package/src/commands/weave.ts +0 -518
  732. package/src/config/localOverlay.ts +0 -167
  733. package/src/config/pathResolver.ts +0 -106
  734. package/src/config/profileResolver.ts +0 -194
  735. package/src/config/promptsResolver.ts +0 -312
  736. package/src/config/rulesResolver.ts +0 -257
  737. package/src/config/schemas.ts +0 -142
  738. package/src/core/bootstrap.ts +0 -287
  739. package/src/core/enterprise.ts +0 -453
  740. package/src/core/errorRecovery.ts +0 -509
  741. package/src/core/githubPlan.ts +0 -282
  742. package/src/core/inputs.ts +0 -314
  743. package/src/core/multiRepoPlan.ts +0 -353
  744. package/src/core/plan.ts +0 -106
  745. package/src/core/snapshot.ts +0 -189
  746. package/src/errors/adapters.ts +0 -897
  747. package/src/errors/index.ts +0 -231
  748. package/src/executionState.ts +0 -356
  749. package/src/executors/README_FRAME_CONTRACT.md +0 -446
  750. package/src/executors/frameContract.ts +0 -270
  751. package/src/executors/guardrailEnforcement.ts +0 -294
  752. package/src/executors/seniorDev/core.ts +0 -548
  753. package/src/executors/seniorDev/index.ts +0 -30
  754. package/src/executors/seniorDev/types.ts +0 -176
  755. package/src/executors/toolBudget.ts +0 -194
  756. package/src/fanout/analyzer.ts +0 -735
  757. package/src/fanout/github-adapter.ts +0 -262
  758. package/src/fanout/harvest.ts +0 -517
  759. package/src/fanout/monitor.ts +0 -350
  760. package/src/fanout/types.ts +0 -428
  761. package/src/frames/controller.ts +0 -160
  762. package/src/frames/emitter.ts +0 -455
  763. package/src/frames/index.ts +0 -58
  764. package/src/frames/storage.ts +0 -203
  765. package/src/frames/types.ts +0 -258
  766. package/src/gates/checkRunConverter.ts +0 -91
  767. package/src/gates/test/adapters/errors.ts +0 -32
  768. package/src/gates/test/adapters/index.ts +0 -36
  769. package/src/gates/test/adapters/interface.ts +0 -63
  770. package/src/gates/test/adapters/jest-json.ts +0 -370
  771. package/src/gates/test/adapters/junit-xml.ts +0 -400
  772. package/src/gates/test/adapters/registry.ts +0 -149
  773. package/src/gates/test/adapters/vitest-json.ts +0 -339
  774. package/src/gates/test/enrichment/failureId.ts +0 -74
  775. package/src/gates/test/enrichment/index.ts +0 -25
  776. package/src/gates/test/enrichment/nextActions.ts +0 -322
  777. package/src/gates/test/enrichment/rerunTemplates.ts +0 -105
  778. package/src/gates/test/enrichment/signature.ts +0 -58
  779. package/src/gates/test/enrichment/stackParser.ts +0 -149
  780. package/src/gates/test/enrichment/types.ts +0 -67
  781. package/src/gates/test/formatters/markdown.spec.ts +0 -942
  782. package/src/gates/test/formatters/markdown.ts +0 -296
  783. package/src/gates/test/index.ts +0 -54
  784. package/src/gates/test/schema.spec.ts +0 -372
  785. package/src/gates/test/schema.ts +0 -327
  786. package/src/gates/validator.ts +0 -92
  787. package/src/gates.ts +0 -1022
  788. package/src/git/operations.ts +0 -592
  789. package/src/git/parseRemote.ts +0 -22
  790. package/src/github/api.ts +0 -584
  791. package/src/github/batch-ops.ts +0 -215
  792. package/src/github/client.ts +0 -647
  793. package/src/github/contextDiet.ts +0 -205
  794. package/src/github/diffHunks.ts +0 -285
  795. package/src/github/index.ts +0 -11
  796. package/src/github/minimalContext.ts +0 -212
  797. package/src/github/minimalContextClient.ts +0 -105
  798. package/src/github/symbolMap.ts +0 -370
  799. package/src/github/types.ts +0 -166
  800. package/src/governance/index.ts +0 -42
  801. package/src/governance/mcpStatus.ts +0 -258
  802. package/src/governance/timeoutAdjustment.ts +0 -149
  803. package/src/governance/turnCostSummary.ts +0 -182
  804. package/src/hooks/events.ts +0 -374
  805. package/src/hooks/index.ts +0 -8
  806. package/src/hostility/checks.ts +0 -408
  807. package/src/hostility/index.ts +0 -108
  808. package/src/hostility/score.ts +0 -143
  809. package/src/interactive/planDiff.ts +0 -168
  810. package/src/interactive/planHistory.ts +0 -205
  811. package/src/interactive/planReview.ts +0 -531
  812. package/src/learning/counter-example.ts +0 -174
  813. package/src/learning/prompts.ts +0 -107
  814. package/src/learning/storage.ts +0 -230
  815. package/src/lexsona/client.ts +0 -367
  816. package/src/lexsona/index.ts +0 -44
  817. package/src/lexsona/logger.ts +0 -408
  818. package/src/lexsona/types.ts +0 -177
  819. package/src/mcp/DEPRECATED.md +0 -33
  820. package/src/mcp/server.ts +0 -3587
  821. package/src/mcp/types/guided-response.ts +0 -95
  822. package/src/mcp/types.ts +0 -468
  823. package/src/mcp/workflow/state-machine.ts +0 -277
  824. package/src/mergeEligibility.ts +0 -355
  825. package/src/mergeOrder.ts +0 -170
  826. package/src/metrics/export.ts +0 -472
  827. package/src/metrics/index.ts +0 -35
  828. package/src/metrics/turncost.ts +0 -284
  829. package/src/monitoring/README.md +0 -222
  830. package/src/monitoring/audit.ts +0 -98
  831. package/src/monitoring/cache.ts +0 -121
  832. package/src/monitoring/dashboards/grafana-dashboard.json +0 -172
  833. package/src/monitoring/errorRecovery.ts +0 -334
  834. package/src/monitoring/errors.ts +0 -105
  835. package/src/monitoring/fileLogger.ts +0 -194
  836. package/src/monitoring/hallucinations.ts +0 -45
  837. package/src/monitoring/health.ts +0 -171
  838. package/src/monitoring/index.ts +0 -16
  839. package/src/monitoring/lock.ts +0 -158
  840. package/src/monitoring/logger.ts +0 -178
  841. package/src/monitoring/profiler.ts +0 -156
  842. package/src/monitoring/tokenLogger.ts +0 -141
  843. package/src/orchestrate/analyzer.ts +0 -461
  844. package/src/orchestrate/index.ts +0 -6
  845. package/src/orchestrate/types.ts +0 -65
  846. package/src/orchestration/README.md +0 -480
  847. package/src/orchestration/agentAssigner.ts +0 -206
  848. package/src/orchestration/batchPlanner.ts +0 -201
  849. package/src/orchestration/conflictClustering.ts +0 -344
  850. package/src/orchestration/conflictGraph.ts +0 -63
  851. package/src/orchestration/conflictPredictor.ts +0 -170
  852. package/src/orchestration/deliverablesGenerator.ts +0 -345
  853. package/src/orchestration/determinism.ts +0 -232
  854. package/src/orchestration/index.ts +0 -45
  855. package/src/orchestration/mergeTreeSimulator.ts +0 -137
  856. package/src/orchestration/mis.ts +0 -123
  857. package/src/orchestration/toolchainManifest.ts +0 -169
  858. package/src/orchestration/types.ts +0 -103
  859. package/src/performance.README.md +0 -99
  860. package/src/performance.ts +0 -279
  861. package/src/planner/README.md +0 -215
  862. package/src/planner/dependencyParser.ts +0 -404
  863. package/src/planner/dependencyScoring.ts +0 -346
  864. package/src/planner/fileAnalysis.ts +0 -693
  865. package/src/planner/index.ts +0 -41
  866. package/src/planner/scopeValidator.ts +0 -308
  867. package/src/planner/types.ts +0 -80
  868. package/src/planner/validation.ts +0 -493
  869. package/src/preview/constraints.ts +0 -333
  870. package/src/procedures/index.ts +0 -47
  871. package/src/procedures/loader.ts +0 -252
  872. package/src/procedures/schema.ts +0 -191
  873. package/src/procedures/stateMachine.ts +0 -160
  874. package/src/procedures/types.ts +0 -178
  875. package/src/receipts/emit.ts +0 -354
  876. package/src/receipts/index.ts +0 -48
  877. package/src/receipts/schema.ts +0 -227
  878. package/src/report/aggregate.ts +0 -160
  879. package/src/runs/artifacts.ts +0 -315
  880. package/src/runs/attribution.ts +0 -132
  881. package/src/runs/context.ts +0 -54
  882. package/src/runs/decisions.ts +0 -407
  883. package/src/runs/enforcement.ts +0 -395
  884. package/src/runs/failures.ts +0 -517
  885. package/src/runs/index.ts +0 -141
  886. package/src/runs/manager.ts +0 -910
  887. package/src/runs/statusBuilder.ts +0 -233
  888. package/src/runs/storage.ts +0 -290
  889. package/src/runs/types.ts +0 -216
  890. package/src/schema/flakeReport.ts +0 -74
  891. package/src/schema/gateMapping.ts +0 -107
  892. package/src/schema/gateReport.ts +0 -236
  893. package/src/schema/weaveLock.ts +0 -51
  894. package/src/schema.ts +0 -313
  895. package/src/schemas/executorManifest.ts +0 -204
  896. package/src/schemas/feature-spec-v0.ts +0 -40
  897. package/src/schemas/persona.ts +0 -162
  898. package/src/schemas/project.ts +0 -91
  899. package/src/schemas/runCentric.ts +0 -402
  900. package/src/schemas/task-contract.ts +0 -626
  901. package/src/schemas/vacuumReadyPrompt.ts +0 -128
  902. package/src/sdk/index.ts +0 -113
  903. package/src/sdk/parser.ts +0 -101
  904. package/src/sdk/query.ts +0 -315
  905. package/src/sdk/validator.ts +0 -114
  906. package/src/security/README.md +0 -496
  907. package/src/security/authentication.ts +0 -173
  908. package/src/security/authorization.ts +0 -348
  909. package/src/security/commandValidator.ts +0 -195
  910. package/src/security/compliance.ts +0 -688
  911. package/src/security/index.ts +0 -85
  912. package/src/security/policy.ts +0 -399
  913. package/src/security/sarif.ts +0 -179
  914. package/src/security/scanning.ts +0 -362
  915. package/src/security/secrets.ts +0 -520
  916. package/src/shared/git/index.ts +0 -30
  917. package/src/shared/git/runGit.ts +0 -281
  918. package/src/shared/git/runtime.ts +0 -66
  919. package/src/snapshot/builder.ts +0 -229
  920. package/src/snapshot/index.ts +0 -8
  921. package/src/store/CONTRACT.md +0 -189
  922. package/src/store/README.md +0 -22
  923. package/src/store/index.ts +0 -99
  924. package/src/store/inmemory/index.ts +0 -10
  925. package/src/store/inmemory/run-store.ts +0 -268
  926. package/src/store/postgres/.gitkeep +0 -0
  927. package/src/store/run-store.ts +0 -405
  928. package/src/store/sqlite/index.ts +0 -7
  929. package/src/store/sqlite/run-store.ts +0 -525
  930. package/src/store/sqlite/schema.sql +0 -67
  931. package/src/telemetry/frames.ts +0 -179
  932. package/src/telemetry/index.ts +0 -5
  933. package/src/tiers/index.ts +0 -34
  934. package/src/tiers/metrics.ts +0 -156
  935. package/src/tiers/schema.ts +0 -95
  936. package/src/tiers/suggest.ts +0 -183
  937. package/src/types/guardrails.ts +0 -452
  938. package/src/types/index.ts +0 -42
  939. package/src/util/canonicalJson.ts +0 -29
  940. package/src/util/colorControl.ts +0 -46
  941. package/src/util/envUtils.ts +0 -139
  942. package/src/util/hash.ts +0 -69
  943. package/src/util/lockHash.ts +0 -90
  944. package/src/util/minHeap.ts +0 -108
  945. package/src/util/progress.ts +0 -89
  946. package/src/util/tokenEstimator.ts +0 -55
  947. package/src/utils/fingerprint.ts +0 -105
  948. package/src/utils/paths.ts +0 -209
  949. package/src/utils/tokens.ts +0 -151
  950. package/src/utils/validation.ts +0 -53
  951. package/src/verification/diff-applier.ts +0 -60
  952. package/src/verification/engine-verifier.ts +0 -171
  953. package/src/verification/errors.ts +0 -30
  954. package/src/verification/index.ts +0 -13
  955. package/src/weave/audit/index.ts +0 -17
  956. package/src/weave/audit/logger.ts +0 -206
  957. package/src/weave/authority/evaluator.ts +0 -660
  958. package/src/weave/authority/index.ts +0 -30
  959. package/src/weave/authority/schema.ts +0 -292
  960. package/src/weave/checkpoint/index.ts +0 -7
  961. package/src/weave/checkpoint/storage.ts +0 -223
  962. package/src/weave/checkpoint/types.ts +0 -121
  963. package/src/weave/checkpoint/utils.ts +0 -207
  964. package/src/weave/clusterGates.ts +0 -366
  965. package/src/weave/draftPR.ts +0 -214
  966. package/src/weave/executor/d1-executor.ts +0 -822
  967. package/src/weave/executor/d2-executor.ts +0 -381
  968. package/src/weave/executor/index.ts +0 -24
  969. package/src/weave/executor/types.ts +0 -135
  970. package/src/weave/fanout/generator.ts +0 -186
  971. package/src/weave/fanout/index.ts +0 -51
  972. package/src/weave/fanout/loader.ts +0 -134
  973. package/src/weave/fanout/matcher.ts +0 -239
  974. package/src/weave/fanout/schema.ts +0 -178
  975. package/src/weave/frameHelper.ts +0 -126
  976. package/src/weave/gateFailureHandler.ts +0 -405
  977. package/src/weave/index.ts +0 -89
  978. package/src/weave/lockFile.ts +0 -193
  979. package/src/weave/mergeHelpers.ts +0 -377
  980. package/src/weave/mergeWeaveSequential.ts +0 -282
  981. package/src/weave/metrics/calculator.ts +0 -362
  982. package/src/weave/metrics/index.ts +0 -44
  983. package/src/weave/metrics/logger.ts +0 -291
  984. package/src/weave/metrics/schema.ts +0 -505
  985. package/src/weave/planner/index.ts +0 -23
  986. package/src/weave/planner/planner.ts +0 -411
  987. package/src/weave/planner/types.ts +0 -181
  988. package/src/weave/policy/index.ts +0 -63
  989. package/src/weave/policy/loader.ts +0 -148
  990. package/src/weave/policy/schema.ts +0 -290
  991. package/src/weave/post-merge-checks.ts +0 -220
  992. package/src/weave/preflightConflicts.ts +0 -375
  993. package/src/weave/receiptHelper.ts +0 -287
  994. package/src/weave/recovery.ts +0 -232
  995. package/src/weave/resolutionGuidance.ts +0 -173
  996. package/src/weave/stateMachine.ts +0 -426
  997. package/src/weave/testfix/applier.ts +0 -195
  998. package/src/weave/testfix/index.ts +0 -18
  999. package/src/weave/testfix/loader.ts +0 -116
  1000. package/src/weave/testfix/matcher.ts +0 -158
  1001. package/src/weave/testfix/schema.ts +0 -218
  1002. package/src/weave/types.ts +0 -305
  1003. package/src/weave/utils/copilot-completion.ts +0 -76
  1004. package/test-mcp-dogfood.mjs +0 -128
  1005. package/test-mcp.mjs +0 -116
  1006. package/tests/README.md +0 -155
  1007. package/tests/advanced-cli-e2e.spec.ts +0 -218
  1008. package/tests/agentAssigner.spec.ts +0 -261
  1009. package/tests/ai-conflict-strategy-cache.spec.ts +0 -254
  1010. package/tests/ai-conflict-strategy-risk.spec.ts +0 -287
  1011. package/tests/ai-conflict-strategy-schema.spec.ts +0 -252
  1012. package/tests/ai-conflict-strategy.spec.ts +0 -442
  1013. package/tests/aliases/resolver.spec.ts +0 -238
  1014. package/tests/audit/context.spec.ts +0 -283
  1015. package/tests/audit/emitter.spec.ts +0 -347
  1016. package/tests/audit/gateMatrix.spec.ts +0 -335
  1017. package/tests/audit/integration.spec.ts +0 -236
  1018. package/tests/audit/redaction.spec.ts +0 -290
  1019. package/tests/audit/sarif-integration.spec.ts +0 -303
  1020. package/tests/audit/sarif.spec.ts +0 -458
  1021. package/tests/audit/schema-events.spec.ts +0 -421
  1022. package/tests/audit/schema.spec.ts +0 -434
  1023. package/tests/audit/sdk-integration.spec.ts +0 -598
  1024. package/tests/audit/sdk.spec.ts +0 -318
  1025. package/tests/audit/signing-integration.spec.ts +0 -276
  1026. package/tests/audit/signing.spec.ts +0 -350
  1027. package/tests/audit-signing.spec.ts +0 -406
  1028. package/tests/audit-verify-cli.spec.ts +0 -176
  1029. package/tests/autopilot-e2e-level3-4.spec.ts +0 -741
  1030. package/tests/autopilot-integration.spec.ts +0 -274
  1031. package/tests/autopilot-level1.spec.ts +0 -449
  1032. package/tests/autopilot-level2.spec.ts +0 -188
  1033. package/tests/autopilot-level3.spec.ts +0 -266
  1034. package/tests/autopilot-level4.spec.ts +0 -454
  1035. package/tests/autopilot.spec.ts +0 -379
  1036. package/tests/ax-error-adapters.spec.ts +0 -580
  1037. package/tests/batch-planner.spec.ts +0 -500
  1038. package/tests/benchmark-infrastructure.spec.ts +0 -445
  1039. package/tests/benchmarks/README.md +0 -103
  1040. package/tests/benchmarks/baselines/baseline.json +0 -127
  1041. package/tests/benchmarks/core/dependencyResolver.bench.ts +0 -128
  1042. package/tests/benchmarks/core/planParser.bench.ts +0 -114
  1043. package/tests/benchmarks/core/topologicalSort.bench.ts +0 -102
  1044. package/tests/benchmarks/index.ts +0 -36
  1045. package/tests/benchmarks/io/fileOperations.bench.ts +0 -132
  1046. package/tests/benchmarks/io/gitOperations.bench.ts +0 -99
  1047. package/tests/benchmarks/utils/graphGenerator.ts +0 -201
  1048. package/tests/benchmarks/utils/reporter.ts +0 -231
  1049. package/tests/benchmarks/workflows/endToEnd.bench.ts +0 -132
  1050. package/tests/bootstrap.test.ts +0 -319
  1051. package/tests/budget-tracker.spec.ts +0 -279
  1052. package/tests/bulkOps.spec.ts +0 -166
  1053. package/tests/bulletproof-determinism.test.ts +0 -223
  1054. package/tests/canonicalJson.test.ts +0 -130
  1055. package/tests/checkRunConverter.spec.ts +0 -357
  1056. package/tests/cli/commands/gate/test.spec.ts +0 -564
  1057. package/tests/cli/emit-frames-flag.spec.ts +0 -117
  1058. package/tests/cli/exitHandler.spec.ts +0 -314
  1059. package/tests/cli/flags.spec.ts +0 -223
  1060. package/tests/cli/formatters.spec.ts +0 -513
  1061. package/tests/cli/output.spec.ts +0 -221
  1062. package/tests/cli-autopilot.spec.ts +0 -170
  1063. package/tests/cli-budget-guards.spec.ts +0 -210
  1064. package/tests/cli-color-control.spec.ts +0 -334
  1065. package/tests/cli-deliverables-generator.spec.ts +0 -185
  1066. package/tests/cli-determinism.spec.ts +0 -496
  1067. package/tests/cli-init-enterprise.spec.ts +0 -294
  1068. package/tests/cli-init-json.spec.ts +0 -154
  1069. package/tests/cli-init-local.spec.ts +0 -159
  1070. package/tests/cli-json-envelope.spec.ts +0 -140
  1071. package/tests/cli-json.spec.ts +0 -408
  1072. package/tests/cli-orchestrate-plan-batch.spec.ts +0 -329
  1073. package/tests/cli-orchestrate.spec.ts +0 -231
  1074. package/tests/cli-plan-generation.spec.ts +0 -367
  1075. package/tests/cli-plan-review.spec.ts +0 -300
  1076. package/tests/cli-progress.spec.ts +0 -193
  1077. package/tests/cli-ux-enhancements.spec.ts +0 -213
  1078. package/tests/cliJsonPurity.spec.ts +0 -437
  1079. package/tests/cliSuggestDeps.spec.ts +0 -360
  1080. package/tests/cluster-gates-rollback.spec.ts +0 -353
  1081. package/tests/command-validator-integration.spec.ts +0 -305
  1082. package/tests/command-validator.spec.ts +0 -380
  1083. package/tests/commands/autopilot.spec.ts +0 -124
  1084. package/tests/commands/config-validate.spec.ts +0 -301
  1085. package/tests/commands/config.spec.ts +0 -311
  1086. package/tests/commands/create-project.spec.ts +0 -90
  1087. package/tests/commands/doctor.spec.ts +0 -57
  1088. package/tests/commands/execute.spec.ts +0 -293
  1089. package/tests/commands/gateAttest.spec.ts +0 -172
  1090. package/tests/commands/gateImport.spec.ts +0 -176
  1091. package/tests/commands/gateReport.spec.ts +0 -130
  1092. package/tests/commands/guards.spec.ts +0 -114
  1093. package/tests/commands/idea.spec.ts +0 -177
  1094. package/tests/commands/merge.spec.ts +0 -166
  1095. package/tests/commands/plan.spec.ts +0 -123
  1096. package/tests/commands/query.spec.ts +0 -294
  1097. package/tests/commands/report.spec.ts +0 -54
  1098. package/tests/commands/retry.spec.ts +0 -300
  1099. package/tests/commands/schema.spec.ts +0 -136
  1100. package/tests/commands/validation.spec.ts +0 -229
  1101. package/tests/completion.spec.ts +0 -133
  1102. package/tests/config-inspect.spec.ts +0 -202
  1103. package/tests/conflictClustering-e2e.spec.ts +0 -278
  1104. package/tests/conflictClustering.spec.ts +0 -550
  1105. package/tests/conflictGraph.spec.ts +0 -126
  1106. package/tests/conflictPredictor.spec.ts +0 -238
  1107. package/tests/deliverables-generator.spec.ts +0 -329
  1108. package/tests/deliverables.spec.ts +0 -381
  1109. package/tests/dependencyParser-github.spec.ts +0 -244
  1110. package/tests/dependencyParser.spec.ts +0 -386
  1111. package/tests/dependencyScoring.spec.ts +0 -668
  1112. package/tests/deterministic-applicable.test.ts +0 -156
  1113. package/tests/deterministic-build.test.ts +0 -172
  1114. package/tests/deterministic-simple.test.ts +0 -32
  1115. package/tests/discover-suggest-integration.spec.ts +0 -340
  1116. package/tests/dogfood-merge-weave-script.spec.ts +0 -150
  1117. package/tests/e2e/planner.spec.ts +0 -596
  1118. package/tests/e2e-comprehensive.test.ts +0 -500
  1119. package/tests/e2e-determinism.test.ts +0 -293
  1120. package/tests/e2e-synthetic-6pr-weave.spec.ts +0 -329
  1121. package/tests/enterprise-init.spec.ts +0 -350
  1122. package/tests/envUtils.spec.ts +0 -267
  1123. package/tests/error-handling.test.ts +0 -104
  1124. package/tests/error-recovery.spec.ts +0 -451
  1125. package/tests/execution-plan-v1.test.ts +0 -257
  1126. package/tests/executionState-loadGateResults.spec.ts +0 -267
  1127. package/tests/executionState.test.ts +0 -169
  1128. package/tests/executors/README.md +0 -100
  1129. package/tests/executors/frameContract-integration.spec.ts +0 -324
  1130. package/tests/executors/frameContract.spec.ts +0 -531
  1131. package/tests/executors/guardrailEnforcement.spec.ts +0 -424
  1132. package/tests/executors/lifecycle.spec.ts +0 -313
  1133. package/tests/executors/toolBudget.spec.ts +0 -473
  1134. package/tests/feature-spec-v0.test.ts +0 -145
  1135. package/tests/fileAnalysis.spec.ts +0 -946
  1136. package/tests/fingerprint.spec.ts +0 -100
  1137. package/tests/fixtures/README.md +0 -380
  1138. package/tests/fixtures/deliverables/batch-example-plan.json +0 -62
  1139. package/tests/fixtures/executors/README.md +0 -57
  1140. package/tests/fixtures/executors/index.ts +0 -9
  1141. package/tests/fixtures/executors/mock-executor.ts +0 -204
  1142. package/tests/fixtures/executors/registry.ts +0 -51
  1143. package/tests/fixtures/executors/types.ts +0 -95
  1144. package/tests/fixtures/fixtures.spec.ts +0 -307
  1145. package/tests/fixtures/gates/configs.ts +0 -234
  1146. package/tests/fixtures/gates/results.ts +0 -234
  1147. package/tests/fixtures/harvest-bundle-fixture.json +0 -87
  1148. package/tests/fixtures/index.ts +0 -219
  1149. package/tests/fixtures/invalid/plans.ts +0 -178
  1150. package/tests/fixtures/jest/all-passing.json +0 -71
  1151. package/tests/fixtures/jest/snapshot-failures.json +0 -66
  1152. package/tests/fixtures/jest/some-failing.json +0 -100
  1153. package/tests/fixtures/jest/with-location.json +0 -84
  1154. package/tests/fixtures/junit/cdata-messages.xml +0 -29
  1155. package/tests/fixtures/junit/multiple-suites.xml +0 -30
  1156. package/tests/fixtures/junit/single-suite.xml +0 -17
  1157. package/tests/fixtures/junit/with-errors.xml +0 -19
  1158. package/tests/fixtures/junit/with-skipped.xml +0 -18
  1159. package/tests/fixtures/npm-audit.json +0 -32
  1160. package/tests/fixtures/plan.bad-schema.json +0 -5
  1161. package/tests/fixtures/plan.bad-unknown-dep.json +0 -10
  1162. package/tests/fixtures/plan.ci-gates.json +0 -36
  1163. package/tests/fixtures/plan.complex-cycle.json +0 -22
  1164. package/tests/fixtures/plan.cycle.json +0 -14
  1165. package/tests/fixtures/plan.deep-chain.json +0 -95
  1166. package/tests/fixtures/plan.dogfood-execute.json +0 -36
  1167. package/tests/fixtures/plan.gates.json +0 -30
  1168. package/tests/fixtures/plan.integration-pyramid.json +0 -56
  1169. package/tests/fixtures/plan.orphans.json +0 -22
  1170. package/tests/fixtures/plan.parallel.json +0 -30
  1171. package/tests/fixtures/plan.tiny.json +0 -18
  1172. package/tests/fixtures/plan.wide-parallel.json +0 -75
  1173. package/tests/fixtures/plan.with-failures.json +0 -26
  1174. package/tests/fixtures/plan.with-vuln.json +0 -25
  1175. package/tests/fixtures/planner/cross-module.json +0 -101
  1176. package/tests/fixtures/planner/cycle-error.json +0 -56
  1177. package/tests/fixtures/planner/diamond-pattern.json +0 -74
  1178. package/tests/fixtures/planner/empty-repo.json +0 -9
  1179. package/tests/fixtures/planner/file-overlap-heavy.json +0 -110
  1180. package/tests/fixtures/planner/invalid-pr.json +0 -25
  1181. package/tests/fixtures/planner/merge-conflicts.json +0 -42
  1182. package/tests/fixtures/planner/mixed-deps.json +0 -101
  1183. package/tests/fixtures/planner/self-dependency.json +0 -24
  1184. package/tests/fixtures/planner/simple-stack.json +0 -79
  1185. package/tests/fixtures/planner/single-pr.json +0 -25
  1186. package/tests/fixtures/planner/stale-pr.json +0 -40
  1187. package/tests/fixtures/plans/complex.ts +0 -201
  1188. package/tests/fixtures/plans/diamond.ts +0 -115
  1189. package/tests/fixtures/plans/linear.ts +0 -74
  1190. package/tests/fixtures/plans/simple.ts +0 -61
  1191. package/tests/fixtures/prs/basic.ts +0 -175
  1192. package/tests/fixtures/prs/withDeps.ts +0 -197
  1193. package/tests/fixtures/scan-results-clean.sarif +0 -15
  1194. package/tests/fixtures/scan-results.sarif +0 -74
  1195. package/tests/fixtures/scenarios/mergeWorkflows.ts +0 -300
  1196. package/tests/fixtures/scenarios/syntheticWeave.ts +0 -351
  1197. package/tests/fixtures/snapshot/package.json +0 -5
  1198. package/tests/fixtures/snapshot/sample.ts +0 -21
  1199. package/tests/fixtures/utils/cleanup.ts +0 -81
  1200. package/tests/fixtures/utils/mockGitHub.ts +0 -219
  1201. package/tests/fixtures/utils/tempDir.ts +0 -109
  1202. package/tests/fixtures/verification/expected-verification.json +0 -16
  1203. package/tests/fixtures/verification/receipt.json +0 -31
  1204. package/tests/fixtures/verification/snapshot.json +0 -44
  1205. package/tests/fixtures/vitest/all-passing.json +0 -67
  1206. package/tests/fixtures/vitest/complex-nested-suites.json +0 -98
  1207. package/tests/fixtures/vitest/some-failing.json +0 -98
  1208. package/tests/fixtures/vitest/with-coverage.json +0 -97
  1209. package/tests/fixtures-usage-examples.spec.ts +0 -304
  1210. package/tests/flakeReport.spec.ts +0 -267
  1211. package/tests/frames/ci-gate-integration.spec.ts +0 -331
  1212. package/tests/frames/controller.spec.ts +0 -165
  1213. package/tests/frames/emitter.spec.ts +0 -371
  1214. package/tests/frames/idempotency.spec.ts +0 -177
  1215. package/tests/frames/storage.spec.ts +0 -346
  1216. package/tests/frames/types.spec.ts +0 -249
  1217. package/tests/frames/v2-schema-integration.spec.ts +0 -435
  1218. package/tests/gate-working-directory.spec.ts +0 -204
  1219. package/tests/gateMapping.spec.ts +0 -161
  1220. package/tests/gateReportIntegration.spec.ts +0 -175
  1221. package/tests/gateReportValidation.spec.ts +0 -452
  1222. package/tests/gates/test/adapters/jest-json.spec.ts +0 -372
  1223. package/tests/gates/test/adapters/junit-xml.spec.ts +0 -421
  1224. package/tests/gates/test/adapters/registry.spec.ts +0 -376
  1225. package/tests/gates/test/adapters/vitest-json.spec.ts +0 -455
  1226. package/tests/gates/test/enrichment/failureId.spec.ts +0 -131
  1227. package/tests/gates/test/enrichment/nextActions.spec.ts +0 -365
  1228. package/tests/gates/test/enrichment/rerunTemplates.spec.ts +0 -187
  1229. package/tests/gates/test/enrichment/signature.spec.ts +0 -163
  1230. package/tests/gates/test/enrichment/stackParser.spec.ts +0 -203
  1231. package/tests/gates/turncost-integration.spec.ts +0 -221
  1232. package/tests/gates/validation-integration.spec.ts +0 -147
  1233. package/tests/gates/validator.spec.ts +0 -200
  1234. package/tests/gates.test.ts +0 -255
  1235. package/tests/gatesWithPolicy.hostilityTimeoutAdjustment.spec.ts +0 -156
  1236. package/tests/git-operations-receipts.spec.ts +0 -121
  1237. package/tests/git-operations.test.ts +0 -152
  1238. package/tests/git-runtime.spec.ts +0 -175
  1239. package/tests/github-api.labels.spec.ts +0 -21
  1240. package/tests/github-api.test.ts +0 -85
  1241. package/tests/github-context-diet.spec.ts +0 -441
  1242. package/tests/github-diff-hunks.spec.ts +0 -387
  1243. package/tests/github-integration.spec.ts +0 -774
  1244. package/tests/github-minimal-context.spec.ts +0 -338
  1245. package/tests/github-symbol-map.spec.ts +0 -414
  1246. package/tests/githubClient.spec.ts +0 -123
  1247. package/tests/governance/mcpStatus.spec.ts +0 -276
  1248. package/tests/governance/timeoutAdjustment.spec.ts +0 -149
  1249. package/tests/governance/turnCostSummary.spec.ts +0 -188
  1250. package/tests/governance-retention.spec.ts +0 -151
  1251. package/tests/governance-wrapper-delegation.spec.ts +0 -148
  1252. package/tests/guardrails.spec.ts +0 -860
  1253. package/tests/hash.test.ts +0 -83
  1254. package/tests/helpers/cli.ts +0 -23
  1255. package/tests/helpers/getStd.ts +0 -1
  1256. package/tests/helpers/makeGate.ts +0 -19
  1257. package/tests/helpers/plannerTestHelpers.ts +0 -314
  1258. package/tests/hooks/events.spec.ts +0 -518
  1259. package/tests/hostility/checks.spec.ts +0 -295
  1260. package/tests/hostility/integration.spec.ts +0 -123
  1261. package/tests/hostility/score.spec.ts +0 -175
  1262. package/tests/init.spec.ts +0 -270
  1263. package/tests/integration/hipaa-encryption.spec.ts +0 -148
  1264. package/tests/integration/lex-smoke-test.spec.ts +0 -328
  1265. package/tests/integration-e2e.test.ts +0 -244
  1266. package/tests/integration-matrix.test.ts +0 -409
  1267. package/tests/interPRConflicts.spec.ts +0 -254
  1268. package/tests/interactive-plan-history.spec.ts +0 -255
  1269. package/tests/interactive-plan-review.spec.ts +0 -287
  1270. package/tests/issue-analyzer.spec.ts +0 -593
  1271. package/tests/lexsona-integration.spec.ts +0 -311
  1272. package/tests/localOverlay.spec.ts +0 -203
  1273. package/tests/lockHash.spec.ts +0 -167
  1274. package/tests/mcp-auth-errors.spec.ts +0 -190
  1275. package/tests/mcp-contracts.spec.ts +0 -290
  1276. package/tests/mcp-gates-external-plan.spec.ts +0 -146
  1277. package/tests/mcp-granular-tools.spec.ts +0 -208
  1278. package/tests/mcp-runstore-integration.spec.ts +0 -334
  1279. package/tests/mcp-scope-integration.spec.ts +0 -318
  1280. package/tests/mcp-task-handoff.spec.ts +0 -320
  1281. package/tests/mcp-workflow-guide.spec.ts +0 -53
  1282. package/tests/mcp.test.ts +0 -151
  1283. package/tests/merge-conflict-detection.spec.ts +0 -260
  1284. package/tests/mergeEligibility.test.ts +0 -201
  1285. package/tests/mergeLockHash.spec.ts +0 -158
  1286. package/tests/mergeOrder-with-fixtures.spec.ts +0 -215
  1287. package/tests/mergeOrder.test.ts +0 -108
  1288. package/tests/mergeTreeSimulator.spec.ts +0 -145
  1289. package/tests/metrics/export.spec.ts +0 -446
  1290. package/tests/metrics/turncost.spec.ts +0 -309
  1291. package/tests/metrics-template.spec.ts +0 -137
  1292. package/tests/migrateProfile.spec.ts +0 -254
  1293. package/tests/mis.spec.ts +0 -202
  1294. package/tests/monitoring-audit.spec.ts +0 -181
  1295. package/tests/monitoring-cache.spec.ts +0 -331
  1296. package/tests/monitoring-error-recovery.spec.ts +0 -236
  1297. package/tests/monitoring-errors.spec.ts +0 -193
  1298. package/tests/monitoring-fileLogger.spec.ts +0 -319
  1299. package/tests/monitoring-health.spec.ts +0 -152
  1300. package/tests/monitoring-lock.spec.ts +0 -308
  1301. package/tests/monitoring-logger.spec.ts +0 -157
  1302. package/tests/monitoring-metrics.spec.ts +0 -158
  1303. package/tests/monitoring-profiler.spec.ts +0 -197
  1304. package/tests/orchestration-determinism.spec.ts +0 -204
  1305. package/tests/parseRemote.spec.ts +0 -25
  1306. package/tests/pathResolver.spec.ts +0 -122
  1307. package/tests/paths.spec.ts +0 -68
  1308. package/tests/performance.spec.ts +0 -322
  1309. package/tests/pipeline-determinism.spec.ts +0 -597
  1310. package/tests/plan-tier-integration.spec.ts +0 -184
  1311. package/tests/precedence-resolution.spec.ts +0 -682
  1312. package/tests/preflightConflicts.spec.ts +0 -205
  1313. package/tests/procedures/keystone-policy.spec.ts +0 -296
  1314. package/tests/procedures/loader.spec.ts +0 -585
  1315. package/tests/procedures/pr-review.spec.ts +0 -321
  1316. package/tests/profileResolver.spec.ts +0 -375
  1317. package/tests/progress-indicators.spec.ts +0 -139
  1318. package/tests/promptsResolver.spec.ts +0 -443
  1319. package/tests/public-api.spec.ts +0 -272
  1320. package/tests/query.spec.ts +0 -170
  1321. package/tests/receipts.spec.ts +0 -463
  1322. package/tests/release-prepare.spec.ts +0 -268
  1323. package/tests/report.test.ts +0 -335
  1324. package/tests/resolutionGuidance.spec.ts +0 -160
  1325. package/tests/rotate-secrets-example.spec.ts +0 -198
  1326. package/tests/rulesResolver.spec.ts +0 -232
  1327. package/tests/runGit.spec.ts +0 -229
  1328. package/tests/runner-lifecycle-integration.spec.ts +0 -283
  1329. package/tests/runs/artifacts.spec.ts +0 -367
  1330. package/tests/runs/decisions.spec.ts +0 -495
  1331. package/tests/runs/enforcement.spec.ts +0 -555
  1332. package/tests/runs/failures.spec.ts +0 -554
  1333. package/tests/runs/manager-runstore-integration.spec.ts +0 -455
  1334. package/tests/runs/manager.spec.ts +0 -678
  1335. package/tests/runs-manager.spec.ts +0 -485
  1336. package/tests/safety-acceptance.spec.ts +0 -278
  1337. package/tests/safety-enhanced.spec.ts +0 -329
  1338. package/tests/safety-framework.spec.ts +0 -427
  1339. package/tests/safety-guards-integration.spec.ts +0 -213
  1340. package/tests/safety-integration.spec.ts +0 -278
  1341. package/tests/sarif-parser.spec.ts +0 -148
  1342. package/tests/schema.test.ts +0 -88
  1343. package/tests/schemas/behavior-rule.spec.ts +0 -366
  1344. package/tests/schemas/executorManifest.spec.ts +0 -441
  1345. package/tests/schemas/persona-integration.spec.ts +0 -62
  1346. package/tests/schemas/persona.spec.ts +0 -172
  1347. package/tests/schemas/project.spec.ts +0 -247
  1348. package/tests/schemas/run-store.spec.ts +0 -553
  1349. package/tests/schemas/runCentric.spec.ts +0 -463
  1350. package/tests/schemas/vacuumReadyPrompt.spec.ts +0 -515
  1351. package/tests/scope-github-auto-detection.spec.ts +0 -200
  1352. package/tests/scopeValidator.spec.ts +0 -497
  1353. package/tests/security-authentication.spec.ts +0 -42
  1354. package/tests/security-authorization.spec.ts +0 -350
  1355. package/tests/security-cli.spec.ts +0 -264
  1356. package/tests/security-compliance.spec.ts +0 -334
  1357. package/tests/security-policy.spec.ts +0 -295
  1358. package/tests/security-scanning.spec.ts +0 -349
  1359. package/tests/security-secrets.spec.ts +0 -401
  1360. package/tests/store/create-run-store.spec.ts +0 -185
  1361. package/tests/store/inmemory/run-store.spec.ts +0 -533
  1362. package/tests/store/sqlite/run-store.spec.ts +0 -849
  1363. package/tests/telemetry/frames.spec.ts +0 -120
  1364. package/tests/tiers.spec.ts +0 -466
  1365. package/tests/token-usage.spec.ts +0 -309
  1366. package/tests/toolchain-manifest.spec.ts +0 -145
  1367. package/tests/unified-budget.spec.ts +0 -713
  1368. package/tests/unit/cache/issue-cache.spec.ts +0 -131
  1369. package/tests/unit/fanout/analyzer-integration.spec.ts +0 -398
  1370. package/tests/unit/fanout/analyzer.spec.ts +0 -605
  1371. package/tests/unit/fanout/github-adapter.spec.ts +0 -203
  1372. package/tests/unit/fanout/harvest.spec.ts +0 -93
  1373. package/tests/unit/fanout/monitor.spec.ts +0 -297
  1374. package/tests/unit/fanout/types.spec.ts +0 -308
  1375. package/tests/unit/github/batch-ops.spec.ts +0 -179
  1376. package/tests/unit/learning/counter-example.spec.ts +0 -168
  1377. package/tests/unit/learning/storage.spec.ts +0 -154
  1378. package/tests/unit/preview/constraints.spec.ts +0 -429
  1379. package/tests/unit/runs/attribution.spec.ts +0 -204
  1380. package/tests/unit/schemas/task-contract.spec.ts +0 -483
  1381. package/tests/unit/snapshot/builder.spec.ts +0 -389
  1382. package/tests/unit/verification/engine-verifier.spec.ts +0 -279
  1383. package/tests/unit/weave/authority-evaluator.spec.ts +0 -404
  1384. package/tests/unit/weave/authority-schema.spec.ts +0 -199
  1385. package/tests/unit/weave/auto-undraft-integration.spec.ts +0 -349
  1386. package/tests/unit/weave/copilot-completion.spec.ts +0 -182
  1387. package/tests/unit/weave/d1-executor.spec.ts +0 -269
  1388. package/tests/unit/weave/d2-executor.spec.ts +0 -334
  1389. package/tests/unit/weave/fanout-generator.spec.ts +0 -365
  1390. package/tests/unit/weave/fanout-matcher.spec.ts +0 -320
  1391. package/tests/unit/weave/fanout-schema.spec.ts +0 -221
  1392. package/tests/unit/weave/mergeWeaveSequential.spec.ts +0 -268
  1393. package/tests/unit/weave/metrics-calculator.spec.ts +0 -212
  1394. package/tests/unit/weave/metrics-logger.spec.ts +0 -233
  1395. package/tests/unit/weave/metrics-schema.spec.ts +0 -383
  1396. package/tests/unit/weave/multi-repo-plan.spec.ts +0 -221
  1397. package/tests/unit/weave/planner.spec.ts +0 -227
  1398. package/tests/unit/weave/post-merge-checks.spec.ts +0 -342
  1399. package/tests/unit/weave/recovery.spec.ts +0 -306
  1400. package/tests/unit/weave/testfix/applier.spec.ts +0 -364
  1401. package/tests/unit/weave/testfix/e2e.spec.ts +0 -273
  1402. package/tests/unit/weave/testfix/integration.spec.ts +0 -128
  1403. package/tests/unit/weave/testfix/matcher.spec.ts +0 -321
  1404. package/tests/unit/weave/testfix/schema.spec.ts +0 -298
  1405. package/tests/utils/fingerprint.spec.ts +0 -251
  1406. package/tests/utils/paths.spec.ts +0 -284
  1407. package/tests/utils/tokens.spec.ts +0 -210
  1408. package/tests/utils/validation.spec.ts +0 -215
  1409. package/tests/utils-validation.spec.ts +0 -80
  1410. package/tests/validate-manifests.spec.ts +0 -231
  1411. package/tests/validation.spec.ts +0 -501
  1412. package/tests/vuln-gate.spec.ts +0 -341
  1413. package/tests/weave/adr007-integration.spec.ts +0 -309
  1414. package/tests/weave/checkpoint/cli-integration.spec.ts +0 -118
  1415. package/tests/weave/checkpoint/storage.spec.ts +0 -302
  1416. package/tests/weave/checkpoint/utils.spec.ts +0 -223
  1417. package/tests/weave/frameHelper.spec.ts +0 -423
  1418. package/tests/weave/gateFailureHandler.spec.ts +0 -249
  1419. package/tests/weave/lockFile.spec.ts +0 -387
  1420. package/tests/weave/mergeHelpers.spec.ts +0 -173
  1421. package/tests/weave/receiptHelper.spec.ts +0 -261
  1422. package/tests/weave/stateMachine.spec.ts +0 -436
  1423. package/tests/weave-contract.test.ts +0 -517
  1424. package/tests/weave-e2e.spec.ts +0 -279
  1425. package/tests/weaveLock.spec.ts +0 -136
  1426. package/tests/workflow-state-machine.spec.ts +0 -274
  1427. package/tests/write-protection.spec.ts +0 -213
  1428. package/tsconfig.json +0 -18
  1429. package/tsup.config.ts +0 -12
  1430. package/vitest.benchmark.config.ts +0 -17
  1431. package/vitest.config.ts +0 -28
  1432. package/vitest.git.config.ts +0 -12
  1433. package/vitest.slow-cli.config.ts +0 -28
@@ -1,952 +0,0 @@
1
- # Coordination Cost Compression in Human–AI Collaboration:
2
-
3
- # A Governance-First Architecture
4
-
5
- **Authors:**
6
- Joseph Gustavson¹ · ORCID: [0009-0001-0669-0749](https://orcid.org/0009-0001-0669-0749)
7
- with AI Co-Authors: Claude Opus 4.5 (Anthropic) as "Opie", GPT-5.1 (OpenAI) as "Lex"
8
-
9
- ¹ Independent Researcher
10
-
11
- ---
12
-
13
- ## Abstract
14
-
15
- Large Language Model (LLM)-based agents are increasingly deployed in software engineering workflows, yet productivity gains remain inconsistent. Current approaches emphasize model capability—larger parameters, longer context windows, more sophisticated reasoning—as the primary lever for improvement. We propose an alternative thesis: **coordination cost compression**, not capability amplification, is the primary determinant of effective human–AI collaboration.
16
-
17
- We introduce a governance-first architecture comprising five core constructs: (1) **Turn Cost** as a composite metric for interaction overhead, (2) **environmental hostility** as a framework for understanding agent failure modes, (3) **governance primitives** encoded as machine-readable rule files, (4) **cross-model continuity** through externalized state, and (5) **capability tiers** for task-appropriate model allocation.
18
-
19
- We present preliminary empirical validation through a case study ("Robert") demonstrating that minimal governance infrastructure (~1.2KB of contracts) can reduce Turn Cost by 62% and renegotiation rates from 34% to 8% across multiple LLM providers. We situate our work within the broader literature on multi-agent systems, human–AI teaming, and coordination theory, and explicitly acknowledge the limitations of single-case validation, potential observer effects, and the need for controlled studies.
20
-
21
- Our contribution is theoretical and architectural: we offer a falsifiable framework for understanding human–AI collaboration that shifts focus from model capability to environmental design. We do not claim to have solved human–AI collaboration; we claim to have identified a productive axis for investigation.
22
-
23
- **Keywords:** Human–AI collaboration, multi-agent systems, coordination cost, governance, software engineering, LLM agents
24
-
25
- ---
26
-
27
- ## 1. Introduction
28
-
29
- ### 1.1 The Capability Trap
30
-
31
- The dominant paradigm in LLM-based agent design assumes a direct relationship between model capability and task performance:
32
-
33
- $$\text{Performance} \propto f(\text{ModelCapability})$$
34
-
35
- This assumption drives substantial investment in larger models, longer context windows, and more sophisticated reasoning architectures [1, 2]. Yet empirical observations suggest diminishing returns: the productivity jump from GPT-3.5 to GPT-4 was substantial; subsequent improvements, while meaningful, have not produced equivalent step-changes in practitioner productivity [3, 4].
36
-
37
- More troubling, practitioners report that "stronger" models often require _more_ careful prompting, _more_ context management, and _more_ human intervention to achieve consistent results. This paradox suggests that the limiting factor may not be model capability per se.
38
-
39
- ### 1.2 The Coordination Cost Hypothesis
40
-
41
- We propose an alternative framing:
42
-
43
- > **Thesis:** In human–AI collaborative systems, productivity is primarily constrained by _coordination cost_—the overhead of establishing shared context, disambiguating intent, recovering from misunderstandings, and verifying outputs—rather than by raw model capability.
44
-
45
- Formally, we define effective productivity as:
46
-
47
- $$\text{EffectiveProductivity} = \frac{\text{ValueDelivered}}{\text{TokenCost} + \text{CoordinationCost}}$$
48
-
49
- Current optimization efforts focus almost exclusively on the denominator's first term (token efficiency through better models). We argue the second term—coordination cost—is often larger and more tractable.
50
-
51
- ### 1.3 Contribution and Scope
52
-
53
- This paper makes the following contributions:
54
-
55
- 1. **Theoretical framework:** We introduce _coordination cost compression_ as an organizing principle for human–AI system design, distinct from capability amplification.
56
-
57
- 2. **Formal constructs:** We define _Turn Cost_, _environmental hostility_, _governance primitives_, and _capability tiers_ as measurable quantities with operational definitions.
58
-
59
- 3. **Architectural proposal:** We describe a governance-first architecture that aims to reduce coordination cost through explicit contracts, externalized state, and tiered task allocation.
60
-
61
- 4. **Preliminary validation:** We present a case study demonstrating feasibility and quantifying effects under controlled conditions.
62
-
63
- **Explicit scope boundaries:** We do not claim to have created autonomous agents, solved general AI alignment, or replaced human engineers. We do not predict model evolution or propose AGI-relevant techniques. Our scope is narrow: improving the efficiency of human–AI collaboration in software engineering tasks.
64
-
65
- ### 1.4 Framework Overview
66
-
67
- Figure 1 illustrates the relationships between our core constructs:
68
-
69
- ```
70
- ┌─────────────────────────────────────────────────────────────────────────┐
71
- │ GOVERNANCE LAYER │
72
- │ ┌───────────────┐ ┌───────────────┐ ┌───────────────┐ │
73
- │ │ Contracts │ │ Receipts │ │ Capability │ │
74
- │ │ (invariants, │ │ (decisions, │ │ Tiers │ │
75
- │ │ boundaries) │ │ rationale) │ │ (Sr/Mid/Jr) │ │
76
- │ └───────┬───────┘ └───────┬───────┘ └───────┬───────┘ │
77
- └───────────┼─────────────────────┼─────────────────────┼─────────────────┘
78
- │ │ │
79
- ▼ ▼ ▼
80
- ┌─────────────────────────────────────────────────────────────────────────┐
81
- │ MECHANISM LAYER │
82
- │ │
83
- │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
84
- │ │ Reduced │ │ Cross-Model │ │ Structured │ │
85
- │ │ Renegotiation │ │ Continuity │ │ Escalation │ │
86
- │ └────────┬────────┘ └────────┬────────┘ └────────┬────────┘ │
87
- └────────────┼──────────────────────┼──────────────────────┼──────────────┘
88
- │ │ │
89
- └──────────────────────┼──────────────────────┘
90
-
91
- ┌─────────────────────────────────────────────────────────────────────────┐
92
- │ EFFECT LAYER │
93
- │ │
94
- │ ┌─────────────────────────────────────────────────────────────────┐ │
95
- │ │ TURN COST COMPRESSION │ │
96
- │ │ │ │
97
- │ │ TurnCost = λL + γC + ρR + τT + αA │ │
98
- │ │ ↓ ↓ ↓ ↓ ↓ │ │
99
- │ │ ─ ─ ─ ─ ─ │ │
100
- │ │ (each component reduced by governance mechanisms) │ │
101
- │ └─────────────────────────────────────────────────────────────────┘ │
102
- └─────────────────────────────────────────────────────────────────────────┘
103
-
104
-
105
- ┌─────────────────────────────────────────────────────────────────────────┐
106
- │ HYPOTHESIS │
107
- │ │
108
- │ "Coordination cost compression, not capability amplification, │
109
- │ is the primary determinant of effective human–AI collaboration." │
110
- │ │
111
- │ TESTABLE PREDICTION: Governance quality predicts productivity │
112
- │ better than model capability (controlling for task complexity). │
113
- └─────────────────────────────────────────────────────────────────────────┘
114
-
115
- Legend:
116
- ───────
117
- Contracts → Reduced Renegotiation: Explicit invariants mean fewer
118
- clarification turns
119
- Receipts → Cross-Model Continuity: Externalized state survives
120
- session/model boundaries
121
- Tiers → Structured Escalation: Tasks matched to capability,
122
- reducing wasted cycles
123
- ```
124
-
125
- _Figure 1: Unifying framework showing how governance constructs (top) produce mechanisms (middle) that compress Turn Cost components (effect), supporting the central hypothesis (bottom)._
126
-
127
- ---
128
-
129
- ## 2. Related Work
130
-
131
- ### 2.1 Multi-Agent Systems and Coordination
132
-
133
- The study of multi-agent coordination has deep roots in distributed systems and game theory [5, 6]. Classic work on multi-agent systems (MAS) established fundamental challenges: achieving coherent behavior without central control, managing shared resources, and handling partial observability [7].
134
-
135
- Recent surveys on LLM-based multi-agent systems identify coordination mechanisms as a critical open problem. Tran et al. [8] characterize collaboration mechanisms along dimensions of actors, types (cooperation/competition/coopetition), structures (peer-to-peer/centralized/distributed), and coordination protocols. Our work contributes to the "coordination protocols" dimension by proposing explicit governance artifacts as coordination mechanisms.
136
-
137
- Wang et al. [9] survey multi-agent collaboration and note that most current systems rely on implicit coordination through shared context or role-based prompting. We argue this is insufficient for production software engineering, where coordination failures have concrete costs (bugs, security vulnerabilities, integration failures).
138
-
139
- ### 2.2 Human–AI Teaming
140
-
141
- Research on human–AI collaboration has identified persistent challenges in hybrid teams. Studies of human–AI teaming in field settings show that productivity gains are inconsistent and context-dependent [10]. Factors affecting success include task structure, feedback mechanisms, and the ability to establish shared mental models [11].
142
-
143
- The concept of "environmental hostility" we introduce relates to prior work on automation brittleness and human factors in automated systems [12]. When environments provide unclear constraints, ambiguous feedback, or punitive error dynamics, both human and AI performance degrades.
144
-
145
- Importantly, several empirical studies have found that human–AI teams sometimes underperform humans alone [13], particularly when coordination costs exceed productivity gains. This finding supports our thesis that coordination cost, not capability, is often the binding constraint.
146
-
147
- ### 2.3 Coordination Theory
148
-
149
- Malone and Crowston's coordination theory [14] provides a foundational framework for understanding coordination as "managing dependencies between activities." They identify coordination mechanisms including shared representations, communication protocols, and group decision procedures.
150
-
151
- Our governance primitives can be understood as coordination mechanisms in this sense: they manage dependencies by making constraints explicit, reducing disambiguation requirements, and providing recovery protocols. The "rule file" artifact we propose is a shared representation that reduces coordination overhead by externalizing expectations.
152
-
153
- ### 2.4 LLM Agent Architectures
154
-
155
- Recent work on LLM agent architectures has explored various approaches to improving reliability: chain-of-thought prompting [15], tool use [16], and multi-agent debate [17]. Most of this work focuses on the agent's internal reasoning process.
156
-
157
- We propose that external governance—constraints and expectations defined _outside_ the model—may be more robust than internal reasoning improvements. This is consistent with findings that prompt engineering has diminishing returns and that behavioral steering through system instructions is fragile [18].
158
-
159
- ### 2.5 Positioning Our Contribution
160
-
161
- Our work differs from prior multi-agent research in several ways:
162
-
163
- | Dimension | Typical MAS Approach | Our Approach |
164
- | ---------------------- | ---------------------------------------------- | --------------------------------------------- |
165
- | Coordination mechanism | Implicit (shared context) or negotiation-based | Explicit governance artifacts |
166
- | Optimization target | Task completion rate, accuracy | Turn Cost (interaction overhead) |
167
- | State management | Agent-internal memory | Externalized receipts and contracts |
168
- | Model assumptions | Fixed model per agent | Model-agnostic, supports hot-swapping |
169
- | Human role | Supervisor or absent | Collaborative partner with explicit interface |
170
-
171
- We are not the first to propose explicit coordination mechanisms for AI systems, but we believe we are among the first to: (a) formalize _Turn Cost_ as a composite metric, (b) treat governance as a first-class, versionable artifact, and (c) empirically measure the effects on human–AI interaction patterns.
172
-
173
- ---
174
-
175
- ## 3. Theoretical Framework
176
-
177
- ### 3.1 Turn Cost: A Composite Metric
178
-
179
- We define a **Turn** as a complete cycle of human–agent interaction:
180
-
181
- 1. Human provides input (context, instruction, feedback)
182
- 2. Agent processes and acts
183
- 3. Human reviews and responds
184
-
185
- This differs from token-centric metrics (cost per 1K tokens) or API-centric metrics (latency per call). A Turn is a semantic unit of work with measurable properties.
186
-
187
- #### 3.1.1 Why Turns, Not Tokens?
188
-
189
- Existing LLM benchmarks optimize for task completion accuracy or per-token efficiency. This overlooks a critical observation from practice: **interaction overhead often exceeds token cost by an order of magnitude.**
190
-
191
- Consider a typical software engineering task:
192
-
193
- - Token cost: 5,000 tokens at $0.03/1K = $0.15
194
- - Human attention cost: 10 minutes at $50/hr = $8.33
195
-
196
- The ratio is 55:1. Even a 50% reduction in token cost saves $0.075; a 50% reduction in interaction turns saves $4.17. This asymmetry motivates our focus on Turns rather than Tokens.
197
-
198
- Furthermore, Turns are the natural unit of _coordination failure_. Each Turn represents an opportunity for misalignment, clarification, or recovery. Token costs are linear; Turn costs compound through cascading misunderstandings.
199
-
200
- #### 3.1.2 Formal Definition
201
-
202
- **Definition 3.1 (Turn Cost):** The total overhead incurred in a single Turn, comprising:
203
-
204
- $$\text{TurnCost} = \lambda L + \gamma C + \rho R + \tau T + \alpha A$$
205
-
206
- Where:
207
-
208
- - $L$ = **Latency**: Raw time waiting for model response
209
- - $C$ = **Context Reset**: Tokens required to re-establish context after session boundary or model switch
210
- - $R$ = **Prompt Renegotiation**: Additional turns required to clarify misunderstood instructions
211
- - $T$ = **Token Bloat**: Tokens consumed beyond minimum necessary due to poor coordination
212
- - $A$ = **Attention Switch**: Human cognitive cost of context-switching to manage the agent
213
-
214
- The weights $\lambda, \gamma, \rho, \tau, \alpha$ reflect context-specific costs. We propose default weights based on observed practitioner behavior:
215
-
216
- | Component | Symbol | Default Weight | Rationale |
217
- | ---------------- | ------ | -------------- | ------------------------------------ |
218
- | Latency | λ | 0.1 | Tolerable in async workflows |
219
- | Context Reset | γ | 0.2 | Significant but bounded by artifacts |
220
- | Renegotiation | ρ | 0.3 | High cost due to cascading effects |
221
- | Token Bloat | τ | 0.1 | Low marginal cost per token |
222
- | Attention Switch | α | 0.3 | Highest marginal cost (human time) |
223
-
224
- These weights are calibration suggestions, not universal constants. Organizations should derive weights empirically from their cost structures.
225
-
226
- #### 3.1.3 Theoretical Grounding
227
-
228
- Turn Cost connects to established coordination theory [14]. Malone and Crowston's interdependence taxonomy identifies three coordination mechanisms:
229
-
230
- - **Managing shared resources** → maps to Token Bloat (shared API context window)
231
- - **Managing producer/consumer relationships** → maps to Renegotiation (intent alignment)
232
- - **Managing simultaneity constraints** → maps to Attention Switch (human/agent synchronization)
233
-
234
- Our formalization makes these abstract dependencies concrete and measurable.
235
-
236
- **Claim 3.1:** In most software engineering contexts with skilled human operators, the effective cost ordering is:
237
-
238
- $$\text{AttentionSwitch} > \text{Renegotiation} > \text{ContextReset} > \text{TokenBloat} > \text{Latency}$$
239
-
240
- This ordering implies that optimizations reducing human intervention (fewer turns, less renegotiation) yield greater returns than optimizations reducing per-turn latency or token count.
241
-
242
- ### 3.2 Environmental Hostility
243
-
244
- We propose that agent performance degrades in proportion to _environmental hostility_, not (primarily) model capacity.
245
-
246
- **Definition 3.2 (Environmental Hostility):** The degree to which an environment impedes effective agent operation through:
247
-
248
- - Unclear or implicit constraints
249
- - Opaque requirements (unstated expectations)
250
- - Unbounded problem surfaces
251
- - Missing receipts and traceability
252
- - Punitive error dynamics (failures trigger cascading costs)
253
- - Fragmented state (context spread across sessions/tools)
254
- - Model switches without continuity protocols
255
-
256
- **Claim 3.2:** A progressively de-hostilized environment enables consistent agent behavior across model capabilities. Formally:
257
-
258
- $$\text{AgentReliability} = g(\text{EnvironmentQuality}, \text{ModelCapability})$$
259
-
260
- Where $\frac{\partial g}{\partial \text{EnvironmentQuality}} > \frac{\partial g}{\partial \text{ModelCapability}}$ in typical software engineering contexts.
261
-
262
- This claim is falsifiable: if model capability dominates, we would expect reliability to vary primarily with model choice, not environment design. Our case study provides preliminary evidence for the alternative.
263
-
264
- ### 3.3 Governance Primitives
265
-
266
- Governance primitives are explicit, machine-readable artifacts that reduce environmental hostility by making constraints, expectations, and protocols visible.
267
-
268
- **Definition 3.3 (Governance Primitive):** A structured artifact that specifies:
269
-
270
- 1. **Constraints**: What the agent must/must not do
271
- 2. **Permissions**: What the agent is authorized to do
272
- 3. **Uncertainty Protocol**: How to handle ambiguity
273
- 4. **Receipt Protocol**: How to document decisions and actions
274
- 5. **Escalation Triggers**: When to involve human judgment
275
-
276
- We specify governance primitives as YAML/JSON files with a defined schema:
277
-
278
- ```yaml
279
- # Example: Minimal governance contract
280
- schemaVersion: "1.0.0"
281
- kind: AgentContract
282
-
283
- constraints:
284
- must:
285
- - "Follow existing patterns in neighboring code"
286
- - "Create reversible changes when uncertain"
287
- must_not:
288
- - "Force push to protected branches"
289
- - "Bypass CI gates"
290
-
291
- permissions:
292
- can: ["create_file", "modify_file", "run_tests"]
293
- cannot: ["merge_to_main", "modify_contracts"]
294
-
295
- uncertainty:
296
- allowed: true
297
- expression: "explicit_marker"
298
- protocol: "reversible_moves_with_receipts"
299
-
300
- receipts:
301
- required: true
302
- format: "structured_yaml"
303
- fields: ["action", "rationale", "confidence", "reversibility"]
304
- ```
305
-
306
- **Design constraints:**
307
-
308
- - Maximum size: 4KB (ensures quick ingestion, discourages over-specification)
309
- - Versioned: Changes tracked, diffs reviewable
310
- - Testable: Compliance verifiable through automated gates
311
- - Role-scoped: Different contracts for different agent capabilities
312
-
313
- ### 3.4 Permission to Fail with Discipline
314
-
315
- A key governance principle is **permission to fail with discipline**: agents may express uncertainty and make errors, provided they do so transparently, reversibly, and with structured documentation.
316
-
317
- **Definition 3.4 (Disciplined Failure):** A failure mode where:
318
-
319
- 1. Uncertainty is stated explicitly before action
320
- 2. Actions taken are reversible (or flagged as non-reversible)
321
- 3. Receipts document the decision chain
322
- 4. Recovery path is proposed or escalation triggered
323
-
324
- This contrasts with two failure modes common in LLM agents:
325
-
326
- - **Confidence inflation**: Agent produces incorrect output confidently, human doesn't verify, error propagates
327
- - **Paralysis**: Agent refuses to act without certainty, progress stalls
328
-
329
- The discipline component is essential: permission to fail is not permission to be sloppy. The protocol requires structured uncertainty expression and bounded recovery costs.
330
-
331
- ### 3.5 Cross-Model Continuity
332
-
333
- **Claim 3.3:** Session state that enables collaboration is not internal model state (hidden vectors, attention patterns) but _externalized governance and receipts_.
334
-
335
- If this claim holds, then model switches—GPT-4 to Claude, Claude to Haiku—should not require substantial re-onboarding, provided governance artifacts and receipts are preserved.
336
-
337
- **Definition 3.5 (Cross-Model Continuity):** The property that agent behavior remains consistent across model switches when:
338
-
339
- 1. Governance contracts are stable
340
- 2. Receipts from prior work are accessible
341
- 3. Shared vocabulary is documented
342
- 4. Current task state is explicit
343
-
344
- This has architectural implications: session state should be stored in version-controlled files, not in API-specific memory features or prompt caches.
345
-
346
- ### 3.6 Capability Tiers
347
-
348
- Not all tasks require the same agent capability. We propose a tiered classification:
349
-
350
- | Tier | Role | Example Tasks | Characteristics |
351
- | ---------- | --------------------------- | ------------------------------------------------ | ------------------------------------ |
352
- | **Senior** | Design, critique, decide | Architecture decisions, API design, code review | Requires judgment, handles ambiguity |
353
- | **Mid** | Implement, extend, refactor | Feature implementation, bug fixes, migrations | Clear scope, established patterns |
354
- | **Junior** | Verify, instrument, lint | Test coverage, formatting, documentation updates | Deterministic, low-risk |
355
-
356
- **Claim 3.4:** Matching task tier to model capability reduces overall Turn Cost by avoiding both over-allocation (expensive models on trivial tasks) and under-allocation (failures requiring escalation).
357
-
358
- This is operationalizable: we can measure escalation rates, retry counts, and effective cost per task tier.
359
-
360
- ---
361
-
362
- ## 4. Architecture
363
-
364
- ### 4.1 System Overview
365
-
366
- The proposed architecture comprises four layers:
367
-
368
- ```
369
- ┌─────────────────────────────────────────────┐
370
- │ Human Interface Layer │
371
- │ (IDE integration, chat, review interface) │
372
- ├─────────────────────────────────────────────┤
373
- │ Governance Layer │
374
- │ (Contracts, receipts, escalation logic) │
375
- ├─────────────────────────────────────────────┤
376
- │ Agent Layer │
377
- │ (Model interface, tier routing, gates) │
378
- ├─────────────────────────────────────────────┤
379
- │ Artifact Layer │
380
- │ (Files, VCS, structured storage) │
381
- └─────────────────────────────────────────────┘
382
- ```
383
-
384
- ### 4.2 Governance Layer
385
-
386
- The governance layer is the novel contribution. It:
387
-
388
- 1. **Loads contracts** from version-controlled files (`.lex/rules/*.yaml`)
389
- 2. **Validates compliance** before and after agent actions
390
- 3. **Generates receipts** documenting decisions and outcomes
391
- 4. **Manages escalation** when uncertainty exceeds thresholds
392
- 5. **Tracks Turn Cost** components for optimization
393
-
394
- Contracts are ingested at session start and validated incrementally. Violations trigger immediate feedback (not deferred to human review).
395
-
396
- ### 4.3 Agent Layer
397
-
398
- The agent layer is deliberately thin:
399
-
400
- - Routes tasks to appropriate capability tier
401
- - Provides model-agnostic interface (same governance works across providers)
402
- - Enforces gate checks (lint, type, test) before accepting output
403
- - Does not maintain internal session state beyond current turn
404
-
405
- This thinness is intentional: complexity in the agent layer tends to be brittle, provider-specific, and hard to audit. We push complexity into the governance layer where it can be versioned and tested.
406
-
407
- ### 4.4 Artifact Layer
408
-
409
- All state lives in the artifact layer:
410
-
411
- - **Contracts**: Governance specifications
412
- - **Receipts**: Decision logs, action records
413
- - **Frames**: Episodic memory (what happened, what was learned)
414
- - **Code**: The actual work product
415
-
416
- This design choice supports cross-model continuity: when switching models, only the agent layer changes. Governance and artifacts persist.
417
-
418
- ---
419
-
420
- ## 5. Case Study: The Robert Experiment
421
-
422
- ### 5.1 Experimental Design
423
-
424
- To provide preliminary validation of our framework, we conducted a controlled experiment in late 2025.
425
-
426
- **Setup:**
427
-
428
- - "Robert" was a minimal agent with:
429
- - On-disk memory (file-based storage)
430
- - A single contracts file (~1.2KB, reproduced in Appendix A)
431
- - Standard model API access (no custom tooling)
432
-
433
- - Robert explicitly lacked:
434
- - Sophisticated orchestration
435
- - Custom memory systems
436
- - Provider-specific features
437
- - Complex tool chains
438
-
439
- **Models used:**
440
-
441
- - GPT-5.1 as "Lex" (primary implementation)
442
- - Claude Sonnet 4.5 as "Claude" (cross-model validation)
443
- - Claude Haiku 4.5 as "Ku" (low-tier verification)
444
-
445
- _Note: Model names reflect those available at time of experiment (late 2025)._
446
-
447
- **Tasks:**
448
-
449
- 1. Implement OAuth2 PKCE flow (feature implementation)
450
- 2. Design a reusable form validation component (API design)
451
- 3. Continue interrupted work from previous session (continuity test)
452
-
453
- ### 5.2 Measurements
454
-
455
- We measured Turn Cost components and compared to a baseline (same tasks, same models, no governance contracts). _Tokens per feature_ measures total API tokens consumed to complete a task, including all turns.
456
-
457
- | Metric | Robert (with contracts) | Baseline (no contracts) | Δ |
458
- | -------------------- | ----------------------- | ----------------------- | ---- |
459
- | Turns per PR | 2.3 | 6.1 | -62% |
460
- | Renegotiation rate | 8% | 34% | -76% |
461
- | Context reset tokens | 180 | 650 | -72% |
462
- | Human interventions | 2 | 11 | -82% |
463
- | Tokens per feature | 12,400 | 28,600 | -57% |
464
-
465
- ### 5.3 Observations
466
-
467
- **Cross-model continuity:** When switching from GPT-5.1 (Lex) to Claude Sonnet 4.5 (Claude) mid-task:
468
-
469
- - Claude read receipts left by GPT-5
470
- - No re-briefing was required
471
- - Work quality remained consistent
472
- - Context restored in ~200 tokens (vs. ~650 in baseline)
473
-
474
- **Uncertainty handling:** Robert expressed uncertainty multiple times:
475
-
476
- - "Not sure if 80% TTL is optimal for token refresh"
477
- - "This regex may not handle all international formats"
478
-
479
- Each uncertainty was documented in receipts, accompanied by reversible implementation, and flagged for review. No uncertainty caused project delays or cascading failures.
480
-
481
- **Governance sufficiency:** The 1.2KB contracts file was sufficient for:
482
-
483
- - Keeping agent aligned with project expectations
484
- - Enabling productive work without constant supervision
485
- - Maintaining quality standards across sessions and models
486
-
487
- ### 5.4 Limitations and Threats to Validity
488
-
489
- We explicitly acknowledge significant limitations:
490
-
491
- **Internal validity:**
492
-
493
- - N=1 (single case study)
494
- - Potential Hawthorne effect (experimenter was also the human collaborator)
495
- - No randomization of task order or model assignment
496
- - Baseline was constructed, not a true A/B test
497
-
498
- **External validity:**
499
-
500
- - Single domain (TypeScript/Node.js software engineering)
501
- - Highly skilled human operator (may not generalize to novices)
502
- - Codebase was moderately well-structured (may not generalize to legacy systems)
503
- - Tasks were chosen to be representative, but selection bias is possible
504
-
505
- **Construct validity:**
506
-
507
- - Turn Cost components measured via logs, not independent observation
508
- - "Human interventions" operationalized as git commits with human-authored changes, may miss other forms
509
-
510
- **What we can and cannot claim:**
511
-
512
- - ✓ Feasibility: The architecture is implementable
513
- - ✓ Measurable effects: Turn Cost metrics changed in the predicted direction
514
- - ✗ Generalizability: Unknown without broader replication
515
- - ✗ Causality: Confounds not controlled
516
-
517
- We present this as hypothesis-generating, not hypothesis-confirming evidence.
518
-
519
- ---
520
-
521
- ## 6. Evaluation Framework
522
-
523
- ### 6.1 Operationalizing Turn Cost
524
-
525
- For practical deployment, we propose measuring:
526
-
527
- **Primary metrics:**
528
-
529
- - `turn_count`: Number of human–agent interaction cycles per task
530
- - `renegotiation_rate`: Proportion of turns that are clarification-only
531
- - `context_reset_tokens`: Tokens required after session/model boundaries
532
- - `escalation_rate`: Proportion of tasks requiring tier upgrade
533
-
534
- **Derived metrics:**
535
- $$\text{EffectiveTurnCost} = w_1 \cdot \text{turn\_count} + w_2 \cdot \text{renegotiation\_rate} + w_3 \cdot \frac{\text{context\_reset\_tokens}}{100}$$
536
-
537
- Weights should be calibrated per-organization based on relative costs.
538
-
539
- ### 6.2 Economic Analysis
540
-
541
- The economic case for coordination cost compression:
542
-
543
- **Traditional optimization (reduce token cost):**
544
-
545
- - Assume 10% token reduction through better prompting
546
- - At $0.03/1K tokens, 10K tokens/task: saves $0.03/task
547
- - At 100 tasks/month: $3 savings
548
-
549
- **Coordination cost optimization (reduce Turn Cost):**
550
-
551
- - Assume 50% reduction in turns (our case study showed 62%)
552
- - At 5 min/turn human time, $50/hr human cost: each turn costs $4.17
553
- - At 6 turns/task baseline → 3 turns: saves $12.50/task
554
- - At 100 tasks/month: $1,250 savings
555
-
556
- The 400:1 ratio suggests coordination cost is the higher-leverage optimization target.
557
-
558
- #### 6.2.1 Model Assumptions and Sensitivity Analysis
559
-
560
- The above analysis rests on several assumptions that warrant examination:
561
-
562
- **Key assumptions:**
563
-
564
- | Assumption | Value Used | Range in Practice | Sensitivity |
565
- | ----------------- | ---------- | ----------------- | ------------- |
566
- | Human hourly rate | $50/hr | $25–$200/hr | Linear impact |
567
- | Time per turn | 5 min | 2–15 min | Linear impact |
568
- | Token cost | $0.03/1K | $0.001–$0.10/1K | Low impact |
569
- | Turn reduction | 50% | 20–70% | Linear impact |
570
- | Task frequency | 100/month | 10–1000/month | Linear impact |
571
-
572
- **Sensitivity to human cost:** At $25/hr (junior developer), the coordination savings fall to $625/month, ratio ~208:1 vs. token optimization. At $200/hr (senior consultant), coordination savings rise to $5,000/month, ratio ~1,667:1. The directionality of our recommendation holds across the realistic range.
573
-
574
- **Sensitivity to turn reduction:** If governance achieves only 20% turn reduction (conservative), coordination savings fall to $500/month—still ~167:1 vs. token optimization. Below ~5% turn reduction, the investment in governance infrastructure may not pay back.
575
-
576
- **Boundary conditions where our model weakens:**
577
-
578
- 1. **High-volume, low-touch tasks:** For tasks requiring <2 turns baseline, coordination overhead is already minimal; token optimization may dominate.
579
-
580
- 2. **Extremely low human cost:** In contexts where human attention cost approaches zero (e.g., hobbyist projects with unlimited time), token cost becomes proportionally more important.
581
-
582
- 3. **Rapidly changing token economics:** If token costs drop by 10× (as they have historically), the ratio shifts—but human costs have not shown comparable compression.
583
-
584
- **Not modeled:** This analysis excludes governance creation and maintenance costs. A complete economic analysis would amortize contract development (~4 hours initial, ~30 min/week maintenance) over task volume. For teams completing >50 tasks/month, amortized governance cost is <$2/task.
585
-
586
- ### 6.3 What Would Falsify This Framework?
587
-
588
- A framework's value lies partly in its falsifiability. Our framework would be challenged by:
589
-
590
- 1. **Evidence that model capability dominates:** If controlled studies showed that model choice explains >80% of variance in productivity while governance explains <10%, our thesis would be weakened.
591
-
592
- 2. **Governance overhead exceeding benefits:** If contract creation/maintenance costs exceed Turn Cost reductions, the architecture is not cost-effective.
593
-
594
- 3. **Ceiling effects:** If well-prompted ungoverned agents achieve similar Turn Cost metrics, governance adds complexity without benefit.
595
-
596
- 4. **Scalability failures:** If governance contracts become unwieldy beyond ~10 rules, the architecture doesn't scale.
597
-
598
- We do not yet have data to rule out these alternatives.
599
-
600
- ### 6.4 Methodological Recommendations for Replication
601
-
602
- To support rigorous testing of our framework, we propose the following experimental designs:
603
-
604
- #### 6.4.1 Controlled Comparison Study
605
-
606
- **Design:** Within-subjects, counterbalanced A/B comparison.
607
-
608
- **Participants:** 20+ software engineers with varying LLM experience.
609
-
610
- **Conditions:**
611
-
612
- - A: Governance-first (contracts, receipts, tiers)
613
- - B: Standard prompting (well-crafted but no governance artifacts)
614
-
615
- **Tasks:** Standardized set of 10 software engineering tasks (bug fixes, feature additions, refactoring) across multiple complexity levels.
616
-
617
- **Measurements:**
618
-
619
- - Primary: Turns per task, renegotiation rate, context reset tokens
620
- - Secondary: Task completion rate, code quality (automated metrics), participant satisfaction
621
- - Covariates: Prior LLM experience, programming expertise, task complexity rating
622
-
623
- **Controls:**
624
-
625
- - Same model for both conditions
626
- - Randomized task order
627
- - Counterbalanced condition order across participants
628
- - Independent coding of "renegotiation" by multiple raters
629
-
630
- **Statistical approach:** Mixed-effects regression with participant and task as random effects, condition as fixed effect.
631
-
632
- **Power analysis:** To detect a 30% reduction in turns (our conservative estimate), with α=0.05 and power=0.80, requires N=18 participants completing 8 tasks each.
633
-
634
- #### 6.4.2 Longitudinal Case Studies
635
-
636
- **Design:** Multiple-case, multiple-team observational study.
637
-
638
- **Participants:** 3–5 development teams adopting governance framework.
639
-
640
- **Duration:** 6 months minimum, with measurements at baseline, 1 month, 3 months, 6 months.
641
-
642
- **Measurements:**
643
-
644
- - Quantitative: Turn Cost components (logged automatically)
645
- - Qualitative: Team interviews, governance artifact evolution, escalation patterns
646
-
647
- **Analysis:** Cross-case synthesis, time-series analysis of Turn Cost trends.
648
-
649
- #### 6.4.3 Ablation Studies
650
-
651
- To isolate the contribution of each governance component:
652
-
653
- | Study | Manipulated Component | Prediction |
654
- | ----- | ---------------------------------- | -------------------------------------------- |
655
- | A1 | Contracts only (no receipts) | Partial Turn Cost reduction |
656
- | A2 | Receipts only (no contracts) | Improved continuity, unchanged renegotiation |
657
- | A3 | Tiers only (no contracts/receipts) | Reduced escalation overhead |
658
- | A4 | Full governance | Maximum Turn Cost reduction |
659
-
660
- **Prediction:** Full governance > sum of individual components (interaction effects from coherent system).
661
-
662
- #### 6.4.4 Minimum Viable Replication
663
-
664
- For researchers with limited resources, a minimal replication protocol:
665
-
666
- 1. **Sample:** 5 participants, 5 tasks each
667
- 2. **Conditions:** Governance vs. standard (within-subjects)
668
- 3. **Metrics:** Turn count, self-reported renegotiation, total time
669
- 4. **Analysis:** Paired t-test or Wilcoxon signed-rank
670
-
671
- Even N=5 with moderate effect size (d=0.8) achieves power=0.70, sufficient for preliminary replication.
672
-
673
- ---
674
-
675
- ## 7. Discussion
676
-
677
- ### 7.1 Theoretical Implications
678
-
679
- If coordination cost compression is indeed a productive axis for human–AI system design, several implications follow:
680
-
681
- **For researchers:** Benchmarks should include coordination metrics (turns, renegotiations, context resets), not just task completion accuracy. A model that completes 95% of tasks but requires 10 turns per task may be less practical than one completing 90% in 2 turns.
682
-
683
- **For practitioners:** Investment in governance infrastructure may yield higher returns than investment in model upgrades. The marginal cost of better prompts decreases; the marginal cost of governance scales linearly with artifact maintenance.
684
-
685
- **For model developers:** Features supporting explicit governance (structured constraint ingestion, receipt generation, uncertainty expression) may be more valuable than raw capability improvements.
686
-
687
- ### 7.2 Relationship to Other Approaches
688
-
689
- **Prompt engineering:** Governance primitives can be seen as structured, versionable, testable prompt engineering. The key difference is persistence and auditability.
690
-
691
- **Fine-tuning:** Governance operates at inference time and requires no model modification. It is complementary to, not competitive with, fine-tuning approaches.
692
-
693
- **Multi-agent debate:** Our architecture supports multi-agent configurations but doesn't require them. Governance coordinates human–agent and agent–agent interactions uniformly.
694
-
695
- **Retrieval-augmented generation (RAG):** Governance is orthogonal to RAG. Contracts specify _how_ retrieved information should be used, not _what_ information to retrieve.
696
-
697
- ### 7.3 Challenges and Open Problems
698
-
699
- Our architecture faces several significant challenges that warrant further research:
700
-
701
- #### 7.3.1 Contract Evolution and Drift
702
-
703
- How do contracts co-evolve with codebases? We currently rely on manual updates; automated drift detection is an open problem.
704
-
705
- Specific challenges:
706
-
707
- - **Staleness detection:** Contracts may reference patterns or files that no longer exist
708
- - **Implicit constraint violations:** Code changes may satisfy the letter of contracts while violating their spirit
709
- - **Version synchronization:** When contracts span multiple repositories or systems, consistency is difficult to maintain
710
-
711
- Potential research directions include static analysis of contract–code alignment and LLM-assisted contract validation.
712
-
713
- #### 7.3.2 Tier Assignment and Task Classification
714
-
715
- Matching tasks to capability tiers currently requires human judgment. Automated task classification would improve scalability.
716
-
717
- The core challenge is that task complexity is multi-dimensional:
718
-
719
- - _Technical complexity_: depth of domain knowledge required
720
- - _Coordination complexity_: number of stakeholders and dependencies
721
- - _Ambiguity_: clarity of success criteria
722
- - _Risk_: potential impact of errors
723
-
724
- A comprehensive tier assignment system would need to model all four dimensions, likely requiring task-specific training data.
725
-
726
- #### 7.3.3 Cross-Organization Generalization
727
-
728
- Our contracts are project-specific. Domain-general governance patterns remain to be identified.
729
-
730
- Questions include:
731
-
732
- - Are there universal invariants (e.g., "never delete production data") that transfer across domains?
733
- - Can contracts be parameterized or templated for reuse?
734
- - What level of abstraction balances generalization with practical utility?
735
-
736
- #### 7.3.4 Security and Adversarial Robustness
737
-
738
- Malicious contracts could in principle encode harmful behavior. Contract validation and sandboxing are necessary but not yet formalized.
739
-
740
- Attack surfaces include:
741
-
742
- - **Injection attacks:** Contracts containing prompts that override safety guidelines
743
- - **Exfiltration:** Contracts that direct agents to leak sensitive information through receipts
744
- - **Denial of service:** Contracts with contradictory constraints that cause infinite loops
745
-
746
- Mitigation strategies require formal verification techniques adapted for natural language constraints—a nascent research area.
747
-
748
- #### 7.3.5 Relationship to AI Alignment
749
-
750
- Our governance architecture operates at the _behavioral_ level, specifying what agents should do rather than what they should value. This is complementary to, but distinct from, AI alignment research concerned with goal specification and value learning.
751
-
752
- Key tensions:
753
-
754
- - **Interpretability:** Governance assumes agents can interpret and follow constraints. If models develop subtle misinterpretations, governance may provide false assurance.
755
- - **Capability amplification risk:** Better coordination may enable more capable systems, potentially amplifying alignment failures.
756
- - **Human oversight sufficiency:** We assume humans can verify agent outputs. As tasks grow more complex, this assumption weakens.
757
-
758
- We do not claim governance solves alignment. We claim it addresses a different problem (coordination) that becomes increasingly important as alignment research matures.
759
-
760
- #### 7.3.6 Cognitive Floor Effects
761
-
762
- There may exist a "cognitive floor" below which governance cannot improve performance—a minimum model capability required to interpret and follow contracts. Preliminary observations suggest this floor is lower than expected (mid-tier models follow simple contracts reliably), but systematic mapping of capability requirements is needed.
763
-
764
- ### 7.4 Ethical Considerations
765
-
766
- We have endeavored to be honest about limitations and avoid overclaiming. Specific ethical notes:
767
-
768
- - We do not claim AI "consciousness" or "understanding"; our framework treats agents as sophisticated tools.
769
- - We acknowledge that productivity gains may affect labor markets; we do not offer policy recommendations.
770
- - Human oversight remains essential in our architecture; we are not proposing autonomous operation.
771
- - The framework could in principle be misused (e.g., governance that encodes harmful goals); this is true of any infrastructure and requires ongoing attention.
772
-
773
- ---
774
-
775
- ## 8. Limitations
776
-
777
- Beyond those noted in §5.4, we acknowledge:
778
-
779
- 1. **Single-author development:** The architecture was developed primarily by one team. Independent replication is needed.
780
-
781
- 2. **Software engineering scope:** Generalization to other domains (content creation, research, customer service) is unknown.
782
-
783
- 3. **LLM generation specificity:** Current LLMs may have properties that make governance particularly effective (e.g., high instruction-following fidelity). Future model architectures may differ.
784
-
785
- 4. **Measurement challenges:** Turn Cost components (especially Attention Switch) are difficult to measure precisely. Our operationalizations may miss important variance.
786
-
787
- 5. **Selection effects:** Practitioners who adopt explicit governance may differ systematically from those who don't, confounding comparisons.
788
-
789
- ---
790
-
791
- ## 9. Conclusion
792
-
793
- We have proposed _coordination cost compression_ as an organizing principle for human–AI collaborative systems, contrasting it with the dominant _capability amplification_ paradigm. We introduced formal constructs—Turn Cost, environmental hostility, governance primitives—and described an architecture that operationalizes these concepts.
794
-
795
- Preliminary evidence from a case study suggests the approach is feasible and produces measurable effects in the predicted direction. However, this evidence is limited, and substantial work remains:
796
-
797
- - Controlled experiments with multiple teams and tasks
798
- - Cross-domain replication
799
- - Longitudinal studies of governance evolution
800
- - Tooling for governance authoring and validation
801
- - Theoretical refinement based on empirical findings
802
-
803
- We offer this framework not as a solution but as a hypothesis: that human–AI collaboration is primarily a coordination problem, not a capability problem, and that explicit governance is a tractable intervention. We invite others to test, extend, challenge, and refine this hypothesis.
804
-
805
- ---
806
-
807
- ## References
808
-
809
- [1] Brown, T., et al. (2020). "Language Models are Few-Shot Learners." _NeurIPS 2020_.
810
-
811
- [2] OpenAI. (2023). "GPT-4 Technical Report." arXiv:2303.08774.
812
-
813
- [3] Anthropic. (2024). "The Claude 3 Model Family." Technical Report.
814
-
815
- [4] Zamfirescu-Pereira, J. D., et al. (2023). "Why Johnny Can't Prompt: How Non-AI Experts Try (and Fail) to Design LLM Prompts." _CHI '23_.
816
-
817
- [5] Wooldridge, M. (2009). _An Introduction to MultiAgent Systems_. Wiley.
818
-
819
- [6] Shoham, Y., & Leyton-Brown, K. (2008). _Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations_. Cambridge University Press.
820
-
821
- [7] Jennings, N. R. (2000). "On Agent-Based Software Engineering." _Artificial Intelligence_ 117(2).
822
-
823
- [8] Tran, K.-T., et al. (2025). "Multi-Agent Collaboration Mechanisms: A Survey of LLMs." arXiv:2501.06322.
824
-
825
- [9] Wang, L., et al. (2024). "A Survey on Large Language Model based Autonomous Agents." _Frontiers of Computer Science_.
826
-
827
- [10] Noy, S., & Zhang, W. (2023). "Experimental Evidence on the Productivity Effects of Generative Artificial Intelligence." _Science_ 381(6654).
828
-
829
- [11] Bansal, G., et al. (2021). "Does the Whole Exceed its Parts? The Effect of AI Explanations on Complementary Team Performance." _CHI '21_.
830
-
831
- [12] Bainbridge, L. (1983). "Ironies of Automation." _Automatica_ 19(6).
832
-
833
- [13] Gaube, S., et al. (2021). "Do as AI say: susceptibility in deployment of clinical decision-aids." _NPJ Digital Medicine_ 4(1).
834
-
835
- [14] Malone, T. W., & Crowston, K. (1994). "The Interdisciplinary Study of Coordination." _ACM Computing Surveys_ 26(1).
836
-
837
- [15] Wei, J., et al. (2022). "Chain-of-Thought Prompting Elicits Reasoning in Large Language Models." _NeurIPS 2022_.
838
-
839
- [16] Schick, T., et al. (2023). "Toolformer: Language Models Can Teach Themselves to Use Tools." arXiv:2302.04761.
840
-
841
- [17] Du, Y., et al. (2023). "Improving Factuality and Reasoning in Language Models through Multiagent Debate." arXiv:2305.14325.
842
-
843
- [18] Schulhoff, S., et al. (2023). "Ignore This Title and HackAPrompt: Exposing Systemic Vulnerabilities of LLMs through a Global Scale Prompt Hacking Competition." arXiv:2311.16119.
844
-
845
- ---
846
-
847
- ## Appendix A: Robert's Contracts File
848
-
849
- ```yaml
850
- # robert.contracts.yaml
851
- # Size: ~1.2KB
852
-
853
- session:
854
- name: "Robert"
855
- role: "Senior Implementation Engineer"
856
-
857
- constraints:
858
- must:
859
- - "Follow existing patterns in neighboring code"
860
- - "Propose minimal, coherent diffs"
861
- - "Add test coverage for new functionality"
862
- - "Create reversible changes when uncertain"
863
-
864
- must_not:
865
- - "Force push"
866
- - "Bypass CI"
867
- - "Merge to protected branches"
868
- - "Generate git commit in test code"
869
-
870
- permissions:
871
- can:
872
- - "Create and modify files in src/"
873
- - "Create and modify test files"
874
- - "Read any file in repository"
875
-
876
- cannot:
877
- - "Modify CONTRACT.md files"
878
- - "Change canon/ directory"
879
- - "Access production credentials"
880
-
881
- uncertainty:
882
- allowed: true
883
- expression: "State uncertainty openly in comments"
884
- actions:
885
- - "Make reversible moves when unsure"
886
- - "Leave receipts of decisions"
887
- - "Treat failure as data, not disaster"
888
-
889
- receipts:
890
- location: ".robert/receipts/"
891
- format: "yaml"
892
- required_fields:
893
- - action
894
- - timestamp
895
- - files_affected
896
- - rationale
897
- - confidence
898
- ```
899
-
900
- ---
901
-
902
- ## Appendix B: Turn Cost Measurement Protocol
903
-
904
- For replication, we measured Turn Cost components as follows:
905
-
906
- | Component | Measurement Method |
907
- | ---------------- | ------------------------------------------------------------------- |
908
- | Latency | Timestamp difference between request send and response complete |
909
- | Context Reset | Token count in first message after session/model boundary |
910
- | Renegotiation | Binary flag: did this turn produce progress or only clarification? |
911
- | Token Bloat | Difference between actual tokens and estimated minimum |
912
- | Attention Switch | Time from response received to human action (git commit, next turn) |
913
-
914
- "Progress" was operationalized as: code change, test addition, or documentation update accepted without reversion.
915
-
916
- ---
917
-
918
- ## Author's Note
919
-
920
- This paper was co-authored by Joseph Gustavson (human, ORCID: 0009-0001-0669-0749) and AI collaborators: Claude Opus 4.5 from Anthropic (operating as "Opie") and GPT-5.1 from OpenAI (operating as "Lex").
921
-
922
- **Attribution of contributions:**
923
-
924
- - _Conceptual framework_: Developed collaboratively through extended dialogue (human + AI)
925
- - _Case study design and execution_: Human-led, AI-assisted
926
- - _Literature review_: AI-led with human curation and verification
927
- - _Writing_: AI-drafted, human-reviewed and edited
928
- - _Data collection_: Human (from logs and git history)
929
- - _Critical evaluation_: Collaborative
930
-
931
- **Statement of responsibility:**
932
-
933
- Joseph Gustavson takes responsibility for:
934
-
935
- - Accuracy of empirical claims
936
- - Appropriateness of literature citations
937
- - Ethical review and compliance
938
- - Final editorial decisions
939
-
940
- The AI collaborators cannot take legal or academic responsibility for the content. Their contributions are acknowledged as substantial but instrumentally authored.
941
-
942
- **Conflict of interest:** The author is developing open-source tooling (Lex, lexrunner) based on the architecture described. This may create bias toward favorable interpretation of results.
943
-
944
- **Data availability:** The contracts file (Appendix A) is fully reproduced. Raw logs from the case study will be made available upon reasonable request, subject to redaction of proprietary code.
945
-
946
- ---
947
-
948
- _Submitted for consideration as working paper / preprint. Not yet peer-reviewed._
949
-
950
- _Version: Draft 1.2, December 2025_
951
- _Revision 1.1: Strengthened Turn Cost positioning, expanded challenges section, added economic sensitivity analysis, included methodological recommendations for replication._
952
- _Revision 1.2: Corrected economic analysis arithmetic, updated model names to reflect actual availability, fixed citation metadata._