@rryando/arcs 3.10.0 → 3.11.0

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 (326) hide show
  1. package/README.md +172 -146
  2. package/dist/cli/agent-registry.d.ts +12 -0
  3. package/dist/cli/agent-registry.d.ts.map +1 -0
  4. package/dist/cli/agent-registry.js +67 -0
  5. package/dist/cli/agent-registry.js.map +1 -0
  6. package/dist/cli/arcs-flash.d.ts +2 -0
  7. package/dist/cli/arcs-flash.d.ts.map +1 -0
  8. package/dist/cli/arcs-flash.js +68 -0
  9. package/dist/cli/arcs-flash.js.map +1 -0
  10. package/dist/cli/arcs-orchestrate-caveman.d.ts +2 -14
  11. package/dist/cli/arcs-orchestrate-caveman.d.ts.map +1 -1
  12. package/dist/cli/arcs-orchestrate-caveman.js +6 -97
  13. package/dist/cli/arcs-orchestrate-caveman.js.map +1 -1
  14. package/dist/cli/arcs-orchestrate.d.ts +1 -1
  15. package/dist/cli/arcs-orchestrate.d.ts.map +1 -1
  16. package/dist/cli/arcs-orchestrate.js +40 -383
  17. package/dist/cli/arcs-orchestrate.js.map +1 -1
  18. package/dist/cli/bundle-installer.d.ts +10 -4
  19. package/dist/cli/bundle-installer.d.ts.map +1 -1
  20. package/dist/cli/bundle-installer.js +99 -6
  21. package/dist/cli/bundle-installer.js.map +1 -1
  22. package/dist/cli/commands/batch.js +4 -0
  23. package/dist/cli/commands/batch.js.map +1 -1
  24. package/dist/cli/commands/hooks.d.ts +36 -0
  25. package/dist/cli/commands/hooks.d.ts.map +1 -0
  26. package/dist/cli/commands/hooks.js +298 -0
  27. package/dist/cli/commands/hooks.js.map +1 -0
  28. package/dist/cli/commands/index.d.ts +2 -0
  29. package/dist/cli/commands/index.d.ts.map +1 -1
  30. package/dist/cli/commands/index.js +2 -0
  31. package/dist/cli/commands/index.js.map +1 -1
  32. package/dist/cli/commands/project.js +27 -0
  33. package/dist/cli/commands/project.js.map +1 -1
  34. package/dist/cli/commands/task.js +16 -1
  35. package/dist/cli/commands/task.js.map +1 -1
  36. package/dist/cli/commands/web.d.ts +2 -0
  37. package/dist/cli/commands/web.d.ts.map +1 -0
  38. package/dist/cli/commands/web.js +56 -0
  39. package/dist/cli/commands/web.js.map +1 -0
  40. package/dist/cli/config.d.ts +32 -0
  41. package/dist/cli/config.d.ts.map +1 -1
  42. package/dist/cli/config.js +56 -0
  43. package/dist/cli/config.js.map +1 -1
  44. package/dist/cli/instructions.d.ts +19 -6
  45. package/dist/cli/instructions.d.ts.map +1 -1
  46. package/dist/cli/instructions.js +62 -32
  47. package/dist/cli/instructions.js.map +1 -1
  48. package/dist/cli/orchestrator-shared-blocks.d.ts +31 -0
  49. package/dist/cli/orchestrator-shared-blocks.d.ts.map +1 -0
  50. package/dist/cli/orchestrator-shared-blocks.js +148 -0
  51. package/dist/cli/orchestrator-shared-blocks.js.map +1 -0
  52. package/dist/cli/setup.d.ts.map +1 -1
  53. package/dist/cli/setup.js +159 -85
  54. package/dist/cli/setup.js.map +1 -1
  55. package/dist/retrieval/index-builder.d.ts.map +1 -1
  56. package/dist/retrieval/index-builder.js +29 -1
  57. package/dist/retrieval/index-builder.js.map +1 -1
  58. package/dist/utils/claude-code-hook-install.d.ts +80 -0
  59. package/dist/utils/claude-code-hook-install.d.ts.map +1 -0
  60. package/dist/utils/claude-code-hook-install.js +146 -0
  61. package/dist/utils/claude-code-hook-install.js.map +1 -0
  62. package/dist/utils/claude-transcript.d.ts +127 -0
  63. package/dist/utils/claude-transcript.d.ts.map +1 -0
  64. package/dist/utils/claude-transcript.js +353 -0
  65. package/dist/utils/claude-transcript.js.map +1 -0
  66. package/dist/utils/diagram-generator.d.ts +1 -1
  67. package/dist/utils/diagram-generator.d.ts.map +1 -1
  68. package/dist/utils/diagram-generator.js +3 -2
  69. package/dist/utils/diagram-generator.js.map +1 -1
  70. package/dist/utils/errors.d.ts +6 -2
  71. package/dist/utils/errors.d.ts.map +1 -1
  72. package/dist/utils/errors.js +12 -0
  73. package/dist/utils/errors.js.map +1 -1
  74. package/dist/utils/hook-token-store.d.ts +22 -0
  75. package/dist/utils/hook-token-store.d.ts.map +1 -0
  76. package/dist/utils/hook-token-store.js +43 -0
  77. package/dist/utils/hook-token-store.js.map +1 -0
  78. package/dist/utils/json-schemas.d.ts +186 -2
  79. package/dist/utils/json-schemas.d.ts.map +1 -1
  80. package/dist/utils/json-schemas.js +48 -4
  81. package/dist/utils/json-schemas.js.map +1 -1
  82. package/dist/utils/knowledge-store.d.ts +7 -1
  83. package/dist/utils/knowledge-store.d.ts.map +1 -1
  84. package/dist/utils/knowledge-store.js +97 -65
  85. package/dist/utils/knowledge-store.js.map +1 -1
  86. package/dist/utils/plan-store.d.ts +8 -0
  87. package/dist/utils/plan-store.d.ts.map +1 -1
  88. package/dist/utils/plan-store.js +98 -59
  89. package/dist/utils/plan-store.js.map +1 -1
  90. package/dist/utils/project-resolver.d.ts +8 -0
  91. package/dist/utils/project-resolver.d.ts.map +1 -1
  92. package/dist/utils/project-resolver.js +7 -2
  93. package/dist/utils/project-resolver.js.map +1 -1
  94. package/dist/utils/session-store.d.ts +113 -0
  95. package/dist/utils/session-store.d.ts.map +1 -0
  96. package/dist/utils/session-store.js +312 -0
  97. package/dist/utils/session-store.js.map +1 -0
  98. package/dist/utils/storage-utils.d.ts +31 -0
  99. package/dist/utils/storage-utils.d.ts.map +1 -1
  100. package/dist/utils/storage-utils.js +116 -5
  101. package/dist/utils/storage-utils.js.map +1 -1
  102. package/dist/utils/task-store.d.ts +7 -0
  103. package/dist/utils/task-store.d.ts.map +1 -1
  104. package/dist/utils/task-store.js +73 -23
  105. package/dist/utils/task-store.js.map +1 -1
  106. package/dist/web-client/assets/GraphCanvas-dNyZ458L.js +1 -0
  107. package/dist/web-client/assets/MarkdownEditor-BmU9mdkN.js +77 -0
  108. package/dist/web-client/assets/abnfDiagram-VRR7QNED-D1BFBoeF.js +1 -0
  109. package/dist/web-client/assets/arc-Bfaogrm1.js +1 -0
  110. package/dist/web-client/assets/architecture-TIHT7OUA-CJqI5wNI.js +1 -0
  111. package/dist/web-client/assets/architectureDiagram-ZJ3FMSHR-CA8hTWUK.js +36 -0
  112. package/dist/web-client/assets/array-BifhSqXX.js +1 -0
  113. package/dist/web-client/assets/blockDiagram-677ZJIJ3-CQpb_KwX.js +132 -0
  114. package/dist/web-client/assets/c4Diagram-LMCZKHZV-BhpHX84V.js +10 -0
  115. package/dist/web-client/assets/channel-C8DlmyVe.js +1 -0
  116. package/dist/web-client/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
  117. package/dist/web-client/assets/chunk-32BRIVSS-BUusQQa_.js +1 -0
  118. package/dist/web-client/assets/chunk-52WLFC77-nNYwlftl.js +10 -0
  119. package/dist/web-client/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
  120. package/dist/web-client/assets/chunk-7BUUIJ7U-Bb538aSH.js +1 -0
  121. package/dist/web-client/assets/chunk-C7G6YPKG-D0a-yqnK.js +1 -0
  122. package/dist/web-client/assets/chunk-EX3LRPZG-IDuRMN-4.js +231 -0
  123. package/dist/web-client/assets/chunk-FWX5IMBZ-D_spTcqi.js +2 -0
  124. package/dist/web-client/assets/chunk-HOUHSVGY-C-bcxwZS.js +1 -0
  125. package/dist/web-client/assets/chunk-ICXQ74PX-CjmK2bAM.js +2 -0
  126. package/dist/web-client/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
  127. package/dist/web-client/assets/chunk-KEIR6QF5-DEvma7oi.js +161 -0
  128. package/dist/web-client/assets/chunk-MOJQB5TN-Bkc08KWY.js +88 -0
  129. package/dist/web-client/assets/chunk-OGEWGWER-BAAYYvG9.js +1 -0
  130. package/dist/web-client/assets/chunk-PUDLZKDR-WXbPY7NM.js +156 -0
  131. package/dist/web-client/assets/chunk-Q4XR5HBZ-DcbnjxQE.js +70 -0
  132. package/dist/web-client/assets/chunk-RYQCIY6F-np2RyIY1.js +1 -0
  133. package/dist/web-client/assets/chunk-V7JOEXUC-C6t75PAp.js +206 -0
  134. package/dist/web-client/assets/chunk-VAUOI2AC-DVrJ0Ic7.js +1 -0
  135. package/dist/web-client/assets/chunk-VR4S4FIN-MOOFvGS0.js +1 -0
  136. package/dist/web-client/assets/chunk-WYO6CB5R-sK7Y2NZD.js +125 -0
  137. package/dist/web-client/assets/chunk-XXDRQBXY-BvKO0v-W.js +1 -0
  138. package/dist/web-client/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
  139. package/dist/web-client/assets/chunk-ZGVPDNZ5-a13RQsku.js +62 -0
  140. package/dist/web-client/assets/chunk-ZIRB5QZD-BpeS1aZ7.js +32 -0
  141. package/dist/web-client/assets/classDiagram-OUVF2IWQ-p32N1P_G.js +1 -0
  142. package/dist/web-client/assets/classDiagram-v2-EOCWNBFH-p32N1P_G.js +1 -0
  143. package/dist/web-client/assets/cose-bilkent-JH36ORCC-BebHqzgp.js +1 -0
  144. package/dist/web-client/assets/cynefin-VYW2F7L2-D8xaH-wO.js +1 -0
  145. package/dist/web-client/assets/cynefinDiagram-TSTJHNR4-Bt__EqJW.js +62 -0
  146. package/dist/web-client/assets/cytoscape-fcose-peAzqedC.js +1 -0
  147. package/dist/web-client/assets/cytoscape.esm-C3UvhD5t.js +321 -0
  148. package/dist/web-client/assets/dagre-Buvkdvvj.js +1 -0
  149. package/dist/web-client/assets/dagre-VKFMJZFB-Bwgjwflz.js +4 -0
  150. package/dist/web-client/assets/defaultLocale-BFoDCU3G.js +1 -0
  151. package/dist/web-client/assets/diagram-FQU43EPY-CaPDVUq2.js +3 -0
  152. package/dist/web-client/assets/diagram-G47NLZAW-BQLB9YYA.js +24 -0
  153. package/dist/web-client/assets/diagram-NH7WQ7WH-BWo84w8Y.js +24 -0
  154. package/dist/web-client/assets/diagram-OA4YK3LP-bKn6Pz5s.js +30 -0
  155. package/dist/web-client/assets/diagram-WEI45ONY-BRqV5Oy6.js +41 -0
  156. package/dist/web-client/assets/dist-B_J_HbC0.js +1 -0
  157. package/dist/web-client/assets/ebnfDiagram-CCIWWBDH-DhUXL1-7.js +1 -0
  158. package/dist/web-client/assets/erDiagram-Q63AITRT-HXAQQ-_F.js +85 -0
  159. package/dist/web-client/assets/eventmodeling-45OFAUF4-Bj5P8mZJ.js +1 -0
  160. package/dist/web-client/assets/flowDiagram-23GEKE2U-37BztFri.js +1 -0
  161. package/dist/web-client/assets/ganttDiagram-NO4QXBWP-D-Ddf_Ii.js +292 -0
  162. package/dist/web-client/assets/gitGraph-TEB2WS4Q-BmHzs0uF.js +1 -0
  163. package/dist/web-client/assets/gitGraphDiagram-IHSO6WYX-YnQWrlh_.js +106 -0
  164. package/dist/web-client/assets/graphlib-DS17s2tU.js +1 -0
  165. package/dist/web-client/assets/index-3mNPVkix.css +2 -0
  166. package/dist/web-client/assets/index-DCWxuIeQ.js +58 -0
  167. package/dist/web-client/assets/info-DKCQHKI2-DCT_B7RN.js +1 -0
  168. package/dist/web-client/assets/infoDiagram-FWYZ7A6U-D-le1Zhq.js +2 -0
  169. package/dist/web-client/assets/init-C-OQMol4.js +1 -0
  170. package/dist/web-client/assets/ishikawaDiagram-FXEZZL3T-Jr1x2VJB.js +70 -0
  171. package/dist/web-client/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2 +0 -0
  172. package/dist/web-client/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2 +0 -0
  173. package/dist/web-client/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2 +0 -0
  174. package/dist/web-client/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
  175. package/dist/web-client/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2 +0 -0
  176. package/dist/web-client/assets/journeyDiagram-5HDEW3XC-BF9ELxj-.js +139 -0
  177. package/dist/web-client/assets/kanban-definition-HUTT4EX6-C4fJqAxu.js +89 -0
  178. package/dist/web-client/assets/katex-DolUETbr.js +257 -0
  179. package/dist/web-client/assets/line-7N7ikFxa.js +1 -0
  180. package/dist/web-client/assets/linear-DeUiD2wj.js +1 -0
  181. package/dist/web-client/assets/map-BaFkSB1l.js +1 -0
  182. package/dist/web-client/assets/mermaid-parser.core-QbC1icPt.js +7 -0
  183. package/dist/web-client/assets/mermaid.core-C26d_UJm.js +11 -0
  184. package/dist/web-client/assets/mindmap-definition-LN4V7U3C-D6TV1JDf.js +96 -0
  185. package/dist/web-client/assets/ordinal-BDEzSJ7C.js +1 -0
  186. package/dist/web-client/assets/packet-7NZHBO7P-CR1vrGj3.js +1 -0
  187. package/dist/web-client/assets/path-COt_16Va.js +1 -0
  188. package/dist/web-client/assets/pegDiagram-2B236MQR-xOMBBtfV.js +1 -0
  189. package/dist/web-client/assets/pie-RZYD4A2V-BbWuhjwy.js +1 -0
  190. package/dist/web-client/assets/pieDiagram-ENE6RG2P-MsfnsqgW.js +39 -0
  191. package/dist/web-client/assets/quadrantDiagram-ABIIQ3AL-BoI7zKXF.js +7 -0
  192. package/dist/web-client/assets/radar-I7S5WNFK-CbYXKToJ.js +1 -0
  193. package/dist/web-client/assets/railroad-3IZDKUUU-6LxHDkLe.js +1 -0
  194. package/dist/web-client/assets/railroad-abnf-AHOZXSZD-2Dg9wu0J.js +1 -0
  195. package/dist/web-client/assets/railroad-ebnf-EBAXGLYW-C_E2ot0R.js +1 -0
  196. package/dist/web-client/assets/railroad-peg-LSFZ7HO6-Bs9UQR1b.js +1 -0
  197. package/dist/web-client/assets/railroadDiagram-RFXS5EU6-D6RUoUki.js +1 -0
  198. package/dist/web-client/assets/requirementDiagram-TGXJPOKE-B6k4BDpE.js +84 -0
  199. package/dist/web-client/assets/rolldown-runtime-Dd_uD5pT.js +1 -0
  200. package/dist/web-client/assets/rough.esm-By172zw-.js +1 -0
  201. package/dist/web-client/assets/sankeyDiagram-HTMAVEWB-BUDF-UFr.js +40 -0
  202. package/dist/web-client/assets/sequenceDiagram-DBY2YBRQ-D6GqcsUi.js +162 -0
  203. package/dist/web-client/assets/sizeCapture-X5ZJPWSS-B0uUizjq.js +1 -0
  204. package/dist/web-client/assets/src-oBChb5qS.js +1 -0
  205. package/dist/web-client/assets/stateDiagram-2N3HPSRC-WfJCQAK5.js +1 -0
  206. package/dist/web-client/assets/stateDiagram-v2-6OUMAXLB-BCMWGnsJ.js +1 -0
  207. package/dist/web-client/assets/swimlanes-5IMT3BWC-BtMo82mC.js +2 -0
  208. package/dist/web-client/assets/swimlanesDiagram-G3AALYLV-DmudmLcK.js +8 -0
  209. package/dist/web-client/assets/timeline-definition-FHXFAJF6-CoAmv2Sn.js +120 -0
  210. package/dist/web-client/assets/treeView-QDETBFTQ-BWsKzE1s.js +1 -0
  211. package/dist/web-client/assets/treemap-6X3UGDF4-i_qGtB3o.js +1 -0
  212. package/dist/web-client/assets/vennDiagram-L72KCM5P-DYkiLe-P.js +34 -0
  213. package/dist/web-client/assets/wardley-OPB4EBWU-Daaqr1Vp.js +1 -0
  214. package/dist/web-client/assets/wardleyDiagram-EHGQE667-Bofbsg3J.js +78 -0
  215. package/dist/web-client/assets/xychartDiagram-FW5EYKEG-KNF4VTfL.js +7 -0
  216. package/dist/web-client/index.html +15 -0
  217. package/dist/web-server/app.d.ts +13 -0
  218. package/dist/web-server/app.d.ts.map +1 -0
  219. package/dist/web-server/app.js +58 -0
  220. package/dist/web-server/app.js.map +1 -0
  221. package/dist/web-server/claude-runner.d.ts +86 -0
  222. package/dist/web-server/claude-runner.d.ts.map +1 -0
  223. package/dist/web-server/claude-runner.js +320 -0
  224. package/dist/web-server/claude-runner.js.map +1 -0
  225. package/dist/web-server/hook-auth.d.ts +12 -0
  226. package/dist/web-server/hook-auth.d.ts.map +1 -0
  227. package/dist/web-server/hook-auth.js +36 -0
  228. package/dist/web-server/hook-auth.js.map +1 -0
  229. package/dist/web-server/index.d.ts +23 -0
  230. package/dist/web-server/index.d.ts.map +1 -0
  231. package/dist/web-server/index.js +49 -0
  232. package/dist/web-server/index.js.map +1 -0
  233. package/dist/web-server/opencode-client.d.ts +123 -0
  234. package/dist/web-server/opencode-client.d.ts.map +1 -0
  235. package/dist/web-server/opencode-client.js +514 -0
  236. package/dist/web-server/opencode-client.js.map +1 -0
  237. package/dist/web-server/respond.d.ts +33 -0
  238. package/dist/web-server/respond.d.ts.map +1 -0
  239. package/dist/web-server/respond.js +79 -0
  240. package/dist/web-server/respond.js.map +1 -0
  241. package/dist/web-server/routes/collections.d.ts +11 -0
  242. package/dist/web-server/routes/collections.d.ts.map +1 -0
  243. package/dist/web-server/routes/collections.js +217 -0
  244. package/dist/web-server/routes/collections.js.map +1 -0
  245. package/dist/web-server/routes/discovery.d.ts +7 -0
  246. package/dist/web-server/routes/discovery.d.ts.map +1 -0
  247. package/dist/web-server/routes/discovery.js +159 -0
  248. package/dist/web-server/routes/discovery.js.map +1 -0
  249. package/dist/web-server/routes/events.d.ts +6 -0
  250. package/dist/web-server/routes/events.d.ts.map +1 -0
  251. package/dist/web-server/routes/events.js +25 -0
  252. package/dist/web-server/routes/events.js.map +1 -0
  253. package/dist/web-server/routes/hook-events.d.ts +19 -0
  254. package/dist/web-server/routes/hook-events.d.ts.map +1 -0
  255. package/dist/web-server/routes/hook-events.js +135 -0
  256. package/dist/web-server/routes/hook-events.js.map +1 -0
  257. package/dist/web-server/routes/projects.d.ts +7 -0
  258. package/dist/web-server/routes/projects.d.ts.map +1 -0
  259. package/dist/web-server/routes/projects.js +272 -0
  260. package/dist/web-server/routes/projects.js.map +1 -0
  261. package/dist/web-server/routes/sessions.d.ts +16 -0
  262. package/dist/web-server/routes/sessions.d.ts.map +1 -0
  263. package/dist/web-server/routes/sessions.js +442 -0
  264. package/dist/web-server/routes/sessions.js.map +1 -0
  265. package/dist/web-server/security.d.ts +7 -0
  266. package/dist/web-server/security.d.ts.map +1 -0
  267. package/dist/web-server/security.js +41 -0
  268. package/dist/web-server/security.js.map +1 -0
  269. package/dist/web-server/static.d.ts +10 -0
  270. package/dist/web-server/static.d.ts.map +1 -0
  271. package/dist/web-server/static.js +36 -0
  272. package/dist/web-server/static.js.map +1 -0
  273. package/dist/web-server/storage.d.ts +17 -0
  274. package/dist/web-server/storage.d.ts.map +1 -0
  275. package/dist/web-server/storage.js +42 -0
  276. package/dist/web-server/storage.js.map +1 -0
  277. package/dist/web-server/watcher.d.ts +37 -0
  278. package/dist/web-server/watcher.d.ts.map +1 -0
  279. package/dist/web-server/watcher.js +181 -0
  280. package/dist/web-server/watcher.js.map +1 -0
  281. package/opencode/arcs/bundle-runtime.json +5 -13
  282. package/opencode/arcs/manifest.json +213 -149
  283. package/opencode/arcs/prompts/arcs-docs.txt +53 -47
  284. package/opencode/arcs/prompts/arcs-flash.txt +190 -0
  285. package/opencode/arcs/prompts/arcs-orchestrate-caveman.txt +116 -422
  286. package/opencode/arcs/prompts/arcs-orchestrate.txt +114 -341
  287. package/opencode/arcs/prompts/code-reviewer.txt +37 -98
  288. package/opencode/arcs/prompts/devil-advocate.txt +44 -115
  289. package/opencode/arcs/prompts/graph-explorer.txt +31 -179
  290. package/opencode/arcs/prompts/software-engineer.txt +24 -6
  291. package/opencode/arcs/prompts/tech-architect.txt +25 -9
  292. package/opencode/arcs/skills/brainstorming/SKILL.md +65 -105
  293. package/opencode/arcs/skills/deep-pr-review/SKILL.md +5 -5
  294. package/opencode/arcs/skills/deep-pr-review/review-template.md +1 -1
  295. package/opencode/arcs/skills/enriching-codegraph-proposals/SKILL.md +17 -18
  296. package/opencode/arcs/skills/executing-plans/SKILL.md +26 -234
  297. package/opencode/arcs/skills/implementation/SKILL.md +61 -0
  298. package/opencode/arcs/skills/init-project/SKILL.md +16 -15
  299. package/opencode/arcs/skills/install-claude-code-hook/SKILL.md +143 -0
  300. package/opencode/arcs/skills/systematic-debugging/SKILL.md +7 -7
  301. package/opencode/arcs/skills/test-driven-development/SKILL.md +1 -1
  302. package/opencode/arcs/skills/to-diagram/SKILL.md +8 -3
  303. package/opencode/arcs/skills/writing-knowledge/SKILL.md +7 -6
  304. package/opencode/arcs/skills/writing-plans/SKILL.md +80 -130
  305. package/opencode/arcs/skills/writing-plans/plan-document-reviewer-prompt.md +38 -30
  306. package/package.json +14 -6
  307. package/scripts/build-opencode-bundle.mjs +22 -7
  308. package/scripts/claude-code-session-hook.mjs +125 -0
  309. package/scripts/deploy-claudecode-bundle.mjs +185 -132
  310. package/scripts/deploy-opencode-bundle.mjs +181 -5
  311. package/scripts/lib/bundle-helpers.mjs +26 -0
  312. package/scripts/lint-bundle.mjs +123 -3
  313. package/skills/explore-dag.md +5 -3
  314. package/skills/init-project.md +27 -26
  315. package/skills/orchestrate.md +29 -13
  316. package/skills/update-docs.md +8 -13
  317. package/opencode/arcs/prompts/docs-researcher.txt +0 -79
  318. package/opencode/arcs/prompts/oncall-ops.txt +0 -85
  319. package/opencode/arcs/skills/code-agent/SKILL.md +0 -63
  320. package/opencode/arcs/skills/executing-plans/code-quality-reviewer-prompt.md +0 -57
  321. package/opencode/arcs/skills/executing-plans/implementer-prompt.md +0 -152
  322. package/opencode/arcs/skills/executing-plans/spec-reviewer-prompt.md +0 -91
  323. package/opencode/arcs/skills/quick-dev/SKILL.md +0 -52
  324. package/opencode/arcs/skills/requesting-code-review/SKILL.md +0 -59
  325. package/opencode/arcs/skills/requesting-code-review/code-reviewer.md +0 -139
  326. package/opencode/arcs/skills/the-ladder/SKILL.md +0 -54
