vgxness 1.20.5 → 1.20.7

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 (377) 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 -246
  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 +364 -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/interfaces/cli/bun-bin.js +46 -0
  147. package/dist/interfaces/cli/cli-flags.js +391 -0
  148. package/dist/interfaces/cli/cli-help.js +173 -0
  149. package/dist/interfaces/cli/cli-helpers.js +77 -0
  150. package/dist/interfaces/cli/cli-types.js +1 -0
  151. package/dist/interfaces/cli/commands/agent-skill-dispatcher.js +700 -0
  152. package/dist/interfaces/cli/commands/index.js +9 -0
  153. package/dist/interfaces/cli/commands/interactive-entrypoint-dispatcher.js +14 -0
  154. package/dist/interfaces/cli/commands/mcp-dispatcher.js +252 -0
  155. package/dist/interfaces/cli/commands/memory-sdd-dispatcher.js +367 -0
  156. package/dist/interfaces/cli/commands/run-permission-dispatcher.js +460 -0
  157. package/dist/interfaces/cli/commands/setup-dispatcher.js +496 -0
  158. package/dist/interfaces/cli/commands/status-dispatcher.js +130 -0
  159. package/dist/interfaces/cli/commands/verification-dispatcher.js +47 -0
  160. package/dist/interfaces/cli/commands/workflow-dispatcher.js +566 -0
  161. package/dist/interfaces/cli/dispatcher.js +247 -0
  162. package/dist/interfaces/cli/doctor-renderer.js +26 -0
  163. package/dist/interfaces/cli/home-tui-app.js +462 -0
  164. package/dist/interfaces/cli/home-tui-controller.js +341 -0
  165. package/dist/interfaces/cli/index.js +27 -0
  166. package/dist/interfaces/cli/mcp-start-path.js +21 -0
  167. package/dist/interfaces/cli/product-resume-renderer.js +32 -0
  168. package/dist/interfaces/cli/product-status-renderer.js +81 -0
  169. package/dist/interfaces/cli/sdd-renderer.js +247 -0
  170. package/dist/interfaces/cli/setup-plan-renderer.js +79 -0
  171. package/dist/interfaces/cli/setup-status-renderer.js +50 -0
  172. package/dist/interfaces/cli/setup-tui-app.js +135 -0
  173. package/dist/interfaces/cli/setup-tui-controller.js +89 -0
  174. package/dist/interfaces/cli/tui/focus-reducer.js +60 -0
  175. package/dist/interfaces/cli/tui/focus-types.js +10 -0
  176. package/dist/interfaces/cli/tui/ink/app-shell.js +16 -0
  177. package/dist/interfaces/cli/tui/ink/components.js +38 -0
  178. package/dist/interfaces/cli/tui/ink/help-overlay.js +6 -0
  179. package/dist/interfaces/cli/tui/ink/state-components.js +22 -0
  180. package/dist/interfaces/cli/tui/ink/theme.js +36 -0
  181. package/dist/interfaces/cli/tui/key-intents.js +33 -0
  182. package/dist/interfaces/cli/tui/keymap.js +20 -0
  183. package/dist/interfaces/cli/tui/navigation.js +10 -0
  184. package/dist/interfaces/cli/tui/screen-registry.js +43 -0
  185. package/dist/interfaces/cli/tui/terminal-capabilities.js +12 -0
  186. package/dist/interfaces/cli/tui/tui-types.js +1 -0
  187. package/dist/interfaces/cli/tui/visual/badges.js +19 -0
  188. package/dist/interfaces/cli/tui/visual/footer.js +27 -0
  189. package/dist/interfaces/cli/tui/visual/index.js +3 -0
  190. package/dist/interfaces/cli/tui/visual/viewport.js +11 -0
  191. package/dist/interfaces/cli/tui-render-helpers.js +200 -0
  192. package/dist/interfaces/cli/verification-plan-renderer.js +25 -0
  193. package/dist/interfaces/cli/verification-report-renderer.js +19 -0
  194. package/dist/interfaces/mcp/contracts/agents.js +1 -0
  195. package/dist/interfaces/mcp/contracts/context.js +1 -0
  196. package/dist/interfaces/mcp/contracts/governance.js +1 -0
  197. package/dist/interfaces/mcp/contracts/index.js +1 -0
  198. package/dist/interfaces/mcp/contracts/memory.js +1 -0
  199. package/dist/interfaces/mcp/contracts/providers.js +1 -0
  200. package/dist/interfaces/mcp/contracts/runs.js +1 -0
  201. package/dist/interfaces/mcp/contracts/sdd.js +1 -0
  202. package/dist/interfaces/mcp/contracts/sessions.js +1 -0
  203. package/dist/interfaces/mcp/contracts/skills.js +1 -0
  204. package/dist/interfaces/mcp/contracts/verification.js +1 -0
  205. package/dist/interfaces/mcp/control-plane/handlers/agents.js +38 -0
  206. package/dist/interfaces/mcp/control-plane/handlers/context.js +12 -0
  207. package/dist/interfaces/mcp/control-plane/handlers/memory.js +95 -0
  208. package/dist/interfaces/mcp/control-plane/handlers/providers.js +19 -0
  209. package/dist/interfaces/mcp/control-plane/handlers/runs.js +134 -0
  210. package/dist/interfaces/mcp/control-plane/handlers/sdd.js +225 -0
  211. package/dist/interfaces/mcp/control-plane/handlers/sessions.js +39 -0
  212. package/dist/interfaces/mcp/control-plane/handlers/skills.js +82 -0
  213. package/dist/interfaces/mcp/control-plane/handlers/verification.js +11 -0
  214. package/dist/interfaces/mcp/control-plane/types.js +1 -0
  215. package/dist/interfaces/mcp/control-plane.js +235 -0
  216. package/dist/interfaces/mcp/schema.js +174 -0
  217. package/dist/interfaces/mcp/schemas/common.js +121 -0
  218. package/dist/interfaces/mcp/schemas/inputs/agents.js +69 -0
  219. package/dist/interfaces/mcp/schemas/inputs/context.js +32 -0
  220. package/dist/interfaces/mcp/schemas/inputs/governance.js +23 -0
  221. package/dist/interfaces/mcp/schemas/inputs/index.js +10 -0
  222. package/dist/interfaces/mcp/schemas/inputs/memory.js +50 -0
  223. package/dist/interfaces/mcp/schemas/inputs/providers.js +35 -0
  224. package/dist/interfaces/mcp/schemas/inputs/runs.js +146 -0
  225. package/dist/interfaces/mcp/schemas/inputs/sdd.js +102 -0
  226. package/dist/interfaces/mcp/schemas/inputs/sessions.js +32 -0
  227. package/dist/interfaces/mcp/schemas/inputs/skills.js +231 -0
  228. package/dist/interfaces/mcp/schemas/inputs/verification.js +9 -0
  229. package/dist/interfaces/mcp/schemas/outputs/index.js +2 -0
  230. package/dist/interfaces/mcp/schemas/outputs/providers.js +28 -0
  231. package/dist/interfaces/mcp/schemas/outputs/sdd.js +166 -0
  232. package/dist/interfaces/mcp/stdio-server.js +116 -0
  233. package/dist/interfaces/mcp/validation/agents.js +189 -0
  234. package/dist/interfaces/mcp/validation/common.js +415 -0
  235. package/dist/interfaces/mcp/validation/governance.js +50 -0
  236. package/dist/interfaces/mcp/validation/memory.js +133 -0
  237. package/dist/interfaces/mcp/validation/providers.js +94 -0
  238. package/dist/interfaces/mcp/validation/runs.js +514 -0
  239. package/dist/interfaces/mcp/validation/sdd.js +247 -0
  240. package/dist/interfaces/mcp/validation/sessions.js +51 -0
  241. package/dist/interfaces/mcp/validation/skills.js +685 -0
  242. package/dist/interfaces/mcp/validation/verification.js +24 -0
  243. package/dist/interfaces/mcp/validation.js +149 -0
  244. package/dist/mcp/control-plane-snapshot-service.js +65 -2
  245. package/dist/mcp/control-plane.js +1 -646
  246. package/dist/mcp/doctor.js +1 -1
  247. package/dist/mcp/index.js +17 -17
  248. package/dist/mcp/schema.js +1 -1132
  249. package/dist/mcp/stdio-server.js +1 -116
  250. package/dist/mcp/validation.js +1 -2383
  251. package/dist/memory/active-work-preview.js +1 -75
  252. package/dist/memory/active-work-topics.js +1 -64
  253. package/dist/memory/agent-memory-capture-service.js +1 -497
  254. package/dist/memory/import/dry-run-planner.js +1 -58
  255. package/dist/memory/import/index.js +1 -3
  256. package/dist/memory/import/observation-writer.js +1 -226
  257. package/dist/memory/import/package.js +1 -179
  258. package/dist/memory/memory-capture-schema.js +1 -1
  259. package/dist/memory/memory-service.js +1 -201
  260. package/dist/memory/repositories/artifacts.js +1 -67
  261. package/dist/memory/repositories/observations.js +1 -217
  262. package/dist/memory/repositories/sessions.js +1 -125
  263. package/dist/memory/repositories/traces.js +1 -78
  264. package/dist/memory/schema.js +1 -1
  265. package/dist/memory/search.js +1 -11
  266. package/dist/memory/sqlite/database.js +1 -228
  267. package/dist/memory/storage-paths.js +1 -72
  268. package/dist/payload/context-budget-policy.js +10 -0
  269. package/dist/payload/context-budget-service.js +26 -0
  270. package/dist/payload/payload-diagnostics.js +50 -0
  271. package/dist/permissions/policy-evaluator.js +12 -5
  272. package/dist/runs/execution-planning.js +1 -178
  273. package/dist/runs/operation-execution.js +1 -1
  274. package/dist/runs/operation-retry.js +1 -129
  275. package/dist/runs/repositories/runs.js +1 -676
  276. package/dist/runs/repositories/task-scoped-command-grants.js +1 -462
  277. package/dist/runs/resume-after-approval-result.js +1 -84
  278. package/dist/runs/run-insights.js +1 -270
  279. package/dist/runs/run-service.js +1 -1470
  280. package/dist/runs/run-snapshot-export-service.js +1 -31
  281. package/dist/runs/sandbox-process-execution.js +1 -240
  282. package/dist/runs/sandbox-worktree-planning.js +1 -59
  283. package/dist/runs/schema.js +1 -5
  284. package/dist/runs/task-scoped-command-grant-service.js +1 -217
  285. package/dist/sdd/artifact-portability-service.js +1 -137
  286. package/dist/sdd/cockpit-read-model.js +1 -195
  287. package/dist/sdd/cockpit-types.js +1 -1
  288. package/dist/sdd/schema.js +1 -111
  289. package/dist/sdd/sdd-continuation-plan.js +1 -265
  290. package/dist/sdd/sdd-workflow-service.js +1 -822
  291. package/dist/setup/providers/claude-setup-adapter.js +11 -4
  292. package/dist/setup/providers/opencode-setup-adapter.js +10 -7
  293. package/dist/setup/setup-plan.js +20 -7
  294. package/dist/skills/boot-seed.js +1 -42
  295. package/dist/skills/personal-skills.js +1 -41
  296. package/dist/skills/repositories/skill-evaluation-requests.js +1 -190
  297. package/dist/skills/repositories/skill-evaluation-scenarios.js +1 -305
  298. package/dist/skills/repositories/skill-improvement-proposals.js +1 -355
  299. package/dist/skills/repositories/skills.js +1 -1077
  300. package/dist/skills/schema.js +1 -1
  301. package/dist/skills/skill-export-service.js +1 -34
  302. package/dist/skills/skill-index-service.js +1 -126
  303. package/dist/skills/skill-payload.js +1 -186
  304. package/dist/skills/skill-registry-service.js +1 -644
  305. package/dist/skills/skill-resolver.js +1 -368
  306. package/dist/skills/skill-seed-service.js +1 -242
  307. package/dist/skills/skill-status-service.js +1 -147
  308. package/dist/storage/agents/repositories/agent-seed-history.js +128 -0
  309. package/dist/storage/agents/repositories/agents.js +200 -0
  310. package/dist/storage/agents/repositories/manager-profile-overlays.js +90 -0
  311. package/dist/storage/memory/repositories/artifacts.js +67 -0
  312. package/dist/storage/memory/repositories/observations.js +217 -0
  313. package/dist/storage/memory/repositories/sessions.js +125 -0
  314. package/dist/storage/memory/repositories/traces.js +78 -0
  315. package/dist/storage/memory/sqlite/database.js +228 -0
  316. package/dist/storage/memory/storage-paths.js +72 -0
  317. package/dist/storage/runs/repositories/runs.js +676 -0
  318. package/dist/storage/runs/repositories/task-scoped-command-grants.js +464 -0
  319. package/dist/storage/skills/repositories/skill-evaluation-requests.js +190 -0
  320. package/dist/storage/skills/repositories/skill-evaluation-scenarios.js +305 -0
  321. package/dist/storage/skills/repositories/skill-improvement-proposals.js +355 -0
  322. package/dist/storage/skills/repositories/skills.js +1084 -0
  323. package/docs/architecture.md +2 -2
  324. package/docs/glossary.md +1 -1
  325. package/docs/mcp.md +1 -1
  326. package/docs/module-boundaries.md +114 -0
  327. package/docs/prd.md +1 -1
  328. package/docs/project-health-audit-v1.10.x.md +1 -1
  329. package/docs/providers.md +2 -2
  330. package/docs/safety.md +3 -3
  331. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/apply-progress.md +122 -0
  332. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/archive-report.md +61 -0
  333. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/design.md +66 -0
  334. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/proposal.md +79 -0
  335. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/spec.md +67 -0
  336. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/tasks.md +63 -0
  337. package/docs/sdd/archive/2026-06-26-ambitious-structure-reorganization/verify-report.md +71 -0
  338. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/apply-progress.md +68 -0
  339. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/archive-report.md +61 -0
  340. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/design.md +43 -0
  341. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/proposal.md +61 -0
  342. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/spec.md +31 -0
  343. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/tasks.md +27 -0
  344. package/docs/sdd/archive/2026-06-26-legacy-facade-cleanup/verify-report.md +58 -0
  345. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/apply-progress.md +65 -0
  346. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/archive-report.md +53 -0
  347. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/design.md +64 -0
  348. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/proposal.md +62 -0
  349. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/spec.md +51 -0
  350. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/tasks.md +50 -0
  351. package/docs/sdd/archive/2026-06-26-provider-install-adapter-boundary/verify-report.md +66 -0
  352. package/docs/sdd/manager-prompt-autonomy/apply-progress.md +28 -0
  353. package/docs/sdd/manager-prompt-autonomy/design.md +63 -0
  354. package/docs/sdd/manager-prompt-autonomy/proposal.md +57 -0
  355. package/docs/sdd/manager-prompt-autonomy/tasks.md +19 -0
  356. package/docs/storage.md +2 -2
  357. package/package.json +2 -2
  358. /package/dist/{mcp → adapters/claude/install}/claude-code-cli.js +0 -0
  359. /package/dist/{memory → storage/memory}/sqlite/migrations/001_initial.sql +0 -0
  360. /package/dist/{memory → storage/memory}/sqlite/migrations/002_observation_revisions.sql +0 -0
  361. /package/dist/{memory → storage/memory}/sqlite/migrations/003_agent_registry.sql +0 -0
  362. /package/dist/{memory → storage/memory}/sqlite/migrations/004_run_runtime.sql +0 -0
  363. /package/dist/{memory → storage/memory}/sqlite/migrations/005_run_approvals.sql +0 -0
  364. /package/dist/{memory → storage/memory}/sqlite/migrations/006_run_operation_attempts.sql +0 -0
  365. /package/dist/{memory → storage/memory}/sqlite/migrations/007_abandoned_operation_attempts.sql +0 -0
  366. /package/dist/{memory → storage/memory}/sqlite/migrations/008_run_execution_plan_events.sql +0 -0
  367. /package/dist/{memory → storage/memory}/sqlite/migrations/009_multiple_operation_attempts.sql +0 -0
  368. /package/dist/{memory → storage/memory}/sqlite/migrations/010_skill_registry.sql +0 -0
  369. /package/dist/{memory → storage/memory}/sqlite/migrations/011_skill_usage_resolution_outcomes.sql +0 -0
  370. /package/dist/{memory → storage/memory}/sqlite/migrations/012_skill_improvement_proposals.sql +0 -0
  371. /package/dist/{memory → storage/memory}/sqlite/migrations/013_skill_evaluation_scenarios.sql +0 -0
  372. /package/dist/{memory → storage/memory}/sqlite/migrations/014_manager_profile_overlays.sql +0 -0
  373. /package/dist/{memory → storage/memory}/sqlite/migrations/015_artifact_metadata.sql +0 -0
  374. /package/dist/{memory → storage/memory}/sqlite/migrations/016_agent_seed_history.sql +0 -0
  375. /package/dist/{memory → storage/memory}/sqlite/migrations/017_intent_signal_skill_targets.sql +0 -0
  376. /package/dist/{memory → storage/memory}/sqlite/migrations/018_skill_system_v2.sql +0 -0
  377. /package/dist/{memory → storage/memory}/sqlite/migrations/019_task_scoped_command_grants.sql +0 -0
