@iowarp/clio-coder 0.4.1 → 0.4.3

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 (604) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/CONTRIBUTING.md +142 -52
  3. package/README.md +434 -473
  4. package/SECURITY.md +2 -1
  5. package/dist/{acp-ZILU3AUO.js → acp-H2NGRPWO.js} +12 -12
  6. package/dist/{agents-HYWGBGQR.js → agents-TL5LLUQP.js} +56 -55
  7. package/dist/assets/codewiki.json +1 -1
  8. package/dist/{auth-N3QT7CBO.js → auth-E5SW4HMS.js} +23 -21
  9. package/dist/builtins-IA7V7FUC.js +22 -0
  10. package/dist/{chunk-7RY5VZPH.js → chunk-2APPQIER.js} +8 -8
  11. package/dist/{chunk-72GZI5EV.js → chunk-2JH2WHGE.js} +2 -2
  12. package/dist/{chunk-JA5QWE4Z.js → chunk-2UG5F4C5.js} +1973 -1664
  13. package/dist/{chunk-5YHDIDBP.js → chunk-2UH2KFUP.js} +2 -2
  14. package/dist/{chunk-CTJ4RNAA.js → chunk-2VIKGWFZ.js} +2 -2
  15. package/dist/{chunk-I66EAJFY.js → chunk-2WZ546HR.js} +267 -232
  16. package/dist/{chunk-GIZNH63R.js → chunk-35MSIRKH.js} +9 -4
  17. package/dist/chunk-3EBYEESD.js +314 -0
  18. package/dist/{chunk-J5LZHVIT.js → chunk-3M6DQK6S.js} +113 -35
  19. package/dist/{chunk-RKSR6VSF.js → chunk-4IUZQIJ3.js} +29 -1
  20. package/dist/{chunk-6FN3E6KX.js → chunk-4O6MANBS.js} +2 -2
  21. package/dist/chunk-4UVU7BJ5.js +39 -0
  22. package/dist/{chunk-VKRH2TCS.js → chunk-4WR7VSYB.js} +2 -2
  23. package/dist/{chunk-BBTJOK6Y.js → chunk-54CBCGIR.js} +5 -5
  24. package/dist/{chunk-AP73CFDC.js → chunk-5ICU3EUH.js} +2 -2
  25. package/dist/chunk-5MEZN6CB.js +1334 -0
  26. package/dist/{chunk-O42A54GG.js → chunk-5OIVVPHF.js} +2 -2
  27. package/dist/{chunk-ABLSQ6JX.js → chunk-64I3JVYM.js} +8 -2
  28. package/dist/{chunk-AFKWHWXF.js → chunk-6PTFB5VS.js} +39 -22
  29. package/dist/{chunk-VN3SHNBN.js → chunk-7DICMOS6.js} +2 -2
  30. package/dist/chunk-7DRAWPTZ.js +360 -0
  31. package/dist/chunk-7E7I3WLS.js +3762 -0
  32. package/dist/{chunk-BJGUKIG4.js → chunk-7ZYNNDKC.js} +7 -7
  33. package/dist/{chunk-XKA2ICR3.js → chunk-AF4YM7Z4.js} +652 -252
  34. package/dist/{chunk-GVQJ5CCZ.js → chunk-AX2THNSA.js} +12 -12
  35. package/dist/{chunk-IG7BCQBA.js → chunk-B4OAX3SI.js} +65 -3
  36. package/dist/{chunk-TD3PGPQA.js → chunk-B4VEBZKF.js} +3 -3
  37. package/dist/{chunk-74YWRRU5.js → chunk-BEPZRGGU.js} +10 -10
  38. package/dist/{chunk-FEFIFZTL.js → chunk-CE5AX47J.js} +2 -2
  39. package/dist/{chunk-UAPGZHYC.js → chunk-DWUOQKRU.js} +25 -11
  40. package/dist/{chunk-THYWACCR.js → chunk-E3TPLWFX.js} +3 -3
  41. package/dist/{chunk-7EPLI7VL.js → chunk-EKCHAPYA.js} +2 -2
  42. package/dist/{chunk-HLW2MRKE.js → chunk-F4EKGO4N.js} +3 -1
  43. package/dist/{chunk-PJJ6MY27.js → chunk-F5JHEYZM.js} +7 -7
  44. package/dist/{chunk-6CCS4G3W.js → chunk-FTMGRKEF.js} +3 -3
  45. package/dist/{chunk-SINK3QR6.js → chunk-G76U63X4.js} +17 -17
  46. package/dist/{chunk-EIMVLWB3.js → chunk-GHS5EBTQ.js} +64 -9
  47. package/dist/{chunk-QMXC4JB7.js → chunk-GI7YYQ3F.js} +187 -1419
  48. package/dist/{chunk-TZSKNMZG.js → chunk-GTUD2WMY.js} +2 -1
  49. package/dist/{chunk-6HMJX2VU.js → chunk-GWZNEVM2.js} +44 -12
  50. package/dist/chunk-GYV6VZOC.js +26 -0
  51. package/dist/{chunk-MQXIVJ35.js → chunk-HAXOFFRH.js} +5 -5
  52. package/dist/{chunk-UXN6JT4W.js → chunk-HEQY7ZFI.js} +3 -3
  53. package/dist/{chunk-7PWAODYW.js → chunk-I7XBWTYH.js} +2 -2
  54. package/dist/{chunk-GCSMB2KY.js → chunk-I7ZPNEJM.js} +145 -102
  55. package/dist/{chunk-WNP7O5WZ.js → chunk-ID64D7PE.js} +4 -4
  56. package/dist/{chunk-QTFGO774.js → chunk-IGLP3ODT.js} +29 -16
  57. package/dist/chunk-IJNZMHLA.js +101 -0
  58. package/dist/{chunk-BDPT6GTK.js → chunk-INY6HTFL.js} +7 -7
  59. package/dist/{chunk-PBP4B7XR.js → chunk-IUE3Y34X.js} +2 -2
  60. package/dist/{chunk-6NJQITNH.js → chunk-IWT4SF4R.js} +6 -3
  61. package/dist/{chunk-R23Z6K6I.js → chunk-JDAY6FIL.js} +19 -19
  62. package/dist/chunk-JEQ3XTHC.js +42 -0
  63. package/dist/{chunk-FSP7CMNU.js → chunk-JGRC33J2.js} +50 -4
  64. package/dist/{chunk-TVH4ONAM.js → chunk-JKKCYP3C.js} +10 -10
  65. package/dist/{chunk-HJWWJ6IL.js → chunk-JSC3U7TI.js} +16 -4
  66. package/dist/{chunk-C537JADH.js → chunk-KK4JZPBQ.js} +19 -141
  67. package/dist/{chunk-K6BF4U2H.js → chunk-KKOJXO6R.js} +62 -14
  68. package/dist/{chunk-IHXBNWMM.js → chunk-KXDSS5WJ.js} +7 -3
  69. package/dist/{chunk-6DWBAZ5U.js → chunk-L47TF46W.js} +5 -7
  70. package/dist/{chunk-HUAS7ITX.js → chunk-LDJG7DW3.js} +91 -42
  71. package/dist/{chunk-CDNVLKUX.js → chunk-LLDJM5XK.js} +13 -7
  72. package/dist/{chunk-YPI3QQCF.js → chunk-MCEPRMZW.js} +2 -4
  73. package/dist/{chunk-Y4CAGMM6.js → chunk-MNJGS2IN.js} +5 -6
  74. package/dist/{chunk-VKFQTNDV.js → chunk-MUW2BDDH.js} +4 -4
  75. package/dist/{chunk-E67WX76H.js → chunk-MWUZBSAQ.js} +104 -152
  76. package/dist/{chunk-OJTRZGR3.js → chunk-N2Z7HLVY.js} +21 -21
  77. package/dist/{chunk-TVHHYFHE.js → chunk-NEDJ26B5.js} +2 -2
  78. package/dist/{chunk-FYUN5KZ3.js → chunk-NIQJ66N4.js} +21 -21
  79. package/dist/{chunk-U2WB7TZS.js → chunk-NMJXSHBJ.js} +97 -85
  80. package/dist/{chunk-CWVRRIEI.js → chunk-NZMNUPZZ.js} +2 -2
  81. package/dist/{chunk-VEGN6WIQ.js → chunk-O5CVSAG5.js} +3 -3
  82. package/dist/{chunk-MOPSG2X7.js → chunk-OML5D5V5.js} +8 -8
  83. package/dist/{chunk-2VG7KLYV.js → chunk-PAJQJ7BS.js} +5816 -3255
  84. package/dist/{chunk-ZW55JB7N.js → chunk-PUVDKJ2Y.js} +2 -2
  85. package/dist/{chunk-BTGG6BG2.js → chunk-QWGDJJYJ.js} +158 -19
  86. package/dist/chunk-R6Q67RJH.js +134 -0
  87. package/dist/{chunk-ZJLUDYFY.js → chunk-RRNP2ANY.js} +6 -6
  88. package/dist/{chunk-PVAMAVBB.js → chunk-RSJ25QSL.js} +102 -2
  89. package/dist/{chunk-NLFAQR7Z.js → chunk-S66XZJOF.js} +3 -23
  90. package/dist/chunk-SKHCAU7K.js +385 -0
  91. package/dist/chunk-SZAA6XDG.js +30 -0
  92. package/dist/{chunk-J4HBWF6Y.js → chunk-TM6LQDI3.js} +131 -28
  93. package/dist/chunk-UOIZ7DA4.js +41 -0
  94. package/dist/{chunk-MA3H6DM5.js → chunk-UPZU6GE4.js} +25 -3
  95. package/dist/{chunk-BWW4HLO4.js → chunk-UXCU4E3T.js} +8 -6
  96. package/dist/{chunk-N5UK64DP.js → chunk-V2ANDPVT.js} +4 -4
  97. package/dist/{chunk-AK5XEFVZ.js → chunk-VA5FNYMT.js} +26 -13
  98. package/dist/{chunk-6VC4OV3Z.js → chunk-VIA6RFQZ.js} +3 -11
  99. package/dist/{chunk-ZAZB4JMW.js → chunk-VKPAQYEB.js} +27 -8
  100. package/dist/{chunk-QKIFBZKT.js → chunk-VW6DOEDG.js} +497 -81
  101. package/dist/{chunk-SCYB3HA4.js → chunk-W6RRQCPQ.js} +63 -19
  102. package/dist/{chunk-2NM363SV.js → chunk-WBKFA554.js} +10 -10
  103. package/dist/{chunk-R32CLGZ6.js → chunk-WCXUNS7U.js} +82 -21
  104. package/dist/{chunk-GPPB3JBE.js → chunk-WRBAGUNF.js} +3 -3
  105. package/dist/{chunk-IXJT6DCX.js → chunk-XIVNBFZS.js} +85 -30
  106. package/dist/{chunk-UEDMSP56.js → chunk-XPWWI35G.js} +417 -201
  107. package/dist/chunk-XRZT5WY5.js +47 -0
  108. package/dist/{chunk-3QSOM6PA.js → chunk-Y3CBHOR6.js} +2 -2
  109. package/dist/{chunk-VXMFAE2W.js → chunk-YPC6ZR5L.js} +19 -6
  110. package/dist/{chunk-AKB4GYDL.js → chunk-YQWYVTMC.js} +5 -5
  111. package/dist/{chunk-6I5ILFOF.js → chunk-ZA4VCIGV.js} +3 -3
  112. package/dist/{chunk-7OBGU7UB.js → chunk-ZDN3Y73Y.js} +12 -18
  113. package/dist/{chunk-3I5NY75V.js → chunk-ZWPRK62N.js} +8 -5
  114. package/dist/cli/index.js +41 -39
  115. package/dist/{clio-IT3G3VQH.js → clio-CMMK4KRR.js} +9 -9
  116. package/dist/{code-nav-RK6S7F6E.js → code-nav-MDZNQS33.js} +89 -21
  117. package/dist/{components-UBWCQSRW.js → components-UCUQ4QXW.js} +4 -4
  118. package/dist/{config-3QZRWZJF.js → config-SVM5P5YI.js} +131 -84
  119. package/dist/{configure-FL7Y3KJF.js → configure-LE3IK2TJ.js} +28 -26
  120. package/dist/{context-5HE7ODYK.js → context-2OHRKS42.js} +69 -64
  121. package/dist/{context-KYQFRVDC.js → context-E3VC7RX5.js} +15 -11
  122. package/dist/{context-XNHL75JV.js → context-VNCR7KAG.js} +93 -65
  123. package/dist/{context-clear-N545L53A.js → context-clear-BW4O37TG.js} +64 -60
  124. package/dist/context-map-COB37XXN.js +505 -0
  125. package/dist/{context-working-set-QHKXSV2F.js → context-working-set-VDS25HXZ.js} +19 -18
  126. package/dist/{dispatch-runner-RGIE5PCT.js → dispatch-runner-5AHT53RF.js} +93 -82
  127. package/dist/{docs-5NAF6AU7.js → docs-PD3EXDKU.js} +21 -20
  128. package/dist/{doctor-ZGPEGHIP.js → doctor-WNNVO6FY.js} +48 -47
  129. package/dist/{eval-GXLL44RD.js → eval-7G7SGAYO.js} +287 -115
  130. package/dist/{eval-inventory-HBWSWQOK.js → eval-inventory-Y6QRFOH5.js} +4 -4
  131. package/dist/{evidence-HWLBRH3Q.js → evidence-VD6736FQ.js} +67 -64
  132. package/dist/{evolve-FTZBMNVW.js → evolve-AL3NGVRL.js} +65 -62
  133. package/dist/{extensions-VHRBEID7.js → extensions-MOVJ32NM.js} +9 -7
  134. package/dist/{fleet-CKZHJWZJ.js → fleet-QZHUMAGI.js} +114 -111
  135. package/dist/{fleet-commands-EXDXBMV6.js → fleet-commands-BAYT5FJZ.js} +10 -10
  136. package/dist/{fleet-decisions-OTHB6KRL.js → fleet-decisions-IREVMRU4.js} +7 -6
  137. package/dist/{fleet-graph-YTEZUCUT.js → fleet-graph-YCTT3HTI.js} +22 -19
  138. package/dist/{fleet-inspect-SS6YMDCK.js → fleet-inspect-QVJTDAVB.js} +58 -55
  139. package/dist/{fleet-preflight-PBY4VYOM.js → fleet-preflight-25QAFPK4.js} +4 -4
  140. package/dist/{fleet-validate-KMEM5L3S.js → fleet-validate-5O57AAJ7.js} +26 -23
  141. package/dist/{fleet-verify-QD5M7E7Q.js → fleet-verify-CPH2W2T6.js} +59 -56
  142. package/dist/{fleet-view-WAMJYNDT.js → fleet-view-SWBR3VGQ.js} +58 -55
  143. package/dist/{init-5XQRBOFV.js → init-J477LKZH.js} +82 -79
  144. package/dist/{interop-34TVO25M.js → interop-3FCM6XLG.js} +11 -11
  145. package/dist/{library-3QY6KF57.js → library-QUQEIUG6.js} +30 -27
  146. package/dist/{memory-L4UTIIIW.js → memory-SGGSEP65.js} +67 -64
  147. package/dist/{models-ZVX3QOWE.js → models-HEKUAXXK.js} +53 -46
  148. package/dist/{monitor-CEKVSYTS.js → monitor-HKU57TYQ.js} +63 -60
  149. package/dist/{orchestrator-77BAP6BC.js → orchestrator-VDFAEFAI.js} +1831 -1057
  150. package/dist/{panes-7STHOAUJ.js → panes-DN2SSFOH.js} +5 -5
  151. package/dist/{panes-SHAUIRXY.js → panes-TALGNPZT.js} +29 -14
  152. package/dist/{paths-L7LGY6RN.js → paths-NBMFAIEZ.js} +5 -5
  153. package/dist/reset-EAJFFJVB.js +344 -0
  154. package/dist/{resources-74GKTLSF.js → resources-OVKSEFVE.js} +29 -20
  155. package/dist/{run-HBAUJNNZ.js → run-7DP7ZF2J.js} +120 -115
  156. package/dist/{share-G3APVLVP.js → share-WML67FT3.js} +32 -27
  157. package/dist/{skills-35HHUKCR.js → skills-SG662R2K.js} +41 -31
  158. package/dist/{skills-eval-QN4HSHDC.js → skills-eval-VVZEUU46.js} +78 -77
  159. package/dist/{skills-inventory-J357J34F.js → skills-inventory-I2E23GET.js} +23 -20
  160. package/dist/{slash-commands-JZZCQA32.js → slash-commands-S7MBJDQK.js} +40 -36
  161. package/dist/{steer-XAVHJM22.js → steer-2LQOMCPB.js} +3 -3
  162. package/dist/{support-U7QOWY26.js → support-CC2UJBJ6.js} +6 -6
  163. package/dist/{targets-DSM6CY3M.js → targets-4QC3HIEW.js} +54 -54
  164. package/dist/{terminal-lease-JOPFUVEM.js → terminal-lease-TUHIJ6Y2.js} +5 -5
  165. package/dist/{tools-MKNWVPBH.js → tools-TFGJICCU.js} +10 -10
  166. package/dist/{trace-ECQ7TIYZ.js → trace-FXMXUZUF.js} +55 -7
  167. package/dist/uninstall-5PEVOE5B.js +408 -0
  168. package/dist/upgrade-M4WXY6KN.js +303 -0
  169. package/dist/{usage-X52N3IDJ.js → usage-N7ZNVLEM.js} +151 -104
  170. package/dist/{verifiers-EJTVVSMA.js → verifiers-DJTP4XX6.js} +15 -15
  171. package/dist/{verify-YJL6XET2.js → verify-RWE4PPEK.js} +9 -9
  172. package/dist/{web-fetch-MPIFL3LL.js → web-fetch-MPARV2K7.js} +2 -2
  173. package/dist/{wiki-generate-4NDZTQ4B.js → wiki-generate-C7IQOXSP.js} +89 -86
  174. package/dist/{with-panes-OBOBFIIR.js → with-panes-4GCGSL7J.js} +53 -257
  175. package/dist/worker/entry.js +90 -74
  176. package/docs/README.md +176 -81
  177. package/docs/{acp.md → architecture/acp.md} +36 -20
  178. package/docs/{alcf-provider.md → architecture/alcf-provider.md} +8 -5
  179. package/docs/{architecture.md → architecture/architecture.md} +43 -22
  180. package/docs/{artifact-placement.md → architecture/artifact-placement.md} +27 -23
  181. package/docs/architecture/artifact-versions.md +90 -0
  182. package/docs/{capacity-and-scheduling.md → architecture/capacity-and-scheduling.md} +26 -13
  183. package/docs/{context-engine.md → architecture/context-engine.md} +29 -25
  184. package/docs/{context-working-set.md → architecture/context-working-set.md} +13 -10
  185. package/docs/{dispatch-architecture-rationale.md → architecture/dispatch-architecture-rationale.md} +12 -9
  186. package/docs/{dispatch-typed-intent.md → architecture/dispatch-typed-intent.md} +68 -46
  187. package/docs/{evidence-and-memory.md → architecture/evidence-and-memory.md} +23 -16
  188. package/docs/{middleware-and-components.md → architecture/middleware-and-components.md} +11 -5
  189. package/docs/{model-catalog.md → architecture/model-catalog.md} +61 -27
  190. package/docs/{observability.md → architecture/observability.md} +38 -14
  191. package/docs/{pi-boundary.md → architecture/pi-boundary.md} +24 -11
  192. package/docs/{prompt-envelope-and-tools.md → architecture/prompt-envelope-and-tools.md} +57 -20
  193. package/docs/{provider-adapter-cookbook.md → architecture/provider-adapter-cookbook.md} +99 -25
  194. package/docs/{safety-model.md → architecture/safety-model.md} +35 -20
  195. package/docs/{session-lifecycle.md → architecture/session-lifecycle.md} +8 -5
  196. package/docs/architecture/time-conventions.md +125 -0
  197. package/docs/{trace-store.md → architecture/trace-store.md} +13 -5
  198. package/docs/{tui-design.md → architecture/tui-design.md} +13 -13
  199. package/docs/{worker-dispatch-mechanics.md → architecture/worker-dispatch-mechanics.md} +27 -30
  200. package/docs/{built-in-agents.md → guide/built-in-agents.md} +65 -35
  201. package/docs/{commands-and-modes.md → guide/commands-and-modes.md} +66 -61
  202. package/docs/{configuration-and-targets.md → guide/configuration-and-targets.md} +323 -297
  203. package/docs/guide/configuration-reference.md +1163 -0
  204. package/docs/{environment-variables.md → guide/environment-variables.md} +33 -28
  205. package/docs/{exit-codes-and-output.md → guide/exit-codes-and-output.md} +6 -3
  206. package/docs/{extensions-and-sharing.md → guide/extensions-and-sharing.md} +41 -14
  207. package/docs/{fleet-dispatch.md → guide/fleet-dispatch.md} +39 -43
  208. package/docs/{glossary.md → guide/glossary.md} +14 -11
  209. package/docs/{installation-and-lifecycle.md → guide/installation-and-lifecycle.md} +81 -17
  210. package/docs/guide/panes-and-files.md +290 -0
  211. package/docs/{proactive-memory.md → guide/proactive-memory.md} +131 -107
  212. package/docs/{resource-library.md → guide/resource-library.md} +13 -4
  213. package/docs/{skills-marketplace.md → guide/skills-marketplace.md} +25 -3
  214. package/docs/{tool-usage.md → guide/tool-usage.md} +87 -23
  215. package/docs/{troubleshooting.md → guide/troubleshooting.md} +9 -4
  216. package/docs/{config-knobs-audit.md → history/config-knobs-audit.md} +11 -11
  217. package/docs/{release-cut-checklist.md → history/release-cut-checklist.md} +29 -2
  218. package/docs/process/development-pipeline.md +152 -0
  219. package/docs/process/documentation-coverage.md +100 -0
  220. package/docs/process/documentation-guide.md +187 -0
  221. package/docs/{eval-runner.md → process/eval-runner.md} +108 -53
  222. package/docs/{evals-internal.md → process/evals-internal.md} +10 -10
  223. package/docs/{evolution.md → process/evolution.md} +2 -2
  224. package/docs/{fleet-demo-runbook.md → process/fleet-demo-runbook.md} +11 -7
  225. package/docs/{git-commit-provenance.md → process/git-commit-provenance.md} +11 -4
  226. package/docs/{performance-methodology.md → process/performance-methodology.md} +87 -69
  227. package/docs/{scientific-validation.md → process/scientific-validation.md} +4 -4
  228. package/evals/README.md +2 -2
  229. package/evals/behavioral-model.yaml +3 -2
  230. package/package.json +10 -8
  231. package/skills/README.md +52 -41
  232. package/skills/coding/ast-grep/SKILL.md +102 -31
  233. package/skills/coding/ast-grep/evals.md +26 -0
  234. package/skills/coding/coding-standards/SKILL.md +41 -6
  235. package/skills/coding/coding-standards/evals.md +23 -0
  236. package/skills/coding/prototype/SKILL.md +88 -29
  237. package/skills/coding/prototype/evals.md +19 -0
  238. package/skills/coding/tdd/SKILL.md +81 -54
  239. package/skills/coding/tdd/evals.md +20 -0
  240. package/skills/context/context-handoff/SKILL.md +44 -3
  241. package/skills/context/context-handoff/evals.md +44 -0
  242. package/skills/context/context-prime/SKILL.md +46 -16
  243. package/skills/context/context-prime/evals.md +45 -0
  244. package/skills/git/branch-closeout/SKILL.md +132 -0
  245. package/skills/git/branch-closeout/evals.md +133 -0
  246. package/skills/git/branch-closeout/references/closeout-checklist.md +81 -0
  247. package/skills/git/file-ticket/SKILL.md +78 -64
  248. package/skills/git/file-ticket/assets/issue-template.md +22 -0
  249. package/skills/git/file-ticket/evals.md +31 -26
  250. package/skills/git/file-ticket/references/issue-discovery.md +49 -0
  251. package/skills/git/fix-issue/SKILL.md +88 -65
  252. package/skills/git/fix-issue/evals.md +35 -31
  253. package/skills/git/fix-issue/references/diagnosis-and-rca.md +46 -0
  254. package/skills/git/resolve-merge-conflicts/SKILL.md +101 -52
  255. package/skills/git/resolve-merge-conflicts/evals.md +52 -25
  256. package/skills/git/resolve-merge-conflicts/references/conflict-matrix.md +126 -0
  257. package/skills/git/ship/SKILL.md +103 -67
  258. package/skills/git/ship/assets/pr-template.md +21 -0
  259. package/skills/git/ship/evals.md +44 -28
  260. package/skills/git/ship/references/remote-and-branch-policy.md +62 -0
  261. package/skills/git/worktree-create/SKILL.md +80 -50
  262. package/skills/git/worktree-create/evals.md +40 -33
  263. package/skills/git/worktree-create/references/worktree-setup.md +62 -66
  264. package/skills/git/worktree-merge/SKILL.md +112 -65
  265. package/skills/git/worktree-merge/evals.md +42 -34
  266. package/skills/git/worktree-merge/references/merge-strategies.md +52 -0
  267. package/skills/meta/clio-coder-dev/SKILL.md +9 -5
  268. package/skills/meta/clio-coder-dev/evals.md +3 -2
  269. package/skills/meta/clio-coder-test/SKILL.md +102 -95
  270. package/skills/meta/clio-coder-test/evals.md +9 -4
  271. package/skills/meta/clio-coder-test/references/harness.md +100 -124
  272. package/skills/meta/clio-coder-test/references/test-map.md +77 -50
  273. package/skills/meta/credentials/SKILL.md +2 -2
  274. package/skills/meta/find-skills/SKILL.md +2 -2
  275. package/skills/meta/herdr/SKILL.md +2 -2
  276. package/skills/meta/skill-craft/SKILL.md +22 -16
  277. package/skills/planning/archify/SKILL.md +196 -0
  278. package/skills/planning/archify/evals.md +65 -0
  279. package/skills/planning/architecture/SKILL.md +62 -13
  280. package/skills/planning/architecture/evals.md +65 -0
  281. package/skills/planning/backlog/SKILL.md +131 -15
  282. package/skills/planning/backlog/evals.md +142 -0
  283. package/skills/planning/prd/SKILL.md +47 -7
  284. package/skills/planning/prd/evals.md +54 -0
  285. package/skills/planning/product-intent/SKILL.md +58 -3
  286. package/skills/planning/product-intent/evals.md +70 -0
  287. package/skills/planning/tech-spec/SKILL.md +54 -3
  288. package/skills/planning/tech-spec/evals.md +73 -0
  289. package/skills/registry.yaml +70 -62
  290. package/skills/remote.yaml +13 -0
  291. package/skills/research/arxiv-literature/SKILL.md +77 -19
  292. package/skills/research/arxiv-literature/evals.md +50 -0
  293. package/skills/research/experiment-protocol/SKILL.md +21 -2
  294. package/skills/research/experiment-protocol/evals.md +23 -0
  295. package/skills/research/scientific-debugging/SKILL.md +24 -2
  296. package/skills/research/scientific-debugging/evals.md +18 -0
  297. package/skills/research/scientific-modernization/SKILL.md +27 -2
  298. package/skills/research/scientific-modernization/evals.md +27 -0
  299. package/skills/skill-marketplace.json +97 -62
  300. package/skills/workflow/cut-it/SKILL.md +66 -6
  301. package/skills/workflow/cut-it/evals.md +101 -0
  302. package/skills/workflow/design-council/SKILL.md +118 -28
  303. package/skills/workflow/design-council/evals.md +161 -0
  304. package/skills/workflow/grill-me/SKILL.md +87 -11
  305. package/skills/workflow/grill-me/evals.md +153 -0
  306. package/skills/workflow/workflow-distiller/SKILL.md +77 -18
  307. package/skills/workflow/workflow-distiller/evals.md +118 -0
  308. package/src/cli/args.ts +2 -2
  309. package/src/cli/bootstrap-generate.ts +1 -1
  310. package/src/cli/config-inspect.ts +65 -12
  311. package/src/cli/configure-interop.ts +105 -13
  312. package/src/cli/configure-oauth.ts +57 -0
  313. package/src/cli/configure-onboarding.ts +980 -0
  314. package/src/cli/configure-target.ts +594 -0
  315. package/src/cli/configure.ts +1082 -532
  316. package/src/cli/context-map.ts +114 -0
  317. package/src/cli/context.ts +4 -0
  318. package/src/cli/docs.ts +22 -14
  319. package/src/cli/doctor-naming.ts +5 -5
  320. package/src/cli/doctor-toolchain.ts +3 -3
  321. package/src/cli/eval.ts +1 -2
  322. package/src/cli/extensions.ts +2 -1
  323. package/src/cli/fleet.ts +1 -1
  324. package/src/cli/index.ts +3 -1
  325. package/src/cli/internal-dispatch.ts +3 -4
  326. package/src/cli/lifecycle-presenter.ts +436 -0
  327. package/src/cli/models.ts +10 -2
  328. package/src/cli/modes/print.ts +5 -1
  329. package/src/cli/panes.ts +19 -5
  330. package/src/cli/reset.ts +228 -106
  331. package/src/cli/run.ts +9 -4
  332. package/src/cli/select.ts +664 -0
  333. package/src/cli/share.ts +5 -1
  334. package/src/cli/skills-eval.ts +3 -3
  335. package/src/cli/skills.ts +9 -2
  336. package/src/cli/targets.ts +5 -6
  337. package/src/cli/trace.ts +55 -4
  338. package/src/cli/uninstall.ts +233 -165
  339. package/src/cli/upgrade.ts +204 -149
  340. package/src/cli/usage.ts +86 -27
  341. package/src/cli/validate-model.ts +3 -3
  342. package/src/cli/wiki-generate.ts +1 -1
  343. package/src/core/artifact-paths.ts +1 -1
  344. package/src/core/bash-exec.ts +131 -86
  345. package/src/core/bus-events.ts +51 -6
  346. package/src/core/config.ts +61 -1
  347. package/src/core/defaults.ts +7 -4
  348. package/src/core/dispatch-outcome.ts +16 -0
  349. package/src/core/external-diagnostic.ts +44 -0
  350. package/src/core/gateway-routing.ts +157 -0
  351. package/src/core/guardrails.ts +10 -49
  352. package/src/core/prompt-hint.ts +9 -0
  353. package/src/core/safe-exec.ts +17 -2
  354. package/src/core/skill-activation.ts +89 -2
  355. package/src/domains/agents/builtins/architect.md +2 -3
  356. package/src/domains/agents/builtins/coder.md +3 -2
  357. package/src/domains/agents/builtins/debugger.md +2 -2
  358. package/src/domains/agents/builtins/documenter.md +2 -2
  359. package/src/domains/agents/builtins/git-master.md +1 -1
  360. package/src/domains/agents/builtins/oracle.md +1 -1
  361. package/src/domains/agents/builtins/provenance.md +1 -1
  362. package/src/domains/agents/builtins/researcher.md +1 -1
  363. package/src/domains/agents/builtins/scout.md +1 -1
  364. package/src/domains/agents/builtins/tester.md +2 -2
  365. package/src/domains/agents/builtins/verifier.md +2 -2
  366. package/src/domains/agents/builtins/wiki-writer.md +1 -1
  367. package/src/domains/agents/builtins/world-knowledge.md +31 -0
  368. package/src/domains/agents/catalog.ts +13 -15
  369. package/src/domains/agents/contract.ts +2 -0
  370. package/src/domains/agents/extension.ts +23 -1
  371. package/src/domains/agents/result-contract.ts +70 -0
  372. package/src/domains/config/keybindings.ts +8 -0
  373. package/src/domains/context/extension.ts +0 -3
  374. package/src/domains/context/wiki/map-seed.ts +589 -0
  375. package/src/domains/context/wiki/plan.ts +2 -2
  376. package/src/domains/context/working-set/path-index.ts +1 -0
  377. package/src/domains/dispatch/admission.ts +29 -0
  378. package/src/domains/dispatch/agent-candidates.ts +10 -0
  379. package/src/domains/dispatch/budget-envelope.ts +86 -1
  380. package/src/domains/dispatch/capability-match.ts +11 -0
  381. package/src/domains/dispatch/capacity-lease.ts +17 -0
  382. package/src/domains/dispatch/contract.ts +11 -1
  383. package/src/domains/dispatch/extension.ts +237 -49
  384. package/src/domains/dispatch/host-verification.ts +435 -39
  385. package/src/domains/dispatch/intent-requirements.ts +10 -0
  386. package/src/domains/dispatch/intent.ts +18 -1
  387. package/src/domains/dispatch/path-scope.ts +235 -24
  388. package/src/domains/dispatch/run-event-journal.ts +4 -15
  389. package/src/domains/dispatch/state.ts +2 -3
  390. package/src/domains/dispatch/transport.ts +45 -21
  391. package/src/domains/dispatch/types.ts +58 -3
  392. package/src/domains/dispatch/worker-model-metadata.ts +38 -0
  393. package/src/domains/eval/artifacts/store.ts +5 -0
  394. package/src/domains/eval/metrics/call-ledger-stream.ts +34 -11
  395. package/src/domains/eval/metrics/token-stream.ts +201 -31
  396. package/src/domains/eval/metrics/tracked.ts +40 -4
  397. package/src/domains/eval/runners/clio-run.ts +5 -2
  398. package/src/domains/eval/schema/suite.ts +28 -0
  399. package/src/domains/eval/schema/verdict.ts +2 -2
  400. package/src/domains/eval/store.ts +8 -1
  401. package/src/domains/eval/suites/resolve.ts +13 -1
  402. package/src/domains/eval/suites/run.ts +24 -3
  403. package/src/domains/evidence/trust-status.ts +10 -1
  404. package/src/domains/extensions/contract.ts +15 -1
  405. package/src/domains/extensions/discovery.ts +238 -41
  406. package/src/domains/extensions/extension.ts +105 -6
  407. package/src/domains/extensions/index.ts +24 -0
  408. package/src/domains/extensions/integrity.ts +189 -0
  409. package/src/domains/extensions/manager.ts +17 -1
  410. package/src/domains/extensions/resource-path.ts +27 -0
  411. package/src/domains/extensions/resources.ts +18 -38
  412. package/src/domains/extensions/snapshot-store.ts +39 -0
  413. package/src/domains/extensions/snapshot.ts +180 -0
  414. package/src/domains/extensions/state.ts +385 -57
  415. package/src/domains/extensions/types.ts +118 -1
  416. package/src/domains/interop/registry.ts +6 -2
  417. package/src/domains/interop/types.ts +4 -0
  418. package/src/domains/lifecycle/migrations/2026-09-01-extension-install-digests.ts +27 -0
  419. package/src/domains/lifecycle/migrations/index.ts +6 -0
  420. package/src/domains/lifecycle/naming-resources.ts +19 -4
  421. package/src/domains/lifecycle/naming-yazi.ts +10 -5
  422. package/src/domains/memory/task-memory-policy.ts +70 -26
  423. package/src/domains/memory/task-memory-telemetry.ts +1 -0
  424. package/src/domains/middleware/contract.ts +26 -0
  425. package/src/domains/middleware/extension.ts +24 -24
  426. package/src/domains/middleware/hook-receipts.ts +27 -4
  427. package/src/domains/middleware/hooks-io.ts +65 -32
  428. package/src/domains/middleware/hooks.ts +64 -0
  429. package/src/domains/middleware/index.ts +28 -5
  430. package/src/domains/middleware/marketplace-offer.ts +3 -35
  431. package/src/domains/middleware/memory-intervention.ts +127 -32
  432. package/src/domains/middleware/memory-step-endpoint.ts +3 -2
  433. package/src/domains/middleware/registrations.ts +326 -0
  434. package/src/domains/middleware/runtime.ts +28 -0
  435. package/src/domains/middleware/skills-reminder.ts +31 -2
  436. package/src/domains/middleware/snapshot.ts +20 -7
  437. package/src/domains/mux/contract.ts +38 -0
  438. package/src/domains/mux/detect.ts +6 -13
  439. package/src/domains/mux/index.ts +1 -1
  440. package/src/domains/mux/operations.ts +44 -5
  441. package/src/domains/mux/yazi/assets/yazi.toml +2 -2
  442. package/src/domains/mux/yazi/session.ts +53 -4
  443. package/src/domains/mux/yazi/theme.ts +117 -17
  444. package/src/domains/observability/compaction-usage.ts +118 -0
  445. package/src/domains/observability/contract.ts +10 -11
  446. package/src/domains/observability/cost.ts +1 -1
  447. package/src/domains/observability/extension.ts +17 -4
  448. package/src/domains/observability/out-of-turn-usage.ts +52 -21
  449. package/src/domains/observability/projection.ts +14 -90
  450. package/src/domains/observability/trace-store.ts +43 -7
  451. package/src/domains/prompts/compiler.ts +73 -53
  452. package/src/domains/prompts/contract.ts +15 -3
  453. package/src/domains/prompts/extension.ts +97 -9
  454. package/src/domains/prompts/fragments/identity/clio-worker.md +1 -3
  455. package/src/domains/prompts/fragments/identity/clio.md +6 -12
  456. package/src/domains/prompts/fragments/identity/docs-routing.md +1 -2
  457. package/src/domains/prompts/fragments/identity/self-awareness.md +3 -11
  458. package/src/domains/prompts/fragments/operating/contract.md +7 -15
  459. package/src/domains/prompts/fragments/operating/delegation.md +32 -34
  460. package/src/domains/prompts/fragments/operating/skills.md +10 -24
  461. package/src/domains/prompts/fragments/operating/worker.md +1 -8
  462. package/src/domains/providers/contract.ts +4 -1
  463. package/src/domains/providers/extension.ts +40 -9
  464. package/src/domains/providers/index.ts +1 -1
  465. package/src/domains/providers/model-capabilities.ts +9 -0
  466. package/src/domains/providers/model-discovery.ts +2 -0
  467. package/src/domains/providers/model-runtime-capabilities.ts +99 -25
  468. package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +699 -114
  469. package/src/domains/providers/runtime-resolution.ts +31 -0
  470. package/src/domains/providers/runtimes/antigravity/antigravity-code.ts +225 -45
  471. package/src/domains/providers/runtimes/common/lmstudio-http.ts +6 -2
  472. package/src/domains/providers/runtimes/common/local-synth.ts +2 -0
  473. package/src/domains/providers/runtimes/common/probe-helpers.ts +7 -2
  474. package/src/domains/providers/runtimes/local-native/llamacpp.ts +9 -1
  475. package/src/domains/providers/runtimes/protocol/litellm.ts +119 -29
  476. package/src/domains/providers/support.ts +11 -5
  477. package/src/domains/providers/target-model-cache.ts +25 -2
  478. package/src/domains/providers/types/capability-flags.ts +2 -0
  479. package/src/domains/providers/types/cost-provenance.ts +19 -0
  480. package/src/domains/providers/types/local-model-quirks.ts +85 -37
  481. package/src/domains/providers/types/runtime-descriptor.ts +20 -1
  482. package/src/domains/providers/types/target-descriptor.ts +19 -0
  483. package/src/domains/resources/index.ts +3 -0
  484. package/src/domains/resources/skills/install.ts +72 -7
  485. package/src/domains/resources/skills/loader.ts +23 -19
  486. package/src/domains/resources/skills/marketplace.ts +63 -11
  487. package/src/domains/safety/autonomy.ts +15 -0
  488. package/src/domains/safety/call-target.ts +1 -1
  489. package/src/domains/safety/index.ts +1 -0
  490. package/src/domains/safety/loop-detector.ts +7 -4
  491. package/src/domains/safety/path-policy.ts +1 -1
  492. package/src/domains/safety/policy-engine.ts +34 -11
  493. package/src/domains/safety/protected-artifacts.ts +191 -88
  494. package/src/domains/safety/run-effects.ts +2 -22
  495. package/src/domains/safety/skill-authority.ts +55 -0
  496. package/src/domains/session/compaction/compact.ts +72 -22
  497. package/src/domains/session/entries.ts +6 -0
  498. package/src/domains/session/task-board.ts +10 -9
  499. package/src/domains/session/usage.ts +3 -3
  500. package/src/domains/share/archive.ts +164 -7
  501. package/src/engine/acp/server.ts +62 -9
  502. package/src/engine/agent.ts +13 -3
  503. package/src/engine/ai.ts +26 -8
  504. package/src/engine/antigravity/subprocess-runtime.ts +386 -120
  505. package/src/engine/api-registry.ts +3 -0
  506. package/src/engine/apis/llamacpp-residency.ts +3 -4
  507. package/src/engine/apis/lmstudio.ts +3 -3
  508. package/src/engine/apis/ollama-native.ts +6 -6
  509. package/src/engine/apis/openai-completions.ts +145 -39
  510. package/src/engine/apis/output-budget.ts +8 -18
  511. package/src/engine/apis/residency.ts +8 -27
  512. package/src/engine/external-subprocess.ts +114 -6
  513. package/src/engine/gemma-channel-filter.ts +19 -0
  514. package/src/engine/loop-guard.ts +92 -12
  515. package/src/engine/worker-runtime.ts +40 -11
  516. package/src/engine/worker-tools.ts +3 -1
  517. package/src/entry/background-model-metadata.ts +18 -0
  518. package/src/entry/compaction-prompt.ts +57 -0
  519. package/src/entry/extension-hook-sources.ts +28 -0
  520. package/src/entry/extension-reload.ts +309 -0
  521. package/src/entry/orchestrator.ts +464 -251
  522. package/src/entry/task-memory-lifecycle.ts +35 -0
  523. package/src/interactive/application-controller.ts +2 -1
  524. package/src/interactive/bus-notices.ts +8 -1
  525. package/src/interactive/chat-loop-messages.ts +16 -17
  526. package/src/interactive/chat-loop.ts +75 -3
  527. package/src/interactive/chat-panel.ts +36 -13
  528. package/src/interactive/chat-renderer.ts +72 -7
  529. package/src/interactive/cost-overlay.ts +26 -2
  530. package/src/interactive/dispatch-board.ts +6 -11
  531. package/src/interactive/footer/widgets.ts +13 -0
  532. package/src/interactive/interactive-application.ts +39 -4
  533. package/src/interactive/interactive-input-runtime.ts +4 -0
  534. package/src/interactive/interactive-presentation.ts +2 -2
  535. package/src/interactive/interactive-slash-runtime.ts +4 -1
  536. package/src/interactive/overlays/extensions.ts +9 -1
  537. package/src/interactive/overlays/help-reference.ts +13 -0
  538. package/src/interactive/overlays/settings.ts +27 -16
  539. package/src/interactive/panes-runtime.ts +111 -35
  540. package/src/interactive/prompt-cache-identity.ts +88 -0
  541. package/src/interactive/renderers/worker-entry.ts +32 -0
  542. package/src/interactive/slash-commands.ts +153 -20
  543. package/src/interactive/stream-pacing-policy.ts +0 -23
  544. package/src/interactive/theme/labels.ts +19 -13
  545. package/src/interactive/turn-context.ts +39 -20
  546. package/src/interactive/turn-recovery.ts +8 -0
  547. package/src/interactive/turn-runtime.ts +27 -11
  548. package/src/interactive/turn-state.ts +7 -0
  549. package/src/interactive/worker-receipts.ts +1 -0
  550. package/src/interactive/worker-stream.ts +6 -1
  551. package/src/interactive/yazi-bridge.ts +60 -6
  552. package/src/tools/agent-tools.ts +30 -1
  553. package/src/tools/artifact.ts +2 -2
  554. package/src/tools/ask-user.ts +3 -3
  555. package/src/tools/bash.ts +1 -1
  556. package/src/tools/bootstrap.ts +4 -0
  557. package/src/tools/builtin-tool-catalog.ts +52 -22
  558. package/src/tools/codewiki/code-nav-surface.ts +6 -0
  559. package/src/tools/codewiki/code-nav.ts +99 -13
  560. package/src/tools/context/docs-engine.ts +20 -7
  561. package/src/tools/context/index.ts +59 -21
  562. package/src/tools/core-bootstrap.ts +28 -6
  563. package/src/tools/credential-present.ts +1 -2
  564. package/src/tools/dispatch-arguments.ts +6 -1
  565. package/src/tools/dispatch-event-text.ts +10 -0
  566. package/src/tools/dispatch-plan.ts +49 -4
  567. package/src/tools/dispatch-run-events.ts +1 -1
  568. package/src/tools/dispatch-runner.ts +12 -0
  569. package/src/tools/dispatch-schema.ts +338 -0
  570. package/src/tools/dispatch-types.ts +3 -0
  571. package/src/tools/dispatch.ts +9 -254
  572. package/src/tools/ledger.ts +3 -5
  573. package/src/tools/monitor-surface.ts +5 -13
  574. package/src/tools/observation.ts +4 -5
  575. package/src/tools/panes-surface.ts +4 -11
  576. package/src/tools/panes.ts +4 -2
  577. package/src/tools/policy.ts +15 -2
  578. package/src/tools/read.ts +5 -6
  579. package/src/tools/registry.ts +41 -12
  580. package/src/tools/result-shaping.ts +18 -14
  581. package/src/tools/steer-surface.ts +1 -1
  582. package/src/tools/tasks.ts +1 -1
  583. package/src/tools/truncate.ts +6 -5
  584. package/src/tools/verify/surface.ts +6 -12
  585. package/src/tools/web-fetch-surface.ts +1 -3
  586. package/src/tools/worker-evidence.ts +3 -1
  587. package/src/worker/spec-contract.ts +4 -0
  588. package/dist/builtins-UJLMOVOV.js +0 -17
  589. package/dist/chunk-5QIAJV2D.js +0 -48
  590. package/dist/chunk-JZWT5J3Y.js +0 -814
  591. package/dist/chunk-K7VKOLQQ.js +0 -15
  592. package/dist/chunk-PMZCIOCJ.js +0 -25
  593. package/dist/chunk-SUW5DORT.js +0 -819
  594. package/dist/chunk-UOV2BYIW.js +0 -107
  595. package/dist/chunk-WR6U3OVP.js +0 -45
  596. package/dist/chunk-Y45G3AXC.js +0 -1558
  597. package/dist/reset-EOLM7GVE.js +0 -230
  598. package/dist/uninstall-N34PCTGJ.js +0 -331
  599. package/dist/upgrade-H7TOM7YL.js +0 -323
  600. package/docs/artifact-versions.md +0 -67
  601. package/docs/development-pipeline.md +0 -121
  602. package/docs/documentation-coverage.md +0 -46
  603. package/docs/documentation-guide.md +0 -167
  604. package/docs/time-conventions.md +0 -101
