@iowarp/clio-coder 0.4.1 → 0.4.2

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 (437) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/CONTRIBUTING.md +59 -36
  3. package/README.md +404 -472
  4. package/SECURITY.md +2 -1
  5. package/dist/{acp-ZILU3AUO.js → acp-TMDQZDIG.js} +7 -7
  6. package/dist/{agents-HYWGBGQR.js → agents-5N5NG3XG.js} +28 -28
  7. package/dist/assets/codewiki.json +1 -1
  8. package/dist/{auth-N3QT7CBO.js → auth-Z5CCBXKQ.js} +8 -9
  9. package/dist/{builtins-UJLMOVOV.js → builtins-K6TNDT24.js} +4 -4
  10. package/dist/{chunk-GVQJ5CCZ.js → chunk-2HFQNRV3.js} +7 -7
  11. package/dist/{chunk-QMXC4JB7.js → chunk-2NHR3NAY.js} +163 -1401
  12. package/dist/chunk-2X4RYJTJ.js +39 -0
  13. package/dist/{chunk-Y45G3AXC.js → chunk-2Z2IKEXI.js} +6 -10
  14. package/dist/{chunk-EIMVLWB3.js → chunk-34BHNEE3.js} +7 -3
  15. package/dist/{chunk-GIZNH63R.js → chunk-35MSIRKH.js} +9 -4
  16. package/dist/chunk-3EBYEESD.js +314 -0
  17. package/dist/{chunk-CTJ4RNAA.js → chunk-3F7VUY77.js} +2 -2
  18. package/dist/{chunk-AP73CFDC.js → chunk-3KIPBMUA.js} +2 -2
  19. package/dist/{chunk-J5LZHVIT.js → chunk-3M6DQK6S.js} +113 -35
  20. package/dist/{chunk-VEGN6WIQ.js → chunk-462T4EGZ.js} +2 -2
  21. package/dist/{chunk-AFKWHWXF.js → chunk-4JDLP6ZS.js} +33 -16
  22. package/dist/{chunk-6FN3E6KX.js → chunk-4O6MANBS.js} +2 -2
  23. package/dist/{chunk-AKB4GYDL.js → chunk-54ODD65L.js} +5 -5
  24. package/dist/{chunk-BBTJOK6Y.js → chunk-5KW52TEP.js} +3 -3
  25. package/dist/{chunk-6CCS4G3W.js → chunk-5PFYMY2V.js} +2 -2
  26. package/dist/chunk-77QIVUZB.js +1334 -0
  27. package/dist/{chunk-7OBGU7UB.js → chunk-7BHIY2MW.js} +7 -13
  28. package/dist/{chunk-3QSOM6PA.js → chunk-AZ4WMN4W.js} +2 -2
  29. package/dist/{chunk-6NJQITNH.js → chunk-B74PXLU7.js} +6 -3
  30. package/dist/{chunk-R23Z6K6I.js → chunk-B7HM5Z7T.js} +15 -15
  31. package/dist/{chunk-R32CLGZ6.js → chunk-BO7Y52RY.js} +81 -20
  32. package/dist/{chunk-UEDMSP56.js → chunk-BYMNWQ7O.js} +123 -148
  33. package/dist/{chunk-ZJLUDYFY.js → chunk-CRFOIAX3.js} +4 -4
  34. package/dist/{chunk-2NM363SV.js → chunk-CYZW7JHJ.js} +7 -7
  35. package/dist/{chunk-6HMJX2VU.js → chunk-DYHAXKHD.js} +38 -10
  36. package/dist/{chunk-THYWACCR.js → chunk-DZAW46HP.js} +3 -3
  37. package/dist/{chunk-FYUN5KZ3.js → chunk-DZEK6CJN.js} +17 -17
  38. package/dist/{chunk-3I5NY75V.js → chunk-E7GT7O5N.js} +5 -5
  39. package/dist/{chunk-VKFQTNDV.js → chunk-F2I26BDK.js} +4 -4
  40. package/dist/{chunk-HLW2MRKE.js → chunk-F4EKGO4N.js} +3 -1
  41. package/dist/{chunk-IXJT6DCX.js → chunk-FVDGR2ZL.js} +3 -3
  42. package/dist/{chunk-TZSKNMZG.js → chunk-GTUD2WMY.js} +2 -1
  43. package/dist/{chunk-7EPLI7VL.js → chunk-HIICAHCJ.js} +2 -2
  44. package/dist/{chunk-E67WX76H.js → chunk-HKMD33FO.js} +29 -80
  45. package/dist/chunk-HLAFFSEK.js +360 -0
  46. package/dist/{chunk-UAPGZHYC.js → chunk-I64IFBLB.js} +9 -2
  47. package/dist/{chunk-XKA2ICR3.js → chunk-I66ZTYNP.js} +440 -175
  48. package/dist/{chunk-7PWAODYW.js → chunk-I7XBWTYH.js} +2 -2
  49. package/dist/{chunk-PVAMAVBB.js → chunk-IDNA72AH.js} +102 -2
  50. package/dist/{chunk-GCSMB2KY.js → chunk-IKOZFYBN.js} +1 -1
  51. package/dist/{chunk-2VG7KLYV.js → chunk-IKSLQ4XV.js} +5460 -3241
  52. package/dist/{chunk-QKIFBZKT.js → chunk-IMXMHHMQ.js} +166 -25
  53. package/dist/{chunk-74YWRRU5.js → chunk-JBCS7CRR.js} +2 -2
  54. package/dist/{chunk-BDPT6GTK.js → chunk-JWJGP5DQ.js} +2 -2
  55. package/dist/{chunk-K6BF4U2H.js → chunk-KKOJXO6R.js} +62 -14
  56. package/dist/chunk-KPXDY6QF.js +47 -0
  57. package/dist/{chunk-ABLSQ6JX.js → chunk-LJID3DYZ.js} +7 -1
  58. package/dist/{chunk-VKRH2TCS.js → chunk-M2DAX4F6.js} +2 -2
  59. package/dist/{chunk-6I5ILFOF.js → chunk-M2WXEHER.js} +2 -2
  60. package/dist/{chunk-YPI3QQCF.js → chunk-MCEPRMZW.js} +2 -4
  61. package/dist/{chunk-N5UK64DP.js → chunk-MCMZMDAC.js} +2 -2
  62. package/dist/{chunk-Y4CAGMM6.js → chunk-MNJGS2IN.js} +5 -6
  63. package/dist/{chunk-TVHHYFHE.js → chunk-NEDJ26B5.js} +2 -2
  64. package/dist/{chunk-U2WB7TZS.js → chunk-NMJXSHBJ.js} +97 -85
  65. package/dist/{chunk-HUAS7ITX.js → chunk-O3YUNJZ2.js} +13 -21
  66. package/dist/{chunk-MA3H6DM5.js → chunk-P75RZCJW.js} +25 -3
  67. package/dist/{chunk-IG7BCQBA.js → chunk-PGF63K6I.js} +2 -2
  68. package/dist/chunk-PJX3WQUQ.js +42 -0
  69. package/dist/{chunk-6DWBAZ5U.js → chunk-Q4XWMHX6.js} +4 -6
  70. package/dist/{chunk-OJTRZGR3.js → chunk-QQLGQY2A.js} +8 -8
  71. package/dist/{chunk-J4HBWF6Y.js → chunk-RLYRBIYQ.js} +115 -20
  72. package/dist/{chunk-NLFAQR7Z.js → chunk-S66XZJOF.js} +3 -23
  73. package/dist/{chunk-C537JADH.js → chunk-SSEYRH53.js} +6 -7
  74. package/dist/chunk-SZAA6XDG.js +30 -0
  75. package/dist/{chunk-MOPSG2X7.js → chunk-TPEQIQIE.js} +6 -6
  76. package/dist/{chunk-JA5QWE4Z.js → chunk-UBRFI4HS.js} +1879 -1650
  77. package/dist/{chunk-BTGG6BG2.js → chunk-UH347SHR.js} +154 -15
  78. package/dist/{chunk-5YHDIDBP.js → chunk-UH632ZYL.js} +2 -2
  79. package/dist/{chunk-BWW4HLO4.js → chunk-UXCU4E3T.js} +8 -6
  80. package/dist/{chunk-6VC4OV3Z.js → chunk-VIA6RFQZ.js} +3 -11
  81. package/dist/{chunk-ZAZB4JMW.js → chunk-VKPAQYEB.js} +27 -8
  82. package/dist/{chunk-UXN6JT4W.js → chunk-W4YEMFBX.js} +2 -2
  83. package/dist/{chunk-TD3PGPQA.js → chunk-W6NIE6OW.js} +2 -2
  84. package/dist/{chunk-TVH4ONAM.js → chunk-X7IARSHT.js} +3 -3
  85. package/dist/{chunk-PJJ6MY27.js → chunk-XE3PCIXH.js} +3 -3
  86. package/dist/{chunk-FEFIFZTL.js → chunk-XGDPUNND.js} +2 -2
  87. package/dist/{chunk-SCYB3HA4.js → chunk-XOXV5GKE.js} +51 -16
  88. package/dist/{chunk-QTFGO774.js → chunk-XQRY4DTA.js} +24 -11
  89. package/dist/{chunk-BJGUKIG4.js → chunk-YJISEZKC.js} +2 -2
  90. package/dist/{chunk-GPPB3JBE.js → chunk-ZGNYYXQ6.js} +2 -2
  91. package/dist/{chunk-SINK3QR6.js → chunk-ZNT2M6TG.js} +7 -7
  92. package/dist/{chunk-7RY5VZPH.js → chunk-ZW4HH5JJ.js} +6 -6
  93. package/dist/cli/index.js +33 -32
  94. package/dist/{clio-IT3G3VQH.js → clio-7VB377CC.js} +7 -7
  95. package/dist/{code-nav-RK6S7F6E.js → code-nav-YVLCYA7V.js} +85 -17
  96. package/dist/{config-3QZRWZJF.js → config-4HVOS65E.js} +88 -43
  97. package/dist/{configure-FL7Y3KJF.js → configure-PIWO7B24.js} +10 -10
  98. package/dist/{context-5HE7ODYK.js → context-IYEHL3WQ.js} +33 -31
  99. package/dist/{context-XNHL75JV.js → context-KQYIWPWT.js} +47 -34
  100. package/dist/{context-KYQFRVDC.js → context-N6ZE3LGJ.js} +11 -11
  101. package/dist/{context-clear-N545L53A.js → context-clear-G4OGZJDS.js} +33 -31
  102. package/dist/{context-working-set-QHKXSV2F.js → context-working-set-BWLF6LJP.js} +7 -7
  103. package/dist/{dispatch-runner-RGIE5PCT.js → dispatch-runner-2QQAITS3.js} +38 -38
  104. package/dist/{docs-5NAF6AU7.js → docs-PD3EXDKU.js} +21 -20
  105. package/dist/{doctor-ZGPEGHIP.js → doctor-LHBD36VU.js} +23 -22
  106. package/dist/{eval-GXLL44RD.js → eval-C45FYRJ6.js} +21 -20
  107. package/dist/{eval-inventory-HBWSWQOK.js → eval-inventory-6DEJPLBF.js} +2 -2
  108. package/dist/{evidence-HWLBRH3Q.js → evidence-6SHONYAF.js} +30 -28
  109. package/dist/{evolve-FTZBMNVW.js → evolve-KRKMV72X.js} +30 -28
  110. package/dist/{extensions-VHRBEID7.js → extensions-KPZ2UHBB.js} +5 -3
  111. package/dist/{fleet-CKZHJWZJ.js → fleet-IVTCKDHT.js} +62 -61
  112. package/dist/{fleet-commands-EXDXBMV6.js → fleet-commands-EDWL3IT7.js} +5 -5
  113. package/dist/{fleet-decisions-OTHB6KRL.js → fleet-decisions-YP3YEFGK.js} +4 -4
  114. package/dist/{fleet-graph-YTEZUCUT.js → fleet-graph-ZFWKHY2M.js} +16 -14
  115. package/dist/{fleet-inspect-SS6YMDCK.js → fleet-inspect-FVUNCBML.js} +31 -29
  116. package/dist/{fleet-preflight-PBY4VYOM.js → fleet-preflight-UN5XED4R.js} +2 -2
  117. package/dist/{fleet-validate-KMEM5L3S.js → fleet-validate-XOWC4HSX.js} +17 -15
  118. package/dist/{fleet-verify-QD5M7E7Q.js → fleet-verify-UN3SODEL.js} +30 -28
  119. package/dist/{fleet-view-WAMJYNDT.js → fleet-view-TWHJKCN6.js} +31 -29
  120. package/dist/{init-5XQRBOFV.js → init-T2QORQ3Y.js} +50 -49
  121. package/dist/{interop-34TVO25M.js → interop-IN5I2A66.js} +5 -5
  122. package/dist/{library-3QY6KF57.js → library-LSCATDLZ.js} +15 -13
  123. package/dist/{memory-L4UTIIIW.js → memory-HYOKAGGJ.js} +31 -29
  124. package/dist/{models-ZVX3QOWE.js → models-2GPMFYCM.js} +22 -21
  125. package/dist/{monitor-CEKVSYTS.js → monitor-E4ASVUJH.js} +34 -32
  126. package/dist/{orchestrator-77BAP6BC.js → orchestrator-DDMPR3PY.js} +984 -583
  127. package/dist/{panes-7STHOAUJ.js → panes-E3RUXOW5.js} +4 -4
  128. package/dist/{panes-SHAUIRXY.js → panes-IXKLOKA2.js} +23 -8
  129. package/dist/{reset-EOLM7GVE.js → reset-OAQP3W4O.js} +4 -4
  130. package/dist/{resources-74GKTLSF.js → resources-OTRSN34L.js} +15 -13
  131. package/dist/{run-HBAUJNNZ.js → run-5DEYH5QK.js} +60 -59
  132. package/dist/{share-G3APVLVP.js → share-IHWTLO3M.js} +19 -15
  133. package/dist/{skills-35HHUKCR.js → skills-IYMXMKW4.js} +17 -15
  134. package/dist/{skills-eval-QN4HSHDC.js → skills-eval-DROHSJAR.js} +36 -36
  135. package/dist/{skills-inventory-J357J34F.js → skills-inventory-D7X4L4ZX.js} +15 -13
  136. package/dist/{slash-commands-JZZCQA32.js → slash-commands-QBM7UZ3B.js} +21 -18
  137. package/dist/{steer-XAVHJM22.js → steer-Z5DO23FJ.js} +2 -2
  138. package/dist/{targets-DSM6CY3M.js → targets-P2FUC4IL.js} +25 -28
  139. package/dist/{terminal-lease-JOPFUVEM.js → terminal-lease-YREJ3JX2.js} +5 -5
  140. package/dist/{tools-MKNWVPBH.js → tools-5B7RO6MV.js} +4 -4
  141. package/dist/{trace-ECQ7TIYZ.js → trace-YMGMUM6A.js} +55 -7
  142. package/dist/{upgrade-H7TOM7YL.js → upgrade-PXK3S2YM.js} +11 -9
  143. package/dist/{usage-X52N3IDJ.js → usage-ME5MPXGX.js} +36 -34
  144. package/dist/{verifiers-EJTVVSMA.js → verifiers-BVZ7IWOO.js} +5 -5
  145. package/dist/{verify-YJL6XET2.js → verify-5K7ZKQFC.js} +4 -4
  146. package/dist/{web-fetch-MPIFL3LL.js → web-fetch-MPARV2K7.js} +2 -2
  147. package/dist/{wiki-generate-4NDZTQ4B.js → wiki-generate-F5W5QTYY.js} +48 -47
  148. package/dist/{with-panes-OBOBFIIR.js → with-panes-BYOJCLAM.js} +51 -255
  149. package/dist/worker/entry.js +45 -30
  150. package/docs/README.md +176 -81
  151. package/docs/{acp.md → architecture/acp.md} +36 -20
  152. package/docs/{alcf-provider.md → architecture/alcf-provider.md} +8 -5
  153. package/docs/{architecture.md → architecture/architecture.md} +43 -22
  154. package/docs/{artifact-placement.md → architecture/artifact-placement.md} +26 -23
  155. package/docs/architecture/artifact-versions.md +90 -0
  156. package/docs/{capacity-and-scheduling.md → architecture/capacity-and-scheduling.md} +26 -13
  157. package/docs/{context-engine.md → architecture/context-engine.md} +25 -25
  158. package/docs/{context-working-set.md → architecture/context-working-set.md} +13 -10
  159. package/docs/{dispatch-architecture-rationale.md → architecture/dispatch-architecture-rationale.md} +12 -9
  160. package/docs/{dispatch-typed-intent.md → architecture/dispatch-typed-intent.md} +68 -46
  161. package/docs/{evidence-and-memory.md → architecture/evidence-and-memory.md} +23 -16
  162. package/docs/{middleware-and-components.md → architecture/middleware-and-components.md} +11 -5
  163. package/docs/{model-catalog.md → architecture/model-catalog.md} +40 -17
  164. package/docs/{observability.md → architecture/observability.md} +26 -13
  165. package/docs/{pi-boundary.md → architecture/pi-boundary.md} +24 -11
  166. package/docs/{prompt-envelope-and-tools.md → architecture/prompt-envelope-and-tools.md} +55 -20
  167. package/docs/{provider-adapter-cookbook.md → architecture/provider-adapter-cookbook.md} +35 -24
  168. package/docs/{safety-model.md → architecture/safety-model.md} +20 -15
  169. package/docs/{session-lifecycle.md → architecture/session-lifecycle.md} +8 -5
  170. package/docs/architecture/time-conventions.md +125 -0
  171. package/docs/{trace-store.md → architecture/trace-store.md} +13 -5
  172. package/docs/{tui-design.md → architecture/tui-design.md} +13 -13
  173. package/docs/{worker-dispatch-mechanics.md → architecture/worker-dispatch-mechanics.md} +27 -30
  174. package/docs/{built-in-agents.md → guide/built-in-agents.md} +50 -34
  175. package/docs/{commands-and-modes.md → guide/commands-and-modes.md} +65 -60
  176. package/docs/{configuration-and-targets.md → guide/configuration-and-targets.md} +227 -289
  177. package/docs/guide/configuration-reference.md +1158 -0
  178. package/docs/{environment-variables.md → guide/environment-variables.md} +31 -28
  179. package/docs/{exit-codes-and-output.md → guide/exit-codes-and-output.md} +6 -3
  180. package/docs/{extensions-and-sharing.md → guide/extensions-and-sharing.md} +41 -14
  181. package/docs/{fleet-dispatch.md → guide/fleet-dispatch.md} +39 -43
  182. package/docs/{glossary.md → guide/glossary.md} +14 -11
  183. package/docs/{installation-and-lifecycle.md → guide/installation-and-lifecycle.md} +44 -13
  184. package/docs/guide/panes-and-files.md +290 -0
  185. package/docs/{proactive-memory.md → guide/proactive-memory.md} +79 -66
  186. package/docs/{resource-library.md → guide/resource-library.md} +13 -4
  187. package/docs/{skills-marketplace.md → guide/skills-marketplace.md} +7 -3
  188. package/docs/{tool-usage.md → guide/tool-usage.md} +87 -23
  189. package/docs/{troubleshooting.md → guide/troubleshooting.md} +9 -4
  190. package/docs/{config-knobs-audit.md → history/config-knobs-audit.md} +11 -11
  191. package/docs/{release-cut-checklist.md → history/release-cut-checklist.md} +29 -2
  192. package/docs/{development-pipeline.md → process/development-pipeline.md} +24 -26
  193. package/docs/process/documentation-coverage.md +100 -0
  194. package/docs/process/documentation-guide.md +187 -0
  195. package/docs/{eval-runner.md → process/eval-runner.md} +41 -50
  196. package/docs/{evals-internal.md → process/evals-internal.md} +10 -10
  197. package/docs/{evolution.md → process/evolution.md} +2 -2
  198. package/docs/{fleet-demo-runbook.md → process/fleet-demo-runbook.md} +11 -7
  199. package/docs/{git-commit-provenance.md → process/git-commit-provenance.md} +11 -4
  200. package/docs/{performance-methodology.md → process/performance-methodology.md} +87 -69
  201. package/docs/{scientific-validation.md → process/scientific-validation.md} +4 -4
  202. package/evals/README.md +2 -2
  203. package/package.json +9 -7
  204. package/skills/README.md +46 -37
  205. package/skills/coding/ast-grep/SKILL.md +2 -2
  206. package/skills/coding/coding-standards/SKILL.md +2 -2
  207. package/skills/coding/prototype/SKILL.md +2 -2
  208. package/skills/coding/tdd/SKILL.md +2 -2
  209. package/skills/context/context-handoff/SKILL.md +2 -2
  210. package/skills/context/context-prime/SKILL.md +2 -2
  211. package/skills/git/file-ticket/SKILL.md +2 -2
  212. package/skills/git/fix-issue/SKILL.md +3 -3
  213. package/skills/git/resolve-merge-conflicts/SKILL.md +2 -2
  214. package/skills/git/ship/SKILL.md +2 -2
  215. package/skills/git/worktree-create/SKILL.md +2 -2
  216. package/skills/git/worktree-merge/SKILL.md +2 -2
  217. package/skills/meta/clio-coder-dev/SKILL.md +9 -5
  218. package/skills/meta/clio-coder-dev/evals.md +3 -2
  219. package/skills/meta/clio-coder-test/SKILL.md +102 -95
  220. package/skills/meta/clio-coder-test/evals.md +9 -4
  221. package/skills/meta/clio-coder-test/references/harness.md +100 -124
  222. package/skills/meta/clio-coder-test/references/test-map.md +77 -50
  223. package/skills/meta/credentials/SKILL.md +2 -2
  224. package/skills/meta/find-skills/SKILL.md +2 -2
  225. package/skills/meta/herdr/SKILL.md +2 -2
  226. package/skills/meta/skill-craft/SKILL.md +22 -16
  227. package/skills/planning/architecture/SKILL.md +2 -2
  228. package/skills/planning/backlog/SKILL.md +2 -2
  229. package/skills/planning/prd/SKILL.md +2 -2
  230. package/skills/planning/product-intent/SKILL.md +2 -2
  231. package/skills/planning/tech-spec/SKILL.md +2 -2
  232. package/skills/registry.yaml +62 -62
  233. package/skills/research/arxiv-literature/SKILL.md +2 -2
  234. package/skills/research/experiment-protocol/SKILL.md +2 -2
  235. package/skills/research/scientific-debugging/SKILL.md +2 -2
  236. package/skills/research/scientific-modernization/SKILL.md +2 -2
  237. package/skills/skill-marketplace.json +62 -62
  238. package/skills/workflow/cut-it/SKILL.md +2 -2
  239. package/skills/workflow/design-council/SKILL.md +2 -2
  240. package/skills/workflow/grill-me/SKILL.md +2 -2
  241. package/skills/workflow/workflow-distiller/SKILL.md +2 -2
  242. package/src/cli/args.ts +2 -2
  243. package/src/cli/bootstrap-generate.ts +1 -1
  244. package/src/cli/config-inspect.ts +65 -12
  245. package/src/cli/configure.ts +0 -4
  246. package/src/cli/docs.ts +22 -14
  247. package/src/cli/doctor-naming.ts +5 -5
  248. package/src/cli/doctor-toolchain.ts +3 -3
  249. package/src/cli/eval.ts +1 -2
  250. package/src/cli/extensions.ts +2 -1
  251. package/src/cli/fleet.ts +1 -1
  252. package/src/cli/index.ts +2 -1
  253. package/src/cli/internal-dispatch.ts +3 -4
  254. package/src/cli/panes.ts +19 -5
  255. package/src/cli/run.ts +2 -2
  256. package/src/cli/share.ts +5 -1
  257. package/src/cli/skills-eval.ts +3 -3
  258. package/src/cli/targets.ts +2 -6
  259. package/src/cli/trace.ts +55 -4
  260. package/src/cli/wiki-generate.ts +1 -1
  261. package/src/core/artifact-paths.ts +1 -1
  262. package/src/core/bash-exec.ts +131 -86
  263. package/src/core/bus-events.ts +51 -6
  264. package/src/core/config.ts +5 -1
  265. package/src/core/defaults.ts +7 -4
  266. package/src/core/dispatch-outcome.ts +16 -0
  267. package/src/core/guardrails.ts +10 -49
  268. package/src/core/prompt-hint.ts +9 -0
  269. package/src/domains/agents/builtins/architect.md +2 -3
  270. package/src/domains/agents/builtins/coder.md +3 -2
  271. package/src/domains/agents/builtins/debugger.md +2 -2
  272. package/src/domains/agents/builtins/documenter.md +2 -2
  273. package/src/domains/agents/builtins/git-master.md +1 -1
  274. package/src/domains/agents/builtins/oracle.md +1 -1
  275. package/src/domains/agents/builtins/provenance.md +1 -1
  276. package/src/domains/agents/builtins/researcher.md +1 -1
  277. package/src/domains/agents/builtins/scout.md +1 -1
  278. package/src/domains/agents/builtins/tester.md +2 -2
  279. package/src/domains/agents/builtins/verifier.md +2 -2
  280. package/src/domains/agents/builtins/wiki-writer.md +1 -1
  281. package/src/domains/agents/catalog.ts +12 -14
  282. package/src/domains/agents/contract.ts +2 -0
  283. package/src/domains/agents/extension.ts +23 -1
  284. package/src/domains/config/keybindings.ts +8 -0
  285. package/src/domains/context/extension.ts +0 -3
  286. package/src/domains/context/working-set/path-index.ts +1 -0
  287. package/src/domains/dispatch/capability-match.ts +10 -0
  288. package/src/domains/dispatch/extension.ts +105 -22
  289. package/src/domains/dispatch/host-verification.ts +435 -39
  290. package/src/domains/dispatch/intent-requirements.ts +10 -0
  291. package/src/domains/dispatch/intent.ts +18 -1
  292. package/src/domains/dispatch/path-scope.ts +235 -24
  293. package/src/domains/dispatch/run-event-journal.ts +4 -15
  294. package/src/domains/dispatch/state.ts +2 -3
  295. package/src/domains/dispatch/transport.ts +45 -21
  296. package/src/domains/dispatch/types.ts +55 -3
  297. package/src/domains/eval/artifacts/store.ts +5 -0
  298. package/src/domains/eval/store.ts +8 -1
  299. package/src/domains/evidence/trust-status.ts +10 -1
  300. package/src/domains/extensions/contract.ts +15 -1
  301. package/src/domains/extensions/discovery.ts +238 -41
  302. package/src/domains/extensions/extension.ts +105 -6
  303. package/src/domains/extensions/index.ts +24 -0
  304. package/src/domains/extensions/integrity.ts +189 -0
  305. package/src/domains/extensions/manager.ts +17 -1
  306. package/src/domains/extensions/resource-path.ts +27 -0
  307. package/src/domains/extensions/resources.ts +18 -38
  308. package/src/domains/extensions/snapshot-store.ts +39 -0
  309. package/src/domains/extensions/snapshot.ts +180 -0
  310. package/src/domains/extensions/state.ts +385 -57
  311. package/src/domains/extensions/types.ts +118 -1
  312. package/src/domains/lifecycle/migrations/2026-09-01-extension-install-digests.ts +27 -0
  313. package/src/domains/lifecycle/migrations/index.ts +2 -0
  314. package/src/domains/lifecycle/naming-resources.ts +19 -4
  315. package/src/domains/lifecycle/naming-yazi.ts +10 -5
  316. package/src/domains/middleware/contract.ts +26 -0
  317. package/src/domains/middleware/extension.ts +24 -24
  318. package/src/domains/middleware/hook-receipts.ts +27 -4
  319. package/src/domains/middleware/hooks-io.ts +65 -32
  320. package/src/domains/middleware/hooks.ts +64 -0
  321. package/src/domains/middleware/index.ts +28 -4
  322. package/src/domains/middleware/registrations.ts +326 -0
  323. package/src/domains/middleware/runtime.ts +28 -0
  324. package/src/domains/middleware/snapshot.ts +20 -7
  325. package/src/domains/mux/contract.ts +38 -0
  326. package/src/domains/mux/detect.ts +6 -13
  327. package/src/domains/mux/index.ts +1 -1
  328. package/src/domains/mux/operations.ts +44 -5
  329. package/src/domains/mux/yazi/assets/yazi.toml +2 -2
  330. package/src/domains/mux/yazi/session.ts +53 -4
  331. package/src/domains/mux/yazi/theme.ts +117 -17
  332. package/src/domains/observability/contract.ts +10 -11
  333. package/src/domains/observability/extension.ts +11 -3
  334. package/src/domains/observability/projection.ts +14 -90
  335. package/src/domains/observability/trace-store.ts +43 -7
  336. package/src/domains/prompts/compiler.ts +73 -53
  337. package/src/domains/prompts/contract.ts +15 -3
  338. package/src/domains/prompts/extension.ts +97 -9
  339. package/src/domains/prompts/fragments/identity/clio-worker.md +1 -3
  340. package/src/domains/prompts/fragments/identity/clio.md +6 -12
  341. package/src/domains/prompts/fragments/identity/docs-routing.md +1 -2
  342. package/src/domains/prompts/fragments/identity/self-awareness.md +3 -11
  343. package/src/domains/prompts/fragments/operating/contract.md +7 -15
  344. package/src/domains/prompts/fragments/operating/delegation.md +32 -34
  345. package/src/domains/prompts/fragments/operating/skills.md +10 -24
  346. package/src/domains/prompts/fragments/operating/worker.md +1 -8
  347. package/src/domains/providers/index.ts +1 -1
  348. package/src/domains/providers/model-runtime-capabilities.ts +85 -21
  349. package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +669 -104
  350. package/src/domains/providers/runtime-resolution.ts +31 -0
  351. package/src/domains/providers/runtimes/common/probe-helpers.ts +7 -2
  352. package/src/domains/providers/runtimes/local-native/llamacpp.ts +9 -1
  353. package/src/domains/providers/types/cost-provenance.ts +19 -0
  354. package/src/domains/providers/types/local-model-quirks.ts +85 -37
  355. package/src/domains/resources/skills/loader.ts +16 -19
  356. package/src/domains/safety/call-target.ts +1 -1
  357. package/src/domains/safety/loop-detector.ts +7 -4
  358. package/src/domains/session/task-board.ts +10 -9
  359. package/src/domains/share/archive.ts +164 -7
  360. package/src/engine/acp/server.ts +62 -9
  361. package/src/engine/apis/llamacpp-residency.ts +3 -4
  362. package/src/engine/apis/lmstudio.ts +3 -3
  363. package/src/engine/apis/ollama-native.ts +6 -6
  364. package/src/engine/apis/openai-completions.ts +28 -25
  365. package/src/engine/apis/output-budget.ts +8 -18
  366. package/src/engine/apis/residency.ts +8 -27
  367. package/src/engine/gemma-channel-filter.ts +19 -0
  368. package/src/engine/loop-guard.ts +92 -12
  369. package/src/engine/worker-runtime.ts +40 -11
  370. package/src/engine/worker-tools.ts +3 -1
  371. package/src/entry/extension-hook-sources.ts +28 -0
  372. package/src/entry/extension-reload.ts +309 -0
  373. package/src/entry/orchestrator.ts +59 -35
  374. package/src/interactive/application-controller.ts +2 -1
  375. package/src/interactive/bus-notices.ts +8 -1
  376. package/src/interactive/chat-loop-messages.ts +3 -13
  377. package/src/interactive/chat-loop.ts +10 -1
  378. package/src/interactive/chat-panel.ts +36 -13
  379. package/src/interactive/chat-renderer.ts +71 -7
  380. package/src/interactive/dispatch-board.ts +6 -11
  381. package/src/interactive/footer/widgets.ts +13 -0
  382. package/src/interactive/interactive-application.ts +39 -4
  383. package/src/interactive/interactive-input-runtime.ts +4 -0
  384. package/src/interactive/interactive-presentation.ts +2 -2
  385. package/src/interactive/interactive-slash-runtime.ts +2 -0
  386. package/src/interactive/overlays/extensions.ts +9 -1
  387. package/src/interactive/overlays/help-reference.ts +13 -0
  388. package/src/interactive/overlays/settings.ts +27 -16
  389. package/src/interactive/panes-runtime.ts +111 -35
  390. package/src/interactive/prompt-cache-identity.ts +88 -0
  391. package/src/interactive/slash-commands.ts +129 -14
  392. package/src/interactive/stream-pacing-policy.ts +0 -23
  393. package/src/interactive/turn-context.ts +30 -15
  394. package/src/interactive/yazi-bridge.ts +60 -6
  395. package/src/tools/agent-tools.ts +30 -1
  396. package/src/tools/artifact.ts +2 -2
  397. package/src/tools/ask-user.ts +3 -3
  398. package/src/tools/bash.ts +1 -1
  399. package/src/tools/bootstrap.ts +4 -0
  400. package/src/tools/builtin-tool-catalog.ts +52 -22
  401. package/src/tools/codewiki/code-nav-surface.ts +6 -0
  402. package/src/tools/codewiki/code-nav.ts +99 -13
  403. package/src/tools/context/docs-engine.ts +20 -7
  404. package/src/tools/context/index.ts +29 -12
  405. package/src/tools/core-bootstrap.ts +28 -6
  406. package/src/tools/credential-present.ts +1 -2
  407. package/src/tools/dispatch-arguments.ts +5 -1
  408. package/src/tools/dispatch-plan.ts +48 -4
  409. package/src/tools/dispatch-run-events.ts +1 -1
  410. package/src/tools/dispatch-schema.ts +338 -0
  411. package/src/tools/dispatch-types.ts +3 -0
  412. package/src/tools/dispatch.ts +9 -254
  413. package/src/tools/ledger.ts +3 -5
  414. package/src/tools/monitor-surface.ts +5 -13
  415. package/src/tools/observation.ts +4 -5
  416. package/src/tools/panes-surface.ts +4 -11
  417. package/src/tools/panes.ts +4 -2
  418. package/src/tools/policy.ts +15 -2
  419. package/src/tools/read.ts +5 -6
  420. package/src/tools/registry.ts +30 -7
  421. package/src/tools/result-shaping.ts +18 -14
  422. package/src/tools/steer-surface.ts +1 -1
  423. package/src/tools/tasks.ts +1 -1
  424. package/src/tools/truncate.ts +6 -5
  425. package/src/tools/verify/surface.ts +6 -12
  426. package/src/tools/web-fetch-surface.ts +1 -3
  427. package/dist/chunk-5QIAJV2D.js +0 -48
  428. package/dist/chunk-JZWT5J3Y.js +0 -814
  429. package/dist/chunk-K7VKOLQQ.js +0 -15
  430. package/dist/chunk-PMZCIOCJ.js +0 -25
  431. package/dist/chunk-SUW5DORT.js +0 -819
  432. package/dist/chunk-UOV2BYIW.js +0 -107
  433. package/dist/chunk-WR6U3OVP.js +0 -45
  434. package/docs/artifact-versions.md +0 -67
  435. package/docs/documentation-coverage.md +0 -46
  436. package/docs/documentation-guide.md +0 -167
  437. 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
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.
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
@@ -104,12 +113,16 @@ clio-coder
104
113
  Inside the TUI, verify the local surface with:
