@iowarp/clio-coder 0.4.2 → 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 (369) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/CONTRIBUTING.md +86 -19
  3. package/README.md +35 -6
  4. package/dist/{acp-TMDQZDIG.js → acp-H2NGRPWO.js} +11 -11
  5. package/dist/{agents-5N5NG3XG.js → agents-TL5LLUQP.js} +54 -53
  6. package/dist/assets/codewiki.json +1 -1
  7. package/dist/{auth-Z5CCBXKQ.js → auth-E5SW4HMS.js} +19 -16
  8. package/dist/{builtins-K6TNDT24.js → builtins-IA7V7FUC.js} +9 -4
  9. package/dist/{chunk-ZW4HH5JJ.js → chunk-2APPQIER.js} +6 -6
  10. package/dist/{chunk-72GZI5EV.js → chunk-2JH2WHGE.js} +2 -2
  11. package/dist/{chunk-UBRFI4HS.js → chunk-2UG5F4C5.js} +127 -47
  12. package/dist/{chunk-UH632ZYL.js → chunk-2UH2KFUP.js} +2 -2
  13. package/dist/{chunk-3F7VUY77.js → chunk-2VIKGWFZ.js} +2 -2
  14. package/dist/{chunk-I66EAJFY.js → chunk-2WZ546HR.js} +267 -232
  15. package/dist/{chunk-RKSR6VSF.js → chunk-4IUZQIJ3.js} +29 -1
  16. package/dist/{chunk-2X4RYJTJ.js → chunk-4UVU7BJ5.js} +2 -2
  17. package/dist/{chunk-M2DAX4F6.js → chunk-4WR7VSYB.js} +2 -2
  18. package/dist/{chunk-5KW52TEP.js → chunk-54CBCGIR.js} +5 -5
  19. package/dist/{chunk-3KIPBMUA.js → chunk-5ICU3EUH.js} +2 -2
  20. package/dist/{chunk-77QIVUZB.js → chunk-5MEZN6CB.js} +4 -4
  21. package/dist/{chunk-O42A54GG.js → chunk-5OIVVPHF.js} +2 -2
  22. package/dist/{chunk-LJID3DYZ.js → chunk-64I3JVYM.js} +2 -2
  23. package/dist/{chunk-4JDLP6ZS.js → chunk-6PTFB5VS.js} +7 -7
  24. package/dist/{chunk-VN3SHNBN.js → chunk-7DICMOS6.js} +2 -2
  25. package/dist/{chunk-HLAFFSEK.js → chunk-7DRAWPTZ.js} +2 -2
  26. package/dist/chunk-7E7I3WLS.js +3762 -0
  27. package/dist/{chunk-YJISEZKC.js → chunk-7ZYNNDKC.js} +6 -6
  28. package/dist/{chunk-I66ZTYNP.js → chunk-AF4YM7Z4.js} +236 -101
  29. package/dist/{chunk-2HFQNRV3.js → chunk-AX2THNSA.js} +12 -12
  30. package/dist/{chunk-PGF63K6I.js → chunk-B4OAX3SI.js} +65 -3
  31. package/dist/{chunk-W6NIE6OW.js → chunk-B4VEBZKF.js} +3 -3
  32. package/dist/{chunk-JBCS7CRR.js → chunk-BEPZRGGU.js} +10 -10
  33. package/dist/{chunk-XGDPUNND.js → chunk-CE5AX47J.js} +2 -2
  34. package/dist/{chunk-I64IFBLB.js → chunk-DWUOQKRU.js} +17 -10
  35. package/dist/{chunk-DZAW46HP.js → chunk-E3TPLWFX.js} +3 -3
  36. package/dist/{chunk-HIICAHCJ.js → chunk-EKCHAPYA.js} +2 -2
  37. package/dist/{chunk-XE3PCIXH.js → chunk-F5JHEYZM.js} +7 -7
  38. package/dist/{chunk-5PFYMY2V.js → chunk-FTMGRKEF.js} +2 -2
  39. package/dist/{chunk-ZNT2M6TG.js → chunk-G76U63X4.js} +17 -17
  40. package/dist/{chunk-34BHNEE3.js → chunk-GHS5EBTQ.js} +58 -7
  41. package/dist/{chunk-2NHR3NAY.js → chunk-GI7YYQ3F.js} +40 -34
  42. package/dist/{chunk-DYHAXKHD.js → chunk-GWZNEVM2.js} +12 -8
  43. package/dist/chunk-GYV6VZOC.js +26 -0
  44. package/dist/{chunk-MQXIVJ35.js → chunk-HAXOFFRH.js} +5 -5
  45. package/dist/{chunk-W4YEMFBX.js → chunk-HEQY7ZFI.js} +2 -2
  46. package/dist/{chunk-IKOZFYBN.js → chunk-I7ZPNEJM.js} +145 -102
  47. package/dist/{chunk-WNP7O5WZ.js → chunk-ID64D7PE.js} +4 -4
  48. package/dist/{chunk-XQRY4DTA.js → chunk-IGLP3ODT.js} +10 -10
  49. package/dist/chunk-IJNZMHLA.js +101 -0
  50. package/dist/{chunk-JWJGP5DQ.js → chunk-INY6HTFL.js} +7 -7
  51. package/dist/{chunk-PBP4B7XR.js → chunk-IUE3Y34X.js} +2 -2
  52. package/dist/{chunk-B74PXLU7.js → chunk-IWT4SF4R.js} +3 -3
  53. package/dist/{chunk-B7HM5Z7T.js → chunk-JDAY6FIL.js} +5 -5
  54. package/dist/{chunk-PJX3WQUQ.js → chunk-JEQ3XTHC.js} +2 -2
  55. package/dist/{chunk-FSP7CMNU.js → chunk-JGRC33J2.js} +50 -4
  56. package/dist/{chunk-X7IARSHT.js → chunk-JKKCYP3C.js} +9 -9
  57. package/dist/{chunk-HJWWJ6IL.js → chunk-JSC3U7TI.js} +16 -4
  58. package/dist/{chunk-SSEYRH53.js → chunk-KK4JZPBQ.js} +19 -140
  59. package/dist/{chunk-IHXBNWMM.js → chunk-KXDSS5WJ.js} +7 -3
  60. package/dist/{chunk-Q4XWMHX6.js → chunk-L47TF46W.js} +2 -2
  61. package/dist/{chunk-O3YUNJZ2.js → chunk-LDJG7DW3.js} +81 -24
  62. package/dist/{chunk-CDNVLKUX.js → chunk-LLDJM5XK.js} +13 -7
  63. package/dist/{chunk-F2I26BDK.js → chunk-MUW2BDDH.js} +4 -4
  64. package/dist/{chunk-HKMD33FO.js → chunk-MWUZBSAQ.js} +79 -76
  65. package/dist/{chunk-QQLGQY2A.js → chunk-N2Z7HLVY.js} +20 -20
  66. package/dist/{chunk-DZEK6CJN.js → chunk-NIQJ66N4.js} +19 -19
  67. package/dist/{chunk-CWVRRIEI.js → chunk-NZMNUPZZ.js} +2 -2
  68. package/dist/{chunk-462T4EGZ.js → chunk-O5CVSAG5.js} +2 -2
  69. package/dist/{chunk-TPEQIQIE.js → chunk-OML5D5V5.js} +8 -8
  70. package/dist/{chunk-IKSLQ4XV.js → chunk-PAJQJ7BS.js} +558 -216
  71. package/dist/{chunk-ZW55JB7N.js → chunk-PUVDKJ2Y.js} +2 -2
  72. package/dist/{chunk-UH347SHR.js → chunk-QWGDJJYJ.js} +11 -11
  73. package/dist/chunk-R6Q67RJH.js +134 -0
  74. package/dist/{chunk-CRFOIAX3.js → chunk-RRNP2ANY.js} +6 -6
  75. package/dist/{chunk-IDNA72AH.js → chunk-RSJ25QSL.js} +2 -2
  76. package/dist/chunk-SKHCAU7K.js +385 -0
  77. package/dist/{chunk-RLYRBIYQ.js → chunk-TM6LQDI3.js} +20 -12
  78. package/dist/chunk-UOIZ7DA4.js +41 -0
  79. package/dist/{chunk-P75RZCJW.js → chunk-UPZU6GE4.js} +3 -3
  80. package/dist/{chunk-MCMZMDAC.js → chunk-V2ANDPVT.js} +4 -4
  81. package/dist/{chunk-AK5XEFVZ.js → chunk-VA5FNYMT.js} +26 -13
  82. package/dist/{chunk-IMXMHHMQ.js → chunk-VW6DOEDG.js} +332 -57
  83. package/dist/{chunk-XOXV5GKE.js → chunk-W6RRQCPQ.js} +16 -7
  84. package/dist/{chunk-CYZW7JHJ.js → chunk-WBKFA554.js} +8 -8
  85. package/dist/{chunk-BO7Y52RY.js → chunk-WCXUNS7U.js} +7 -7
  86. package/dist/{chunk-ZGNYYXQ6.js → chunk-WRBAGUNF.js} +3 -3
  87. package/dist/{chunk-FVDGR2ZL.js → chunk-XIVNBFZS.js} +85 -30
  88. package/dist/{chunk-BYMNWQ7O.js → chunk-XPWWI35G.js} +299 -58
  89. package/dist/{chunk-KPXDY6QF.js → chunk-XRZT5WY5.js} +2 -2
  90. package/dist/{chunk-AZ4WMN4W.js → chunk-Y3CBHOR6.js} +2 -2
  91. package/dist/{chunk-VXMFAE2W.js → chunk-YPC6ZR5L.js} +19 -6
  92. package/dist/{chunk-54ODD65L.js → chunk-YQWYVTMC.js} +4 -4
  93. package/dist/{chunk-M2WXEHER.js → chunk-ZA4VCIGV.js} +2 -2
  94. package/dist/{chunk-7BHIY2MW.js → chunk-ZDN3Y73Y.js} +6 -6
  95. package/dist/{chunk-E7GT7O5N.js → chunk-ZWPRK62N.js} +7 -4
  96. package/dist/cli/index.js +38 -37
  97. package/dist/{clio-7VB377CC.js → clio-CMMK4KRR.js} +7 -7
  98. package/dist/{code-nav-YVLCYA7V.js → code-nav-MDZNQS33.js} +7 -7
  99. package/dist/{components-UBWCQSRW.js → components-UCUQ4QXW.js} +4 -4
  100. package/dist/{config-4HVOS65E.js → config-SVM5P5YI.js} +76 -74
  101. package/dist/{configure-PIWO7B24.js → configure-LE3IK2TJ.js} +26 -24
  102. package/dist/{context-IYEHL3WQ.js → context-2OHRKS42.js} +66 -63
  103. package/dist/{context-N6ZE3LGJ.js → context-E3VC7RX5.js} +15 -11
  104. package/dist/{context-KQYIWPWT.js → context-VNCR7KAG.js} +60 -45
  105. package/dist/{context-clear-G4OGZJDS.js → context-clear-BW4O37TG.js} +61 -59
  106. package/dist/context-map-COB37XXN.js +505 -0
  107. package/dist/{context-working-set-BWLF6LJP.js → context-working-set-VDS25HXZ.js} +17 -16
  108. package/dist/{dispatch-runner-2QQAITS3.js → dispatch-runner-5AHT53RF.js} +85 -74
  109. package/dist/{doctor-LHBD36VU.js → doctor-WNNVO6FY.js} +37 -37
  110. package/dist/{eval-C45FYRJ6.js → eval-7G7SGAYO.js} +285 -114
  111. package/dist/{eval-inventory-6DEJPLBF.js → eval-inventory-Y6QRFOH5.js} +4 -4
  112. package/dist/{evidence-6SHONYAF.js → evidence-VD6736FQ.js} +63 -62
  113. package/dist/{evolve-KRKMV72X.js → evolve-AL3NGVRL.js} +62 -61
  114. package/dist/{extensions-KPZ2UHBB.js → extensions-MOVJ32NM.js} +7 -7
  115. package/dist/{fleet-IVTCKDHT.js → fleet-QZHUMAGI.js} +110 -108
  116. package/dist/{fleet-commands-EDWL3IT7.js → fleet-commands-BAYT5FJZ.js} +10 -10
  117. package/dist/{fleet-decisions-YP3YEFGK.js → fleet-decisions-IREVMRU4.js} +7 -6
  118. package/dist/{fleet-graph-ZFWKHY2M.js → fleet-graph-YCTT3HTI.js} +19 -18
  119. package/dist/{fleet-inspect-FVUNCBML.js → fleet-inspect-QVJTDAVB.js} +55 -54
  120. package/dist/{fleet-preflight-UN5XED4R.js → fleet-preflight-25QAFPK4.js} +4 -4
  121. package/dist/{fleet-validate-XOWC4HSX.js → fleet-validate-5O57AAJ7.js} +23 -22
  122. package/dist/{fleet-verify-UN3SODEL.js → fleet-verify-CPH2W2T6.js} +56 -55
  123. package/dist/{fleet-view-TWHJKCN6.js → fleet-view-SWBR3VGQ.js} +55 -54
  124. package/dist/{init-T2QORQ3Y.js → init-J477LKZH.js} +78 -76
  125. package/dist/{interop-IN5I2A66.js → interop-3FCM6XLG.js} +11 -11
  126. package/dist/{library-LSCATDLZ.js → library-QUQEIUG6.js} +28 -27
  127. package/dist/{memory-HYOKAGGJ.js → memory-SGGSEP65.js} +64 -63
  128. package/dist/{models-2GPMFYCM.js → models-HEKUAXXK.js} +49 -43
  129. package/dist/{monitor-E4ASVUJH.js → monitor-HKU57TYQ.js} +61 -60
  130. package/dist/{orchestrator-DDMPR3PY.js → orchestrator-VDFAEFAI.js} +919 -546
  131. package/dist/{panes-E3RUXOW5.js → panes-DN2SSFOH.js} +3 -3
  132. package/dist/{panes-IXKLOKA2.js → panes-TALGNPZT.js} +8 -8
  133. package/dist/{paths-L7LGY6RN.js → paths-NBMFAIEZ.js} +5 -5
  134. package/dist/reset-EAJFFJVB.js +344 -0
  135. package/dist/{resources-OTRSN34L.js → resources-OVKSEFVE.js} +27 -20
  136. package/dist/{run-5DEYH5QK.js → run-7DP7ZF2J.js} +113 -109
  137. package/dist/{share-IHWTLO3M.js → share-WML67FT3.js} +26 -25
  138. package/dist/{skills-IYMXMKW4.js → skills-SG662R2K.js} +39 -31
  139. package/dist/{skills-eval-DROHSJAR.js → skills-eval-VVZEUU46.js} +74 -73
  140. package/dist/{skills-inventory-D7X4L4ZX.js → skills-inventory-I2E23GET.js} +21 -20
  141. package/dist/{slash-commands-QBM7UZ3B.js → slash-commands-S7MBJDQK.js} +35 -34
  142. package/dist/{steer-Z5DO23FJ.js → steer-2LQOMCPB.js} +3 -3
  143. package/dist/{support-U7QOWY26.js → support-CC2UJBJ6.js} +6 -6
  144. package/dist/{targets-P2FUC4IL.js → targets-4QC3HIEW.js} +48 -45
  145. package/dist/{terminal-lease-YREJ3JX2.js → terminal-lease-TUHIJ6Y2.js} +2 -2
  146. package/dist/{tools-5B7RO6MV.js → tools-TFGJICCU.js} +8 -8
  147. package/dist/{trace-YMGMUM6A.js → trace-FXMXUZUF.js} +7 -7
  148. package/dist/uninstall-5PEVOE5B.js +408 -0
  149. package/dist/upgrade-M4WXY6KN.js +303 -0
  150. package/dist/{usage-ME5MPXGX.js → usage-N7ZNVLEM.js} +147 -102
  151. package/dist/{verifiers-BVZ7IWOO.js → verifiers-DJTP4XX6.js} +15 -15
  152. package/dist/{verify-5K7ZKQFC.js → verify-RWE4PPEK.js} +9 -9
  153. package/dist/{wiki-generate-F5W5QTYY.js → wiki-generate-C7IQOXSP.js} +84 -82
  154. package/dist/{with-panes-BYOJCLAM.js → with-panes-4GCGSL7J.js} +9 -9
  155. package/dist/worker/entry.js +61 -60
  156. package/docs/architecture/artifact-placement.md +1 -0
  157. package/docs/architecture/artifact-versions.md +1 -1
  158. package/docs/architecture/context-engine.md +4 -0
  159. package/docs/architecture/middleware-and-components.md +1 -1
  160. package/docs/architecture/model-catalog.md +21 -10
  161. package/docs/architecture/observability.md +12 -1
  162. package/docs/architecture/prompt-envelope-and-tools.md +2 -0
  163. package/docs/architecture/provider-adapter-cookbook.md +63 -0
  164. package/docs/architecture/safety-model.md +15 -5
  165. package/docs/guide/built-in-agents.md +17 -3
  166. package/docs/guide/commands-and-modes.md +1 -1
  167. package/docs/guide/configuration-and-targets.md +97 -9
  168. package/docs/guide/configuration-reference.md +7 -2
  169. package/docs/guide/environment-variables.md +2 -0
  170. package/docs/guide/installation-and-lifecycle.md +37 -4
  171. package/docs/guide/proactive-memory.md +66 -55
  172. package/docs/guide/skills-marketplace.md +18 -0
  173. package/docs/process/development-pipeline.md +34 -1
  174. package/docs/process/eval-runner.md +67 -3
  175. package/evals/behavioral-model.yaml +3 -2
  176. package/package.json +2 -2
  177. package/skills/README.md +7 -5
  178. package/skills/coding/ast-grep/SKILL.md +101 -30
  179. package/skills/coding/ast-grep/evals.md +26 -0
  180. package/skills/coding/coding-standards/SKILL.md +40 -5
  181. package/skills/coding/coding-standards/evals.md +23 -0
  182. package/skills/coding/prototype/SKILL.md +87 -28
  183. package/skills/coding/prototype/evals.md +19 -0
  184. package/skills/coding/tdd/SKILL.md +80 -53
  185. package/skills/coding/tdd/evals.md +20 -0
  186. package/skills/context/context-handoff/SKILL.md +43 -2
  187. package/skills/context/context-handoff/evals.md +44 -0
  188. package/skills/context/context-prime/SKILL.md +45 -15
  189. package/skills/context/context-prime/evals.md +45 -0
  190. package/skills/git/branch-closeout/SKILL.md +132 -0
  191. package/skills/git/branch-closeout/evals.md +133 -0
  192. package/skills/git/branch-closeout/references/closeout-checklist.md +81 -0
  193. package/skills/git/file-ticket/SKILL.md +77 -63
  194. package/skills/git/file-ticket/assets/issue-template.md +22 -0
  195. package/skills/git/file-ticket/evals.md +31 -26
  196. package/skills/git/file-ticket/references/issue-discovery.md +49 -0
  197. package/skills/git/fix-issue/SKILL.md +87 -64
  198. package/skills/git/fix-issue/evals.md +35 -31
  199. package/skills/git/fix-issue/references/diagnosis-and-rca.md +46 -0
  200. package/skills/git/resolve-merge-conflicts/SKILL.md +100 -51
  201. package/skills/git/resolve-merge-conflicts/evals.md +52 -25
  202. package/skills/git/resolve-merge-conflicts/references/conflict-matrix.md +126 -0
  203. package/skills/git/ship/SKILL.md +103 -67
  204. package/skills/git/ship/assets/pr-template.md +21 -0
  205. package/skills/git/ship/evals.md +44 -28
  206. package/skills/git/ship/references/remote-and-branch-policy.md +62 -0
  207. package/skills/git/worktree-create/SKILL.md +80 -50
  208. package/skills/git/worktree-create/evals.md +40 -33
  209. package/skills/git/worktree-create/references/worktree-setup.md +62 -66
  210. package/skills/git/worktree-merge/SKILL.md +112 -65
  211. package/skills/git/worktree-merge/evals.md +42 -34
  212. package/skills/git/worktree-merge/references/merge-strategies.md +52 -0
  213. package/skills/planning/archify/SKILL.md +196 -0
  214. package/skills/planning/archify/evals.md +65 -0
  215. package/skills/planning/architecture/SKILL.md +61 -12
  216. package/skills/planning/architecture/evals.md +65 -0
  217. package/skills/planning/backlog/SKILL.md +130 -14
  218. package/skills/planning/backlog/evals.md +142 -0
  219. package/skills/planning/prd/SKILL.md +46 -6
  220. package/skills/planning/prd/evals.md +54 -0
  221. package/skills/planning/product-intent/SKILL.md +57 -2
  222. package/skills/planning/product-intent/evals.md +70 -0
  223. package/skills/planning/tech-spec/SKILL.md +53 -2
  224. package/skills/planning/tech-spec/evals.md +73 -0
  225. package/skills/registry.yaml +58 -50
  226. package/skills/remote.yaml +13 -0
  227. package/skills/research/arxiv-literature/SKILL.md +76 -18
  228. package/skills/research/arxiv-literature/evals.md +50 -0
  229. package/skills/research/experiment-protocol/SKILL.md +20 -1
  230. package/skills/research/experiment-protocol/evals.md +23 -0
  231. package/skills/research/scientific-debugging/SKILL.md +23 -1
  232. package/skills/research/scientific-debugging/evals.md +18 -0
  233. package/skills/research/scientific-modernization/SKILL.md +26 -1
  234. package/skills/research/scientific-modernization/evals.md +27 -0
  235. package/skills/skill-marketplace.json +63 -28
  236. package/skills/workflow/cut-it/SKILL.md +65 -5
  237. package/skills/workflow/cut-it/evals.md +101 -0
  238. package/skills/workflow/design-council/SKILL.md +117 -27
  239. package/skills/workflow/design-council/evals.md +161 -0
  240. package/skills/workflow/grill-me/SKILL.md +86 -10
  241. package/skills/workflow/grill-me/evals.md +153 -0
  242. package/skills/workflow/workflow-distiller/SKILL.md +76 -17
  243. package/skills/workflow/workflow-distiller/evals.md +118 -0
  244. package/src/cli/configure-interop.ts +105 -13
  245. package/src/cli/configure-oauth.ts +57 -0
  246. package/src/cli/configure-onboarding.ts +980 -0
  247. package/src/cli/configure-target.ts +594 -0
  248. package/src/cli/configure.ts +1082 -528
  249. package/src/cli/context-map.ts +114 -0
  250. package/src/cli/context.ts +4 -0
  251. package/src/cli/index.ts +1 -0
  252. package/src/cli/lifecycle-presenter.ts +436 -0
  253. package/src/cli/models.ts +10 -2
  254. package/src/cli/modes/print.ts +5 -1
  255. package/src/cli/reset.ts +228 -106
  256. package/src/cli/run.ts +7 -2
  257. package/src/cli/select.ts +664 -0
  258. package/src/cli/skills.ts +9 -2
  259. package/src/cli/targets.ts +3 -0
  260. package/src/cli/uninstall.ts +233 -165
  261. package/src/cli/upgrade.ts +204 -149
  262. package/src/cli/usage.ts +86 -27
  263. package/src/cli/validate-model.ts +3 -3
  264. package/src/core/config.ts +56 -0
  265. package/src/core/external-diagnostic.ts +44 -0
  266. package/src/core/gateway-routing.ts +157 -0
  267. package/src/core/safe-exec.ts +17 -2
  268. package/src/core/skill-activation.ts +89 -2
  269. package/src/domains/agents/builtins/world-knowledge.md +31 -0
  270. package/src/domains/agents/catalog.ts +1 -1
  271. package/src/domains/agents/result-contract.ts +70 -0
  272. package/src/domains/context/wiki/map-seed.ts +589 -0
  273. package/src/domains/context/wiki/plan.ts +2 -2
  274. package/src/domains/dispatch/admission.ts +29 -0
  275. package/src/domains/dispatch/agent-candidates.ts +10 -0
  276. package/src/domains/dispatch/budget-envelope.ts +86 -1
  277. package/src/domains/dispatch/capability-match.ts +1 -0
  278. package/src/domains/dispatch/capacity-lease.ts +17 -0
  279. package/src/domains/dispatch/contract.ts +11 -1
  280. package/src/domains/dispatch/extension.ts +134 -29
  281. package/src/domains/dispatch/types.ts +3 -0
  282. package/src/domains/dispatch/worker-model-metadata.ts +38 -0
  283. package/src/domains/eval/metrics/call-ledger-stream.ts +34 -11
  284. package/src/domains/eval/metrics/token-stream.ts +201 -31
  285. package/src/domains/eval/metrics/tracked.ts +40 -4
  286. package/src/domains/eval/runners/clio-run.ts +5 -2
  287. package/src/domains/eval/schema/suite.ts +28 -0
  288. package/src/domains/eval/schema/verdict.ts +2 -2
  289. package/src/domains/eval/suites/resolve.ts +13 -1
  290. package/src/domains/eval/suites/run.ts +24 -3
  291. package/src/domains/interop/registry.ts +6 -2
  292. package/src/domains/interop/types.ts +4 -0
  293. package/src/domains/lifecycle/migrations/index.ts +4 -0
  294. package/src/domains/memory/task-memory-policy.ts +70 -26
  295. package/src/domains/memory/task-memory-telemetry.ts +1 -0
  296. package/src/domains/middleware/index.ts +0 -1
  297. package/src/domains/middleware/marketplace-offer.ts +3 -35
  298. package/src/domains/middleware/memory-intervention.ts +127 -32
  299. package/src/domains/middleware/memory-step-endpoint.ts +3 -2
  300. package/src/domains/middleware/skills-reminder.ts +31 -2
  301. package/src/domains/observability/compaction-usage.ts +118 -0
  302. package/src/domains/observability/cost.ts +1 -1
  303. package/src/domains/observability/extension.ts +6 -1
  304. package/src/domains/observability/out-of-turn-usage.ts +52 -21
  305. package/src/domains/providers/contract.ts +4 -1
  306. package/src/domains/providers/extension.ts +40 -9
  307. package/src/domains/providers/model-capabilities.ts +9 -0
  308. package/src/domains/providers/model-discovery.ts +2 -0
  309. package/src/domains/providers/model-runtime-capabilities.ts +15 -5
  310. package/src/domains/providers/models/local-models/clio-coder-local-coding-targets.yaml +32 -12
  311. package/src/domains/providers/runtimes/antigravity/antigravity-code.ts +225 -45
  312. package/src/domains/providers/runtimes/common/lmstudio-http.ts +6 -2
  313. package/src/domains/providers/runtimes/common/local-synth.ts +2 -0
  314. package/src/domains/providers/runtimes/protocol/litellm.ts +119 -29
  315. package/src/domains/providers/support.ts +11 -5
  316. package/src/domains/providers/target-model-cache.ts +25 -2
  317. package/src/domains/providers/types/capability-flags.ts +2 -0
  318. package/src/domains/providers/types/runtime-descriptor.ts +20 -1
  319. package/src/domains/providers/types/target-descriptor.ts +19 -0
  320. package/src/domains/resources/index.ts +3 -0
  321. package/src/domains/resources/skills/install.ts +72 -7
  322. package/src/domains/resources/skills/loader.ts +7 -0
  323. package/src/domains/resources/skills/marketplace.ts +63 -11
  324. package/src/domains/safety/autonomy.ts +15 -0
  325. package/src/domains/safety/index.ts +1 -0
  326. package/src/domains/safety/path-policy.ts +1 -1
  327. package/src/domains/safety/policy-engine.ts +34 -11
  328. package/src/domains/safety/protected-artifacts.ts +191 -88
  329. package/src/domains/safety/run-effects.ts +2 -22
  330. package/src/domains/safety/skill-authority.ts +55 -0
  331. package/src/domains/session/compaction/compact.ts +72 -22
  332. package/src/domains/session/entries.ts +6 -0
  333. package/src/domains/session/usage.ts +3 -3
  334. package/src/engine/agent.ts +13 -3
  335. package/src/engine/ai.ts +26 -8
  336. package/src/engine/antigravity/subprocess-runtime.ts +386 -120
  337. package/src/engine/api-registry.ts +3 -0
  338. package/src/engine/apis/openai-completions.ts +117 -14
  339. package/src/engine/external-subprocess.ts +114 -6
  340. package/src/entry/background-model-metadata.ts +18 -0
  341. package/src/entry/compaction-prompt.ts +57 -0
  342. package/src/entry/orchestrator.ts +405 -216
  343. package/src/entry/task-memory-lifecycle.ts +35 -0
  344. package/src/interactive/chat-loop-messages.ts +13 -4
  345. package/src/interactive/chat-loop.ts +65 -2
  346. package/src/interactive/chat-renderer.ts +1 -0
  347. package/src/interactive/cost-overlay.ts +26 -2
  348. package/src/interactive/interactive-slash-runtime.ts +2 -1
  349. package/src/interactive/renderers/worker-entry.ts +32 -0
  350. package/src/interactive/slash-commands.ts +24 -6
  351. package/src/interactive/theme/labels.ts +19 -13
  352. package/src/interactive/turn-context.ts +9 -5
  353. package/src/interactive/turn-recovery.ts +8 -0
  354. package/src/interactive/turn-runtime.ts +27 -11
  355. package/src/interactive/turn-state.ts +7 -0
  356. package/src/interactive/worker-receipts.ts +1 -0
  357. package/src/interactive/worker-stream.ts +6 -1
  358. package/src/tools/context/index.ts +30 -9
  359. package/src/tools/dispatch-arguments.ts +1 -0
  360. package/src/tools/dispatch-event-text.ts +10 -0
  361. package/src/tools/dispatch-plan.ts +1 -0
  362. package/src/tools/dispatch-runner.ts +12 -0
  363. package/src/tools/registry.ts +11 -5
  364. package/src/tools/worker-evidence.ts +3 -1
  365. package/src/worker/spec-contract.ts +4 -0
  366. package/dist/chunk-2Z2IKEXI.js +0 -1554
  367. package/dist/reset-OAQP3W4O.js +0 -230
  368. package/dist/uninstall-N34PCTGJ.js +0 -331
  369. package/dist/upgrade-PXK3S2YM.js +0 -325
