@tacuchi/agent-workflow-cli 25.8.0 → 26.0.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 (558) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/README.md +6 -3
  3. package/dist/adapters/git-cli.js +225 -17
  4. package/dist/adapters/git-cli.js.map +1 -1
  5. package/dist/adapters/node-file-system.js +48 -0
  6. package/dist/adapters/node-file-system.js.map +1 -1
  7. package/dist/application/amend-service.js +51 -14
  8. package/dist/application/amend-service.js.map +1 -1
  9. package/dist/application/branch-resolver.js +6 -3
  10. package/dist/application/branch-resolver.js.map +1 -1
  11. package/dist/application/capability/design-handler.js +218 -43
  12. package/dist/application/capability/design-handler.js.map +1 -1
  13. package/dist/application/capability/dispatcher.js +182 -19
  14. package/dist/application/capability/dispatcher.js.map +1 -1
  15. package/dist/application/capability/durable-effect.js +3 -0
  16. package/dist/application/capability/durable-effect.js.map +1 -1
  17. package/dist/application/capability/readiness.js +8 -54
  18. package/dist/application/capability/readiness.js.map +1 -1
  19. package/dist/application/capability/resolution.js +124 -192
  20. package/dist/application/capability/resolution.js.map +1 -1
  21. package/dist/application/check-branch-service.js +158 -19
  22. package/dist/application/check-branch-service.js.map +1 -1
  23. package/dist/application/checkpoint/markdown.js +2 -2
  24. package/dist/application/checkpoint/markdown.js.map +1 -1
  25. package/dist/application/checkpoint/state-reader.js +12 -0
  26. package/dist/application/checkpoint/state-reader.js.map +1 -1
  27. package/dist/application/checkpoint-service.js +12 -4
  28. package/dist/application/checkpoint-service.js.map +1 -1
  29. package/dist/application/checkpoint-write-service.js +91 -17
  30. package/dist/application/checkpoint-write-service.js.map +1 -1
  31. package/dist/application/claims-ledger.js +137 -11
  32. package/dist/application/claims-ledger.js.map +1 -1
  33. package/dist/application/claims-recovery.js +85 -44
  34. package/dist/application/claims-recovery.js.map +1 -1
  35. package/dist/application/database-tool-catalog.js +33 -0
  36. package/dist/application/database-tool-catalog.js.map +1 -1
  37. package/dist/application/design/consumer-document.js +2 -2
  38. package/dist/application/design/consumer-document.js.map +1 -1
  39. package/dist/application/design/design-content-gate-service.js +20 -2
  40. package/dist/application/design/design-content-gate-service.js.map +1 -1
  41. package/dist/application/design/design-gate-service.js +2 -0
  42. package/dist/application/design/design-gate-service.js.map +1 -1
  43. package/dist/application/design/design-index-service.js +4 -0
  44. package/dist/application/design/design-index-service.js.map +1 -1
  45. package/dist/application/design/design-publish-service.js +1 -4
  46. package/dist/application/design/design-publish-service.js.map +1 -1
  47. package/dist/application/design/design-record-service.js +13 -7
  48. package/dist/application/design/design-record-service.js.map +1 -1
  49. package/dist/application/design/design-resolver-service.js +22 -3
  50. package/dist/application/design/design-resolver-service.js.map +1 -1
  51. package/dist/application/design/design-simple-service.js +24 -5
  52. package/dist/application/design/design-simple-service.js.map +1 -1
  53. package/dist/application/design/digest.js +41 -0
  54. package/dist/application/design/digest.js.map +1 -0
  55. package/dist/application/dev-only-services.js +166 -20
  56. package/dist/application/dev-only-services.js.map +1 -1
  57. package/dist/application/doc-branch-ledger.js +145 -0
  58. package/dist/application/doc-branch-ledger.js.map +1 -0
  59. package/dist/application/docs-canon-service.js +1 -1
  60. package/dist/application/docs-canon-service.js.map +1 -1
  61. package/dist/application/doctor/dist-integrity.js +113 -0
  62. package/dist/application/doctor/dist-integrity.js.map +1 -0
  63. package/dist/application/doctor/hosts.js +5 -2
  64. package/dist/application/doctor/hosts.js.map +1 -1
  65. package/dist/application/doctor/prepare.js +3 -3
  66. package/dist/application/doctor/prepare.js.map +1 -1
  67. package/dist/application/doctor/provider-installation.js +39 -19
  68. package/dist/application/doctor/provider-installation.js.map +1 -1
  69. package/dist/application/doctor/provider-mcps.js +9 -1
  70. package/dist/application/doctor/provider-mcps.js.map +1 -1
  71. package/dist/application/doctor/provider-skills.js +29 -115
  72. package/dist/application/doctor/provider-skills.js.map +1 -1
  73. package/dist/application/doctor/provider-visibility.js +76 -3
  74. package/dist/application/doctor/provider-visibility.js.map +1 -1
  75. package/dist/application/doctor/provider-workspace-block.js +156 -0
  76. package/dist/application/doctor/provider-workspace-block.js.map +1 -0
  77. package/dist/application/doctor/repair-runner.js +36 -39
  78. package/dist/application/doctor/repair-runner.js.map +1 -1
  79. package/dist/application/doctor/report.js +24 -4
  80. package/dist/application/doctor/report.js.map +1 -1
  81. package/dist/application/export-catalog-check.js +200 -0
  82. package/dist/application/export-catalog-check.js.map +1 -0
  83. package/dist/application/export-service.js +716 -79
  84. package/dist/application/export-service.js.map +1 -1
  85. package/dist/application/fix-git-service.js +285 -64
  86. package/dist/application/fix-git-service.js.map +1 -1
  87. package/dist/application/flow/advance.js +202 -25
  88. package/dist/application/flow/advance.js.map +1 -1
  89. package/dist/application/flow/annul-service.js +3 -1
  90. package/dist/application/flow/annul-service.js.map +1 -1
  91. package/dist/application/flow/batch-commit.js +189 -0
  92. package/dist/application/flow/batch-commit.js.map +1 -0
  93. package/dist/application/flow/checkout-observation.js +63 -10
  94. package/dist/application/flow/checkout-observation.js.map +1 -1
  95. package/dist/application/flow/close-artifacts.js +105 -0
  96. package/dist/application/flow/close-artifacts.js.map +1 -0
  97. package/dist/application/flow/close-at-boundary.js +25 -14
  98. package/dist/application/flow/close-at-boundary.js.map +1 -1
  99. package/dist/application/flow/close-document-guidance.js +70 -0
  100. package/dist/application/flow/close-document-guidance.js.map +1 -0
  101. package/dist/application/flow/flow-service.js +46 -3
  102. package/dist/application/flow/flow-service.js.map +1 -1
  103. package/dist/application/flow/internal-actions.js +300 -82
  104. package/dist/application/flow/internal-actions.js.map +1 -1
  105. package/dist/application/flow/internal-drive.js +24 -1
  106. package/dist/application/flow/internal-drive.js.map +1 -1
  107. package/dist/application/flow/plan-entry.js +82 -0
  108. package/dist/application/flow/plan-entry.js.map +1 -0
  109. package/dist/application/flow/prove.js +32 -1
  110. package/dist/application/flow/prove.js.map +1 -1
  111. package/dist/application/flow/quick-checkouts.js +48 -0
  112. package/dist/application/flow/quick-checkouts.js.map +1 -0
  113. package/dist/application/flow/reinfer-batch.js +177 -0
  114. package/dist/application/flow/reinfer-batch.js.map +1 -0
  115. package/dist/application/flow/reopen-run.js +12 -5
  116. package/dist/application/flow/reopen-run.js.map +1 -1
  117. package/dist/application/flow/run-state-service.js +2 -0
  118. package/dist/application/flow/run-state-service.js.map +1 -1
  119. package/dist/application/flow/submit.js +584 -117
  120. package/dist/application/flow/submit.js.map +1 -1
  121. package/dist/application/generate-launch-service.js +16 -6
  122. package/dist/application/generate-launch-service.js.map +1 -1
  123. package/dist/application/git-flow-service.js +34 -3
  124. package/dist/application/git-flow-service.js.map +1 -1
  125. package/dist/application/history-publications.js +24 -0
  126. package/dist/application/history-publications.js.map +1 -1
  127. package/dist/application/history-reconcile-service.js +45 -0
  128. package/dist/application/history-reconcile-service.js.map +1 -0
  129. package/dist/application/history-table.js +61 -12
  130. package/dist/application/history-table.js.map +1 -1
  131. package/dist/application/history-update-service.js +25 -4
  132. package/dist/application/history-update-service.js.map +1 -1
  133. package/dist/application/hook-branch-check.js +25 -3
  134. package/dist/application/hook-branch-check.js.map +1 -1
  135. package/dist/application/hook-git-commit-advisor.js +3 -4
  136. package/dist/application/hook-git-commit-advisor.js.map +1 -1
  137. package/dist/application/hook-turn-start.js +51 -0
  138. package/dist/application/hook-turn-start.js.map +1 -0
  139. package/dist/application/host-memory/codex.js +1 -1
  140. package/dist/application/host-memory/codex.js.map +1 -1
  141. package/dist/application/hub-registry.js +135 -0
  142. package/dist/application/hub-registry.js.map +1 -0
  143. package/dist/application/local-proposal.js +72 -19
  144. package/dist/application/local-proposal.js.map +1 -1
  145. package/dist/application/mcp-host-reader.js +1 -1
  146. package/dist/application/mcp-host-reader.js.map +1 -1
  147. package/dist/application/mcp-host-writer.js +16 -10
  148. package/dist/application/mcp-host-writer.js.map +1 -1
  149. package/dist/application/merge-state-service.js +150 -34
  150. package/dist/application/merge-state-service.js.map +1 -1
  151. package/dist/application/multiroot/claude.js +17 -10
  152. package/dist/application/multiroot/claude.js.map +1 -1
  153. package/dist/application/multiroot/codex.js +17 -11
  154. package/dist/application/multiroot/codex.js.map +1 -1
  155. package/dist/application/multiroot-service.js +52 -28
  156. package/dist/application/multiroot-service.js.map +1 -1
  157. package/dist/application/parsers/execution-batches.js +64 -0
  158. package/dist/application/parsers/execution-batches.js.map +1 -0
  159. package/dist/application/parsers/phases.js +23 -2
  160. package/dist/application/parsers/phases.js.map +1 -1
  161. package/dist/application/parsers/project-block.js +146 -17
  162. package/dist/application/parsers/project-block.js.map +1 -1
  163. package/dist/application/parsers/tasks.js +16 -2
  164. package/dist/application/parsers/tasks.js.map +1 -1
  165. package/dist/application/parsers/toml.js +19 -0
  166. package/dist/application/parsers/toml.js.map +1 -0
  167. package/dist/application/paths-service.js +13 -16
  168. package/dist/application/paths-service.js.map +1 -1
  169. package/dist/application/persist-service.js +118 -5
  170. package/dist/application/persist-service.js.map +1 -1
  171. package/dist/application/plan-exec-batch-service.js +162 -22
  172. package/dist/application/plan-exec-batch-service.js.map +1 -1
  173. package/dist/application/plan-exec-decision-service.js +61 -12
  174. package/dist/application/plan-exec-decision-service.js.map +1 -1
  175. package/dist/application/plan-exec-plan-diff.js +105 -0
  176. package/dist/application/plan-exec-plan-diff.js.map +1 -0
  177. package/dist/application/plan-lint-service.js +33 -5
  178. package/dist/application/plan-lint-service.js.map +1 -1
  179. package/dist/application/plan-passes.js +41 -0
  180. package/dist/application/plan-passes.js.map +1 -0
  181. package/dist/application/preparation-receipts.js +58 -0
  182. package/dist/application/preparation-receipts.js.map +1 -0
  183. package/dist/application/project-md-upsert-service.js +191 -52
  184. package/dist/application/project-md-upsert-service.js.map +1 -1
  185. package/dist/application/project-tab-data.js +40 -10
  186. package/dist/application/project-tab-data.js.map +1 -1
  187. package/dist/application/release-data/artifacts.js +15 -7
  188. package/dist/application/release-data/artifacts.js.map +1 -1
  189. package/dist/application/release-data/bundles.js +52 -6
  190. package/dist/application/release-data/bundles.js.map +1 -1
  191. package/dist/application/release-data/common.js +2 -2
  192. package/dist/application/release-data/common.js.map +1 -1
  193. package/dist/application/release-data/rollback.js +7 -0
  194. package/dist/application/release-data/rollback.js.map +1 -0
  195. package/dist/application/release-data/sessions.js +2 -2
  196. package/dist/application/release-data/sessions.js.map +1 -1
  197. package/dist/application/release-pass-ledger.js +1 -1
  198. package/dist/application/render/history-row.js +2 -0
  199. package/dist/application/render/history-row.js.map +1 -1
  200. package/dist/application/render/project-block.js +28 -11
  201. package/dist/application/render/project-block.js.map +1 -1
  202. package/dist/application/reseal-service.js +1 -0
  203. package/dist/application/reseal-service.js.map +1 -1
  204. package/dist/application/resume-service.js +55 -8
  205. package/dist/application/resume-service.js.map +1 -1
  206. package/dist/application/retirement/apply.js +25 -7
  207. package/dist/application/retirement/apply.js.map +1 -1
  208. package/dist/application/retirement/attribution.js +122 -50
  209. package/dist/application/retirement/attribution.js.map +1 -1
  210. package/dist/application/retirement/prepare.js +17 -11
  211. package/dist/application/retirement/prepare.js.map +1 -1
  212. package/dist/application/retirement/preview.js +2 -1
  213. package/dist/application/retirement/preview.js.map +1 -1
  214. package/dist/application/self/clean-legacy.js +1 -2
  215. package/dist/application/self/clean-legacy.js.map +1 -1
  216. package/dist/application/self/codex-plugin.js +1 -1
  217. package/dist/application/self/codex-plugin.js.map +1 -1
  218. package/dist/application/self/host-states.js +3 -3
  219. package/dist/application/self/host-states.js.map +1 -1
  220. package/dist/application/self/install-hooks.js +1 -1
  221. package/dist/application/self/install-hooks.js.map +1 -1
  222. package/dist/application/self/install-skill.js +5 -49
  223. package/dist/application/self/install-skill.js.map +1 -1
  224. package/dist/application/self/mcp-config.js +19 -11
  225. package/dist/application/self/mcp-config.js.map +1 -1
  226. package/dist/application/self/opencode-plugin.js +1 -0
  227. package/dist/application/self/opencode-plugin.js.map +1 -1
  228. package/dist/application/self/skill-files.js +29 -0
  229. package/dist/application/self/skill-files.js.map +1 -0
  230. package/dist/application/self/uninstall.js +1 -1
  231. package/dist/application/self/uninstall.js.map +1 -1
  232. package/dist/application/semantic-operation/protocol.js +66 -5
  233. package/dist/application/semantic-operation/protocol.js.map +1 -1
  234. package/dist/application/session-archive-service.js +113 -0
  235. package/dist/application/session-archive-service.js.map +1 -0
  236. package/dist/application/session-binding-service.js +35 -0
  237. package/dist/application/session-binding-service.js.map +1 -1
  238. package/dist/application/session-close-service.js +390 -54
  239. package/dist/application/session-close-service.js.map +1 -1
  240. package/dist/application/session-create-service.js +97 -5
  241. package/dist/application/session-create-service.js.map +1 -1
  242. package/dist/application/session-custody-recorder.js +15 -12
  243. package/dist/application/session-custody-recorder.js.map +1 -1
  244. package/dist/application/session-custody-service.js +1 -0
  245. package/dist/application/session-custody-service.js.map +1 -1
  246. package/dist/application/session-narrative.js +42 -12
  247. package/dist/application/session-narrative.js.map +1 -1
  248. package/dist/application/session-pause-service.js +46 -0
  249. package/dist/application/session-pause-service.js.map +1 -0
  250. package/dist/application/session-resolver.js +36 -11
  251. package/dist/application/session-resolver.js.map +1 -1
  252. package/dist/application/session-resume-service.js +134 -13
  253. package/dist/application/session-resume-service.js.map +1 -1
  254. package/dist/application/sessions-service.js +4 -0
  255. package/dist/application/sessions-service.js.map +1 -1
  256. package/dist/application/sessions-sweep-service.js +77 -0
  257. package/dist/application/sessions-sweep-service.js.map +1 -0
  258. package/dist/application/settle-service.js +3 -1
  259. package/dist/application/settle-service.js.map +1 -1
  260. package/dist/application/skills-resolver-service.js +6 -92
  261. package/dist/application/skills-resolver-service.js.map +1 -1
  262. package/dist/application/source-add-service.js +37 -0
  263. package/dist/application/source-add-service.js.map +1 -0
  264. package/dist/application/source-boundary-policy.js +105 -8
  265. package/dist/application/source-boundary-policy.js.map +1 -1
  266. package/dist/application/source-pipeline.js +68 -0
  267. package/dist/application/source-pipeline.js.map +1 -0
  268. package/dist/application/source-remove-service.js +15 -3
  269. package/dist/application/source-remove-service.js.map +1 -1
  270. package/dist/application/sources-service.js +71 -16
  271. package/dist/application/sources-service.js.map +1 -1
  272. package/dist/application/status-service.js +55 -5
  273. package/dist/application/status-service.js.map +1 -1
  274. package/dist/application/unit-dependencies.js +100 -0
  275. package/dist/application/unit-dependencies.js.map +1 -0
  276. package/dist/application/unit-membership.js +37 -0
  277. package/dist/application/unit-membership.js.map +1 -0
  278. package/dist/application/unit-residue.js +72 -0
  279. package/dist/application/unit-residue.js.map +1 -0
  280. package/dist/application/visibility-doctor-service.js +66 -4
  281. package/dist/application/visibility-doctor-service.js.map +1 -1
  282. package/dist/application/working-branch-service.js +6 -0
  283. package/dist/application/working-branch-service.js.map +1 -1
  284. package/dist/application/workline-graph.js +1 -1
  285. package/dist/application/workline-graph.js.map +1 -1
  286. package/dist/application/workline-index-service.js +118 -17
  287. package/dist/application/workline-index-service.js.map +1 -1
  288. package/dist/application/workspace-commit-service.js +218 -0
  289. package/dist/application/workspace-commit-service.js.map +1 -0
  290. package/dist/application/workspace-init-service.js +64 -34
  291. package/dist/application/workspace-init-service.js.map +1 -1
  292. package/dist/application/workspace-local-config.js +90 -0
  293. package/dist/application/workspace-local-config.js.map +1 -0
  294. package/dist/application/workspace-materialization-service.js +52 -3
  295. package/dist/application/workspace-materialization-service.js.map +1 -1
  296. package/dist/application/workspace-migrate/apply.js +525 -4
  297. package/dist/application/workspace-migrate/apply.js.map +1 -1
  298. package/dist/application/workspace-migrate/markers.js +9 -6
  299. package/dist/application/workspace-migrate/markers.js.map +1 -1
  300. package/dist/application/workspace-migrate/plan.js +97 -5
  301. package/dist/application/workspace-migrate/plan.js.map +1 -1
  302. package/dist/application/workspace-move-service.js +270 -0
  303. package/dist/application/workspace-move-service.js.map +1 -0
  304. package/dist/application/workspace-untrack-service.js +28 -0
  305. package/dist/application/workspace-untrack-service.js.map +1 -0
  306. package/dist/application/worktree-service.js +654 -105
  307. package/dist/application/worktree-service.js.map +1 -1
  308. package/dist/cli/ascii.js +2 -0
  309. package/dist/cli/ascii.js.map +1 -1
  310. package/dist/cli/commands/add-source.js +38 -0
  311. package/dist/cli/commands/add-source.js.map +1 -0
  312. package/dist/cli/commands/amend.js +14 -3
  313. package/dist/cli/commands/amend.js.map +1 -1
  314. package/dist/cli/commands/capability.js +23 -4
  315. package/dist/cli/commands/capability.js.map +1 -1
  316. package/dist/cli/commands/designs.js +14 -5
  317. package/dist/cli/commands/designs.js.map +1 -1
  318. package/dist/cli/commands/dev-only.js +19 -6
  319. package/dist/cli/commands/dev-only.js.map +1 -1
  320. package/dist/cli/commands/doc-branch.js +184 -0
  321. package/dist/cli/commands/doc-branch.js.map +1 -0
  322. package/dist/cli/commands/doctor.js +5 -1
  323. package/dist/cli/commands/doctor.js.map +1 -1
  324. package/dist/cli/commands/export.js +78 -18
  325. package/dist/cli/commands/export.js.map +1 -1
  326. package/dist/cli/commands/fix-git.js +89 -14
  327. package/dist/cli/commands/fix-git.js.map +1 -1
  328. package/dist/cli/commands/flow.js +120 -15
  329. package/dist/cli/commands/flow.js.map +1 -1
  330. package/dist/cli/commands/generate-launch.js +14 -2
  331. package/dist/cli/commands/generate-launch.js.map +1 -1
  332. package/dist/cli/commands/history-update.js +1 -1
  333. package/dist/cli/commands/history-update.js.map +1 -1
  334. package/dist/cli/commands/history.js +14 -0
  335. package/dist/cli/commands/history.js.map +1 -0
  336. package/dist/cli/commands/hook.js +15 -2
  337. package/dist/cli/commands/hook.js.map +1 -1
  338. package/dist/cli/commands/index.js +18 -5
  339. package/dist/cli/commands/index.js.map +1 -1
  340. package/dist/cli/commands/merge-state.js +2 -2
  341. package/dist/cli/commands/merge-state.js.map +1 -1
  342. package/dist/cli/commands/persist.js +6 -5
  343. package/dist/cli/commands/persist.js.map +1 -1
  344. package/dist/cli/commands/project-md-upsert.js +5 -3
  345. package/dist/cli/commands/project-md-upsert.js.map +1 -1
  346. package/dist/cli/commands/release-pass.js +3 -3
  347. package/dist/cli/commands/release-pass.js.map +1 -1
  348. package/dist/cli/commands/resume.js +12 -3
  349. package/dist/cli/commands/resume.js.map +1 -1
  350. package/dist/cli/commands/self.js +8 -24
  351. package/dist/cli/commands/self.js.map +1 -1
  352. package/dist/cli/commands/session-close.js +64 -9
  353. package/dist/cli/commands/session-close.js.map +1 -1
  354. package/dist/cli/commands/session-create.js +4 -2
  355. package/dist/cli/commands/session-create.js.map +1 -1
  356. package/dist/cli/commands/session-pause.js +14 -0
  357. package/dist/cli/commands/session-pause.js.map +1 -0
  358. package/dist/cli/commands/sessions.js +16 -3
  359. package/dist/cli/commands/sessions.js.map +1 -1
  360. package/dist/cli/commands/set-branch.js +28 -4
  361. package/dist/cli/commands/set-branch.js.map +1 -1
  362. package/dist/cli/commands/set-edit-mode.js +20 -0
  363. package/dist/cli/commands/set-edit-mode.js.map +1 -0
  364. package/dist/cli/commands/set-pipeline.js +35 -0
  365. package/dist/cli/commands/set-pipeline.js.map +1 -0
  366. package/dist/cli/commands/skills.js +4 -11
  367. package/dist/cli/commands/skills.js.map +1 -1
  368. package/dist/cli/commands/sources.js +4 -0
  369. package/dist/cli/commands/sources.js.map +1 -1
  370. package/dist/cli/commands/status.js +35 -2
  371. package/dist/cli/commands/status.js.map +1 -1
  372. package/dist/cli/commands/unknown-flags.js +1 -0
  373. package/dist/cli/commands/unknown-flags.js.map +1 -1
  374. package/dist/cli/commands/visibility.js +1 -0
  375. package/dist/cli/commands/visibility.js.map +1 -1
  376. package/dist/cli/commands/workspace-commit.js +62 -0
  377. package/dist/cli/commands/workspace-commit.js.map +1 -0
  378. package/dist/cli/commands/workspace-init.js +39 -2
  379. package/dist/cli/commands/workspace-init.js.map +1 -1
  380. package/dist/cli/commands/workspace-migrate.js +31 -3
  381. package/dist/cli/commands/workspace-migrate.js.map +1 -1
  382. package/dist/cli/commands/workspace-move.js +42 -0
  383. package/dist/cli/commands/workspace-move.js.map +1 -0
  384. package/dist/cli/commands/worktree.js +4 -4
  385. package/dist/cli/commands/worktree.js.map +1 -1
  386. package/dist/cli/context-id.js +6 -0
  387. package/dist/cli/context-id.js.map +1 -1
  388. package/dist/cli/full-cli.js +555 -0
  389. package/dist/cli/full-cli.js.map +1 -0
  390. package/dist/cli/help-groups.js +76 -19
  391. package/dist/cli/help-groups.js.map +1 -1
  392. package/dist/cli/hook-stdin-cache.js +12 -0
  393. package/dist/cli/hook-stdin-cache.js.map +1 -0
  394. package/dist/cli/main.js +47 -453
  395. package/dist/cli/main.js.map +1 -1
  396. package/dist/cli/parser.js +4 -0
  397. package/dist/cli/parser.js.map +1 -1
  398. package/dist/cli/tui/app.js +3 -4
  399. package/dist/cli/tui/app.js.map +1 -1
  400. package/dist/cli/tui/components/host-admin-section.js +2 -13
  401. package/dist/cli/tui/components/host-admin-section.js.map +1 -1
  402. package/dist/cli/tui/components/tabs-config.js +1 -2
  403. package/dist/cli/tui/components/tabs-config.js.map +1 -1
  404. package/dist/cli/tui/components/workspace-init-form.js +4 -1
  405. package/dist/cli/tui/components/workspace-init-form.js.map +1 -1
  406. package/dist/cli/tui/data/workflow-content.js +6 -1
  407. package/dist/cli/tui/data/workflow-content.js.map +1 -1
  408. package/dist/cli/tui/tabs/mcp-tab.js +4 -3
  409. package/dist/cli/tui/tabs/mcp-tab.js.map +1 -1
  410. package/dist/cli/tui/tabs/project-tab.js +7 -2
  411. package/dist/cli/tui/tabs/project-tab.js.map +1 -1
  412. package/dist/cli/tui/tui-prefs.js +2 -0
  413. package/dist/cli/tui/tui-prefs.js.map +1 -1
  414. package/dist/dist-manifest.json +3973 -0
  415. package/dist/domain/capability/protocol.js +3 -1
  416. package/dist/domain/capability/protocol.js.map +1 -1
  417. package/dist/domain/decision-note.js +13 -0
  418. package/dist/domain/decision-note.js.map +1 -1
  419. package/dist/domain/design/artifact.js +22 -3
  420. package/dist/domain/design/artifact.js.map +1 -1
  421. package/dist/domain/design/capability.js +1 -0
  422. package/dist/domain/design/capability.js.map +1 -1
  423. package/dist/domain/design/expansion.js +1 -1
  424. package/dist/domain/design/expansion.js.map +1 -1
  425. package/dist/domain/design/maturity.js +16 -0
  426. package/dist/domain/design/maturity.js.map +1 -1
  427. package/dist/domain/design/reference.js +5 -0
  428. package/dist/domain/design/reference.js.map +1 -1
  429. package/dist/domain/doctor/operations.js +20 -12
  430. package/dist/domain/doctor/operations.js.map +1 -1
  431. package/dist/domain/effective-contract.js +3 -1
  432. package/dist/domain/effective-contract.js.map +1 -1
  433. package/dist/domain/elicitation.js +1 -1
  434. package/dist/domain/flow/answer.js +265 -130
  435. package/dist/domain/flow/answer.js.map +1 -1
  436. package/dist/domain/flow/authority.js +194 -37
  437. package/dist/domain/flow/authority.js.map +1 -1
  438. package/dist/domain/flow/batch-review.js +65 -0
  439. package/dist/domain/flow/batch-review.js.map +1 -0
  440. package/dist/domain/flow/decision-schema.js +47 -0
  441. package/dist/domain/flow/decision-schema.js.map +1 -0
  442. package/dist/domain/flow/directive.js +16 -0
  443. package/dist/domain/flow/directive.js.map +1 -1
  444. package/dist/domain/flow/execution-result.js +91 -2
  445. package/dist/domain/flow/execution-result.js.map +1 -1
  446. package/dist/domain/flow/run-state.js +352 -24
  447. package/dist/domain/flow/run-state.js.map +1 -1
  448. package/dist/domain/flow/test-run-evidence.js +285 -0
  449. package/dist/domain/flow/test-run-evidence.js.map +1 -0
  450. package/dist/domain/flow/unchanged-phase.js +15 -0
  451. package/dist/domain/flow/unchanged-phase.js.map +1 -0
  452. package/dist/domain/harnesses.js +14 -5
  453. package/dist/domain/harnesses.js.map +1 -1
  454. package/dist/domain/isolation-unit.js +2 -2
  455. package/dist/domain/isolation-unit.js.map +1 -1
  456. package/dist/domain/lineage.js +7 -2
  457. package/dist/domain/lineage.js.map +1 -1
  458. package/dist/domain/obligation-correspondence.js +4 -2
  459. package/dist/domain/obligation-correspondence.js.map +1 -1
  460. package/dist/domain/plan-handoff.js +5 -0
  461. package/dist/domain/plan-handoff.js.map +1 -0
  462. package/dist/domain/proposal.js +18 -7
  463. package/dist/domain/proposal.js.map +1 -1
  464. package/dist/domain/reservation.js +5 -3
  465. package/dist/domain/reservation.js.map +1 -1
  466. package/dist/domain/retirement/proposal.js +1 -0
  467. package/dist/domain/retirement/proposal.js.map +1 -1
  468. package/dist/domain/session/custody.js +10 -6
  469. package/dist/domain/session/custody.js.map +1 -1
  470. package/dist/domain/session/narrative.js +4 -1
  471. package/dist/domain/session/narrative.js.map +1 -1
  472. package/dist/domain/skills.js +4 -6
  473. package/dist/domain/skills.js.map +1 -1
  474. package/dist/domain/sql-lexer.js +1 -1
  475. package/dist/domain/sql-lexer.js.map +1 -1
  476. package/dist/runtime/namespace-resolver.js +4 -0
  477. package/dist/runtime/namespace-resolver.js.map +1 -1
  478. package/dist/runtime/workline-marker.js +35 -8
  479. package/dist/runtime/workline-marker.js.map +1 -1
  480. package/dist/runtime/workspace-resolution.js +123 -0
  481. package/dist/runtime/workspace-resolution.js.map +1 -0
  482. package/package.json +6 -5
  483. package/skills/w/SKILL.md +12 -17
  484. package/skills/w/artifacts/artifacts-core/CHECKPOINT.md +1 -1
  485. package/skills/w/artifacts/artifacts-core/SCRIPTS.rollback.sql +8 -0
  486. package/skills/w/artifacts/artifacts-core/SCRIPTS.sql +4 -8
  487. package/skills/w/commands/export-diagrams.md +3 -3
  488. package/skills/w/commands/export-manuals.md +6 -6
  489. package/skills/w/commands/export-reports.md +3 -3
  490. package/skills/w/commands/export-scripts.md +5 -5
  491. package/skills/w/commands/fix-git.md +12 -13
  492. package/skills/w/commands/persist.md +2 -2
  493. package/skills/w/commands/plan-exec.md +4 -2
  494. package/skills/w/commands/spec-new.md +1 -1
  495. package/skills/w/commands/workspace-init.md +2 -0
  496. package/skills/w/context/MANIFEST.json +1 -1
  497. package/skills/w/exports/README.md +4 -4
  498. package/skills/w/exports/export-diagrams/EXPORT.md +4 -4
  499. package/skills/w/exports/export-manuals/EXPORT.md +14 -16
  500. package/skills/w/exports/export-reports/EXPORT.md +3 -3
  501. package/skills/w/exports/export-scripts/EXPORT.md +46 -22
  502. package/skills/w/harness/HARNESS.md +4 -7
  503. package/skills/w/hooks/hooks.template.json +6 -4
  504. package/skills/w/loops/CHASSIS.md +12 -6
  505. package/skills/w/loops/CODE-POLICIES.md +8 -5
  506. package/skills/w/loops/README.md +2 -2
  507. package/skills/w/loops/plan-exec-loop/LOOP.md +23 -22
  508. package/skills/w/loops/plan-new-loop/LOOP.md +23 -31
  509. package/skills/w/loops/plan-refine-loop/LOOP.md +8 -2
  510. package/skills/w/loops/quick-loop/LOOP.md +7 -6
  511. package/skills/w/loops/spec-refine-loop/LOOP.md +1 -1
  512. package/skills/w/modules/DESIGN-REFERENCES.md +9 -11
  513. package/skills/w/modules/PLAN-EXECUTION-BATCHES.md +4 -4
  514. package/skills/w/modules/SESSION-NUMBERING.md +2 -0
  515. package/skills/w/roles/README.md +11 -47
  516. package/skills/w/roles/design/CONTRACT.md +6 -4
  517. package/skills/w/roles/design/ROLE.md +7 -3
  518. package/skills/w/roles/diagrams/ROLE.md +1 -1
  519. package/skills/w/roles/git/ROLE.md +17 -10
  520. package/skills/w/roles/research/ROLE.md +2 -2
  521. package/skills/w/roles/sql/ROLE.md +17 -15
  522. package/skills/w/schemas/design/ui-screen.v1.schema.json +9 -0
  523. package/dist/application/capability/descriptor-loader.js +0 -109
  524. package/dist/application/capability/descriptor-loader.js.map +0 -1
  525. package/dist/application/capability/installed-inventory.js +0 -168
  526. package/dist/application/capability/installed-inventory.js.map +0 -1
  527. package/dist/application/self/install-plugin-skills-git.js +0 -226
  528. package/dist/application/self/install-plugin-skills-git.js.map +0 -1
  529. package/dist/application/self/install-plugin-skills.js +0 -203
  530. package/dist/application/self/install-plugin-skills.js.map +0 -1
  531. package/dist/application/self/plugin-cache-clear.js +0 -133
  532. package/dist/application/self/plugin-cache-clear.js.map +0 -1
  533. package/dist/application/self/plugin-cache-reload.js +0 -141
  534. package/dist/application/self/plugin-cache-reload.js.map +0 -1
  535. package/dist/application/self/skills-apply.js +0 -623
  536. package/dist/application/self/skills-apply.js.map +0 -1
  537. package/dist/application/self/skills-catalog.js +0 -35
  538. package/dist/application/self/skills-catalog.js.map +0 -1
  539. package/dist/application/self/skills-change.js +0 -479
  540. package/dist/application/self/skills-change.js.map +0 -1
  541. package/dist/application/self/skills-discovery.js +0 -275
  542. package/dist/application/self/skills-discovery.js.map +0 -1
  543. package/dist/application/self/skills-manager.js +0 -253
  544. package/dist/application/self/skills-manager.js.map +0 -1
  545. package/dist/application/self/skills-payload.js +0 -566
  546. package/dist/application/self/skills-payload.js.map +0 -1
  547. package/dist/application/self/skills-registry.js +0 -107
  548. package/dist/application/self/skills-registry.js.map +0 -1
  549. package/dist/application/skill-index-service.js +0 -78
  550. package/dist/application/skill-index-service.js.map +0 -1
  551. package/dist/cli/commands/plugin-cache.js +0 -25
  552. package/dist/cli/commands/plugin-cache.js.map +0 -1
  553. package/dist/cli/commands/skill-index.js +0 -19
  554. package/dist/cli/commands/skill-index.js.map +0 -1
  555. package/dist/cli/tui/data/recommended-skills.js +0 -482
  556. package/dist/cli/tui/data/recommended-skills.js.map +0 -1
  557. package/dist/cli/tui/tabs/skills-tab.js +0 -664
  558. package/dist/cli/tui/tabs/skills-tab.js.map +0 -1