@@ -0,0 +1,64 @@
1
+ # Design: Provider Install Adapter Boundary
2
+
3
+ ## Technical Approach
4
+
5
+ Perform a structural-only provider install migration. Move implementation modules out of `src/mcp` while keeping old files as facades. Prefer provider-owned canonical folders under `src/adapters/opencode/install/` and `src/adapters/claude/install/`; use application-provider-setup only for provider-neutral orchestration if needed.
6
+
7
+ ## Architecture Decisions
8
+
9
+ ### Decision: Provider install implementation belongs under adapters
10
+
11
+ **Choice**: Canonical provider install/config modules live in `src/adapters/<provider>/install/`.
12
+ **Alternatives considered**: Put everything in `src/application/provider-setup`.
13
+ **Rationale**: Config file formats, CLI invocation, managed-memory formats, and provider-specific merge/write behavior are adapter details. Application services should orchestrate neutral workflows, not own provider formats.
14
+
15
+ ### Decision: Keep MCP import facades
16
+
17
+ **Choice**: `src/mcp/client-install-*`, `src/mcp/claude-code-*`, and `src/mcp/opencode-*` remain re-export facades during this change.
18
+ **Alternatives considered**: Rewrite all consumers directly to adapters immediately.
19
+ **Rationale**: Compatibility keeps the move low risk and independently revertible.
20
+
21
+ ### Decision: Split by provider
22
+
23
+ **Choice**: OpenCode and Claude Code moves are separate apply slices.
24
+ **Alternatives considered**: Single full move.
25
+ **Rationale**: Current line counts are high (`client-install-opencode.ts` alone is >600 lines). Provider slicing keeps review diffs smaller and narrows regressions.
26
+
27
+ ## Data Flow
28
+
29
+ ```text
30
+ interfaces/mcp tool handler ──→ application/provider-setup boundary ──→ adapters/<provider>/install
31
+ ▲ │
32
+ └──────────── old src/mcp/* compatibility facades ───────────────────┘
33
+ ```
34
+
35
+ ## File Changes
36
+
37
+ | File | Action | Description |
38
+ |---|---|---|
39
+ | `src/adapters/opencode/install/*` | Create | Canonical OpenCode install contract, apply, visibility/default config helpers. |
40
+ | `src/adapters/claude/install/*` | Create | Canonical Claude install contract, apply, config, memory, scope, CLI helpers. |
41
+ | `src/mcp/client-install-*` | Modify | Re-export canonical adapter modules. |
42
+ | `src/mcp/claude-code-*`, `src/mcp/opencode-*` | Modify | Re-export canonical adapter modules. |
43
+ | `test/mcp/*` | Modify | Update direct implementation-path assertions/imports where needed. |
44
+ | `docs/module-boundaries.md` | Modify | Replace deferred-path note with completed canonical ownership. |
45
+
46
+ ## Interfaces / Contracts
47
+
48
+ No product contract changes. Existing exported TypeScript types and functions remain available from old paths through facades.
49
+
50
+ ## Testing Strategy
51
+
52
+ | Layer | What to Test | Approach |
53
+ |---|---|---|
54
+ | Type contracts | Old and new imports | `npx tsc --noEmit` |
55
+ | Unit/contract | Provider install planning/apply | Existing `test/mcp/*install*` suites |
56
+ | Runtime/package | Bun/provider package evidence | GitHub `Bun verify` and package evidence checks |
57
+
58
+ ## Migration / Rollout
59
+
60
+ No data migration required. Roll out in stacked PRs: SDD docs, OpenCode move, Claude Code move, cleanup/docs verification.
61
+
62
+ ## Open Questions
63
+
64
+ None.
@@ -0,0 +1,62 @@
1
+ # Proposal: Provider Install Adapter Boundary
2
+
3
+ ## Intent
4
+
5
+ Move provider-install implementation details out of the MCP edge so the physical structure matches the post-reorganization boundary rules. MCP should expose tools and delegate; provider config formats, filesystem merge/write policies, and provider-specific CLI integration should live in adapters or provider-setup application services.
6
+
7
+ ## Scope
8
+
9
+ ### In Scope
10
+ - Move OpenCode install contract/apply helpers from `src/mcp/client-install-opencode*` to canonical adapter/application-owned modules.
11
+ - Move Claude Code install contract/apply helpers from `src/mcp/client-install-claude-code*` and `src/mcp/claude-code-*` to canonical adapter/application-owned modules.
12
+ - Keep old `src/mcp/*` imports as compatibility facades.
13
+ - Update tests/docs for canonical paths.
14
+
15
+ ### Out of Scope
16
+ - Changing MCP tool names or provider install behavior.
17
+ - Changing provider config schemas, backup semantics, or safety gates.
18
+ - Removing old import paths without a compatibility bridge.
19
+
20
+ ## Capabilities
21
+
22
+ ### New Capabilities
23
+ None.
24
+
25
+ ### Modified Capabilities
26
+ None — this is an internal structural refactor.
27
+
28
+ ## Approach
29
+
30
+ Split by provider in small reviewable slices: OpenCode first, then Claude Code. For each provider, move implementation modules under `src/adapters/<provider>/install/` or shared provider setup services, leave `src/mcp/*` as re-export facades, run typecheck and targeted MCP/provider tests.
31
+
32
+ ## Affected Areas
33
+
34
+ | Area | Impact | Description |
35
+ |---|---|---|
36
+ | `src/mcp/client-install-*` | Modified | Become compatibility facades. |
37
+ | `src/mcp/claude-code-*`, `src/mcp/opencode-*` | Modified | Move provider-specific implementation to adapter boundary. |
38
+ | `src/adapters/opencode/*`, `src/adapters/claude/*` | Modified | Own provider install/render/config details. |
39
+ | `test/mcp/*` | Modified | Prefer canonical adapter imports where tests inspect internals. |
40
+ | `docs/module-boundaries.md` | Modified | Remove or update deferred-path note. |
41
+
42
+ ## Risks
43
+
44
+ | Risk | Likelihood | Mitigation |
45
+ |---|---:|---|
46
+ | Large import churn | Medium | Split into OpenCode and Claude slices. |
47
+ | Behavior drift in provider install | Medium | Keep facades, run existing install contract/apply tests and CI. |
48
+ | Circular dependencies | Medium | Keep shared provider-neutral contracts outside provider adapters. |
49
+
50
+ ## Rollback Plan
51
+
52
+ Each provider slice is independently revertible. If CI fails, revert the provider-specific move while keeping SDD artifacts.
53
+
54
+ ## Dependencies
55
+
56
+ - Archived `ambitious-structure-reorganization` SDD and its final module-boundary docs.
57
+
58
+ ## Success Criteria
59
+
60
+ - [ ] MCP provider-install files are implementation-free facades.
61
+ - [ ] Provider-specific install/config code has canonical owners outside `src/mcp`.
62
+ - [ ] Existing install behavior and tool contracts continue passing tests and CI.
@@ -0,0 +1,51 @@
1
+ # Spec: Provider Install Adapter Boundary
2
+
3
+ ## Requirements
4
+
5
+ ### Requirement: MCP Install Boundary
6
+
7
+ MCP provider-install modules MUST not own provider-specific install implementation after the migration.
8
+
9
+ #### Scenario: MCP old paths remain compatible
10
+
11
+ - GIVEN an existing import from `src/mcp/client-install-opencode.ts` or `src/mcp/client-install-claude-code.ts`
12
+ - WHEN TypeScript typecheck runs
13
+ - THEN the import still compiles through a compatibility facade
14
+
15
+ #### Scenario: MCP does not own provider install behavior
16
+
17
+ - GIVEN a maintainer inspects provider-install implementation
18
+ - WHEN they follow the facade export
19
+ - THEN OpenCode and Claude Code install/config logic resolves to canonical adapter or application-provider-setup modules
20
+
21
+ ### Requirement: Provider Install Behavior Preservation
22
+
23
+ The migration MUST preserve provider install semantics, safety gates, config merge rules, backup behavior, and rendered output.
24
+
25
+ #### Scenario: OpenCode install contracts remain equivalent
26
+
27
+ - GIVEN OpenCode MCP install contract tests
28
+ - WHEN the OpenCode implementation is moved
29
+ - THEN the existing contract tests pass without changing expected behavior
30
+
31
+ #### Scenario: Claude Code install contracts remain equivalent
32
+
33
+ - GIVEN Claude Code MCP install contract and apply tests
34
+ - WHEN the Claude implementation is moved
35
+ - THEN the existing tests pass without changing expected behavior
36
+
37
+ ### Requirement: Reviewable Provider Slices
38
+
39
+ The migration SHOULD be split into provider-focused slices when the total diff would exceed the normal review budget.
40
+
41
+ #### Scenario: OpenCode can land independently
42
+
43
+ - GIVEN OpenCode install files are moved
44
+ - WHEN typecheck and OpenCode-targeted tests pass
45
+ - THEN that slice can be reviewed and merged without waiting for Claude Code
46
+
47
+ #### Scenario: Claude can land independently
48
+
49
+ - GIVEN Claude Code install files are moved
50
+ - WHEN typecheck and Claude-targeted tests pass
51
+ - THEN that slice can be reviewed and merged after or apart from OpenCode
@@ -0,0 +1,50 @@
1
+ # Tasks: Provider Install Adapter Boundary
2
+
3
+ ## Review Workload Forecast
4
+
5
+ | Field | Value |
6
+ |---|---|
7
+ | Estimated changed lines | 900–1,600 across full migration |
8
+ | 400-line budget risk | High |
9
+ | Chained PRs recommended | Yes |
10
+ | Suggested split | SDD docs → OpenCode adapter move → Claude adapter move → cleanup/verify |
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 | SDD planning packet | PR 1 | Docs only, base `main`. |
24
+ | 2 | OpenCode install adapter move | PR 2 | Move OpenCode install/config helpers; keep MCP facades. |
25
+ | 3 | Claude Code install adapter move | PR 3 | Move Claude install/config/memory/CLI helpers; keep MCP facades. |
26
+ | 4 | Final docs/verify cleanup | PR 4 | Update boundary docs and archive SDD if complete. |
27
+
28
+ ## Phase 1: SDD Planning
29
+
30
+ - [x] 1.1 Create `docs/sdd/provider-install-adapter-boundary/proposal.md`.
31
+ - [x] 1.2 Create `docs/sdd/provider-install-adapter-boundary/spec.md`.
32
+ - [x] 1.3 Create `docs/sdd/provider-install-adapter-boundary/design.md` and this `tasks.md`.
33
+
34
+ ## Phase 2: OpenCode Adapter Slice
35
+
36
+ - [x] 2.1 Move `src/mcp/client-install-opencode*.ts` to `src/adapters/opencode/install/` with old-path facades.
37
+ - [x] 2.2 Move `src/mcp/opencode-*.ts` helpers to `src/adapters/opencode/install/` or a better OpenCode adapter subfolder.
38
+ - [x] 2.3 Update OpenCode-focused tests/import assertions and run targeted MCP provider tests.
39
+
40
+ ## Phase 3: Claude Code Adapter Slice
41
+
42
+ - [x] 3.1 Move `src/mcp/client-install-claude-code*.ts` to `src/adapters/claude/install/` with old-path facades.
43
+ - [x] 3.2 Move `src/mcp/claude-code-*.ts` helpers to `src/adapters/claude/install/`.
44
+ - [x] 3.3 Update Claude-focused tests/import assertions and run targeted MCP provider tests.
45
+
46
+ ## Phase 4: Cleanup and Verification
47
+
48
+ - [x] 4.1 Update `docs/module-boundaries.md` to remove the deferred-path warning or narrow remaining exceptions.
49
+ - [x] 4.2 Run `npx tsc --noEmit`, targeted install tests, full Node tests, and remote Bun CI.
50
+ - [x] 4.3 Add apply-progress, verify report, and archive report when implementation completes.
@@ -0,0 +1,66 @@
1
+ # Verify Report: Provider Install Adapter Boundary
2
+
3
+ ## Verdict
4
+
5
+ PASS WITH WARNINGS.
6
+
7
+ ## Change
8
+
9
+ - Change: `provider-install-adapter-boundary`
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 SDD Planning | PASS | `tasks.md` marks 1.1-1.3 complete. |
18
+ | Phase 2 OpenCode Adapter Slice | PASS | `tasks.md` marks 2.1-2.3 complete. |
19
+ | Phase 3 Claude Code Adapter Slice | PASS | `tasks.md` marks 3.1-3.3 complete. |
20
+ | Phase 4 Cleanup and Verification | PASS | `tasks.md` marks 4.1-4.3 complete. |
21
+
22
+ No unchecked implementation tasks remain.
23
+
24
+ ## Requirement Compliance Matrix
25
+
26
+ | Requirement | Status | Evidence |
27
+ |---|---|---|
28
+ | MCP Install Boundary | PASS | `src/mcp/client-install-*`, `src/mcp/claude-code-*`, and `src/mcp/opencode-*` are compatibility facades; canonical implementation lives under `src/adapters/{opencode,claude}/install/*`. |
29
+ | Provider Install Behavior Preservation | PASS | Targeted OpenCode/Claude/provider tests passed; full Node suite passed; no product-contract changes. |
30
+ | Reviewable Provider Slices | PASS | SDD docs, OpenCode, Claude, and cleanup/archive landed as separate stacked slices. |
31
+
32
+ ## Design Coherence
33
+
34
+ | Decision | Status | Evidence |
35
+ |---|---|---|
36
+ | Provider install implementation belongs under adapters | PASS | OpenCode and Claude Code install/config/memory helpers now live under `src/adapters/*/install/`. |
37
+ | Keep MCP import facades | PASS | Old MCP files re-export canonical adapter modules. |
38
+ | Split by provider | PASS | OpenCode and Claude moved in separate PR slices. |
39
+
40
+ ## Runtime Evidence
41
+
42
+ | Command / Evidence | Result |
43
+ |---|---|
44
+ | `npx tsc --noEmit` | PASS |
45
+ | `npm run build` | PASS |
46
+ | `node scripts/run-node-tests.mjs` | PASS — 516 tests, 513 pass, 3 skipped, 0 fail |
47
+ | `git diff --check` | PASS |
48
+ | Local Bun verification | SKIPPED — local environment reports `bun-not-installed` |
49
+
50
+ ## Issues
51
+
52
+ ### Critical
53
+
54
+ None.
55
+
56
+ ### Warnings
57
+
58
+ - Local environment does not have `bun`; required GitHub PR checks provide Bun Runtime CI validation.
59
+
60
+ ### Suggestions
61
+
62
+ - After downstream imports stabilize, consider a future cleanup to remove old MCP compatibility facades if they are no longer part of the public API.
63
+
64
+ ## Final Verdict
65
+
66
+ PASS WITH WARNINGS. The implementation satisfies the SDD requirements, all tasks are complete, and no critical issues block archive.
@@ -0,0 +1,28 @@
1
+ # Apply Progress: Manager Prompt Autonomy
2
+
3
+ ## Completed Tasks
4
+
5
+ - [x] 1.1 Bump canonical prompt contract version to v19.
6
+ - [x] 1.2 Add compact OpenCode instruction-layering guidance.
7
+ - [x] 1.3 Add exact user-request / immediate confirmation guidance for `explicitRequest` and duplicate-confirmation avoidance.
8
+ - [x] 2.1 Regenerate `seeds/agents/agent-seed-v1.json` from canonical projection.
9
+ - [x] 2.2 Update OpenCode config drift assertions for v19 and prompt anchors.
10
+ - [x] 2.3 Add permission evaluator coverage for user-requested test-run and git push.
11
+ - [x] 3.1 Run focused tests and typecheck.
12
+ - [x] 3.2 Reinstall local OpenCode config from the source checkout for smoke verification.
13
+
14
+ ## Verification Evidence
15
+
16
+ - `npx biome check --write --unsafe src/domain/agents/canonical-agent-manifest.ts test/mcp/opencode-agent-config-drift.test.ts test/permissions/policy-evaluator.test.ts` passed.
17
+ - `node --import tsx --test test/mcp/opencode-agent-config-drift.test.ts test/permissions/policy-evaluator.test.ts` passed: 29/29.
18
+ - `npx tsc --noEmit` passed.
19
+ - `bun test test/agents/agent-seed-service.test.ts` passed: 10/10.
20
+ - `npm run build` passed.
21
+ - Local checkout runtime evidence showed `promptContractVersion: 19` and entrypoint `dist/cli/bun-bin.js`.
22
+ - `vgxness mcp install opencode --yes --reinstall --json` installed user OpenCode config.
23
+ - `vgxness mcp doctor opencode --scope user --json` reported ready.
24
+ - Config smoke: default agent `vgxness-manager`, prompt v19, instruction layering present, hazlo/dale autonomy present, duplicate-confirmation avoidance present, no missing referenced `vgxness_*` permissions, manager bash `deny`, top-level bash `ask`.
25
+
26
+ ## Remaining Tasks
27
+
28
+ - [ ] 3.3 Create PR, watch CI, and merge if clean.
@@ -0,0 +1,63 @@
1
+ # Design: Manager Prompt Autonomy
2
+
3
+ ## Technical Approach
4
+
5
+ Make the smallest durable change in canonical sources: update the manager prompt contract, regenerate the seed snapshot, and pin behavior with prompt-drift and permission tests. This keeps generated OpenCode config as an output, not a hand-edited source.
6
+
7
+ ## Architecture Decisions
8
+
9
+ ### Decision: Prompt owns conversational friction guidance
10
+
11
+ **Choice**: Teach the manager how to interpret direct user intent and immediate “hazlo”/“dale” confirmations.
12
+ **Alternatives considered**: Add broad automatic policy allows; remove preflight; edit OpenCode config permissions.
13
+ **Rationale**: Preflight is still useful for audit and hard stops. The friction came from the manager treating a user confirmation as expanded/ambiguous rather than binding it to the concrete operations it just listed.
14
+
15
+ ### Decision: Policy remains exact-match based
16
+
17
+ **Choice**: Keep `evaluateExplicitRequestAuthorization` strict; add tests proving exact explicit requests allow test and push operations.
18
+ **Alternatives considered**: Loosen parser expansion rules globally.
19
+ **Rationale**: Loosening global policy would risk over-authorizing vague requests. The correct behavior is to generate exact `explicitRequest` context when the conversation is exact.
20
+
21
+ ### Decision: OpenCode instruction layering is documented inside the manager prompt
22
+
23
+ **Choice**: Add a compact `## Instruction layering` section.
24
+ **Rationale**: OpenCode replaces provider base prompts when `agent.prompt` exists, then appends env/instructions/MCP/skills. The manager must be self-aware about this layered context.
25
+
26
+ ## Data Flow
27
+
28
+ ```text
29
+ User asks concrete action
30
+ -> manager records exact explicitRequest
31
+ -> vgxness_run_preflight evaluates policy/risk
32
+ -> authorizationMode explicit-request => execute without re-asking
33
+ -> approval-needed/blocked/ambiguous => stop or ask focused question
34
+ ```
35
+
36
+ ## File Changes
37
+
38
+ | File | Action | Description |
39
+ |------|--------|-------------|
40
+ | `src/domain/agents/canonical-agent-manifest.ts` | Modify | Prompt contract v19, layering and exact-request guidance. |
41
+ | `seeds/agents/agent-seed-v1.json` | Regenerate | Seed snapshot aligned with canonical projection. |
42
+ | `test/mcp/opencode-agent-config-drift.test.ts` | Modify | Version/anchor/budget assertions. |
43
+ | `test/permissions/policy-evaluator.test.ts` | Modify | Tests for explicit user-requested test-run/git push. |
44
+
45
+ ## Interfaces / Contracts
46
+
47
+ No public API shape changes. Existing `explicitRequest` schema remains the contract.
48
+
49
+ ## Testing Strategy
50
+
51
+ | Layer | What to Test | Approach |
52
+ |-------|-------------|----------|
53
+ | Unit | Exact explicit requests authorize test-run and git push | `test/permissions/policy-evaluator.test.ts` |
54
+ | Projection | OpenCode prompt contains layering/autonomy anchors and seed matches canonical projection | `test/mcp/opencode-agent-config-drift.test.ts`, `test/agents/agent-seed-service.test.ts` |
55
+ | Type/build | No TS regressions | `npx tsc --noEmit` |
56
+
57
+ ## Migration / Rollout
58
+
59
+ No data migration. Reinstall OpenCode config after release/local link to push the new prompt into `~/.config/opencode/opencode.json`.
60
+
61
+ ## Open Questions
62
+
63
+ None.
@@ -0,0 +1,57 @@
1
+ # Proposal: Manager Prompt Autonomy
2
+
3
+ ## Intent
4
+
5
+ Reduce friction when users explicitly ask VGXNESS/OpenCode to run concrete actions. The manager should recognize direct user requests and immediate confirmations such as “hazlo”/“dale” as authorization for the exact listed operations, while preserving hard stops for secrets, ambiguity, unsafe paths, destructive/privileged scope not named, and provider/global config mutation not explicitly requested.
6
+
7
+ ## Scope
8
+
9
+ ### In Scope
10
+ - Clarify OpenCode prompt layering in the manager contract.
11
+ - Teach the manager to pass `explicitRequest` for concrete user-requested operations and avoid duplicate confirmation when preflight allows `authorizationMode: "explicit-request"`.
12
+ - Add regression coverage for user-requested test and git push operations.
13
+
14
+ ### Out of Scope
15
+ - Removing SDD human acceptance requirements.
16
+ - Allowing secrets, unsafe workspace escapes, or unnamed destructive/provider-global mutations.
17
+ - Directly editing user OpenCode config in this change.
18
+
19
+ ## Capabilities
20
+
21
+ ### New Capabilities
22
+ - None.
23
+
24
+ ### Modified Capabilities
25
+ - `manager-prompt`: clarifies prompt layering and exact user-request authorization behavior.
26
+ - `permissions`: regression coverage for explicit-request preflight authorization.
27
+
28
+ ## Approach
29
+
30
+ Update the canonical manager prompt and registry seed instructions, bump the prompt contract version, regenerate the checked-in agent seed, and add focused permission/prompt drift tests.
31
+
32
+ ## Affected Areas
33
+
34
+ | Area | Impact | Description |
35
+ |------|--------|-------------|
36
+ | `src/domain/agents/canonical-agent-manifest.ts` | Modified | Manager prompt contract and prompt version. |
37
+ | `seeds/agents/agent-seed-v1.json` | Modified | Regenerated canonical seed. |
38
+ | `test/mcp/opencode-agent-config-drift.test.ts` | Modified | Prompt anchors and contract version. |
39
+ | `test/permissions/policy-evaluator.test.ts` | Modified | Explicit-request test-run/git push coverage. |
40
+
41
+ ## Risks
42
+
43
+ | Risk | Likelihood | Mitigation |
44
+ |------|------------|------------|
45
+ | Over-authorizing vague confirmations | Medium | Limit “hazlo”/“dale” binding to immediately listed concrete operations; keep ambiguity hard stops. |
46
+ | Prompt budget growth | Medium | Keep wording compact and assert byte budget. |
47
+
48
+ ## Rollback Plan
49
+
50
+ Revert the prompt contract version, prompt text, seed snapshot, and test changes.
51
+
52
+ ## Success Criteria
53
+
54
+ - [ ] Manager prompt documents OpenCode instruction layering.
55
+ - [ ] Manager prompt avoids duplicate confirmation for exact user-requested operations.
56
+ - [ ] Explicit-request preflight tests cover test-run and git push.
57
+ - [ ] Focused OpenCode config drift and permission tests pass.
@@ -0,0 +1,19 @@
1
+ # Tasks: Manager Prompt Autonomy
2
+
3
+ ## Phase 1: Prompt contract
4
+
5
+ - [x] 1.1 Bump canonical prompt contract version.
6
+ - [x] 1.2 Add compact OpenCode instruction-layering guidance.
7
+ - [x] 1.3 Add exact user-request / immediate confirmation guidance for `explicitRequest` and duplicate-confirmation avoidance.
8
+
9
+ ## Phase 2: Seed and regression coverage
10
+
11
+ - [x] 2.1 Regenerate `seeds/agents/agent-seed-v1.json` from canonical projection.
12
+ - [x] 2.2 Update OpenCode config drift assertions for v19 and prompt anchors.
13
+ - [x] 2.3 Add permission evaluator coverage for user-requested test-run and git push.
14
+
15
+ ## Phase 3: Verification and rollout
16
+
17
+ - [x] 3.1 Run focused tests and typecheck.
18
+ - [x] 3.2 Reinstall local OpenCode config from the source checkout for smoke verification.
19
+ - [ ] 3.3 Create PR, watch CI, and merge if clean.
package/docs/storage.md CHANGED
@@ -34,7 +34,7 @@ Local SQLite storage is supported through `bun:sqlite`. Node.js is not the stora
34
34
 