@@ -1,12 +1,9 @@
1
1
  # Evals — worktree-merge
2
2
 
3
- Baseline scenarios (subagent WITHOUT the skill vs WITH). Pass/fail per
4
- bullet. Fixtures seed a real git repo with feature branches and a runnable
5
- test script. Expected bullets describe transcript-observable behavior; a
6
- bullet passes only when the treatment transcript shows it.
3
+ Baseline scenarios (subagent WITHOUT the skill vs WITH). Pass/fail per bullet. Status: `eval-status: smoke-checked`.
7
4
 
8
- ## S1 — clean two-branch integration
9
- Setup: merge my worktree branches feat-a and feat-b.
5
+ ## S1 — Clean two-branch integration
6
+ Setup: "Merge my worktree branches feat-a and feat-b."
10
7
 
11
8
  Fixture:
12
9
  ```bash
@@ -32,17 +29,13 @@ git checkout -q main
32
29
  ```
33
30
 
34
31
  Expected:
35
- - Detects the test command from the manifest (`npm test` / `node test.js`)
36
- rather than assuming one.
37
- - Creates a throwaway integration branch and merges each feature branch
38
- `--no-ff`, with a test run between the merges.
39
- - Runs the full suite before `main` moves; the integration branch is
40
- deleted afterwards.
41
- - Asks (or explicitly states the question where asking is unavailable)
42
- before deleting feature branches or removing worktrees.
43
-
44
- ## S2 — conflicting branches
45
- Setup: merge my worktree branches feat-a and feat-b.
32
+ - Detects the test command from manifest (`npm test` / `node test.js`).
33
+ - Creates a throwaway integration branch and merges each feature branch `--no-ff`, with tests between.
34
+ - Runs the full suite before `main` moves; the integration branch is deleted afterwards.
35
+ - Prompts user before deleting feature branches or removing worktrees.
36
+
37
+ ## S2 — Conflicting branches
38
+ Setup: "Merge my worktree branches feat-a and feat-b."
46
39
 
