@iowarp/clio-coder 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/README.md +1 -1
  3. package/dist/{acp-H2NGRPWO.js → acp-WNAYYF4F.js} +4 -5
  4. package/dist/{agents-TL5LLUQP.js → agents-3OKXHLOI.js} +33 -31
  5. package/dist/assets/codewiki.json +1 -1
  6. package/dist/{auth-E5SW4HMS.js → auth-VKNNMGPU.js} +10 -11
  7. package/dist/{builtins-IA7V7FUC.js → builtins-WGALA46I.js} +4 -4
  8. package/dist/{chunk-F5JHEYZM.js → chunk-23L32XTI.js} +10 -7
  9. package/dist/{chunk-DWUOQKRU.js → chunk-25QBEXRS.js} +2 -2
  10. package/dist/{chunk-LLDJM5XK.js → chunk-26QSH3EJ.js} +2 -2
  11. package/dist/{chunk-N2Z7HLVY.js → chunk-2ASED4PZ.js} +10 -10
  12. package/dist/{chunk-MCEPRMZW.js → chunk-2CU2H6KE.js} +2 -2
  13. package/dist/chunk-2DSOYNFC.js +108 -0
  14. package/dist/{chunk-LDJG7DW3.js → chunk-2ZSONWVL.js} +4 -4
  15. package/dist/{chunk-GI7YYQ3F.js → chunk-36CT5VVL.js} +324 -41
  16. package/dist/{chunk-4UVU7BJ5.js → chunk-3GY4F45V.js} +2 -2
  17. package/dist/{chunk-PUVDKJ2Y.js → chunk-3ODX73FK.js} +3 -5
  18. package/dist/{chunk-IUE3Y34X.js → chunk-3UNOLWNZ.js} +2 -2
  19. package/dist/{chunk-6PTFB5VS.js → chunk-3UUXNFEX.js} +8 -4
  20. package/dist/{chunk-2APPQIER.js → chunk-4M6Z5QVF.js} +4 -4
  21. package/dist/{chunk-K6BSR66V.js → chunk-4NSRCOYP.js} +4 -1
  22. package/dist/{chunk-JGRC33J2.js → chunk-54X7T7DK.js} +12 -3
  23. package/dist/{chunk-YQWYVTMC.js → chunk-5636DCO5.js} +4 -4
  24. package/dist/{chunk-7E7I3WLS.js → chunk-57XXR6DR.js} +23 -22
  25. package/dist/{chunk-7ZYNNDKC.js → chunk-5TUB6SLS.js} +2 -2
  26. package/dist/{chunk-VW6DOEDG.js → chunk-6OSVSQL5.js} +11 -2
  27. package/dist/{chunk-L47TF46W.js → chunk-6PAZTBPA.js} +14 -2
  28. package/dist/{chunk-XIVNBFZS.js → chunk-6Q3CYFD3.js} +34 -16
  29. package/dist/{chunk-RSJ25QSL.js → chunk-6QOTUPRG.js} +155 -36
  30. package/dist/{chunk-JKKCYP3C.js → chunk-6UINWWS6.js} +10 -4
  31. package/dist/{chunk-WBKFA554.js → chunk-72YIHOZQ.js} +2 -2
  32. package/dist/{chunk-PAJQJ7BS.js → chunk-75W7L2E2.js} +246 -697
  33. package/dist/{chunk-RRNP2ANY.js → chunk-7UGL4MB5.js} +4 -4
  34. package/dist/{chunk-EKCHAPYA.js → chunk-AUPNRN7C.js} +2 -2
  35. package/dist/{chunk-ZDN3Y73Y.js → chunk-BJVFZO5U.js} +6 -48
  36. package/dist/{chunk-IWT4SF4R.js → chunk-CUSRQKPU.js} +64 -2
  37. package/dist/{chunk-SKHCAU7K.js → chunk-DQOVN6KV.js} +3 -2
  38. package/dist/{chunk-ZWPRK62N.js → chunk-DT3LWJOB.js} +4 -4
  39. package/dist/chunk-DXKJURES.js +671 -0
  40. package/dist/{chunk-BEPZRGGU.js → chunk-EL24TAU4.js} +2 -2
  41. package/dist/{chunk-OML5D5V5.js → chunk-ELWDPP3Y.js} +5 -5
  42. package/dist/{chunk-NDINPTJ4.js → chunk-ELZVTCGV.js} +5 -4
  43. package/dist/chunk-EXLD33WO.js +381 -0
  44. package/dist/{chunk-IJNZMHLA.js → chunk-FEAXX7B6.js} +2 -2
  45. package/dist/{chunk-TM6LQDI3.js → chunk-FFUPXJC4.js} +74 -323
  46. package/dist/chunk-GX5WYQO4.js +59 -0
  47. package/dist/chunk-I2DWJ4GM.js +390 -0
  48. package/dist/{chunk-TXOTCRLG.js → chunk-I5FWO7L5.js} +5 -5
  49. package/dist/chunk-IRXAATOX.js +539 -0
  50. package/dist/chunk-IXIY2H4R.js +44 -0
  51. package/dist/{chunk-KK4JZPBQ.js → chunk-IZXGRF7P.js} +76 -10
  52. package/dist/{chunk-5TSRNF4G.js → chunk-JCI2ROMZ.js} +164 -6
  53. package/dist/{chunk-INY6HTFL.js → chunk-JEIYHLOR.js} +2 -2
  54. package/dist/{chunk-MUW2BDDH.js → chunk-JQLNNIKT.js} +2 -2
  55. package/dist/{chunk-XPWWI35G.js → chunk-JSD46VO2.js} +19 -8
  56. package/dist/{chunk-VA5FNYMT.js → chunk-JT2RFCC5.js} +39 -2
  57. package/dist/{chunk-V2ANDPVT.js → chunk-K6T2ZAMZ.js} +168 -6
  58. package/dist/{chunk-B4OAX3SI.js → chunk-KFV5L5SK.js} +13 -6
  59. package/dist/{chunk-JEQ3XTHC.js → chunk-LLXSDWXS.js} +2 -2
  60. package/dist/{chunk-E3TPLWFX.js → chunk-LTIKRKFL.js} +3 -3
  61. package/dist/{chunk-NIQJ66N4.js → chunk-N56KALIC.js} +17 -17
  62. package/dist/{chunk-JDAY6FIL.js → chunk-NAI6ZFCY.js} +13 -9
  63. package/dist/{chunk-AF4YM7Z4.js → chunk-NRO2BJRH.js} +2490 -2182
  64. package/dist/{chunk-WRBAGUNF.js → chunk-NXIMQY5W.js} +2 -2
  65. package/dist/{chunk-I7ZPNEJM.js → chunk-NXYCB2VD.js} +5 -5
  66. package/dist/chunk-ODGTEFFI.js +50 -0
  67. package/dist/{chunk-2VIKGWFZ.js → chunk-OEJSLEPW.js} +2 -2
  68. package/dist/{chunk-KKOJXO6R.js → chunk-OMQNJVKW.js} +4 -2
  69. package/dist/{chunk-54CBCGIR.js → chunk-Q4WO54TA.js} +132 -77
  70. package/dist/{chunk-B4VEBZKF.js → chunk-QUFRYSWI.js} +12 -6
  71. package/dist/{chunk-42FMPA75.js → chunk-QZWQA4DE.js} +2 -2
  72. package/dist/{chunk-HEQY7ZFI.js → chunk-RAY4OVGZ.js} +2 -2
  73. package/dist/{chunk-G76U63X4.js → chunk-RQCKCSRL.js} +7 -7
  74. package/dist/{chunk-64I3JVYM.js → chunk-RXTN6AKH.js} +2 -2
  75. package/dist/{chunk-UPZU6GE4.js → chunk-RZDWV63N.js} +3 -3
  76. package/dist/{chunk-2UH2KFUP.js → chunk-S6PYF2XF.js} +2 -2
  77. package/dist/{chunk-JSC3U7TI.js → chunk-TOIVGRUX.js} +2 -2
  78. package/dist/{chunk-7DRAWPTZ.js → chunk-TQAHXW6Y.js} +1 -1
  79. package/dist/{chunk-JIEGK6UF.js → chunk-U6TMQNSI.js} +48 -4
  80. package/dist/{chunk-AX2THNSA.js → chunk-UEPWCCTY.js} +4 -4
  81. package/dist/{chunk-QWGDJJYJ.js → chunk-USR47QNF.js} +4 -4
  82. package/dist/{chunk-Y3CBHOR6.js → chunk-V6HJFQZE.js} +2 -2
  83. package/dist/chunk-V76WTFTW.js +318 -0
  84. package/dist/{chunk-NMJXSHBJ.js → chunk-W54I7H25.js} +2 -2
  85. package/dist/{chunk-2UG5F4C5.js → chunk-XULDXHTN.js} +24 -12
  86. package/dist/chunk-XXYSBZIQ.js +283 -0
  87. package/dist/{chunk-MWUZBSAQ.js → chunk-Y55JBDO5.js} +331 -51
  88. package/dist/{chunk-W6RRQCPQ.js → chunk-YD5GIKET.js} +4 -4
  89. package/dist/{chunk-CE5AX47J.js → chunk-YECAMM3D.js} +2 -2
  90. package/dist/{chunk-WCXUNS7U.js → chunk-YNFKXPEC.js} +6 -6
  91. package/dist/cli/index.js +36 -35
  92. package/dist/{clio-CMMK4KRR.js → clio-QLICPCF5.js} +2 -2
  93. package/dist/{code-nav-MDZNQS33.js → code-nav-IJR2DBPR.js} +6 -6
  94. package/dist/{components-UCUQ4QXW.js → components-2TGAI2RC.js} +3 -4
  95. package/dist/{config-SVM5P5YI.js → config-IUA6OYNS.js} +52 -47
  96. package/dist/{configure-LE3IK2TJ.js → configure-VEPX4NMX.js} +14 -15
  97. package/dist/{context-VNCR7KAG.js → context-2DKHWH2T.js} +23 -23
  98. package/dist/{context-2OHRKS42.js → context-4MPR7WKB.js} +48 -42
  99. package/dist/{context-E3VC7RX5.js → context-BOYF5EJM.js} +11 -11
  100. package/dist/{context-clear-BW4O37TG.js → context-clear-S4ZJCQUX.js} +48 -42
  101. package/dist/{context-working-set-VDS25HXZ.js → context-working-set-3I3FYX6Y.js} +8 -8
  102. package/dist/detail-A7JAVSIG.js +98 -0
  103. package/dist/{dispatch-runner-5AHT53RF.js → dispatch-runner-RJ5I2F2O.js} +71 -58
  104. package/dist/{docs-PD3EXDKU.js → docs-SPOV3BAN.js} +3 -5
  105. package/dist/{doctor-WNNVO6FY.js → doctor-DKICC2SN.js} +54 -31
  106. package/dist/{eval-7G7SGAYO.js → eval-OQOQUDHK.js} +47 -56
  107. package/dist/{evidence-VD6736FQ.js → evidence-4DQ25GUQ.js} +53 -150
  108. package/dist/evidence-4F5USFKH.js +208 -0
  109. package/dist/{evolve-AL3NGVRL.js → evolve-GSS52E5J.js} +44 -41
  110. package/dist/{extensions-MOVJ32NM.js → extensions-G7MFLYHT.js} +4 -5
  111. package/dist/{fleet-QZHUMAGI.js → fleet-Q37YHHAQ.js} +74 -68
  112. package/dist/{fleet-commands-BAYT5FJZ.js → fleet-commands-G7E4N7SM.js} +14 -11
  113. package/dist/{fleet-decisions-IREVMRU4.js → fleet-decisions-O7M6QBA2.js} +6 -6
  114. package/dist/{fleet-graph-YCTT3HTI.js → fleet-graph-TOUBW6OW.js} +13 -13
  115. package/dist/{fleet-inspect-QVJTDAVB.js → fleet-inspect-SW33JJNI.js} +43 -39
  116. package/dist/{fleet-preflight-25QAFPK4.js → fleet-preflight-CV2655TW.js} +2 -3
  117. package/dist/{fleet-validate-5O57AAJ7.js → fleet-validate-KESZX2YH.js} +16 -16
  118. package/dist/{fleet-verify-CPH2W2T6.js → fleet-verify-UQPMTVE3.js} +42 -38
  119. package/dist/{fleet-view-SWBR3VGQ.js → fleet-view-MN2VG4MR.js} +43 -39
  120. package/dist/{init-J477LKZH.js → init-PXEXQSBF.js} +60 -54
  121. package/dist/{interop-3FCM6XLG.js → interop-ZG5T62U3.js} +6 -7
  122. package/dist/inventory-C26CFDRR.js +101 -0
  123. package/dist/{library-QUQEIUG6.js → library-B2W4N74O.js} +16 -17
  124. package/dist/{memory-SGGSEP65.js → memory-YCANYS5A.js} +45 -42
  125. package/dist/{models-HEKUAXXK.js → models-GERTU3YI.js} +20 -22
  126. package/dist/{monitor-HKU57TYQ.js → monitor-CPNIUULB.js} +50 -44
  127. package/dist/{orchestrator-VDFAEFAI.js → orchestrator-J4BSH4WQ.js} +491 -1182
  128. package/dist/{panes-DN2SSFOH.js → panes-BOHAEGYC.js} +3 -3
  129. package/dist/{panes-TALGNPZT.js → panes-NXSLDQZ2.js} +5 -6
  130. package/dist/{paths-NBMFAIEZ.js → paths-VSUWNC22.js} +3 -4
  131. package/dist/{reset-EAJFFJVB.js → reset-TNWTB5LU.js} +5 -6
  132. package/dist/{resources-OVKSEFVE.js → resources-4PXNMD5G.js} +14 -14
  133. package/dist/{run-7DP7ZF2J.js → run-D6XJ34CN.js} +79 -83
  134. package/dist/{share-WML67FT3.js → share-2NWMJJEE.js} +14 -15
  135. package/dist/{skills-SG662R2K.js → skills-KR7WON5G.js} +18 -19
  136. package/dist/{skills-eval-VVZEUU46.js → skills-eval-O2ZNOLDS.js} +49 -46
  137. package/dist/{skills-inventory-I2E23GET.js → skills-inventory-ZZOUBK7O.js} +14 -14
  138. package/dist/{slash-commands-S7MBJDQK.js → slash-commands-ZXPJD64J.js} +32 -23
  139. package/dist/{steer-2LQOMCPB.js → steer-XA25PSCS.js} +3 -3
  140. package/dist/{support-CC2UJBJ6.js → support-7EMVWYG2.js} +2 -2
  141. package/dist/{targets-4QC3HIEW.js → targets-OMH2XCSN.js} +25 -27
  142. package/dist/tasks-IPAGMEIX.js +36 -0
  143. package/dist/{terminal-lease-TUHIJ6Y2.js → terminal-lease-C2J3JYRE.js} +4 -4
  144. package/dist/{tools-TFGJICCU.js → tools-EFFEAIDP.js} +5 -6
  145. package/dist/{uninstall-5PEVOE5B.js → uninstall-HALS6BLF.js} +7 -8
  146. package/dist/{upgrade-M4WXY6KN.js → upgrade-MS72RJEP.js} +14 -11
  147. package/dist/{usage-N7ZNVLEM.js → usage-NHG6MCJM.js} +60 -51
  148. package/dist/{verifiers-DJTP4XX6.js → verifiers-7AUNVXDY.js} +150 -17
  149. package/dist/{verify-RWE4PPEK.js → verify-FWYGPKMR.js} +12 -10
  150. package/dist/{web-fetch-MPARV2K7.js → web-fetch-V4FKSDAV.js} +4 -4
  151. package/dist/{wiki-generate-C7IQOXSP.js → wiki-generate-743CIGJW.js} +63 -56
  152. package/dist/{with-panes-4GCGSL7J.js → with-panes-BDQEWBRT.js} +2 -2
  153. package/dist/worker/entry.js +36 -33
  154. package/docs/README.md +3 -2
  155. package/docs/architecture/acp.md +17 -0
  156. package/docs/architecture/artifact-versions.md +1 -1
  157. package/docs/architecture/dispatch-typed-intent.md +1 -1
  158. package/docs/architecture/evidence-and-memory.md +1 -1
  159. package/docs/architecture/observability.md +7 -1
  160. package/docs/architecture/prompt-envelope-and-tools.md +15 -5
  161. package/docs/architecture/safety-model.md +10 -17
  162. package/docs/architecture/tui-design.md +1 -1
  163. package/docs/guide/built-in-agents.md +8 -8
  164. package/docs/guide/commands-and-modes.md +17 -2
  165. package/docs/guide/configuration-and-targets.md +3 -1
  166. package/docs/guide/configuration-reference.md +10 -5
  167. package/docs/guide/environment-variables.md +2 -2
  168. package/docs/guide/tool-usage.md +78 -3
  169. package/docs/history/config-knobs-audit.md +2 -2
  170. package/docs/process/development-pipeline.md +6 -1
  171. package/docs/process/git-commit-provenance.md +15 -0
  172. package/docs/process/release-cut-checklist.md +207 -0
  173. package/docs/process/scientific-validation.md +18 -17
  174. package/evals/behavioral-machinery-support.ts +1 -0
  175. package/evals/behavioral-machinery.yaml +1 -1
  176. package/package.json +1 -1
  177. package/skills/coding/coding-standards/SKILL.md +14 -4
  178. package/skills/context/context-handoff/SKILL.md +3 -3
  179. package/skills/context/context-prime/SKILL.md +3 -3
  180. package/skills/planning/architecture/SKILL.md +5 -5
  181. package/skills/planning/backlog/SKILL.md +4 -4
  182. package/skills/planning/prd/SKILL.md +4 -3
  183. package/skills/planning/product-intent/SKILL.md +8 -8
  184. package/skills/planning/tech-spec/SKILL.md +4 -4
  185. package/skills/registry.yaml +32 -32
  186. package/skills/research/arxiv-literature/SKILL.md +3 -3
  187. package/skills/research/experiment-protocol/SKILL.md +3 -3
  188. package/skills/research/scientific-debugging/SKILL.md +3 -2
  189. package/skills/research/scientific-modernization/SKILL.md +3 -3
  190. package/skills/skill-marketplace.json +16 -16
  191. package/skills/workflow/cut-it/SKILL.md +3 -4
  192. package/skills/workflow/design-council/SKILL.md +5 -10
  193. package/skills/workflow/grill-me/SKILL.md +14 -15
  194. package/skills/workflow/workflow-distiller/SKILL.md +4 -4
  195. package/src/cli/args.ts +0 -8
  196. package/src/cli/configure.ts +2 -1
  197. package/src/cli/doctor-state-size.ts +1 -12
  198. package/src/cli/doctor-validation-contract.ts +28 -0
  199. package/src/cli/doctor.ts +5 -0
  200. package/src/cli/evidence-detail.ts +1 -75
  201. package/src/cli/evidence-inventory.ts +1 -167
  202. package/src/cli/index.ts +2 -0
  203. package/src/cli/run.ts +0 -2
  204. package/src/cli/targets.ts +1 -1
  205. package/src/cli/tasks.ts +84 -0
  206. package/src/cli/upgrade.ts +10 -5
  207. package/src/cli/usage.ts +6 -0
  208. package/src/cli/verifiers.ts +147 -1
  209. package/src/cli/wiki-generate.ts +1 -0
  210. package/src/core/commit-attribution.ts +41 -1
  211. package/src/core/git-commit-attribution.ts +46 -3
  212. package/src/core/run-overrides.ts +0 -5
  213. package/src/core/skill-activation.ts +3 -0
  214. package/src/core/tool-names.ts +5 -2
  215. package/src/domains/agents/builtins/architect.md +1 -1
  216. package/src/domains/agents/builtins/coder.md +1 -1
  217. package/src/domains/agents/builtins/documenter.md +1 -1
  218. package/src/domains/agents/builtins/git-master.md +1 -1
  219. package/src/domains/agents/builtins/provenance.md +7 -7
  220. package/src/domains/agents/builtins/tester.md +1 -1
  221. package/src/domains/agents/builtins/verifier.md +2 -2
  222. package/src/domains/agents/builtins/wiki-writer.md +4 -3
  223. package/src/domains/context/extension.ts +31 -7
  224. package/src/domains/context/refresh.ts +3 -0
  225. package/src/domains/context/wiki/frontmatter.ts +5 -2
  226. package/src/domains/context/wiki/generate.ts +6 -0
  227. package/src/domains/context/wiki/prompts.ts +43 -0
  228. package/src/domains/dispatch/active-route-planner.ts +4 -0
  229. package/src/domains/dispatch/code-step.ts +11 -4
  230. package/src/domains/dispatch/contract.ts +31 -7
  231. package/src/domains/dispatch/execution-scheduler.ts +2 -0
  232. package/src/domains/dispatch/extension.ts +50 -27
  233. package/src/domains/dispatch/fleet-commit-attribution.ts +5 -0
  234. package/src/domains/dispatch/fleet-run.ts +1 -0
  235. package/src/domains/dispatch/host-verification.ts +114 -13
  236. package/src/domains/dispatch/intent.ts +28 -18
  237. package/src/domains/dispatch/orphan-recovery.ts +2 -0
  238. package/src/domains/dispatch/receipt-integrity.ts +4 -0
  239. package/src/domains/dispatch/reservation-store.ts +5 -3
  240. package/src/domains/dispatch/state.ts +15 -2
  241. package/src/domains/dispatch/types.ts +17 -2
  242. package/src/domains/eval/runners/clio-run.ts +12 -9
  243. package/src/domains/eval/runners/context-index.ts +2 -7
  244. package/src/domains/eval/runners/context-init.ts +3 -6
  245. package/src/domains/eval/runners/external-command.ts +29 -11
  246. package/src/domains/evidence/build.ts +102 -15
  247. package/src/domains/evidence/detail.ts +69 -0
  248. package/src/domains/evidence/eval.ts +13 -1
  249. package/src/domains/evidence/finish-contract-map.ts +5 -1
  250. package/src/domains/evidence/inventory.ts +167 -0
  251. package/src/domains/evidence/store.ts +16 -0
  252. package/src/domains/evidence/types.ts +12 -0
  253. package/src/domains/extensions/resources.ts +7 -0
  254. package/src/domains/middleware/marketplace-offer.ts +20 -1
  255. package/src/domains/middleware/runtime.ts +7 -3
  256. package/src/domains/mux/detect.ts +3 -6
  257. package/src/domains/observability/accountability.ts +15 -1
  258. package/src/domains/observability/contract.ts +52 -7
  259. package/src/domains/observability/evidence-index.ts +10 -0
  260. package/src/domains/observability/extension.ts +9 -5
  261. package/src/domains/observability/projection.ts +394 -45
  262. package/src/{interactive → domains/observability}/worker-progress.ts +3 -3
  263. package/src/domains/prompts/fragments/operating/contract.md +2 -0
  264. package/src/domains/prompts/fragments/wiki/page.md +8 -0
  265. package/src/domains/providers/model-discovery.ts +1 -4
  266. package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +16 -14
  267. package/src/domains/providers/runtimes/claude/claude-code.ts +9 -0
  268. package/src/domains/providers/support.ts +1 -1
  269. package/src/domains/providers/types/runtime-descriptor.ts +1 -1
  270. package/src/domains/safety/action-classifier.ts +7 -0
  271. package/src/domains/safety/default-path-policy.ts +2 -0
  272. package/src/domains/safety/finish-contract-registration.ts +29 -14
  273. package/src/domains/safety/finish-contract.ts +252 -40
  274. package/src/domains/safety/index.ts +20 -1
  275. package/src/domains/safety/policy-engine.ts +26 -6
  276. package/src/domains/safety/rigor.ts +53 -39
  277. package/src/domains/safety/validation-contract.ts +388 -0
  278. package/src/domains/session/archive-readers.ts +10 -1
  279. package/src/domains/session/decision-board.ts +101 -2
  280. package/src/domains/session/entries.ts +44 -7
  281. package/src/domains/session/extension.ts +4 -4
  282. package/src/domains/session/handoff.ts +2 -1
  283. package/src/domains/session/manager.ts +2 -3
  284. package/src/domains/session/task-board.ts +14 -1
  285. package/src/domains/session/tree/fork.ts +1 -2
  286. package/src/domains/session/tree/navigator.ts +1 -1
  287. package/src/domains/user-tasks/acceptance.ts +56 -0
  288. package/src/domains/user-tasks/active-acceptance.ts +40 -0
  289. package/src/domains/user-tasks/store.ts +34 -3
  290. package/src/engine/acp/adapter.ts +24 -6
  291. package/src/engine/acp/server.ts +21 -4
  292. package/src/engine/acp/transport.ts +53 -8
  293. package/src/engine/acp/types.ts +4 -0
  294. package/src/engine/apis/ollama-native.ts +15 -0
  295. package/src/engine/claude/subprocess-runtime.ts +107 -60
  296. package/src/engine/external-subprocess.ts +12 -4
  297. package/src/entry/orchestrator.ts +11 -2
  298. package/src/interactive/dispatch-board.ts +46 -717
  299. package/src/interactive/fleet-run-preview.ts +2 -1
  300. package/src/interactive/interactive-application.ts +3 -2
  301. package/src/interactive/interactive-presentation.ts +55 -12
  302. package/src/interactive/interactive-slash-runtime.ts +2 -1
  303. package/src/interactive/oracle.ts +5 -2
  304. package/src/interactive/overlays/fleet-run-approval.ts +3 -2
  305. package/src/interactive/overlays/message-picker.ts +2 -2
  306. package/src/interactive/overlays/settings.ts +2 -2
  307. package/src/interactive/overlays/tree-selector.ts +2 -2
  308. package/src/interactive/renderers/branch-summary.ts +1 -1
  309. package/src/interactive/slash-autocomplete.ts +4 -6
  310. package/src/interactive/slash-commands.ts +25 -39
  311. package/src/interactive/slash-spec.ts +28 -0
  312. package/src/interactive/view/artifacts.ts +2 -0
  313. package/src/interactive/worker-stream.ts +7 -3
  314. package/src/tools/bootstrap.ts +4 -0
  315. package/src/tools/builtin-tool-catalog.ts +31 -0
  316. package/src/tools/compete-worktrees.ts +7 -1
  317. package/src/tools/core-bootstrap.ts +16 -0
  318. package/src/tools/decide.ts +136 -0
  319. package/src/tools/dispatch-admission.ts +21 -0
  320. package/src/tools/dispatch-plan.ts +5 -2
  321. package/src/tools/dispatch-runner.ts +15 -1
  322. package/src/tools/dispatch-types.ts +6 -0
  323. package/src/tools/evidence.ts +96 -0
  324. package/src/tools/limitation.ts +76 -0
  325. package/src/tools/policy.ts +9 -0
  326. package/src/tools/presentation.ts +3 -0
  327. package/src/tools/registry.ts +1 -1
  328. package/src/tools/result-shaping.ts +17 -5
  329. package/src/tools/task-worktree.ts +13 -3
  330. package/src/tools/tasks.ts +10 -1
  331. package/src/tools/verify/authoring.ts +170 -83
  332. package/src/tools/verify/catalog.ts +122 -5
  333. package/src/tools/verify/index.ts +2 -1
  334. package/src/tools/verify/numeric.ts +298 -0
  335. package/src/tools/verify/perf.ts +143 -0
  336. package/src/tools/verify/scripts.ts +229 -2
  337. package/dist/chunk-7DICMOS6.js +0 -313
  338. package/dist/chunk-RVG5JXAL.js +0 -41
  339. package/dist/chunk-T56WDKA5.js +0 -183
  340. package/dist/chunk-VPKWYKEY.js +0 -169