@@ -1,31 +1,25 @@
1
1
  # roles/ — Capability role catalog
2
2
 
3
- > Built-in default implementations of the **capability roles** that loops and exports compose.
4
- > A role is a slot in the system; a skill is one concrete implementation of that slot.
5
- > Changing implementation = changing one line in `skills.toml`.
3
+ > Only Workline-owned capabilities are binding roles. Other skills are host-native help, never Workline dependencies.
6
4
 
7
5
  ---
8
6
 
9
7
  ## Capability catalog
10
8
 
11
- All 6 roles, their built-in defaults, their tier, and which loops/exports compose them:
9
+ The owned roles and their built-in defaults:
12
10
 
13
11
  | Role | Default built-in | Tier | Composed by |
14
12
  |---|---|---|---|
15
13
  | `design` | [`design`](design/ROLE.md) | must | `spec-refine-loop` (when requirement involves UI) · `plan-new-loop` / `plan-refine-loop` · `plan-exec-loop` (reads, never redesigns) |
16
- | `sql` | `sql` | must | inline research · `plan-exec-loop` · `quick-loop` · `export-scripts` |
17
- | `git` | `git` | must | `plan-exec-loop` · `quick-loop` |
18
- | `research` | [`research`](research/ROLE.md) | should | all loops (on-demand investigation) |
19
- | `diagrams` | [`diagrams`](diagrams/ROLE.md) | should | `export-diagrams` |
20
14
  | `overview` | `w` | should | any loop (orientation about Workline itself) |
