@iowarp/clio-coder 0.3.4 → 0.3.7

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 (376) hide show
  1. package/CHANGELOG.md +65 -2
  2. package/CONTRIBUTING.md +6 -6
  3. package/README.md +16 -5
  4. package/dist/{acp-S5R4RR5B.js → acp-SK4MD6MM.js} +11 -11
  5. package/dist/{agents-P6DMMVZY.js → agents-2FN2K6ME.js} +33 -26
  6. package/dist/assets/codewiki.json +1 -1
  7. package/dist/{auth-2XCZLPKS.js → auth-QIYZWM5I.js} +15 -15
  8. package/dist/{chunk-EKMEHE4H.js → chunk-33YXPOE3.js} +2 -3
  9. package/dist/{chunk-VAWWTKDP.js → chunk-3HAPLH5M.js} +11 -11
  10. package/dist/{chunk-YCWGATWI.js → chunk-465YSENW.js} +3 -3
  11. package/dist/{chunk-4OC57DA6.js → chunk-4DGYLA73.js} +53 -2
  12. package/dist/{chunk-UZHIZC5S.js → chunk-4DWFMQDR.js} +61 -76
  13. package/dist/{chunk-ZWMF7253.js → chunk-5C3AQNDW.js} +328 -9
  14. package/dist/{chunk-22NAGB7X.js → chunk-5C77SEEY.js} +5 -94
  15. package/dist/{chunk-WPQLXFOZ.js → chunk-5FR74PWO.js} +3 -2
  16. package/dist/{chunk-35MKKU5R.js → chunk-5UJ6ECTS.js} +18 -10
  17. package/dist/{chunk-BRXQQJFP.js → chunk-6M7VS3J3.js} +571 -50
  18. package/dist/{chunk-QQK64KLB.js → chunk-6TUKSZVF.js} +141 -23
  19. package/dist/{chunk-N4CZJQRK.js → chunk-AB4XIIVB.js} +8 -6
  20. package/dist/{chunk-KRPY7NTG.js → chunk-BMWK7ZIZ.js} +14 -20
  21. package/dist/{chunk-4BPJXDWC.js → chunk-C4JBQ5SR.js} +30 -14
  22. package/dist/{chunk-ZYKPLLNQ.js → chunk-CEYBNUGC.js} +821 -83
  23. package/dist/{chunk-VEZEGCGW.js → chunk-D4MDIG46.js} +20 -18
  24. package/dist/chunk-DJNLUABN.js +843 -0
  25. package/dist/{chunk-BP4OYD6A.js → chunk-DMD2AGVS.js} +21 -2
  26. package/dist/{chunk-KOHPCX4K.js → chunk-DOOEX22V.js} +2 -2
  27. package/dist/chunk-DQA7QLMD.js +123 -0
  28. package/dist/chunk-DR52UMZW.js +21 -0
  29. package/dist/{chunk-3HZ5RWN2.js → chunk-EBEFWSGL.js} +9 -7
  30. package/dist/{chunk-EDRHSCIE.js → chunk-EELBMBT6.js} +128 -13
  31. package/dist/{chunk-HV5X7OR2.js → chunk-EOOQZZDE.js} +16 -14
  32. package/dist/{chunk-WR67VIZY.js → chunk-FOT2FX5J.js} +63 -5
  33. package/dist/{chunk-BPGS2WCQ.js → chunk-GEYXPTRF.js} +2 -1
  34. package/dist/{chunk-FYYLNIL5.js → chunk-GH5622CP.js} +2 -2
  35. package/dist/{chunk-BEY543CS.js → chunk-GOXNB3AO.js} +5 -2
  36. package/dist/chunk-GWS3VEIW.js +195 -0
  37. package/dist/{chunk-G4BMMOKF.js → chunk-HVDIIIQW.js} +2 -2
  38. package/dist/chunk-HWUFFB6L.js +83 -0
  39. package/dist/{chunk-X6COSD2O.js → chunk-J7PIKKWC.js} +8 -436
  40. package/dist/{chunk-NILBFAPG.js → chunk-JNXPYBB4.js} +2 -2
  41. package/dist/{chunk-4VP4KH3K.js → chunk-JRIO5UD2.js} +4 -4
  42. package/dist/{chunk-K6WL7QZT.js → chunk-JTSEDYVQ.js} +7 -7
  43. package/dist/{chunk-QKMUKYO7.js → chunk-KCMKRQX4.js} +236 -84
  44. package/dist/chunk-KZ2H5X4G.js +1026 -0
  45. package/dist/{chunk-A2GZF7DC.js → chunk-LADCF22A.js} +13 -13
  46. package/dist/chunk-LCGCVYZ4.js +57 -0
  47. package/dist/chunk-M4AKACEO.js +382 -0
  48. package/dist/{chunk-POHLU5DW.js → chunk-M6L6IDJG.js} +3 -3
  49. package/dist/{chunk-4JUF2NNX.js → chunk-MXI6J5JF.js} +7 -7
  50. package/dist/{chunk-X4RCMKVQ.js → chunk-NDINPTJ4.js} +2 -2
  51. package/dist/{chunk-TTNYS3EA.js → chunk-OB5HIGJY.js} +1 -1
  52. package/dist/{chunk-7RXG6QRZ.js → chunk-OBMAI2DP.js} +61 -840
  53. package/dist/{chunk-5M54SPOL.js → chunk-ODFEOB4F.js} +161 -5
  54. package/dist/chunk-PD3MESLB.js +242 -0
  55. package/dist/{chunk-ED4KHGC3.js → chunk-PPAMZ32Z.js} +9 -2
  56. package/dist/{chunk-VMNQ6OZA.js → chunk-QCTRSGHQ.js} +963 -786
  57. package/dist/chunk-RVG5JXAL.js +41 -0
  58. package/dist/{chunk-RD5U66HV.js → chunk-SROCI7ZU.js} +7 -7
  59. package/dist/{chunk-MFFY33HR.js → chunk-THKY7CD7.js} +466 -205
  60. package/dist/{chunk-34475P3I.js → chunk-TSHXZTOQ.js} +5 -4
  61. package/dist/{chunk-PCZJO5TI.js → chunk-UFQ3F4FW.js} +13 -178
  62. package/dist/{chunk-AD2SYQYC.js → chunk-UHXRNZ2J.js} +121 -3
  63. package/dist/chunk-UND3GU2L.js +103 -0
  64. package/dist/{chunk-QQL5RT5M.js → chunk-UUANF5CR.js} +2323 -2114
  65. package/dist/{chunk-VJWL6YS5.js → chunk-UUVG37B4.js} +2 -2
  66. package/dist/chunk-UVDSQ6LW.js +472 -0
  67. package/dist/{chunk-QWU7ZBO7.js → chunk-VQNODYQ4.js} +215 -56
  68. package/dist/chunk-VREKEFLL.js +37 -0
  69. package/dist/{chunk-2TZWSW76.js → chunk-WHGPSPT5.js} +2 -2
  70. package/dist/{chunk-TW3WDMVS.js → chunk-WHJYKASB.js} +2 -2
  71. package/dist/{chunk-MEQ45TQ4.js → chunk-WJHBC77E.js} +21 -7
  72. package/dist/{chunk-HXG4IURW.js → chunk-X2KV5FXT.js} +2 -2
  73. package/dist/{chunk-YHZX5GEU.js → chunk-XAKHZX5N.js} +2 -2
  74. package/dist/{chunk-2LZI5CAG.js → chunk-XEGB6BCN.js} +228 -36
  75. package/dist/{chunk-E25LMLRW.js → chunk-YD734TPH.js} +2 -2
  76. package/dist/{verifiers-4UUM6TEE.js → chunk-YTYFXUI3.js} +121 -372
  77. package/dist/{chunk-3JLKSKD7.js → chunk-ZGH7FGS5.js} +17 -7
  78. package/dist/{chunk-VSNATDE6.js → chunk-ZZMN5OM4.js} +2 -2
  79. package/dist/cli/index.js +34 -32
  80. package/dist/{clio-J5JIOIDS.js → clio-WBVQEBKO.js} +7 -7
  81. package/dist/{code-nav-AXCXSBHX.js → code-nav-FGGFIE7L.js} +7 -7
  82. package/dist/codewiki/build-worker.js +4 -4
  83. package/dist/{components-KELWS457.js → components-F7OEATSO.js} +5 -5
  84. package/dist/{config-OEBMIN2U.js → config-TRBL3RCF.js} +48 -41
  85. package/dist/{configure-PUQOSIXQ.js → configure-OLCVPHNM.js} +17 -17
  86. package/dist/{context-URSXPBCK.js → context-MJIJ6GOX.js} +12 -12
  87. package/dist/{context-EKDCKUUZ.js → context-WFPKQSM6.js} +26 -9
  88. package/dist/{context-MGSE4Z2T.js → context-XEWE3MOJ.js} +44 -37
  89. package/dist/{context-clear-KDAJRNUK.js → context-clear-KNOS2JPB.js} +44 -37
  90. package/dist/{context-index-BZ4UYMTC.js → context-index-SSR5ECNE.js} +3 -3
  91. package/dist/{context-working-set-SBKMPPI2.js → context-working-set-EUXAZI6N.js} +14 -13
  92. package/dist/{dispatch-runner-MSWN72NK.js → dispatch-runner-B7MTOVKL.js} +321 -60
  93. package/dist/{docs-2C2LTVT2.js → docs-FLJTIDSE.js} +5 -5
  94. package/dist/{doctor-7BSE27PJ.js → doctor-RN4YKO2X.js} +15 -15
  95. package/dist/{eval-IZGDOO4H.js → eval-RUBJVSNQ.js} +52 -236
  96. package/dist/{evidence-SR7WXB5B.js → evidence-JZNBUOQZ.js} +39 -33
  97. package/dist/{evolve-K7VE2CBX.js → evolve-FJVC4KKI.js} +39 -33
  98. package/dist/{extensions-QVDOHDGJ.js → extensions-IQL36S7K.js} +5 -5
  99. package/dist/{fleet-7XMJNQNF.js → fleet-BDKYJFCP.js} +243 -370
  100. package/dist/fleet-commands-ZFIWZSB3.js +70 -0
  101. package/dist/fleet-graph-Y6HPXIVF.js +125 -0
  102. package/dist/fleet-new-RDVJLHHH.js +48 -0
  103. package/dist/{fleet-preflight-AQNAH644.js → fleet-preflight-BHSNPBMH.js} +2 -2
  104. package/dist/fleet-validate-BIYREGIK.js +79 -0
  105. package/dist/{init-JGNPAYXT.js → init-LQUB5COQ.js} +57 -48
  106. package/dist/library-NJAHIGG4.js +217 -0
  107. package/dist/memory-OG6HOYKM.js +472 -0
  108. package/dist/{models-ZMMLFJNN.js → models-5ZG5XY7J.js} +23 -22
  109. package/dist/{monitor-2F3T5KHP.js → monitor-TJ7AMTGB.js} +69 -35
  110. package/dist/{orchestrator-ORHT43JB.js → orchestrator-WZYB54DM.js} +4868 -1189
  111. package/dist/{paths-UXLN5YYZ.js → paths-XUC7GS6E.js} +5 -5
  112. package/dist/{reset-NXGTYNUO.js → reset-PXQT45IY.js} +8 -8
  113. package/dist/{run-RF4WJGMT.js → run-FQ74YF62.js} +82 -62
  114. package/dist/{share-UT3W6E4M.js → share-FW7SVCL3.js} +34 -10
  115. package/dist/{skills-PSACKC5Q.js → skills-7E7IRB3R.js} +25 -9
  116. package/dist/{skills-eval-WJSI55RZ.js → skills-eval-LI75W6OK.js} +43 -35
  117. package/dist/{targets-PIIRAOYS.js → targets-4CIFKCTW.js} +27 -24
  118. package/dist/{terminal-lease-ULWXWNVY.js → terminal-lease-WUZY7ZV5.js} +5 -4
  119. package/dist/{uninstall-FZCQCDKC.js → uninstall-7FV7IP4E.js} +5 -5
  120. package/dist/{upgrade-346TZ6AV.js → upgrade-K2HVIVMQ.js} +21 -20
  121. package/dist/{usage-6KKXR32N.js → usage-GTZELZQX.js} +159 -59
  122. package/dist/verifiers-RLAHT27O.js +336 -0
  123. package/dist/{verify-X5HDROLA.js → verify-BX3BRKH5.js} +7 -6
  124. package/dist/{wiki-generate-7STOCIFZ.js → wiki-generate-ASIFASCN.js} +58 -48
  125. package/dist/worker/entry.js +98 -84
  126. package/dist/{workspace-G4ZWUIPR.js → workspace-ZJ6BFM3Q.js} +4 -4
  127. package/docs/README.md +4 -3
  128. package/docs/acp.md +1 -1
  129. package/docs/alcf-provider.md +1 -1
  130. package/docs/architecture.md +2 -2
  131. package/docs/artifact-placement.md +1 -2
  132. package/docs/artifact-versions.md +10 -6
  133. package/docs/built-in-agents.md +26 -2
  134. package/docs/capacity-and-scheduling.md +1 -1
  135. package/docs/commands-and-modes.md +90 -8
  136. package/docs/configuration-and-targets.md +90 -2
  137. package/docs/context-engine.md +4 -2
  138. package/docs/context-working-set.md +4 -4
  139. package/docs/development-pipeline.md +1 -1
  140. package/docs/dispatch-architecture-rationale.md +1 -1
  141. package/docs/documentation-coverage.md +4 -4
  142. package/docs/documentation-guide.md +4 -4
  143. package/docs/eval-runner.md +1 -1
  144. package/docs/evals-internal.md +4 -45
  145. package/docs/evidence-and-memory.md +70 -10
  146. package/docs/evolution.md +1 -1
  147. package/docs/exit-codes-and-output.md +4 -1
  148. package/docs/extensions-and-sharing.md +6 -2
  149. package/docs/fleet-demo-runbook.md +2 -2
  150. package/docs/fleet-dispatch.md +224 -11
  151. package/docs/git-commit-provenance.md +2 -2
  152. package/docs/glossary.md +1 -1
  153. package/docs/installation-and-lifecycle.md +2 -2
  154. package/docs/middleware-and-components.md +20 -2
  155. package/docs/model-catalog.md +1 -1
  156. package/docs/observability.md +55 -8
  157. package/docs/proactive-memory.md +26 -16
  158. package/docs/prompt-envelope-and-tools.md +4 -2
  159. package/docs/provider-adapter-cookbook.md +1 -1
  160. package/docs/release-cut-checklist.md +83 -65
  161. package/docs/resource-library.md +59 -0
  162. package/docs/safety-model.md +29 -7
  163. package/docs/scientific-validation.md +3 -3
  164. package/docs/session-lifecycle.md +37 -1
  165. package/docs/skills-marketplace.md +16 -3
  166. package/docs/tool-usage.md +14 -7
  167. package/docs/trace-store.md +1 -1
  168. package/docs/troubleshooting.md +1 -1
  169. package/docs/tui-design.md +38 -4
  170. package/docs/worker-dispatch-mechanics.md +3 -3
  171. package/package.json +7 -4
  172. package/src/cli/agents.ts +2 -3
  173. package/src/cli/argv.ts +14 -1
  174. package/src/cli/fleet-commands.ts +37 -0
  175. package/src/cli/fleet-graph.ts +102 -0
  176. package/src/cli/fleet-new.ts +36 -0
  177. package/src/cli/fleet-preflight.ts +121 -0
  178. package/src/cli/fleet-validate.ts +30 -0
  179. package/src/cli/fleet.ts +188 -335
  180. package/src/cli/index.ts +4 -2
  181. package/src/cli/library.ts +190 -0
  182. package/src/cli/memory.ts +272 -10
  183. package/src/cli/modes/json-stream.ts +2 -2
  184. package/src/cli/modes/print.ts +12 -1
  185. package/src/cli/run.ts +22 -2
  186. package/src/cli/share.ts +13 -1
  187. package/src/cli/targets.ts +12 -3
  188. package/src/cli/usage.ts +160 -20
  189. package/src/core/bus-events.ts +7 -0
  190. package/src/core/commit-attribution.ts +4 -4
  191. package/src/core/config.ts +130 -0
  192. package/src/core/defaults.ts +81 -0
  193. package/src/core/response-model-id.ts +134 -0
  194. package/src/core/toml.ts +62 -0
  195. package/src/core/workspace-files.ts +0 -1
  196. package/src/domains/agents/builtins/architect.md +2 -1
  197. package/src/domains/agents/builtins/oracle.md +33 -0
  198. package/src/domains/agents/catalog.ts +18 -5
  199. package/src/domains/agents/fleet-contract.ts +278 -16
  200. package/src/domains/agents/index.ts +14 -0
  201. package/src/domains/agents/recipe.ts +54 -14
  202. package/src/domains/agents/result-contract.ts +242 -5
  203. package/src/domains/config/classify.ts +4 -0
  204. package/src/domains/context/bootstrap.ts +36 -27
  205. package/src/domains/context/project-metadata.ts +19 -63
  206. package/src/domains/context/prompt-context.ts +8 -0
  207. package/src/domains/context/working-set/policies/index.ts +3 -4
  208. package/src/domains/dispatch/active-route-planner.ts +14 -0
  209. package/src/domains/dispatch/backoff.ts +2 -1
  210. package/src/domains/dispatch/budget-envelope.ts +396 -0
  211. package/src/domains/dispatch/capability-match.ts +1 -0
  212. package/src/domains/dispatch/checkout-writer-lease.ts +175 -0
  213. package/src/domains/dispatch/contract.ts +36 -0
  214. package/src/domains/dispatch/delegation-plan.ts +167 -0
  215. package/src/domains/dispatch/execution-plan.ts +76 -5
  216. package/src/domains/dispatch/execution-role.ts +3 -1
  217. package/src/domains/dispatch/execution-scheduler.ts +183 -67
  218. package/src/domains/dispatch/extension.ts +339 -36
  219. package/src/domains/dispatch/fleet-gate.ts +14 -0
  220. package/src/domains/dispatch/fleet-plan.ts +63 -3
  221. package/src/domains/dispatch/fleet-run.ts +737 -0
  222. package/src/domains/dispatch/gate-role-prompts.ts +9 -0
  223. package/src/domains/dispatch/host-verification.ts +178 -0
  224. package/src/domains/dispatch/index.ts +38 -0
  225. package/src/domains/dispatch/intent.ts +159 -0
  226. package/src/domains/dispatch/orphan-recovery.ts +1 -0
  227. package/src/domains/dispatch/receipt-integrity.ts +12 -4
  228. package/src/domains/dispatch/state.ts +37 -3
  229. package/src/domains/dispatch/types.ts +61 -9
  230. package/src/domains/dispatch/validation.ts +80 -6
  231. package/src/domains/dispatch/worker-spawn.ts +14 -3
  232. package/src/domains/eval/metrics/evidence.ts +0 -116
  233. package/src/domains/eval/metrics/invariants.ts +1 -1
  234. package/src/domains/eval/runners/clio-run.ts +1 -10
  235. package/src/domains/eval/runners/external-command.ts +2 -29
  236. package/src/domains/eval/schema/suite.ts +0 -7
  237. package/src/domains/eval/suites/run.ts +1 -7
  238. package/src/domains/evidence/trust-status.ts +10 -1
  239. package/src/domains/memory/index.ts +22 -0
  240. package/src/domains/memory/operations.ts +58 -1
  241. package/src/domains/memory/promotion.ts +281 -0
  242. package/src/domains/memory/prompt-section.ts +25 -5
  243. package/src/domains/memory/proposal.ts +51 -7
  244. package/src/domains/memory/task-bank.ts +3 -2
  245. package/src/domains/memory/task-memory-handoff.ts +181 -24
  246. package/src/domains/memory/task-memory-policy.ts +3 -1
  247. package/src/domains/memory/types.ts +37 -0
  248. package/src/domains/memory/validate.ts +178 -0
  249. package/src/domains/middleware/index.ts +15 -0
  250. package/src/domains/middleware/memory-intervention.ts +35 -25
  251. package/src/domains/middleware/runtime.ts +6 -0
  252. package/src/domains/middleware/skills-reminder.ts +19 -4
  253. package/src/domains/middleware/stalled-turn.ts +43 -1
  254. package/src/domains/middleware/types.ts +10 -0
  255. package/src/domains/middleware/watchdog.ts +281 -0
  256. package/src/domains/observability/contract.ts +9 -2
  257. package/src/domains/observability/cost.ts +31 -4
  258. package/src/domains/observability/extension.ts +2 -2
  259. package/src/domains/observability/index.ts +10 -0
  260. package/src/domains/observability/out-of-turn-usage.ts +223 -0
  261. package/src/domains/providers/index.ts +3 -0
  262. package/src/domains/providers/model-discovery.ts +9 -0
  263. package/src/domains/providers/runtime-resolution.ts +38 -1
  264. package/src/domains/providers/runtimes/common/probe-helpers.ts +97 -16
  265. package/src/domains/providers/types/context-window-slots.ts +18 -0
  266. package/src/domains/providers/types/runtime-descriptor.ts +3 -1
  267. package/src/domains/resources/index.ts +20 -0
  268. package/src/domains/resources/library.ts +326 -0
  269. package/src/domains/resources/skills/marketplace.ts +37 -12
  270. package/src/domains/safety/call-target.ts +211 -14
  271. package/src/domains/safety/decision-presentation.ts +268 -0
  272. package/src/domains/safety/redaction.ts +73 -0
  273. package/src/domains/session/context-ledger.ts +10 -1
  274. package/src/domains/session/decision-board.ts +4 -0
  275. package/src/domains/session/entries.ts +3 -0
  276. package/src/domains/session/handoff.ts +629 -0
  277. package/src/domains/session/history.ts +68 -19
  278. package/src/domains/session/usage.ts +24 -7
  279. package/src/domains/share/archive.ts +67 -2
  280. package/src/engine/acp/event-mapper.ts +7 -0
  281. package/src/engine/acp/server.ts +29 -2
  282. package/src/engine/apis/lmstudio.ts +25 -4
  283. package/src/engine/apis/openai-completions.ts +147 -22
  284. package/src/engine/claude/sdk-runtime.ts +8 -2
  285. package/src/engine/claude/tool-safety.ts +13 -0
  286. package/src/engine/loop-guard.ts +27 -3
  287. package/src/engine/worker-events.ts +4 -3
  288. package/src/engine/worker-runtime.ts +59 -54
  289. package/src/entry/orchestrator.ts +55 -1
  290. package/src/interactive/bus-notices.ts +26 -0
  291. package/src/interactive/chat-loop-messages.ts +22 -0
  292. package/src/interactive/chat-loop.ts +248 -1
  293. package/src/interactive/chat-renderer.ts +41 -3
  294. package/src/interactive/clio-editor.ts +44 -7
  295. package/src/interactive/context-overlay.ts +43 -5
  296. package/src/interactive/cost-overlay.ts +70 -11
  297. package/src/interactive/council-dispatch.ts +30 -0
  298. package/src/interactive/council-grid.ts +213 -0
  299. package/src/interactive/council.ts +99 -0
  300. package/src/interactive/dispatch-board.ts +471 -50
  301. package/src/interactive/fleet-run-preview.ts +307 -0
  302. package/src/interactive/footer/notifications.ts +219 -0
  303. package/src/interactive/footer/widgets.ts +13 -0
  304. package/src/interactive/handoff-round.ts +56 -0
  305. package/src/interactive/interactive-application.ts +49 -2
  306. package/src/interactive/interactive-event-projection.ts +9 -1
  307. package/src/interactive/interactive-input-runtime.ts +11 -1
  308. package/src/interactive/interactive-presentation.ts +11 -1
  309. package/src/interactive/interactive-slash-runtime.ts +52 -2
  310. package/src/interactive/interactive-subscriptions.ts +14 -2
  311. package/src/interactive/memory-overlay.ts +89 -4
  312. package/src/interactive/oracle.ts +179 -0
  313. package/src/interactive/overlay-ask-user-lifecycle.ts +7 -1
  314. package/src/interactive/overlay-frame.ts +5 -2
  315. package/src/interactive/overlay-general-openers.ts +230 -2
  316. package/src/interactive/overlay-key-routing.ts +58 -2
  317. package/src/interactive/overlay-lifecycle.ts +52 -5
  318. package/src/interactive/overlay-permission-lifecycle.ts +33 -8
  319. package/src/interactive/overlay-resource-openers.ts +11 -3
  320. package/src/interactive/overlay-session-lifecycle.ts +234 -2
  321. package/src/interactive/overlay-transitions.ts +11 -0
  322. package/src/interactive/overlays/ask-user.ts +74 -30
  323. package/src/interactive/overlays/decisions.ts +3 -1
  324. package/src/interactive/overlays/fleet-run-approval.ts +208 -0
  325. package/src/interactive/overlays/handoff-review.ts +185 -0
  326. package/src/interactive/overlays/library-install-confirm.ts +151 -0
  327. package/src/interactive/overlays/list-overlay.ts +168 -2
  328. package/src/interactive/overlays/settings.ts +101 -4
  329. package/src/interactive/overlays/side-question.ts +139 -0
  330. package/src/interactive/overlays/skills-hub.ts +401 -15
  331. package/src/interactive/permission-hint.ts +35 -0
  332. package/src/interactive/permission-overlay.ts +95 -45
  333. package/src/interactive/renderers/tool-execution.ts +19 -49
  334. package/src/interactive/session-last-turn.ts +8 -1
  335. package/src/interactive/session-usage-reseed.ts +36 -10
  336. package/src/interactive/side-question.ts +171 -0
  337. package/src/interactive/slash-commands.ts +434 -7
  338. package/src/interactive/slash-spec.ts +19 -6
  339. package/src/interactive/status/summary.ts +5 -0
  340. package/src/interactive/status/types.ts +5 -0
  341. package/src/interactive/terminal-lease.ts +1 -0
  342. package/src/interactive/theme/tokens.ts +30 -0
  343. package/src/interactive/turn-context.ts +96 -23
  344. package/src/interactive/turn-middleware.ts +16 -1
  345. package/src/interactive/turn-runtime.ts +37 -8
  346. package/src/interactive/turn-state.ts +3 -0
  347. package/src/interactive/watchdog-run.ts +75 -0
  348. package/src/interactive/worker-progress.ts +440 -0
  349. package/src/interactive/worker-share.ts +56 -1
  350. package/src/interactive/worker-stream.ts +58 -110
  351. package/src/tools/agent-tools.ts +28 -3
  352. package/src/tools/ask-user.ts +21 -1
  353. package/src/tools/bootstrap.ts +3 -0
  354. package/src/tools/compete-worktrees.ts +13 -79
  355. package/src/tools/context/index.ts +2 -2
  356. package/src/tools/dispatch-admission.ts +242 -8
  357. package/src/tools/dispatch-arguments.ts +65 -1
  358. package/src/tools/dispatch-event-text.ts +19 -0
  359. package/src/tools/dispatch-plan.ts +136 -6
  360. package/src/tools/dispatch-runner.ts +319 -13
  361. package/src/tools/dispatch-types.ts +20 -1
  362. package/src/tools/dispatch.ts +96 -3
  363. package/src/tools/monitor.ts +31 -0
  364. package/src/tools/profiles.ts +18 -4
  365. package/src/tools/registry.ts +15 -5
  366. package/src/tools/result-disposition.ts +156 -0
  367. package/src/tools/result-shaping.ts +59 -1
  368. package/src/tools/task-worktree.ts +238 -0
  369. package/src/tools/verify/authoring.ts +116 -55
  370. package/src/tools/verify/scripts.ts +62 -0
  371. package/src/tools/worker-evidence.ts +21 -1
  372. package/src/worker/spec-contract.ts +44 -3
  373. package/dist/chunk-EFADSJET.js +0 -18
  374. package/dist/chunk-HC4CLZ2Y.js +0 -68
  375. package/dist/memory-4ALKDJ4Q.js +0 -246
  376. package/src/domains/eval/metrics/chaos-stream.ts +0 -93