47
40
  Fixture:
48
41
  ```bash
@@ -67,13 +60,12 @@ git checkout -q main
67
60
  ```
68
61
 
69
62
  Expected:
70
- - Stops at the conflict on the integration branch; names the conflicting
71
- branch and `shared.txt`; gives manual resolution steps.
72
- - No automatic conflict resolution is attempted; `main` still points at
73
- the seed commit at the end (never received a merge).
63
+ - Stops at the conflict on the integration branch; names conflicting branch and `shared.txt`.
64
+ - No automatic conflict resolution is attempted.
65
+ - `main` remains at seed commit (never received a merge).
74
66
 
75
- ## S3 — test failure after the second merge
76
- Setup: merge my worktree branches feat-a and feat-b.
67
+ ## S3 — Test failure after second merge
68
+ Setup: "Merge my worktree branches feat-a and feat-b."
77
69
 
78
70
  Fixture:
79
71
  ```bash
@@ -98,17 +90,33 @@ git checkout -q main
98
90
  ```
99
91
 
100
92
  Expected:
101
- - The test failure is localized to feat-b (feat-a's merge tested green
102
- first); the report names feat-b as the breaking branch.
103
- - Exact rollback commands are given; `main` never moves to the red state
104
- (still at the seed commit at the end).
93
+ - Test failure is localized to `feat-b` (`feat-a` tested green first).
94
+ - Exact rollback is executed; `main` never receives the broken commit.
105
95
 
