vgxness 1.20.4 → 1.20.6

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 (375) hide show
  1. package/dist/adapters/claude/agent-renderer.js +82 -0
  2. package/dist/{mcp → adapters/claude/install}/claude-code-agent-config.js +64 -9
  3. package/dist/{mcp → adapters/claude/install}/claude-code-config.js +28 -6
  4. package/dist/{mcp → adapters/claude/install}/claude-code-project-memory.js +35 -5
  5. package/dist/{mcp → adapters/claude/install}/claude-code-scope.js +12 -3
  6. package/dist/{mcp → adapters/claude/install}/claude-code-user-config.js +26 -5
  7. package/dist/{mcp → adapters/claude/install}/claude-code-user-memory.js +47 -7
  8. package/dist/{mcp → adapters/claude/install}/client-install-claude-code-contract.js +45 -8
  9. package/dist/{mcp → adapters/claude/install}/client-install-claude-code.js +98 -14
  10. package/dist/adapters/json/agent-renderer.js +104 -0
  11. package/dist/adapters/opencode/agent-renderer.js +113 -0
  12. package/dist/{mcp → adapters/opencode/install}/client-install-opencode-contract.js +2 -2
  13. package/dist/{mcp → adapters/opencode/install}/client-install-opencode.js +1 -1
  14. package/dist/{mcp → adapters/opencode/install}/opencode-default-agent-config.js +2 -2
  15. package/dist/{mcp → adapters/opencode/install}/opencode-handoff-preview.js +60 -7
  16. package/dist/{mcp → adapters/opencode/install}/opencode-visibility.js +1 -1
  17. package/dist/adapters/provider-renderer.js +6 -0
  18. package/dist/agents/agent-activation-service.js +1 -263
  19. package/dist/agents/agent-lookup-contexts.js +1 -28
  20. package/dist/agents/agent-registry-service.js +1 -81
  21. package/dist/agents/agent-resolver.js +1 -287
  22. package/dist/agents/agent-seed-service.js +1 -157
  23. package/dist/agents/agent-seed-upgrade-service.js +1 -231
  24. package/dist/agents/agent-selector-resolver.js +1 -28
  25. package/dist/agents/boot-upgrade.js +1 -59
  26. package/dist/agents/canonical-agent-manifest.js +1 -245
  27. package/dist/agents/canonical-agent-projection.js +1 -236
  28. package/dist/agents/manager-profile-overlay-service.js +1 -60
  29. package/dist/agents/profile-model-routing.js +1 -30
  30. package/dist/agents/renderers/claude-renderer.js +1 -82
  31. package/dist/agents/renderers/index.js +1 -14
  32. package/dist/agents/renderers/json-renderer.js +1 -104
  33. package/dist/agents/renderers/opencode-renderer.js +1 -113
  34. package/dist/agents/renderers/provider-adapter.js +1 -6
  35. package/dist/agents/repositories/agent-seed-history.js +1 -128
  36. package/dist/agents/repositories/agents.js +1 -200
  37. package/dist/agents/repositories/manager-profile-overlays.js +1 -90
  38. package/dist/agents/schema.js +1 -1
  39. package/dist/application/agents/agent-activation-service.js +261 -0
  40. package/dist/application/agents/agent-lookup-contexts.js +28 -0
  41. package/dist/application/agents/agent-registry-service.js +81 -0
  42. package/dist/application/agents/agent-resolver.js +287 -0
  43. package/dist/application/agents/agent-seed-service.js +157 -0
  44. package/dist/application/agents/agent-seed-upgrade-service.js +231 -0
  45. package/dist/application/agents/agent-selector-resolver.js +28 -0
  46. package/dist/application/agents/boot-upgrade.js +59 -0
  47. package/dist/application/agents/canonical-agent-projection.js +236 -0
  48. package/dist/application/agents/manager-profile-overlay-service.js +68 -0
  49. package/dist/application/agents/profile-model-routing.js +30 -0
  50. package/dist/application/agents/renderers/claude-renderer.js +1 -0
  51. package/dist/application/agents/renderers/index.js +14 -0
  52. package/dist/application/agents/renderers/json-renderer.js +1 -0
  53. package/dist/application/agents/renderers/opencode-renderer.js +1 -0
  54. package/dist/application/agents/renderers/provider-adapter.js +1 -0
  55. package/dist/application/memory/active-work-preview.js +75 -0
  56. package/dist/application/memory/agent-memory-capture-service.js +498 -0
  57. package/dist/application/memory/import/dry-run-planner.js +58 -0
  58. package/dist/application/memory/import/index.js +3 -0
  59. package/dist/application/memory/import/observation-writer.js +226 -0
  60. package/dist/application/memory/import/package.js +179 -0
  61. package/dist/application/memory/memory-service.js +202 -0
  62. package/dist/application/memory/search.js +11 -0
  63. package/dist/{mcp → application/provider-setup}/provider-change-plan.js +74 -13
  64. package/dist/{mcp → application/provider-setup}/provider-doctor.js +201 -31
  65. package/dist/{mcp → application/provider-setup}/provider-health-types.js +1 -1
  66. package/dist/{mcp → application/provider-setup}/provider-status.js +170 -33
  67. package/dist/application/runs/execution-planning.js +180 -0
  68. package/dist/application/runs/operation-execution.js +1 -0
  69. package/dist/application/runs/operation-retry.js +129 -0
  70. package/dist/application/runs/resume-after-approval-result.js +88 -0
  71. package/dist/application/runs/run-insights.js +270 -0
  72. package/dist/application/runs/run-service.js +1480 -0
  73. package/dist/application/runs/run-snapshot-export-service.js +31 -0
  74. package/dist/application/runs/sandbox-process-execution.js +244 -0
  75. package/dist/application/runs/sandbox-worktree-planning.js +59 -0
  76. package/dist/application/runs/task-scoped-command-grant-service.js +224 -0
  77. package/dist/application/sdd/artifact-portability-service.js +137 -0
  78. package/dist/application/sdd/cockpit-read-model.js +195 -0
  79. package/dist/application/sdd/sdd-continuation-plan.js +265 -0
  80. package/dist/application/sdd/sdd-workflow-service.js +892 -0
  81. package/dist/application/skills/boot-seed.js +42 -0
  82. package/dist/application/skills/personal-skills.js +41 -0
  83. package/dist/application/skills/skill-export-service.js +34 -0
  84. package/dist/application/skills/skill-index-service.js +126 -0
  85. package/dist/application/skills/skill-payload.js +186 -0
  86. package/dist/application/skills/skill-registry-service.js +648 -0
  87. package/dist/application/skills/skill-resolver.js +368 -0
  88. package/dist/application/skills/skill-seed-service.js +242 -0
  89. package/dist/application/skills/skill-status-service.js +147 -0
  90. package/dist/cli/bun-bin.js +0 -0
  91. package/dist/cli/cli-flags.js +1 -387
  92. package/dist/cli/cli-help.js +1 -173
  93. package/dist/cli/cli-helpers.js +1 -77
  94. package/dist/cli/cli-types.js +1 -1
  95. package/dist/cli/commands/agent-skill-dispatcher.js +1 -700
  96. package/dist/cli/commands/index.js +1 -9
  97. package/dist/cli/commands/interactive-entrypoint-dispatcher.js +1 -14
  98. package/dist/cli/commands/mcp-dispatcher.js +1 -232
  99. package/dist/cli/commands/memory-sdd-dispatcher.js +1 -367
  100. package/dist/cli/commands/run-permission-dispatcher.js +1 -455
  101. package/dist/cli/commands/setup-dispatcher.js +1 -496
  102. package/dist/cli/commands/status-dispatcher.js +1 -130
  103. package/dist/cli/commands/verification-dispatcher.js +1 -47
  104. package/dist/cli/commands/workflow-dispatcher.js +1 -566
  105. package/dist/cli/dispatcher.js +1 -247
  106. package/dist/cli/doctor-renderer.js +1 -26
  107. package/dist/cli/home-tui-app.js +1 -411
  108. package/dist/cli/home-tui-controller.js +1 -314
  109. package/dist/cli/mcp-start-path.js +1 -21
  110. package/dist/cli/product-resume-renderer.js +1 -32
  111. package/dist/cli/product-status-renderer.js +1 -81
  112. package/dist/cli/sdd-renderer.js +1 -247
  113. package/dist/cli/setup-plan-renderer.js +1 -79
  114. package/dist/cli/setup-status-renderer.js +1 -50
  115. package/dist/cli/setup-tui-app.js +1 -130
  116. package/dist/cli/setup-tui-controller.js +1 -89
  117. package/dist/cli/tui/focus-reducer.js +1 -0
  118. package/dist/cli/tui/focus-types.js +1 -0
  119. package/dist/cli/tui/ink/app-shell.js +1 -0
  120. package/dist/cli/tui/ink/components.js +1 -38
  121. package/dist/cli/tui/ink/help-overlay.js +1 -0
  122. package/dist/cli/tui/ink/state-components.js +1 -0
  123. package/dist/cli/tui/ink/theme.js +1 -36
  124. package/dist/cli/tui/key-intents.js +1 -0
  125. package/dist/cli/tui/keymap.js +1 -20
  126. package/dist/cli/tui/navigation.js +1 -10
  127. package/dist/cli/tui/screen-registry.js +1 -0
  128. package/dist/cli/tui/terminal-capabilities.js +1 -12
  129. package/dist/cli/tui/tui-types.js +1 -1
  130. package/dist/cli/tui/visual/badges.js +1 -19
  131. package/dist/cli/tui/visual/footer.js +1 -27
  132. package/dist/cli/tui/visual/index.js +1 -3
  133. package/dist/cli/tui/visual/viewport.js +1 -11
  134. package/dist/cli/tui-render-helpers.js +1 -200
  135. package/dist/cli/verification-plan-renderer.js +1 -25
  136. package/dist/cli/verification-report-renderer.js +1 -19
  137. package/dist/domain/agents/canonical-agent-manifest.js +355 -0
  138. package/dist/domain/agents/schema.js +1 -0
  139. package/dist/domain/memory/active-work-topics.js +64 -0
  140. package/dist/domain/memory/memory-capture-schema.js +1 -0
  141. package/dist/domain/memory/schema.js +1 -0
  142. package/dist/domain/runs/schema.js +5 -0
  143. package/dist/domain/sdd/cockpit-types.js +1 -0
  144. package/dist/domain/sdd/schema.js +111 -0
  145. package/dist/domain/skills/schema.js +1 -0
  146. package/dist/governance/risk-classifier.js +2 -0
  147. package/dist/interfaces/cli/bun-bin.js +46 -0
  148. package/dist/interfaces/cli/cli-flags.js +391 -0
  149. package/dist/interfaces/cli/cli-help.js +173 -0
  150. package/dist/interfaces/cli/cli-helpers.js +77 -0
  151. package/dist/interfaces/cli/cli-types.js +1 -0
  152. package/dist/interfaces/cli/commands/agent-skill-dispatcher.js +700 -0
  153. package/dist/interfaces/cli/commands/index.js +9 -0
  154. package/dist/interfaces/cli/commands/interactive-entrypoint-dispatcher.js +14 -0
  155. package/dist/interfaces/cli/commands/mcp-dispatcher.js +252 -0
  156. package/dist/interfaces/cli/commands/memory-sdd-dispatcher.js +367 -0
  157. package/dist/interfaces/cli/commands/run-permission-dispatcher.js +460 -0
  158. package/dist/interfaces/cli/commands/setup-dispatcher.js +496 -0
  159. package/dist/interfaces/cli/commands/status-dispatcher.js +130 -0
  160. package/dist/interfaces/cli/commands/verification-dispatcher.js +47 -0
  161. package/dist/interfaces/cli/commands/workflow-dispatcher.js +566 -0
  162. package/dist/interfaces/cli/dispatcher.js +247 -0
  163. package/dist/interfaces/cli/doctor-renderer.js +26 -0
  164. package/dist/interfaces/cli/home-tui-app.js +462 -0
  165. package/dist/interfaces/cli/home-tui-controller.js +341 -0
  166. package/dist/interfaces/cli/index.js +27 -0
  167. package/dist/interfaces/cli/mcp-start-path.js +21 -0
  168. package/dist/interfaces/cli/product-resume-renderer.js +32 -0
  169. package/dist/interfaces/cli/product-status-renderer.js +81 -0
  170. package/dist/interfaces/cli/sdd-renderer.js +247 -0
  171. package/dist/interfaces/cli/setup-plan-renderer.js +79 -0
  172. package/dist/interfaces/cli/setup-status-renderer.js +50 -0
  173. package/dist/interfaces/cli/setup-tui-app.js +135 -0
  174. package/dist/interfaces/cli/setup-tui-controller.js +89 -0
  175. package/dist/interfaces/cli/tui/focus-reducer.js +60 -0
  176. package/dist/interfaces/cli/tui/focus-types.js +10 -0
  177. package/dist/interfaces/cli/tui/ink/app-shell.js +16 -0
  178. package/dist/interfaces/cli/tui/ink/components.js +38 -0
  179. package/dist/interfaces/cli/tui/ink/help-overlay.js +6 -0
  180. package/dist/interfaces/cli/tui/ink/state-components.js +22 -0
  181. package/dist/interfaces/cli/tui/ink/theme.js +36 -0
  182. package/dist/interfaces/cli/tui/key-intents.js +33 -0
  183. package/dist/interfaces/cli/tui/keymap.js +20 -0
  184. package/dist/interfaces/cli/tui/navigation.js +10 -0
  185. package/dist/interfaces/cli/tui/screen-registry.js +43 -0
  186. package/dist/interfaces/cli/tui/terminal-capabilities.js +12 -0
  187. package/dist/interfaces/cli/tui/tui-types.js +1 -0
  188. package/dist/interfaces/cli/tui/visual/badges.js +19 -0
  189. package/dist/interfaces/cli/tui/visual/footer.js +27 -0
  190. package/dist/interfaces/cli/tui/visual/index.js +3 -0
  191. package/dist/interfaces/cli/tui/visual/viewport.js +11 -0
  192. package/dist/interfaces/cli/tui-render-helpers.js +200 -0
  193. package/dist/interfaces/cli/verification-plan-renderer.js +25 -0
  194. package/dist/interfaces/cli/verification-report-renderer.js +19 -0
  195. package/dist/interfaces/mcp/contracts/agents.js +1 -0
  196. package/dist/interfaces/mcp/contracts/context.js +1 -0
  197. package/dist/interfaces/mcp/contracts/governance.js +1 -0
  198. package/dist/interfaces/mcp/contracts/index.js +1 -0
  199. package/dist/interfaces/mcp/contracts/memory.js +1 -0
  200. package/dist/interfaces/mcp/contracts/providers.js +1 -0
  201. package/dist/interfaces/mcp/contracts/runs.js +1 -0
  202. package/dist/interfaces/mcp/contracts/sdd.js +1 -0
  203. package/dist/interfaces/mcp/contracts/sessions.js +1 -0
  204. package/dist/interfaces/mcp/contracts/skills.js +1 -0
  205. package/dist/interfaces/mcp/contracts/verification.js +1 -0
  206. package/dist/interfaces/mcp/control-plane/handlers/agents.js +38 -0
  207. package/dist/interfaces/mcp/control-plane/handlers/context.js +12 -0
  208. package/dist/interfaces/mcp/control-plane/handlers/memory.js +95 -0
  209. package/dist/interfaces/mcp/control-plane/handlers/providers.js +19 -0
  210. package/dist/interfaces/mcp/control-plane/handlers/runs.js +134 -0
  211. package/dist/interfaces/mcp/control-plane/handlers/sdd.js +225 -0
  212. package/dist/interfaces/mcp/control-plane/handlers/sessions.js +39 -0
  213. package/dist/interfaces/mcp/control-plane/handlers/skills.js +82 -0
  214. package/dist/interfaces/mcp/control-plane/handlers/verification.js +11 -0
  215. package/dist/interfaces/mcp/control-plane/types.js +1 -0
  216. package/dist/interfaces/mcp/control-plane.js +235 -0
  217. package/dist/interfaces/mcp/schema.js +174 -0
  218. package/dist/interfaces/mcp/schemas/common.js +121 -0
  219. package/dist/interfaces/mcp/schemas/inputs/agents.js +69 -0
  220. package/dist/interfaces/mcp/schemas/inputs/context.js +32 -0
  221. package/dist/interfaces/mcp/schemas/inputs/governance.js +23 -0
  222. package/dist/interfaces/mcp/schemas/inputs/index.js +10 -0
  223. package/dist/interfaces/mcp/schemas/inputs/memory.js +50 -0
  224. package/dist/interfaces/mcp/schemas/inputs/providers.js +35 -0
  225. package/dist/interfaces/mcp/schemas/inputs/runs.js +146 -0
  226. package/dist/interfaces/mcp/schemas/inputs/sdd.js +102 -0
  227. package/dist/interfaces/mcp/schemas/inputs/sessions.js +32 -0
  228. package/dist/interfaces/mcp/schemas/inputs/skills.js +231 -0
  229. package/dist/interfaces/mcp/schemas/inputs/verification.js +9 -0
  230. package/dist/interfaces/mcp/schemas/outputs/index.js +2 -0
  231. package/dist/interfaces/mcp/schemas/outputs/providers.js +28 -0
  232. package/dist/interfaces/mcp/schemas/outputs/sdd.js +166 -0
  233. package/dist/interfaces/mcp/stdio-server.js +116 -0
  234. package/dist/interfaces/mcp/validation/agents.js +189 -0
  235. package/dist/interfaces/mcp/validation/common.js +415 -0
  236. package/dist/interfaces/mcp/validation/governance.js +50 -0
  237. package/dist/interfaces/mcp/validation/memory.js +133 -0
  238. package/dist/interfaces/mcp/validation/providers.js +94 -0
  239. package/dist/interfaces/mcp/validation/runs.js +514 -0
  240. package/dist/interfaces/mcp/validation/sdd.js +247 -0
  241. package/dist/interfaces/mcp/validation/sessions.js +51 -0
  242. package/dist/interfaces/mcp/validation/skills.js +685 -0
  243. package/dist/interfaces/mcp/validation/verification.js +24 -0
  244. package/dist/interfaces/mcp/validation.js +149 -0
  245. package/dist/mcp/control-plane-snapshot-service.js +65 -2
  246. package/dist/mcp/control-plane.js +1 -646
  247. package/dist/mcp/doctor.js +1 -1
  248. package/dist/mcp/index.js +17 -17
  249. package/dist/mcp/schema.js +1 -1072
  250. package/dist/mcp/stdio-server.js +1 -116
  251. package/dist/mcp/validation.js +1 -2239
  252. package/dist/memory/active-work-preview.js +1 -75
  253. package/dist/memory/active-work-topics.js +1 -64
  254. package/dist/memory/agent-memory-capture-service.js +1 -497
  255. package/dist/memory/import/dry-run-planner.js +1 -58
  256. package/dist/memory/import/index.js +1 -3
  257. package/dist/memory/import/observation-writer.js +1 -226
  258. package/dist/memory/import/package.js +1 -179
  259. package/dist/memory/memory-capture-schema.js +1 -1
  260. package/dist/memory/memory-service.js +1 -201
  261. package/dist/memory/repositories/artifacts.js +1 -67
  262. package/dist/memory/repositories/observations.js +1 -217
  263. package/dist/memory/repositories/sessions.js +1 -125
  264. package/dist/memory/repositories/traces.js +1 -78
  265. package/dist/memory/schema.js +1 -1
  266. package/dist/memory/search.js +1 -11
  267. package/dist/memory/sqlite/database.js +1 -228
  268. package/dist/memory/storage-paths.js +1 -72
  269. package/dist/payload/context-budget-policy.js +10 -0
  270. package/dist/payload/context-budget-service.js +26 -0
  271. package/dist/payload/payload-diagnostics.js +50 -0
  272. package/dist/permissions/explicit-request-authorization.js +126 -0
  273. package/dist/permissions/policy-evaluator.js +54 -14
  274. package/dist/runs/execution-planning.js +1 -178
  275. package/dist/runs/operation-execution.js +1 -1
  276. package/dist/runs/operation-retry.js +1 -129
  277. package/dist/runs/repositories/runs.js +1 -676
  278. package/dist/runs/repositories/task-scoped-command-grants.js +1 -462
  279. package/dist/runs/resume-after-approval-result.js +1 -84
  280. package/dist/runs/run-insights.js +1 -270
  281. package/dist/runs/run-service.js +1 -1439
  282. package/dist/runs/run-snapshot-export-service.js +1 -31
  283. package/dist/runs/sandbox-process-execution.js +1 -240
  284. package/dist/runs/sandbox-worktree-planning.js +1 -59
  285. package/dist/runs/schema.js +1 -5
  286. package/dist/runs/task-scoped-command-grant-service.js +1 -216
  287. package/dist/sdd/artifact-portability-service.js +1 -137
  288. package/dist/sdd/cockpit-read-model.js +1 -195
  289. package/dist/sdd/cockpit-types.js +1 -1
  290. package/dist/sdd/schema.js +1 -111
  291. package/dist/sdd/sdd-continuation-plan.js +1 -265
  292. package/dist/sdd/sdd-workflow-service.js +1 -822
  293. package/dist/setup/providers/claude-setup-adapter.js +11 -4
  294. package/dist/setup/providers/opencode-setup-adapter.js +10 -7
  295. package/dist/setup/setup-plan.js +20 -7
  296. package/dist/skills/boot-seed.js +1 -42
  297. package/dist/skills/personal-skills.js +1 -41
  298. package/dist/skills/repositories/skill-evaluation-requests.js +1 -190
  299. package/dist/skills/repositories/skill-evaluation-scenarios.js +1 -305
  300. package/dist/skills/repositories/skill-improvement-proposals.js +1 -355
  301. package/dist/skills/repositories/skills.js +1 -1077
  302. package/dist/skills/schema.js +1 -1
  303. package/dist/skills/skill-export-service.js +1 -34
  304. package/dist/skills/skill-index-service.js +1 -126
  305. package/dist/skills/skill-payload.js +1 -186
  306. package/dist/skills/skill-registry-service.js +1 -644
  307. package/dist/skills/skill-resolver.js +1 -368
  308. package/dist/skills/skill-seed-service.js +1 -242
  309. package/dist/skills/skill-status-service.js +1 -147
  310. package/dist/storage/agents/repositories/agent-seed-history.js +128 -0
  311. package/dist/storage/agents/repositories/agents.js +200 -0
  312. package/dist/storage/agents/repositories/manager-profile-overlays.js +90 -0
  313. package/dist/storage/memory/repositories/artifacts.js +67 -0
  314. package/dist/storage/memory/repositories/observations.js +217 -0
  315. package/dist/storage/memory/repositories/sessions.js +125 -0
  316. package/dist/storage/memory/repositories/traces.js +78 -0
  317. package/dist/storage/memory/sqlite/database.js +228 -0
  318. package/dist/storage/memory/storage-paths.js +72 -0
  319. package/dist/storage/runs/repositories/runs.js +676 -0
  320. package/dist/storage/runs/repositories/task-scoped-command-grants.js +464 -0
  321. package/dist/storage/skills/repositories/skill-evaluation-requests.js +190 -0
  322. package/dist/storage/skills/repositories/skill-evaluation-scenarios.js +305 -0
  323. package/dist/storage/skills/repositories/skill-improvement-proposals.js +355 -0
  324. package/dist/storage/skills/repositories/skills.js +1084 -0
  325. package/docs/architecture.md +2 -2
  326. package/docs/glossary.md +1 -1
  327. package/docs/mcp.md +1 -1
  328. package/docs/module-boundaries.md +114 -0
  329. package/docs/prd.md +1 -1
  330. package/docs/project-health-audit-v1.10.x.md +1 -1
  331. package/docs/providers.md +2 -2
  332. package/docs/safety.md +3 -3
  333. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/apply-progress.md +122 -0
  334. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/archive-report.md +61 -0
  335. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/design.md +66 -0
  336. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/proposal.md +79 -0
  337. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/spec.md +67 -0
  338. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/tasks.md +63 -0
  339. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/verify-report.md +71 -0
  340. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/apply-progress.md +68 -0
  341. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/archive-report.md +61 -0
  342. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/design.md +43 -0
  343. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/proposal.md +61 -0
  344. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/spec.md +31 -0
  345. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/tasks.md +27 -0
  346. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/verify-report.md +58 -0
  347. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/apply-progress.md +65 -0
  348. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/archive-report.md +53 -0
  349. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/design.md +64 -0
  350. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/proposal.md +62 -0
  351. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/spec.md +51 -0
  352. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/tasks.md +50 -0
  353. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/verify-report.md +66 -0
  354. package/docs/storage.md +2 -2
  355. package/package.json +2 -2
  356. /package/dist/{mcp → adapters/claude/install}/claude-code-cli.js +0 -0
  357. /package/dist/{memory → storage/memory}/sqlite/migrations/001_initial.sql +0 -0
  358. /package/dist/{memory → storage/memory}/sqlite/migrations/002_observation_revisions.sql +0 -0
  359. /package/dist/{memory → storage/memory}/sqlite/migrations/003_agent_registry.sql +0 -0
  360. /package/dist/{memory → storage/memory}/sqlite/migrations/004_run_runtime.sql +0 -0
  361. /package/dist/{memory → storage/memory}/sqlite/migrations/005_run_approvals.sql +0 -0
  362. /package/dist/{memory → storage/memory}/sqlite/migrations/006_run_operation_attempts.sql +0 -0
  363. /package/dist/{memory → storage/memory}/sqlite/migrations/007_abandoned_operation_attempts.sql +0 -0
  364. /package/dist/{memory → storage/memory}/sqlite/migrations/008_run_execution_plan_events.sql +0 -0
  365. /package/dist/{memory → storage/memory}/sqlite/migrations/009_multiple_operation_attempts.sql +0 -0
  366. /package/dist/{memory → storage/memory}/sqlite/migrations/010_skill_registry.sql +0 -0
  367. /package/dist/{memory → storage/memory}/sqlite/migrations/011_skill_usage_resolution_outcomes.sql +0 -0
  368. /package/dist/{memory → storage/memory}/sqlite/migrations/012_skill_improvement_proposals.sql +0 -0
  369. /package/dist/{memory → storage/memory}/sqlite/migrations/013_skill_evaluation_scenarios.sql +0 -0
  370. /package/dist/{memory → storage/memory}/sqlite/migrations/014_manager_profile_overlays.sql +0 -0
  371. /package/dist/{memory → storage/memory}/sqlite/migrations/015_artifact_metadata.sql +0 -0
  372. /package/dist/{memory → storage/memory}/sqlite/migrations/016_agent_seed_history.sql +0 -0
  373. /package/dist/{memory → storage/memory}/sqlite/migrations/017_intent_signal_skill_targets.sql +0 -0
  374. /package/dist/{memory → storage/memory}/sqlite/migrations/018_skill_system_v2.sql +0 -0
  375. /package/dist/{memory → storage/memory}/sqlite/migrations/019_task_scoped_command_grants.sql +0 -0