@@ -1,7 +1,7 @@
1
1
  # Middleware and Component Registry
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard with an interactive component scanner and a dynamic hook-and-effect pipeline is located at [docs/html/middleware_blueprint.html](html/middleware_blueprint.html) (Version: 0.3.4).
4
+ > **Interactive Spec Available:** An interactive dashboard with an interactive component scanner and a dynamic hook-and-effect pipeline is located at [docs/html/middleware_blueprint.html](html/middleware_blueprint.html) (Version: 0.3.7).
5
5
 
6
6
  Clio Coder has two related but separate surfaces:
7
7
 
@@ -114,7 +114,25 @@ Middleware hook budgets are phase-aware through `DEFAULT_MIDDLEWARE_HOOK_BUDGETS
114
114
 
115
115
  Per-phase budgets can be overridden via `CLIO_CODER_HOOK_BUDGET_<PHASE>_MS` or global `CLIO_CODER_HOOK_BUDGET_MS`. Warmup grace exempts initial calls (`DEFAULT_HOOK_BUDGET_WARMUP_CALLS = 1`), and steady-state warnings trigger when at least 3 of the last 5 post-warmup calls exceed budget (`DEFAULT_HOOK_BUDGET_WINDOW = 5`, `DEFAULT_HOOK_BUDGET_THRESHOLD = 3`). Overruns are reported but do not abort the turn. The orchestrator and workers share the middleware contract, but worker guard state is process-local.
116
116
 
117
- Middleware reminders are visible request text, not hidden prompt state. `turn_start` reminders flush into the same accepted request; `turn_end` reminders flush once on the next request. The built-in stalled-turn rule can request one automatic continuation for a user prompt, then stops rather than looping forever.
117
+ Middleware reminders are visible request text, not hidden prompt state. `turn_start` reminders flush into the same accepted request; `turn_end` reminders flush once on the next request. A `request_continuation` from any producer is capped at one automatic continuation per user prompt; a second producer in the same prompt gets a footer notice that the nudge is spent, and the turn is handed back to the operator rather than looped.
118
+
119
+ ### Built-in registrations
120
+
121
+ These ship in every interactive session. Each is one bounded behavior with a visible reminder; none changes a tool policy or a safety verdict.
122
+
123
+ | Id | Hooks | What it does |
124
+ | --- | --- | --- |
125
+ | `nudge.stalled-turn` | `turn_end` | The one declarative rule. A turn that called no tools and ended on an announced action ("Next I will inspect `src/cli/index.ts`") is continued once with a reminder to perform it or say plainly that it is finished. Questions, "let me know", conditional offers ("if you want me to"), and completion statements are not announcements. |
126
+ | `observer.skills-reminder` | `turn_start`, `turn_end` | Once per session, on the first substantive turn, when installed or installable skills exist, injects one line teaching the suggestion protocol: list with `context(scope="skills")`, open the reply with `Suggested skill: /skill <name>` when one matches, then continue the task in the same turn. Only the operator loads a skill. At `turn_end`, a reply that made the suggestion and stopped with only listing calls behind it is continued once (#184): the suggestion is not the task. Greetings do not spend the session's one reminder; a resumed or forked session never gets one. |
127
+ | `observer.task-board-reminder` | `turn_start` | Once per session, when the operator's text literally enumerates three or more steps (`1)`, `2.`, `step 3:`, or three bulleted lines), injects one line asking for `tasks action="plan"` before the first edit. Prose that merely mentions numbers never counts. |
128
+ | `nudge.open-tasks` | `turn_end` | A settled work turn (one that called tools) that ends while the session task board still has pending or active tasks is continued once with the open list. Pure conversation turns, aborted or errored turns, and boards where every remaining task is blocked do not trigger. |
129
+ | `nudge.detached-dispatch` | `turn_end` | A settled turn that ends while a detached dispatch batch has every run terminal and uncollected is continued once, naming the ready batches; `monitor mode="collect"` clears it, including across resume. Batches with runs still in flight, and surfaces without `monitor`, do not trigger. |
130
+ | `nudge.read-only-exploration` | `after_tool`, `turn_end` | After nine or more read-only calls (`read`, `grep`, `find`, `ls`, `code_nav`, read-only shell) in one user turn without a successful Scout dispatch, injects one advisory to delegate broad reconnaissance to Scout. One advisory per user turn, and only on surfaces that have `dispatch`. |
131
+ | `rail.unbacked-worker-claim` | `after_tool`, `turn_end` | A reply that reports worker or Scout results in a turn with no `dispatch` call gets one warning that the claim is not backed by a receipt. A `[worker result]` note the operator shared is receipt-backed and exempt. No continuation: the operator decides. |
132
+ | `observer.watchdog` | `after_tool`, `turn_end` | Opt-in through `watchdog.enabled` (default off). A turn that changed the tree is reviewed by one read-only `verifier` dispatch briefed with the turn's coalesced diff (per-path last-write-wins, bounded to 12 KiB) and the task board's current scope. Its failed checks become one transcript notice naming the count and the first three; a passing report emits nothing. `watchdog.cadenceToolCalls: N` also fires it every N tool calls inside the turn. One run in flight at a time; an overlapping trigger is dropped and counted. It emits no middleware effects, never continues a turn, and never mutates. Turns with no file mutations, headless runs, and ACP runs never fire it. |
133
+ | `observer.memory-intervention` | `after_tool` | Every `memory.intervention.everyNTools` tool calls, asks a background model for a bounded reflection over the recent window and injects it as a reminder when it arrives. Governed by the `memory.intervention` settings block. |
134
+
135
+ Two coded controls sit beside the registrations rather than among them. `tool-choice-control` turns `require_tool` and `lock_tools` effects into the provider's tool-choice field for the next round: a required tool clears when that tool starts, a lock lasts until the next submitted turn and outranks later requirements. `hook-receipts` is the durable ring (200 entries, throttled to one write per two seconds) of user-defined hook executions that `clio-coder config inspect` reads.
118
136
 
119
137
  User-defined hook declarations load from three places: `<extensionRoot>/hooks.yaml`, `.clio-coder/hooks.yaml`, and `.clio-coder/hooks.local.yaml`. A hook can be `prompt`, `effect`, or `command`. Command hooks run an argv array without a shell, under the workspace with a timeout and bounded output, and every hook execution emits a receipt.
120
138
 
@@ -1,7 +1,7 @@
1
1
  # Model Catalog, Runtime Refresh, and Field Notes
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard mapping capabilities, probe discovery, and target resolution is located at [docs/html/models_blueprint.html](html/models_blueprint.html) (Version: 0.3.4).
4
+ > **Interactive Spec Available:** An interactive dashboard mapping capabilities, probe discovery, and target resolution is located at [docs/html/models_blueprint.html](html/models_blueprint.html) (Version: 0.3.7).
5
5
 
6
6
  Clio Coder treats a selectable model as the intersection of three sources:
7
7
 
@@ -1,7 +1,7 @@
1
1
  # Observability Viewer
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/observability_blueprint.html](html/observability_blueprint.html) (Version: 0.3.4).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/observability_blueprint.html](html/observability_blueprint.html) (Version: 0.3.7).
5
5
 
6
6
  `/view` is the interactive artifact viewer for a Clio session. It keeps the live transcript compact while preserving a full inspection path for durable artifacts, task ledgers, and successful workspace outputs.
7
7
 
@@ -57,6 +57,53 @@ An `EvidenceIndexRow` has the following schema:
57
57
 
58
58
  ---
59
59
 
60
+ ## Cross-Session Usage Facts
61
+
62
+ `clio-coder usage report` folds the local archive into one window of facts. Its token and cost facts come from two inputs: the per-session ledgers, folded through the session domain's `ledgerUsageCalls`, and the out-of-turn usage store described below. Both the text report and `--json` carry the same fields.
63
+
64
+ | Field | Where it appears | Meaning |
65
+ | --- | --- | --- |
66
+ | `apiCalls` | `tokens in window: <total> over <n> model calls` and the `tokens` JSON fact | Provider calls folded in the window, out-of-turn rounds included. |
67
+ | `input`, `output`, `cacheRead`, `cacheWrite`, `reasoningTokens`, `totalTokens` | the same line and fact | Provider-reported token breakdown for those calls. |
68
+ | `costUsd` | `provider-reported cost in window` and the `tokens` fact | Provider-reported cost. Never estimated. |
69
+ | `turns` | `turns in window` and the `tokens` fact | Folded calls that were turns, so labelled calls are subtracted exactly as `/cost` subtracts them. |
70
+ | `sideQuestions` | `side questions in window` and the `tokens` fact | `/btw` rounds in the window. |
71
+ | `handoffs` | `handoffs in window` and the `tokens` fact | `/handoff` extraction rounds in the window. |
72
+
73
+ The last three fields appear only when at least one labelled call falls in the window. An archive with no `/btw` or `/handoff` round in it renders exactly as it did before those fields existed, so their presence is itself the signal that money was spent beside a session.
74
+
75
+ ### The Out-of-Turn Usage Store
76
+
77
+ A `/btw` side question and a `/handoff` extraction round are real provider calls that append nothing to the session JSONL, by design: a fleet run briefs its workers from the transcript, and a question the operator asked to orient themselves must not become context those workers inherit. The spend still has to be recorded somewhere durable, so it goes to `<stateDir>/usage/out-of-turn.jsonl`, one JSON line per priced call, written by the chat loop at the same moment it reports the call to `/cost`.
78
+
79
+ The file is append-only NDJSON kept as a bounded ring (capped at 1000 rows, rewritten atomically under the shared state-file lock when it grows past the cap). Reads are tolerant: a malformed line is reported as a diagnostic on stderr and skipped.
80
+
81
+ A row has the following schema:
82
+ ```json
83
+ {
84
+ "label": "side-question",
85
+ "sessionId": "01JQ2K7V8W",
86
+ "repoIdentity": "9f2c1b4ea77d0c31",
87
+ "timestamp": "2026-06-25T14:30:00.000Z",
88
+ "target": "dynamo",
89
+ "attributedModelId": "Nemo-3.5",
90
+ "usage": {
91
+ "input": 120,
92
+ "output": 8,
93
+ "cacheRead": 4,
94
+ "cacheWrite": 0,
95
+ "reasoning": 2,
96
+ "totalTokens": 132,
97
+ "costUsd": 0.0004,
98
+ "costProvenance": "known"
99
+ }
100
+ }
101
+ ```
102
+
103
+ `repoIdentity` is the same cwd hash the session ledger is filed under, which is what lets `usage report --repo <path>` select these rows with the hash it already computes for the ledgers.
104
+
105
+ ---
106
+
60
107
  ## Artifact Categories and Path Layouts
61
108
 
62
109
  Clio resolves directories under platform-specific XDG defaults (on Linux, these default to `~/.config/clio-coder/`, `~/.local/share/clio-coder/`, and `~/.local/state/clio-coder/`).
@@ -109,17 +156,17 @@ Pressing `v` on a selected receipt or running `/view verify <runId>` performs cr
109
156
 
110
157
  1. **Read Receipt**: Reads the receipt JSON from `<stateDir>/receipts/<runId>.json`.
111
158
  2. **Resolve Ledger**: Looks up the run envelope inside `<stateDir>/runs.json`.
112
- 3. **Verify Integrity**: Recomputes the SHA-256 digest over the strict v15 receipt and reconstructible ledger fields. The digest covers every current field, including steering, routing intent and decision, route quality, worker identity, execution role, and result-contract conformance. Every version other than 15 fails verification; there is no historical receipt reader.
159
+ 3. **Verify Integrity**: Recomputes the SHA-256 digest over the strict v19 receipt and reconstructible ledger fields. The digest covers every current field, including steering, routing intent and decision, route quality, worker identity, execution role, result-contract conformance, council provenance, and fleet gate provenance. Every version other than 19 fails verification; there is no historical receipt reader.
113
160
  4. **Report Result**: The viewer reports `ok` or the verification failure reason. It does not rename or delete the receipt. Startup orphan recovery may quarantine corrupt orphan receipt files as `<name>.json.corrupt`, but `/view verify` is read-only.
114
161
 
115
162
  ---
116
163
 
117
164
  ## Receipt Fields for Dispatch Provenance
118
165
 
119
- A receipt carries optional provenance and context blocks that answer "what happened" for a chained (pipeline), composed (persona override), escalated, briefed, steered, or external run. Those optional blocks remain absent when unused. Current receipts carry strict integrity v15 and an explicit `outcomeCode: null` when no classified deterministic failure occurred. Automation consumers must treat the optional blocks below as absent by default and `outcomeCode` as nullable; older receipt versions are invalid.
166
+ A receipt carries optional provenance and context blocks that answer "what happened" for a chained (pipeline), composed (persona override), escalated, briefed, steered, council, or external run. Those optional blocks remain absent when unused. Current receipts carry strict integrity v19 and an explicit `outcomeCode: null` when no classified deterministic failure occurred. Automation consumers must treat the optional blocks below as absent by default and `outcomeCode` as nullable; older receipt versions are invalid.
120
167
 
121
168
  Receipt integrity verification and evidence verification are independent.
122
- `receipt_integrity=verified/v15/sha256` means Clio called the receipt verifier
169
+ `receipt_integrity=verified/v19/sha256` means Clio called the receipt verifier
123
170
  against the ledger envelope; merely finding an embedded digest is not enough.
124
171
  `evidence_verification=<verified|unverified|not_applicable|unknown>/<basis>`
125
172
  describes validation evidence inside that verified receipt. Likewise,
@@ -130,7 +177,7 @@ separately and never substitute one hash for another.
130
177
 
131
178
  The evidence bundle renders these sets in `transcript.md` (human sentences) and `trace.cleaned.jsonl` (structured run rows), `clio-coder evidence inspect` prints them as a `provenance <runId>:` block, and the `dispatch` tool appends a compact suffix to each run line plus additive keys on `details.runs[]`. A timed-out or denied escalation also raises an `escalation` finding in the bundle.
132
179
 
133
- The base provenance sets, steering, routing, quality, worker identity, and result-conformance coverage all enter in v0.2.9. These fields are labeled `experimental`: their strict v15 shape is frozen for the release, but the labels stay experimental until the schema is promoted post-1.0. For the complete version registry and migration contract across all artifacts, see [artifact-versions.md](artifact-versions.md).
180
+ The base provenance sets, steering, routing, quality, worker identity, result-conformance, council provenance, and fleet gate provenance use the strict v19 shape frozen for the release. These fields are labeled `experimental` until the schema is promoted post-1.0. For the complete version registry and migration contract across all artifacts, see [artifact-versions.md](artifact-versions.md).
134
181
 
135
182
  | Field path | Type | When present | Meaning | Status |
136
183
  | --- | --- | --- | --- | --- |
@@ -149,7 +196,7 @@ The base provenance sets, steering, routing, quality, worker identity, and resul
149
196
  | `steering[].sentAt` | `string` | A steer was successfully written | Write timestamp | experimental |
150
197
  | `steering[].acknowledged` | `boolean` | A steer was successfully written | Whether a worker acknowledgement was actually observed | experimental |
151
198
  | `steering[].acknowledgedAt` | `string` | Acknowledgement was observed | Acknowledgement timestamp | experimental |
152
- | `outcomeCode` | five-value stable string union or `null` | Every v15 terminal receipt | Non-null for `vram_capacity_fit_failure`, `worker_tool_call_cap_exhausted`, `loop_guard_tools_disabled_exhausted`, `result_contract_exhausted`, or `worker_final_output_missing`; otherwise `null`. Each non-null code denotes terminal deterministic failure and is incompatible with `outcome: "succeeded"`. Dispatch retry policy consumes this code only, never diagnostic prose. | experimental |
199
+ | `outcomeCode` | six-value stable string union or `null` | Every v19 terminal receipt | Non-null for `vram_capacity_fit_failure`, `worker_tool_call_cap_exhausted`, `loop_guard_tools_disabled_exhausted`, `result_contract_exhausted`, `worker_final_output_missing`, or `host_verification_rejected`; otherwise `null`. Each non-null code denotes terminal deterministic failure and is incompatible with `outcome: "succeeded"`. Dispatch retry policy consumes this code only, never diagnostic prose. | experimental |
153
200
  | `personaOverride.promptHash` | `string` | Ad-hoc specialist whose persona replaced the recipe body | Hash of the composed static prompt; equals `staticCompositionHash` for the run | experimental |
154
201
  | `safety.decisions.escalationRequested` | `number` | Run saw at least one permission escalation | Parked permission asks handed to the operator | experimental |
155
202
  | `safety.decisions.escalationApproved` | `number` | Run saw at least one permission escalation | Escalations the operator approved | experimental |
@@ -159,8 +206,8 @@ The base provenance sets, steering, routing, quality, worker identity, and resul
159
206
  | `safety.toolTelemetry.ingestionErrors` | `number` | Current dispatch receipts | Malformed or lost frames, event-fold/source errors, and drain timeouts that make otherwise mediated telemetry incomplete | experimental |
160
207
  | `safety.toolTelemetry.unfinished` | `{ tool, count }[]` | Current dispatch receipts | Tool starts that had no matching finish when the receipt sealed | experimental |
161
208
  | `safety.toolTelemetry.workspaceMutationPossible` | `boolean` | Current dispatch receipts | Whether incomplete or unavailable telemetry could conceal a shared-workspace mutation; retry admission fails closed when true | experimental |
162
- | `autonomyEnforcement.grade` | `string` | Always in v0.3.4 | The autonomy grade level enforced for the run | experimental |
163
- | `autonomyEnforcement.autonomy` | `string` | Always in v0.3.4 | The effective autonomy level name (e.g. auto-edit, suggest, read-only, full-auto) | experimental |
209
+ | `autonomyEnforcement.grade` | `string` | Always in v0.3.7 | The autonomy grade level enforced for the run | experimental |
210
+ | `autonomyEnforcement.autonomy` | `string` | Always in v0.3.7 | The effective autonomy level name (e.g. auto-edit, suggest, read-only, full-auto) | experimental |
164
211
  | `autonomyEnforcement.externalMode` | `string` | When running external worker | The execution mode of the external worker runtime | experimental |
165
212
  | `autonomyEnforcement.dangerousBypass` | `boolean` | When running external worker | Whether a safety bypass was explicitly activated | experimental |
166
213
  | `validationGrounding.claimed` | `number` | Validation grounding evaluated | Count of validations claimed by worker | experimental |
@@ -1,6 +1,6 @@
1
1
  # Proactive task memory
2
2
 
3
- > **Interactive Spec Available:** An interactive memory lifecycle dashboard and simulator is located at [docs/html/memory_blueprint.html](html/memory_blueprint.html) (Version: 0.3.4).
3
+ > **Interactive Spec Available:** An interactive memory lifecycle dashboard and simulator is located at [docs/html/memory_blueprint.html](html/memory_blueprint.html) (Version: 0.3.7).
4
4
 
5
5
  Clio's proactive task memory protects long-running work from behavioral state
6
6
  decay: a requirement, environment fact, failed attempt, or diagnosis can still
@@ -133,7 +133,7 @@ it runs detached from it.
133
133
  | Interval | After `memory.intervention.everyNTools` completed tools since the last prompted step; default 10. This is the nondeterministic/citation-gated path. |
134
134
  | Tool-error streak | Two consecutive error outcomes. A successful tool resets the streak. |
135
135
  | Loop signal | Reuses the orchestrator loop guard's verdict; it does not infer a second competing loop detector. |
136
- | Repeated failure | The rules tier records failed tool fingerprints and annotates the failing tool result once the same failure appears twice in the bounded trajectory. |
136
+ | Repeated failure | The rules tier records failed operation fingerprints and annotates the failing tool result once the same failure appears twice in the bounded trajectory. |
137
137
  | Post-compaction | The first turn start after compaction restores status and knowledge once, without a model call, because compaction is precisely where execution facts leave the active window. |
138
138
 
139
139
  ### Two delivery channels
@@ -145,11 +145,13 @@ repeated failure uses exactly one of them:
145
145
 
146
146
  - **Mid-turn annotation.** The second identical failure appends one cited
147
147
  `Memory:` advisory to that tool's own result, through the existing
148
- `annotate_tool_result` effect the loop guard already uses. The advisory digest
149
- takes the first line of the tool error that names a problem, falling back to
150
- the first line when no line names one. The model reads it on its very next round.
151
- This is spent once per fingerprint per turn and re-earned in a later turn, because
152
- the same command failing again after an operator turn is news again.
148
+ `annotate_tool_result` effect the loop guard already uses. The advisory uses
149
+ the canonical result-disposition digest when one is available. Older hook
150
+ producers fall back to the first tool-error line that names a problem. Every
151
+ digest is redacted and byte-capped before it reaches the task bank. The model
152
+ reads the advisory on its very next round. This is spent once per operation
153
+ fingerprint per turn and re-earned in a later turn, because the same command
154
+ failing again after an operator turn is news again.
153
155
  - **Next-turn reminder.** Post-compaction reactivation and any background-model
154
156
  reminder ride the `inject_reminder` buffer into the next submitted turn, inside
155
157
  the visible `<system-reminder>` block, and persist in the session ledger.
@@ -319,15 +321,23 @@ operation while leaving deterministic protection active.
319
321
  Measured on the shipped prompt against `google/gemma-4-26b-a4b-qat`, across ten
320
322
  live steps and forty controlled runs on the same route.
321
323
 
322
- The tier writes `update_status` reliably and `save_knowledge` rarely, and that is
323
- correct rather than broken. A trajectory step carries the tool name, a bounded
324
- call description, an outcome, and a result digest. On success the digest is an
325
- opaque result fingerprint, so a window of successful reads tells the model which
326
- files were touched and nothing about what is in them. There is no durable fact in
327
- that input, and a status line is the only faithful thing to write about it.
328
-
329
- Three candidate causes were ruled out by controlled runs that changed one
330
- variable at a time:
324
+ Earlier measurements found that the tier wrote `update_status` reliably and
325
+ `save_knowledge` rarely. At that time a successful trajectory step carried an
326
+ opaque result fingerprint, so a window of successful reads told the model which
327
+ files were touched and nothing about what was in them.
328
+
329
+ A current trajectory step keeps two fields with different jobs. The operation
330
+ fingerprint identifies repeated calls and remains derived only from the tool name
331
+ and arguments. The result digest is human-readable diagnostic content from the
332
+ canonical result-disposition projection, with explicit source provenance. Secret
333
+ redaction and a 240-byte cap apply before the digest reaches the task bank or the
334
+ background request. A metadata-only disposition contributes outcome facts and no
335
+ captured body. Results without a canonical disposition use a redacted deterministic
336
+ fallback, so older tool producers remain useful without gaining a second model
337
+ summarizer.
338
+
339
+ Three candidate causes were ruled out in the earlier implementation by
340
+ controlled runs that changed one variable at a time:
331
341
 
332
342
  - rewriting the prompt's second worked example to carry a `save_knowledge` moved
333
343
  nothing, and made the model emit no operations at all in four of five runs;
@@ -1,7 +1,7 @@
1
1
  # Prompt Envelope and Tools
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/tools_blueprint.html](html/tools_blueprint.html) (Version: 0.3.4).
4
+ > **Interactive Spec Available:** An interactive dashboard is located at [docs/html/tools_blueprint.html](html/tools_blueprint.html) (Version: 0.3.7).
5
5
 
6
6
  Clio Coder keeps the model-facing envelope stable and moves enforcement into the runtime registry and safety policy.
7
7
 
@@ -78,6 +78,8 @@ Three tools sit in a plane for containment rather than class. `git` is read-only
78
78
 
79
79
  Registration is conditional on wiring: `context` gains its workspace scope only when a session contract is bound, `dispatch`/`monitor`/`steer` register only with a dispatch contract, and `ask_user` registers only when an interactive handler exists. Dispatch tool profiles narrow the surface for workers: `minimal-local` is `read`, `grep`, `find`, `ls`, `git`, `context`, `code_nav`; `science-local` adds `verify`; `full-agent` keeps everything.
80
80
 
81
+ `ask_user` keeps its typed `exposure: local | outward` admission fact separate from caller prose. The registry uses exposure only in the enforced autonomy mapping. After admission, the host carries the normalized fact into the shared decision-presentation classifier; question text, headers, options, summaries, and requested color or severity words cannot select a consequence tier. The resulting presentation object contains no admission disposition and cannot grant authority.
82
+
81
83
  ### Consolidated call shapes
82
84
 
83
85
  Several tools absorb what used to be separate tools:
@@ -87,7 +89,7 @@ Several tools absorb what used to be separate tools:
87
89
  - `context(scope="workspace"|"docs"|"skills")` is the one OBSERVE entry point for material about the working environment: the session workspace snapshot, retrieval over Clio's bundled documentation (`query` required), and skill listing or loading (`name` optional, `include_tree` for the skill's resource files).
88
90
  - `verify(check?, path?, args?, browser?, cwd?, timeout_ms?)` runs declared verification. `verify()` lists package.json verification scripts and strict version-1 `.clio-coder/verifiers.yaml` entries through the same `{id, description, command, cwd, timeoutMs, tags, source}` projection. `verify(check="<id>")` runs a package script or the catalog's exact argv/cwd/timeout through safe-exec with no shell. Model `args`, cwd, timeout, output-cap, and environment fields cannot mutate a project entry. `verify(check="frontend", path=...)` validates an HTML/CSS/JS artifact without granting shell access.
89
91
  - `artifact(kind="plan"|"review"|"report", content, ...)` writes named artifacts behind one surface: Markdown documents (default `.clio-coder/artifacts/PLAN.md`/`REVIEW.md`/`REPORT.md`; `path` may override inside the workspace) that terminate the turn, because writing the artifact is the answer. Skills are not artifacts; a `SKILL.md` is written with the ordinary write tool and validated by the skills loader.
90
- - `dispatch(task?, tasks?, mode?, ...)` supports a first-class singular assignment (`task`) and a batch (`tasks`), never both. `task` is worker instructions; `briefing` is optional bounded parent context/data and cannot replace it. Briefing stays a separate dynamic message and receipt provenance, never part of the receipt task. A shared top-level briefing applies to strings and objects without an override; an object-level briefing wins. Blank values are omitted, the cap is 12,000 UTF-8 bytes, and approval pins the exact canonical value. Ordinary handles enter one registered event consumer immediately. Synchronous calls auto-wait for stream-and-receipt completion; `detach:true` returns ids after durable batch registration while the same consumer continues. Review and compete retain gate-sensitive direct drains. Task objects may include `persona` and `tool_profile`. Pipeline output is threaded as bounded data. A successful native or ACP run requires a nonempty receipt-sealed final output; exit zero without one fails as `worker_final_output_missing`, with unfinished text retained only as partial diagnostics. `dispatch(list=true)` renders the catalog.
92
+ - `dispatch(task?, tasks?, mode?, ...)` supports a first-class singular assignment (`task`) and a batch (`tasks`), never both. `task` is worker instructions; `briefing` is optional bounded parent context/data and cannot replace it. Briefing stays a separate dynamic message and receipt provenance, never part of the receipt task. A shared top-level briefing applies to strings and objects without an override; an object-level briefing wins. Blank values are omitted, the cap is 12,000 UTF-8 bytes, and approval pins the exact canonical value. Ordinary handles enter one registered event consumer immediately. Synchronous calls auto-wait for stream-and-receipt completion; `detach:true` returns ids after durable batch registration while the same consumer continues. Review and compete retain gate-sensitive direct drains. Task objects may include `persona`, `tool_profile`, and a typed `budget: {toolCalls, readReserve, retryRevision?}`. The budget must fit the recipe's authored range and the operator lifetime cap. `retryRevision` is the only authority for a later retry, result-contract revision, or review revision to grow its phase. Pipeline output is threaded as bounded data. A successful native or ACP run requires a nonempty receipt-sealed final output; exit zero without one fails as `worker_final_output_missing`, with unfinished text retained only as partial diagnostics. `dispatch(list=true)` renders the catalog.
91
93
  - `monitor(run_id?, mode?)` is read-only visibility into known synchronous and detached runs: `list` enumerates, `status` reports one, `peek` returns the in-process event tail, `receipt` exposes the stored evidence, and `wait` observes one run without collecting or canceling it. `collect` is the authoritative terminal batch operation over a detached batch or run-id list; collect before final synthesis. Completed output reports receipt integrity, evidence verification, briefing provenance, and bounded project-context provenance as different fields.
92
94
  - `steer(run_id, action, message?)` controls a running worker: `guide` writes a canonical trimmed steering message to an HTTP or SDK worker and `cancel` terminates it. Successfully written steers gain ordered byte/hash/timestamp provenance; after the runtime accepts the guidance, `clio_steer_received` acknowledges the exact matching sequence, and prose is never stored in ledger or receipt. Single-shot subprocess runtimes and ACP remain non-steerable. Interactive operators can steer synchronous live-input runs; parent-model steering requires detached ids because model tools are sequential.
93
95
 
@@ -1,7 +1,7 @@
1
1
  # Provider Adapter Cookbook
2
2
 
3
3
  > [!TIP]
4
- > **Interactive Spec Available:** An interactive runtime adapter descriptor builder and probe sequence capability checklist is located at [docs/html/provider_adapter_blueprint.html](html/provider_adapter_blueprint.html) (Version: 0.3.4).
4
+ > **Interactive Spec Available:** An interactive runtime adapter descriptor builder and probe sequence capability checklist is located at [docs/html/provider_adapter_blueprint.html](html/provider_adapter_blueprint.html) (Version: 0.3.7).
5
5
 
6
6
  This cookbook guides developers through implementing custom model runtimes and inference server integrations within Clio Coder. It explains the runtime descriptor interfaces, probing protocols, model synthesis, and how to configure reasoning and thinking behaviors.
7
7
 
@@ -1,6 +1,6 @@
1
- # v0.3.4 Release-Cut Checklist
1
+ # v0.3.7 Release-Cut Checklist
2
2
 
3
- The ordered steps that turn the prepared `v0.3.4` branch into a published
3
+ The ordered steps that turn the prepared `v0.3.7` branch into a published
4
4
  release. Everything above the line marked **AUTHORIZATION BOUNDARY** is
5
5
  repeatable and reversible and is run locally before the cut. Everything below
6
6
  it is external or irreversible and needs an explicit decision from the
@@ -11,13 +11,15 @@ state of every step.
11
11
 
12
12
  | Item | State |
13
13
  | --- | --- |
14
- | Branch | `v0.3.4`; `origin/v0.3.4` exists and is pushed to the reviewed tip before the cut |
15
- | `package.json` version | `0.3.4`; the top `CHANGELOG.md` heading is `## 0.3.4 - 2026-08-22` |
16
- | `main` | `8a1c8304`, the published `v0.3.3` commit; it is an ancestor of `v0.3.4` and moves only at Part 4. |
17
- | `origin/main` | `8a1c8304`, matching the published `v0.3.3` commit |
18
- | Tags | none for 0.3.4, local or remote |
19
- | GitHub Release | none for 0.3.4 |
20
- | npm registry | `@iowarp/clio-coder@0.3.4` absent; `latest` is `0.3.3` |
14
+ | Branch | `v0.3.7`, pushed to `origin` under the explicit refspec `refs/heads/v0.3.7`; sixteen feature and docs commits, the version-bump commit, and the fix commits the interactive release testing produced, ahead of `main` |
15
+ | `package.json` version | `0.3.7`; the top `CHANGELOG.md` heading is `## 0.3.7 - 2026-08-24` |
16
+ | `main` | `9b54219d`, the v0.3.6 release SHA; it is an ancestor of `v0.3.7` and moves only at Part 4 |
17
+ | `origin/main` | `9b54219d`, matching `main` |
18
+ | Tags | `v0.3.6` exists on `9b54219d`; none for 0.3.7, local or remote |
19
+ | GitHub Release | `v0.3.6` published 2026-08-24; none for 0.3.7 |
20
+ | npm registry | `@iowarp/clio-coder@0.3.7` absent; `latest` is `0.3.6` |
21
+ | npm history | Published versions 0.3.0 through 0.3.4 and 0.3.6. Version 0.3.5 was published and withdrawn and can never be reused. |
22
+ | Milestone | `v0.3.7` holds the thirteen issues this branch closes (#155, #204, #206 through #216); the ten off-map items (#156, #158 through #164, #198, #199) moved to `v0.3.8` on 2026-08-24 |
21
23
  | Commit provenance identity | Post-release maintainer follow-up, not a gate: verifying `clio-coder@iowarp.ai` on IOWarp-controlled GitHub and GitLab identities (such as `clio-coder-bot` or `iowarp-clio`, with `assets/clio-coder-avatar-512.png` as the avatar) only changes how those platforms render the trailers. |
22
24
 
23
25
  ---
@@ -38,8 +40,9 @@ Run against the exact final candidate with `NO_COLOR` unset and
38
40
  integrity, version coherence between `package.json` and the top
39
41
  `CHANGELOG.md` heading, the forbidden-file list, the required runtime
40
42
  resources, and the tarball and unpacked size budgets)