21
15
 
22
16
  **Tiers:**
23
17
  - `must` — core to almost every session; built-in always active unless explicitly `off`.
24
18
  - `should` — loaded on-demand; active by default but lower priority to override.
25
19
 
26
- > **Ambient conventions (not roles).** Code, testing and writing standards **and tool authoring** (`creating-tools`, which writes `docs/tools`) are **not Workline roles** and are never bound: they are **standalone skills the host auto-discovers by `description`** and applies when relevant. Workline is **indifferent** (it neither reads nor looks for them). Useful families live in marketplace plugins (`dev-conventions`, `tool-builder`), but Workline does **not depend** on them.
20
+ > **Ambient help (not roles).** Code, testing, writing, SQL, Git, research, diagrams and tool authoring are available when the host exposes them. Workline does not bind, inventory, install or require them.
27
21
  >
28
- > **An external skill is a technique, never an authorization.** Installing one adds a technique the host may apply when it is relevant; it moves no boundary this system already fixed. Concretely: a skill recommending a validation library does not override the repo's own decision; a reference to subagents is not delegation authority; one that writes documents of its own still lands where the work's custody says; an interview or a checklist it proposes does not become a step of SPEC, PLAN or QUICK; and none of them authorizes a dependency, an agent, an architecture change or an extra validation. **Absence is not a blocker either:** a flow whose optional skill is missing, refused or incompatible runs its base behavior, and says so instead of reporting a check it never ran — a real dependency of the task is named as such. What Workline controls is its **recommendation** and its **managed installation**; a host that discovers instructions by another route is outside that control, so neither a catalog filter nor a `skills.toml` `off` is ever announced as a universal switch.
22
+ > **An external skill is a technique, never an authorization.** Host help cannot override Workline's gates, permissions, destinations or validated receipts. Its absence never blocks core flows; its mere presence never credits an improvement.
29
23
  >