105
114
 
106
115
  ```text
107
- /targets
116
+ /settings targets
108
117
  /agents
109
118
  /skill
110
119
  ```
111
120
 
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.
121
+ `/settings targets` opens one row per configured target with its roles (chat,
122
+ fleet, memory) and probe health. `Enter` on a row offers use for chat and fleet
123
+ dispatch, connect (API key or OAuth, then a probe), probe, and remove. The
124
+ retired `/targets` slash spelling is a non-executing tombstone that points to
125
+ this settings area; the `clio-coder targets` CLI family remains available.
113
126
 
114
127
  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
128
 
@@ -130,127 +143,42 @@ Terminology used in code and receipts:
130
143
  | Background target | Optional proactive-memory model target. Unset means deterministic rules-only memory. |
131
144
  | 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
145
 
146
+ This abbreviated example uses the current version-2 information architecture.
147
+ The [settings inventory](#settings-inventory) below lists every accepted leaf
148
+ and its shipped default.
149
+
133
150
  ```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)
151
+ version: 2
136
152
 
137
153
  targets:
138
154
  - id: local-lmstudio
139
155
  runtime: lmstudio
140
156
  url: http://127.0.0.1:1234
141
157
  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
159
-
160
- runtimePlugins: []
161
-
162
- orchestrator:
158
+ maxConcurrentRequests: 2 # optional override; prefer live discovery
159
+
160
+ chat:
163
161
  target: local-lmstudio
164
162
  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:
163
+ thinkingLevel: low
164
+ modelPicker:
165
+ cycleSet: []
166
+ favorites: []
167
+ recentLimit: 12
168
+ maxOutputTokens: 0
169
+ prewarm: true
170
+
171
+ fleet:
182
172
  default:
183
173
  target: local-lmstudio
184
174
  model: your-model-id
185
175
  thinkingLevel: off
186
176
  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
177
+ rosters: {}
178
+ agentProfiles: {}
179
+ nodes: []
220
180
  concurrency: auto
221
181
 
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
182
  context:
255
183
  workingSet:
256
184
  enabled: true
@@ -258,23 +186,46 @@ context:
258
186
  target: 0.6
259
187
  protectLastTurns: 6
260
188
  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
189
+ compaction:
190
+ auto: true
191
+ threshold: 0.8
192
+ memory:
193
+ enabled: true
194
+ target: null
195
+ model: null
196
+
197
+ safety:
198
+ autonomy: auto-edit
199
+ limits:
200
+ sessionCostUsd: 5
201
+ chatToolCallsPerTurn: 60
202
+ readBytesPerCall: 51200
203
+ observationBytesPerTurn: 196608
204
+ review:
205
+ enabled: false
206
+
207
+ interface:
208
+ outputDetail: default
209
+ smoothStreaming: off
210
+ mode: regular
211
+ fullscreenScrollbar: auto
212
+ terminalProgress: false
213
+ desktopNotifications: false
214
+ panes:
215
+ enabled: off
216
+ layout: off
217
+ files:
218
+ enabled: false
219
+ keybindings: {}
220
+
221
+ integrations:
222
+ projectResources:
223
+ trustProjectImports: false
224
+ externalAgents:
225
+ entries: []
226
+ runtimePlugins: []
227
+ git:
228
+ commitAttribution: true
278
229
  ```
279
230
 
280
231
  Target capability overrides may include `chat`, `tools`, `toolCallFormat`, `reasoning`, `thinkingFormat`, `structuredOutputs`, `vision`, `audio`, `embeddings`, `rerank`, `fim`, `contextWindow`, and `maxTokens`.
@@ -285,7 +236,7 @@ Target capability overrides may include `chat`, `tools`, `toolCallFormat`, `reas
285
236
 
286
237
  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.
287
238
 
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.
239
+ 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
240
 
290
241
  ### The `local-native` tier
291
242
 
@@ -293,9 +244,9 @@ Three behaviors in this release are gated on a runtime's tier being `local-nativ
293
244
 
294
245
  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
246
 
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.
247
+ - **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
248
  - **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).