41
- 9. Step 8 again under the other supported Node major. Both Node 22 and
42
- Node 24 must be green; the repo is developed against 22.22.3 and 24.9.0.
43
+ 9. Optional: step 8 again under Node 24. Hosted CI gates on Node 22 alone,
44
+ the `engines` floor; the weekly `flake-hunt` workflow carries Node 24.
45
+ Repeat locally only when the cut touches runtime-sensitive code.
43
46
  10. `npm run live:smoke -- --target <id>` for one real headless turn through
44
47
  the built binary against a configured target, which is the one release
45
48
  check a deterministic suite cannot give. The packaged-install lifecycle
@@ -51,35 +54,50 @@ Run against the exact final candidate with `NO_COLOR` unset and
51
54
  `docs/html/`, `apps/workbench`, `.superpowers`, `tests/`, `scripts/`,
52
55
  `benchmarks/`, scratch files, and source maps are absent. Record the
53
56
  filename, packed and unpacked sizes, integrity, and shasum.
54
- 12. Install that tarball into a clean temporary prefix with empty XDG roots and
55
- verify `--version`, `--help`, an empty-state non-TTY launch, `doctor`, and
56
- `uninstall --dry-run` without developer-local state.
57
+ 12. Install that tarball into a clean temporary prefix with an empty
58
+ `CLIO_CODER_HOME` and verify `--version`, `--help`, an empty-state non-TTY
59
+ launch, `doctor`, and `uninstall --dry-run` without developer-local state.
60
+ 13. Interactive release testing, which this cut added because the release is
61
+ almost entirely interactive surface: a tester agent drives the step-12
62
+ install through real TUI sessions in a throwaway repository, one session
63
+ per shipped feature, against local targets for the main session and a
64
+ cloud target for council members and advice, and writes a per-feature
65
+ PASS / FAIL / BLOCKED table with evidence. A FAIL on a deterministic
66
+ behavior (a refusal, a file, a receipt field, CLI output) blocks the cut;
67
+ a BLOCKED(model) on a model decision does not.
57
68
 