30
24
  > **`ui-design` and `ui-spec` are retired names.** The design slot is [`design`](design/ROLE.md), whose only output is the UI Design Package v1. Neither retired name is a role, a binding, an alias or an implementation: they are **rejected**, because two names for one capability are two contracts in disguise. There is no alias, no dual-read, no importer and no migration — a binding that names one is reported as `retired/unsupported`, and a design that is still needed is recreated over the package.
31
25
  >
@@ -47,13 +41,11 @@ built-in default
47
41
 
48
42
  **Resolution rules:**
49
43
 
50
- 1. **Role with a binding** (workspace, or global if not workspace) → use that skill name.
51
- - If the name exists under `roles/<name>/` → it is a built-in skill.
52
- - If not → it is a third-party skill installed by name on the host (e.g. via skills.sh).
44
+ 1. **Owned role with a binding** → its canonical Workline skill name or `off` applies. Other names are warned as inapplicable, with the file left untouched.
53
45
  2. **Role with no binding at any level** → use the built-in default (table above). No config needed for the common case.
54
46
  3. **`off`** → capability disabled. The loop continues without it; if the task required it, the loop reports why it cannot proceed or asks the human.
55
47
 
56
- **A role whose skill declares a capability descriptor is stricter**, because there the binding decides what RUNS and not just which name is written: unset or the canonical name enables the built-in floor plus whatever compatible improvements the host selected; `off` applies the descriptor's per-operation policy and no host, wrapper or legacy name reverts it; anything else is `misconfigured` — a replacement binding does not select an improvement, and the file is never rewritten for you. Existing workspaces are not migrated: `aw skills --detail` explains the reclassification and the owner adopts unset, the canonical name or `off`.
48
+ **`design`** uses its built-in floor for required operations. A legacy replacement binding does not select a contributor or disable the floor; `off` follows the descriptor's per-operation policy. `[docs]` is independent and remains supported.
57
49
 