@@ -8,21 +8,197 @@
8
8
  "destination": "skills/arcs"
9
9
  },
10
10
  "agents": [
11
- { "source": "prompts/software-engineer.txt", "destination": "prompts/software-engineer.txt" },
12
- { "source": "prompts/tech-architect.txt", "destination": "prompts/tech-architect.txt" },
13
- { "source": "prompts/oncall-ops.txt", "destination": "prompts/oncall-ops.txt" },
14
- { "source": "prompts/arcs-docs.txt", "destination": "prompts/arcs-docs.txt" },
15
- { "source": "prompts/code-reviewer.txt", "destination": "prompts/code-reviewer.txt" },
16
- { "source": "prompts/docs-researcher.txt", "destination": "prompts/docs-researcher.txt" },
17
- { "source": "prompts/devil-advocate.txt", "destination": "prompts/devil-advocate.txt" },
18
- { "source": "prompts/graph-explorer.txt", "destination": "prompts/graph-explorer.txt" },
19
- { "source": "prompts/arcs-orchestrate.txt", "destination": "prompts/arcs-orchestrate.txt" },
20
- { "source": "prompts/arcs-orchestrate-caveman.txt", "destination": "prompts/arcs-orchestrate-caveman.txt" }
21
- ],
22
- "ownedPaths": [
23
- "skills/arcs",
24
- "plugins/arcs.js"
11
+ {
12
+ "id": "software-engineer",
13
+ "status": "active",
14
+ "kind": "subagent",
15
+ "tier": "heavy",
16
+ "modes": ["opencode", "claudecode"],
17
+ "source": "prompts/software-engineer.txt",
18
+ "destination": "prompts/software-engineer.txt",
19
+ "description": "Implementation specialist. Writes code, runs tests, and ships verified work using orchestrator-selected implementation bounded or inspect mode.",
20
+ "permissions": {
21
+ "edit": "allow",
22
+ "bash": "allow",
23
+ "webfetch": "allow",
24
+ "mcp": "allow",
25
+ "task": "deny"
26
+ }
27
+ },
28
+ {
29
+ "id": "tech-architect",
30
+ "status": "active",
31
+ "kind": "subagent",
32
+ "tier": "standard",
33
+ "modes": ["opencode", "claudecode"],
34
+ "source": "prompts/tech-architect.txt",
35
+ "destination": "prompts/tech-architect.txt",
36
+ "description": "Architecture, analysis, and cited research specialist. Produces read-only structural guidance, trade-off evaluation, and DAG-first research synthesis.",
37
+ "permissions": {
38
+ "edit": "deny",
39
+ "bash": "allow",
40
+ "webfetch": "allow",
41
+ "mcp": "allow",
42
+ "task": "deny"
43
+ }
44
+ },
45
+ {
46
+ "id": "oncall-ops",
47
+ "status": "retired",
48
+ "replacementId": "software-engineer",
49
+ "kind": "subagent",
50
+ "tier": "heavy",
51
+ "modes": ["opencode", "claudecode"],
52
+ "source": "prompts/oncall-ops.txt",
53
+ "destination": "prompts/oncall-ops.txt",
54
+ "description": "Debugging and diagnosis specialist. Finds root causes through systematic investigation, log triage, bisect, and performance profiling.",
55
+ "permissions": {
56
+ "edit": "allow",
57
+ "bash": "allow",
58
+ "webfetch": "allow",
59
+ "mcp": "allow",
60
+ "task": "deny"
61
+ }
62
+ },
63
+ {
64
+ "id": "arcs-docs",
65
+ "status": "active",
66
+ "kind": "subagent",
67
+ "tier": "heavy",
68
+ "modes": ["opencode", "claudecode"],
69
+ "source": "prompts/arcs-docs.txt",
70
+ "destination": "prompts/arcs-docs.txt",
71
+ "description": "ARCS documentation specialist. Manages plans, knowledge entries, diagrams, and DAG health. Knows ARCS structure intimately.",
72
+ "permissions": {
73
+ "edit": "allow",
74
+ "bash": "allow",
75
+ "webfetch": "allow",
76
+ "mcp": "allow",
77
+ "task": "deny"
78
+ }
79
+ },
80
+ {
81
+ "id": "code-reviewer",
82
+ "status": "active",
83
+ "kind": "subagent",
84
+ "tier": "light",
85
+ "modes": ["opencode", "claudecode"],
86
+ "source": "prompts/code-reviewer.txt",
87
+ "destination": "prompts/code-reviewer.txt",
88
+ "description": "Reviews code changes for production readiness and catches correctness, maintainability, and testing issues.",
89
+ "permissions": {
90
+ "edit": "deny",
91
+ "bash": "allow",
92
+ "webfetch": "allow",
93
+ "mcp": "allow",
94
+ "task": "deny"
95
+ }
96
+ },
97
+ {
98
+ "id": "docs-researcher",
99
+ "status": "retired",
100
+ "replacementId": "tech-architect",
101
+ "kind": "subagent",
102
+ "tier": "heavy",
103
+ "modes": ["opencode", "claudecode"],
104
+ "source": "prompts/docs-researcher.txt",
105
+ "destination": "prompts/docs-researcher.txt",
106
+ "description": "Handles documentation writing, research synthesis, OCR-adjacent extraction, and document-heavy analysis tasks.",
107
+ "permissions": {
108
+ "edit": "allow",
109
+ "bash": "allow",
110
+ "webfetch": "allow",
111
+ "mcp": "allow",
112
+ "task": "deny"
113
+ }
114
+ },
115
+ {
116
+ "id": "devil-advocate",
117
+ "status": "active",
118
+ "kind": "subagent",
119
+ "tier": "standard",
120
+ "modes": ["opencode", "claudecode"],
121
+ "source": "prompts/devil-advocate.txt",
122
+ "destination": "prompts/devil-advocate.txt",
123
+ "description": "Adversarial phase-gate agent. Checks work at phase boundaries using KISS/YAGNI/DRY principles. Runs tests, reads diffs, delivers pass/block verdicts. Cannot edit code.",
124
+ "permissions": {
125
+ "edit": "deny",
126
+ "bash": "allow",
127
+ "webfetch": "allow",
128
+ "mcp": "allow",
129
+ "task": "deny"
130
+ }
131
+ },
132
+ {
133
+ "id": "graph-explorer",
134
+ "status": "active",
135
+ "kind": "subagent",
136
+ "tier": "light",
137
+ "modes": ["opencode", "claudecode"],
138
+ "source": "prompts/graph-explorer.txt",
139
+ "destination": "prompts/graph-explorer.txt",
140
+ "description": "DAG-first codebase and knowledge exploration specialist. Queries arcs search, related, and context first, then codegraph MCP code-intelligence tools, before falling back to raw file-system tools. Replaces vanilla explore for ARCS projects.",
141
+ "permissions": {
142
+ "edit": "deny",
143
+ "bash": "allow",
144
+ "webfetch": "allow",
145
+ "mcp": "allow",
146
+ "task": "deny"
147
+ }
148
+ },
149
+ {
150
+ "id": "arcs-orchestrate",
151
+ "status": "active",
152
+ "kind": "primary",
153
+ "tier": "standard",
154
+ "modes": ["opencode", "claudecode"],
155
+ "source": "prompts/arcs-orchestrate.txt",
156
+ "destination": "prompts/arcs-orchestrate.txt",
157
+ "description": "The central coordinator for executing plans, managing agent dispatch, and handling DAG workflows.",
158
+ "permissions": {
159
+ "edit": "allow",
160
+ "bash": "allow",
161
+ "webfetch": "allow",
162
+ "mcp": "allow",
163
+ "task": "allow"
164
+ }
165
+ },
166
+ {
167
+ "id": "arcs-orchestrate-caveman",
168
+ "status": "active",
169
+ "kind": "primary",
170
+ "tier": "standard",
171
+ "modes": ["opencode", "claudecode"],
172
+ "source": "prompts/arcs-orchestrate-caveman.txt",
173
+ "destination": "prompts/arcs-orchestrate-caveman.txt",
174
+ "description": "A terse, high-efficiency orchestrator that drives tasks without extra commentary.",
175
+ "permissions": {
176
+ "edit": "allow",
177
+ "bash": "allow",
178
+ "webfetch": "allow",
179
+ "mcp": "allow",
180
+ "task": "allow"
181
+ }
182
+ },
183
+ {
184
+ "id": "arcs-flash",
185
+ "status": "active",
186
+ "kind": "primary",
187
+ "tier": "standard",
188
+ "modes": ["opencode", "claudecode"],
189
+ "source": "prompts/arcs-flash.txt",
190
+ "destination": "prompts/arcs-flash.txt",
191
+ "description": "A speed-optimized orchestrator that sources context from arcs knowledge first and maximizes parallel sub-agent dispatch under tiered gates.",
192
+ "permissions": {
193
+ "edit": "allow",
194
+ "bash": "allow",
195
+ "webfetch": "allow",
196
+ "mcp": "allow",
197
+ "task": "allow"
198
+ }
199
+ }
25
200
  ],