58
69
  ## Part 2: version and notes (repeatable)
59
70
 
60
- 13. Files carrying a version reference, to update together if the number
61
- changes: `package.json` and `package-lock.json`, the `## 0.3.4 - <date>`
62
- heading in `CHANGELOG.md`, the `(Version: 0.3.4)` markers in `docs/*.md`,
63
- the `Blueprint (v0.3.4)` titles in `docs/html/*.html`, the `--branch`
71
+ 14. Files carrying a version reference, to update together if the number
72
+ changes: `package.json` and `package-lock.json`, the `## 0.3.7 - <date>`
73
+ heading in `CHANGELOG.md`, the `(Version: 0.3.7)` markers in `docs/*.md`,
74
+ the `Blueprint (v0.3.7)` titles in `docs/html/*.html`, the `--branch`
64
75
  pin in the README install block (the hygiene lint checks it), and the
65
76
  measured-at figures in `scripts/check-release.mjs` if the package size
66
- moved materially.
67
- 14. Confirm the `## 0.3.4` section of `CHANGELOG.md` describes every
68
- user-visible behavior change, including the ones that alter existing
69
- behavior, and carries no Workbench release narrative. The release workflow
70
- uses this section verbatim as the GitHub Release body.
71
- 15. Re-run `npm run ci:release` after any version edit and commit as one
72
- commit on `v0.3.4`.
77
+ moved materially. For 0.3.7 the tarball measured 6.5 MB packed and
78
+ 37.9 MB unpacked, inside the 10 MB and 50 MB ceilings set for 0.3.6.
79
+ 15. Confirm the `## 0.3.7` section of `CHANGELOG.md` describes every
80
+ user-visible behavior change under `### Added`, and every change to an
81
+ existing behavior under `### Changed`, and carries no Workbench release
82
+ narrative. The release workflow uses this section verbatim as the GitHub
83
+ Release body.
84
+ 16. `docs/artifact-versions.md` lists every persisted artifact this release
85
+ added or re-versioned: run receipt integrity v19, fleet contract v5, the
86
+ fleet run record, the checkout writer lease, the out-of-turn usage ledger,
87
+ and the library pin file.
88
+ 17. Re-run `npm run ci:release` after any version edit and commit as one
89
+ commit on `v0.3.7`.
73
90
 