58
50
  ---
59
51
 
@@ -63,44 +55,20 @@ built-in default
63
55
  [skills]
64
56
  # Built-in defaults (no entry needed — listed here for reference only)
65
57
  # design = "design"
66
- # sql = "sql"
67
- # git = "git"
68
- # research = "research"
69
- # diagrams = "diagrams"
70
58
  # overview = "w"
71
59
 
72
- # Override examples:
73
- design = "acme/figma-spec" # third-party skill installed via skills.sh
74
- diagrams = "mermaid-only" # custom built installed locally
75
- sql = "off" # disable the sql capability
60
+ # Per-operation policy for an owned capability:
61
+ # design = "off"
76
62
  ```
77
63
 
78
- ### Override: point to a third-party skill
79
-
80
- ```toml
81
- [skills]
82
- design = "acme/figma-spec"
83
- ```
84
-
85
- `acme/figma-spec` must be installed on the host (e.g. via `skills.sh install acme/figma-spec`). The binding is **advisory**: the resolver emits the name as-is — it does **not** verify the skill is installed and does **not** auto-fall-back to the built-in default. A typo'd name silently leaves the role bound to a skill that does not exist. Verify the resolution with `aw skills`, which warns when a bound skill is not found in the standard skill roots.
86
-
87
64
  ### Override: disable a capability
88
65
 
89
66
  ```toml
90
67
  [skills]
91
- sql = "off"
92
- ```
93
-
94
- The loop that composes `sql` will skip it. If the task required the capability and the role is `off`, the loop should inform the human and ask how to proceed.
95
-
96
- ### Override: use a different built-in
97
-
98
- ```toml
99
- [skills]
100
- diagrams = "diagrams-lite" # if a "diagrams-lite" built-in were registered
68
+ design = "off"
101
69
  ```
102
70
 
103
- Only meaningful if multiple built-ins for the same role are registered. Currently each role has exactly one built-in default.
71
+ The `design` descriptor decides operation by operation: validation retains its own floor while authoring operations are disabled.
104
72
 
105
73
  ---
106
74
 
@@ -118,10 +86,6 @@ Example output:
118
86
  Role Resolved skill Source
119
87
  ----------------- ----------------------- -----------
120
88
  design design built-in
121
- sql sql built-in
122
- git git built-in
123
- research research built-in
124
- diagrams mermaid-only global (~/.workflow/skills.toml)
125
89
  overview w built-in
126
90
  ```
127
91
 
@@ -149,4 +113,4 @@ Each `ROLE.md` follows this schema:
149
113
  | `## Output` | what it produces and where (if any) |
150
114
  | `## Source` | recycled from (if applicable) |
151
115
 
152
- See [`research/ROLE.md`](research/ROLE.md) as a reference implementation.
116
+ See [`design/ROLE.md`](design/ROLE.md) as a reference implementation.
@@ -68,7 +68,7 @@ closed to five — one is enough:
68
68
  | `design.independent-outcomes` | two or more results each worth delivering | agent |
69
69
  | `design.functional-blocking` | an unclosed functional decision blocks the design | agent |
70
70
  | `design.clarity-lost` | one document would stop being readable | agent |
71
- | `design.governance-or-system-reuse` | the package already carries governance or several revisions | **CLI derives** |
71
+ | `design.governance-or-system-reuse` | a **package** already carries governance or several revisions | **CLI derives** |
72
72
  | `design.special-source-or-effect` | a sensitive source, an external transmission, or a declared source that did not contribute | **CLI derives** |
73
73
 
74
74
  Recognizing a semantic signal is judgment and travels as `--input expansion=<id>`;
@@ -77,9 +77,11 @@ refused rather than believed. The receipt carries the mode, the signals that fir
77
77
  and the one-line cause — every artifact beyond the simple document traces back to
78
78
  the need it covers. `render` and `record` are package operations regardless.
79
79
 
80
- Publishing a second simple revision archives the outgoing bytes inside the same
81
- approved proposal, so a reference pinned to `@r1` keeps resolving after `@r2`
82
- lands: a published revision is never taken away by the next one.
80
+ Publishing each successive simple revision (including the third and later ones)
81
+ archives the outgoing bytes inside the same approved proposal. The manifest stays
82
+ `simple`, and a reference pinned to an older revision keeps resolving. An update
83
+ that requires package-only behavior names its expansion signal and refuses the
84
+ conversion instead of changing the published mode.
83
85
 