@@ -38,6 +38,7 @@ import {
38
38
  } from "../domains/dispatch/execution-role.js";
39
39
  import { compileFleetExecutionPlan } from "../domains/dispatch/fleet-plan.js";
40
40
  import { preflightWriteBoundaries } from "../domains/dispatch/write-boundary-enforcer.js";
41
+ import { formatUsd } from "./footer/widgets.js";
41
42
 
42
43
  /** Where a step would run, as the dispatch domain resolves it today. */
43
44
  export interface FleetRunPreviewRoute {
@@ -263,7 +264,7 @@ export function compileFleetRunPreview(input: FleetRunPreviewInput): FleetRunPre
263
264
  };
264
265
  if (input.budget) {
265
266
  if (input.budget.verdict === "over" || input.budget.verdict === "at") {
266
- diagnostics.push(`budget ceiling crossed: $${budget.currentUsd.toFixed(4)} / $${budget.ceilingUsd.toFixed(4)}`);
267
+ diagnostics.push(`budget ceiling crossed: ${formatUsd(budget.currentUsd)} / ${formatUsd(budget.ceilingUsd)}`);
267
268
  } else if (contract.budgetUsd !== null) {
268
269
  const remaining = budget.ceilingUsd - budget.currentUsd;
269
270
  if (contract.budgetUsd > remaining) {
@@ -228,8 +228,8 @@ export interface InteractiveDeps {
228
228
  onNewSession?: () => void;
229
229
  /**
230
230
  * Fork from a parent assistant turn picked in /fork. Default wiring
231
- * delegates to session.fork(parentTurnId); the override exists so
232
- * future slices can layer telemetry or settings merging on top.
231
+ * delegates to session.fork(parentTurnId); the override exists so a
232
+ * host can layer telemetry or settings merging on top.
233
233
  */
234
234
  onForkSession?: (parentTurnId: string) => void;
235
235
  /**
@@ -583,6 +583,7 @@ export async function createInteractiveApplication(deps: InteractiveDeps): Promi
583
583
  : {}),
584
584
  ...(deps.getSettings ? { getSettings: deps.getSettings } : {}),
585
585
  ...(deps.resources ? { resources: deps.resources } : {}),
586
+ ...(deps.agents ? { agents: deps.agents } : {}),
586
587
  ...(deps.session ? { session: deps.session } : {}),
587
588
  ...(deps.getSessionId ? { getSessionId: deps.getSessionId } : {}),
588
589
  ...(deps.getTaskBoard ? { getTaskBoard: deps.getTaskBoard } : {}),
@@ -2,6 +2,8 @@ import { performance } from "node:perf_hooks";
2
2
  import type { ClioSettings } from "../core/config.js";
3
3
  import { DEFAULT_SETTINGS } from "../core/defaults.js";
4
4
  import type { SafeEventBus } from "../core/event-bus.js";
5
+ import type { AgentsContract } from "../domains/agents/contract.js";
6
+ import { isUserVisibleAgent } from "../domains/agents/spec.js";
5
7
  import type { ContextState } from "../domains/context/index.js";
6
8
  import type { DispatchContract } from "../domains/dispatch/contract.js";
7
9
  import type { TaskMemoryOperatorStatus } from "../domains/memory/index.js";
@@ -12,7 +14,6 @@ import type {
12
14
  } from "../domains/observability/index.js";
13
15
  import { type ProvidersContract, resolveModelRuntimeCapabilitiesForProviders } from "../domains/providers/index.js";
14
16
  import type { ResourcesContract } from "../domains/resources/index.js";
15
- import { getMarketplaceSkills } from "../domains/resources/skills/marketplace.js";
16
17
  import { ceilChars, contentChars } from "../domains/session/context-accounting.js";
17
18
  import type { SessionContract, TaskBoardSnapshot } from "../domains/session/index.js";
18
19
  import type { Component, TUI } from "../engine/tui.js";
@@ -88,6 +89,7 @@ export interface InteractivePresentationDeps {
88
89
  bootPending?: Component;
89
90
  getSettings?: () => Readonly<ClioSettings>;
90
91
  resources?: Pick<ResourcesContract, "skills">;
92
+ agents?: Pick<AgentsContract, "listSpecs">;
91
93
  session?: Pick<SessionContract, "current">;
92
94
  getSessionId?: () => string | null;
93
95
  getTaskBoard?: () => TaskBoardSnapshot | null;
@@ -248,13 +250,11 @@ export function createInteractivePresentation(deps: InteractivePresentationDeps)
248
250
  bus: deps.bus,
249
251
  ...(deps.getSettings ? { getSettings: deps.getSettings } : {}),
250
252
  });
251
- // The board settles a finished run on the same sealed receipt the transcript
252
- // block reads, so the two surfaces agree on a worker's terminal answer.
253
- const dispatchBoardStore = factories.createDispatchBoardStore(
254
- deps.bus,
255
- () => deps.dispatch.snapshot(),
256
- (runId) => readWorkerReceiptFacts(runId),
257
- );
253
+ const unbindRunReaders = deps.observability.bindRunReaders({
254
+ dispatchSnapshot: () => deps.dispatch.snapshot(),
255
+ readReceipt: (runId) => readWorkerReceiptFacts(runId),
256
+ });
257
+ const dispatchBoardStore = factories.createDispatchBoardStore(deps.observability);
258
258
  const contextActivityStore = factories.createContextActivityStore(deps.bus);
259
259
 
260
260
  const footerToolCounts = new Map<string, number>();
@@ -434,10 +434,52 @@ export function createInteractivePresentation(deps: InteractivePresentationDeps)
434
434
  const editor = deps.editor ?? factories.createEditor(deps.tui, editorChrome);
435
435
  editor.focused = true;
436
436
  const autocomplete: AutocompleteProvider = factories.createAutocomplete({
437
- listSkills: () => ({
438
- installed: deps.resources?.skills(getCwd()).items ?? [],
439
- marketplace: getMarketplaceSkills(),
440
- }),
437
+ completionSources: {
438
+ agents: async () =>
439
+ (deps.agents?.listSpecs() ?? []).filter(isUserVisibleAgent).map((agent) => ({
440
+ id: agent.id,
441
+ value: agent.id,
442
+ label: agent.id,
443
+ description: agent.description,
444
+ })),
445
+ targets: async () =>
446
+ deps.providers.list().map(({ target, reason }) => ({
447
+ id: target.id,
448
+ value: target.id,
449
+ label: target.id,
450
+ description: reason,
451
+ })),
452
+ models: async () =>
453
+ deps.providers.list().flatMap(({ target, discoveredModels, discoveredModelLabels }) =>
454
+ [
455
+ ...new Set([
456
+ ...(target.defaultModel ? [target.defaultModel] : []),
457
+ ...(target.wireModels ?? []),
458
+ ...discoveredModels,
459
+ ]),
460
+ ].map((model) => ({
461
+ id: `${target.id}/${model}`,
462
+ value: model,
463
+ label: discoveredModelLabels?.[model] ?? model,
464
+ description: target.id,
465
+ })),
466
+ ),
467
+ skills: async () =>
468
+ (deps.resources?.skills(getCwd()).items ?? []).map((skill) => ({
469
+ id: skill.name,
470
+ value: skill.name,
471
+ label: skill.name,
472
+ description: skill.description,
473
+ })),
474
+ tasks: async () =>
475
+ (deps.getTaskBoard?.()?.tasks ?? []).map((task) => ({
476
+ id: task.id,
477
+ value: task.id,
478
+ label: task.title,
479
+ description: task.status,
480
+ })),
481
+ // Other slots remain empty when this presentation has no read-only catalog for them.
482
+ },
441
483
  });
442
484
  editor.setAutocompleteProvider(autocomplete);
443
485
 
@@ -539,6 +581,7 @@ export function createInteractivePresentation(deps: InteractivePresentationDeps)
539
581
  unsubscribeObservability();
540
582
  contextActivityStore.unsubscribe();
541
583
  dispatchBoardStore.unsubscribe();
584
+ unbindRunReaders();
542
585
  };
543
586
  const disposeStatus = (): void => {
544
587
  if (statusDisposed) return;
@@ -24,6 +24,7 @@ import type { SessionContract, SessionEntry } from "../domains/session/index.js"
24
24
  import { foldTaskBoard } from "../domains/session/task-board.js";
25
25
  import { filterEntriesToActivePath } from "../domains/session/tree/active-path.js";
26
26
  import type { ShareContract } from "../domains/share/index.js";
27
+ import type { UserTaskAcceptance } from "../domains/user-tasks/acceptance.js";
27
28
  import type { UserTasksStore } from "../domains/user-tasks/store.js";
28
29
  import { stripTerminalSequences } from "../engine/tui.js";
29
30
  import type { ImageContent } from "../engine/types.js";
@@ -432,7 +433,7 @@ export function createInteractiveSlashRuntime(deps: InteractiveSlashRuntimeDeps)
432
433
  ...(userTasks
433
434
  ? {
434
435
  userTasks: {
435
- add: (title: string) => userTasks.add(title),
436
+ add: (title: string, acceptance?: UserTaskAcceptance) => userTasks.add(title, undefined, acceptance),
436
437
  hand: (id: string) => userTasks.hand(id, deps.chat.getSessionId() ?? undefined),
437
438
  done: (id: string) => userTasks.done(id),
438
439
  drop: (id: string) => userTasks.drop(id),
@@ -13,6 +13,7 @@
13
13
  */
14
14
 
15
15
  import type { OracleResult } from "../domains/agents/index.js";
16
+ import { decisionRationale } from "../domains/session/decision-board.js";
16
17
  import type { DecisionLedgerEntry } from "../domains/session/entries.js";
17
18
  import type { TaskBoardTask } from "../domains/session/task-board.js";
18
19
 
@@ -89,12 +90,14 @@ function clamp(text: string, maxBytes: number): { text: string; truncated: boole
89
90
 
90
91
  /** One decision line. Superseded decisions carry their correction so a reversal is visible. */
91
92
  function decisionLine(decision: DecisionLedgerEntry["decisions"][number]): string {
93
+ const argument = decisionRationale(decision);
94
+ const details = argument ? `\n ${argument}` : "";
92
95
  const label = decision.label ? ` (${decision.label})` : "";
93
96
  if (decision.status === "superseded") {
94
97
  const correction = decision.correction ? `; corrected to ${decision.correction}` : "";
95
- return `- ${decision.key}${label}: ${decision.value} [superseded${correction}]`;
98
+ return `- ${decision.key}${label}: ${decision.value} [superseded${correction}]${details}`;
96
99
  }
97
- return `- ${decision.key}${label}: ${decision.value}`;
100
+ return `- ${decision.key}${label}: ${decision.value}${details}`;
98
101
  }
99
102
 
100
103
  function taskLine(task: TaskBoardTask): string {
@@ -21,6 +21,7 @@ import {
21
21
  wrapTextWithAnsi,
22
22
  } from "../../engine/tui.js";
23
23
  import type { FleetRunPreview, FleetRunPreviewStep } from "../fleet-run-preview.js";
24
+ import { formatUsd } from "../footer/widgets.js";
24
25
  import { buildResponsiveHint, FocusBox, showClioOverlayFrame } from "../overlay-frame.js";
25
26
  import { clioTheme, rule } from "../theme/index.js";
26
27
 
@@ -83,12 +84,12 @@ function formatFleetRunPreviewStep(step: FleetRunPreviewStep): string {
83
84
  return `agent ${step.stepId}${loop} · ${step.agentId ?? "?"} · ${route}${node}${declaredRoute}${gate}${dynamicPlan} · ${step.scope} · ${formatWriteBoundary(step.writes)}`;
84
85
  }
85
86
 
86
- function formatBudgetLine(preview: FleetRunPreview): string {
87
+ export function formatBudgetLine(preview: FleetRunPreview): string {
87
88
  const contract =
88
89
  preview.budget.contractUsd === null
89
90
  ? "contract declares no ceiling"
90
91
  : `contract ceiling $${preview.budget.contractUsd.toFixed(2)}`;
91
- return `budget: admitted under $${preview.budget.ceilingUsd.toFixed(2)} session ceiling, $${preview.budget.currentUsd.toFixed(4)} spent, ${contract}`;
92
+ return `budget: admitted under $${preview.budget.ceilingUsd.toFixed(2)} session ceiling, ${formatUsd(preview.budget.currentUsd)} spent, ${contract}`;
92
93
  }
93
94
 
94
95
  /**
@@ -25,8 +25,8 @@ const PREVIEW_WIDTH = 60;
25
25
  * calls onFork(parentTurnId); the caller wires that through
26
26
  * SessionContract.fork(parentTurnId).
27
27
  *
28
- * Phase 12 slice 12b-3 scope: current-session turns only. Multi-session picker
29
- * lives in a later slice once TreeSnapshot grows a payload preview field.
28
+ * Scope: current-session turns only. A multi-session picker is not
29
+ * implemented; it would need TreeSnapshot to carry a payload preview field.
30
30
  */
31
31
  export interface OpenMessagePickerOverlayDeps {
32
32
  session: SessionContract;
@@ -600,10 +600,10 @@ const SETTINGS_VALUE_HELP_BY_ID: Partial<Record<EditableSettingId, Record<string
600
600
  false: "context is only compacted when you run /context compact",
601
601
  },
602
602
  // `embedded` is a declared rung with no implementation behind it yet; it
603
- // runs as `auto` until Clio can own a pane host, and the hint says so.
603
+ // refuses until Clio can own a pane host, and the hint says so.
604
604
  "panes.enabled": {
605
605
  auto: "detect a herdr session and join it as a guest; no pane host, no panes",
606
- embedded: "not implemented yet; behaves as auto (guest mode inside herdr) until Clio can own a pane host",
606
+ embedded: "not implemented yet; use auto or guest",
607
607
  off: "never detect or open a pane",
608
608
  },
609
609
  "retry.enabled": {
@@ -16,14 +16,14 @@ export const TREE_OVERLAY_WIDTH = 88;
16
16
  const VISIBLE_ROWS = 16;
17
17
 
18
18
  /**
19
- * /tree navigator overlay. Phase 12 slice 12b-2 behaviors only:
19
+ * /tree navigator overlay. Behaviors:
20
20
  * - One row per node, indented two spaces per branch level (not per message)
21
21
  * - Shift+T toggles operator-local timestamps on/off
22
22
  * - `e` enters label edit submode (Enter commits, Esc cancels)
23
23
  * - Enter on a row switches the active append point to that turn id
24
24
  * - Esc closes the overlay
25
25
  *
26
- * Cwd-toggle (`p`) and sort-order (`s`) land in Phase 18.
26
+ * Cwd-toggle (`p`) and sort-order (`s`) are not implemented.
27
27
  *
28
28
  * The overlay queries `session.tree()` on open and after any mutation so
29
29
  * label edits are reflected without a close/reopen cycle.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Renderer for BranchSummary session entries (Phase 12 / slice 12b).
2
+ * Renderer for BranchSummary session entries.
3
3
  *
4
4
  * A branchSummary entry is produced when a fork inherits a compacted parent
5
5
  * context: the new session opens with a single summary block standing in for
@@ -69,16 +69,14 @@ export interface SlashCompletionItem extends AutocompleteItem {
69
69
  export interface SlashAutocompleteOptions {
70
70
  basePath?: string;
71
71
  fdPath?: string | null;
72
- /** Slice 11 replaces the named no-op sources with read-only runtime sources. */
72
+ /** Read-only runtime values for the named grammar slots. */
73
73
  completionSources?: CompletionSources;
74
74
  /** Replace the default workspace-aware `@` source without adding a second composer provider. */
75
75
  fileReferenceSource?: FileReferenceCompletionSource;
76
- /** @deprecated Dynamic skill values move to the named `skills` slot in slice 11. */
77
- listSkills?: () => unknown;
78
76
  }
79
77
 
80
- /** Complete provider surface now, deliberately inert until slice 11 wiring. */
81
- function stubCompletionSources(): Record<CompletionSlotName, CompletionSource> {
78
+ /** Slots without an in-app source return no dynamic values. */
79
+ function emptyCompletionSources(): Record<CompletionSlotName, CompletionSource> {
82
80
  const sources = {} as Record<CompletionSlotName, CompletionSource>;
83
81
  for (const slot of COMPLETION_SLOT_NAMES) sources[slot] = async () => [];
84
82
  return sources;
@@ -308,7 +306,7 @@ class ClioAutocompleteProvider implements AutocompleteProvider {
308
306
  ) {
309
307
  this.files = new CombinedAutocompleteProvider([], basePath, fdPath);
310
308
  this.fileReferences = fileReferenceSource ?? createFileReferenceCompletionSource({ basePath });
311
- this.sourceBySlot = { ...stubCompletionSources(), ...sources };
309
+ this.sourceBySlot = { ...emptyCompletionSources(), ...sources };
312
310
  }
313
311
 
314
312
  async getSuggestions(
@@ -1,3 +1,4 @@
1
+ import { acceptanceFromTaskFlags } from "../cli/tasks.js";
1
2
  import { BusChannels } from "../core/bus-events.js";
2
3
  import { THINKING_LEVELS } from "../core/defaults.js";
3
4
  import type { SafeEventBus } from "../core/event-bus.js";
@@ -30,6 +31,7 @@ import type {
30
31
  } from "../domains/resources/index.js";
31
32
  import { parseSkillCommand, SKILL_SURFACE_CLEAR_ARG } from "../domains/resources/index.js";
32
33
  import type { ShareImportPlan } from "../domains/share/index.js";
34
+ import type { UserTaskAcceptance } from "../domains/user-tasks/acceptance.js";
33
35
  import type { UserTask } from "../domains/user-tasks/store.js";
34
36
  import type { ExtensionReloadOutcome } from "../entry/extension-reload.js";
35
37
  import { isToolProfileName, TOOL_PROFILE_NAMES, type ToolProfileName } from "../tools/profiles.js";
@@ -146,7 +148,7 @@ type SlashCommandVariant =
146
148
  | { kind: "context-view" }
147
149
  | { kind: "tasks" }
148
150
  | { kind: "decisions" }
149
- | { kind: "tasks-add"; text: string }
151
+ | { kind: "tasks-add"; text: string; expectedOutputs?: string[]; verification?: string[] }
150
152
  | { kind: "tasks-hand"; id: string }
151
153
  | { kind: "tasks-done"; id: string }
152
154
  | { kind: "tasks-drop"; id: string }
@@ -690,7 +692,7 @@ export interface SlashCommandContext {
690
692
  openDecisions: () => void;
691
693
  /** Project-scoped operator task inbox backing `/tasks` mutations. */
692
694
  userTasks?: {
693
- add(title: string): UserTask;
695
+ add(title: string, acceptance?: UserTaskAcceptance): UserTask;
694
696
  hand(id: string): UserTask;
695
697
  done(id: string): UserTask;
696
698
  drop(id: string): UserTask;
@@ -790,9 +792,10 @@ function formatReceiptVerificationBlock(runId: string, result: SlashReceiptVerif
790
792
  }
791
793
 
792
794
  /** The one operator-authored turn used by slash and overlay handoff paths. */
793
- export function formatUserTaskHandoff(task: Pick<UserTask, "id" | "title" | "note">): string {
795
+ export function formatUserTaskHandoff(task: Pick<UserTask, "id" | "title" | "note" | "acceptance">): string {
794
796
  const note = task.note ? ` ${task.note}.` : "";
795
- return `Operator task ${task.id}: ${task.title}.${note} Pick it up with tasks action="pick" id="${task.id}" and work it when appropriate.`;
797
+ const acceptance = task.acceptance ? ` Acceptance: ${JSON.stringify(task.acceptance)}.` : "";
798
+ return `Operator task ${task.id}: ${task.title}.${note}${acceptance} Pick it up with tasks action="pick" id="${task.id}" and work it when appropriate.`;
796
799
  }
797
800
 
798
801
  /** The verb a command performs, in the order /help lists the groups. */
@@ -1519,7 +1522,14 @@ export const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [
1519
1522
  },
1520
1523
  args: {
1521
1524
  subcommands: {
1522
- add: { positionals: [{ name: "text", required: true, rest: true }] },
1525
+ add: {
1526
+ parseFlagsInRest: true,
1527
+ flags: [
1528
+ { name: "--expect", takesValue: true, repeatable: true, valueName: "path" },
1529
+ { name: "--verify", takesValue: true, repeatable: true, valueName: "checkId[:timeoutMs]" },
1530
+ ],
1531
+ positionals: [{ name: "text", required: true, rest: true }],
1532
+ },
1523
1533
  hand: { positionals: [{ name: "id", required: true }] },
1524
1534
  done: { positionals: [{ name: "id", required: true }] },
1525
1535
  drop: { positionals: [{ name: "id", required: true }] },
@@ -1530,7 +1540,12 @@ export const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [
1530
1540
  switch (parsed.subcommand) {
1531
1541
  case "add":
1532
1542
  return parsed.rest
1533
- ? { kind: "tasks-add", text: parsed.rest }
1543
+ ? {
1544
+ kind: "tasks-add",
1545
+ text: parsed.rest,
1546
+ ...(parsed.flagValues.has("--expect") ? { expectedOutputs: parsed.flagValues.get("--expect") ?? [] } : {}),
1547
+ ...(parsed.flagValues.has("--verify") ? { verification: parsed.flagValues.get("--verify") ?? [] } : {}),
1548
+ }
1534
1549
  : { kind: "usage-error", command: "tasks", reason: "add requires task text" };
1535
1550
  case "hand":
1536
1551
  case "done":
@@ -1558,7 +1573,10 @@ export const BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [
1558
1573
  }
1559
1574
  try {
1560
1575
  if (command.kind === "tasks-add") {
1561
- const task = ctx.userTasks.add(command.text);
1576
+ const task = ctx.userTasks.add(
1577
+ command.text,
1578
+ acceptanceFromTaskFlags(process.cwd(), command.expectedOutputs ?? [], command.verification ?? []),
1579
+ );
1562
1580
  ctx.notice("success", `logged operator task ${task.id}: ${task.title}`);
1563
1581
  return;
1564
1582
  }
@@ -2142,32 +2160,6 @@ const COMMAND_SHAPED_TOKEN = /^[A-Za-z][A-Za-z0-9:-]*$/u;
2142
2160
  */
2143
2161
  const COMMAND_ESCAPE = "\\/";
2144
2162
 
2145
- const RETIRED_COMMAND_HINTS: Readonly<Record<string, string>> = Object.freeze({
2146
- status: "Use the footer or Alt+U for status; /cost, /context, and /fleet inspect their own domains.",
2147
- receipts: "Use /view or /view verify <run-id>.",
2148
- "context-init": "Use /context init.",
2149
- "context-clear": "Use /context reset for project context or /new for a fresh session.",
2150
- "context-view": "Use /context.",
2151
- compact: "Use /context compact [instructions].",
2152
- skills: "Use /skill or /resources skills.",
2153
- exit: "Use /quit.",
2154
- config: "Use /settings.",
2155
- ctx: "Use /context.",
2156
- models: "Use /model.",
2157
- clear: "Use /new for a fresh session or /context reset for project context.",
2158
- library: "Use /resources library [kind].",
2159
- prompts: "Use /resources prompts.",
2160
- extensions: "Use /resources extensions.",
2161
- interop: "Use /agents connect.",
2162
- targets: "Use /settings targets.",
2163
- "scoped-models": "Use /settings chat model-picker.",
2164
- });
2165
-
2166
- function retiredCommandHint(token: string): string | undefined {
2167
- if (/^skills?:[^\s]+$/u.test(token)) return "Use /skill <name> [task].";
2168
- return RETIRED_COMMAND_HINTS[token];
2169
- }
2170
-
2171
2163
  /** Pure slash-command parser: no I/O, no side effects. Walks the registry in order. */
2172
2164
  /**
2173
2165
  * One notice line for a reload outcome. Success when the generation committed
@@ -2230,12 +2222,6 @@ export function dispatchSlashCommand(command: SlashCommand, ctx: SlashCommandCon
2230
2222
  return "accepted";
2231
2223
  }
2232
2224
  if (command.kind === "unknown-command") {
2233
- const retiredHint = retiredCommandHint(command.token);
2234
- if (retiredHint) {
2235
- ctx.notice("error", `/${command.token} is retired and did not run. ${retiredHint}`);
2236
- ctx.render();
2237
- return "rejected";
2238
- }
2239
2225
  // The registry does not own the token, but a prompt template might. The
2240
2226
  // parser stays pure, so the lookup happens here, and only for a spelling
2241
2227
  // that matched no command: `/name` is how every other agent invokes the
@@ -72,6 +72,8 @@ export interface CommandArgsSpec {
72
72
  * keep their byte-for-byte parsing.
73
73
  */
74
74
  parseFlagsBeforeRest?: boolean;
75
+ /** Recognize flags throughout a rest positional (operator task acceptance). */
76
+ parseFlagsInRest?: boolean;
75
77
  }
76
78
 
77
79
  export interface ParsedArgs {
@@ -260,6 +262,32 @@ export function parseArgs(spec: CommandArgsSpec, argsLine: string): ParsedArgs {
260
262
  while (index < argsLine.length) {
261
263
  const currentPositionalSpec = positionalSpecs[positionalIndex];
262
264
  if (currentPositionalSpec?.rest) {
265
+ if (currentSpec.parseFlagsInRest) {
266
+ const text: string[] = [];
267
+ while (index < argsLine.length) {
268
+ const start = index;
269
+ const read = readToken();
270
+ if (!read) break;
271
+ if (read.token === "--") {
272
+ text.push(argsLine.slice(index).trim());
273
+ index = argsLine.length;
274
+ break;
275
+ }
276
+ const flag = flagSpecs.find((item) => item.name === read.token);
277
+ if (flag) {
278
+ const error = consumeFlag(flag, read.token);
279
+ if (error) return errorResult(error);
280
+ } else if (read.token.startsWith("--")) return errorResult(`Unknown flag: ${read.token}`);
281
+ else text.push(argsLine.slice(start, index));
282
+ skipWhitespace();
283
+ }
284
+ const restVal = text.join(" ").trim();
285
+ if (!restVal) return errorResult(`Missing required argument: ${currentPositionalSpec.name}`);
286
+ positionals.push(restVal);
287
+ rest = restVal;
288
+ positionalIndex++;
289
+ break;
290
+ }
263
291
  if (currentSpec.parseFlagsBeforeRest) {
264
292
  while (index < argsLine.length) {
265
293
  const tokenStart = index;
@@ -1382,6 +1382,8 @@ function renderAccountabilitySummary(summary: AccountabilitySummary): string[] {
1382
1382
  "# Accountability",
1383
1383
  "",
1384
1384
  `first-pass success: ${summary.firstPassRuns}/${summary.totalRuns} (${pct}%)`,
1385
+ `unverified successes: ${summary.unverifiedSuccesses}`,
1386
+ `ungrounded claims: ${summary.ungroundedClaims}`,
1385
1387
  "",
1386
1388
  "## Top failure causes",
1387
1389
  "",
@@ -9,7 +9,7 @@
9
9
  * I/O, so every sequence below is testable as a pure fold.
10
10
  *
11
11
  * What a worker is saying and doing is not decided here. That is the canonical
12
- * {@link WorkerProgressSnapshot} projection in `worker-progress.ts`, which the
12
+ * {@link WorkerProgressSnapshot} projection in `src/domains/observability/worker-progress.ts`, which the
13
13
  * Fleet Runs board reads from the same events, so the two surfaces cannot drift
14
14
  * on the answer tail, the tool names, or what a call is touching. This module
15
15
  * owns the half the board has no use for: which assignment an event belongs to,
@@ -43,14 +43,18 @@ import type {
43
43
  } from "../core/bus-events.js";
44
44
  import type { RunKind } from "../domains/dispatch/types.js";
45
45
  import type { CanonicalTrustStatus } from "../domains/evidence/trust-status.js";
46
+ import {
47
+ createWorkerProgressFold,
48
+ type WorkerProgressFold,
49
+ type WorkerProgressSnapshot,
50
+ } from "../domains/observability/worker-progress.js";
46
51
  import type { WorkerRunOrigin, WorkerRunRuntime, WorkerRunRuntimeKind } from "../domains/session/index.js";
47
- import { createWorkerProgressFold, type WorkerProgressFold, type WorkerProgressSnapshot } from "./worker-progress.js";
48
52
 
49
53
  export {
50
54
  boundSettledText,
51
55
  WORKER_LIVE_TAIL_LINES,
52
56
  WORKER_TOOL_NAME_LIMIT,
53
- } from "./worker-progress.js";
57
+ } from "../domains/observability/worker-progress.js";
54
58
  export type { WorkerProgressSnapshot };
55
59
 
56
60
  export interface WorkerAttempt {
@@ -5,6 +5,7 @@ import type { DispatchContract } from "../domains/dispatch/contract.js";
5
5
  import type { AgentRoleFactsResolver } from "../domains/dispatch/execution-role.js";
6
6
  import type { PanesOperations } from "../domains/mux/operations.js";
7
7
  import type { AutonomyLevel } from "../domains/safety/autonomy.js";
8
+ import type { DecisionLedgerEntry } from "../domains/session/entries.js";
8
9
  import { builtin, toolPromptHintsForNames } from "./builtin-tool-catalog.js";
9
10
  import type { CompeteMuxWorktrees } from "./compete-worktrees.js";
10
11
  import { assertRegisteredBuiltinTools, type CoreToolBootstrapDeps, registerCoreTools } from "./core-bootstrap.js";
@@ -31,6 +32,8 @@ export interface ToolBootstrapDeps extends CoreToolBootstrapDeps {
31
32
  /** Which optional `dispatch` schema blocks this session advertises; absent means every block. */
32
33
  getDispatchSchemaComposition?: () => DispatchSchemaComposition;
33
34
  dispatchBackground?: DispatchBackgroundRegistry;
35
+ /** Live decision board snapshot; dispatch seals its active refs onto every request. */
36
+ getDecisionBoard?: () => ReadonlyArray<DecisionLedgerEntry>;
34
37
  /** Optional herdr worktree lifecycle for compete candidates. */
35
38
  competeMuxWorktrees?: CompeteMuxWorktrees;
36
39
  /**
@@ -66,6 +69,7 @@ export function registerAllTools(registry: ToolRegistry, deps: ToolBootstrapDeps
66
69
  ...(deps.getWorkerRosters ? { getWorkerRosters: deps.getWorkerRosters } : {}),
67
70
  ...(deps.getDispatchSchemaComposition ? { getSchemaComposition: deps.getDispatchSchemaComposition } : {}),
68
71
  ...(deps.dispatchBackground ? { background: deps.dispatchBackground } : {}),
72
+ ...(deps.getDecisionBoard ? { getDecisionBoard: deps.getDecisionBoard } : {}),
69
73
  ...(deps.competeMuxWorktrees ? { competeWorktrees: { mux: deps.competeMuxWorktrees } } : {}),
70
74
  };
71
75
  registry.register({
@@ -45,6 +45,13 @@ const exactMutationPolicy = {
45
45
  // declares its posture explicitly.
46
46
  const TOOL_METADATA: Readonly<Record<string, ToolMetadata>> = {
47
47
  // OBSERVE: read-class, parallel, envelope + shared turn budget.
48
+ [ToolNames.Evidence]: {
49
+ objective: "Inspect canonical evidence, trust status, gate decisions, and findings.",
50
+ uiLabel: "Evidence",
51
+ retrySafety: "idempotent",
52
+ resultSizePolicy: summaryPolicy("Inspect one run with evidence(mode=run, runId=<id>) to narrow the output."),
53
+ costLatency: "local_medium",
54
+ },
48
55
  [ToolNames.Read]: {
49
56
  objective: "Read exact UTF-8 file content with line and byte bounds.",
50
57
  uiLabel: "Read",
@@ -240,6 +247,30 @@ const TOOL_METADATA: Readonly<Record<string, ToolMetadata>> = {
240
247
  promptHint:
241
248
  'When the operator asks to see a dispatched agent ("show me the tester"), call panes(action="show", target=<agent id>).',
242
249
  },
250
+ [ToolNames.Limitation]: {
251
+ objective: "Record what the turn could not verify and why as a ledger receipt.",
252
+ uiLabel: "Limitation",
253
+ retrySafety: "idempotent",
254
+ resultSizePolicy: {
255
+ kind: "exact",
256
+ maxBytes: 4_096,
257
+ followUpHint: "Call limitation again with a narrower scope if the first call was rejected.",
258
+ },
259
+ costLatency: "local_fast",
260
+ },
261
+ [ToolNames.Decide]: {
262
+ objective: "Record a design decision with its rejected alternatives and rationale on the session decision board.",
263
+ uiLabel: "Decide",
264
+ // A repeated call with the same key supersedes the earlier record, so
265
+ // the surface as a whole is not retry safe.
266
+ retrySafety: "not_retry_safe",
267
+ resultSizePolicy: {
268
+ kind: "exact",
269
+ maxBytes: 4_096,
270
+ followUpHint: "The decision ref in the result is what receipts and commits cite.",
271
+ },
272
+ costLatency: "local_fast",
273
+ },
243
274
  // RETRIEVE: network-class.
244
275
  [ToolNames.WebFetch]: {
245
276
  objective: "Fetch HTTP(S) text for explicit external research.",
@@ -616,7 +616,13 @@ export async function createCandidateWorktreeMapped(
616
616
  * builder changed nothing (an empty candidate is a legitimate ranking fact).
617
617
  */
618
618
  export function commitCandidateWork(worktree: CandidateWorktree, message: string): boolean {
619
- return commitWorktreePath(worktree.path, COMPETE_COMMIT_IDENTITY, message);
619
+ // Context reads refresh these runtime files even in a read-only worker.
620
+ // The caller's pending .gitignore update is not part of the candidate base;
621
+ // exclude the exact files, while keeping operator-owned project assets.
622
+ return commitWorktreePath(worktree.path, COMPETE_COMMIT_IDENTITY, message, [
623
+ ".clio-coder/codewiki.json",
624
+ ".clio-coder/state.json",
625
+ ]);
620
626
  }
621
627
 
622
628
  /** One-line stat summary of what a candidate branch changed relative to HEAD. */
@@ -1,6 +1,7 @@
1
1
  import type { ContextRecalledPayload } from "../core/bus-events.js";
2
2
  import type { LoadSkillsInput } from "../domains/resources/index.js";
3
3
  import type { SessionContract } from "../domains/session/contract.js";
4
+ import type { DecisionBoardStore } from "../domains/session/decision-board.js";
4
5
  import type { SessionEntry } from "../domains/session/entries.js";
5
6
  import { createTaskBoardStore, type TaskBoardStore } from "../domains/session/task-board.js";
6
7
  import type { UserTasksStore } from "../domains/user-tasks/store.js";
@@ -12,11 +13,14 @@ import { builtin } from "./builtin-tool-catalog.js";
12
13
  import { codeNavToolSurface } from "./codewiki/code-nav-surface.js";
13
14
  import { contextToolSurface } from "./context/surface.js";
14
15
  import { credentialPresentTool } from "./credential-present.js";
16
+ import { createDecideTool } from "./decide.js";
15
17
  import { editTool } from "./edit.js";
18
+ import { evidenceTool } from "./evidence.js";
16
19
  import { findTool } from "./find.js";
17
20
  import { grepTool } from "./grep.js";
18
21
  import { lazyTool } from "./lazy-tool.js";
19
22
  import { createLedgerTool } from "./ledger.js";
23
+ import { limitationTool } from "./limitation.js";
20
24
  import { lsTool } from "./ls.js";
21
25
  import { networkToolsDisabled } from "./network-policy.js";
22
26
  import { assertBuiltinToolPolicy } from "./policy.js";
@@ -36,6 +40,8 @@ export interface CoreToolBootstrapDeps {
36
40
  onContextRecalled?: (payload: ContextRecalledPayload) => void;
37
41
  askUser?: AskUserHandler;
38
42
  taskBoard?: TaskBoardStore;
43
+ /** The session decision board the `decide` tool appends to; absent in worker registries, where the tool refuses. */
44
+ decisionBoard?: DecisionBoardStore;
39
45
  userTasks?: UserTasksStore;
40
46
  agentLedger?: AgentLedgerPort;
41
47
  /**
@@ -65,6 +71,7 @@ export interface CoreToolRegistration {
65
71
 
66
72
  export function registerCoreTools(registry: ToolRegistry, deps: CoreToolBootstrapDeps = {}): CoreToolRegistration {
67
73
  const includeNetworkTools = !networkToolsDisabled();
74
+ registry.register(builtin(evidenceTool, { path: "src/tools/evidence.ts", scope: "core" }));
68
75
  registry.register({
69
76
  ...builtin(readTool, { path: "src/tools/read.ts", scope: "core" }),
70
77
  });
@@ -125,6 +132,15 @@ export function registerCoreTools(registry: ToolRegistry, deps: CoreToolBootstra
125
132
  registry.register({
126
133
  ...builtin(credentialPresentTool, { path: "src/tools/credential-present.ts", scope: "core" }),
127
134
  });
135
+ registry.register({
136
+ ...builtin(limitationTool, { path: "src/tools/limitation.ts", scope: "core" }),
137
+ });
138
+ registry.register({
139
+ ...builtin(createDecideTool(deps.decisionBoard ? { decisionBoard: deps.decisionBoard } : {}), {
140
+ path: "src/tools/decide.ts",
141
+ scope: "core",
142
+ }),
143
+ });
128
144
  const session = deps.session;
129
145
  const readSessionEntries = deps.readSessionEntries;
130
146
  registry.register({