249
+ - **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
250
 
300
251
  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
252
 
@@ -375,26 +326,65 @@ block. Set them in LM Studio's My Models load settings or with `lms load`; the C
375
326
  configuration that `GET /api/v1/models` exposes instead of pretending it applied settings the REST
376
327
  load endpoint did not accept (<https://lmstudio.ai/docs/developer/rest/list>).
377
328
 
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:
329
+ `chat.maxOutputTokens` is a global output budget requested for every turn. Its
330
+ default `0` uses each model's known maximum-output cap, still clamped to the
331
+ remaining context window. Models with no known cap use a 32,768-token ceiling
332
+ instead of the whole remaining context window. A per-target
333
+ `capabilities.maxTokens` override records the model's true cap. Set a positive
334
+ value to impose a smaller global ceiling.
335
+
336
+ `context.toolResultMaxBytes` caps one tool result before Clio truncates the
337
+ visible body and spills the complete text to the session scratch file. It
338
+ defaults to 65,536 bytes and accepts integers of at least 4,096. The setting is
339
+ read before every tool result, so a session override or configuration reload
340
+ applies to the next result. The separate
341
+ `safety.limits.observationBytesPerTurn` guardrail remains 196,608 bytes. Three
342
+ full-size results consume that shared turn pool, so a fourth finds it filled.
343
+
344
+ The setting `fleet.retry.maxRetries` controls automated retries for retryable
345
+ fleet failures. Setting it to `0` disables retries.
346
+
347
+ The setting `fleet.permissions.mode` decides how noninteractive workers handle
348
+ a tool call that asks for permission. It supports three modes:
383
349
  - `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:
350
+ - `fail`: Finalizes the run as failed, exiting the worker subprocess with exit code 3 ([WORKER_EXIT_PERMISSION_REQUIRED](../../src/worker/spec-contract.ts)).
351
+ - `escalate`: Parks the tool call, emits a `clio_coder_permission_escalated` event,
352
+ and waits for an operator decision. If no decision arrives within
353
+ `fleet.permissions.escalation.timeoutMs`, it applies the configured fallback.
354
+ A headless worker or runtime without an operator channel collapses to that
355
+ non-stall fallback immediately.
356
+
357
+ The `fleet.permissions.escalation` block defines parameters for escalation:
388
358
  - `timeoutMs` (default `120000`): The wall-clock budget in milliseconds before the parked call applies the fallback.
389
359
  - `fallback` (default `deny`): The fallback posture (`deny` or `fail`) applied upon timeout.
390
360
 
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.
361
+ `fleet.retry.routeCooldownMs` is the cooldown between retries on a failed
362
+ route.
363
+
364
+ `fleet.adaptiveRouting` controls the two independent activation boundaries for
365
+ measured dispatch. Joint target/model/runtime/node selection becomes active
366
+ only when both the assignment's execution role and requested posture appear in
367
+ `roles` and `postures`; otherwise the resolver records a shadow recommendation
368
+ without changing execution. Active mode also requires route readiness. Manual
369
+ pins and `failover: none` remain exact.
370
+
371
+ Agent automation is separately shadowed. Each
372
+ `fleet.adaptiveRouting.agentRoles` item must be an exact
373
+ `{agentId, executionRole}` pair. An `agent: auto` request may change agents only
374
+ for a listed pair whose readiness report passes.
375
+
376
+ Version 2 places numeric backstops beside the behavior they govern.
377
+ `safety.limits.chatToolCallsPerTurn` (default `60`) is the main-agent soft
378
+ tool-call budget; the hard interrupt ceiling remains 15 calls above it.
379
+ `fleet.limits.toolCallsPerRun` (default `150`) is the independent lifetime cap
380
+ for one worker and can only narrow a recipe budget. `fleet.history.maxRuns`
381
+ (default `1000`) bounds durable dispatch history.
382
+ `safety.limits.readBytesPerCall` (default `51200`) bounds one read, while
383
+ `safety.limits.observationBytesPerTurn` (default `196608`) is the shared
384
+ per-turn observation pool. `fleet.limits.internalRunTimeoutMs` (default
385
+ `900000`) bounds an internal generator dispatch. These settings are the only
386
+ operator-facing policy paths for the limits and refresh with the effective
387
+ session view.
398
388
 
399
389
  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
390
 
@@ -468,144 +458,77 @@ Plain `clio-coder doctor` is read-only. `clio-coder doctor --fix` creates missin
468
458
  directories and template files, repairs credential permissions, and refreshes
469
459
  install metadata. It validates `settings.yaml` directly against the current
470
460
  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.
461
+ unknown or retired key remains a validation error on that doctor run.
462
+ Registered `clio-coder upgrade` migrations are the narrow exception. Upgrade
463
+ moves a version-1 or unversioned settings document into the version-2 areas,
464
+ records the migration, and keeps the byte-exact original as
465
+ `settings.yaml.v1.bak`. A source/destination collision refuses the migration
466
+ without replacing the original. Other reported paths still require deliberate
467
+ editing.
475
468
 
476
469
  ---
477
470
 
478
471
  ## Live routing vs saved defaults
479
472
 
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.
473
+ The routing keys in `settings.yaml`—`chat.*`, `context.memory.*`,
474
+ `fleet.default.*`, and `chat.modelPicker.*`—are defaults. Each interactive
475
+ session seeds its route at launch and then owns that active route:
476
+
477
+ - Interactive changes through `/model`, `/thinking`, `/settings`, and the
478
+ model-picker keys apply to the current session after confirmation and can be
479
+ saved as defaults for later sessions.
480
+ - Writes from another process update shared defaults and the target catalog,
481
+ but never redirect a running session. The active session reports when its
482
+ route differs from the saved default.
483
+ - Non-routing values apply at the boundary named in the
484
+ [settings inventory](#settings-inventory): immediately, next turn, next
485
+ dispatch, next session, or restart.
486
+ - `/resume` and `/new` switch session history without silently changing the
487
+ terminal's active target, model, or thinking level.
488
+
489
+ Every settings writer uses an advisory lock and atomic replacement, so
490
+ concurrent saves cannot expose a partial YAML file. Recently selected models
491
+ are machine state in `recent-models.json`; deliberate favorites remain
492
+ configuration under `chat.modelPicker.favorites`. ACP sessions preserve
493
+ routing-divergence notices in the session ledger because ACP v1 has no
494
+ out-of-turn advisory channel.
495
495
 
496
496
  ---
497
497
 
498
498
  ## Settings Center
499
499
 
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.
500
+ Open `/settings` in the TUI to edit session-visible values and saved defaults.
501
+ Wide terminals use a section sidebar and detail inspector; narrow terminals
502
+ switch to a drill-down flow with breadcrumbs, search, and `Esc` backtracking.
503
+
504
+ Every edit is transactional. Depending on the setting, the confirmation offers:
501
505
 
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)
506
+ - `Apply this session`
504
507
  - `Apply and save globally`
505
- - `Cancel` (or `Esc`)
508
+ - `Cancel`
506
509
 
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.
510
+ Restart-required settings—`fleet.concurrency`,
511
+ `integrations.runtimePlugins`, `interface.mode`, and
512
+ `interface.fullscreenScrollbar`—offer only global save and say that Clio must
513
+ restart. Destructive actions such as removing a target or fleet profile show
514
+ the affected chat, fleet, and memory routes before confirmation.
508
515
 
509
- The Settings Center organizes all configuration under four non-selectable group headers:
516
+ The durable configuration has seven top-level areas, and `/settings` accepts
517
+ each as a stable deep link:
510
518
 
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 |
519
+ | Area | What it owns |
530
520
  | --- | --- |
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` |
521
+ | `chat` | Active target/model defaults, thinking, model picker, output budget, pre-warm, and interactive retry |
522
+ | `fleet` | Worker defaults, profiles, rosters, routes, nodes, permissions, capacity, limits, retry, and run history |
523
+ | `targets` | Runtime connections, advertised models, auth metadata, and capability overrides |
524
+ | `context` | Working set, compaction, and proactive memory |
525
+ | `safety` | Autonomy, cost/tool/read limits, and the optional review watchdog |
526
+ | `interface` | Output detail, terminal behavior, notifications, keybindings, and experimental pane settings |
527
+ | `integrations` | Project-resource trust, external agents, runtime plugins, resource library, and Git attribution |
528
+
529
+ The Center groups rows with task-oriented labels such as Orchestrator, Targets,
530
+ Models, Fleet, Budget, and Terminal. The YAML paths shown in row details and in
531
+ this guide remain the canonical version-2 paths in the inventory below.
609
532
 
610
533
  ---
611
534
 
@@ -628,11 +551,11 @@ This is the version-2 durable schema shipped in `DEFAULT_SETTINGS`. Validation i
628
551
  | --- | --- | --- | --- |
629
552
  | `chat.target` | `null` | configured target id or null | next session |
630
553
  | `chat.model` | `null` | string or null | next session |
631
- | `chat.thinkingLevel` | `off` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | next session |
554
+ | `chat.thinkingLevel` | `low` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max` | next session |
632
555
  | `chat.modelPicker.cycleSet` | `[]` | list of target or target/model references | immediately for this session; next session as the saved default |
633
556
  | `chat.modelPicker.favorites` | `[]` | list of target/model references | immediately |
634
557
  | `chat.modelPicker.recentLimit` | `12` | integer ≥ 1 | immediately |
635
- | `chat.maxOutputTokens` | `32768` | integer ≥ 0 | next turn |
558
+ | `chat.maxOutputTokens` | `0` | integer ≥ 0; `0` uses the model cap or the 32,768-token fallback when unknown | next turn |
636
559
  | `chat.prewarm` | `true` | boolean | next turn |
637
560
  | `chat.retry.enabled` | `true` | boolean | next turn |
638
561
  | `chat.retry.maxRetries` | `3` | integer ≥ 0 | next turn |
@@ -671,6 +594,7 @@ This is the version-2 durable schema shipped in `DEFAULT_SETTINGS`. Validation i
671
594
 
672
595
  | Key | Default | Validation | When it applies |
673
596
  | --- | --- | --- | --- |
597
+ | `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
598
  | `context.workingSet.enabled` | `true` | boolean | next turn |
675
599
  | `context.workingSet.policy` | `structural-v1` | `structural-v1` or `age-horizon` | next turn |
676
600
  | `context.workingSet.target` | `0.6` | number greater than 0 and less than 1 | next turn |
@@ -690,7 +614,7 @@ This is the version-2 durable schema shipped in `DEFAULT_SETTINGS`. Validation i
690
614
 
691
615
  ### Safety
692
616
 
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.
617
+ 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
618
 
695
619
  | Key | Default | Validation | When it applies |
696
620
  | --- | --- | --- | --- |
@@ -717,7 +641,7 @@ The six limit leaves retain their one-process environment overrides where docume
717
641
  | `interface.panes.notifications` | `failures` | `failures`, `all`, `off` | immediately |
718
642
  | `interface.panes.layout` | `off` | `off`, `workers`, `cockpit` | restart |
719
643
  | `interface.panes.workers.ratio` | `0.34` | finite dock ratio | restart |
720
- | `interface.panes.files.enabled` | `true` | boolean | immediately on the next files-pane open |
644
+ | `interface.panes.files.enabled` | `false` | boolean | immediately on the next files-pane open |
721
645
  | `interface.panes.files.mode` | `companion` | `companion` or `chooser` | immediately on the next files-pane open |
722
646
  | `interface.panes.files.profile` | `managed` | `managed` or `user` | immediately on the next files-pane open |
723
647
  | `interface.panes.files.followCwd` | `true` | boolean | immediately on the next files-pane open |
@@ -733,7 +657,7 @@ The six limit leaves retain their one-process environment overrides where docume
733
657
  | `integrations.externalAgents.defaults.connectTimeoutMs` | `30000` | integer ≥ 1 | next dispatch |
734
658
  | `integrations.externalAgents.defaults.turnTimeoutMs` | `300000` | integer ≥ 1 | next dispatch |
735
659
  | `integrations.externalAgents.defaults.permissionTimeoutMs` | `120000` | integer ≥ 1 | next dispatch |
736
- | `integrations.externalAgents.defaults.toolGovernance` | `clio-policy` | `clio-policy`, `agent-managed`, `deny-all` | next dispatch |
660
+ | `integrations.externalAgents.defaults.toolGovernance` | `clio-coder-policy` | `clio-coder-policy`, `agent-managed`, `deny-all` | next dispatch |
737
661
  | `integrations.runtimePlugins` | `[]` | list of plugin package names | restart |
738
662
  | `integrations.library.catalog` | `null` | string or null | next turn |
739
663
  | `integrations.library.remote` | `null` | string or null | next turn |
@@ -792,13 +716,22 @@ Review and connect detected agents with:
792
716
  clio-coder configure --interop
793
717
  ```
794
718
 
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.
719
+ On a terminal this walks the pending proposals one at a time, showing the exact
720
+ YAML entry before it asks, and writes only what you answer yes to. Without a
721
+ TTY it prints the proposals and exits 0 with `settings.yaml` byte-identical.
722
+ The interactive `clio-coder configure` wizard ends with the same review, and
723
+ `/agents connect` in the TUI opens the same flow.
796
724
 
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.
725
+ No code path writes `integrations.externalAgents.entries` without an operator
726
+ decision, and `doctor --fix` is not such a path. An accepted proposal appends
727
+ exactly one entry through the serialized settings writer under its lock. The
728
+ entry carries `toolGovernance: clio-coder-policy` and no `projectContext` key,
729
+ so the peer receives task text rather than the project projection. Both facts
730
+ are shown before confirmation.
798
731
 
799
732
  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
733
 
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.
734
+ 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
735
 
803
736
  ---
804
737
 
@@ -852,7 +785,7 @@ clio-coder configure \
852
785
  --max-tokens 4096
853
786
  ```
854
787
 
855
- See [alcf-provider.md](alcf-provider.md) for the Globus login and ALCF discovery
788
+ See [alcf-provider.md](../architecture/alcf-provider.md) for the Globus login and ALCF discovery
856
789
  details.
857
790
 
858
791
  ### 3. Sanctioned Claude Code Worker Runtimes (Worker-Only)
@@ -881,12 +814,13 @@ You can drive Claude Code as an external delegation agent over the Agent Client
881
814
  - **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
815
  - **Configuration Recipe:** Configure by adding a delegation agent in `settings.yaml` (a commented recipe is included by default):
883
816
  ```yaml
884
- delegation:
885
- agents:
886
- - id: claude-code
887
- command: npx
888
- args: ["-y", "@zed-industries/claude-code-acp"]
889
- toolGovernance: clio-policy
817
+ integrations:
818
+ externalAgents:
819
+ entries:
820
+ - id: claude-code
821
+ command: npx
822
+ args: ["-y", "@zed-industries/claude-code-acp"]
823
+ toolGovernance: clio-coder-policy
890
824
  ```
891
825
  Then invoke it using `/delegate claude-code <task>`.
892
826
 
@@ -921,7 +855,7 @@ Useful flags:
921
855
  | `--api-key <literal>` | Store an API key in `credentials.yaml`. |
922
856
  | `--force` | Allow model/capability choices outside the local catalog guardrails. |
923
857
  | `--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. |
858
+ | `--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
859
  | `--set-orchestrator` | Use this target as the chat default. |
926
860
  | `--set-fleet-default` | Use this target as the fleet default. |
927
861
  | `--context-window <N>` | Override the target context-window capability. |
@@ -955,8 +889,6 @@ clio-coder targets rename <old> <new>
955
889
 
956
890
  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
891
 
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
892
  ### Target-Profile Subcommands
961
893
 
962
894
  The command `clio-coder targets profile` supports several subcommands to manage fleet worker profiles and agent bindings:
@@ -969,7 +901,11 @@ The command `clio-coder targets profile` supports several subcommands to manage
969
901
  - **unbind**: Unbind an agent from its profile. Use `clio-coder targets profile unbind <agentId>`.
970
902
  - **bindings**: List active agent-to-profile bindings. Use `clio-coder targets profile bindings [--json]` to output details in JSON format.
971
903
 
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`.
904
+ Inside the TUI, `/settings targets` opens the operational target console.
905
+ Targets render with `HEALTH`, `ID`, `ROLES`, `RUNTIME`, and `LATENCY`, plus a
906
+ detail drawer for URL, default model, last probe, and failure reason. Actions
907
+ include `Use`, `Connect`, `Probe`, and `Remove`; adding a target uses
908
+ `clio-coder targets add`.
973
909
 
974
910
  ### Context-Window Provenance
975
911
 
@@ -1099,7 +1035,9 @@ OAuth refresh follows signal-aware credential mutation. Clio serializes the read
1099
1035
 
1100
1036
  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
1037
 
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>`.
1038
+ For interactive auth, open `/settings targets`, select the row, and press `c`.
1039
+ For stored credential cleanup, use
1040
+ `clio-coder auth logout <target-or-runtime>`.
1103
1041
 
1104
1042
  ---
1105
1043