84
86
  ## Evidence and lifecycle inside a package
85
87
 
@@ -25,7 +25,9 @@ replaces) and `ui-spec` (the skill that used to fill it) are **not** aliases,
25
25
  for one capability is a second contract in disguise, and the day the two
26
26
  disagree there is no way to say which one the package obeys.
27
27
 
28
- Rebindable in `.workflow/skills.toml` to a third-party skill or `off`.
28
+ `skills.toml` accepts the canonical name or `off`; legacy external names are
29
+ reported but cannot select a contributor. The host may contribute independently
30
+ in an attempt, subject to Workline's own validation and permissions.
29
31
  Resolution: built-in default → `~/.workflow/skills.toml` (global) →
30
32
  `.workflow/skills.toml` (workspace). See [`../README.md`](../README.md).
31
33
 
@@ -106,7 +108,7 @@ sections admit no such claim.
106
108
  | | `flow` (`workline.ui-flow/v1`) | `screen` (`workline.ui-screen/v1`) |
107
109
  |---|---|---|
108
110
  | Answers | how the journey runs | what one surface is |
109
- | Frontmatter core | `actors`, `entry`, `nodes`, `edges` | `default_state`, `states[]`, `flow_refs`, `dependencies` |
111
+ | Frontmatter core | `actors`, `entry`, `nodes`, `edges` | `default_state`, `states[]`, `flow_refs`, optional `screen_refs`, `dependencies` |
110
112
  | Sections | Goal and outcome · Preconditions and entry · Main journey · Alternatives and recovery · Permissions and privacy · Traceability | Purpose and context · Structure and content · Components and design-system deltas · Data, permissions and validation · States and transitions · Interaction and navigation · Responsive and adaptation · Localization · Accessibility · Edge cases and degradation · Traceability |
111
113
  | Essential (no waiver) | Goal and outcome · Main journey · Traceability | Purpose and context · Structure and content · States and transitions · Interaction and navigation · Accessibility · Traceability |
112
114
 
@@ -115,7 +117,9 @@ sections admit no such claim.
115
117
  `DES-001/SCR-001@r2#error` — package / artifact @ revision # state anchor. A
116
118
  reference always pins the revision: **a later revision never invalidates a
117
119
  reference already fixed**. Baselines are cited as `DES-001@r2` plus the digest
118
- that seals them.
120
+ that seals them. A screen may declare `screen_refs: [DES-001/SCR-002@r1]`
121
+ to cite another screen or its state (`DES-001/SCR-002@r1#empty`). It does not
122
+ extend the package closure, just like `flow_refs`.
119
123
 
120
124
  ### Maturity: `outline` → `handoff`
121
125
 
@@ -12,7 +12,7 @@ description: >
12
12
 
13
13
  ## Role
14
14
 
15
- `diagrams` — built-in default implementation. Rebindable to another skill (third-party or `off`) in `.workflow/skills.toml`.
15
+ Diagram authoring can use host-native help without a Workline binding; the export retains its own destination and validation rules.
16
16
 
17
17
  ## Purpose
18
18
 
@@ -14,12 +14,14 @@ description: >-
14
14
 
15
15
  ## Role
16
16
 
17
- `git` — built-in default. Rebindable in `.workflow/skills.toml` (third-party skill or `off`). This skill encodes invariant 5: **safe git**.
17
+ Git-safe execution is a Workline invariant, independent of host skills and bindings.
18
18
 
19
19
  ## Purpose
20
20
 
21
21
  Operate git in a **safe, controlled** way: verify the expected branch before editing, **propose** commits per source, and never run destructive or publishing operations without the user's explicit request.
22
22
 
23
+ Use `aw git-flow` for per-source development/QA/production flows; preview and request approval before an effect. A force-push is always performed by the user.
24
+
23
25
  ## Composed by
24
26
 
25
27
  - **`plan-exec-loop`** — verifies the branch before each edit; proposes commits on close/checkpoint.
@@ -50,19 +52,24 @@ And **always** forbidden, even when the user asks for a commit: `--no-verify` (r
50
52
 
51
53
  ### Branch verification (before editing)
52
54
 
53
- The expected branch is **never assumed from the current branch** — the user may have switched it by hand. Verify against the flow's own line of work before any `Write/Edit`: its isolation unit's branch when the source has units (`aw worktree`), the source's declared work branch when it has none.
55
+ The expected branch is **never assumed from the current branch** — the user may have switched it by hand. Verify before any `Write/Edit`: the session's isolation unit branch when it owns a unit (`aw worktree`); otherwise its document's own, inherited, or registered work branch (in that order). An unrelated unit does not block a document editing the shared checkout in its expected branch.
54
56
 
55
- **Primary mechanism**: `aw check-branch --source <alias>` (or `--file <path-of-the-imminent-edit>`; `--strict` returns exit 2 on mismatch — useful as a gate). It returns the per-source fields already computed: `alias`, `path`, `main_branch` (base), `expected_work_branch`, `current_branch`, `match` (`current == expected`), `dirty` (uncommitted changes). **Fallback** (loose repo without workspace/CLI): compute them with direct read-only git (`git branch --show-current` + `git status --porcelain`) plus the session's declared branch.
57
+ **Primary mechanism**: `aw check-branch --source <alias>` (or `--file <path-of-the-imminent-edit>`; `--strict` returns exit 2 on mismatch — useful as a gate). It returns the per-source fields already computed: `alias`, `path`, `main_branch` (base), `expected_work_branch`, `current_branch`, `match` (`current == expected`), `dirty` (uncommitted changes). **Fallback** (loose repo without workspace/CLI): compute them in the source checkout with `git -C <ruta-de-la-fuente> branch --show-current` and `git -C <ruta-de-la-fuente> status --porcelain` plus the session's declared branch. The hub's branch is never a proxy for a source's branch.
56
58
 
57
59
  Cases:
58
60
 
59
61
  - **`match=true`** → OK, edit.
60
- - **`match=false, dirty=false`** (Case A — different branch, clean repo) → *structured-choice*: `git checkout <expected>` / keep current and update the session's expectation / cancel.
62
+ - **`match=false, dirty=false`** (Case A — different branch, clean repo) → *structured-choice*: `git checkout <expected>` / confirm `aw doc-branch set --doc <tipo:NNN> --source <alias> --rama <actual>` to use the current branch for this document / cancel.
61
63
  - **`match=false, dirty=true`** (Case B — different branch + uncommitted changes) → **pause and wait for manual resolution**. Never propose checkout (it could lose work). Ask the user to commit/stash/discard and to say when to continue.
62
- - **Cross-source (hub)**: if the touched sources point to different branches without declaring it, **hard gate** — block progress with *structured-choice* (align all / declare the divergence explicitly / cancel).
64
+ - **In-place, match=true with user changes** → proceed; declare only run-owned paths against the acquisition snapshot. `branch-check` rejects development and the commit fences branch and HEAD. Never switch branches without consent.
65
+ - **Cross-source (hub)**: `aw sources --code <NNN>` checks each source against its own expected branch; different branch names are fine when every source matches. Pause only the divergent sources.
63
66
  - **Detached HEAD** → treat as Case A.
64
67
  - **Source outside git** (`is_repo=false`) → report, do not block.
65
68
 
69
+ To request a document branch, first run `aw doc-branch show --code <NNN>` (or `--doc <tipo:NNN>`), ask the person to confirm or change its proposed name, then run `aw doc-branch set --code <NNN> --source <alias> --rama <nombre>`. No branch is registered just by showing a proposal.
70
+
71
+ Closing, releasing or reclaiming a unit preserves the document branch and its base. A later cleanup may remove only an `aw/*` unit branch already contained in that base (decision `S049/AC-10`); it never deletes either protected branch.
72
+
66
73
  ### Commits — propose-then-execute, one source at a time
67
74
 
68
75
  On any commit request or trigger (loop close, "commit this", "save the changes"):
@@ -99,11 +106,11 @@ Autonomous `git merge` is forbidden (above), **but** resolving an **in-progress*
99
106
 
100
107
  **The mechanics live in the CLI** (`aw fix-git prepare | apply | commit`); what follows is the reasoning it expects from you. Never edit a conflicted file, `git add` or `git commit` by hand here — see [`../../commands/fix-git.md`](../../commands/fix-git.md) for the exact invocations.
101
108
 
102
- 1. **Detect + identify**: `aw fix-git prepare` (read-only) returns the merge direction (**theirs → ours**), the conflicted paths and, per path, its three index stages with their blob hashes. `aw merge-state` remains the lighter inspector when you only need the state.
103
- 2. **Analyze each conflict's intent** **before** resolving — never pick a side blindly. The request already carries the three versions: `base` (common ancestor), `ours` (destination) and `theirs` (origin). Add `git log --merge -p -- <file>` when the *why* of a hunk is not evident, and read the surrounding code for coherence.
104
- 3. **Resolve** by composing the complete resolved file: pick **ours**, **theirs**, **combine** both intents, or **rewrite** to satisfy both — with no `<<<<<<<` / `=======` / `>>>>>>>` left. The CLI writes and stages it; a leftover marker is rejected, and so is a path that is no longer in conflict.
105
- 4. **Ask** (*structured-choice*) when the intent is **ambiguous** or both sides are **incoherent** with each other (not combinable without losing something): answer `state: "ambiguous"` so nothing is written, then ask one content question per doubtful file/hunk (≤3 + `flow` control), options "Ours (`<destination>`)" / "Theirs (`<origin>`)" / "Combine" / "Edit manually". **Never invent** a resolution under real doubt. A **binary** conflict is never resolved automatically: propose `git checkout --ours|--theirs`.
106
- 5. **Proposed commit**: completing the merge is a `git commit` (the merge commit) → **propose-then-execute** like any commit (canonical format above; outside a session → 1 line without the `session<NNN>` tag; never `--no-verify`/`--amend`/`push`). It is a **separate, confirmed** invocation — `aw fix-git commit --message "<msg>" --confirm` — which refuses while any file stays unmerged. The `git-commit-advisor` hook gates it.
109
+ 1. **Detect + identify**: `aw merge-state` reports unreadable sources and units, never "no merge" when they could not be inspected. `aw fix-git prepare` (read-only) summarizes each conflict's path, `kind`, binary, bytes, EOL, allowed resolutions and max bytes; it warns about multiple merge bases (virtual base). It seals the index-stage hashes but does not ship the full contents by default. Repeat `--show <path>` for each file whose three versions are needed. `--adapt <path>` includes a tracked file merged cleanly but needing a semantic adjustment, including after all conflicts were resolved while MERGE_HEAD remains.
110
+ 2. **Analyze intent** before resolving — never pick a side blindly. With `--show` read `base` (ancestor), `ours` (destination), `theirs` (origin). Add `git log --merge -p -- <file>` when the *why* of a hunk is not evident, and read adjacent code for coherence.
111
+ 3. **Resolve** with a complete text `{path,content}` without conflict markers, or a `resolution` `{path,choice}` where `choice` is `ours`, `theirs` or `delete`. A binary takes the intact `ours`/`theirs` blob via the CLI; absent stage → `delete`. Apply a subset and repeat prepare/apply for the remaining files. The CLI updates the index with Git plumbing and checks out with repo attributes/EOL, with no hand-run `git add` or `git checkout`.
112
+ 4. **Ask** (*structured-choice*) when intent is ambiguous or both sides are incoherent: answer `state: "ambiguous"`, ask one content question per doubtful file/hunk (≤3 + `flow` control), with consequences for each option. Never guess. A binary is not an exception to the intent rule — choosing `ours`/`theirs` still needs evidence.
113
+ 5. **Proposed commit**: `aw fix-git commit --message "<msg>"` without `--confirm` previews the message, build, included files and `left_out`. After approval repeat with `--confirm` and a **long host timeout**: it runs the versioned source build in the merge repo and refuses failed/undeclared builds or unmerged files. `ninguno` or `--skip-build "<motivo>"` is explicit and visible with its origin; the result also warns if build ran on a tree different from the commit. Never hand-run `git commit`, `--no-verify`, `--amend` or push.
107
114
  6. **Escape hatch**: if the merge must not complete, `git merge --abort` **after user confirmation** (*structured-choice*) — leaves the repo as before the merge.
108
115
 
109
116
  > **Resume via git**: the merge state in `.git` (MERGE_HEAD + index) **is** the checkpoint; re-running `/w:fix-git` resumes from the remaining conflicts. No session, no artifact.
@@ -14,7 +14,7 @@ description: >
14
14
 
15
15
  ## Role
16
16
 
17
- `research` — built-in default implementation. Rebindable to another skill (third-party or `off`) in `.workflow/skills.toml`.
17
+ Research uses the loop's own gap-driven method. Any additional host-native help is optional, not a Workline binding.
18
18
 
19
19
  ## Purpose
20
20
 
@@ -89,7 +89,7 @@ Every loop loads it on demand:
89
89
 
90
90
  ### Read-only git (git-safe, invariant #5)
91
91
 
92
- Only: `git log`, `git show`, `git diff`, `git blame`, `git branch --show-current`.
92
+ Only: `git log`, `git show`, `git diff`, `git blame`, `git -C <ruta-de-la-fuente> branch --show-current`. Read each source at its own path, never infer its branch from the hub.
93
93
  Never during investigation: `commit`, `push`, `merge`, `rebase`, `reset`, `checkout`.
94
94
 
95
95
  ### Inconclusive closure
@@ -5,7 +5,7 @@ description: >-
5
5
  changes as versioned scripts (never executing them): writes statements to the
6
6
  session `SCRIPTS.sql` with `@category` + `@stmt` markers, applies project SQL
7
7
  style (canonical header, BEGIN/COMMIT, idempotency, explicit schema, CTEs over
8
- DO/LOOP), classifies into the 4 categories, and knows how rollbacks are derived
8
+ DO/LOOP), classifies into the 5 categories, and knows how rollbacks are derived
9
9
  on export. DB access is read-only via MCP — DML/DDL is NEVER executed (invariant 4).