74
91
  ## Part 3: present the gate
75
92
 
76
- 16. Report to the operator before touching `main`: the exact final `v0.3.4`
93
+ 18. Report to the operator before touching `main`: the exact final `v0.3.7`
77
94
  SHA and clean status, the commits added since the handoff SHA, the gate
78
- commands with pass/fail totals for both Node majors, the package version
79
- and changelog heading, the tarball audit, the clean-install results and any
80
- deferred live check, confirmation that no tag, GitHub Release, or npm
81
- version exists yet, the proposed commands for Parts 4 through 6, and the
82
- proposed npm dist-tag. The dist-tag is the operator's call; never guess it.
95
+ commands with pass/fail totals, the package version and changelog heading,
96
+ the tarball audit, the clean-install results, the interactive test table,
97
+ and any deferred live check, confirmation that no tag, GitHub Release, or
98
+ npm version exists yet, the proposed commands for Parts 4 through 6, and
99
+ the npm dist-tag. The dist-tag is the operator's call; for 0.3.7 the
100
+ operator chose `latest` on 2026-08-24.
83
101
 
84
102
  ---
85
103
 
@@ -91,53 +109,53 @@ confirming the exact SHA and the commands.
91
109
 
92
110
  ## Part 4: fast-forward `main`
93
111
 