@@ -1,11 +1,11 @@
1
1
  # Configuration, Targets, Runtimes, and Auth
2
2
 
3
- > [!TIP]
4
- > **Interactive Spec Available:** An interactive configuration validator, target resolver, and CLI command generator is located at [docs/html/configuration_blueprint.html](html/configuration_blueprint.html) (Version: 0.4.0).
3
+ > **Visual blueprint:** The source checkout includes the complete
4
+ > [Configuration, Targets, Runtimes, and Auth visual reference](https://github.com/iowarp/clio-coder/blob/main/docs/html/configuration_blueprint.html).
5
5
 
6
- Clio Coder is target-first: chat and fleet dispatch resolve through configured targets in `settings.yaml`, not through provider-specific ad hoc flags. Chat and print targets are HTTP and native engine-backed runtimes. Fleet dispatch can also target the sanctioned Claude Code subscription runtimes described below.
6
+ Clio Coder is target-first: chat and fleet dispatch resolve through configured targets in `settings.yaml`, not through provider-specific ad hoc flags. Chat and print targets are HTTP and native engine-backed runtimes. Fleet dispatch can also target sanctioned subscription and external-worker runtimes described below.
7
7
 
8
- Clio's engine is built on the pi SDK (see [docs/pi-boundary.md](pi-boundary.md)). Broad provider/model support comes from engine-backed descriptors and from the generic `openai-compat` and `anthropic-compat` targets. Clio adds orchestration, local/native runtime ergonomics, target configuration, dispatch, safety, and receipts rather than creating a first-class descriptor for every provider.
8
+ Clio's engine is built on the pi SDK (see [docs/architecture/pi-boundary.md](../architecture/pi-boundary.md)). Broad provider/model support comes from engine-backed descriptors and from the generic `openai-compat` and `anthropic-compat` targets. Clio adds orchestration, local/native runtime ergonomics, target configuration, dispatch, safety, and receipts rather than creating a first-class descriptor for every provider.
9
9
 
10
10
  Source of truth: `src/core/defaults.ts`, `src/core/config.ts`, `src/domains/providers/**`, `src/cli/configure.ts`, `src/cli/targets.ts`, `src/cli/models.ts`, and `src/cli/auth.ts`.
11
11
 
@@ -31,7 +31,15 @@ Default config file:
31
31
 
32
32
  Role contents: config holds user-authored files (settings, credentials, agents, skills, prompts, extensions, runtimes); data holds durable artifacts (memory, evidence, evals, vendored external tools); state holds machine-produced session state (sessions, audit, receipts, runs.json, recent-models.json, install.json, interop.json, interviews, scratch); cache holds disposable derived files.
33
33
 
34
- The `library` settings block configures the private resource catalog. `library.catalog` is an optional path and defaults to `<configDir>/library.yaml`. `library.remote` is an optional git remote URL, and the catalog repository must name that git remote `library`. `library.sync` defaults to `false`, which makes sync and push refuse before spawning git. `library.confirmedRemote` is written by `clio-coder library remote confirm <url>` and must exactly match `library.remote` before sync or push can run. Confirmation sets both values when `library.remote` is unset and refuses a differing configured URL with `library_remote_mismatch`. See [resource-library.md](resource-library.md).
34
+ The `integrations.library` settings block configures the private resource
35
+ catalog. `integrations.library.catalog` is an optional path and defaults to
36
+ `<configDir>/library.yaml`. `integrations.library.remote` is an optional Git
37
+ remote URL, and the catalog repository must name that remote `library`.
38
+ `integrations.library.sync` defaults to `false`, which makes sync and push
39
+ refuse before spawning Git. `integrations.library.confirmedRemote` is written
40
+ by `clio-coder library remote confirm <url>` and must exactly match the
41
+ configured remote before synchronization can run. See
42
+ [Resource Library](resource-library.md).
35
43
 
36
44
  `clio-coder paths --json` prints the resolved directories and is the single source of truth for scripts.
37
45
 
@@ -44,6 +52,7 @@ From a source checkout:
44
52
  ```bash
45
53
  git clone https://github.com/iowarp/clio-coder.git
46
54
  cd clio-coder
55
+ npm ci
47
56
  npm run install:local
48
57
  hash -r
49
58
  clio-coder --version
@@ -63,6 +72,15 @@ Start one local runtime and register exactly one target first. Clio integrates w
63
72
  - **[llama.cpp](https://github.com/ggerganov/llama.cpp):** A minimal C/C++ implementation for local LLM inference. Target runtime ID: `llamacpp`.
64
73
  - **[vLLM](https://github.com/vllm-project/vllm):** A high-throughput and memory-efficient LLM serving engine. Target runtime ID: `vllm`.
65
74
  - **[SGLang](https://github.com/sgl-project/sglang):** A fast serving framework for large language models. Target runtime ID: `sglang`.
75
+ - **[LiteLLM](https://docs.litellm.ai):** An OpenAI-compatible gateway that publishes routed models across multiple inference endpoints. Target runtime ID: `litellm`.
76
+
77
+ First-run onboarding always completes a valid orchestrator before it offers any
78
+ worker-only colleague. If `agy` is already on `PATH`, the final optional step is
79
+ named **Antigravity CLI — experimental local delegation**. It runs only the
80
+ non-generating model-catalog probe, explains that Clio uses the operator's
81
+ existing local session without inspecting credentials, and can create and bind a
82
+ read-only `world-knowledge-external` profile. Skipping or failing that step does
83
+ not change the primary chat, background, or fleet-default pointers.
66
84
 
67
85
  Common local runtime IDs and default URLs are:
68
86
 
@@ -73,6 +91,7 @@ Common local runtime IDs and default URLs are:
73
91
  | llama.cpp server | `llamacpp` | `http://127.0.0.1:8080` |
74
92
  | vLLM | `vllm` | `http://127.0.0.1:8000` |
75
93
  | SGLang | `sglang` | `http://127.0.0.1:30000` |
94
+ | LiteLLM gateway | `litellm` | `http://127.0.0.1:4000` |
76
95
 
77
96
 
78
97
  Example registration:
@@ -104,12 +123,16 @@ clio-coder
104
123
  Inside the TUI, verify the local surface with:
105
124
 
106
125
  ```text
107
- /targets
126
+ /settings targets
108
127
  /agents
109
128
  /skill
110
129
  ```
111
130
 
112
- `/targets` opens Settings → Targets: one row per configured target with its roles (chat, fleet, memory) and probe health, probed live when the section opens. `Enter` on a row offers use for chat and fleet dispatch, connect (API key or OAuth, then a probe), probe, and remove. The chat, fleet, and memory targets are also individual rows in the Orchestrator and Fleet sections.
131
+ `/settings targets` opens one row per configured target with its roles (chat,
132
+ fleet, memory) and probe health. `Enter` on a row offers use for chat and fleet
133
+ dispatch, connect (API key or OAuth, then a probe), probe, and remove. The
134
+ retired `/targets` slash spelling is a non-executing tombstone that points to
135
+ this settings area; the `clio-coder targets` CLI family remains available.
113
136
 
114
137
  Only add `--context-window <tokens>`, `--max-tokens <tokens>`, or `--reasoning true` when you have runtime/model-specific values that should override live probe results.
115
138
 
@@ -130,127 +153,42 @@ Terminology used in code and receipts:
130
153
  | Background target | Optional proactive-memory model target. Unset means deterministic rules-only memory. |
131
154
  | Worker target | Fleet dispatch target. HTTP/native engine-backed, or one of the sanctioned subscription worker runtimes such as `claude-sdk`, `claude-code`, or `antigravity-code`. |
132
155
 
156
+ This abbreviated example uses the current version-2 information architecture.
157
+ The [settings inventory](#settings-inventory) below lists every accepted leaf
158
+ and its shipped default.
159
+
133
160
  ```yaml
134
- version: 1
135
- autonomy: auto-edit # read-only | suggest | auto-edit | full-auto (enforced at tool admission; the safety net applies at every level)
161
+ version: 2
136
162
 
137
163
  targets:
138
164
  - id: local-lmstudio
139
165
  runtime: lmstudio
140
166
  url: http://127.0.0.1:1234
141
167
  defaultModel: your-model-id
142
- # Optional. Request slots this inference endpoint can serve at once.
143
- # Overrides live discovery; omit it and Clio reads the server's own count.
144
- maxConcurrentRequests: 2
145
- capabilities:
146
- reasoning: true # optional; only if your model/runtime supports it
147
- lmstudio:
148
- # Omit load entirely to use LM Studio's just-in-time load defaults.
149
- load:
150
- contextLength: 131072
151
- flashAttention: true
152
- evalBatchSize: 512
153
- numExperts: 8
154
- offloadKvCacheToGpu: true
155
- request:
156
- ttlSeconds: 600
157
- draftModel: your-draft-model-id
158
- reasoning: auto # auto | off | on | low | medium | high
168
+ maxConcurrentRequests: 2 # optional override; prefer live discovery
159
169
 
160
- runtimePlugins: []
161
-
162
- orchestrator:
170
+ chat:
163
171
  target: local-lmstudio
164
172
  model: your-model-id
165
- thinkingLevel: off
166
-
167
- # Optional proactive-memory model. Leave null for the zero-cost rules tier.
168
- background:
169
- target: null
170
- model: null
171
- thinkingLevel: off
172
-
173
- memory:
174
- intervention:
175
- enabled: true
176
- everyNTools: 10
177
- windowSteps: 8
178
- maxTokens: 400
179
- timeoutMs: 30000 # shipped operator default in src/core/defaults.ts; the library fallback in task-memory-policy.ts is the same value
180
-
181
- workers:
173
+ thinkingLevel: low
174
+ modelPicker:
175
+ cycleSet: []
176
+ favorites: []
177
+ recentLimit: 12
178
+ maxOutputTokens: 0
179
+ prewarm: true
180
+
181
+ fleet:
182
182
  default:
183
183
  target: local-lmstudio
184
184
  model: your-model-id
185
185
  thinkingLevel: off
186
186
  profiles: {}
187
- rosters:
188
- design:
189
- members:
190
- - label: local-a
191
- target: local-lmstudio
192
- model: your-model-id
193
- thinking: medium
194
- color: accent
195
- - label: local-b
196
- target: local-vllm
197
- color: "#5ba8ff"
198
- agentBindings: {}
199
- maxRetries: 2
200
- onPermission: deny
201
- escalation:
202
- timeoutMs: 120000
203
- fallback: deny
204
- resilienceCooldownMs: 15000
205
-
206
- # Measured route selection stays shadow-only while these lists are empty.
207
- routing:
208
- activeRoles: [] # researcher | verifier | reviewer | judge
209
- activePostures: [] # quality | balanced | latency | economy
210
- agentAutomation:
211
- # Exact pairs only; this never authorizes an agents-by-roles cross-product.
212
- activeAgentRoles: []
213
-
214
- scope: []
215
- modelSelector:
216
- favorites: []
217
- recentLimit: 12
218
- budget:
219
- sessionCeilingUsd: 5
187
+ rosters: {}
188
+ agentProfiles: {}
189
+ nodes: []
220
190
  concurrency: auto
221
191
 
222
- defaults:
223
- maxTokens: 32768 # global output budget; clamped per model at request time
224
-
225
- theme: default
226
- terminal:
227
- showTerminalProgress: false
228
- outputVerbosity: default
229
- tuiMode: regular # regular terminal scrollback or fullscreen sticky layout
230
- fullscreenScrollbar: auto # hidden, auto, or always in fullscreen mode
231
- smoothStreaming: off # off, conservative auto, or explicit on
232
- notify: false # content-free desktop notification, interactive TTY only
233
- watchdog:
234
- enabled: false # opt-in read-only review of every mutating turn
235
- # target: local-lmstudio # route the review at a cheap model
236
- # cadenceToolCalls: 20 # also review every N tool calls inside a turn
237
- skills:
238
- trustProjectCompatRoots: false
239
- delegation:
240
- defaults:
241
- connectTimeoutMs: 30000
242
- turnTimeoutMs: 300000
243
- permissionTimeoutMs: 120000
244
- toolGovernance: clio-policy
245
- agents: []
246
- keybindings: {}
247
- compaction:
248
- auto: true
249
- threshold: 0.8
250
- excludeLastTurns: 6
251
- # model: provider/summary-model-id
252
- # systemPrompt: ~/.config/clio-coder/prompts/compaction.md
253
-
254
192
  context:
255
193
  workingSet:
256
194
  enabled: true
@@ -258,34 +196,107 @@ context:
258
196
  target: 0.6
259
197
  protectLastTurns: 6
260
198
  minEvictableTokens: 200
261
-
262
- prewarm:
263
- enabled: true # send the next turn's prefix early; local-native targets only
264
-
265
- retry:
266
- enabled: true
267
- maxRetries: 3
268
- baseDelayMs: 2000
269
- maxDelayMs: 60000
270
- streamStallMs: 180000
271
- guardrails:
272
- turnToolCallBudget: 60
273
- workerToolCallCap: 150
274
- maxDispatchRuns: 1000
275
- readMaxBytes: 51200
276
- observationTurnBudgetBytes: 196608
277
- internalDispatchTimeoutMs: 900000
199
+ compaction:
200
+ auto: true
201
+ threshold: 0.8
202
+ memory:
203
+ enabled: true
204
+ target: null
205
+ model: null
206
+
207
+ safety:
208
+ autonomy: auto-edit
209
+ limits:
210
+ sessionCostUsd: 5
211
+ chatToolCallsPerTurn: 60
212
+ readBytesPerCall: 51200
213
+ observationBytesPerTurn: 196608
214
+ review:
215
+ enabled: false
216
+
217
+ interface:
218
+ outputDetail: default
219
+ smoothStreaming: off
220
+ mode: regular
221
+ fullscreenScrollbar: auto
222
+ terminalProgress: false
223
+ desktopNotifications: false
224
+ panes:
225
+ enabled: off
226
+ layout: off
227
+ files:
228
+ enabled: false
229
+ keybindings: {}
230
+
231
+ integrations:
232
+ projectResources:
233
+ trustProjectImports: false
234
+ externalAgents:
235
+ entries: []
236
+ runtimePlugins: []
237
+ git:
238
+ commitAttribution: true
278
239
  ```
279
240
 
280
241
  Target capability overrides may include `chat`, `tools`, `toolCallFormat`, `reasoning`, `thinkingFormat`, `structuredOutputs`, `vision`, `audio`, `embeddings`, `rerank`, `fim`, `contextWindow`, and `maxTokens`.
281
242
 
243
+ ### LiteLLM gateways
244
+
245
+ Register LiteLLM with its first-class runtime so discovery reads
246
+ `/v1/model/info` rather than treating routed names as bare OpenAI models. For a
247
+ gateway where placement matters, publish one deterministic `node/model` name
248
+ per deployment instead of task categories such as `chat` or `code`:
249
+
250
+ ```yaml
251
+ targets:
252
+ - id: ai-gateway
253
+ runtime: litellm
254
+ url: http://gateway.example:4000
255
+ defaultModel: dynamo/qwen3.8-27b
256
+ auth:
257
+ apiKeyEnvVar: CLIO_AI_GATEWAY_KEY
258
+ litellm:
259
+ request:
260
+ tags: [homelab]
261
+ sendSessionId: true
262
+ # Optional proxy overrides. Keep retries at zero for physical routes.
263
+ timeoutSeconds: 300
264
+ streamTimeoutSeconds: 180
265
+ numRetries: 0
266
+ ```
267
+
268
+ Clio adds the `clio-coder` request tag and forwards its stable session id by
269
+ default. Explicit `x-litellm-*` headers on the target or request take
270
+ precedence. Set `sendSessionId: false` when the gateway must not correlate calls.
271
+ The timeout values and `numRetries` become LiteLLM request headers and override
272
+ the proxy's defaults only for this target. Clio disables the OpenAI SDK's
273
+ client-side retry layer on LiteLLM requests. A failed interactive LiteLLM call
274
+ also bypasses Clio's transient retry ladder even when `chat.retry` is enabled:
275
+ the provider error names the selected route and tells the operator to choose a
276
+ different one with `/model`. Configure `numRetries: 0` and no server fallback
277
+ maps when `node/model` is a placement guarantee. Context-overflow compaction is
278
+ still a local correction, not a route substitution.
279
+
280
+ When the gateway reports these fields, Clio records LiteLLM's selected model group, physical model,
281
+ sanitized upstream host, fallback/retry counts, and proxy timing in the session
282
+ and worker receipt. A nonzero fallback or retry is also announced in the live
283
+ transcript, making server-policy drift visible. Self-describing physical routes
284
+ are summarized in probe diagnostics instead of expanding into a giant list of
285
+ tautological mappings. If a genuine alias has multiple deployments, discovered
286
+ capabilities are the conservative intersection and numerical limits are the
287
+ smallest limits published by every deployment, so routing cannot select a
288
+ weaker backend than Clio planned for. If `/v1/model/info` omits a capability,
289
+ Clio does not invent it; that includes structured-output support.
290
+
291
+ Upstream `model_info.runtime` declarations may identify the thinking-control dialect of a routed model. Clio accepts only recognized declarations shared by every deployment of that alias; unknown or mixed declarations remain unguessed. A resolved LM Studio dialect uses its explicit off effort, while llama.cpp uses template controls. This metadata does not turn the target into a native management endpoint: LiteLLM continues to own authentication, routing, loading and eviction. Thinking off is a request to the selected runtime/model, not evidence that the server complied or that every route has been live-validated.
292
+
282
293
  ### `maxConcurrentRequests`
283
294
 
284
295
  `maxConcurrentRequests` is a per-target integer of at least 1, validated with the rest of the target block, and it is the operator's override for how many requests the inference endpoint behind that target can serve at once. It is not a settings-file default and has no shipped value, so it does not appear in the settings inventory below.
285
296
 
286
- Set it only when discovery is wrong. Clio resolves the limit in this order: this override; then a `parallelSlots` count cached on the target's probe result; then one slot for any other `local-native` runtime; then no bound at all for a cloud runtime, vLLM, or SGLang. llama.cpp discovery reads `total_slots` from the router's `/props`, falls back to the selected worker's `/props?model=<id>` when the router reports none, and falls back again to the `--parallel` argv on the selected `/v1/models` entry. LM Studio reads `config.parallel` off the loaded instance and otherwise reports one; Ollama reads `OLLAMA_NUM_PARALLEL` from the environment the Clio process can see and otherwise reports one.
297
+ Set it only when discovery is wrong. Clio resolves the limit in this order: this override; then a `parallelSlots` count cached on the target's probe result; then a persisted discovery result that is still fresh and matches the runtime; then one slot for any other `local-native` runtime; then no invented endpoint bound for a cloud runtime, LiteLLM, vLLM, or SGLang. llama.cpp discovery reads `total_slots` from the router's `/props`, falls back to the selected worker's `/props?model=<id>` when the router reports none, and falls back again to the `--parallel` argv on the selected `/v1/models` entry. LM Studio reads `config.parallel` off the loaded instance and otherwise reports one; Ollama reads `OLLAMA_NUM_PARALLEL` from the environment the Clio process can see and otherwise reports one.
287
298
 
288
- The limit is keyed on the endpoint rather than the target, so two targets pointed at the same normalized URL share it. Raising it above what the server will actually serve does not create capacity; it removes the refusal that would have told you the server was full. See [capacity-and-scheduling.md](capacity-and-scheduling.md) for the admission model and the exact denial text.
299
+ The limit is keyed on the endpoint rather than the target, so two targets pointed at the same normalized URL share it. Raising it above what the server will actually serve does not create capacity; it removes the refusal that would have told you the server was full. See [capacity-and-scheduling.md](../architecture/capacity-and-scheduling.md) for the admission model and the exact denial text.
289
300
 
290
301
  ### The `local-native` tier
291
302
 
@@ -293,9 +304,9 @@ Three behaviors in this release are gated on a runtime's tier being `local-nativ
293
304
 
294
305
  The tier means "an inference server the operator runs, whose prefix cache and resident model Clio's own behavior can displace." That is what the three gates are actually asking:
295
306
 
296
- - **Pre-warm** runs only here, whatever `prewarm.enabled` says, because a cloud provider bills the request and caches on its own schedule. The check is made twice, once from configuration before any runtime is resolved and once against the resolved runtime, so an unreachable target does not pay for a capability probe at boot just to be told no.
307
+ - **Pre-warm** runs only here, whatever `chat.prewarm` says, because a cloud provider bills the request and caches on its own schedule. The check is made twice, once from configuration before any runtime is resolved and once against the resolved runtime, so an unreachable target does not pay for a capability probe at boot just to be told no.
297
308
  - **Endpoint capacity** defaults to one slot here when discovery reports nothing, and to unbounded elsewhere. vLLM and SGLang are the deliberate exceptions inside the tier: both serve genuinely concurrent requests, so an undiscovered limit is left unbounded rather than guessed at one.
298
- - **Five of the eight expected-cold reasons** are stamped only here, because a single-slot local cache is the only one an interleaved run actually displaces. The other three moved the prompt bytes themselves and are stamped on every tier. The full split is in [context-engine.md](context-engine.md#cache-divergence-honesty).
309
+ - **Five of the eight expected-cold reasons** are stamped only here, because a single-slot local cache is the only one an interleaved run actually displaces. The other three moved the prompt bytes themselves and are stamped on every tier. The full split is in [context-engine.md](../architecture/context-engine.md#cache-divergence-honesty).
299
310
 
300
311
  The tool-prose-loop detector is keyed on the same tier, for the same reason: narrating a tool call instead of emitting one is a behavior of open-weight models served locally, and a list of server names would have left an Ollama or vLLM run with no cutoff at all.
301
312
 
@@ -375,26 +386,65 @@ block. Set them in LM Studio's My Models load settings or with `lms load`; the C
375
386
  configuration that `GET /api/v1/models` exposes instead of pretending it applied settings the REST
376
387
  load endpoint did not accept (<https://lmstudio.ai/docs/developer/rest/list>).
377
388
 
378
- `defaults.maxTokens` is a global output budget requested for every turn (default `32768`). At request time it is always clamped down to the model's known max-output cap and the remaining context window, so a model that supports less automatically gets less and no per-model tuning is required. A per-target `capabilities.maxTokens` override still records the model's true cap; the request never exceeds it. Set `defaults.maxTokens: 0` to disable the global default and fall back to per-model caps only.
379
-
380
- The setting `workers.maxRetries` controls the maximum number of automated retries for retryable failures during fleet dispatch. Setting this value to `0` disables retries entirely.
381
-
382
- The setting `workers.onPermission` decides how noninteractive workers handle a tool call that asks for permission. It supports three modes:
389
+ `chat.maxOutputTokens` is a global output budget requested for every turn. Its
390
+ default `0` uses each model's known maximum-output cap, still clamped to the
391
+ remaining context window. Models with no known cap use a 32,768-token ceiling
392
+ instead of the whole remaining context window. A per-target
393
+ `capabilities.maxTokens` override records the model's true cap. Set a positive
394
+ value to impose a smaller global ceiling.
395
+
396
+ `context.toolResultMaxBytes` caps one tool result before Clio truncates the
397
+ visible body and spills the complete text to the session scratch file. It
398
+ defaults to 65,536 bytes and accepts integers of at least 4,096. The setting is
399
+ read before every tool result, so a session override or configuration reload
400
+ applies to the next result. The separate
401
+ `safety.limits.observationBytesPerTurn` guardrail remains 196,608 bytes. Three
402
+ full-size results consume that shared turn pool, so a fourth finds it filled.
403
+
404
+ The setting `fleet.retry.maxRetries` controls automated retries for retryable
405
+ fleet failures. Setting it to `0` disables retries.
406
+
407
+ The setting `fleet.permissions.mode` decides how noninteractive workers handle
408
+ a tool call that asks for permission. It supports three modes:
383
409
  - `deny`: Immediately returns a structured denial to the model, and the run continues.
384
- - `fail`: Finalizes the run as failed, exiting the worker subprocess with exit code 3 ([WORKER_EXIT_PERMISSION_REQUIRED](../src/worker/spec-contract.ts)).
385
- - `escalate`: Parks the tool call, emits a `clio_permission_escalated` event, and waits for an operator decision on standard input (`stdin`). If no operator decision is received within the configured `workers.escalation.timeoutMs` duration, it applies the fallback posture. If the worker is running headlessly (no operator attached) or under runtimes like `claude-sdk` that lack a native stdin park loop, the system collapses the `escalate` posture to the non-stall fallback posture immediately.
386
-
387
- The `workers.escalation` block defines parameters for the escalation mode:
410
+ - `fail`: Finalizes the run as failed, exiting the worker subprocess with exit code 3 ([WORKER_EXIT_PERMISSION_REQUIRED](../../src/worker/spec-contract.ts)).
411
+ - `escalate`: Parks the tool call, emits a `clio_coder_permission_escalated` event,
412
+ and waits for an operator decision. If no decision arrives within
413
+ `fleet.permissions.escalation.timeoutMs`, it applies the configured fallback.
414
+ A headless worker or runtime without an operator channel collapses to that
415
+ non-stall fallback immediately.
416
+
417
+ The `fleet.permissions.escalation` block defines parameters for escalation:
388
418
  - `timeoutMs` (default `120000`): The wall-clock budget in milliseconds before the parked call applies the fallback.
389
419
  - `fallback` (default `deny`): The fallback posture (`deny` or `fail`) applied upon timeout.
390
420
 
391
- The setting `workers.resilienceCooldownMs` specifies the cooldown duration in milliseconds between retries to allow target recovery.
392
-
393
- The `routing` block controls the two independent activation boundaries for measured dispatch. Joint target/model/runtime/node selection becomes active only when both the assignment's execution role and requested posture appear in `activeRoles` and `activePostures`; otherwise the same resolver records a shadow recommendation without changing execution. Active mode also requires the route-readiness report to pass and fails closed when no candidate is ready. Manual pins and `failover: none` remain exact in every mode.
394
-
395
- Agent automation is separately shadowed. Each `routing.agentAutomation.activeAgentRoles` item must be an exact `{agentId, executionRole}` pair, for example `{agentId: scout, executionRole: researcher}`. An `agent: auto` request may change agents only for a listed pair whose per-agent, per-role readiness report passes. Hard constraints eliminate candidates before scoring, and a Scout split or role transition carries typed bounded subtasks through coordinator-owned authority rather than silently broadening the original assignment.
396
-
397
- The `guardrails` section holds the numeric backstops that bound runaway agent behavior. `turnToolCallBudget` (default `60`) is the orchestrator's per-turn soft tool-call budget: crossing it blocks every further call in the turn with a stop-and-summarize directive, and a hard ceiling 15 calls above it interrupts the turn outright. Separately, an identical-call loop guard trips when the same tool is called with identical arguments three times inside a 30s window; the first two blocks feed the model a strategy-change directive (and, when the looped call already returned a successful result earlier in the run, point it at that result instead), and reaching the second block per turn locks tool use for the rest of that turn so the model answers from what it already gathered, rather than cancelling a turn that may already hold the answer. Only a bounded backstop (two further tool calls after the lockout) falls back to the hard stop. This lockout is an orchestrator behavior (interactive, headless, and ACP alike). Dispatched workers use an agent-owned admitted-call phase for graceful synthesis and retain `workerToolCallCap` (default `150`) as the independent lifetime ceiling for one worker run. The cap bounds calls that execute: an attempt denied by policy or permission posture spends it, but one the harness itself refused as steering (a reserve-window block, a synthesis-lockout denial) never ran and never does. It is sized so the recipe's own budget is what normally binds, since admission resolves `min(declared, cap)` and only the recipe knows the shape of its job. Executed calls beyond it terminate the worker with `workerToolCallCap reached (...)` in receipt diagnostics; a model that keeps calling after a lockout instead ends on the bounded per-round synthesis backstop. `maxDispatchRuns` (default `1000`) caps dispatch run-ledger retention. `readMaxBytes` (default `51200`) caps one read-tool call, and `observationTurnBudgetBytes` (default `196608`) is the shared per-turn byte pool across all observation-producing tools. `internalDispatchTimeoutMs` (default `900000`, fifteen minutes) is the wall-clock cap for one internal generator dispatch (the wiki documenter and the bootstrap scout); it exists because a model that keeps streaming without finishing can spend no new tool attempts while satisfying the heartbeat watchdog indefinitely, and on timeout the run is aborted with the timeout cause recorded in its receipt. Each value also has a per-process env override intended for CI and one-off experiments (see [environment-variables.md](environment-variables.md)); the settings file is the durable home.
421
+ `fleet.retry.routeCooldownMs` is the cooldown between retries on a failed
422
+ route.
423
+
424
+ `fleet.adaptiveRouting` controls the two independent activation boundaries for
425
+ measured dispatch. Joint target/model/runtime/node selection becomes active
426
+ only when both the assignment's execution role and requested posture appear in
427
+ `roles` and `postures`; otherwise the resolver records a shadow recommendation
428
+ without changing execution. Active mode also requires route readiness. Manual
429
+ pins and `failover: none` remain exact.
430
+
431
+ Agent automation is separately shadowed. Each
432
+ `fleet.adaptiveRouting.agentRoles` item must be an exact
433
+ `{agentId, executionRole}` pair. An `agent: auto` request may change agents only
434
+ for a listed pair whose readiness report passes.
435
+
436
+ Version 2 places numeric backstops beside the behavior they govern.
437
+ `safety.limits.chatToolCallsPerTurn` (default `60`) is the main-agent soft
438
+ tool-call budget; the hard interrupt ceiling remains 15 calls above it.
439
+ `fleet.limits.toolCallsPerRun` (default `150`) is the independent lifetime cap
440
+ for one worker and can only narrow a recipe budget. `fleet.history.maxRuns`
441
+ (default `1000`) bounds durable dispatch history.
442
+ `safety.limits.readBytesPerCall` (default `51200`) bounds one read, while
443
+ `safety.limits.observationBytesPerTurn` (default `196608`) is the shared
444
+ per-turn observation pool. `fleet.limits.internalRunTimeoutMs` (default
445
+ `900000`) bounds an internal generator dispatch. These settings are the only
446
+ operator-facing policy paths for the limits and refresh with the effective
447
+ session view.
398
448
 
399
449
  Agent recipe budgets define a normal admitted-call phase inside `workerToolCallCap`; they do not replace it. A declared phase boundary is clamped down to the cap, and when the two are equal the last call may complete and the graceful synthesis transition happens without requiring an over-cap call. The recipe's `readReserve` is the tail of that phase. It admits canonical `read` plus whatever mutation tools the agent was actually granted, because the reserve exists to end broad discovery rather than to stop an agent from delivering: a writer whose product is files has to be able to write them in its last calls. An agent with no mutation tools keeps a read-only reserve and the request-level `require_tool(read)` lock. The reserve becomes zero when `read` is absent from the admitted schema surface, and never installs a nonexistent read requirement. Calls the reserve refuses are steering rather than work: they neither run nor spend the cap, and a model that keeps calling discovery tools there reaches the same bounded synthesis lockout a spent budget ends in.
400
450
 
@@ -468,144 +518,77 @@ Plain `clio-coder doctor` is read-only. `clio-coder doctor --fix` creates missin
468
518
  directories and template files, repairs credential permissions, and refreshes
469
519
  install metadata. It validates `settings.yaml` directly against the current
470
520
  schema but never rewrites removed keys or migrates an old settings shape. Any
471
- unknown or retired key remains a validation error on that doctor run. Registered
472
- `clio-coder upgrade` migrations are the narrow exception: the 0.4.1 pane-key
473
- migration removes `panes.agents` and `panes.keepFailed` from an older file before
474
- strict startup reads it. Other reported paths still require deliberate editing.
521
+ unknown or retired key remains a validation error on that doctor run.
522
+ Registered `clio-coder upgrade` migrations are the narrow exception. Upgrade
523
+ moves a version-1 or unversioned settings document into the version-2 areas,
524
+ records the migration, and keeps the byte-exact original as
525
+ `settings.yaml.v1.bak`. A source/destination collision refuses the migration
526
+ without replacing the original. Other reported paths still require deliberate
527
+ editing.
475
528
 
476
529
  ---
477
530
 
478
531
  ## Live routing vs saved defaults
479
532
 
480
- The routing keys in `settings.yaml` (`orchestrator.*`, `background.*`, `workers.default.*`, `scope`) are **defaults**, not a live control surface. Each interactive session seeds its routing from them at launch and owns it from then on:
481
-
482
- - Interactive changes (`/model`, Alt+L, `/settings`, Shift+Tab, `/thinking`, Alt+J / Alt+K, `/scoped-models`) apply to the current session immediately and are written back as the defaults for sessions launched later.
483
- - Writes from other processes, such as a second Clio session, `clio-coder targets use`, `clio-coder configure`, or a manual edit, update the defaults and the shared target catalog. These writes never redirect a running session's chat or fleet routing. The running session shows a notice when the saved defaults diverge from its active routing.
484
- - Non-routing settings (theme, keybindings, autonomy level, retry, compaction, commit attribution, target catalog entries) still hot-reload into running sessions as before.
485
- - `/resume` and `/new` switch sessions, not routing: the terminal keeps its active target/model/thinking across session switches.
486
-
487
- This is what makes several concurrent Clio terminals safe: each one routes through its own state, and `settings.yaml` only decides where the *next* session starts.
488
-
489
- Supporting mechanics:
490
-
491
- - **The `/settings` Center tracks live state.** Every editable row re-derives from the session's effective settings after each committed edit and whenever the shared snapshot reloads while the Center is open. Changing `orchestrator.target` rebases `orchestrator.model` on the new target's default model, matching Alt+L and `clio-coder targets use`, and the `orchestrator.thinkingLevel` row immediately offers the levels the new model supports. Cursor position and any open submenu are preserved across refreshes.
492
- - **Saved-default writes are serialized across processes.** Every settings writer (interactive write-throughs, `clio-coder targets`, `clio-coder configure`) performs its read-modify-write under an advisory lock file (`settings.yaml.lock`) and lands the result via an atomic temp-file + rename. Two processes saving defaults at the same time can no longer drop each other's patches, readers never block and never see partial files, and a lock left behind by a dead process is taken over after a few seconds.
493
- - **Recently selected models are runtime state, not configuration.** They live in the state dir (`recent-models.json`), so an Alt+L pick never rewrites `settings.yaml` and never pings the config watcher in other running sessions. Settings validation is strict: a `state.recentModels` key in `settings.yaml` is an unknown-key error during normal startup and must be removed deliberately. `modelSelector.favorites` stays in `settings.yaml` because favorites are deliberate user configuration.
494
- - **ACP sessions get the notices through the session ledger.** Sessions served over the Agent Client Protocol (`clio-coder` in ACP mode) have the same routing isolation, but ACP v1 offers no agent-initiated advisory channel: its `session/update` union only carries prompt-turn content, and out-of-turn updates would break strict clients. The external-divergence and target-removed notices are therefore recorded as `custom` session-ledger entries (`customType: "clio.routing-notice"`), visible to `/resume` and session tooling.
533
+ The routing keys in `settings.yaml`—`chat.*`, `context.memory.*`,
534
+ `fleet.default.*`, and `chat.modelPicker.*`—are defaults. Each interactive
535
+ session seeds its route at launch and then owns that active route:
536
+
537
+ - Interactive changes through `/model`, `/thinking`, `/settings`, and the
538
+ model-picker keys apply to the current session after confirmation and can be
539
+ saved as defaults for later sessions.
540
+ - Writes from another process update shared defaults and the target catalog,
541
+ but never redirect a running session. The active session reports when its
542
+ route differs from the saved default.
543
+ - Non-routing values apply at the boundary named in the
544
+ [settings inventory](#settings-inventory): immediately, next turn, next
545
+ dispatch, next session, or restart.
546
+ - `/resume` and `/new` switch session history without silently changing the
547
+ terminal's active target, model, or thinking level.
548
+
549
+ Every settings writer uses an advisory lock and atomic replacement, so
550
+ concurrent saves cannot expose a partial YAML file. Recently selected models
551
+ are machine state in `recent-models.json`; deliberate favorites remain
552
+ configuration under `chat.modelPicker.favorites`. ACP sessions preserve
553
+ routing-divergence notices in the session ledger because ACP v1 has no
554
+ out-of-turn advisory channel.
495
555
 
496
556
  ---
497
557
 
498
558
  ## Settings Center
499
559
 
500
- Open `/settings` in the TUI to edit session-visible defaults in a full-screen transactional Center. Wide terminals (≥72 columns) show sections in a left sidebar and the selected section's rows in the main pane; ultrawide terminals (≥112 columns) expand the layout to include a dedicated right-hand inspector. Below 72 columns, the Center switches to a modal drill-down stack (section list → section rows → detail drawer) with breadcrumbs, `/` search filtering, and `Esc` backtracking. Below 60 columns, side margins drop to zero for full-width presentation.
560
+ Open `/settings` in the TUI to edit session-visible values and saved defaults.
561
+ Wide terminals use a section sidebar and detail inspector; narrow terminals
562
+ switch to a drill-down flow with breadcrumbs, search, and `Esc` backtracking.
501
563
 
502
- Every value change in Settings is transactional: selecting an editable row and pressing `Enter` opens a dedicated value picker, text input dialog, or provider-backed checklist (rather than immediately cycling values). Clio constructs an immutable change plan with preflight impact analysis and presents explicit destination choices:
503
- - `Apply this session` (for live-capable settings)
564
+ Every edit is transactional. Depending on the setting, the confirmation offers:
565
+
566
+ - `Apply this session`
504
567
  - `Apply and save globally`
505
- - `Cancel` (or `Esc`)
568
+ - `Cancel`
506
569
 
507
- For restart-required settings (`budget.concurrency`, `runtimePlugins`, `terminal.tuiMode`, `terminal.fullscreenScrollbar`), the session-only option is suppressed and global saving announces `Saved to settings.yaml · restart Clio to apply`. For destructive actions (removing a target or fleet profile), the confirmation preflight details affected chat, fleet, and memory routes before execution.
570
+ Restart-required settings—`fleet.concurrency`,
571
+ `integrations.runtimePlugins`, `interface.mode`, and
572
+ `interface.fullscreenScrollbar`—offer only global save and say that Clio must
573
+ restart. Destructive actions such as removing a target or fleet profile show
574
+ the affected chat, fleet, and memory routes before confirmation.
508
575
 
509
- The Settings Center organizes all configuration under four non-selectable group headers:
576
+ The durable configuration has seven top-level areas, and `/settings` accepts
577
+ each as a stable deep link:
510
578
 
511
- | Group | Section | Rows, in order |
512
- | --- | --- | --- |
513
- | **CORE** | Autonomy & Safety (`safety`) | `autonomy`, `workers.onPermission`, the escalation bounds that keep that posture non-stall (`workers.escalation.timeoutMs`, `workers.escalation.fallback`), `delegation.defaults.toolGovernance`, `skills.trustProjectCompatRoots`, and the read-only safety-net fact. |
514
- | **CORE** | Orchestrator (`orchestrator`) | `orchestrator.thinkingLevel`, `orchestrator.target`, `orchestrator.model`, the memory plane (`background.target`, `background.model`, `background.thinkingLevel`), and the proactive-memory knobs (`memory.intervention.enabled`, `.everyNTools`, `.windowSteps`, `.maxTokens`, `.timeoutMs`), and `prewarm.enabled`. Changing target rebases model and thinking choices. |
515
- | **ROUTING** | Fleet (`fleet`) | `workers.default.target`, `workers.default.model`, `workers.default.thinkingLevel`, `workers.maxRetries`, `workers.resilienceCooldownMs`, `workers.profiles`, `workers.agentBindings`, and the routing activation set (`routing.activeRoles`, `routing.activePostures`, and the read-only `routing.agentAutomation.activeAgentRoles`), rendered under the group headers `Defaults`, `Profiles`, `Agent routes`, `Route activation`, and `Placement`. Profile rows carry a `◆ Edit` drill-down and a destructive removal preflight; placement rows are read-only node status. |
516
- | **ROUTING** | Targets (`targets`) | The `targets` console table (`HEALTH`, `ID`, `ROLES`, `RUNTIME`, `LATENCY`) with an in-place action and detail drawer for URL, default model, last probe, and failure reason. Actions include `Use`, `Connect`, `Probe`, and `Remove`. |
517
- | **ROUTING** | Models (`models`) | `scope`, `modelSelector.recentLimit`, and `modelSelector.favorites`, rendered as a provider-backed checklist with target-level and target/model entries, `Space` toggle, capability inspector, and a preserved `Unavailable` group. Deep link `/scoped-models`. |
518
- | **RUNTIME** | Budget (`budget`) | `budget.sessionCeilingUsd`, `defaults.maxTokens`, `budget.concurrency` (restart required), and the six `guardrails.*` backstops under a `Guardrails` group header. |
519
- | **RUNTIME** | Compaction (`compaction`) | `compaction.auto`, `compaction.threshold`, `compaction.excludeLastTurns`, and the five `context.workingSet.*` keys under a `Working set` group header. |
520
- | **RUNTIME** | Retry (`retry`) | `retry.enabled`, `retry.maxRetries`, `retry.baseDelayMs`, `retry.maxDelayMs`, and `retry.streamStallMs`. |
521
- | **EXPERIENCE** | Terminal (`terminal`) | `terminal.showTerminalProgress`, `terminal.outputVerbosity` (`minimal`, `default`, `verbose`), `terminal.tuiMode` (`regular`, `fullscreen`), `terminal.fullscreenScrollbar` (`hidden`, `auto`, `always`), `terminal.smoothStreaming` (`off`, `auto`, `on`), `terminal.notify`, and `theme`. |
522
- | **EXPERIENCE** | Watchdog (`watchdog`) | `watchdog.enabled`, `watchdog.target`, and `watchdog.cadenceToolCalls`. The two optional keys are editable text rows that render their absence as `(session target)` and `(turn end only)`; submitting an empty value removes the key from `settings.yaml` rather than storing a blank. |
523
- | **EXPERIENCE** | Advanced (`advanced`) | `runtimePlugins`, `attribution.gitCommits`, `compaction.model`, `compaction.systemPrompt`, `delegation.defaults.connectTimeoutMs`, `delegation.defaults.turnTimeoutMs`, `delegation.defaults.permissionTimeoutMs`, `keybindings`, `delegation.agents`, and the four `library.*` keys under a `Library` group header. `library.confirmedRemote` is read-only: the confirm flow writes it, because confirming a remote from its own row would be the trust record confirming itself. |
524
-
525
- Every key `settings.yaml` accepts now has a row, except the ones the Center cannot edit as a nested structure: `workers.rosters` and `routing.agentAutomation.activeAgentRoles` are authored in `settings.yaml`, and the latter has a read-only row that reports the active pairs. `tests/contracts/settings-center.test.ts` enforces this against `DEFAULT_SETTINGS`.
526
-
527
- Label to config path mapping:
528
-
529
- | Label | Config path |
579
+ | Area | What it owns |
530
580
  | --- | --- |
531
- | Autonomy level | `autonomy` |
532
- | Fleet approvals routing | `workers.onPermission` |
533
- | Escalation timeout (ms) | `workers.escalation.timeoutMs` |
534
- | Escalation fallback | `workers.escalation.fallback` (`deny` or `fail`) |
535
- | Delegation governance | `delegation.defaults.toolGovernance` |
536
- | Trust project skill roots | `skills.trustProjectCompatRoots` |
537
- | Safety net | read-only fact, no config path |
538
- | Thinking level | `orchestrator.thinkingLevel` |
539
- | Target | `orchestrator.target` |
540
- | Model | `orchestrator.model` |
541
- | Memory target | `background.target` |
542
- | Memory model | `background.model` |
543
- | Memory thinking level | `background.thinkingLevel` |
544
- | Proactive memory | `memory.intervention.enabled` |
545
- | Memory cadence (tools) | `memory.intervention.everyNTools` |
546
- | Memory trajectory steps | `memory.intervention.windowSteps` |
547
- | Memory reminder tokens | `memory.intervention.maxTokens` |
548
- | Memory timeout (ms) | `memory.intervention.timeoutMs` |
549
- | Prompt pre-warm | `prewarm.enabled` |
550
- | Default target | `workers.default.target` |
551
- | Default model | `workers.default.model` |
552
- | Default thinking level | `workers.default.thinkingLevel` |
553
- | Fleet retries | `workers.maxRetries` |
554
- | Resilience cooldown (ms) | `workers.resilienceCooldownMs` (0 disables the cooldown) |
555
- | Active routing roles | `routing.activeRoles` (comma-separated from `researcher`, `verifier`, `reviewer`, `judge`) |
556
- | Active routing postures | `routing.activePostures` (comma-separated from `quality`, `balanced`, `latency`, `economy`) |
557
- | Active agent routes | `routing.agentAutomation.activeAgentRoles` (read-only; edit the pairs in `settings.yaml`) |
558
- | Add profile | `workers.profiles` |
559
- | Add agent route | `workers.agentBindings` |
560
- | Configured targets | `targets` |
561
- | Model cycle set | `scope` |
562
- | Recent models kept | `modelSelector.recentLimit` |
563
- | Pinned favorites | `modelSelector.favorites` |
564
- | Session ceiling (USD) | `budget.sessionCeilingUsd` |
565
- | Output budget (tokens) | `defaults.maxTokens` |
566
- | Fleet concurrency | `budget.concurrency` (restart required) |
567
- | Turn tool-call budget | `guardrails.turnToolCallBudget` |
568
- | Worker tool-call cap | `guardrails.workerToolCallCap` |
569
- | Run ledger retention | `guardrails.maxDispatchRuns` |
570
- | Read byte cap | `guardrails.readMaxBytes` |
571
- | Observation byte pool | `guardrails.observationTurnBudgetBytes` |
572
- | Internal dispatch timeout (ms) | `guardrails.internalDispatchTimeoutMs` |
573
- | Auto-compact | `compaction.auto` |
574
- | Compaction threshold | `compaction.threshold` |
575
- | Protected recent turns | `compaction.excludeLastTurns` |
576
- | Working-set eviction | `context.workingSet.enabled` |
577
- | Eviction policy | `context.workingSet.policy` (`structural-v1` or `age-horizon`) |
578
- | Eviction target pressure | `context.workingSet.target` (greater than 0, less than 1) |
579
- | Turns protected from eviction | `context.workingSet.protectLastTurns` |
580
- | Minimum evictable tokens | `context.workingSet.minEvictableTokens` |
581
- | Retry transient errors | `retry.enabled` |
582
- | Max retries | `retry.maxRetries` |
583
- | Base delay (ms) | `retry.baseDelayMs` |
584
- | Max delay (ms) | `retry.maxDelayMs` |
585
- | Stream stall timeout (ms) | `retry.streamStallMs` |
586
- | Terminal progress badges | `terminal.showTerminalProgress` |
587
- | Output detail | `terminal.outputVerbosity` (`minimal`, `default`, or `verbose`) |
588
- | TUI mode | `terminal.tuiMode` (`regular` or `fullscreen`, restart required) |
589
- | Fullscreen scrollbar | `terminal.fullscreenScrollbar` (`hidden`, `auto`, or `always`, restart required) |
590
- | Smooth streaming | `terminal.smoothStreaming` (`off`, `auto`, or `on`, live) |
591
- | Desktop notifications | `terminal.notify` |
592
- | Turn-end watchdog | `watchdog.enabled` |
593
- | Watchdog target | `watchdog.target` (blank clears the key) |
594
- | Watchdog cadence (tools) | `watchdog.cadenceToolCalls` (integer ≥ 1; blank clears the key) |
595
- | Theme | `theme` |
596
- | Runtime plugins | `runtimePlugins` |
597
- | Clio commit provenance | `attribution.gitCommits` (`enabled` or `disabled`, live) |
598
- | Compaction model | `compaction.model` |
599
- | Compaction prompt | `compaction.systemPrompt` |
600
- | Delegate connect (ms) | `delegation.defaults.connectTimeoutMs` |
601
- | Delegate turn (ms) | `delegation.defaults.turnTimeoutMs` |
602
- | Delegate permission (ms) | `delegation.defaults.permissionTimeoutMs` |
603
- | Keybinding overrides | `keybindings` |
604
- | Delegation agents | `delegation.agents` |
605
- | Library catalog path | `library.catalog` (blank uses the config directory) |
606
- | Library remote | `library.remote` (blank keeps the library local) |
607
- | Confirmed library remote | `library.confirmedRemote` (read-only; written by the confirm flow) |
608
- | Library sync | `library.sync` |
581
+ | `chat` | Active target/model defaults, thinking, model picker, output budget, pre-warm, and interactive retry |
582
+ | `fleet` | Worker defaults, profiles, rosters, routes, nodes, permissions, capacity, limits, retry, and run history |
583
+ | `targets` | Runtime connections, advertised models, auth metadata, and capability overrides |
584
+ | `context` | Working set, compaction, and proactive memory |
585
+ | `safety` | Autonomy, cost/tool/read limits, and the optional review watchdog |
586
+ | `interface` | Output detail, terminal behavior, notifications, keybindings, and experimental pane settings |
587
+ | `integrations` | Project-resource trust, external agents, runtime plugins, resource library, and Git attribution |
588
+
589
+ The Center groups rows with task-oriented labels such as Orchestrator, Targets,
590
+ Models, Fleet, Budget, and Terminal. The YAML paths shown in row details and in
591
+ this guide remain the canonical version-2 paths in the inventory below.
609
592
 
610
593
  ---
611
594
 
@@ -628,11 +611,11 @@ This is the version-2 durable schema shipped in `DEFAULT_SETTINGS`. Validation i
628
611
  | --- | --- | --- | --- |
629
612
  | `chat.target` | `null` | configured target id or null | next session |
630
613
  | `chat.model` | `null` | string or null | next session |
631
- | `chat.thinkingLevel` | `off` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | next session |
614
+ | `chat.thinkingLevel` | `low` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | next session |
632
615
  | `chat.modelPicker.cycleSet` | `[]` | list of target or target/model references | immediately for this session; next session as the saved default |
633
616
  | `chat.modelPicker.favorites` | `[]` | list of target/model references | immediately |
634
617
  | `chat.modelPicker.recentLimit` | `12` | integer ≥ 1 | immediately |
635
- | `chat.maxOutputTokens` | `32768` | integer ≥ 0 | next turn |
618
+ | `chat.maxOutputTokens` | `0` | integer ≥ 0; `0` uses the model cap or the 32,768-token fallback when unknown | next turn |
636
619
  | `chat.prewarm` | `true` | boolean | next turn |
637
620
  | `chat.retry.enabled` | `true` | boolean | next turn |
638
621
  | `chat.retry.maxRetries` | `3` | integer ≥ 0 | next turn |
@@ -671,6 +654,7 @@ This is the version-2 durable schema shipped in `DEFAULT_SETTINGS`. Validation i
671
654
 
672
655
  | Key | Default | Validation | When it applies |
673
656
  | --- | --- | --- | --- |
657
+ | `context.toolResultMaxBytes` | `65536` | integer ≥ 4096; complete overflow spills to the session scratch file; three full-size results consume the default 196,608-byte turn pool, so a fourth finds it filled | next turn; a live session change applies to the next tool result |
674
658
  | `context.workingSet.enabled` | `true` | boolean | next turn |
675
659
  | `context.workingSet.policy` | `structural-v1` | `structural-v1` or `age-horizon` | next turn |
676
660
  | `context.workingSet.target` | `0.6` | number greater than 0 and less than 1 | next turn |
@@ -688,9 +672,11 @@ This is the version-2 durable schema shipped in `DEFAULT_SETTINGS`. Validation i
688
672
  | `context.memory.maxOutputTokens` | `2000` | integer ≥ 1 | next turn |
689
673
  | `context.memory.timeoutMs` | `60000` | integer ≥ 1 | next turn |
690
674
 
675
+ The compaction and memory controls serve different roles. An unset `context.compaction.model` uses active chat; an explicit model must uniquely resolve to an available eligible summary route or fail visibly. `context.compaction.systemPrompt` is a nonempty UTF-8 prompt file, at most 65,536 bytes, read at compaction time and resolved relative to the session workspace. Configure `context.memory.target` and `context.memory.model` to opt into model-based memory; unset roles remain rules-only. Memory prefers its dedicated route and can use active chat when that route is unavailable and request capacity permits. Known dedicated saturation skips the step rather than initiating failover; neither routing choice edits saved settings.
676
+
691
677
  ### Safety
692
678
 
693
- The six limit leaves retain their one-process environment overrides where documented in [environment-variables.md](environment-variables.md); resolution is environment, then v2 settings, then compiled default.
679
+ The safety-limit leaves have no one-process `CLIO_CODER_*` overrides in the current schema. Resolution follows the normal settings stack, from session or project layers where supported through user `settings.yaml`, then the compiled default.
694
680
 
695
681
  | Key | Default | Validation | When it applies |
696
682
  | --- | --- | --- | --- |
@@ -717,7 +703,7 @@ The six limit leaves retain their one-process environment overrides where docume
717
703
  | `interface.panes.notifications` | `failures` | `failures`, `all`, `off` | immediately |
718
704
  | `interface.panes.layout` | `off` | `off`, `workers`, `cockpit` | restart |
719
705
  | `interface.panes.workers.ratio` | `0.34` | finite dock ratio | restart |
720
- | `interface.panes.files.enabled` | `true` | boolean | immediately on the next files-pane open |
706
+ | `interface.panes.files.enabled` | `false` | boolean | immediately on the next files-pane open |
721
707
  | `interface.panes.files.mode` | `companion` | `companion` or `chooser` | immediately on the next files-pane open |
722
708
  | `interface.panes.files.profile` | `managed` | `managed` or `user` | immediately on the next files-pane open |
723
709
  | `interface.panes.files.followCwd` | `true` | boolean | immediately on the next files-pane open |
@@ -733,7 +719,7 @@ The six limit leaves retain their one-process environment overrides where docume
733
719
  | `integrations.externalAgents.defaults.connectTimeoutMs` | `30000` | integer ≥ 1 | next dispatch |
734
720
  | `integrations.externalAgents.defaults.turnTimeoutMs` | `300000` | integer ≥ 1 | next dispatch |
735
721
  | `integrations.externalAgents.defaults.permissionTimeoutMs` | `120000` | integer ≥ 1 | next dispatch |
736
- | `integrations.externalAgents.defaults.toolGovernance` | `clio-policy` | `clio-policy`, `agent-managed`, `deny-all` | next dispatch |
722
+ | `integrations.externalAgents.defaults.toolGovernance` | `clio-coder-policy` | `clio-coder-policy`, `agent-managed`, `deny-all` | next dispatch |
737
723
  | `integrations.runtimePlugins` | `[]` | list of plugin package names | restart |
738
724
  | `integrations.library.catalog` | `null` | string or null | next turn |
739
725
  | `integrations.library.remote` | `null` | string or null | next turn |
@@ -792,13 +778,22 @@ Review and connect detected agents with:
792
778
  clio-coder configure --interop
793
779
  ```
794
780
 
795
- On a terminal this walks the pending proposals one at a time, showing the exact YAML entry before it asks, and writes only what you answer yes to. Without a TTY it prints the proposals and exits 0 with `settings.yaml` byte-identical, which is what `scripts/install-local.sh` runs after `doctor --fix`. The interactive `clio-coder configure` wizard ends with the same review, and `/interop` in the TUI is the same flow as an overlay.
781
+ On a terminal this walks the pending proposals one at a time, showing the exact
782
+ YAML entry before it asks, and writes only what you answer yes to. Without a
783
+ TTY it prints the proposals and exits 0 with `settings.yaml` byte-identical.
784
+ The interactive `clio-coder configure` wizard ends with the same review, and
785
+ `/agents connect` in the TUI opens the same flow.
796
786
 
797
- No code path writes `delegation.agents` without an operator decision, and `doctor --fix` is not such a path. An accepted proposal appends exactly one entry through the serialized settings writer, which re-reads the file under its lock, so two processes accepting different agents cannot drop each other's entry. The appended entry carries `toolGovernance: clio-policy` and no `projectContext` key, so the peer inherits `projectContext: "none"` and receives your task text rather than the project projection. Both facts are shown before you are asked.
787
+ No code path writes `integrations.externalAgents.entries` without an operator
788
+ decision, and `doctor --fix` is not such a path. An accepted proposal appends
789
+ exactly one entry through the serialized settings writer under its lock. The
790
+ entry carries `toolGovernance: clio-coder-policy` and no `projectContext` key,
791
+ so the peer receives task text rather than the project projection. Both facts
792
+ are shown before confirmation.
798
793
 
799
794
  Decisions are recorded in `<CLIO_CODER_HOME>/state/interop.json`, schema v1, written atomically only when an explicit decision is taken; `doctor` and non-TTY `configure --interop` write nothing at all. Each decision is keyed by agent kind plus a fingerprint of the facts it was made against (version and path), so a declined agent stays silent while its binary path and version hold, and comes back as a fresh proposal when either moves. Accepting and declining in one review persists both decisions. A file this version cannot parse degrades to "no report" rather than acting on a half-read decision record. Project-scoped facts stay where they already live, in `.clio-coder/state.json` under `contextSources`.
800
795
 
801
- Clio never writes into a foreign agent's directory. The safety path policy carries a `noWritePaths` class populated from the same registry; see [safety-model.md](safety-model.md) for the enumerated classes.
796
+ Clio never writes into a foreign agent's directory. The safety path policy carries a `noWritePaths` class populated from the same registry; see [safety-model.md](../architecture/safety-model.md) for the enumerated classes.
802
797
 
803
798
  ---
804
799
 
@@ -852,7 +847,7 @@ clio-coder configure \
852
847
  --max-tokens 4096
853
848
  ```
854
849
 
855
- See [alcf-provider.md](alcf-provider.md) for the Globus login and ALCF discovery
850
+ See [alcf-provider.md](../architecture/alcf-provider.md) for the Globus login and ALCF discovery
856
851
  details.
857
852
 
858
853
  ### 3. Sanctioned Claude Code Worker Runtimes (Worker-Only)
@@ -881,26 +876,47 @@ You can drive Claude Code as an external delegation agent over the Agent Client
881
876
  - **Advisory Gating:** Under ACP, gating is **advisory** because Claude self-governs its tools; prefer `claude-sdk` for **enforced** per-tool safety where Clio's safety net intercepts every action class.
882
877
  - **Configuration Recipe:** Configure by adding a delegation agent in `settings.yaml` (a commented recipe is included by default):
883
878
  ```yaml
884
- delegation:
885
- agents:
886
- - id: claude-code
887
- command: npx
888
- args: ["-y", "@zed-industries/claude-code-acp"]
889
- toolGovernance: clio-policy
879
+ integrations:
880
+ externalAgents:
881
+ entries:
882
+ - id: claude-code
883
+ command: npx
884
+ args: ["-y", "@zed-industries/claude-code-acp"]
885
+ toolGovernance: clio-coder-policy
890
886
  ```
891
887
  Then invoke it using `/delegate claude-code <task>`.
892
888
 
893
- ### 5. Google Antigravity CLI Runtime (Worker-Only)
889
+ ### 5. Antigravity CLI Experimental Local Delegation (Worker-Only)
894
890
 
895
- The `antigravity-code` runtime drives your local Google Antigravity CLI (`agy`) installation to execute subagent tasks. It runs the CLI as a subprocess using the `agy --print` command and maps Clio autonomy levels onto the CLI's permission flags.
891
+ The `antigravity-code` runtime is a local external delegation agent. It lets Clio ask an official Antigravity CLI (`agy`) installed and authenticated by the operator for research, world knowledge, a second opinion, or a bounded subtask. It is deliberately **not** a Gemini chat provider and can never become the Clio orchestrator.
896
892
 
897
- Google Antigravity supports a context window of up to 1,000,000 tokens and is suitable for large-context codebase reasoning. Because `agy` emits plain text without structured events, Clio cannot perform fine-grained tool call interception. Gating is applied coarsely: read-only runs pass both `--mode plan` (the no-change agent posture) and `--sandbox` (terminal restrictions). Full-auto passes `--dangerously-skip-permissions` only when the environment variable `CLIO_CODER_ALLOW_EXTERNAL_FULL_ACCESS=1` is explicitly set.
893
+ This integration is experimental and intended only for personal use on your own machine. Clio does not install Antigravity, initiate Google sign-in, copy credentials, or read the CLI's credential store. Install the [official Antigravity CLI](https://antigravity.google/docs/cli/overview), run `agy` yourself to sign in, and keep it current. Clio then starts that same local executable for an explicit delegation. The integration feature-probes the required structured catalog; if the installed CLI lacks it, Clio asks the operator to update `agy` rather than relying on a hard-coded minimum version.
898
894
 
899
- Configured targets use your existing local `agy` login and credentials. Supported model names include `Gemini 3.5 Flash (High)` as the default tier, `Gemini 3.5 Flash (Medium)`, `Gemini 3.5 Flash (Low)`, `Gemini 3.1 Pro (High)`, `Gemini 3.1 Pro (Low)`, `Claude Sonnet 4.6 (Thinking)`, `Claude Opus 4.6 (Thinking)`, and `GPT-OSS 120B (Medium)`.
895
+ Clio sends one literal prompt as a `stream-json` stdin record, closes stdin, and validates agy's init, delta, and single terminal-result sequence, including the opaque conversation identifier and provider-reported token counts. Prompt text never appears in argv and slash-command expansion is disabled. `clio-coder targets --probe --target <id>` runs the non-generating `agy --output-format json models` command and distinguishes missing CLI, sign-in required, CLI update required, unavailable live catalog, and configured-model disappearance. A successful account catalog is authoritative. The five built-in slugs are cold-start hints only; live `{id,label}` rows and last-good cached labels are displayed without replacing the stable model slug, and cached fallback is marked stale.
900
896
 
901
- **Configuration Example:**
897
+ Antigravity remains an external agent loop: Clio cannot intercept each tool call. Every launch disables slash-command expansion and sets an explicit posture rather than inheriting mutable CLI defaults:
898
+
899
+ | Clio autonomy | Antigravity launch posture |
900
+ | --- | --- |
901
+ | `read-only` | `--mode plan --sandbox` |
902
+ | `auto-edit` | `--mode accept-edits` |
903
+ | `suggest` | Refused because a headless subprocess cannot pause for Clio approval |
904
+ | `full-auto` | Capped at `accept-edits` unless the external full-access gate is explicitly enabled |
905
+
906
+ Only `full-auto` together with `CLIO_CODER_ALLOW_EXTERNAL_FULL_ACCESS=1` passes `--dangerously-skip-permissions`. Treat that as an external safety bypass: agy, not Clio's tool registry, controls the resulting filesystem, shell, network, prompts, and approvals. The gate is never enabled by onboarding. A `world-knowledge` dispatch remains read-only even if the caller requests a stronger posture; use another agent for mutation work.
907
+
908
+ **Setup and verification:**
902
909
  ```bash
903
- clio-coder configure --id agy-worker --runtime antigravity-code --model "Gemini 3.5 Flash (High)"
910
+ # Install using Google's instructions, then authenticate directly in the CLI.
911
+ agy
912
+ agy models
913
+
914
+ # Use a live model slug, then create and bind a read-only research profile.
915
+ clio-coder configure --id agy-research --runtime antigravity-code \
916
+ --model gemini-3.8-flash-high \
917
+ --agent-profile world-knowledge-external \
918
+ --bind-agent world-knowledge
919
+ clio-coder targets --probe --target agy-research
904
920
  ```
905
921
 
906
922
 
@@ -917,11 +933,12 @@ Useful flags:
917
933
  | `--fleet-model <id>` | Model to save for fleet default. |
918
934
  | `--agent-profile <name>` | Save this target/model as a named fleet profile. |
919
935
  | `--agent-profile-model <id>` | Model to save for the named fleet profile. |
936
+ | `--bind-agent <agentId>` | Bind the agent to `--agent-profile` in the same configuration write; requires `--agent-profile`. |
920
937
  | `--api-key-env <VAR>` | Read API key from the environment at call time. |
921
938
  | `--api-key <literal>` | Store an API key in `credentials.yaml`. |
922
939
  | `--force` | Allow model/capability choices outside the local catalog guardrails. |
923
940
  | `--gateway` | Mark target as a gateway. |
924
- | `--lifecycle <user-managed|clio-managed>` | Resident model lifecycle policy. An explicit `user-managed` makes Clio observe-only on this target (never load/unload models); unset means Clio manages residency. |
941
+ | `--lifecycle <user-managed|clio-coder-managed>` | Resident model lifecycle policy. An explicit `user-managed` makes Clio observe-only on this target (never load/unload models); unset means Clio manages residency. |
925
942
  | `--set-orchestrator` | Use this target as the chat default. |
926
943
  | `--set-fleet-default` | Use this target as the fleet default. |
927
944
  | `--context-window <N>` | Override the target context-window capability. |
@@ -955,8 +972,6 @@ clio-coder targets rename <old> <new>
955
972
 
956
973
  Without `--fleet-target` the default fleet target follows the orchestrator, which is the single-node case. Pass `--fleet-target <id>` to keep them apart when one node orchestrates and another runs the fleet. The fleet target is validated for fleet dispatch through the same check a fleet profile uses, so it can be a worker-only runtime such as `claude-sdk`, `claude-code`, or `antigravity-code`. Its model defaults to that target's own default rather than the orchestrator's, because a model id resolved against one target means nothing on another; `--fleet-model <id>` names it explicitly. `clio-coder configure --set-fleet-default` and `clio-coder targets profile` remain the routes for per-agent fleet routing.
957
974
 
958
- `--worker-target` and `--worker-model` are accepted as aliases of `--fleet-target` and `--fleet-model`, carried over from before the worker/fleet rename.
959
-
960
975
  ### Target-Profile Subcommands
961
976
 
962
977
  The command `clio-coder targets profile` supports several subcommands to manage fleet worker profiles and agent bindings:
@@ -969,7 +984,11 @@ The command `clio-coder targets profile` supports several subcommands to manage
969
984
  - **unbind**: Unbind an agent from its profile. Use `clio-coder targets profile unbind <agentId>`.
970
985
  - **bindings**: List active agent-to-profile bindings. Use `clio-coder targets profile bindings [--json]` to output details in JSON format.
971
986
 
972
- Inside the TUI, `/targets` opens Settings → Targets, the operational target console. Targets are rendered in a compact console table with columns for `HEALTH`, `ID`, `ROLES`, `RUNTIME`, and `LATENCY`, paired with an in-place action/detail drawer for URL, default model, last probe timestamp, and failure reason. Available actions include `Use` (switches active orchestrator target and rebases model to target default), `Connect` (executes API-key, OAuth, or no-auth setup then probes), `Probe` (runs immediate reachability probe with live activity indicator), and `Remove` (with preflight analysis of affected chat, fleet, and memory routes). Adding a target is performed via `clio-coder targets add`.
987
+ Inside the TUI, `/settings targets` opens the operational target console.
988
+ Targets render with `HEALTH`, `ID`, `ROLES`, `RUNTIME`, and `LATENCY`, plus a
989
+ detail drawer for URL, default model, last probe, and failure reason. Actions
990
+ include `Use`, `Connect`, `Probe`, and `Remove`; adding a target uses
991
+ `clio-coder targets add`.
973
992
 
974
993
  ### Context-Window Provenance
975
994
 
@@ -1032,6 +1051,11 @@ Model rows combine:
1032
1051
  2. runtime-discovered models from probes;
1033
1052
  3. known models from bundled/provider catalogs.
1034
1053
 
1054
+ Each row reports its stable model id, optional human label, and source
1055
+ (`live`, cached, configured/default, or catalog). When a live authoritative
1056
+ catalog exists, a disappeared configured model is unavailable rather than being
1057
+ resurrected by a descriptor hint.
1058
+
1035
1059
  Capability badges in CLI output are compact:
1036
1060
 
1037
1061
  | Badge | Capability |
@@ -1054,7 +1078,7 @@ Representative built-in runtime IDs:
1054
1078
  | --- | --- |
1055
1079
  | Protocol-compatible | `openai-compat`, `anthropic-compat` generic surfaces for additional OpenAI-compatible or Anthropic-compatible APIs, including APIs such as InceptionAI when configured with the appropriate base URL and credentials. |
1056
1080
  | Cloud | `alcf`, `anthropic`, `bedrock`, `deepseek`, `google`, `groq`, `mistral`, `openai`, `openrouter` |
1057
- | Subscription and worker harnesses | `openai-codex` for ChatGPT OAuth, `anthropic-max` for Anthropic OAuth, `claude-sdk` for Claude Agent SDK workers, `claude-code` for `claude -p` subprocess workers, and `antigravity-code` for `agy --print` subprocess workers |
1081
+ | Subscription and worker harnesses | `openai-codex` for ChatGPT OAuth, `anthropic-max` for Anthropic OAuth, `claude-sdk` for Claude Agent SDK workers, `claude-code` for `claude -p` subprocess workers, and `antigravity-code` for structured `agy` external delegation |
1058
1082
  | Local native | `llamacpp`, `lmstudio`, `ollama-native`, `vllm`, `sglang`, `lemonade`, `lemonade-anthropic` |
1059
1083
 
1060
1084
  Some hidden aliases exist for backward compatibility or special surfaces; use `clio-coder configure --list --all` to see them.
@@ -1099,7 +1123,9 @@ OAuth refresh follows signal-aware credential mutation. Clio serializes the read
1099
1123
 
1100
1124
  Prefer `--api-key-env` for shared machines, HPC login nodes, and CI. Avoid committing literal secrets in settings or share archives. Stored keys are never printed back by `clio-coder auth status`, `clio-coder targets`, or `clio-coder configure`; only the source (env var name or `stored-api-key`) is shown.
1101
1125
 
1102
- For interactive auth, open `/targets`, select the row, and press `c`. For a stored credential cleanup, use `clio-coder auth logout <target-or-runtime>`.
1126
+ For interactive auth, open `/settings targets`, select the row, and press `c`.
1127
+ For stored credential cleanup, use
1128
+ `clio-coder auth logout <target-or-runtime>`.
1103
1129
 
1104
1130
  ---
1105
1131