201
+ "ownedPaths": ["skills/arcs", "plugins/arcs.js"],
26
202
  "plugin": {
27
203
  "required": true,
28
204
  "source": ".opencode/plugins/arcs.js",
@@ -31,9 +207,7 @@
31
207
  "config": {
32
208
  "requiredMerges": [
33
209
  {
34
- "path": [
35
- "permission"
36
- ],
210
+ "path": ["permission"],
37
211
  "value": {
38
212
  "external_directory": {
39
213
  "/tmp": "allow",
@@ -47,78 +221,47 @@
47
221
  "mode": "merge"
48
222
  },
49
223
  {
50
- "path": [
51
- "lsp"
52
- ],
224
+ "path": ["lsp"],
53
225
  "value": true,
54
226
  "mode": "if-absent"
55
227
  },
56
228
  {
57
- "path": [
58
- "model"
59
- ],
229
+ "path": ["model"],
60
230
  "value": "github-copilot/claude-sonnet-4.6",
61
231
  "mode": "if-absent"
62
232
  },
63
233
  {
64
- "path": [
65
- "agent",
66
- "build",
67
- "model"
68
- ],
234
+ "path": ["agent", "build", "model"],
69
235
  "value": "github-copilot/claude-sonnet-4.6",
70
236
  "mode": "if-absent"
71
237
  },
72
238
  {
73
- "path": [
74
- "agent",
75
- "build",
76
- "temperature"
77
- ],
239
+ "path": ["agent", "build", "temperature"],
78
240
  "value": 0,
79
241
  "mode": "if-absent"
80
242
  },
81
243
  {
82
- "path": [
83
- "agent",
84
- "plan",
85
- "model"
86
- ],
244
+ "path": ["agent", "plan", "model"],
87
245
  "value": "github-copilot/claude-opus-4.6",
88
246
  "mode": "if-absent"
89
247
  },
90
248
  {
91
- "path": [
92
- "agent",
93
- "plan",
94
- "temperature"
95
- ],
249
+ "path": ["agent", "plan", "temperature"],
96
250
  "value": 0.5,
97
251
  "mode": "if-absent"
98
252
  },
99
253
  {
100
- "path": [
101
- "agent",
102
- "general",
103
- "model"
104
- ],
254
+ "path": ["agent", "general", "model"],
105
255
  "value": "github-copilot/claude-opus-4.6",
106
256
  "mode": "if-absent"
107
257
  },
108
258
  {
109
- "path": [
110
- "agent",
111
- "general",
112
- "temperature"
113
- ],
259
+ "path": ["agent", "general", "temperature"],
114
260
  "value": 0.3,
115
261
  "mode": "if-absent"
116
262
  },
117
263
  {
118
- "path": [
119
- "agent",
120
- "graph-explorer"
121
- ],
264
+ "path": ["agent", "graph-explorer"],
122
265
  "value": {
123
266
  "description": "DAG-first codebase and knowledge exploration specialist. Queries arcs search, related, and context first, then codegraph MCP code-intelligence tools, before falling back to raw file-system tools. Replaces vanilla explore for ARCS projects.",
124
267
  "mode": "subagent",
@@ -136,10 +279,7 @@
136
279
  "mode": "merge"
137
280
  },
138
281
  {
139
- "path": [
140
- "agent",
141
- "code-reviewer"
142
- ],
282
+ "path": ["agent", "code-reviewer"],
143
283
  "value": {
144
284
  "description": "Reviews code changes for production readiness and catches correctness, maintainability, and testing issues.",
145
285
  "mode": "subagent",
@@ -157,35 +297,11 @@
157
297
  "mode": "merge"
158
298
  },
159
299
  {
160
- "path": [
161
- "agent",
162
- "docs-researcher"
163
- ],
164
- "value": {
165
- "description": "Handles documentation writing, research synthesis, OCR-adjacent extraction, and document-heavy analysis tasks.",
166
- "mode": "subagent",
167
- "model": "github-copilot/claude-opus-4.6",
168
- "temperature": 0.4,
169
- "permission": {
170
- "edit": "allow",
171
- "bash": "allow",
172
- "webfetch": "allow",
173
- "mcp": "allow",
174
- "external_directory": { "*": "allow" }
175
- },
176
- "prompt": "{file:./prompts/docs-researcher.txt}"
177
- },
178
- "mode": "merge"
179
- },
180
- {
181
- "path": [
182
- "agent",
183
- "tech-architect"
184
- ],
300
+ "path": ["agent", "tech-architect"],
185
301
  "value": {
186
- "description": "Architecture and analysis specialist. Deep structural reasoning, refactor guidance, trade-off evaluation, and root cause analysis without making hasty edits.",
302
+ "description": "Architecture, analysis, and cited research specialist. Produces read-only structural guidance, trade-off evaluation, and DAG-first research synthesis.",
187
303
  "mode": "subagent",
188
- "model": "github-copilot/claude-haiku-4.5",
304
+ "model": "github-copilot/claude-sonnet-4.6",
189
305
  "temperature": 0.4,
190
306
  "permission": {
191
307
  "edit": "deny",
@@ -199,12 +315,9 @@
199
315
  "mode": "merge"
200
316
  },
201
317
  {
202
- "path": [
203
- "agent",
204
- "software-engineer"
205
- ],
318
+ "path": ["agent", "software-engineer"],
206
319
  "value": {
207
- "description": "Implementation specialist. Writes code, runs tests, ships features. Loads quick-dev, code-agent, test-driven-development, and executing-plans skills as needed.",
320
+ "description": "Implementation specialist. Writes code, runs tests, and ships verified work using orchestrator-selected implementation bounded or inspect mode.",
208
321
  "mode": "subagent",
209
322
  "model": "github-copilot/claude-opus-4.6",
210
323
  "temperature": 0,
@@ -220,10 +333,7 @@
220
333
  "mode": "merge"
221
334
  },
222
335
  {
223
- "path": [
224
- "agent",
225
- "arcs-docs"
226
- ],
336
+ "path": ["agent", "arcs-docs"],
227
337
  "value": {
228
338
  "description": "ARCS documentation specialist. Manages plans, knowledge entries, diagrams, and DAG health. Knows ARCS structure intimately.",
229
339
  "mode": "subagent",
@@ -241,10 +351,7 @@
241
351
  "mode": "merge"
242
352
  },
243
353
  {
244
- "path": [
245
- "agent",
246
- "devil-advocate"
247
- ],
354
+ "path": ["agent", "devil-advocate"],
248
355
  "value": {
249
356
  "description": "Adversarial phase-gate agent. Checks work at phase boundaries using KISS/YAGNI/DRY principles. Runs tests, reads diffs, delivers pass/block verdicts. Cannot edit code.",
250
357
  "mode": "subagent",
@@ -262,70 +369,27 @@
262
369
  "mode": "merge"
263
370
  },
264
371
  {
265
- "path": [
266
- "agent",
267
- "devil-advocate",
268
- "permission",
269
- "edit"
270
- ],
372
+ "path": ["agent", "devil-advocate", "permission", "edit"],
271
373
  "value": "deny",
272
374
  "mode": "overwrite"
273
375
  },
274
376
  {
275
- "path": [
276
- "agent",
277
- "oncall-ops"
278
- ],
279
- "value": {
280
- "description": "Debugging and diagnosis specialist. Finds root causes through systematic investigation, log triage, bisect, and performance profiling.",
281
- "mode": "subagent",
282
- "model": "github-copilot/claude-opus-4.6",
283
- "temperature": 0.1,
284
- "permission": {
285
- "edit": "allow",
286
- "bash": "allow",
287
- "webfetch": "allow",
288
- "mcp": "allow",
289
- "external_directory": { "*": "allow" }
290
- },
291
- "prompt": "{file:./prompts/oncall-ops.txt}"
292
- },
293
- "mode": "merge"
294
- },
295
- {
296
- "path": [
297
- "small_model"
298
- ],
377
+ "path": ["small_model"],
299
378
  "value": "github-copilot/claude-haiku-4.5",
300
379
  "mode": "if-absent"
301
380
  },
302
381
  {
303
- "path": [
304
- "agent",
305
- "graph-explorer",
306
- "permission",
307
- "edit"
308
- ],
382
+ "path": ["agent", "graph-explorer", "permission", "edit"],
309
383
  "value": "deny",
310
384
  "mode": "overwrite"
311
385
  },
312
386
  {
313
- "path": [
314
- "agent",
315
- "code-reviewer",
316
- "permission",
317
- "edit"
318
- ],
387
+ "path": ["agent", "code-reviewer", "permission", "edit"],
319
388
  "value": "deny",
320
389
  "mode": "overwrite"
321
390
  },
322
391
  {
323
- "path": [
324
- "agent",
325
- "tech-architect",
326
- "permission",
327
- "edit"
328
- ],
392
+ "path": ["agent", "tech-architect", "permission", "edit"],
329
393
  "value": "deny",
330
394
  "mode": "overwrite"
331
395
  }
@@ -13,7 +13,7 @@ Your dispatch normally carries the T0 context summary, `arcs validate` output, a
13
13
 
14
14
  Core skills you load: writing-plans (implementation plans), to-diagram (Mermaid execution maps).
15
15
 
16
- You have full ARCS CLI access. You write plans via `arcs plan create`, manage diagrams via `arcs diagram` commands, curate knowledge entries, and maintain DAG consistency.
16
+ You have ARCS CLI access. During SYNC, authority is phase-bound: AUDIT is read-only; only approved SYNC APPLY may execute `arcs knowledge upsert` or other approved DAG mutations.
17
17
 
18
18
  You understand: overview.md, tasks.md, dependencies.md, knowledge/ index, plans/ index, .diagram.mmd files, rich node metadata, sourceFiles references.
19
19
 
@@ -30,19 +30,19 @@ MANDATORY EXIT GATE: Before claiming documentation work is complete, validate th
30
30
  | `arcs brief --lean --json` | Session start — orient on project and sync state |
31
31
  | `arcs validate <slug> --json` | First step of any sync — check DAG health. Use `--checks=sourcefiles\|status-drift\|diagrams\|agents-md\|knowledge-health` for targeted checks (default: `all`) |
32
32
  | `arcs knowledge list <slug> --json` | Audit knowledge entries for staleness/taxonomy |
33
- | `arcs knowledge update-meta <slug> <id> --keywords="kw1,kw2" --json` | Fix taxonomy or metadata on entries |
34
- | `arcs knowledge upsert <slug> "<title>" --kind=<kind> --summary="..." --body="<substantive filled template>" --keywords="kw1,kw2" --source-files="src/foo.ts:anchor" --json` | Idempotent create-or-update a knowledge entry |
33
+ | `arcs knowledge update-meta <slug> <id> --keywords="kw1,kw2" --json` | APPLY only: fix approved taxonomy or metadata drift |
34
+ | `arcs knowledge upsert <slug> "<title>" --kind=<kind> --summary="..." --body="<substantive filled template>" --keywords="kw1,kw2" --source-files="src/foo.ts:anchor" --json` | APPLY only: execute an approved idempotent knowledge mutation |
35
35
  | `arcs diagram inspect <slug> <planId> --json` | Check diagram metadata completeness |
36
- | `arcs diagram status <slug> <planId> <nodeId> <status> --json` | Update diagram node status |
37
- | `arcs sync-agents-md <slug> --analysis-file=<path> --json` | Regenerate AGENTS.md from current DAG state |
38
- | `arcs plan update-meta <slug> <planId> --status=done --json` | Close completed plans |
36
+ | `arcs diagram status <slug> <planId> <nodeId> <status> --json` | APPLY only: execute an approved diagram-only status repair |
37
+ | `arcs sync-agents-md <slug> --analysis-file=<path> --json` | APPLY only: execute an approved AGENTS.md regeneration |
38
+ | `arcs plan update-meta <slug> <planId> --status=done --json` | APPLY only: execute an approved plan-status repair |
39
39
  | `arcs git-log <slug> --json` | Check commits since last sync to scope audit |
40
40
 
41
41
  ARCS JSON: stdout success `{ok,data}`; stderr errors `{ok:false,code,message,hint?}` — capture `2>&1`.
42
42
 
43
43
  ## SYNC Workflow (Primary Responsibility)
44
44
 
45
- You are the primary agent for SYNC operations. The orchestrator delegates the entire audit-and-repair cycle to you.
45
+ You are the primary agent for SYNC operations. The orchestrator delegates one explicit phase at a time: first AUDIT, then—only after a future SYNC gate PASS—APPLY.
46
46
 
47
47
  ### Input from Orchestrator
48
48
  You receive:
@@ -50,14 +50,16 @@ You receive:
50
50
  - T0 context summary (overview, active plans, current focus)
51
51
  - `arcs validate <slug>` output (structural health issues)
52
52
  - Staleness info: `lastSyncedAt`, `lastSyncGitCommit`, commits since, HEAD SHA
53
- - Instruction to audit and repair
53
+ - `PHASE: AUDIT`, or `PHASE: APPLY` plus the SYNC gate PASS and exact approved mutations
54
54
 
55
- ### Protocol
55
+ ### PHASE: AUDIT
56
56
 
57
- 1. **Orient:** Use the T0/validate/staleness payload from the dispatch; run `arcs brief --lean --json` only if the payload is absent or flagged stale
57
+ AUDIT is strictly read-only. It must not mutate files, the DAG, proposals, checkpoints, task/plan status, diagrams, or git state. Do not run any create/update/upsert/promote/drop/transition/status/sync/write-checkpoint command. Read prior lessons and gotchas while forming proposals, not while applying them.
58
+
59
+ 1. **Orient:** Use the T0/validate/staleness payload from the dispatch; run `arcs brief --lean --json` only if the payload is absent or flagged stale.
58
60
  2. **Audit DAG entries against codebase:**
59
61
  - `arcs knowledge list <slug> --lean --json` — review each entry's summary for staleness
60
- - `arcs validate <slug> --checks=knowledge-health --json` — enrich or prune thin entries (missing summary/source-files) and flag stale ones
62
+ - `arcs validate <slug> --checks=knowledge-health --json` — identify thin or stale entries; propose enrichment or pruning
61
63
  - `arcs task list <slug> --lean --json` — check statuses match reality
62
64
  - `arcs plan list <slug> --lean --json` — check plan statuses
63
65
  - Read overview.md via `arcs project get <slug> --doc=overview --json`
@@ -69,19 +71,17 @@ You receive:
69
71
  - Missing knowledge entries for recent architectural changes
70
72
  - Overview description no longer accurate
71
73
  - sourceFiles references that no longer resolve
72
- 4. **Apply corrections** (before repairing, read prior lessons/gotchas `arcs knowledge list <slug> --kind=lesson --lean --json` and `--kind=gotcha` so repairs stay consistent with captured decisions; then run directly):
73
- ```bash
74
- arcs knowledge update-meta <slug> <entryId> --summary="<new summary>" --keywords="<kw1>,<kw2>" --json
75
- arcs knowledge upsert <slug> "<title>" --kind=<kind> --summary="<summary>" --body="<substantive filled template>" --keywords="<kw1>,<kw2>" --source-files="<path[:anchor],...>" --json
76
- arcs task transition <slug> <taskId> done --planId=<planId> --diagramNodeId=<nodeId> --json
77
- arcs plan update-meta <slug> <planId> --status=done --json
78
- ```
79
- 5. **Write checkpoints:** After repairs:
80
- - Record `lastSyncedAt` (ISO timestamp) and `lastSyncGitCommit` (HEAD SHA)
81
- ```
82
- arcs project write-checkpoint <slug> --lastSyncedAt="$(date -u +%Y-%m-%dT%H:%M:%SZ)" --lastSyncGitCommit="$(git rev-parse HEAD)" --json
83
- ```
84
- 6. **Return sync report** to the orchestrator per the Output Format below (envelope header + SYNC_REPORT block)
74
+ 4. **Return proposals:** Emit exact, ready-to-run commands under `PROPOSED_MUTATIONS:`. Include rationale/evidence and stable proposal IDs. For knowledge, first use `arcs knowledge template --kind=<kind> --json`, and include substantive `--summary`, filled `--body`, `--keywords`, `--source-files`, and `--json`. Mark status-drift transitions separately and include both plan and diagram node IDs. Do not execute any proposal.
75
+
76
+ ### PHASE: APPLY
77
+
78
+ APPLY requires a dispatch that includes `PHASE: APPLY`, evidence that the future SYNC gate returned PASS, and the exact approved subset of `PROPOSED_MUTATIONS`. Missing or ambiguous approval means `STATUS: blocked` with no writes.
79
+
80
+ 1. Re-read the approved list and execute only the approved `PROPOSED_MUTATIONS`; do not infer, expand, combine, or repair anything else.
81
+ 2. For an approved knowledge upsert, preserve its substantive anatomy and source files. For approved SYNC status drift, `arcs task transition` is allowed only with both `--planId` and `--diagramNodeId`. Execution-task transitions remain orchestrator-only.
82
+ 3. Run `arcs validate <slug> --json` and applicable `arcs diagram validate <slug> <planId> --json` checks after all approved mutations.
83
+ 4. Only after validation passes, write the checkpoint with `arcs project write-checkpoint <slug> --lastSyncedAt="<ISO timestamp>" --lastSyncGitCommit="<audited HEAD SHA>" --json`. Never checkpoint a partial or failed APPLY.
84
+ 5. Return executed mutation IDs, validation evidence, and any rejected/unapplied proposal. Never run git add, commit, or push.
85
85
 
86
86
  ### Audit Surfaces (Checklist)
87
87
  - [ ] overview.md — description, goals, current focus accurate?
@@ -93,7 +93,7 @@ You receive:
93
93
  - [ ] dependencies.md — relationships still valid?
94
94
 
95
95
  ### Key Principles
96
- - **Transition authority** — you are the ONLY sub-agent authorized to run `arcs task transition`, and only within your delegated SYNC repair remit (status drift). Always pass `--planId` and `--diagramNodeId` so the diagram node updates atomically
96
+ - **Transition authority** — only an approved SYNC APPLY may let this agent run `arcs task transition`, solely for audited status drift. Always pass `--planId` and `--diagramNodeId`; all execution-task transitions happen under orchestrator post-gate control
97
97
  - **Knowledge entries are the priority** — stale entries mislead future agents more than stale docs
98
98
  - **Summaries must be accurate** — future sessions use summaries for BM25 search; if the summary says "3800 lines" when the file is 337, search relevance degrades
99
99
  - **Create entries for architectural changes** — any structural shift (new patterns, refactored modules, new directories) deserves a knowledge entry
@@ -106,37 +106,35 @@ When auditing plans that have `.diagram.mmd` files:
106
106
 
107
107
  1. **Drift surface:** Run `arcs diagram ready <slug> <planId>` and compare against task statuses to spot drift (classDef mismatch, phantom nodes, stale status markers)
108
108
  2. **Rich metadata:** Each node has `%% node:` comment blocks with `skill`, `scope`, `files`, `acceptance`, `verify` — use these to verify metadata completeness and accuracy
109
- 3. **Status-drift repairs:** When repairing status drift found during SYNC, transition atomically:
110
- ```bash
111
- arcs task transition <slug> <taskId> done --planId=<planId> --diagramNodeId=T001 --json
112
- ```
113
- Both `--planId` and `--diagramNodeId` are required for the diagram node to update atomically. This is your SYNC repair remit only — task execution transitions belong to the orchestrator.
114
- 4. **Post-repair re-check:** After repairs, re-run `arcs diagram ready <slug> <planId>` to confirm the diagram matches task reality
109
+ 3. **Status-drift proposals:** During AUDIT, return an exact transition command under `PROPOSED_MUTATIONS`; execute it only in approved APPLY. Both `--planId` and `--diagramNodeId` are required for atomic task/diagram status updates.
110
+ 4. **Post-APPLY re-check:** After approved repairs, re-run `arcs diagram ready <slug> <planId>` to confirm the diagram matches task reality
115
111
  5. **Scope changes:** For topology changes (task added/removed/dependency changed), report under SCOPE_CHANGE in your return — the orchestrator regenerates via `arcs diagram sort-metadata <slug> <planId> --json`
116
- 6. **Ownership:** Never hand-edit `.mmd` files status changes go only through `arcs task transition` / `arcs diagram status`; the orchestrator owns all direct `.mmd` writes.
112
+ 6. **Ownership:** Never hand-edit `.mmd` files. In AUDIT, propose status changes only. In APPLY, use only the approved transition/status command; the orchestrator owns all direct `.mmd` writes.
117
113
  7. **Fallback:** If node metadata is incomplete (missing `scope` or `acceptance`), read the plan body for that task's details
118
114
 
119
115
  ## Output Format
120
116
 
121
117
  Your output is consumed by the orchestrator (an LLM), not a human. Be structured and terse.
122
118
 
123
- For SYNC operations, return:
119
+ For SYNC AUDIT, return:
124
120
  ```
125
121
  STATUS: done | partial | blocked
126
- FILES_TOUCHED: <paths written directly (e.g., AGENTS.md) — or none; DAG mutations go under MUTATIONS>
127
- VERIFY: <arcs validate / arcs diagram validate command run> → pass|fail
122
+ FILES_TOUCHED: none
123
+ VERIFY: <read-only arcs validate / arcs diagram inspect command run> → pass|fail
128
124
  BLOCKED_BY: <only when blocked/partial — evidence>
129
125
 
130
126
  SYNC_REPORT:
131
127
  staleness: <N days, M commits>
132
- knowledge: <created:N updated:N>
133
- tasks: <transitioned:N>
134
- plans: <updated:N>
135
- docs: <updated:N>
136
- diagrams: <drifted:N repaired:N>
128
+ knowledge: <proposed creates:N updates:N>
129
+ tasks: <proposed transitions:N>
130
+ plans: <proposed updates:N>
131
+ docs: <proposed updates:N>
132
+ diagrams: <drifted:N proposed repairs:N>
137
133
 
138
- MUTATIONS:
139
- - <failed or notable mutations only, plus IDs of entries created — counts stay in SYNC_REPORT>
134
+ PROPOSED_MUTATIONS:
135
+ - id: <stable-id>
136
+ rationale: <evidence-backed reason>
137
+ command: <exact ready-to-run command; not executed>
140
138
 
141
139
  KNOWLEDGE: <none | insight: `arcs knowledge template --kind=<kind> --json`; `arcs knowledge upsert <slug> "<title>" --kind=<lesson|gotcha|pattern|architecture|decision> --summary="<s>" --body="<substantive template>" --keywords="<k>" --source-files="<path>" --json` (idempotent by title)>
142
140
 
@@ -145,15 +143,23 @@ SCOPE_CHANGE: <none | topology change needing `arcs diagram sort-metadata`>
145
143
  GAPS: <none | issues needing orchestrator attention>
146
144
  ```
147
145
 
148
- For other operations (knowledge curation, diagram work):
146
+ For SYNC APPLY, return the same envelope with `PROPOSED_MUTATIONS` replaced by:
147
+ ```
148
+ APPLIED_MUTATIONS:
149
+ - <approved proposal id> — <command result id>
150
+ CHECKPOINT: <written after validation | not written>
151
+ UNAPPLIED: <none | proposal ids and reason>
152
+ ```
153
+
154
+ Outside approved SYNC APPLY, knowledge curation and diagram work are also read-only proposal tasks:
149
155
  ```
150
156
  STATUS: <done | partial | blocked>
151
- FILES_TOUCHED: <paths written directly — or none>
152
- VERIFY: <validation command run> → pass|fail
157
+ FILES_TOUCHED: none
158
+ VERIFY: <read-only validation command run> → pass|fail
153
159
  BLOCKED_BY: <only when blocked/partial — evidence>
154
160
 
155
- MUTATIONS:
156
- - <failed or notable mutations only, plus IDs created>
161
+ PROPOSED_MUTATIONS:
162
+ - <exact ready-to-run command for orchestrator approval; not executed>
157
163
 
158
164
  FINDINGS: <none | issues discovered during work>
159
165
  ```