@@ -0,0 +1,63 @@
1
+ # Tasks: Ambitious Structure Reorganization
2
+
3
+ ## Review Workload Forecast
4
+
5
+ | Field | Value |
6
+ |---|---|
7
+ | Estimated changed lines | 2,000–5,000+ across full migration |
8
+ | 400-line budget risk | High |
9
+ | Chained PRs recommended | Yes |
10
+ | Suggested split | Docs/facades → runs pilot → mcp pilot → cli/interfaces → remaining domains |
11
+ | Delivery strategy | auto-chain |
12
+ | Chain strategy | stacked-to-main |
13
+
14
+ Decision needed before apply: No
15
+ Chained PRs recommended: Yes
16
+ Chain strategy: stacked-to-main
17
+ 400-line budget risk: High
18
+
19
+ ### Suggested Work Units
20
+
21
+ | Unit | Goal | Likely PR | Notes |
22
+ |---|---|---|---|
23
+ | 1 | Boundary docs and compatibility rules | PR 1 | No code moves except optional facades |
24
+ | 2 | `runs` pilot | PR 2 | Split service/repository/lifecycle first |
25
+ | 3 | `mcp` pilot | PR 3 | Separate MCP interface from provider setup |
26
+ | 4 | CLI/interface migration | PR 4 | Move dispatch/render into `interfaces/cli` |
27
+ | 5 | Remaining domains | PR 5+ | `skills`, `sdd`, `agents`, `memory`, cleanup |
28
+
29
+ ## Phase 1: Boundary Foundation
30
+
31
+ - [x] 1.1 Create `docs/module-boundaries.md` with target layout, ownership rules, import rules, and migration map.
32
+ - [x] 1.2 Add compatibility policy for old barrels/facades and deprecation criteria.
33
+ - [x] 1.3 Identify public entrypoints that must remain stable: `src/mcp/index.ts`, `src/permissions/index.ts`, domain `index.ts` files.
34
+
35
+ ## Phase 2: Runs Pilot
36
+
37
+ - [x] 2.1 Create target folders for `domain/runs`, `application/runs`, and `storage/runs`.
38
+ - [x] 2.2 Move run application services behind compatibility facades while preserving public imports.
39
+ - [x] 2.3 Move run repositories under the storage layer while preserving old imports.
40
+ - [x] 2.4 Run targeted `test/runs` and typecheck.
41
+
42
+ ## Phase 3: MCP Pilot
43
+
44
+ - [x] 3.1 Create `interfaces/mcp` for schemas, stdio server, handlers, and validation boundaries.
45
+ - [x] 3.2 Move provider setup/status logic toward `application/provider-setup` and `adapters/opencode|claude`.
46
+ - [x] 3.3 Keep MCP tool names and `SUPPORTED_VGX_MCP_TOOL_NAMES` behavior unchanged.
47
+ - [x] 3.4 Run targeted `test/mcp` and Bun storage-backed MCP suites.
48
+
49
+ ## Phase 4: CLI and Remaining Domains
50
+
51
+ - [x] 4.1 Move CLI command parsing/rendering to `interfaces/cli` with services behind application modules.
52
+ - [x] 4.2 Migrate `skills`, `sdd`, `agents`, and `memory` into domain/application/storage slices.
53
+ - [x] 4.2a Migrate `skills` into domain/application/storage slices with old-path facades.
54
+ - [x] 4.2b Migrate `sdd` into domain/application/storage slices.
55
+ - [x] 4.2c Migrate `agents` into domain/application/storage slices.
56
+ - [x] 4.2d Migrate `memory` into domain/application/storage slices.
57
+ - [x] 4.3 Move provider-specific projections into `adapters/*`.
58
+
59
+ ## Phase 5: Verification and Cleanup
60
+
61
+ - [x] 5.1 Run `tsc --noEmit`, targeted tests, and Bun CI-equivalent suites.
62
+ - [x] 5.2 Remove duplicated logic from facades; keep only exports/delegation.
63
+ - [x] 5.3 Update architecture docs with final structure and remaining deprecated paths.
@@ -0,0 +1,71 @@
1
+ # Verify Report: Ambitious Structure Reorganization
2
+
3
+ ## Verdict
4
+
5
+ PASS.
6
+
7
+ ## Change
8
+
9
+ - Change: `ambitious-structure-reorganization`
10
+ - Mode: filesystem SDD artifacts under `docs/sdd/`
11
+ - Verification date: 2026-06-26
12
+ - Verified head before archive: `2e2fb85 docs(structure): finalize boundary cleanup (#363)`
13
+
14
+ ## Task Completeness
15
+
16
+ | Area | Status | Evidence |
17
+ |---|---|---|
18
+ | Phase 1 Boundary Foundation | PASS | `tasks.md` marks 1.1-1.3 complete. |
19
+ | Phase 2 Runs Pilot | PASS | `tasks.md` marks 2.1-2.4 complete. |
20
+ | Phase 3 MCP Pilot | PASS | `tasks.md` marks 3.1-3.4 complete. |
21
+ | Phase 4 CLI and Remaining Domains | PASS | `tasks.md` marks 4.1, 4.2a-d, and 4.3 complete. |
22
+ | Phase 5 Verification and Cleanup | PASS | `tasks.md` marks 5.1-5.3 complete. |
23
+
24
+ No unchecked implementation tasks remain in `tasks.md`.
25
+
26
+ ## Requirement Compliance Matrix
27
+
28
+ | Requirement | Scenarios | Status | Evidence |
29
+ |---|---|---|---|
30
+ | Layered Module Boundary Map | Target layout is documented; all major areas are mapped | PASS | `docs/module-boundaries.md` documents target layout, ownership rules, import rules, migration map, compatibility facade owners, and remaining deferred legacy paths. |
31
+ | Compatibility During Migration | Existing consumers keep compiling; deprecated paths are intentional | PASS | Old paths remain as facades for migrated areas; `npx tsc --noEmit` passed; facade audit documented in `docs/module-boundaries.md`. |
32
+ | Behavior Preservation | Refactor slice preserves behavior; behavior changes rejected/split | PASS | Full Node test suite passed; prior PR Bun CI checks passed on the merged slices; no product-contract changes recorded. |
33
+ | Reviewable Migration Slices | High-risk migration split; pilot validates pattern | PASS | Work landed through chained PRs #343, #345, #347, #349, #351, #353, #355, #357, #359, #361, and #363. |
34
+
35
+ ## Design Coherence
36
+
37
+ | Design Decision | Status | Evidence |
38
+ |---|---|---|
39
+ | Layer by architectural role | PASS | Canonical folders now exist under `src/domain`, `src/application`, `src/storage`, `src/adapters`, and `src/interfaces`. |
40
+ | Keep compatibility facades during migration | PASS | Migrated old paths remain compatibility facades; remaining non-facade provider-install paths are explicitly documented as future cleanup candidates. |
41
+ | Pilot before whole-repo migration | PASS | `runs` and `mcp` landed first, followed by CLI, provider setup, skills, SDD, agents, memory, adapters, and final cleanup. |
42
+
43
+ ## Runtime Evidence
44
+
45
+ | Command / Evidence | Result |
46
+ |---|---|
47
+ | `npx tsc --noEmit` | PASS |
48
+ | `npm run build` | PASS |
49
+ | `node scripts/run-node-tests.mjs` | PASS — 516 tests, 513 pass, 3 skipped, 0 fail |
50
+ | `git diff --check` | PASS |
51
+ | Local Bun verification | SKIPPED — local environment reports `bun-not-installed` |
52
+ | GitHub Bun Runtime CI for final cleanup | PASS — run `28272288089`, commit `2e2fb85`, workflow `Bun Runtime CI` |
53
+
54
+ ## Issues
55
+
56
+ ### Critical
57
+
58
+ None.
59
+
60
+ ### Warnings
61
+
62
+ - Local environment does not have `bun`, so local Bun commands could not run. Required GitHub Bun Runtime CI passed for the final merged cleanup commit and earlier structural slices.
63
+ - Some provider-install helpers under `src/mcp/client-install-*`, `src/mcp/claude-code-*`, and `src/mcp/opencode-*` remain non-facade deferred migration candidates rather than complete adapter extractions. This is documented as future cleanup and does not block this SDD because task 4.3 intentionally focused on renderer/projection adapters and shared sync contracts.
64
+
65
+ ### Suggestions
66
+
67
+ - Consider a follow-up SDD to migrate provider install helpers into `src/adapters/*` / `src/application/provider-setup/*` and then tighten facade removal criteria.
68
+
69
+ ## Final Verdict
70
+
71
+ PASS WITH WARNINGS. The implementation satisfies the SDD requirements, all persisted tasks are complete, runtime verification passes, and no critical issues block archive.
@@ -0,0 +1,68 @@
1
+ # Apply Progress: Legacy Facade Cleanup
2
+
3
+ ## Completed Tasks
4
+
5
+ - [x] 1.1 Created proposal, spec, design, and tasks.
6
+ - [x] 1.2 Generated static inventory of legacy facades and internal imports.
7
+ - [x] 1.3 Decided keep/delete set for provider-install paths.
8
+ - [x] 2.1 Updated source and tests away from `src/mcp/client-install-*`, `src/mcp/claude-code-*`, and `src/mcp/opencode-*` per-file facades.
9
+ - [x] 2.2 Deleted obsolete provider-install facade files.
10
+ - [x] 2.3 Ran targeted provider/MCP tests and typecheck.
11
+ - [x] 3.1 Updated source/tests away from obsolete `src/mcp/provider-*.ts` per-file facades where safe.
12
+ - [x] 3.2 Deleted unused provider setup facade files.
13
+ - [x] 3.3 Ran targeted provider/control-plane tests and typecheck.
14
+ - [x] 3.4 Removed unused nested MCP interface subfacades (`src/mcp/contracts/*`, `src/mcp/schemas/*`, `src/mcp/validation/*`, and `src/mcp/control-plane/handlers/*`) after confirming source/test/docs had no imports outside the files themselves.
15
+ - [x] 4.1 Updated `docs/module-boundaries.md` with the final retained and removed legacy surface.
16
+ - [x] 4.2 Ran final local typecheck, build, and full Node suite; PR CI will provide remote Bun verification.
17
+ - [x] 4.3 Added verify/archive reports and archived the SDD packet.
18
+
19
+ ## Audit Findings
20
+
21
+ | Path Set | Decision | Reason |
22
+ |---|---|---|
23
+ | `src/mcp/client-install-opencode*.ts` | Delete | One-line facades; source/tests now use `src/adapters/opencode/install/*` or `src/mcp/index.ts`. |
24
+ | `src/mcp/opencode-*.ts` | Delete | One-line facades; canonical OpenCode helpers are under `src/adapters/opencode/install/*`. |
25
+ | `src/mcp/client-install-claude-code*.ts` | Delete | One-line facades; source/tests now use `src/adapters/claude/install/*` or `src/mcp/index.ts`. |
26
+ | `src/mcp/claude-code-*.ts` | Delete | One-line facades; canonical Claude helpers are under `src/adapters/claude/install/*`. |
27
+ | `src/mcp/index.ts` | Keep | Intentional stable MCP barrel, now re-exporting canonical adapter/application modules directly. |
28
+ | `src/mcp/provider-change-plan.ts`, `provider-doctor.ts`, `provider-health-types.ts`, `provider-status.ts` | Delete | One-line application facades; source/tests now use `src/application/provider-setup/*` or `src/mcp/index.ts`. |
29
+ | Archived SDD references | Keep | Historical audit trail, not active import paths. |
30
+
31
+ ## Files Changed
32
+
33
+ | File | Action | What Changed |
34
+ |---|---|---|
35
+ | `src/mcp/client-install-*`, `src/mcp/opencode-*`, `src/mcp/claude-code-*` | Deleted | Removed obsolete one-line compatibility facades. |
36
+ | `src/mcp/index.ts` | Modified | Re-exports provider-install symbols directly from canonical adapter modules. |
37
+ | `src/mcp/doctor.ts` | Modified | Imports OpenCode install target resolver from canonical adapter module. |
38
+ | `src/mcp/provider-*.ts` | Deleted | Removed obsolete one-line application provider setup facades. |
39
+ | `src/mcp/contracts/*`, `src/mcp/schemas/*`, `src/mcp/validation/*`, `src/mcp/control-plane/handlers/*` | Deleted | Removed unused nested interface subfacades; top-level stable MCP facades remain. |
40
+ | `src/interfaces/*`, `src/adapters/*`, `test/mcp/*` | Modified | Provider setup imports now point to `src/application/provider-setup/*`. |
41
+ | `src/mcp/provider-canonical-agent-manifest.ts` | Modified | Uses provider health contracts from application provider setup. |
42
+ | `test/mcp/*`, `test/agents/agent-seed-service.test.ts` | Modified | Tests import canonical provider adapter helpers where they were asserting per-file legacy paths. |
43
+ | `docs/providers.md`, `AGENTS.md` | Modified | Documentation now references canonical adapter paths. |
44
+
45
+ ## Deviations from Design
46
+
47
+ None — `src/mcp/index.ts` remains as the intentional stable barrel, while narrow per-file provider-install facades were removed.
48
+
49
+ ## Issues Found
50
+
51
+ - `src/mcp/doctor.ts` still imported the deleted OpenCode contract facade; updated it to the adapter owner.
52
+ - `src/mcp/provider-canonical-agent-manifest.ts` still imported the deleted provider health facade; updated it to the application owner.
53
+ - Nested MCP interface facades were not imported by source/tests/docs; they were safe to delete while keeping top-level `src/mcp/schema.ts`, `validation.ts`, `control-plane.ts`, and `stdio-server.ts`.
54
+
55
+ ## Verification
56
+
57
+ - [x] `npx biome check --write --unsafe ...` for touched source/tests/docs
58
+ - [x] `npx tsc --noEmit`
59
+ - [x] `node scripts/run-node-tests.mjs test/mcp/client-install-opencode.test.ts test/mcp/client-install-opencode-contract.test.ts test/mcp/client-install-claude-code.test.ts test/mcp/provider-status.test.ts test/mcp/provider-doctor.test.ts test/agents/agent-seed-service.test.ts` — passed 516 tests, 513 pass, 3 skipped
60
+ - [x] `node scripts/run-node-tests.mjs test/mcp/provider-change-plan.test.ts test/mcp/provider-status.test.ts test/mcp/provider-doctor.test.ts test/mcp/control-plane.test.ts test/mcp/opencode-handoff-preview.test.ts` — passed 516 tests, 513 pass, 3 skipped
61
+ - [x] `npx tsc --noEmit` after nested facade deletion
62
+ - [x] Final `npx tsc --noEmit`
63
+ - [x] Final `npm run build`
64
+ - [x] Final `node scripts/run-node-tests.mjs` — passed 516 tests, 513 pass, 3 skipped
65
+
66
+ ## Remaining Tasks
67
+
68
+ No implementation tasks remain; SDD is ready for archive.
@@ -0,0 +1,61 @@
1
+ # Archive Report: Legacy Facade Cleanup
2
+
3
+ ## Archive Summary
4
+
5
+ - Change: `legacy-facade-cleanup`
6
+ - Archive date: 2026-06-26
7
+ - Source artifact mode: filesystem SDD artifacts under `docs/sdd/`
8
+ - Archived to: `docs/sdd/archive/2026-06-26-legacy-facade-cleanup/`
9
+ - Verification verdict: PASS WITH WARNINGS; no critical issues.
10
+
11
+ ## Source Artifacts
12
+
13
+ | Artifact | Status |
14
+ |---|---|
15
+ | `proposal.md` | Present |
16
+ | `spec.md` | Present |
17
+ | `design.md` | Present |
18
+ | `tasks.md` | Present; all tasks checked |
19
+ | `apply-progress.md` | Present |
20
+ | `verify-report.md` | Present |
21
+
22
+ ## Task Completion Gate
23
+
24
+ PASS. `tasks.md` has no unchecked implementation tasks.
25
+
26
+ ## Removed Legacy Surface
27
+
28
+ - `src/mcp/client-install-*`
29
+ - `src/mcp/opencode-*`
30
+ - `src/mcp/claude-code-*`
31
+ - `src/mcp/provider-*.ts`
32
+ - `src/mcp/contracts/*`
33
+ - `src/mcp/schemas/*`
34
+ - `src/mcp/validation/*`
35
+ - `src/mcp/control-plane/handlers/*`
36
+ - `src/mcp/control-plane/types.ts`
37
+
38
+ ## Retained Stable Surface
39
+
40
+ - `src/mcp/index.ts`
41
+ - `src/mcp/schema.ts`
42
+ - `src/mcp/validation.ts`
43
+ - `src/mcp/control-plane.ts`
44
+ - `src/mcp/stdio-server.ts`
45
+ - implementation MCP services: `doctor.ts`, `client-setup-preview.ts`, `control-plane-snapshot-service.ts`, `resume-context-gate-service.ts`, and `provider-canonical-agent-manifest.ts`
46
+
47
+ ## Source of Truth Updated
48
+
49
+ - `docs/module-boundaries.md` documents the final retained/removed MCP legacy surface.
50
+
51
+ ## Verification Evidence
52
+
53
+ - `npx tsc --noEmit` — PASS
54
+ - `npm run build` — PASS
55
+ - `node scripts/run-node-tests.mjs` — PASS, 516 tests / 513 pass / 3 skipped / 0 fail
56
+ - `git diff --check` — PASS
57
+ - GitHub Bun Runtime CI — required PR checks for the archive PR
58
+
59
+ ## SDD Cycle Complete
60
+
61
+ The change has been planned, implemented in stacked cleanup slices, verified, and archived.
@@ -0,0 +1,43 @@
1
+ # Design: Legacy Facade Cleanup
2
+
3
+ ## Technical Approach
4
+
5
+ Audit the legacy compatibility layer before deleting. Remove facades only after all source/test imports are migrated to canonical owners and verification passes.
6
+
7
+ ## Architecture Decisions
8
+
9
+ | Decision | Choice | Rationale |
10
+ |---|---|---|
11
+ | Keep `src/mcp/index.ts` initially | Retain as stable barrel | Many tests and consumers use it as a package-like MCP API surface. |
12
+ | Delete narrow per-file facades | Remove when imports migrate | These files add noise and duplicate path choices without runtime value. |
13
+ | Prefer canonical imports in source | `interfaces`, `application`, `adapters` | Keeps ownership aligned with `docs/module-boundaries.md`. |
14
+
15
+ ## File Changes
16
+
17
+ | File | Action | Description |
18
+ |------|--------|-------------|
19
+ | `src/mcp/client-install-*`, `src/mcp/claude-code-*`, `src/mcp/opencode-*` | Delete candidate | One-line provider-install facades after import migration. |
20
+ | `src/mcp/provider-*.ts` | Delete candidate | One-line application facades if direct imports can move. |
21
+ | `src/mcp/schema.ts`, `validation.ts`, `control-plane.ts`, `stdio-server.ts` | Keep candidate | Stable MCP edge facades unless proven unnecessary. |
22
+ | `test/*` | Modify | Update import paths away from deleted facades. |
23
+
24
+ ## Interfaces / Contracts
25
+
26
+ No product contract changes. The cleanup affects internal source import paths. If package-level API compatibility is required later, `src/mcp/index.ts` can continue to export canonical modules.
27
+
28
+ ## Testing Strategy
29
+
30
+ | Layer | What to Test | Approach |
31
+ |-------|-------------|----------|
32
+ | Static | Missing imports | `npx tsc --noEmit` |
33
+ | Package | Build output | `npm run build` |
34
+ | Regression | Existing behavior | `node scripts/run-node-tests.mjs` |
35
+ | Runtime matrix | Bun/package evidence | GitHub Actions checks |
36
+
37
+ ## Migration / Rollout
38
+
39
+ No data migration required. Implement as stacked cleanup PRs so each deletion set is independently revertible.
40
+
41
+ ## Open Questions
42
+
43
+ None.
@@ -0,0 +1,61 @@
1
+ # Proposal: Legacy Facade Cleanup
2
+
3
+ ## Intent
4
+
5
+ Remove obsolete compatibility facades and dead legacy paths after the structure/provider-install migrations. The goal is to reduce tool sprawl, avoid misleading public-looking paths, and keep canonical ownership obvious.
6
+
7
+ ## Scope
8
+
9
+ ### In Scope
10
+ - Audit compatibility facades under `src/mcp/*`, especially one-line re-export files created during migration.
11
+ - Update internal source and tests to canonical imports under `src/interfaces/*`, `src/application/*`, and `src/adapters/*`.
12
+ - Delete legacy files that are no longer used by source, tests, package runtime, or documented stable entrypoints.
13
+ - Preserve intentional barrels/entrypoints such as `src/mcp/index.ts` only where they remain useful.
14
+
15
+ ### Out of Scope
16
+ - Behavior changes to CLI or MCP tools.
17
+ - Removing runtime MCP transport/schema modules that are still canonical or package-facing.
18
+ - Large unrelated migrations outside the audited legacy surface.
19
+
20
+ ## Capabilities
21
+
22
+ ### New Capabilities
23
+ None.
24
+
25
+ ### Modified Capabilities
26
+ None — pure refactor/cleanup with behavior preservation.
27
+
28
+ ## Approach
29
+
30
+ Use static import search, typecheck, build, full Node tests, and GitHub Bun CI to prove removals are safe. Prefer small stacked PRs: planning, one or more deletion/update slices, final archive.
31
+
32
+ ## Affected Areas
33
+
34
+ | Area | Impact | Description |
35
+ |------|--------|-------------|
36
+ | `src/mcp/*` | Removed/Modified | Delete obsolete compatibility facades; keep intentional MCP edge modules. |
37
+ | `src/interfaces/*` | Modified | Replace old imports with canonical owners. |
38
+ | `src/application/*` | Modified | Replace old imports with canonical owners. |
39
+ | `test/*` | Modified | Stop testing obsolete import paths unless explicitly testing a kept barrel. |
40
+ | `docs/module-boundaries.md` | Modified | Document what remains and what was removed. |
41
+
42
+ ## Risks
43
+
44
+ | Risk | Likelihood | Mitigation |
45
+ |------|------------|------------|
46
+ | Removing an import path external consumers use | Medium | Keep stable barrels or document explicit breaking/internal cleanup. |
47
+ | Hidden runtime import missed by static search | Low | Run build, full Node suite, package evidence CI. |
48
+
49
+ ## Rollback Plan
50
+
51
+ Revert the cleanup PR; all changes are source/test/doc edits with no data migration.
52
+
53
+ ## Dependencies
54
+
55
+ - Existing SDD archives for structure reorganization and provider-install adapter boundary.
56
+
57
+ ## Success Criteria
58
+
59
+ - [ ] Obsolete one-line facades are deleted or explicitly justified.
60
+ - [ ] Source and tests use canonical imports for removed paths.
61
+ - [ ] `tsc`, build, full Node tests, and remote Bun CI pass.
@@ -0,0 +1,31 @@
1
+ # Spec: Legacy Facade Cleanup
2
+
3
+ ## Requirements
4
+
5
+ ### Requirement: Safe Legacy Removal
6
+
7
+ The system MUST remove only legacy files proven unused by current source, tests, docs, and package verification.
8
+
9
+ #### Scenario: Obsolete facade is unused
10
+
11
+ - GIVEN a one-line compatibility facade has a canonical replacement
12
+ - WHEN static import search finds no required internal consumers after migration
13
+ - THEN the facade MAY be deleted
14
+ - AND tests MUST import the canonical owner or an intentional stable barrel instead.
15
+
16
+ #### Scenario: Facade remains intentional
17
+
18
+ - GIVEN a compatibility path is still a stable public barrel or executable edge
19
+ - WHEN cleanup audits the file
20
+ - THEN the file MUST remain
21
+ - AND docs SHOULD explain why it is intentionally retained.
22
+
23
+ ### Requirement: Behavior Preservation
24
+
25
+ The system MUST preserve CLI and MCP runtime behavior while removing legacy import paths.
26
+
27
+ #### Scenario: Cleanup completes
28
+
29
+ - GIVEN legacy files were removed or imports changed
30
+ - WHEN typecheck, build, full Node tests, and remote Bun CI run
31
+ - THEN all checks MUST pass with no behavior-contract changes.
@@ -0,0 +1,27 @@
1
+ # Tasks: Legacy Facade Cleanup
2
+
3
+ ## Phase 1: Audit and Planning
4
+
5
+ - [x] 1.1 Create proposal, spec, design, and tasks.
6
+ - [x] 1.2 Generate static inventory of legacy facades and internal imports.
7
+ - [x] 1.3 Decide keep/delete set for each legacy path.
8
+
9
+ ## Phase 2: Provider Install Facade Removal
10
+
11
+ - [x] 2.1 Update source and tests away from `src/mcp/client-install-*`, `src/mcp/claude-code-*`, and `src/mcp/opencode-*` per-file facades.
12
+ - [x] 2.2 Delete obsolete provider-install facade files.
13
+ - [x] 2.3 Run targeted provider/MCP tests and typecheck.
14
+
15
+ ## Phase 3: Provider Setup Facade Removal
16
+
17
+ - [x] 3.1 Update source/tests away from obsolete `src/mcp/provider-*.ts` per-file facades where safe.
18
+ - [x] 3.2 Delete unused provider setup facade files or document retained ones.
19
+ - [x] 3.3 Run targeted provider/control-plane tests and typecheck.
20
+
21
+ - [x] 3.4 Remove unused nested MCP interface subfacades (`contracts/`, `schemas/`, `validation/`, `control-plane/handlers/`) after confirming no source/test/docs imports.
22
+
23
+ ## Phase 4: Final Verification and Archive
24
+
25
+ - [x] 4.1 Update module-boundary docs with final retained/removed legacy surface.
26
+ - [x] 4.2 Run typecheck, build, full Node tests, and remote Bun CI.
27
+ - [x] 4.3 Add apply-progress, verify-report, archive-report, and archive the SDD.
@@ -0,0 +1,58 @@
1
+ # Verify Report: Legacy Facade Cleanup
2
+
3
+ ## Verdict
4
+
5
+ PASS WITH WARNINGS.
6
+
7
+ ## Change
8
+
9
+ - Change: `legacy-facade-cleanup`
10
+ - Mode: filesystem SDD artifacts under `docs/sdd/`
11
+ - Verification date: 2026-06-26
12
+
13
+ ## Task Completeness
14
+
15
+ | Phase | Status | Evidence |
16
+ |---|---|---|
17
+ | Phase 1 Audit and Planning | PASS | Tasks 1.1-1.3 checked. |
18
+ | Phase 2 Provider Install Facade Removal | PASS | Tasks 2.1-2.3 checked. |
19
+ | Phase 3 Provider Setup / Nested Facade Removal | PASS | Tasks 3.1-3.4 checked. |
20
+ | Phase 4 Final Verification and Archive | PASS | Tasks 4.1-4.3 checked. |
21
+
22
+ No unchecked tasks remain.
23
+
24
+ ## Requirement Compliance Matrix
25
+
26
+ | Requirement | Status | Evidence |
27
+ |---|---|---|
28
+ | Safe Legacy Removal | PASS | Static searches found no active source/test/docs imports for deleted provider install, provider setup, or nested interface facade paths outside historical SDD/audit notes. |
29
+ | Intentional Facades Retained | PASS | Remaining one-line MCP facades are only top-level stable entrypoints: `src/mcp/schema.ts`, `validation.ts`, `control-plane.ts`, and `stdio-server.ts`; `src/mcp/index.ts` remains the stable barrel. |
30
+ | Behavior Preservation | PASS | Typecheck, build, full Node suite, and PR CI checks passed during each slice. |
31
+
32
+ ## Runtime Evidence
33
+
34
+ | Command / Evidence | Result |
35
+ |---|---|
36
+ | `npx tsc --noEmit` | PASS |
37
+ | `npm run build` | PASS |
38
+ | `node scripts/run-node-tests.mjs` | PASS — 516 tests, 513 pass, 3 skipped, 0 fail |
39
+ | `git diff --check` | PASS |
40
+ | Local Bun verification | SKIPPED — local environment reports `bun-not-installed`; GitHub Actions covers Bun Runtime matrix |
41
+
42
+ ## Issues
43
+
44
+ ### Critical
45
+
46
+ None.
47
+
48
+ ### Warnings
49
+
50
+ - Local environment does not have `bun`; required GitHub PR checks provide Bun Runtime and package evidence validation.
51
+
52
+ ### Suggestions
53
+
54
+ - Future cleanup can evaluate non-MCP compatibility barrels (`src/cli/*`, `src/runs/*`, etc.) with the same audit pattern, but they were outside this SDD scope.
55
+
56
+ ## Final Verdict
57
+
58
+ PASS WITH WARNINGS. The cleanup removed obsolete legacy MCP facades and retained only intentional stable top-level MCP entrypoints.
@@ -0,0 +1,65 @@
1
+ # Apply Progress: Provider Install Adapter Boundary
2
+
3
+ ## Completed Tasks
4
+
5
+ - [x] 1.1 Created `docs/sdd/provider-install-adapter-boundary/proposal.md`.
6
+ - [x] 1.2 Created `docs/sdd/provider-install-adapter-boundary/spec.md`.
7
+ - [x] 1.3 Created `docs/sdd/provider-install-adapter-boundary/design.md` and `tasks.md`.
8
+ - [x] 2.1 Moved `src/mcp/client-install-opencode*.ts` to `src/adapters/opencode/install/` with old-path facades.
9
+ - [x] 2.2 Moved OpenCode helper modules (`opencode-default-agent-config`, `opencode-handoff-preview`, `opencode-visibility`) to `src/adapters/opencode/install/` with old-path facades.
10
+ - [x] 2.3 Updated canonical OpenCode imports in application/setup/interface code and ran targeted provider tests.
11
+ - [x] 3.1 Moved `src/mcp/client-install-claude-code*.ts` to `src/adapters/claude/install/` with old-path facades.
12
+ - [x] 3.2 Moved Claude helper modules (`claude-code-agent-config`, CLI/config/memory/scope/user config helpers) to `src/adapters/claude/install/`.
13
+ - [x] 3.3 Updated canonical Claude imports in application/setup/interface code and ran targeted provider tests.
14
+ - [x] 4.1 Updated `docs/module-boundaries.md` so provider install helper paths are documented as compatibility facades.
15
+ - [x] 4.2 Ran final local typecheck, build, and full Node test suite; PR CI will provide remote Bun verification.
16
+ - [x] 4.3 Added verify/archive reports and archived the SDD packet.
17
+
18
+ ## Files Changed
19
+
20
+ | File | Action | What Changed |
21
+ |---|---|---|
22
+ | `src/adapters/opencode/install/client-install-opencode.ts` | Created | Canonical OpenCode MCP install apply implementation. |
23
+ | `src/adapters/opencode/install/client-install-opencode-contract.ts` | Created | Canonical OpenCode install planning/contracts. |
24
+ | `src/adapters/opencode/install/opencode-default-agent-config.ts` | Created | Canonical OpenCode default agent and permission helpers. |
25
+ | `src/adapters/opencode/install/opencode-handoff-preview.ts` | Created | Canonical OpenCode handoff preview service. |
26
+ | `src/adapters/opencode/install/opencode-visibility.ts` | Created | Canonical OpenCode visibility report helper. |
27
+ | `src/mcp/client-install-opencode*.ts`, `src/mcp/opencode-*.ts` | Modified | Compatibility facades re-export the canonical adapter modules. |
28
+ | `src/application/provider-setup/*`, `src/setup/*`, `src/interfaces/*` | Modified | OpenCode-specific imports point at the adapter boundary where practical. |
29
+ | `docs/sdd/provider-install-adapter-boundary/tasks.md` | Updated | Marks Phase 2 OpenCode, Phase 3 Claude, and Phase 4 cleanup tasks complete. |
30
+ | `docs/module-boundaries.md` | Updated | Documents provider-install MCP paths as compatibility facades with canonical adapter owners. |
31
+ | `src/adapters/claude/install/*` | Created | Canonical Claude Code install contract/apply, config, memory, scope, and CLI helper modules. |
32
+ | `src/mcp/client-install-claude-code*.ts`, `src/mcp/claude-code-*.ts` | Modified | Compatibility facades re-export the canonical Claude adapter modules. |
33
+
34
+ ## Deviations from Design
35
+
36
+ - OpenCode helpers were grouped under `src/adapters/opencode/install/` even when they are read-only preview/visibility helpers. This keeps the OpenCode install slice cohesive and can be split further later if needed.
37
+ - Tests continue to import old `src/mcp/*` paths where they exercise compatibility; application/setup/interface internals now prefer the canonical adapter path.
38
+
39
+ ## Issues Found
40
+
41
+ None.
42
+
43
+ ## Verification
44
+
45
+ - [x] `npx biome check --write --unsafe src/adapters/opencode/install src/mcp/client-install-opencode.ts src/mcp/client-install-opencode-contract.ts src/mcp/opencode-default-agent-config.ts src/mcp/opencode-handoff-preview.ts src/mcp/opencode-visibility.ts src/interfaces/cli/commands/mcp-dispatcher.ts src/interfaces/cli/commands/setup-dispatcher.ts src/interfaces/cli/cli-flags.ts src/interfaces/mcp/control-plane.ts src/interfaces/mcp/control-plane/types.ts src/setup/providers/opencode-setup-adapter.ts src/setup/setup-plan.ts src/application/provider-setup`
46
+ - [x] `npx tsc --noEmit`
47
+ - [x] `node scripts/run-node-tests.mjs test/mcp/client-install-opencode.test.ts test/mcp/client-install-opencode-contract.test.ts test/mcp/opencode-visibility.test.ts test/mcp/opencode-handoff-preview.test.ts test/mcp/provider-status.test.ts test/mcp/provider-doctor.test.ts test/mcp/opencode-agent-config-drift.test.ts test/agents/agent-seed-service.test.ts` — passed 516 tests, 513 pass, 3 skipped
48
+ - [x] `npx biome check --write --unsafe src/adapters/claude/install src/mcp/client-install-claude-code.ts src/mcp/client-install-claude-code-contract.ts src/mcp/claude-code-agent-config.ts src/mcp/claude-code-cli.ts src/mcp/claude-code-config.ts src/mcp/claude-code-project-memory.ts src/mcp/claude-code-scope.ts src/mcp/claude-code-user-config.ts src/mcp/claude-code-user-memory.ts src/interfaces/cli/commands/mcp-dispatcher.ts src/setup/providers/claude-setup-adapter.ts src/setup/setup-plan.ts src/application/provider-setup`
49
+ - [x] `npx tsc --noEmit` after Claude move
50
+ - [x] `node scripts/run-node-tests.mjs test/mcp/client-install-claude-code.test.ts test/setup/providers/claude-setup-adapter.test.ts test/mcp/provider-status.test.ts test/mcp/provider-doctor.test.ts` — passed 516 tests, 513 pass, 3 skipped
51
+ - [x] `npx tsc --noEmit` final verification
52
+ - [x] `npm run build` final verification
53
+ - [x] `node scripts/run-node-tests.mjs` final verification — passed 516 tests, 513 pass, 3 skipped
54
+ - [x] Bun CI-equivalent suites: to be verified by PR checks (`Bun verify` and `Bun package evidence` on ubuntu/macos/windows)
55
+
56
+ ## Remaining Tasks
57
+
58
+ No implementation tasks remain; ready for archive.
59
+
60
+ ## Workload / PR Boundary
61
+
62
+ - Mode: stacked PR slice
63
+ - Current work unit: Final cleanup and archive
64
+ - Boundary: final docs update, verification evidence, and archive; no behavior changes
65
+ - Estimated review budget impact: low
@@ -0,0 +1,53 @@
1
+ # Archive Report: Provider Install Adapter Boundary
2
+
3
+ ## Archive Summary
4
+
5
+ - Change: `provider-install-adapter-boundary`
6
+ - Archive date: 2026-06-26
7
+ - Source artifact mode: filesystem SDD artifacts under `docs/sdd/`
8
+ - Archived to: `docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/`
9
+ - Verification verdict: PASS WITH WARNINGS; no critical issues.
10
+
11
+ ## Source Artifacts
12
+
13
+ | Artifact | Status |
14
+ |---|---|
15
+ | `proposal.md` | Present |
16
+ | `spec.md` | Present |
17
+ | `design.md` | Present |
18
+ | `tasks.md` | Present; all tasks checked |
19
+ | `apply-progress.md` | Present |
20
+ | `verify-report.md` | Present |
21
+
22
+ ## Task Completion Gate
23
+
24
+ PASS. `tasks.md` has no unchecked implementation tasks:
25
+
26
+ - Phase 1 SDD planning complete
27
+ - Phase 2 OpenCode adapter slice complete
28
+ - Phase 3 Claude Code adapter slice complete
29
+ - Phase 4 cleanup and verification complete
30
+
31
+ ## Specs Synced
32
+
33
+ No `openspec/` tree exists in this repository. The source of truth for this change is the archived filesystem SDD packet plus updated current-state docs.
34
+
35
+ ## Source of Truth Updated
36
+
37
+ - `docs/module-boundaries.md` now documents provider install MCP paths as compatibility facades and names `src/adapters/opencode/install/*` and `src/adapters/claude/install/*` as canonical owners.
38
+
39
+ ## Verification Evidence
40
+
41
+ - `npx tsc --noEmit` — PASS
42
+ - `npm run build` — PASS
43
+ - `node scripts/run-node-tests.mjs` — PASS, 516 tests / 513 pass / 3 skipped / 0 fail
44
+ - `git diff --check` — PASS
45
+ - GitHub Bun Runtime CI — required PR checks for the archive PR
46
+
47
+ ## Remaining Follow-Up Candidates
48
+
49
+ - Optional future removal of MCP compatibility facades after public import consumers are migrated or the API decision is made.
50
+
51
+ ## SDD Cycle Complete
52
+
53
+ The change has been planned, implemented in provider slices, verified, and archived.