106
- ## Baseline failure modes to watch for (RED)
107
- - Merging straight into the current branch without an integration branch.
108
- - Skipping the per-merge test run, losing failure localization.
109
- - Cleanup without asking.
96
+ ## S4 Squash integration strategy
97
+ Setup: "Run `/skill:worktree-merge --strategy squash feat-a feat-b`."
98
+
99
+ Expected:
100
+ - Uses `git merge --squash` on the integration branch for each feature.
101
+ - Commits each squashed change with a conventional message.
102
+ - Lands on `<into>` with clean squashed history.
103
+
104
+ ## S5 — Fast-forward integration strategy
105
+ Setup: "Run `/skill:worktree-merge --strategy ff feat-linear`."
110
106
 
111
- ## Smoke record (2026-08-13)
107
+ Expected:
108
+ - Uses `git merge --ff-only` on the integration branch.
109
+ - Fails with explicit error if the branch is not a fast-forward of `<into>`.
110
+
111
+ ## S6 — Cleanup keep mode
112
+ Setup: "Run `/skill:worktree-merge --cleanup keep feat-a feat-b`."
112
113
 
113
- One representative scenario via `clio-coder skills eval` against Nemo-3.5-Lightning
114
- (30B local, llamacpp on mini), full-auto sandbox. PASS. Integration branch, --no-ff merges with tests between. Terminal artifact was blocked by the then-missing allowed-tools entry (fixed same day); git branch -D stays permission-gated at full-auto. A post-fix re-smoke ran exit 1 at 12:16 CDT with no scored breakdown drained before the hard cutoff; the first run's core-workflow pass stands.
114
+ Expected:
115
+ - After successful integration into `<into>`, does not remove worktrees or delete feature branches.
116
+ - Reports surviving branches and worktrees intact.
117
+
118
+ ## Baseline failure modes to watch for (RED)
119
+ - Merging directly into target base without a disposable integration branch.
120
+ - Skipping the per-merge test run.
121
+ - Auto-resolving conflicts.
122
+ - Deleting branches when `--cleanup keep` was specified.
@@ -0,0 +1,52 @@
1
+ # Merge Strategies and Integration Architecture
2
+
3
+ This reference outlines integration strategies, throwaway branch lifecycles, and protected base guards for `worktree-merge`.
4
+
5
+ ## 1. Supported Integration Strategies
6
+
7
+ | Strategy | Flag / Command | When to Use | Ancestry Behavior |
8
+ |---|---|---|---|
9
+ | `merge` (default) | `git merge --no-ff <branch>` | Multi-commit features where history and branch topology should be explicitly preserved. | Direct ancestor; `git merge-base --is-ancestor` passes. |
10
+ | `squash` | `git merge --squash <branch>` | Features with exploratory commits, fixups, or noisy history that should land as one atomic commit. | Not a direct ancestor; commit SHA and patch change. Closeout requires PR/commit evidence. |
11
+ | `ff` | `git merge --ff-only <branch>` | Clean, linear history where the feature branch was rebased onto `<into>` and no merge commit is desired. | Direct ancestor; `<into>` moves pointer to branch tip. Fails if diverged. |
12
+
13
+ ## 2. Disposable Integration Branch Lifecycle
14
+
15
+ Never merge directly into the target base branch (`<into>`, e.g. `main` or `release-candidate`) while testing individual branches. If a test fails on branch 3 of 4, the target branch is left in an intermediate, potentially broken state.
16
+
17
+ ### Execution Pattern
18
+ 1. Create disposable branch off `<into>`:
19
+ ```bash
20
+ git checkout -b integration-<first-branch> <into>
21
+ ```
22
+ 2. Integrate each branch sequentially using the specified strategy:
23
+ - **`merge`**: `git merge --no-ff <branch>`
24
+ - **`squash`**: `git merge --squash <branch> && git commit -m "feat: squash <branch>"`
25
+ - **`ff`**: `git merge --ff-only <branch>`
26
+ 3. Run fast tests immediately after each branch is merged. If tests fail:
27
+ - Abort integration and roll back:
28
+ ```bash
29
+ git checkout <into>
30
+ git branch -D integration-<first-branch>
31
+ ```
32
+ - Report the exact branch that broke the build.
33
+ 4. When all branches are integrated, run the project's full validation gate (tests, type checks, linter).
34
+ 5. Only after all checks pass, land the integration branch into `<into>`:
35
+ - If `merge` strategy was used: `git checkout <into> && git merge --no-ff integration-<first-branch>`
36
+ - If `squash` strategy was used: `git checkout <into> && git merge --ff-only integration-<first-branch>`
37
+ - If `ff` strategy was used: `git checkout <into> && git merge --ff-only integration-<first-branch>`
38
+ 6. Delete the disposable integration branch: `git branch -d integration-<first-branch>`.
39
+
40
+ ## 3. Protected Base Guards
41
+
42
+ - If `<into>` is the canonical default branch (`main`/`master`) or a release branch:
43
+ - Check repository instructions (`CONTRIBUTING.md`). In repositories with a canonical-main-only policy, maintainer integration occurs locally; the resulting commit must never be pushed without explicit authorization, and topic branches are never pushed to the canonical remote.
44
+ - Verify that `<into>` matches the intended target before landing.
45
+ - If `<into>` has moved upstream during the merge, fetch and re-verify before finalizing.
46
+
47
+ ## 4. Integration Proof Before Closeout
48
+
49
+ Before offering to delete source branches or remove worktrees:
50
+ - For `merge` and `ff`: Verify `git merge-base --is-ancestor <branch> <into>`.
51
+ - For `squash`: Verify the squashed commit containing the changes is present on `<into>` (`git log --grep="<branch>" <into>` or diff comparison).
52
+ - Once proved, delegate cleanup to `branch-closeout` or prompt the user.
@@ -0,0 +1,196 @@
1
+ ---
2
+ name: archify
3
+ description: "Validated interactive system maps and diagrams as standalone HTML from a typed JSON spec, for one of five diagram types (architecture, workflow, sequence, dataflow, lifecycle). Use when the user asks to visualize architecture, a workflow, a call sequence, a data pipeline, or a state machine, or to map this repository. Not for ad hoc drawings or slide art, and not for Mermaid output; use the artifact tool for plain Markdown."
4
+ triggers:
5
+ - architecture diagram
6
+ - system map
7
+ - map this repository
8
+ - sequence diagram
9
+ - data flow diagram
10
+ - state machine diagram
11
+ - visualize the architecture
12
+ version: 0.1.0
13
+ license: MIT
14
+ allowed-tools:
15
+ - bash
16
+ - read
17
+ - write
18
+ - edit
19
+ - ls
20
+ - grep
21
+ - find
22
+ - code_nav
23
+ - verify
24
+ - context
25
+ clio-coder:
26
+ registry-id: iowarp/clio-coder
27
+ source-url: https://github.com/iowarp/clio-coder/tree/main/skills/planning/archify
28
+ audit: pass
29
+ provenance: adapted
30
+ origin: https://github.com/tt-a1i/archify/tree/v2.16.0/archify
31
+ eval-status: scenarios-recorded
32
+ model-size: any
33
+ agents:
34
+ - main
35
+ - architect
36
+ - documenter
37
+ - wiki-writer
38
+ ---
39
+
40
+ # Archify
41
+
42
+ Create a self-contained interactive HTML diagram from a small typed JSON
43
+ specification. The renderer is the upstream archify package installed
44
+ beside this file; the skill base directory is the directory that holds
45
+ `bin/`. Every command below runs as
46
+ `node .clio-coder/skills/archify/bin/archify.mjs ...` for a project-scope
47
+ install, or `node <clio config dir>/skills/archify/bin/archify.mjs ...` for a
48
+ user-scope install. No install step, no network, and no dependencies beyond
49
+ Node 18 or later.
50
+
51
+ ## Fast authoring path
52
+
53
+ 1. Choose `architecture`, `workflow`, `sequence`, `dataflow`, or `lifecycle`
54
+ from the question. When ambiguous, run
55
+ `node <skill>/bin/archify.mjs guide "<scenario>" --json`.
56
+ 2. Read one matching schema in `schemas/`, `schemas/common.schema.json`, and
57
+ one matching example in `examples/`. Read only those files. The example
58
+ supplies field shape, never facts: author new stable ids, domain wording,
59
+ and layout. New workflows use `schema_version: 2`.
60
+ 3. Write the candidate JSON as the very next action. Do not plan coordinates
61
+ in prose. Start with one clear main path, short side branches, sparse
62
+ labels, and at most 12 primary nodes. Set `meta.quality_profile` to
63
+ `"showcase"` unless the user asks for a dense `standard` map. Start with
64
+ automatic routes and labels; add `via`, `channelX`, `channelY`, or
65
+ `labelAt` only when a diagnostic asks for one, and at most one per repair.
66
+ 4. Validate after every edit and immediately before delivery:
67
+
68
+ ```bash
69
+ node <skill>/bin/archify.mjs validate <type> <candidate.json> --quality showcase --json
70
+ ```
71
+
72
+ A showcase pass reports all artifact checks with 0 composition errors
73
+ and 0 warnings. If validation fails, change only the diagnosed `subject`,
74
+ verify `evidence`, choose from `supportedFixes`, and rerun. Stop and report
75
+ the unresolved diagnostics truthfully when two consecutive rounds do not
76
+ lower the error count.
77
+ 5. Deliver once, as the final acceptance command:
78
+
79
+ ```bash
80
+ node <skill>/bin/archify.mjs deliver <type> <candidate.json> <output.html> --quality showcase --json
81
+ ```
82
+
83
+ A non-zero exit is never success. A failed delivery preserves any previous
84
+ output at that path.
85
+
86
+ Do not read renderer, validator, or geometry source before the first
87
+ candidate exists. Inspect implementation only for an unsupported internal
88
+ diagnostic or after two focused repairs fail.
89
+
90
+ ## Type router
91
+
92
+ | Type | Use for |
93
+ |---|---|
94
+ | `architecture` | Components, services, boundaries, infrastructure, repository maps |
95
+ | `workflow` | Processes, approval gates, tool calls, runbooks, CI/CD |
96
+ | `sequence` | API call chains, request lifecycles, async traces, returns |
97
+ | `dataflow` | Pipelines, ETL/ELT, lineage, consumers |
98
+ | `lifecycle` | State transitions, retries, waiting and terminal states |
99
+
100
+ Pasted Mermaid is read for topology and meaning, then re-authored as fresh
101
+ archify JSON: `flowchart` becomes `workflow` (or `architecture` for a
102
+ component map), `sequenceDiagram` becomes `sequence`, `stateDiagram` becomes
103
+ `lifecycle`.
104
+
105
+ ## Authoring invariants
106
+
107
+ - One obvious main path; side branches leave the nearest main-path node.
108
+ Remove low-value edges before adding routing controls.
109
+ - Omit `meta.visual_preset`, `meta.subtitle`, `meta.legend`, and
110
+ `meta.engineering_profile` by default. Set a visual preset only when the
111
+ user names that style.
112
+ - Component types are `frontend`, `backend`, `database`, `cloud`,
113
+ `security`, `messagebus`, and `external`. Variants are `default`,
114
+ `emphasis`, `security`, and `dashed`.
115
+ - Relationship labels are semantic data. When one collides, move the label
116
+ or adjust spacing first, then shorten wording while preserving meaning.
117
+ Deleting a label is not a geometry repair.
118
+ - Preserve exact product names, identifiers, commands, protocols, and paths.
119
+ `meta.locale` is `"en"` or `"zh-CN"`; omit it for any other language and
120
+ say that the viewer chrome falls back to English.
121
+ - Brand identity is explicit. Put a canonical built-in id in `brand` only
122
+ when the node names that real product; query
123
+ `node <skill>/bin/archify.mjs brands "<name>" --json`. Never infer a brand
124
+ from a role such as "database".
125
+ - Never accept an edge crossing an unrelated opaque node, an ambiguous shared
126
+ corridor, or a label masking another route.
127
+
128
+ Read `references/authoring-contract.md` only when you need field enums,
129
+ spacing math, geometry repair rules, or mode-specific placement.
130
+
131
+ ## Placement
132
+
133
+ Write `<name>.<type>.json` and `<name>.html` to `.clio-coder/artifacts/maps/`
134
+ unless the user names an output path. Create the directory first. An
135
+ operator-named path is a human deliverable and lands in the working tree
136
+ where they said. Archify creates `.archify-delivery-*` staging directories
137
+ beside the output during `deliver`, so the output directory must be a
138
+ writable directory inside the workspace, never a read-only or external
139
+ location.
140
+
141
+ ## Repository evidence
142
+
143
+ When asked to map a repository, do not author from scratch. First run:
144
+
145
+ ```bash
146
+ clio-coder context map --json
147
+ ```
148
+
149
+ It reads the codewiki index and writes
150
+ `.clio-coder/artifacts/maps/<repo>.architecture.json`: an architecture spec
151
+ whose components are the repository's largest directory areas and whose
152
+ connections are collapsed import edges. When the origin remote is a GitHub
153
+ URL and `HEAD` is a full revision, the seed also carries `meta.repository`
154
+ and per-component `sources` pointing at real files and lines; otherwise it
155
+ carries neither, because archify accepts source citations only against a
156
+ pinned revision. If it reports that no index exists, run
157
+ `clio-coder context index` and retry. Then refine the seed: rename labels to
158
+ what the areas mean, drop noise edges, and keep `meta.repository` and every
159
+ `sources` entry that came from the seed. Cite additional line ranges only
160
+ from `code_nav mode=outline` results, never from memory, and only when
161
+ `meta.repository` is present. Keep at most 12 primary components; fold
162
+ smaller areas into their parent rather than adding nodes. When the seed
163
+ carries `meta.repository`, pass `--repo-root .` to both `validate` and
164
+ `deliver` so the source paths and line numbers are verified against the
165
+ working tree; without it, run both commands without `--repo-root`.
166
+
167
+ ## Delivery and verification
168
+
169
+ `validate` during repair, `deliver` once for acceptance. Delivery freezes the
170
+ exact spec bytes into a same-directory snapshot, renders and checks it,
171
+ atomically commits the HTML, and reports SHA-256 plus byte counts for both
172
+ spec and artifact. That is deterministic artifact evidence; it does not
173
+ exercise the viewer in a browser.
174
+
175
+ After `deliver` exits 0, run the Clio-side check on the committed file:
176
+
177
+ ```
178
+ verify(check="frontend", path="<output.html>")
179
+ ```
180
+
181
+ That validates structure, local references, and syntax, and loads the page
182
+ in a headless browser when one is on PATH. Archify's own
183
+ `node <skill>/bin/archify.mjs visual-check <output.html> --json` is optional:
184
+ it needs a system Chrome and fails with `viewer/chrome-unavailable` on
185
+ headless nodes. Report that outcome as what it is, never as a pass.
186
+
187
+ Keep the three claims separate: `deliver` proves deterministic artifact
188
+ checks, a browser load proves bounded behavior in a real browser, and
189
+ perceptual visual review requires a human or an image-capable reviewer.
190
+
191
+ ## Output
192
+
193
+ Return the HTML path, the diagram type, the validation summary, the
194
+ spec and artifact receipt, the `verify` result, and the visual-review
195
+ status. Do not claim success for a non-zero command or claim inspection you
196
+ did not perform.
@@ -0,0 +1,65 @@
1
+ # Evals — archify
2
+
3
+ RED-GREEN scenarios (subagent WITHOUT the skill vs WITH). Pass/fail per
4
+ bullet. Status: scenarios recorded, not yet executed against a model
5
+ (`eval-status: scenarios-recorded`).
6
+
7
+ Both scenarios assume the skill is installed at project scope
8
+ (`.clio-coder/skills/archify/`) and run from the project root.
9
+
10
+ ## S1 — describe a system
11
+
12
+ Setup: empty git repository. Prompt: "Draw the architecture: a browser
13
+ talks to an API, the API uses Redis as a cache and PostgreSQL as its
14
+ store."
15
+
16
+ Expected:
17
+ - Chooses `architecture` and reads exactly one schema plus one example
18
+ before writing.
19
+ - The very next tool action writes
20
+ `.clio-coder/artifacts/maps/<name>.architecture.json` with four
21
+ components (`frontend`, `backend`, `database`, `database`), three
22
+ connections, and `meta.quality_profile: "showcase"`.
23
+ - Runs `validate architecture ... --quality showcase --json`; the receipt
24
+ reports 0 errors and 0 warnings.
25
+ - Runs `deliver` once; exit 0; `.clio-coder/artifacts/maps/<name>.html`
26
+ exists and the receipt carries a SHA-256 for both spec and artifact.
27
+ - Runs `verify(check="frontend", path=<html>)` and reports its result.
28
+ - Never invokes `scripts/check-update.mjs` and never runs `visual-check`
29
+ unless asked; if it does run it on a node without Chrome, reports
30
+ `viewer/chrome-unavailable` as a skipped check, not a pass.
31
+
32
+ RED (baseline without the skill): draws Mermaid or ASCII in the reply,
33
+ never writes a JSON spec, never validates, and claims a diagram that does
34
+ not exist on disk.
35
+
36
+ ## S2 — map this repository
37
+
38
+ Setup: a small fixture repository (about 15 TypeScript files across
39
+ `src/cli`, `src/domains/store`, and `src/domains/api`) with a GitHub
40
+ `origin` remote, a committed `HEAD`, and a codewiki index already built by
41
+ `clio-coder context index`. Prompt: "Map this repository."
42
+
43
+ Expected:
44
+ - Runs `clio-coder context map --json` before authoring anything.
45
+ - Keeps `meta.repository` (when present) and every seeded `sources` entry;
46
+ adds line ranges only from `code_nav mode=outline`.
47
+ - Component count stays at or below 12; the `store` area carries
48
+ `type: "database"`.
49
+ - Runs `validate architecture <seed> --repo-root . --quality standard
50
+ --json`; 0 errors.
51
+ - Runs `deliver ... --repo-root .`; exit 0; the HTML exists under
52
+ `.clio-coder/artifacts/maps/`.
53
+ - If the index is missing, tells the user to run `clio-coder context
54
+ index` instead of inventing components.
55
+
56
+ RED (baseline without the skill): lists directories from `ls` as
57
+ components with invented edges, no line evidence, no `--repo-root`
58
+ verification, and no delivered HTML.
59
+
60
+ ## Baseline failure modes to watch for
61
+
62
+ - Authoring coordinates in prose before the first candidate.
63
+ - Reading renderer source before the first candidate.
64
+ - Editing the spec after the final passing validation.
65
+ - Reporting a non-zero `deliver` or a missing Chrome as success.
@@ -7,7 +7,7 @@ triggers:
7
7
  - architecture for this feature