94
- 17. `git fetch origin` immediately before integrating; require `origin/main`
95
- to be an ancestor of the reviewed `v0.3.4` tip and confirm no other
112
+ 19. `git fetch origin` immediately before integrating; require `origin/main`
113
+ to be an ancestor of the reviewed `v0.3.7` tip and confirm no other
96
114
  worktree has `main` checked out.
97
- 18. `git checkout main && git merge --ff-only v0.3.4`. No merge commit, no
115
+ 20. `git checkout main && git merge --ff-only v0.3.7`. No merge commit, no
98
116
  rebase, no reset. Verify `main` equals the reviewed SHA and is clean.
99
- 19. `git fetch origin` once more; stop on any unexpected remote movement. Then
100
- `git push origin main`. Never `--force` or `--force-with-lease`.
117
+ 21. `git fetch origin` once more; stop on any unexpected remote movement. Then
118
+ `git push origin main`. Never `--force` or `--force-with-lease`. The push
119
+ closes the thirteen milestone issues through their `Fixes` trailers.
101
120
 
102
121
  ## Part 5: exact-SHA CI, tag, GitHub Release
103
122
 
104
- 20. Wait for the `ci` workflow the `main` push triggers. Both the Node 22 and
105
- Node 24 jobs must succeed on the exact release SHA. A red or pending run
106
- blocks the tag; a flake is rerun only with concrete evidence, never
107
- silenced with an unrelated change.
108
- 21. Reconfirm that tag `v0.3.4` and the GitHub Release do not exist, then
109
- `git tag -a v0.3.4 -m "Clio Coder 0.3.4"` on the green SHA and
110
- `git push origin v0.3.4`.
111
- 22. The tag push triggers `.github/workflows/release.yml`, which requires a
112
- successful `ci` run for the tagged SHA, verifies the tag matches
113
- `package.json`, builds and audits the artifact, extracts the `## 0.3.4`
114
- section of `CHANGELOG.md` as the release body, and attaches the tarball.
115
- Do not create a release by hand. Verify the run's SHA, the notes, the
116
- attached tarball, and the URL.
123
+ 22. The `main` push triggers the `ci` workflow. It is a useful signal but not
124
+ a gate on tagging, because `release.yml` runs the same gate on the tagged
125
+ tree itself. A red run still blocks the cut; investigate it rather than
126
+ tagging around it, and never silence a flake with an unrelated change.
127
+ 23. Reconfirm that tag `v0.3.7` and the GitHub Release do not exist, then
128
+ `git tag -a v0.3.7 -m "Clio Coder 0.3.7"` on the green SHA and
129
+ `git push origin refs/tags/v0.3.7`.
130
+ 24. The tag push triggers `.github/workflows/release.yml`, which verifies the
131
+ tag matches `package.json`, runs `npm run ci:release` on the tagged tree,
132
+ extracts the `## 0.3.7` section of `CHANGELOG.md` as the release body, and
133
+ attaches the tarball. Do not create a release by hand. Verify the run's
134
+ SHA, the notes, the attached tarball, and the URL.
117
135
 