10
10
  Use when a loop writes migrations / queries, when research reads schema, or when
11
11
  export-scripts consolidates the bundle.
@@ -15,7 +15,7 @@ description: >-
15
15
 
16
16
  ## Role
17
17
 
18
- `sql` — built-in default. Rebindable in `.workflow/skills.toml` (third-party skill or `off`). When `off`, the loop continues without DB authoring help and says so if the task needed it.
18
+ DB scripts-only is Workline policy. SQL authoring help is ambient, supplied by the host when available and never required to enforce that policy.
19
19
 
20
20
  ## Purpose
21
21
 
@@ -41,11 +41,12 @@ The AI **never executes DML/DDL** against any DB, through any channel (MCP, `psq
41
41
  - Choose only a registered connection; the registry, not environment-name conventions, supplies its exact DSN variable.
42
42
  - A remote snapshot is recorded before plan approval and is never refreshed from `plan-exec`.
43
43
 
44
- ### Staging — a single `SCRIPTS.sql` per session
44
+ ### Staging — separate forward and rollback artifacts per session
45
45
 
46
46
  ```
47
47
  .workflow/sessions/<folder>/
48
- └── SCRIPTS.sql (consolidated: ALL of the session's statements)
48
+ ├── SCRIPTS.sql (forward migrations and type-A reads)
49
+ └── SCRIPTS.rollback.sql (reverse migrations, never applied with the forward)
49
50
  ```
50
51
 
51
52
  Every statement is **appended** with a pair of comment markers:
@@ -58,13 +59,13 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
58
59
  );
59
60
  ```
60
61
 
61
- - `@category` classifies (4 canonical values, below).
62
+ - `@category` classifies (5 canonical values, below).
62
63
  - `@stmt` gives the deterministic slug `NN-verb-target`; `export-scripts` derives the filename when splitting.
63
- - Order inside the file = chronological append order. The final per-category execution order (01→02→03→04) is resolved by `export-scripts`, not here.
64
+ - Order inside the file = chronological append order. The final category order (01→02→03→04→05) is resolved by `export-scripts`.
64
65
  - A global `BEGIN;` at the top of the file, `COMMIT;` at the end. Individual statements carry **no** BEGIN/COMMIT of their own.
65
- - **No** per-file `.rollback.sql` during exec — the rollback is generated on export.
66
+ - Put session reverses in `SCRIPTS.rollback.sql`, never after the forwards. Export pairs each forward with its own `.rollback.sql` under `rollback/`.
66
67
 
67
- ### The 4 categories (`@category`)
68
+ ### The 5 categories (`@category`)
68
69
 
69
70
  | Marker | Detection patterns |
70
71
  |---|---|
@@ -72,8 +73,9 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
72
73
  | `02-ddl-funciones` | `CREATE [OR REPLACE] FUNCTION/PROCEDURE`, `DROP FUNCTION/PROCEDURE` |
73
74
  | `03-migracion` | `UPDATE`, `INSERT ... SELECT`, `DELETE` over existing data, column transformations |
74
75
  | `04-inserts` | `INSERT INTO ... VALUES`, catalog seeds, initial configuration data |
76
+ | `05-grants` | `GRANT`/`REVOKE`, `ALTER … OWNER TO`, `ALTER DEFAULT PRIVILEGES` |
75
77
 
76
- **Mandatory execution order**: 01 → 02 → 03 → 04. `SCRIPTS.sql` may mix categories chronologically; `export-scripts` orders the final bundle.
78
+ **Mandatory execution order**: 01 → 02 → 03 → 04 → 05. `SCRIPTS.sql` may mix categories chronologically; `export-scripts` orders the final bundle.
77
79
 
78
80
  ### SQL style
79
81
 
@@ -110,12 +112,12 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
110
112
  2. **Verify idempotency** of the statement.
111
113
  3. **Append** with the marker pair (`@category` + `@stmt`).
112
114
  4. **Style check** — canonical header, CTEs over DO/LOOP, explicit schema.
113
- 5. **Never** renumber or move (there is a single `SCRIPTS.sql`).
114
- 6. **Never** generate `.rollback.sql` during exec.
115
+ 5. **Never** renumber or move `SCRIPTS.sql` during exec.
116
+ 6. Keep the inverse in the separate `SCRIPTS.rollback.sql`.
115
117
 
116
- ### Rollback (generated by `export-scripts`, not here)
118
+ ### Rollback (session draft and export)
117
119
 
118
- `export-scripts` reads the consolidated forwards and generates **a single** `00-ROLLBACK.sql` at the bundle root, in reverse order. Know the strategies to write reversible forwards:
120
+ Write session reverses in `SCRIPTS.rollback.sql`. `export-scripts` pairs each final forward with `rollback/<categoría>/NN-<nombre>.rollback.sql` and derives `rollback/00-global/00-ROLLBACK.sql` in safe reverse order. Know the strategies to write reversible forwards:
119
121
 
120
122
  | Forward | Rollback |
121
123
  |---|---|
@@ -131,8 +133,8 @@ CREATE TABLE IF NOT EXISTS <schema>.<table> (
131
133
 
132
134
  ## Output
133
135
 
134
- - During loops: statements appended to `.workflow/sessions/<folder>/SCRIPTS.sql` (session artifact, never `docs/`).
135
- - Via `export-scripts`: the `docs/scripts/NNN-export-scripts-YYYY-MM-DD/` bundle — `00-ROLLBACK.sql` + `01-<CATEGORY>.sql` … (continuous numbering, no gaps for empty categories) + `README.md`. Canonical category order: `DDL-TABLES → DDL-FUNCTIONS → DML → INSERTS`.
136
+ - During loops: forwards in `SCRIPTS.sql`, reverses in `SCRIPTS.rollback.sql` (session artifacts, never `docs/`).
137
+ - Via `export-scripts`: five category folders (`01-ddl-tablas` … `05-grants`) with numbered forwards, matching reverses in `rollback/<categoría>/` and the global reverse in `rollback/00-global/00-ROLLBACK.sql`; empty categories have no folder.
136
138
 
137
139
  It never writes `docs/` from a loop (invariant 1: only `export-*` exports). It never executes anything against a DB (invariant 4).
138
140
 
@@ -88,6 +88,15 @@
88
88
  },
89
89
  "uniqueItems": true
90
90
  },
91
+ "screen_refs": {
92
+ "description": "Optional screen revisions cited by this screen's body; a state anchor cites the declared revision.",
93
+ "type": "array",
94
+ "items": {
95
+ "type": "string",
96
+ "pattern": "^DES-(?:[0-9]{3}|[1-9][0-9]{3,})/SCR-(?:[0-9]{3}|[1-9][0-9]{3,})@r[1-9][0-9]{0,5}$"
97
+ },
98
+ "uniqueItems": true
99
+ },
91
100
  "dependencies": {
92
101
  "type": "object",
93
102
  "additionalProperties": false,
@@ -1,109 +0,0 @@
1
- /**
2
- * Reading the descriptor an installed skill claims to satisfy.
3
- *
4
- * The claim crosses a trust boundary: the frontmatter and the JSON next to it
5
- * were authored by whoever wrote the skill, and nothing about being installed
6
- * makes either of them true. So the loader verifies before it believes, in this
7
- * order, and stops at the first failure:
8
- *
9
- * 1. the metadata key exists — its absence is not an error, it means the skill
10
- * is ambient and gets no Workline surface;
11
- * 2. the locator is a confined relative path to a `.json`, sealed with a digest;
12
- * 3. the resolved file is a real file inside the skill's own directory and NOT a
13
- * symlink — a link is how a confined path reaches outside anyway;
14
- * 4. the bytes produce the sealed digest;
15
- * 5. the contract version is one this CLI implements, checked before any other
16
- * field is read.
17
- *
18
- * A failure never loads partially and never touches a binding.
19
- */
20
- import { join } from "node:path";
21
- import { CAPABILITY_DESCRIPTOR_METADATA_KEY, parseDescriptorLocator, verifyDescriptorPayload, } from "../../domain/capability/descriptor.js";
22
- import { getSkillVersion, parseSkillFrontmatter } from "../../domain/skill-frontmatter.js";
23
- /** Read a skill's `SKILL.md` head. Returns null when there is no readable one. */
24
- export async function readSkillHead(fs, skillDir, dirName) {
25
- const skillMd = join(skillDir, "SKILL.md");
26
- if (!(await fs.exists(skillMd)))
27
- return null;
28
- let text;
29
- try {
30
- text = await fs.readText(skillMd);
31
- }
32
- catch {
33
- return null;
34
- }
35
- const fm = parseSkillFrontmatter(text);
36
- if (fm === null)
37
- return null;
38
- return {
39
- name: fm.fields.name?.trim() || dirName,
40
- version: getSkillVersion(fm),
41
- locatorValue: fm.metadata[CAPABILITY_DESCRIPTOR_METADATA_KEY] ?? null,
42
- skillMd,
43
- };
44
- }
45
- export async function loadDescriptor(fs, skillDir, head) {
46
- if (head.locatorValue === null)
47
- return { state: "absent" };
48
- const parsed = parseDescriptorLocator(head.locatorValue);
49
- if (!parsed.ok) {
50
- return {
51
- state: "invalid",
52
- failure: { code: parsed.code, message: parsed.message, action: parsed.action },
53
- };
54
- }
55
- const absolute = join(skillDir, parsed.locator.path);
56
- const link = await fs.lstat(absolute);
57
- if (link === null) {
58
- return {
59
- state: "invalid",
60
- failure: {
61
- code: "CAPABILITY_DESCRIPTOR_MISSING",
62
- message: `'${head.name}' declara un descriptor en '${parsed.locator.path}' y ahí no hay nada`,
63
- action: "publicá el descriptor junto al SKILL.md, o quitá la clave de metadata",
64
- },
65
- };
66
- }
67
- // A confined relative path still lands outside if the target is a link. The
68
- // containment rule is about WHICH BYTES get read, not about how the path looks.
69
- if (link.isSymlink || link.type !== "file") {
70
- return {
71
- state: "invalid",
72
- failure: {
73
- code: "CAPABILITY_DESCRIPTOR_NOT_CONFINED",
74
- message: `'${parsed.locator.path}' no es un archivo dentro del directorio de la skill`,
75
- action: "publicá el descriptor como archivo real, sin enlaces simbólicos",
76
- },
77
- };
78
- }
79
- let bytes;
80
- try {
81
- bytes = await fs.readText(absolute);
82
- }
83
- catch {
84
- return {
85
- state: "invalid",
86
- failure: {
87
- code: "CAPABILITY_DESCRIPTOR_UNREADABLE",
88
- message: `no se pudo leer '${parsed.locator.path}'`,
89
- action: "revisá permisos del archivo del descriptor",
90
- },
91
- };
92
- }
93
- const verified = verifyDescriptorPayload(parsed.locator, bytes);
94
- if (!verified.ok) {
95
- return {
96
- state: "invalid",
97
- failure: { code: verified.code, message: verified.message, action: verified.action },
98
- };
99
- }
100
- return {
101
- state: "loaded",
102
- loaded: {
103
- descriptor: verified.descriptor,
104
- path: parsed.locator.path,
105
- digest: parsed.locator.digest,
106
- },
107
- };
108
- }
109
- //# sourceMappingURL=descriptor-loader.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptor-loader.js","sourceRoot":"","sources":["../../../src/application/capability/descriptor-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,kCAAkC,EAClC,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAyB3F,kFAAkF;AAClF,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,EAAkB,EAClB,QAAgB,EAChB,OAAe;IAEf,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC3C,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAC7C,IAAI,IAAY,CAAC;IACjB,IAAI,CAAC;QACH,IAAI,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;IACD,MAAM,EAAE,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACvC,IAAI,EAAE,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC7B,OAAO;QACL,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,OAAO;QACvC,OAAO,EAAE,eAAe,CAAC,EAAE,CAAC;QAC5B,YAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC,IAAI,IAAI;QACrE,OAAO;KACR,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAClC,EAAkB,EAClB,QAAgB,EAChB,IAAe;IAEf,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI;QAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAE3D,MAAM,MAAM,GAAG,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE;SAC/E,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,IAAI,EAAE,+BAA+B;gBACrC,OAAO,EAAE,IAAI,IAAI,CAAC,IAAI,+BAA+B,MAAM,CAAC,OAAO,CAAC,IAAI,qBAAqB;gBAC7F,MAAM,EAAE,uEAAuE;aAChF;SACF,CAAC;IACJ,CAAC;IACD,4EAA4E;IAC5E,gFAAgF;IAChF,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QAC3C,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,IAAI,EAAE,oCAAoC;gBAC1C,OAAO,EAAE,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,sDAAsD;gBACtF,MAAM,EAAE,iEAAiE;aAC1E;SACF,CAAC;IACJ,CAAC;IAED,IAAI,KAAa,CAAC;IAClB,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,IAAI,EAAE,kCAAkC;gBACxC,OAAO,EAAE,oBAAoB,MAAM,CAAC,OAAO,CAAC,IAAI,GAAG;gBACnD,MAAM,EAAE,4CAA4C;aACrD;SACF,CAAC;IACJ,CAAC;IAED,MAAM,QAAQ,GAAG,uBAAuB,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAChE,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO;YACL,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,MAAM,EAAE;SACrF,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ,CAAC,UAAU;YAC/B,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;YACzB,MAAM,EAAE,MAAM,CAAC,OAAO,CAAC,MAAM;SAC9B;KACF,CAAC;AACJ,CAAC"}