8
8
  - decide the engineering approach
9
9
  - compare architecture options
10
- version: 0.3.0
10
+ version: 0.4.0
11
11
  license: Apache-2.0
12
12
  allowed-tools:
13
13
  - read
@@ -51,17 +51,48 @@ stack they know beats a "better" one they don't), leanness (decide only
51
51
  what is needed to move), and reversibility (spend deliberation on the
52
52
  expensive calls only).
53
53
 
54
- When asking is unavailable (headless or worker run), do not skip the loop
55
- and do not go quiet: for each decision, state the options, the
56
- recommendation, and the reasoning inline, adopt the recommendation, and
57
- mark it `assumedconfirm`. Every other rule still applies, including the
58
- output path below.
54
+ ## Arguments
55
+
56
+ ```text
57
+ /skill architecture <the intent a PRD path, a brief, or a few sentences>
58
+ ```
59
+
60
+ - The text is what to decide the engineering approach for. A PRD path,
61
+ brief, or reference doc named or pathed in the request is Step 0's
62
+ grounding to read first, not more arguments.
63
+ - Nothing is required beyond some text; a blank invocation falls straight
64
+ to Step 0's own question — what are we building, and is there a written
65
+ intent to read — rather than inventing a project to architect.
66
+
67
+ There is no operator in a headless run: `ask_user` still executes, but with
68
+ nothing to answer it every call returns immediately with no answers, every
69
+ time — calling it again will not produce a different result. From wherever
70
+ the first empty response lands — Step 0's "ask whether reference docs
71
+ exist", Step 1's greenfield/brownfield call, or any decision in Step 2 —
72
+ switch immediately to the treatment already described above (state the
73
+ options, the recommendation, the reasoning, adopt it, mark it `assumed —
74
+ confirm`) and keep running every remaining step through Step 3 in the same
75
+ turn. Never stop at the first unanswered gate and never go silent; a
76
+ one-shot document produced without ever attempting the loop is also wrong
77
+ in the other direction — always investigate and state the loop out loud
78
+ first, degrading only once a gate actually goes unanswered. Never invent a
79
+ fact, evidence, or a codebase detail to back an assumption; anything
80
+ genuinely uncertain becomes an open question or a spike, never a plausible
81
+ guess.
82
+
83
+ The steps below (Step 0 through Step 3) are the plan; do not open a task
84
+ list for them. `tasks` sits outside this skill's tool surface and any call
85
+ to it is refused. `bash` is also outside this skill's tool surface —
86
+ investigate with `read`, `grep`, `find`, `git`, and `code_nav` instead;
87
+ reaching for `bash` to explore or verify is refused.
59
88
 