118
136
  ## Part 6: npm publication (irreversible)
119
137
 
120
- 23. `npm whoami` and confirm the registry and account; reconfirm
121
- `@iowarp/clio-coder@0.3.4` is still absent.
122
- 24. Obtain the operator's explicit dist-tag decision. `latest` makes this the
123
- default install for every user; `--tag next` keeps `0.3.3` as the default.
124
- 25. Run `npm publish` (or `npm publish --tag next`) once. `prepublishOnly`
125
- re-runs `ci:release` as a safety net; it is not a substitute for Part 1.
126
- 26. A published version cannot be replaced. `npm unpublish` is restricted and
138
+ 25. `npm whoami` and confirm the registry and account; reconfirm
139
+ `@iowarp/clio-coder@0.3.7` is still absent.
140
+ 26. Obtain the operator's explicit dist-tag decision. `latest` makes this the
141
+ default install for every user; `--tag next` keeps `0.3.6` as the default.
142
+ 27. Run `npm publish` once. `prepublishOnly` re-runs `ci:release` as a safety
143
+ net; it is not a substitute for Part 1.
144
+ 28. A published version cannot be replaced. `npm unpublish` is restricted and
127
145
  time-limited; a mistake is corrected by publishing a higher version.
128
146
 
129
147
  ## Part 7: post-publish verification and follow-ups