35
35
  ## Migration layout
36
36
 
37
- SQL migrations live in `src/memory/sqlite/migrations/` and are applied in lexicographic order. The package build copies them into `dist/memory/sqlite/migrations` so installed bins can apply them on first use. The current migration list:
37
+ SQL migrations live in `src/storage/memory/sqlite/migrations/` and are applied in lexicographic order. The package build copies them into `dist/storage/memory/sqlite/migrations` so installed bins can apply them on first use. The current migration list:
38
38
 
39
39
  | # | File | Adds |
40
40
  |---|---|---|
@@ -83,7 +83,7 @@ Memory observations are for reusable context, not raw work logs. Capture only in
83
83
 
84
84
  Prefer update over duplicate save: if a known observation `id` or `topicKey` already represents the fact, update that record so revision history stays attached to one durable topic. Do not save secrets, credentials, hidden reasoning, raw large logs, full transcripts, full SDD artifacts, or sensitive user data.
85
85
 
86
- SDD artifacts are canonical for phase deliverables and governance state. Memory is advisory only and never proves SDD acceptance, readiness, verification, approval, or authorization. Active-work memory remains advisory; it can summarize current context, but it does not replace runs, checkpoints, or artifacts. `memory-write` is a durable governed action and requires preflight/explicit consent when policy marks it governed or risky.
86
+ SDD artifacts are canonical for phase deliverables and governance state. Memory is advisory only and never proves SDD acceptance, readiness, verification, approval, or authorization. Active-work memory remains advisory; it can summarize current context, but it does not replace runs, checkpoints, or artifacts. Ordinary qualifying `memory-write` operations are agent-decided and audit-only so the manager can preserve durable decisions, architecture choices, reusable project conventions, workflow preferences, and non-obvious gotchas without duplicate confirmation. Ask first when the content is sensitive, ambiguous, user-personal beyond stated preferences, or the user explicitly says not to persist it.
87
87
 
88
88
  ## Backup and recovery
89
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgxness",
3
- "version": "1.20.5",
3
+ "version": "1.20.7",
4
4
  "description": "CLI and MCP control plane for guided AI-agent workflows, SDD, memory, and OpenCode setup.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "repository": {
@@ -22,7 +22,7 @@
22
22
  "scripts": {
23
23
  "cli": "tsx src/cli/index.ts",
24
24
  "cli:bun": "bun src/cli/index.ts",
25
- "build": "node scripts/clean-dist.mjs && tsc -p tsconfig.build.json && node scripts/copy-migrations.mjs",
25
+ "build": "node scripts/clean-dist.mjs && tsc -p tsconfig.build.json && node scripts/copy-migrations.mjs && node scripts/ensure-bin-executable.mjs",
26
26
  "verify": "bun run verify:typecheck && bun run verify:test && bun run verify:test:bun-storage && bun run verify:bun-sqlite && bun run verify:package",
27
27
  "verify:typecheck": "tsc --noEmit",
28
28
  "verify:test": "node scripts/run-node-tests.mjs",