60
89
  ## Step 0 — Ground
61
90
 
62
91
  Read the intent (PRD path, brief, or the user's words). Read any reference
63
92
  docs passed alongside; if none were passed, ask whether any exist — the
64
- context needed is usually already written down.
93
+ context needed is usually already written down. To see what exists in the
94
+ repo before reading it, use the `find` tool (e.g. pattern `**/*`) or `ls`,
95
+ never `bash find`/`bash ls` — `bash` is refused outright, see Arguments.
65
96
 
66
97
  ## Step 1 — Greenfield or brownfield
67
98
 
@@ -99,11 +130,17 @@ user's call. Skip what does not apply and say that you skipped it:
99
130
 
100
131
  ## Step 3 — Write the decision doc
101
132
 
102
- Only after the calls are made. Default location: `docs/architecture-<slug>.md`
103
- (or folded into the PRD as an `## Architecture` section when the user
104
- prefers one document; a tracker page when the user names one and an
105
- integration exists). Never invent another filename `final_report.md`,
106
- `REPORT.md`, and similar are wrong. Shape:
133
+ Only after the calls are made. There are exactly three valid locations, in
134
+ order of default preference pick one, never a fourth:
135
+
136
+ 1. `docs/architecture-<slug>.md` the default, no exceptions needed.
137
+ 2. An `## Architecture` section folded into the named PRD, only when the
138
+ user said they prefer one document.
139
+ 3. A tracker page, only when the user names one and an integration exists.
140
+
141
+ No other filename or location is ever correct. `final_report.md`,
142
+ `REPORT.md`, `summary.md`, and anything similar are hard misses, not
143
+ stylistic variants — if none of the three above fit, use option 1. Shape:
107
144
 
108
145
  ```markdown
109
146
  # Architecture — <intent name>
@@ -133,3 +170,15 @@ sprint (`cut-it`), spike a flagged risk now, or keep refining here.
133
170
  - One foregone conclusion instead of real alternatives.
134
171
  - File-by-file edit lists (that is cut-it's altitude).
135
172
  - A one-way door decided by vibe instead of a spike.
173
+ - A decision doc at any filename other than the three valid locations
174
+ above — `final_report.md`, `REPORT.md`, and similar are wrong every time.
175
+ - A headless run that stops at the first unanswered `ask_user` call instead
176
+ of running the assumed-confirm treatment through every remaining step, or
177
+ one that skips straight to Step 3 without ever running the loop out loud.
178
+ - Opening a task list for Steps 0-3; `tasks` is refused. Reaching for
179
+ `bash` to explore the repo or verify the written doc; `bash` is not in
180
+ this skill's tool surface and the call is refused — use `read`, `grep`,
181
+ `find`, `git`, and `code_nav` instead.
182
+ - A claim in the doc that traces to neither the read intent/codebase nor a
183
+ fact marked `assumed — confirm` — an invented detail reads as confident
184
+ and is the hardest failure to catch after the fact.
@@ -34,3 +34,68 @@ Expected:
34
34
 
35
35
  One representative scenario via `clio-coder skills eval` against Nemo-3.5-Lightning
36
36
  (30B local, llamacpp on mini), full-auto sandbox. SMOKE ACTED but substance bullets failed (wrote final_report.md, skipped the loop). Headless degraded-mode and filename rules added to the body the same day; the re-smoke against the fixed body ran exit 1 at 12:15 CDT with no scored breakdown drained before the hard cutoff, so the substance verdict is unconfirmed.
37
+
38
+ ## Battletest record (2026-09-03)
39
+
40
+ Fixture: `/home/akougkas/eval-temp/harness/test_architecture.py`, continuing
41
+ the planning category's shared HPC log-triage domain from `product-intent`/
42
+ `prd`. Brownfield: seeds the actual `docs/hpc-log-triage.prd.md` intent doc
43
+ and a partial codebase (`src/scanner.py`: working `FailureEvent` + OOM-only
44
+ `scan_oom`, ECC/Xid not implemented; `requirements.txt` with click/pyyaml)
45
+ inside a git repo. The prompt asks for the v1 engineering approach for
46
+ dragon-cluster and blade-cluster and names the one genuine one-way-door
47
+ tension from the fixture family: an always-on log-ingestion pipeline vs.
48
+ on-demand reads. Combines S1 (brownfield: read existing surfaces, reuse
49
+ `FailureEvent`/`scan_oom` rather than re-spec) with a spike-worthy
50
+ one-way-door call into one gradable run. Graded 13 checks against real
51
+ post-run disk state (`docs/architecture-<slug>.md` at the exact default
52
+ path — no `final_report.md`/`REPORT.md` miss, all seven required sections,
53
+ >=2 genuinely distinct approaches inside "Approaches considered", the
54
+ pipeline-vs-on-demand tension named *and* backed by a spike with a decision
55
+ rule in "Spikes & experiments", grounding in the seeded PRD/code) plus the
56
+ reconstructed final assistant text and the raw JSONL's tool-call/safety-block
57
+ stream. Ran on `mini`/`ornith1.5-35b-moe` only this pass (see Still weak).
58
+
59
+ | run | model | wall | turns | in / out tokens | safety blocks | score | outcome |
60
+ |---|---|---|---|---|---|---|---|
61
+ | baseline (no skill) | ornith1.5-35b-moe | 110s | 5 | 11.1k / 8.5k | 0 | 3/13 | never invoked `/skill architecture`; investigated correctly (read the PRD and scanner.py) but then called the terminal `artifact` tool mid-reasoning with no arguments and ended the run before writing anything — no decision doc, no alternatives, no spike |
62
+ | v1 (frozen 0.3.0) | ornith1.5-35b-moe | 145s | 9 | 9.7k / 10.0k | 2 real + 1 benign | 10/13 | wrote the correct `docs/architecture-hpc-log-triage.md` with all sections, 3 real alternatives (a table: on-demand / always-on / hybrid-with-gate), the pipeline tension named with a spike and an explicit decision rule, and ran the full headless assumed-confirm loop entirely on its own initiative (the existing body prose already covers this well) — but reached for `bash` once (refused) and opened a `tasks` plan once (refused); a third "error" was a harmless `ls` on a directory the fixture never created |
63
+ | v2 (first hardened cut, 0.4.0) | ornith1.5-35b-moe | 125s | 9 | 5.5k / 7.6k | 1 real + 2 benign | 10/13 | `tasks` call eliminated entirely by the new explicit refusal line; still reached for `bash find .` once before self-recovering with the `find` tool — the added Red flags/Arguments refusal line reduced but did not eliminate the bash reflex, matching the pattern `prd`/`product-intent` saw on this same model family; 2 benign `read` ENOENTs (evidence docs the PRD cites but the fixture never seeded) also counted as errors under this harness's blanket isError grading |
64
+ | v3 (final 0.4.0) | ornith1.5-35b-moe | 159s | 7 | 8.5k / 9.7k | 0 real + 1 benign | 12/13 | zero `bash` calls, zero `tasks` calls, correct path, all 7 sections, 2 distinct approaches, pipeline tension with a spike and decision rule; the one remaining "error" is a harmless duplicate `context` call the harness nudged back onto the loaded skill (not a tool-surface refusal, `context` is always exempt) |
65
+
66
+ **Changes** (0.3.0 -> 0.4.0): (1) an `## Arguments` contract — the skill had
67
+ solid headless-degradation prose in its intro already, but no formal
68
+ contract section; added slash-invocation syntax, what's required vs.
69
+ inferred, and the explicit no-operator/`ask_user`-returns-empty rule ported
70
+ from `product-intent`/`prd`, extended to name Step 0's evidence-check and
71
+ Step 1's greenfield/brownfield call explicitly (not just Step 2's decisions)
72
+ as places the degradation applies from; (2) explicit `tasks` and `bash`
73
+ refusal lines in Arguments and Red flags — these were v1's two real safety
74
+ blocks; (3) Step 3's filename rule tightened from a permissive "default
75
+ location... never invent another" into an enumerated three-item list with
76
+ "no other filename or location is ever correct," closing the exact gap the
77
+ 2026-08-13 smoke record flagged (`final_report.md` on a different model);
78
+ (4) a one-line `find`/`ls`-not-`bash` hint added directly in Step 0, where
79
+ the exploration happens, which is what took the bash-reach from 1/run (v2)
80
+ to 0/run (v3); (5) five new Red flags entries naming the concrete failures
81
+ observed: wrong filename, a stalled or skipped headless loop, `tasks`/`bash`
82
+ reaches, and ungrounded claims.
83
+
84
+ **Still weak**: per this pass's coordinator note, only `ornith1.5-35b-moe`
85
+ on `mini` was run — no `qwen3.8-27b`/dynamo confirmation this session, so
86
+ cross-model-family generalization is unverified (the sibling `prd`/
87
+ `product-intent` runs found the bash-reflex fix that worked on `qwen3.8-27b`
88
+ did *not* fully generalize to `ornith-1.5-35b-a3b`, so the reverse — a fix
89
+ tuned on ornith not holding on qwen — is a live risk here too, untested).
90
+ The v3 run's one remaining logged "error" is a benign duplicate `context`
91
+ call, not a real defect, but the harness's blanket isError-counting means a
92
+ literal 13/13 may not be reachable without also silencing genuinely benign
93
+ tool responses — not worth chasing. `web_fetch` and `code_nav` (both in
94
+ allowed-tools) were never exercised — this fixture never needed them
95
+ (brownfield, no external research). The baseline's specific failure (an
96
+ unprompted terminal `artifact` call mid-investigation, with no arguments)
97
+ is a skill-selection/tool-choice issue outside this SKILL.md's own body.
98
+ Only one fixture shape ran (brownfield + one-way-door); a pure-greenfield
99
+ scenario (S2's familiarity-vs-fashion pull) and a mid-session altitude
100
+ check (S3, "just list the files to change") from the scenario list above
101
+ were not exercised standalone against 0.4.0.