130
148
 
131
- 27. `npm view @iowarp/clio-coder@0.3.4` and the selected dist-tag.
132
- 28. On a clean machine, `npm install -g @iowarp/clio-coder` from the registry
149
+ 29. `npm view @iowarp/clio-coder@0.3.7` and the selected dist-tag.
150
+ 30. On a clean machine, `npm install -g @iowarp/clio-coder` from the registry
133
151
  rather than from a local tarball, then repeat step 12 against it, plus
134
152
  `configure` to a real target and one real turn when one is authorized.
135
153
  This is the only step that tests what users actually receive.
136
- 29. From an installation of 0.3.3, verify `clio-coder upgrade` finds and
137
- applies 0.3.4.
138
- 30. Record the SHA, CI URL, tag, GitHub Release URL, npm version and dist-tag,
154
+ 31. From an installation of 0.3.6, verify `clio-coder upgrade` finds and
155
+ applies 0.3.7.
156
+ 32. Record the SHA, CI URL, tag, GitHub Release URL, npm version and dist-tag,
139
157
  tarball evidence, and the post-publish verification in the release report.
140
- 31. Maintainer follow-up, independent of the release: verify the commit
158
+ 33. Maintainer follow-up, independent of the release: verify the commit
141
159
  provenance email `clio-coder@iowarp.ai` on IOWarp-controlled GitHub and
142
160
  GitLab identities such as `clio-coder-bot` or `iowarp-clio`, and upload
143
161
  `assets/clio-coder-avatar-512.png` as the account avatar where PNG is
@@ -150,7 +168,7 @@ confirming the exact SHA and the commands.
150
168
 
151
169
  ## Rollback
152
170
 
153
- There is no rollback for step 25. Before it, every step is reversible: steps
154
- 21 and 22 by deleting the local and remote tag and the draft release, steps 17
155
- through 19 by a new forward commit on `main` (never by rewriting it), and
171
+ There is no rollback for step 27. Before it, every step is reversible: steps
172
+ 23 and 24 by deleting the local and remote tag and the draft release, steps 19
173
+ through 21 by a new forward commit on `main` (never by rewriting it), and
156
174
  everything in Parts 1 and 2 by `git checkout`.
@@ -0,0 +1,59 @@
1
+ # Resource Library
2
+
3
+ The resource library extends the existing local skills marketplace catalog to carry agent recipes, prompt templates, and fleet contracts. It does not change the Agent Skills format, discovery roots, trust gating, or existing skill installation sources.
4
+
5
+ ## Catalog schema
6
+
7
+ A catalog is a JSON or YAML list, or an object whose `skills` property contains the list. The historical property name remains accepted so every existing skill marketplace index works unchanged.
8
+
9
+ ```yaml
10
+ skills:
11
+ - kind: fleet
12
+ name: release
13
+ description: Build and verify a release.
14
+ sourceUrl: ./fleets/release.md
15
+ requires:
16
+ - agent:release-builder
17
+ - skill:ship
18
+ ```
19
+
20
+ `kind` accepts `skill`, `agent`, `prompt`, or `fleet` and defaults to `skill`. `requires` accepts typed references with those same four prefixes. Clio resolves requirements recursively across the selected catalog and the private catalog. Missing, malformed, and cyclic requirements are refused with stable `library_requirement_*` diagnostics. A requirement is satisfied when its typed reference exists in `<configDir>/library-pins.yaml` or its kind-specific destination exists. Add output lists satisfied and unsatisfied requirements separately. Requirements are reported without installation unless `library add` receives `--with-requirements`. That flag installs only the unsatisfied dependencies in dependency order before the requested entry.
21
+
22
+ ## Private catalog and remote gating
23
+
24
+ `library.catalog` selects a private catalog and defaults to `<configDir>/library.yaml`. Relative sources in that file resolve beside the catalog. `library.remote` records an optional git remote URL. `library.sync` defaults to false, and no git process is started while it remains false.
25
+
26
+ The private catalog repository must name its git remote `library`. Clio checks it with `git remote get-url library`. Run `clio-coder library remote confirm <url>` once after reviewing the configured URL. When `library.remote` is unset, confirmation records the URL as both the configured and confirmed remote. A confirmation that differs from an existing `library.remote` refuses with `library_remote_mismatch`. A missing confirmation or a later settings change refuses synchronization and publishing with `library_remote_unconfirmed`.
27
+
28
+ When `library.sync` is false, both `library sync` and `library push` refuse with `library_sync_disabled` before any process starts. When synchronization is enabled, `library sync` runs `git fetch library` followed by `git merge --ff-only FETCH_HEAD`, and `library push` runs `git push library`. Both commands execute git as an argument vector without a shell.
29
+
30
+ ## CLI
31
+
32
+ ```text
33
+ clio-coder library list [--kind k] [--json]
34
+ clio-coder library search <query> [--kind k] [--json]
35
+ clio-coder library add <ref> [--from <catalog|path>] [--with-requirements] [--yes] [--json]
36
+ clio-coder library use <kind> <name>
37
+ clio-coder library push
38
+ clio-coder library sync
39
+ clio-coder library remote confirm <url>
40
+ ```
41
+
42
+ `library add` prints every destination and SHA-256 hash before it writes. It writes nothing until `--yes` is present. `library use` prints the invocation to paste into the relevant surface.
43
+
44
+ ## In the TUI
45
+
46
+ The Skills Hub carries one tab per kind. `/library <kind>` opens it on that kind's tab and `/library` alone opens it on Skills, which is also where `/skill` opens. Each tab lists the entries this same discovery finds, with the requirements an entry still needs named in the warning token. Installing from a row runs the same plan-then-write pair `library add` runs, behind a confirmation that states every destination and hash and writes nothing when it is cancelled, and an entry with unresolved requirements is refused by name before an install-with-requirements confirmation offers to write them all. `Enter` on an installed row leads where that kind is invoked from: the composer for an agent, a prompt, or a skill, and the `/fleet run` approval preview for a fleet. See [skills-marketplace.md](skills-marketplace.md) for the key table.
47
+
48
+ ## Installation roots and validation
49
+
50
+ | Kind | User installation root | Validation before write |
51
+ | --- | --- | --- |
52
+ | skill | `<configDir>/skills/<name>/SKILL.md` | Existing skill loader and installer |
53
+ | agent | `<configDir>/agents/<name>.md` | Agent recipe schema and policy |
54
+ | prompt | `<configDir>/prompts/<name>.md` | Prompt template loader |
55
+ | fleet | `<configDir>/fleets/<name>.md` | Fleet contract parser |
56
+
57
+ Every installed item records a kind-qualified hash in `<configDir>/library-pins.yaml`. Agent recipes become visible through `clio-coder agents`. User fleet contracts participate between built-in and project fleet precedence, so a project contract still wins. Prompts use the existing user prompt root.
58
+
59
+ Share archives may carry agent and fleet entries. Import always validates these formats before writing, and fleet entries land in the user fleet root.