@midhunxavier/code-flow 0.0.0-stage → 0.1.0-preview.1

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 (284) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +122 -2
  3. package/bin/codeflow.mjs +8 -0
  4. package/bin/launcher.mjs +127 -0
  5. package/dist/remote-host.json +1 -0
  6. package/licenses/inter.txt +92 -0
  7. package/licenses/preact.txt +21 -0
  8. package/licenses/signals-core.txt +21 -0
  9. package/licenses/signals.txt +21 -0
  10. package/licenses/typescript-notices.txt +193 -0
  11. package/licenses/typescript.txt +55 -0
  12. package/licenses/uqr.txt +22 -0
  13. package/licenses/xterm-fit.txt +19 -0
  14. package/licenses/xterm.txt +21 -0
  15. package/package.json +34 -4
  16. package/public/assets/browser-7XI52A6V.js +8 -0
  17. package/public/assets/changes-EYFPASEI.js +1 -0
  18. package/public/assets/chunk-7H3ZLTKA.js +2 -0
  19. package/public/assets/chunk-L7TUCIYF.js +1 -0
  20. package/public/assets/chunk-LLMQG23J.js +163 -0
  21. package/public/assets/main-KIRM2OEK.js +1 -0
  22. package/public/assets/settings-QJZVW22Y.js +9 -0
  23. package/public/assets/styles-615EBB20.css +32 -0
  24. package/public/assets/terminal-A2FI2NAX.js +62 -0
  25. package/public/assets.json +1 -0
  26. package/public/bundle-meta.json +1 -0
  27. package/public/docs/.nojekyll +0 -0
  28. package/public/docs/accessibility.html +19 -0
  29. package/public/docs/acp-agents.html +117 -0
  30. package/public/docs/agent-containers.html +79 -0
  31. package/public/docs/api.html +1130 -0
  32. package/public/docs/app.js +342 -0
  33. package/public/docs/application-improvements.html +275 -0
  34. package/public/docs/architecture-explorer.html +19 -0
  35. package/public/docs/architecture.html +149 -0
  36. package/public/docs/auto-team.html +142 -0
  37. package/public/docs/automations.html +109 -0
  38. package/public/docs/checkpoint-review.html +37 -0
  39. package/public/docs/code-hosts.html +35 -0
  40. package/public/docs/code-intelligence.html +35 -0
  41. package/public/docs/configuration.html +346 -0
  42. package/public/docs/context-inspection.html +23 -0
  43. package/public/docs/coordinated-changes.html +28 -0
  44. package/public/docs/deferred-runs.html +25 -0
  45. package/public/docs/dependency-discovery.html +19 -0
  46. package/public/docs/documentation.html +84 -0
  47. package/public/docs/dynamic-teams-evaluation.html +174 -0
  48. package/public/docs/dynamic-teams-implementation-plan.html +882 -0
  49. package/public/docs/dynamic-teams-implementation-review-1.html +141 -0
  50. package/public/docs/dynamic-teams-plan-review-0.html +204 -0
  51. package/public/docs/extensions.html +42 -0
  52. package/public/docs/external-sources.html +96 -0
  53. package/public/docs/filesystem-policy.html +26 -0
  54. package/public/docs/filtered-tasks.html +44 -0
  55. package/public/docs/font-license.txt +92 -0
  56. package/public/docs/getting-started.html +118 -0
  57. package/public/docs/github-review-threads.html +26 -0
  58. package/public/docs/github.html +157 -0
  59. package/public/docs/help.html +69 -0
  60. package/public/docs/index.html +77 -0
  61. package/public/docs/installation.html +74 -0
  62. package/public/docs/launch-profiles.html +48 -0
  63. package/public/docs/maintenance.html +60 -0
  64. package/public/docs/memory-claims.html +31 -0
  65. package/public/docs/memory-storage.html +58 -0
  66. package/public/docs/notifications.html +39 -0
  67. package/public/docs/patterns.html +195 -0
  68. package/public/docs/performance-results.html +210 -0
  69. package/public/docs/performance.html +166 -0
  70. package/public/docs/project-conventions.html +22 -0
  71. package/public/docs/project-first-navigation-plan.html +587 -0
  72. package/public/docs/project-teams-implementation-plan.html +772 -0
  73. package/public/docs/project-teams.html +99 -0
  74. package/public/docs/provider-compatibility.html +20 -0
  75. package/public/docs/releasing.html +61 -0
  76. package/public/docs/remote-workers.html +64 -0
  77. package/public/docs/review-inbox.html +26 -0
  78. package/public/docs/run-storage.html +23 -0
  79. package/public/docs/runs.html +141 -0
  80. package/public/docs/search.json +1 -0
  81. package/public/docs/security.html +133 -0
  82. package/public/docs/shared-projects.html +31 -0
  83. package/public/docs/ssh-projects.html +60 -0
  84. package/public/docs/style.css +768 -0
  85. package/public/docs/task-reruns.html +30 -0
  86. package/public/docs/team-collaboration.html +379 -0
  87. package/public/docs/verification.html +22 -0
  88. package/public/docs/vscode.html +53 -0
  89. package/public/docs/worker-permission-verification.html +122 -0
  90. package/public/index.html +17 -0
  91. package/scripts/check-node.mjs +7 -0
  92. package/scripts/codeflow.mjs +55 -0
  93. package/scripts/pty.py +273 -0
  94. package/src/acp-connections.js +110 -0
  95. package/src/adapters/acp-presets.js +37 -0
  96. package/src/adapters/acp-types.js +0 -0
  97. package/src/adapters/acp.js +328 -0
  98. package/src/adapters/agy-auth.js +67 -0
  99. package/src/adapters/agy-isolation.js +223 -0
  100. package/src/adapters/agy.js +297 -0
  101. package/src/adapters/claude.js +220 -0
  102. package/src/adapters/codex-app-server.js +518 -0
  103. package/src/adapters/codex.js +299 -0
  104. package/src/adapters/errors.js +57 -0
  105. package/src/adapters/index.js +91 -0
  106. package/src/adapters/managed-permissions.js +37 -0
  107. package/src/adapters/model-discovery.js +100 -0
  108. package/src/adapters/process.js +418 -0
  109. package/src/adapters/team-tools.js +102 -0
  110. package/src/adapters/types.js +0 -0
  111. package/src/agent-container.js +155 -0
  112. package/src/approvals.js +121 -0
  113. package/src/architecture.js +456 -0
  114. package/src/assets.js +44 -0
  115. package/src/automation.js +901 -0
  116. package/src/certificate-renewal.js +75 -0
  117. package/src/chat-handoff.js +55 -0
  118. package/src/checkpoint-review.js +72 -0
  119. package/src/checks.js +303 -0
  120. package/src/code-host-git.js +102 -0
  121. package/src/code-hosts-api.js +99 -0
  122. package/src/code-hosts.js +482 -0
  123. package/src/code-intelligence-worker.mjs +452 -0
  124. package/src/code-intelligence.js +141 -0
  125. package/src/collab/api.js +365 -0
  126. package/src/collab/checkpoints.js +198 -0
  127. package/src/collab/connections.js +139 -0
  128. package/src/collab/host-execution.js +347 -0
  129. package/src/collab/hub-client.js +210 -0
  130. package/src/collab/link-api.js +229 -0
  131. package/src/collab/link.js +595 -0
  132. package/src/collab/model.js +496 -0
  133. package/src/collab/runner.js +1014 -0
  134. package/src/collab/store.js +1452 -0
  135. package/src/collab/terminals.js +361 -0
  136. package/src/collaboration-reviews.js +116 -0
  137. package/src/config.js +48 -0
  138. package/src/context-budget.js +14 -0
  139. package/src/context-inspection.js +204 -0
  140. package/src/context.js +154 -0
  141. package/src/conventions.js +283 -0
  142. package/src/coordinated-api.js +247 -0
  143. package/src/deferred-launch.js +82 -0
  144. package/src/deferred-runs.js +515 -0
  145. package/src/dependency-health.js +35 -0
  146. package/src/diff.js +43 -0
  147. package/src/docs-help.js +316 -0
  148. package/src/doctor.js +232 -0
  149. package/src/engine.js +4366 -0
  150. package/src/env.js +44 -0
  151. package/src/experience.js +50 -0
  152. package/src/extensions.js +144 -0
  153. package/src/filesystem-access.js +107 -0
  154. package/src/filesystem-policy.js +238 -0
  155. package/src/filtered-task-limits.js +93 -0
  156. package/src/filtered-tasks-api.js +53 -0
  157. package/src/filtered-tasks.js +576 -0
  158. package/src/fs.js +57 -0
  159. package/src/git.js +626 -0
  160. package/src/github-review-threads.js +181 -0
  161. package/src/github.js +538 -0
  162. package/src/http.js +69 -0
  163. package/src/improve-settings.js +38 -0
  164. package/src/improve.js +187 -0
  165. package/src/integrations.js +373 -0
  166. package/src/integrity.js +259 -0
  167. package/src/journey-api.js +77 -0
  168. package/src/journey-replay.js +65 -0
  169. package/src/journey-store.js +97 -0
  170. package/src/journeys.js +60 -0
  171. package/src/json.js +81 -0
  172. package/src/launch-profiles.js +292 -0
  173. package/src/learnings.js +80 -0
  174. package/src/log.js +39 -0
  175. package/src/maintenance.js +335 -0
  176. package/src/memory-analysis.js +182 -0
  177. package/src/memory-claims.js +153 -0
  178. package/src/memory-sqlite.js +236 -0
  179. package/src/memory.js +552 -0
  180. package/src/merge-validation.js +58 -0
  181. package/src/model-catalog.js +238 -0
  182. package/src/model-research.js +91 -0
  183. package/src/notes.js +176 -0
  184. package/src/notifications.js +413 -0
  185. package/src/patterns/auto-team-model.js +212 -0
  186. package/src/patterns/auto-team.js +659 -0
  187. package/src/patterns/council.js +199 -0
  188. package/src/patterns/debate.js +188 -0
  189. package/src/patterns/findings.js +141 -0
  190. package/src/patterns/index.js +19 -0
  191. package/src/patterns/loop.js +158 -0
  192. package/src/patterns/pipeline.js +125 -0
  193. package/src/patterns/prompts.js +181 -0
  194. package/src/patterns/race.js +147 -0
  195. package/src/patterns/schemas.js +40 -0
  196. package/src/patterns/solo.js +49 -0
  197. package/src/patterns/supervisor.js +235 -0
  198. package/src/patterns/task-draft.js +29 -0
  199. package/src/patterns/tdd.js +231 -0
  200. package/src/patterns/team-strategies.js +67 -0
  201. package/src/performance.js +43 -0
  202. package/src/persistence-status.js +35 -0
  203. package/src/phone-sessions.js +96 -0
  204. package/src/preview-overlay.js +383 -0
  205. package/src/preview.js +219 -0
  206. package/src/privacy.js +23 -0
  207. package/src/project-report.js +22 -0
  208. package/src/project-team-model.js +178 -0
  209. package/src/project-team-policy.js +42 -0
  210. package/src/project-team-store.js +213 -0
  211. package/src/project-teams-api.js +36 -0
  212. package/src/project-teams.js +551 -0
  213. package/src/projects.js +286 -0
  214. package/src/provider-eligibility.js +9 -0
  215. package/src/readiness.js +98 -0
  216. package/src/remote-tls.js +66 -0
  217. package/src/remote-workers/bundles.js +198 -0
  218. package/src/remote-workers/client.js +332 -0
  219. package/src/remote-workers/durability.js +37 -0
  220. package/src/remote-workers/protocol.js +68 -0
  221. package/src/remote-workers/stdio.js +138 -0
  222. package/src/remote-workers/worker.js +304 -0
  223. package/src/remote.js +204 -0
  224. package/src/repo-config.js +201 -0
  225. package/src/repo-coordination.js +732 -0
  226. package/src/repo-tree.js +106 -0
  227. package/src/retention-policy.js +466 -0
  228. package/src/review-inbox.js +38 -0
  229. package/src/routing.js +49 -0
  230. package/src/run-analysis.js +111 -0
  231. package/src/run-cold-store.js +231 -0
  232. package/src/run-environment.js +15 -0
  233. package/src/run-history.js +91 -0
  234. package/src/run-log.js +160 -0
  235. package/src/run-permissions.js +110 -0
  236. package/src/run-projection.js +75 -0
  237. package/src/run-recovery.js +53 -0
  238. package/src/run-status.js +54 -0
  239. package/src/serve.js +138 -0
  240. package/src/server.js +2738 -0
  241. package/src/shared-access.js +103 -0
  242. package/src/shared-accounts.js +301 -0
  243. package/src/shared-api.js +239 -0
  244. package/src/shell.js +346 -0
  245. package/src/ship.js +344 -0
  246. package/src/slots.js +74 -0
  247. package/src/snapshot.js +388 -0
  248. package/src/source-context.js +17 -0
  249. package/src/sse-writer.js +70 -0
  250. package/src/ssh-projects/bootstrap.mjs +95 -0
  251. package/src/ssh-projects/config.js +45 -0
  252. package/src/ssh-projects/gateway.js +143 -0
  253. package/src/ssh-projects/manager.js +320 -0
  254. package/src/ssh-projects/team-autostart.mjs +93 -0
  255. package/src/ssh-projects/team-remove.mjs +69 -0
  256. package/src/ssh-projects/team-status.mjs +39 -0
  257. package/src/ssh-projects/transport.js +116 -0
  258. package/src/stats.js +139 -0
  259. package/src/store.js +544 -0
  260. package/src/stream.js +91 -0
  261. package/src/sweeps.js +241 -0
  262. package/src/tailscale.js +101 -0
  263. package/src/task-draft.js +23 -0
  264. package/src/team-evaluation.js +242 -0
  265. package/src/team-mailbox.js +160 -0
  266. package/src/team-memory.js +84 -0
  267. package/src/team-rerun-graph.js +15 -0
  268. package/src/team-reruns.js +130 -0
  269. package/src/team-scheduler.js +121 -0
  270. package/src/team-template-store.js +98 -0
  271. package/src/team-templates.js +117 -0
  272. package/src/team-tool-client.mjs +79 -0
  273. package/src/team-tools.js +176 -0
  274. package/src/teams.js +0 -0
  275. package/src/templates.js +62 -0
  276. package/src/transcript.js +134 -0
  277. package/src/verification-integrity.js +27 -0
  278. package/src/verification.js +183 -0
  279. package/src/watch.js +195 -0
  280. package/src/work-queue.js +47 -0
  281. package/src/workflow-control.js +83 -0
  282. package/src/workspace-api.js +207 -0
  283. package/src/workspace-changes.js +61 -0
  284. package/src/workspace.js +146 -0
@@ -0,0 +1,882 @@
1
+ <!doctype html>
2
+ <html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="description" content="Dynamic teams, workflows, messaging, and memory — code-flow guides and reference"><title>Dynamic teams, workflows, messaging, and memory · code-flow</title><link rel="icon" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAbSElEQVR42u19a7Ak53nW87xfz5zbrtYSNnbwRU4UGywZE2E5GKfCerETxUlRIVRWVUBcXBJLOKU4wchA7IKzBxzsXCCxQ1JEIT9SCUXYjQMEKiQorpWILSmJpJjgtZEdZGQby7Zuez17zkx/78OP7+ue7p6eOXPO7kryiedU15mZ7pnufi/Pe/8G+OrjWX3wyp9ChBrnOvFMnPMyPo5COAbgGARSXxkXvS6DFHBcYV+J67oMJ1VAsuemBhxXwFEIpE8UQLZ27/nn0w78iTLieTAMxxHEGIk5gqKgEDAlXbEEiur9EsBSel4Q3AJQlJdBPyOIAoDDMAALh5UOg0phqRhH4NzSeOuJ7atPP45v+JoLjfsiTsBwC+Ozz4AkEbWKLn9081rZ8IgUDrv7jXR7MYRDCBi4Ae7pzE2Fri5E1XMB6hwDAMwHOtI+dT4L5c9OXWN+j5OTsPO9ZPt4AFAJUH6BtC+BeLhk/Ag8/Bb+Mh9sQCxbQveMMUAiAAOTFKw+oJu9xNtY4s1cxSEYoHGSXs/S6oI8E4kdojZvnNX7mRHW4E5FaFfnY5nIUoMZuyACK6YQotLpSZAGIAAYAG6AX4A84B4P5c/gmwa/Wmv/HrSBl4SHG4nry/fqm8ywEQLexAESPkTETBBGRzpQ6X9U58bVf2Hsea0usWtZmM0YNr5Dc26+eVzFDAIyAEaIgCBIROGrQDRgXOIuL/GPcZgPQTIQ6r+j/oftGes36Dj+8eHaffFfDMzvGS7jTYMRFDYRrYQoBDmCHAaBcFAC5GlD878mGxr73CfHe+e1Kur79MaKBAKs85pqv0bj/ebrxnVSDirCFBEgFOZQcR5xeBa+EvAtheEjuLt8B0jH+jFmZLhCGpBVbfmjunZQ4JeKFXwzz0MQHECQJwn0TNAKG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kwXeeLdjY0OXi/j7RwOOZv9/q7wNRWEasRRV1AVyAQ7PDYvsNF/ldT7hbm7UgQOFwx+2If5h/AH+egvr78FlT7MX+8L1vIVx5QN6CS6Wf03bI4gI9bQSmz+fyqnlHQmJLufwYHBzl+GnDrzc/tmZ7+LpidQfKa/U5Rf7w/UENIpvteXiKp2/EEVm42uNlv7cOKtGbcwRiRB0YDU48AdYCe+Mb+fdZ66w1O8jG5Brgj+HleXT5R8Gs+vieMuFVH1GvfZsnpJKU4WgSxSdyweCM25pwJ+Iy198H2578ebEw9n7Ahx/fDTgePqNs8Gm/ootFdfp4kUHc1U+B19pgrDh10dF2jD46lIQcfdwNdyx+bb848yX2cPZ/wyo+mzG8VYNg0TWrr7YmWqS3KKg1YPBDU9hiI3y7fjXJemJ8FcW6/cfBGXXc/BB/TmO4wMhenA52zORuSU1ekRYDj4IiIb/ODiIfzRKK10ZDq8b7tl4RqV+f2jA9chDJPGvDpZCga2yBFnUk+Ak4O6MpK+uheh4NCzjPXo7/90IAG59YIA7X1viHpbP5m0UX8HeT+ptK8uXcynEarY8R7yOUtJwNfhAUMC/8VUc87fxS/XQ9J03jZ8Lt1F8BeM/AaAYLv22Av62Us+pSyCKVfNlIDp+15b4nvj3+OFny8jubzdUIu5GCA/6B0D7PghDwOEFHtaSfRCve/DncdNN44ZrqecS8fdXRezHdT0cL0fAabwWD+EIt9IyYifDc03q99+jbxmA9ZPFTkvFfPVxuZlwXAFHFb5K+K8+Fn78f4eywyDh1HjXAAAAAElFTkSuQmCC"><link rel="stylesheet" href="style.css"><script src="app.js" defer></script></head>
3
+ <body data-page="dynamic-teams-implementation-plan"><a class="skip-link" href="#content">Skip to content</a>
4
+ <header class="topbar"><a class="brand" href="index.html"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAbSElEQVR42u19a7Ak53nW87xfz5zbrtYSNnbwRU4UGywZE2E5GKfCerETxUlRIVRWVUBcXBJLOKU4wchA7IKz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brgj+HleXT5R8Gs+vieMuFVH1GvfZsnpJKU4WgSxSdyweCM25pwJ+Iy198H2578ebEw9n7Ahx/fDTgePqNs8Gm/ootFdfp4kUHc1U+B19pgrDh10dF2jD46lIQcfdwNdyx+bb848yX2cPZ/wyo+mzG8VYNg0TWrr7YmWqS3KKg1YPBDU9hiI3y7fjXJemJ8FcW6/cfBGXXc/BB/TmO4wMhenA52zORuSU1ekRYDj4IiIb/ODiIfzRKK10ZDq8b7tl4RqV+f2jA9chDJPGvDpZCga2yBFnUk+Ak4O6MpK+uheh4NCzjPXo7/90IAG59YIA7X1viHpbP5m0UX8HeT+ptK8uXcynEarY8R7yOUtJwNfhAUMC/8VUc87fxS/XQ9J03jZ8Lt1F8BeM/AaAYLv22Av62Us+pSyCKVfNlIDp+15b4nvj3+OFny8jubzdUIu5GCA/6B0D7PghDwOEFHtaSfRCve/DncdNN44ZrqecS8fdXRezHdT0cL0fAabwWD+EIt9IyYifDc03q99+jbxmA9ZPFTkvFfPVxuZlwXAFHFb5K+K8+Fn78f4eywyDh1HjXAAAAAElFTkSuQmCC" width="30" height="30" alt=""><strong>Code Flow</strong><span>Docs</span></a><button class="search-trigger" id="open-search">Search documentation <kbd>⌘ K</kbd></button><div class="top-actions"><a href="https://github.com/midhunxavier/code-flow">GitHub ↗</a><button id="theme" aria-label="Change color theme">Theme</button><button id="open-help" class="primary" hidden aria-expanded="false" aria-controls="help-panel">Ask code-flow</button><button id="menu" aria-label="Toggle documentation navigation" aria-expanded="false" aria-controls="sidebar">☰</button></div></header>
5
+ <div class="layout"><nav class="sidebar" id="sidebar" aria-label="Documentation"><section><h2>Get started</h2><a href="index.html" >Overview</a><a href="installation.html" >Install Code Flow preview</a><a href="getting-started.html" >Getting started</a><a href="patterns.html" >Team patterns</a><a href="acp-agents.html" >ACP coding agents</a><a href="help.html" >Ask code-flow</a></section><section><h2>Work with agents</h2><a href="runs.html" >Runs and workspace</a><a href="auto-team.html" >Auto team</a><a href="project-teams.html" >Project missions (preview)</a><a href="review-inbox.html" >Review inbox</a><a href="verification.html" >Verification and review</a><a href="github.html" >GitHub, review and shipping</a><a href="github-review-threads.html" >GitHub review threads</a><a href="task-reruns.html" >Selective task reruns</a><a href="deferred-runs.html" >Deferred runs</a></section><section><h2>Your workspace</h2><a href="configuration.html" >Configuration</a><a href="context-inspection.html" >Context and budgets</a><a href="project-conventions.html" >Versioned project conventions</a><a href="checkpoint-review.html" >Checkpoints and reversions</a><a href="launch-profiles.html" >Service launch profiles</a><a href="code-intelligence.html" >Code intelligence</a><a href="architecture-explorer.html" >Architecture explorer</a><a href="memory-storage.html" >Project memory</a><a href="memory-claims.html" >Semantic claim review</a><a href="coordinated-changes.html" >Coordinated changes</a></section><section><h2>Connect and collaborate</h2><a href="team-collaboration.html" >Team collaboration</a><a href="shared-projects.html" >Shared project accounts</a><a href="ssh-projects.html" >SSH projects</a><a href="remote-workers.html" >Remote agent workers</a><a href="code-hosts.html" >GitLab and Bitbucket code workflows</a><a href="external-sources.html" >Read-only external sources</a><a href="automations.html" >Automations and away mode</a><a href="notifications.html" >Outbound notifications</a></section><section><h2>Operate safely</h2><a href="security.html" >Security, subscriptions and caveats</a><a href="filesystem-policy.html" >Project filesystem policy</a><a href="agent-containers.html" >Agent containers</a><a href="filtered-tasks.html" >Filtered Docker tasks</a><a href="dependency-discovery.html" >Dependency discovery</a><a href="maintenance.html" >Backup and maintenance</a></section><section><h2>Build and extend</h2><a href="architecture.html" >Architecture and development</a><a href="api.html" >Local API and command-line client</a><a href="extensions.html" >Provider and workflow extensions</a><a href="provider-compatibility.html" >Provider compatibility</a><a href="accessibility.html" >Accessibility acceptance</a><a href="performance.html" >Performance</a><a href="run-storage.html" >Run storage</a><a href="documentation.html" >Documentation and GitHub Pages</a><a href="releasing.html" >Preparing a preview release</a><a href="vscode.html" >Code Flow for VS Code</a></section><section><h2>Engineering records</h2><a href="application-improvements.html" >Application improvement program</a><a href="project-first-navigation-plan.html" >Project navigation review and implementation plan</a><a href="dynamic-teams-evaluation.html" >Dynamic teams: implementation evidence and rollout decision</a><a href="dynamic-teams-implementation-plan.html" aria-current="page">Dynamic teams, workflows, messaging, and memory</a><a href="dynamic-teams-implementation-review-1.html" >Review 1: the dynamic teams implementation</a><a href="worker-permission-verification.html" >Live worker permission verification</a><a href="dynamic-teams-plan-review-0.html" >Review 0: Dynamic teams implementation plan</a><a href="project-teams-implementation-plan.html" >Standing project teams implementation plan</a><a href="performance-results.html" >Measured performance: 19 October 2026</a></section><a class="app-link" id="back-app" hidden href="/">← Back to app</a></nav>
6
+ <main id="content" tabindex="-1"><div class="breadcrumb">Documentation <span>/</span> Engineering records</div><article><h1 id="dynamic-teams-workflows-messaging-and-memory">Dynamic teams, workflows, messaging, and memory</h1>
7
+ <blockquote>
8
+ <p>Engineering plan and record. Revision 4 below records the implementation scope and remaining extensions; the revision 3 material that follows records the delivered baseline. For current usage, start with the <a href="index.html">documentation library</a>.</p>
9
+ </blockquote>
10
+ <p>Status: <strong>revision 4 core implemented</strong>, updated 21 October 2026. Dynamic Auto is the fresh-session default, Solo is directly accessible, fixed workflows and versioned templates live in Advanced, and all new runs resolve a shared permission policy at every agent launch. The revision 3 scheduler and live-tool bridge remain the execution foundation. See the <a href="auto-team.html">user guide</a> and <a href="dynamic-teams-evaluation.html">measured evidence and rollout decision</a>.</p>
11
+ <h2 id="revision-4--dynamic-auto-solo-and-reusable-templates">Revision 4 — dynamic Auto, Solo, and reusable templates</h2>
12
+ <p>This revision supersedes the earlier opt-in product/default decision and the proposal to make template selection the main Auto behavior. It extends the existing dynamic engine; it does not restart P0–P8. Historical measurements and implementation claims below remain unchanged.</p>
13
+ <h3 id="delivered-scope-and-explicit-limits">Delivered scope and explicit limits</h3>
14
+ <ul>
15
+ <li>Added closed, versioned task-graph/fixed-workflow template definitions, an atomic server library with immutable history, project/personal scope, migration of browser presets, import/export, JSON editing with execution preview, and save-from-run. Auto may compose enabled task graphs; manually selected definitions are mandatory and pinned across recovery.</li>
16
+ <li>Moved fixed workflows into Advanced without replacing their executors or weakening test-first, race, council, loop, or review behavior. Typed composition of those fixed executors remains a future extension; only validated task graphs are currently Auto-compatible.</li>
17
+ <li>Added a shared per-launch policy resolver, recorded effective permissions, narrower turn access, provider eligibility checks, explicit user policy revisions, and inherited mandatory restrictions for child runs. All engine-created runs use the policy, including background and collaborative starts; historical saved runs without a policy retain their existing behavior.</li>
18
+ <li>Controlled launches currently support Claude/Codex. Unsupported provider capabilities fail closed. This is not an identical cross-provider sandbox: filesystem read isolation, general browser/MCP allowlists, and a unified sandbox for setup/check/preview processes remain outside this implementation. Real-provider enforcement acceptance is still required before claiming equivalent isolation; deterministic adapter tests only verify configuration and orchestration.</li>
19
+ <li>Auto retains its existing independent verification model. Coordinator-only investigations, typed artifact/control-flow composition, automatic template-upgrade proposals, and a visual graph designer remain future extensions. The initial designer uses validated JSON and a readable task preview.</li>
20
+ <li>The application default is decoupled from historical quality-evaluation results. Existing explicit mode choices and the Auto disable switch remain intact; no evaluation evidence is synthesized by this change.</li>
21
+ </ul>
22
+ <p>The D0–D6 entries below describe the full design, including these remaining extensions. They should not be read as a claim that every listed extension or release acceptance probe has been completed.</p>
23
+ <p>Initial implementation validation on 21 October 2026: typecheck and production build passed; 29 focused policy/template/adapter/composer checks and 11 browser scenarios passed. The full regression run reported 1,208 passes, eight skips, and two compatibility failures; both failures were corrected and passed in focused reruns. The full suite was not rerun after those fixes. Browser and adapter scenarios use deterministic CLIs, not live-provider sandbox enforcement probes.</p>
24
+ <h3 id="product-decisions">Product decisions</h3>
25
+ <div class="table-scroll" tabindex="0"><table>
26
+ <thead>
27
+ <tr>
28
+ <th>Surface</th>
29
+ <th>Intended behavior</th>
30
+ </tr>
31
+ </thead>
32
+ <tbody><tr>
33
+ <td><strong>Auto — default</strong></td>
34
+ <td>The coordinator investigates the goal, builds an appropriate plan, delegates useful work, and adapts to results. It can start without a template, reuse one, or adapt/combine compatible templates.</td>
35
+ </tr>
36
+ <tr>
37
+ <td><strong>Solo — directly accessible</strong></td>
38
+ <td>One execution agent handles the task; delegation is disabled. Keep it beside Auto in the composer, without opening Advanced.</td>
39
+ </tr>
40
+ <tr>
41
+ <td><strong>Advanced — templates and configuration</strong></td>
42
+ <td>Users choose existing patterns as reusable templates, design their own, edit versions, and configure roles, dependencies, provider/model preferences, and required checks.</td>
43
+ </tr>
44
+ <tr>
45
+ <td><strong>Reasoning and resource controls</strong></td>
46
+ <td>Model effort, concurrency, time, invocation, and spending limits remain separate from execution mode. Do not introduce another Ultra mode in this revision.</td>
47
+ </tr>
48
+ </tbody></table>
49
+ </div><p>Auto is allowed to use the smallest useful execution plan. An investigation may stay with the coordinator; a small code change may need one implementation worker and the verification required by the run. Do not create multiple implementation workers merely because Auto is selected. Required independent review remains independent; choosing Solo must never silently start a reviewer agent. If a selected policy requires another agent, explain that incompatibility before execution.</p>
50
+ <p>Code Flow owns scheduling, workspaces, communication, recovery, permissions, budgets, and verification across providers. The coordinator proposes work and revisions through validated records. Use the existing declarative plan and event scheduler; arbitrary generated orchestration scripts and untracked provider-native teams are outside this revision.</p>
51
+ <h3 id="current-foundations-and-gaps">Current foundations and gaps</h3>
52
+ <div class="table-scroll" tabindex="0"><table>
53
+ <thead>
54
+ <tr>
55
+ <th>Existing foundation</th>
56
+ <th>Revision 4 work</th>
57
+ </tr>
58
+ </thead>
59
+ <tbody><tr>
60
+ <td><code>src/patterns/auto-team.ts</code>, <code>auto-team-model.ts</code>, <code>src/teams.ts</code>, and <code>src/team-scheduler.ts</code> already support generated tasks, dependencies, bounded revisions, messaging, and recovery.</td>
61
+ <td>Extend this execution path and its contracts. Keep generated tasks usable without any template lookup or match.</td>
62
+ </tr>
63
+ <tr>
64
+ <td><code>src/patterns/team-strategies.ts</code> expands three declarative subplans.</td>
65
+ <td>Generalize the reusable-strategy contract to versioned templates with explicit inputs, outputs, and preserved guarantees.</td>
66
+ </tr>
67
+ <tr>
68
+ <td>Fixed patterns have established execution and verification behavior.</td>
69
+ <td>Expose them in Advanced, then share guarded execution primitives so Auto can reuse them without losing those guarantees.</td>
70
+ </tr>
71
+ <tr>
72
+ <td><code>ui/composer-tools.ts</code> and <code>ui/onboarding.tsx</code> already save personal/project task templates and presets in browser storage.</td>
73
+ <td>Add a server-accessible, versioned team-template library and migrate existing entries. Current entries are mainly prompts/settings, not executable team definitions.</td>
74
+ </tr>
75
+ <tr>
76
+ <td><code>src/engine.ts</code> passes <code>params.trust ?? run.trust</code> to adapters; adapters map those labels differently.</td>
77
+ <td>Resolve and validate effective permissions centrally at every launch, including replacements and resumed turns.</td>
78
+ </tr>
79
+ <tr>
80
+ <td><code>ui/state.ts</code> defaults to Pipeline; <code>ui/composer.tsx</code> remembers a team workflow; evaluation metadata can change the default.</td>
81
+ <td>Separate execution-mode preference from template selection and evaluation evidence. Make Auto the application default while preserving explicit user choices.</td>
82
+ </tr>
83
+ </tbody></table>
84
+ </div><h3 id="d0--define-run-policy-and-execution-contracts">D0 — define run policy and execution contracts</h3>
85
+ <p><strong>Outcome:</strong> every execution path derives authority from the run, independently of the selected provider or template.</p>
86
+ <ul>
87
+ <li>Introduce a versioned run-policy record and a common permission resolver at the engine launch boundary. Cover filesystem reads/writes, terminal actions, network access, browser access, MCP tools, approval behavior, execution environment, and delegation where supported. These are separate capabilities: terminal network permission does not automatically grant a browser or connector.</li>
88
+ <li>Derive effective permissions from the authorized run policy, current project/host restrictions, and any narrower turn access. A coordinator&#39;s read-only planning turn must not accidentally make its implementation workers read-only. Conversely, templates, model output, messages, role settings, and provider changes cannot grant additional authority.</li>
89
+ <li>Treat tool availability separately from permission. Inherit the run&#39;s allowed tools where the provider and execution environment support them; route only to eligible providers. Record unsupported or unavailable capabilities explicitly. Do not pass credentials or provider-specific session handles between agents/providers.</li>
90
+ <li>Have each adapter report the enforcement it can provide. Use existing supported isolation when needed; otherwise reject the affected launch with a concrete explanation. Never interpret matching permission labels as proof of equivalent enforcement. Worktrees alone do not restrict reads, and prompt instructions do not constitute a sandbox.</li>
91
+ <li>Apply the resolver to planning, workers, review, integration/repair, retries, replacement members, manual templates, and Solo. Audit setup, checks, previews, remote execution, and container paths too: commands outside the native agent sandbox need their own policy enforcement or an explicit run-authorized execution boundary.</li>
92
+ <li>Persist the policy revision and effective capability summary with each launch. On recovery, retain the authorized policy and revalidate against current restrictions; a revoked permission or weaker replacement provider blocks new affected work. Any explicit user policy change creates a new revision. Reconcile an active process before continuing under changed restrictions.</li>
93
+ <li>Keep Code Flow as the delegation authority. Disable unmanaged provider-native delegation for controlled runs, including Solo; providers unable to enforce a required delegation restriction are ineligible for that mode.</li>
94
+ </ul>
95
+ <p><strong>Primary code:</strong> <code>src/engine.ts</code>, <code>src/adapters/types.ts</code>, provider adapters, <code>src/provider-eligibility.ts</code>, team-tool grants, execution/container/remote-worker boundaries, and shared policy types.</p>
96
+ <p><strong>Exit evidence:</strong> mixed-provider launches receive the intended effective policy; read-only turns remain narrower; retries and replacements cannot increase access; missing enforcement is surfaced rather than silently downgraded.</p>
97
+ <h3 id="d1--strengthen-dynamic-auto-on-the-existing-runtime">D1 — strengthen dynamic Auto on the existing runtime</h3>
98
+ <p><strong>Outcome:</strong> Auto succeeds without a template library and adapts its plan within the run&#39;s constraints.</p>
99
+ <ul>
100
+ <li>Keep initial planning and bounded revisions as the core behavior. The coordinator chooses eligible members, tasks, ownership, dependencies, and sequencing from the current goal and observed evidence. Provider/model pins and runtime verification requirements remain authoritative.</li>
101
+ <li>Preserve task/member/attempt identities and journal accepted revisions before dispatch. Start ready work through the existing scheduler; ask the coordinator for decisions when evidence requires judgment, rather than on every scheduler event.</li>
102
+ <li>Support the smallest useful plan, including coordinator-only investigations where allowed. Keep independent verification for code changes and reserve its budget before admitting additional work. Make task-kind changes explicit so an investigation cannot become an unauthorized implementation task.</li>
103
+ <li>Reassign unfinished work through a checkpoint/handover, without transferring a provider&#39;s native session to another provider. Validate file ownership, serialize conflicting writers, and bind artifact dependencies to recorded commits.</li>
104
+ <li>Preserve completed work when replanning. Invalidate only evidence affected by changed inputs/contracts and require fresh checks before reporting success. Bound expansion, repair, retries, and coordination overhead using the existing run limits.</li>
105
+ <li>Expose the accepted plan, decision rationale, active workers, revisions, blockers, and remaining budget in the run view. Permission changes are runtime/user decisions, never coordinator decisions.</li>
106
+ </ul>
107
+ <p><strong>Primary code:</strong> <code>src/patterns/auto-team.ts</code>, <code>src/patterns/auto-team-model.ts</code>, <code>src/teams.ts</code>, <code>src/team-scheduler.ts</code>, <code>src/workflow-control.ts</code>, and <code>ui/team.tsx</code>.</p>
108
+ <p><strong>Exit evidence:</strong> an empty template catalog does not prevent a small task or a parallel feature task from completing; a worker failure causes a bounded revision and recovery without replaying completed work unnecessarily.</p>
109
+ <h3 id="d2--versioned-templates-using-the-same-execution-contracts">D2 — versioned templates using the same execution contracts</h3>
110
+ <p><strong>Outcome:</strong> users can save reusable team behavior, and the server can validate it before execution.</p>
111
+ <ul>
112
+ <li>Define a shared schema for identity/version, scope, description/applicability, input parameters, role slots, preferred providers/models, tasks/dependencies, ownership, input/output artifacts, required checks, immutable guarantees, and permitted adaptations. Keep the existing starter-prompt catalog distinct from executable team templates.</li>
113
+ <li>Add a durable server-side store/API for built-in, personal, and project templates, with existing account/project access rules, version-conflict checks, and bounded import/export. Built-ins are immutable; users create their own versions or copies.</li>
114
+ <li>Normalize a generated plan and an instantiated template into the same validated execution records. Use typed, bounded control primitives for behavior that a simple task DAG cannot express, such as candidate selection and repair loops. Avoid a separate untracked execution engine.</li>
115
+ <li>Pin the template version, definition snapshot, resolved inputs, expansion, and adaptation patch in each run. Editing or removing a library entry must not change an existing or resumed run.</li>
116
+ <li>Templates can declare required capabilities and suggested resource limits; they cannot grant permissions, weaken required verification, or enlarge the authorized budget. Exclude credentials, auth-volume bindings, session IDs, old results, private transcripts, and machine-specific workspace paths from reusable definitions.</li>
117
+ <li>Migrate existing browser libraries idempotently and retain a recoverable copy. Preserve names, task inputs, criteria, role preferences, and supported workflow options. Stop applying saved trust/tool-approval settings or disabling current isolation. Translate unsupported settings into visible migration notes rather than pretending they are enforced.</li>
118
+ <li>Default user/imported templates to manual use until enabled for Auto. Supply the coordinator only the enabled, accessible, compatible catalog; a template&#39;s text is source material, not authority.</li>
119
+ </ul>
120
+ <p><strong>Primary code:</strong> new shared template schema/store/API modules; <code>src/teams.ts</code>, <code>src/server.ts</code>, <code>src/shared-access.ts</code>, <code>ui/composer-tools.ts</code>, and <code>ui/onboarding.tsx</code>.</p>
121
+ <p><strong>Exit evidence:</strong> a template selected on another client resolves to the same immutable definition; importing or applying a template cannot change the run&#39;s permissions; existing browser libraries migrate without duplicate entries or lost originals.</p>
122
+ <h3 id="d3--convert-existing-patterns-into-reusable-templates">D3 — convert existing patterns into reusable templates</h3>
123
+ <p><strong>Outcome:</strong> familiar workflows remain available in Advanced with their original behavior.</p>
124
+ <p>Initially register built-in template definitions that invoke the existing executors. Preserve legacy pattern IDs and replay identities for saved runs, automations, API clients, and extensions. Extract shared execution primitives incrementally; do not reimplement a pattern as a loose sequence of prompts.</p>
125
+ <div class="table-scroll" tabindex="0"><table>
126
+ <thead>
127
+ <tr>
128
+ <th>Built-in template</th>
129
+ <th>Guarantees that must survive reuse</th>
130
+ </tr>
131
+ </thead>
132
+ <tbody><tr>
133
+ <td>Plan / Build / Review</td>
134
+ <td>Plan checkpoint, implementation, required checks, independent review, and bounded fixes.</td>
135
+ </tr>
136
+ <tr>
137
+ <td>Supervisor / Workers</td>
138
+ <td>Decomposition contracts, separate writer workspaces, integration, conflict handling, and final verification.</td>
139
+ </tr>
140
+ <tr>
141
+ <td>Test first</td>
142
+ <td>Failing baseline evidence, protected tests, implementation, and passing verification.</td>
143
+ </tr>
144
+ <tr>
145
+ <td>Iterative loop</td>
146
+ <td>Bounded iteration, progress/regression checks, and the existing rollback behavior.</td>
147
+ </tr>
148
+ <tr>
149
+ <td>Candidate race</td>
150
+ <td>Isolated candidates, anonymized evaluation, deterministic recorded selection inputs, and required checks.</td>
151
+ </tr>
152
+ <tr>
153
+ <td>Debate</td>
154
+ <td>Recorded proposals/decision, optional implementation, and verification appropriate to the selected behavior.</td>
155
+ </tr>
156
+ <tr>
157
+ <td>Review council</td>
158
+ <td>Read-only source review, independent findings/reproductions, and evidence-preserving synthesis.</td>
159
+ </tr>
160
+ </tbody></table>
161
+ </div><p>For Auto composition, each reusable executor needs explicit input/output commits or artifacts, unique operation namespaces, and a scoped result. It shares the parent run&#39;s permissions, budgets, cancellation, and history, and cannot overwrite the parent&#39;s final verdict or reset counters. Prevent recursive template cycles and bound expansion. Mark Auto compatibility only after these guarantees are tested; Advanced availability alone does not establish composability.</p>
162
+ <p><strong>Primary code:</strong> <code>src/patterns/index.ts</code>, existing pattern modules, <code>src/patterns/team-strategies.ts</code>, and engine execution-context helpers.</p>
163
+ <p><strong>Exit evidence:</strong> parity fixtures pass for every built-in pattern; each template advertised for Auto composition preserves its guarantees under the parent run&#39;s limits and recovery behavior.</p>
164
+ <h3 id="d4--optional-reuse-adaptation-and-saving-from-auto">D4 — optional reuse, adaptation, and saving from Auto</h3>
165
+ <p><strong>Outcome:</strong> Auto can build fresh, reuse, or combine compatible templates without being required to choose one.</p>
166
+ <ul>
167
+ <li>Give the coordinator a compact eligible catalog with applicability, inputs/outputs, required capabilities, estimated overhead where known, and adaptation limits. Preserve direct task generation as an equally valid path.</li>
168
+ <li>Accept a versioned template reference, inputs, role assignments, and bounded patch. Resolve and expand it on the server, then validate it alongside generated tasks against the same requirements, permissions, ownership, verification rules, and budgets.</li>
169
+ <li>Show which work was generated, reused, or adapted and why. Validate composition boundaries explicitly; reject cycles, incompatible artifacts, invalid role assignments, and attempts to remove required checks. An unavailable optional template can lead to a fresh valid plan; an explicitly selected mandatory template produces a visible blocker.</li>
170
+ <li>Distinguish an in-run adaptation from a library upgrade. Adapting the current plan does not mutate its source template. An agent may propose an improved version with a comparison and supporting evidence; a user saves/publishes it explicitly. Revalidate the new version before enabling it for Auto.</li>
171
+ <li>Add “Save as template” for a completed run or selected reusable portion. Preview parameterized inputs, roles, steps, and guarantees before saving. Capture the reusable method, not a transcript, one-off findings, secret values, or a promise that future runs will pass.</li>
172
+ </ul>
173
+ <p><strong>Primary code:</strong> coordinator schemas/prompts, template resolution/validation, <code>src/patterns/team-strategies.ts</code>, <code>ui/run.tsx</code>, <code>ui/run-actions.tsx</code>, and template-library UI.</p>
174
+ <p><strong>Exit evidence:</strong> the same task can use a fresh plan, a template, or an adapted template through the same runtime; saved template versions stay unchanged until explicitly published.</p>
175
+ <h3 id="d5--composer-advanced-and-default-migration">D5 — composer, Advanced, and default migration</h3>
176
+ <p><strong>Outcome:</strong> the primary choice is Auto or Solo; reusable patterns and their design controls live in Advanced.</p>
177
+ <ul>
178
+ <li>Replace the main pattern selector with directly accessible Auto and Solo controls. Put template selection and the template designer in Advanced. Keep the active template name visible in the composer summary when one is selected, so a constrained template run is not mistaken for unrestricted dynamic planning.</li>
179
+ <li>The Advanced designer supports parameters, roles/provider preferences, task dependencies, artifact contracts, required checks, and supported bounded control primitives. Include validation errors and an expanded-plan preview; support editing, version comparison, copying, and import/export using the same server schema.</li>
180
+ <li>Keep reasoning effort and resource controls separate. Validate each selected provider&#39;s supported settings; do not translate an effort label into additional tool authority or assume provider labels have identical meaning.</li>
181
+ <li>Default fresh/unconfigured sessions to Auto, and make the Auto control explicitly return to dynamic planning without a mandatory template. Preserve existing explicit Solo/project/workflow choices; map saved fixed-pattern choices to their Advanced template. When old storage cannot distinguish an implicit default from an explicit choice, preserve it and make Auto easy to select.</li>
182
+ <li>Decouple the application default from the historical evaluation stage. Retain measured evidence, diagnostics, and the new-run disable switch; changing the product default must not fabricate a successful quality evaluation. If Auto is disabled or cannot launch under the current policy, explain the reason and offer Solo or a compatible template without silently changing modes.</li>
183
+ <li>Preserve configured plan approvals, unattended authorization, external-source restrictions, and legacy automation/API behavior. A default change does not authorize spending, tool access, or an extra approval bypass.</li>
184
+ </ul>
185
+ <p><strong>Primary code:</strong> <code>ui/composer.tsx</code>, <code>ui/state.ts</code>, <code>ui/onboarding.tsx</code>, project defaults, run views, <code>src/team-evaluation.ts</code>, and API/automation compatibility paths. Update usage documentation only when the behavior ships.</p>
186
+ <p><strong>Exit evidence:</strong> a new user starts in Auto, switches to Solo with one action, and can design/run a template in Advanced; existing saved choices and automations retain their meaning.</p>
187
+ <h3 id="d6--acceptance-and-delivery-sequence">D6 — acceptance and delivery sequence</h3>
188
+ <p>Implement <strong>D0 → D1 → D2 → D3 → D4 → D5</strong>, adding focused tests with each change. D6 is the release acceptance pass. The template designer and migration work may be developed once D2&#39;s schema is stable, but changing the default follows runtime and permission verification. Do not rebuild the scheduler or storage engine merely to support this revision.</p>
189
+ <div class="table-scroll" tabindex="0"><table>
190
+ <thead>
191
+ <tr>
192
+ <th>Acceptance scenario</th>
193
+ <th>Required evidence</th>
194
+ </tr>
195
+ </thead>
196
+ <tbody><tr>
197
+ <td>Fresh install, no templates</td>
198
+ <td>Auto generates and completes an appropriate plan; template lookup is optional.</td>
199
+ </tr>
200
+ <tr>
201
+ <td>Small task and Solo</td>
202
+ <td>Auto avoids unnecessary parallel workers; explicit Solo launches no delegated agents, including hidden native delegation.</td>
203
+ </tr>
204
+ <tr>
205
+ <td>Mixed-provider feature</td>
206
+ <td>Eligible Claude/Codex or other workers inherit the run policy, use narrower turn access where required, and complete checks and independent review.</td>
207
+ </tr>
208
+ <tr>
209
+ <td>Provider replacement</td>
210
+ <td>A replacement preserves the run policy; unsupported mandatory enforcement prevents dispatch instead of weakening restrictions.</td>
211
+ </tr>
212
+ <tr>
213
+ <td>Template parity and composition</td>
214
+ <td>Advanced and Auto use the same tested template semantics; test-first protection, race isolation, loop bounds, and review-only constraints survive adaptation.</td>
215
+ </tr>
216
+ <tr>
217
+ <td>Template migration and isolation</td>
218
+ <td>Legacy library import is idempotent; permissions/auth bindings are not restored; personal/project access boundaries hold.</td>
219
+ </tr>
220
+ <tr>
221
+ <td>Recovery during execution</td>
222
+ <td>Recorded plan/template/policy revisions remain pinned; completed results are retained; current revocations stop affected new work.</td>
223
+ </tr>
224
+ <tr>
225
+ <td>Adapt and save</td>
226
+ <td>An adapted run can create a new template version; the original and all previously started runs remain unchanged.</td>
227
+ </tr>
228
+ <tr>
229
+ <td>Compatibility</td>
230
+ <td>Saved runs, explicit preferences, automations, extension patterns, remote execution, and the Auto disable switch retain documented behavior.</td>
231
+ </tr>
232
+ </tbody></table>
233
+ </div><p>Use focused tests in the existing Auto/team scheduler/replay/strategy suites, adapter and approval tests, composer/library tests, and browser flows. Add bounded real-provider checks for enforcement claims; fake-agent tests verify orchestration but cannot establish sandbox equivalence. Run typecheck, relevant tests, the build, and documentation/link checks appropriate to the implementation. Report unavailable provider checks as unverified.</p>
234
+ <p>The complete release demonstration starts in default Auto, builds a plan without requiring a template, optionally reuses an enabled template, runs workers across providers under the run policy, recovers from interruption, and delivers verified results. The user can then save the reusable strategy, inspect it in Advanced, or start the next task in Solo.</p>
235
+ <p>Critical review fixes (21 October 2026):</p>
236
+ <ul>
237
+ <li>Removed the engine startup opt-out, inherited parent trust/approval ceilings and execution boundaries, and sent the full validated policy to remote workers.</li>
238
+ <li>Revalidated installed native controls on every launch; rejected unavailable approval transports and strict-boundary/approval combinations. Codex overrides ambient writable roots, temporary write exemptions, approval policy and network settings. Claude explicitly disables Chrome when external tools are forbidden.</li>
239
+ <li>Serialized follow-up permission mutations, validated recovered policy records, and preserved mandatory requirements across revisions and child runs.</li>
240
+ <li>Preserved template dependency types and global acceptance criteria; template revisions cannot replace original instructions or widen owned paths.</li>
241
+ <li>Updated built-in provider defaults to Claude/Codex. New runs using unverified Antigravity, ACP or extension adapters are rejected; legacy adapter-level compatibility remains separately tested.</li>
242
+ </ul>
243
+ <p>These checks establish adapter behavior using deterministic CLIs and local capability probes. They do not establish equivalent operating-system enforcement across providers, or disable arbitrary subprocesses launched through an authorized shell.</p>
244
+ <p>Review validation: the full regression run passed 1,218 tests with eight skips and no failures. All 11 targeted browser scenarios passed, along with 28 focused inheritance/recovery/template tests. The final adapter and approval refinements passed nine adapter tests and the focused approval test. Typecheck, production build, and diff whitespace checks passed. Live-provider sandbox enforcement was unverified at that checkpoint; the 2026-10-21 report below records the subsequent bounded live probes.</p>
245
+ <h2 id="revision-3-baseline-and-historical-implementation-record">Revision 3 baseline and historical implementation record</h2>
246
+ <p>Prepared 17 October 2026 against repository revision <code>ee246c7</code>. Revised against <a href="dynamic-teams-plan-review-0.html">Review 0</a>. Phase numbers below supersede the original ordering; the review remains a record of the original proposal.</p>
247
+ <p>Implementation is based on <code>main</code> at <code>8cb3641</code>, including its checked review findings and fail-to-pass proofs. Sections describing the original repository baseline below are historical design context, not claims about the updated code.</p>
248
+ <h3 id="implementation-status">Implementation status</h3>
249
+ <div class="table-scroll" tabindex="0"><table>
250
+ <thead>
251
+ <tr>
252
+ <th>Work package</th>
253
+ <th>Delivered</th>
254
+ </tr>
255
+ </thead>
256
+ <tbody><tr>
257
+ <td>P0 + Slice 0</td>
258
+ <td>Opt-in Auto team, strict provider-compatible schemas, composition rules, approval, independent members, capability inventory, verification and launch budgets</td>
259
+ </tr>
260
+ <tr>
261
+ <td>P1</td>
262
+ <td>Fail-closed fsynced journal, incomplete-tail recovery, deterministic completion/command replay, crash recovery, SSE restart reconciliation and measured replay bytes/time</td>
263
+ </tr>
264
+ <tr>
265
+ <td>P2</td>
266
+ <td>Member/session/settings/usage identity, isolated writers, typed knowledge/artifact/completion dependencies, integration SHA inputs, stale-attempt rejection and bounded replacement</td>
267
+ </tr>
268
+ <tr>
269
+ <td>P3</td>
270
+ <td>Private checkpoints, team proposals/contracts/findings, attributable project retrieval/promotion, inspector/CAS/retention/deletion, exact-revision relevance feedback and fixture/real-run retrieval measurements</td>
271
+ </tr>
272
+ <tr>
273
+ <td>P4</td>
274
+ <td>Event-driven ready-work dispatch, atomic mailbox commands/receipts, request/wait/deadline state, idle answer turns, immediate/duplicate replies, cycle/unavailable escalation and replayed completion batches</td>
275
+ </tr>
276
+ <tr>
277
+ <td>P5</td>
278
+ <td>Bounded expansion/retirement, safe handovers, compact coordinator checkpoints, declarative reusable subplans, affected-evidence invalidation, shared Supervisor decomposition/integration primitives and saved-wave compatibility</td>
279
+ </tr>
280
+ <tr>
281
+ <td>P6</td>
282
+ <td>Scoped Claude/Codex MCP bridge, expiring member credentials, server-derived authority, durable inbox/memory tools, agent-origin live steering with queued fallback, explicit capability/nested-agent limits and real CLI smoke checks</td>
283
+ </tr>
284
+ <tr>
285
+ <td>P7</td>
286
+ <td>Composer and workflow/inbox/context/memory views, approval and blockers, phone/automation integration, bounded follow-ups, explicit in-flight goal revisions, parent-context/source-trust retention and new-run disable switch</td>
287
+ </tr>
288
+ <tr>
289
+ <td>P8</td>
290
+ <td>Fault/compatibility/browser tests, isolated fake and real paired evaluation runner, immutable versioned reports, approval/memory/replay/coordination measurements and a recorded rollout decision whose beta/default stages are evidence-gated (the stage is a label and a composer default; availability is controlled by <code>CODEFLOW_AUTO_TEAM_ENABLED</code>)</td>
291
+ </tr>
292
+ </tbody></table>
293
+ </div><p>The user&#39;s instruction to implement all remaining phases explicitly opened P4/P6 on 17 October 2026. Their original sampling gates remain below as historical decision criteria; the implementation does not claim that a 20-run/100-turn latency experiment has been completed. The reproducible no-barrier fixture demonstrates the scheduling order (a dependent starts before an unrelated slow worker ends); it measures no benefit. Real model quality, overhead and default rollout are assessed separately in the evidence report.</p>
294
+ <p>The storage decision is to retain the single-writer JSONL journal. One durable command envelope contains question/wait effects and its receipt; replayed drain batches and completion order provide the required logical atomicity. Disposable projections, rather than an outbox, database, leases or a new runtime baseline, remain sufficient. Node 20/22 CI configuration is preserved.</p>
295
+ <p>The rollout decision is <strong>experimental/opt-in</strong>. Implementing the rollout gate does not force promotion: the initial real comparisons expose bounded-time failures and coordination overhead, so there is no evidence for making Auto the default. Unknown vendor-native usage remains unknown; unsupported adapters retain their structured-outcome path.</p>
296
+ <h2 id="1-product-promise-and-delivery-decision">1. Product promise and delivery decision</h2>
297
+ <blockquote>
298
+ <p>Give code-flow a task; it assembles an appropriate team from your available agents, coordinates their work, and delivers a verified result with reusable project knowledge.</p>
299
+ </blockquote>
300
+ <p>The user should not need to choose an orchestration pattern. A coordinator investigates the goal, proposes members and a workflow, gets plan approval according to the user&#39;s settings, and adapts the work as evidence arrives. Small tasks should produce small teams. Success means satisfying the task with evidence, not creating more agents.</p>
301
+ <p><strong>Build Slice 0 before a storage migration, a new scheduler, or a mailbox service.</strong> It is an opt-in <strong>Auto team</strong> pattern on the existing engine: coordinator planning, plan approval, dependency waves, addressed questions in structured outcomes, bounded revisions, and independent verification. Minimal private checkpoints and team contracts are part of that slice. Reusable project memory follows execution data in Phase 3; Slice 0 does not claim to deliver that part of the promise yet.</p>
302
+ <p>The long-term architecture stays the same: code-flow owns member identities, workflows, communication, and three memory scopes across official vendor CLI sessions. The delivery order changes so real runs determine how much infrastructure is needed.</p>
303
+ <pre><code class="language-mermaid">flowchart TD
304
+ Goal[User goal and constraints] --&gt; Plan[Coordinator proposes team and tasks]
305
+ Plan --&gt; Policy[Runtime validates composition and limits]
306
+ Policy --&gt; Approval[Approve, revise, or reject under user settings]
307
+ Approval --&gt; Waves[Execute ready tasks; replay saved waves]
308
+ Waves --&gt; Outcomes[Artifacts, checkpoints, findings, questions]
309
+ Outcomes --&gt; Revise[Bounded coordinator revision when needed]
310
+ Revise --&gt; Policy
311
+ Outcomes --&gt; Verify[Integrate, check, independent review]
312
+ Verify --&gt; Result[Result with evidence and unresolved gaps]
313
+ Result --&gt; Promotion[Reviewed project-memory proposals]
314
+ Waves &lt;--&gt; Journal[Existing replay journal]
315
+ Outcomes --&gt; View[Run snapshot and SSE team view]
316
+ </code></pre>
317
+ <h2 id="2-what-we-reuse-and-what-actually-needs-changing">2. What we reuse, and what actually needs changing</h2>
318
+ <div class="table-scroll" tabindex="0"><table>
319
+ <thead>
320
+ <tr>
321
+ <th>Foundation</th>
322
+ <th>Existing behavior</th>
323
+ <th>Planned extension</th>
324
+ </tr>
325
+ </thead>
326
+ <tbody><tr>
327
+ <td><code>src/patterns/supervisor.ts</code></td>
328
+ <td>Read-only decomposition, contracts, approval, parallel workers, integration and review</td>
329
+ <td>Generate individual members, execute dependency waves, revise assignments and route questions</td>
330
+ </tr>
331
+ <tr>
332
+ <td><code>TeamContext.decide()</code> / <code>remember()</code></td>
333
+ <td>Completed decisions and operations replay from the journal</td>
334
+ <td>Stable task/wave/attempt identities and deterministic application of recorded revisions</td>
335
+ </tr>
336
+ <tr>
337
+ <td><code>src/store.ts</code></td>
338
+ <td>Ordered JSONL writes, a synced replay journal, one-server lock</td>
339
+ <td>Surface control-write failures; add batch records/snapshots only where required</td>
340
+ </tr>
341
+ <tr>
342
+ <td><code>TeamContext.ask()</code> and adapters</td>
343
+ <td>Official CLIs, sessions, structured output, retries, cancellation</td>
344
+ <td>Member identity and validated member-specific settings, without replacing adapters</td>
345
+ </tr>
346
+ <tr>
347
+ <td><code>src/routing.ts</code>, <code>src/stats.ts</code></td>
348
+ <td>Availability/quota signals and repository outcome ranking</td>
349
+ <td>Apply these inputs to a validated team composition policy; allow repeated providers</td>
350
+ </tr>
351
+ <tr>
352
+ <td><code>src/git.ts</code>, engine worktree/check methods</td>
353
+ <td>Isolated worktrees, replay-aware commits and checks</td>
354
+ <td>Dependency inputs pinned to integration commits, explicit verification coverage</td>
355
+ </tr>
356
+ <tr>
357
+ <td>Notes and Codex steering</td>
358
+ <td>User-origin notes addressed by provider; some live input</td>
359
+ <td>Member addressing and agent-origin messages kept separate from user instructions</td>
360
+ </tr>
361
+ <tr>
362
+ <td><code>src/context.ts</code>, <code>src/learnings.ts</code>, <code>src/projects.ts</code></td>
363
+ <td>Conventions, attachments, recurring findings, project membership</td>
364
+ <td>Scoped checkpoints and attributable memory, with enforced promotion rules</td>
365
+ </tr>
366
+ <tr>
367
+ <td>Run snapshot, SSE and composer</td>
368
+ <td>Existing pattern selection, approvals and live steps</td>
369
+ <td>Auto team choice, roster/tasks/questions and coordination metrics from Slice 0</td>
370
+ </tr>
371
+ </tbody></table>
372
+ </div><h3 id="recovery-correction">Recovery correction</h3>
373
+ <p><code>remember()</code> already journals the result of <code>decide()</code>&#39;s underlying agent call. A deterministic pattern replays completed coordinator decisions; it does not ask the model to invent its team again. Dynamic planning therefore does not, by itself, require a new recovery model.</p>
374
+ <p><code>journalEntry()</code> calls <code>appendLine(..., { sync: true })</code>, and the journal write is awaited before the pattern continues. Ordinary event-log writes do not fsync each event. However, <strong>both paths currently use <code>appendLine()</code>, which catches write errors, increments <code>writeHealth</code>, and resolves</strong>. The journal has a durability mechanism but does not fail closed when that mechanism fails. Slice 0 should add narrowly scoped error propagation for authoritative journal writes and update the in-memory journal only after successful persistence. This is a small hardening change, not a database migration.</p>
375
+ <p>Replay remains appropriate while execution is a bounded sequence of waves and recorded outcomes. Long-lived mailboxes, asynchronous wakeups outside those waves, or expensive replay could justify another driver later. Phase 4 has an evidence gate for that decision.</p>
376
+ <h3 id="compatibility-facts">Compatibility facts</h3>
377
+ <ul>
378
+ <li><code>AgentId</code> is a provider (<code>claude</code>, <code>codex</code>, <code>agy</code>), not an individual worker. Existing role routing deduplicates providers within a role; dynamic member IDs must bypass that deduplication without changing manual-pattern semantics.</li>
379
+ <li>Node 20 is supported and in CI. Preserve it for this plan. SQLite is not a prerequisite; any later driver proposal must explicitly address Node, packaging and platform support.</li>
380
+ <li>Resume currently gives a fresh step/time budget. Slice 0 preserves this documented behavior for an explicit user resume, while reporting lifetime usage separately. A replayed wave never resets its recorded wave/repair counters. Internal retries do not silently grant a fresh budget.</li>
381
+ <li>There are four <code>findPattern()</code> call sites in engine/server code. Register <code>auto-team</code> normally. Older versions already reject an unknown pattern on resume; no new execution-mode framework is necessary for Slice 0. Future incompatible plan schemas need an explicit version check.</li>
382
+ <li>SSE reconnect cursors currently apply within one server start. Improving cross-restart reconnect helps legacy runs too and can ship independently.</li>
383
+ </ul>
384
+ <h2 id="3-invariants-to-keep">3. Invariants to keep</h2>
385
+ <ol>
386
+ <li><strong>Agents propose; the runtime validates and verifies.</strong> A coordinator cannot delete user requirements, increase its budget, raise trust, or authorize publishing through a plan revision.</li>
387
+ <li><strong>Individual identity is independent of provider.</strong> Two Codex members have different IDs, context, sessions, assignments and usage attribution.</li>
388
+ <li><strong>One active turn per member/session, one writer per worktree.</strong> Reassignment reconciles the previous process before starting another writer. Never pass a session ID between providers.</li>
389
+ <li><strong>Persist accepted control state before acting on it.</strong> A failed authoritative write stops new dependent dispatch. UI projections are not a second source of truth.</li>
390
+ <li><strong>Replay completed decisions.</strong> Stable identities, recorded inputs and deterministic ordering reproduce accepted plans. Current clock/quota/filesystem state must not silently change an already-recorded branch during replay.</li>
391
+ <li><strong>Messages are not user authorization.</strong> Sender identity and source trust come from code-flow. Ordinary output text is never parsed as executable control commands.</li>
392
+ <li><strong>Waiting releases capacity.</strong> A member needing information ends its turn with a checkpoint; it does not occupy a CLI slot waiting for another member.</li>
393
+ <li><strong>Verification applies to evidence.</strong> Unknown or unrunnable is not a pass. A gap must never become success merely because all runnable tasks ended.</li>
394
+ <li><strong>Project memory has an enforced trust boundary.</strong> A locked-down or otherwise untrusted source cannot automatically create instructions for future runs.</li>
395
+ <li><strong>No exactly-once model-execution claim.</strong> A process can finish external work before its result is stored. Recovery reconciles artifacts and uses idempotent logical operations; transport or execution can repeat.</li>
396
+ </ol>
397
+ <h2 id="4-define-appropriate-team-before-implementation">4. Define “appropriate team” before implementation</h2>
398
+ <p>These are proposed, testable defaults for the opt-in experiment. Record them in the plan and fixtures, rather than leaving them to a coordinator prompt.</p>
399
+ <div class="table-scroll" tabindex="0"><table>
400
+ <thead>
401
+ <tr>
402
+ <th>Rule</th>
403
+ <th>Initial policy and validation</th>
404
+ </tr>
405
+ </thead>
406
+ <tbody><tr>
407
+ <td>User constraints</td>
408
+ <td>Preserve provider/model pins, trust, allowed paths, check commands and budgets. Reject revisions that exceed them.</td>
409
+ </tr>
410
+ <tr>
411
+ <td>Availability</td>
412
+ <td>Choose installed, usable providers. Reuse <code>exhausted()</code> signals, including near-full windows and recent authentication failures. Unknown quota is labeled unknown.</td>
413
+ </tr>
414
+ <tr>
415
+ <td>All providers exhausted</td>
416
+ <td>Auto team pauses or reports a routing blocker; it does not silently spend against a known exhausted provider. This is stricter than current <code>resolveAuto()</code>, which can fall back to exhausted candidates with a warning. Explicit user choices remain visible.</td>
417
+ </tr>
418
+ <tr>
419
+ <td>Provider ranking</td>
420
+ <td>Use existing repository pass-history ranking among eligible providers, with its existing fallback order. Treat it as a prior with limited evidence, not a universal skill score.</td>
421
+ </tr>
422
+ <tr>
423
+ <td>Small teams</td>
424
+ <td>Start with a coordinator, one worker and an independent reviewer. Allow a second worker only for tasks whose ownership/dependencies permit useful parallel work, with a stated reason. A read-only task may use the coordinator as its investigator.</td>
425
+ </tr>
426
+ <tr>
427
+ <td>Size bounds</td>
428
+ <td>Default maximum four active members including coordinator/reviewer, twelve tasks across accepted revisions, four execution waves, and two repair rounds. Reject expansion beyond the approved limits. These are experiment settings, not measured optima.</td>
429
+ </tr>
430
+ <tr>
431
+ <td>Review independence</td>
432
+ <td>Reviewer is a separate member/session, read-only, and cannot approve work it authored. Prefer a different provider from the primary author; record any same-provider fallback. If the user&#39;s policy requires different providers and none is eligible, report the blocker.</td>
433
+ </tr>
434
+ <tr>
435
+ <td>Same-provider workers</td>
436
+ <td>Allowed when useful. Member IDs, not provider strings or display names, identify tasks and communications.</td>
437
+ </tr>
438
+ <tr>
439
+ <td>Models and effort</td>
440
+ <td>Choose from the supplied supported/configured settings or the provider default. Do not invent a model name. Explicit user settings win.</td>
441
+ </tr>
442
+ <tr>
443
+ <td>Workflow validity</td>
444
+ <td>Unique IDs, existing owners, acyclic dependencies, bounded expansion, acceptance criteria for required tasks, and requirement coverage. Reject silent requirement removal.</td>
445
+ </tr>
446
+ <tr>
447
+ <td>Ownership</td>
448
+ <td>Concurrent tasks need compatible declared ownership; actual changed paths are checked before integration. Shared-file work is ordered or assigned to an integration task.</td>
449
+ </tr>
450
+ <tr>
451
+ <td>Task kind</td>
452
+ <td>Implementation requires applicable checks/review; investigation/design can succeed with an accepted evidence-bearing artifact and no code changes.</td>
453
+ </tr>
454
+ </tbody></table>
455
+ </div><p>The first plan includes stable requirement IDs, editable acceptance criteria, members and rationale, provider/model/effort settings, tasks/dependencies, ownership, contracts, verification requirements, and a turn estimate with a hard cap. Estimates must distinguish known bounds from uncertain token use.</p>
456
+ <h3 id="approval-and-revision-policy">Approval and revision policy</h3>
457
+ <p>Use the existing <code>ctx.approve(&quot;plan&quot;, ...)</code> checkpoint before dispatching workers. Show the proposed team, settings, tasks, acceptance criteria, constraints and estimated turns. Approve, revise and reject must all work. Approval pauses the run clock and its recorded answer replays on resume.</p>
458
+ <p>For a newly selected Auto team, default plan approval on; honor explicit saved choices and existing automation authorization. The initial planning call itself consumes quota, which the composer should make clear. When approval is disabled, still record the validated plan and why no interactive checkpoint was required.</p>
459
+ <p>Routine reassignment or repair within the approved scope can proceed and remains visible. A user-requested goal change produces a new requirement/plan revision and goes through the same configured checkpoint before affected new work. Any proposal exceeding authorized providers, spending limits, permissions or scope requires the relevant user decision; the coordinator cannot approve that increase. Stop or finish the current turn safely before changing its inputs.</p>
460
+ <h3 id="coordination-budget-and-measurements">Coordination budget and measurements</h3>
461
+ <p>Use actual CLI invocations, including schema repair and retry invocations, for coordination accounting. Existing logical <code>agentSteps</code> alone may not expose every underlying retry; add attribution at the launch boundary. Report steps, input/output/cache tokens, elapsed time, and provider-reported API-equivalent cost separately. Missing token/cost reports are unknown, not zero, and API-equivalent cost is not a subscription bill.</p>
462
+ <p>For the initial experiment, with an approved invocation budget <code>B &gt;= 4</code>, reserve at most <code>min(4, floor(B / 4))</code> coordinator invocations. Count initial planning, approval-driven replanning and wave revisions against this ceiling. Enforce the total execution limits too; reserve room for required review and checks before admitting more work. If the budget cannot fund a valid plan, explain that before worker dispatch.</p>
463
+ <p>This caps coordination at 25% of the <em>authorized invocation budget</em>, not necessarily 25% of actual spend. A tiny run may use one coordinator turn out of three total turns. Report the observed fraction honestly. Use 25% observed coordinator turns on multi-worker runs as an initial evaluation target, not an asserted result or a runtime rule that could deadlock startup.</p>
464
+ <p>At the coordination ceiling, run only already-authorized ready work and verification that fit the remaining budget. Do not create additional tasks or keep calling the coordinator. Return explicit gaps if another planning decision is required. User resume retains today&#39;s fresh-budget behavior; expose both the new allocation and cumulative spend. Automatic crash recovery must not be used as a budget-reset mechanism.</p>
465
+ <h2 id="5-slice-0--demonstrate-the-promise-on-the-existing-engine">5. Slice 0 — demonstrate the promise on the existing engine</h2>
466
+ <p><strong>Outcome:</strong> a user chooses Auto team, describes a task, approves the generated team/plan, and sees it execute and adapt without choosing a team pattern. This is the first user-visible milestone.</p>
467
+ <p>Implement Slice 0 alongside the small Phase 0 contract work. It does not wait for Phases 1–4.</p>
468
+ <h3 id="51-plan-and-replay">5.1 Plan and replay</h3>
469
+ <p>Add <code>src/patterns/auto-team.ts</code>, register <code>auto-team</code>, and use <code>TeamContext.decide()</code> with <code>TEAM_PLAN_SCHEMA</code>. Reuse supervisor planning, approval, worktree, integration and review behavior where practical.</p>
470
+ <p>Journal the planning inventory and relevant policy inputs before using them: provider availability/quota observations, configured settings, task limits and base commit. Validate completed decisions against their recorded input revision on replay; refresh availability at a new dispatch boundary through a new recorded observation. Do not recompute historical routing from today&#39;s quota or clock.</p>
471
+ <p>Use stable identities such as <code>plan:0</code>, <code>wave:2</code>, and <code>task:api:attempt:1</code>. Create all task/attempt identities and a sorted wave membership before parallel dispatch. Keep unrelated operations out of those identity counters. Reconstruct the roster, sessions and questions from recorded outcomes; an <code>onStart</code> callback that does not run during replay cannot be the sole source of that state.</p>
472
+ <h3 id="52-individual-members-and-workspace-handling">5.2 Individual members and workspace handling</h3>
473
+ <p>Store a small member map within the pattern&#39;s replayable state. Add an optional <code>memberId</code> to step/ask metadata and a validated per-call settings override so two members on the same provider can actually use different configured models. Preserve existing role/provider settings as the fallback for legacy patterns.</p>
474
+ <p>Associate each member with its current session lineage and workspace. Resume the same session only with its compatible provider and workspace. A new task in a different worktree gets a fresh session plus a portable checkpoint; do not assume a provider can safely resume a conversation in a different directory. Keep one active assignment per member.</p>
475
+ <p>Create a task&#39;s worktree from the recorded integration HEAD containing its required upstream artifacts. A yielded task keeps its existing worktree and checkpoint. Reconcile any newer dependency commits only while that task is idle, then record the new input revision. A message describing code does not make that code available in another worktree.</p>
476
+ <h3 id="53-execute-dependency-waves">5.3 Execute dependency waves</h3>
477
+ <p>Select ready tasks deterministically, respecting dependencies, ownership, available members and global slots. Use <code>ctx.parallel()</code> and <code>allowFailure: true</code> for expected worker failures; retain run-wide stopping for unsafe process/storage/workspace failures.</p>
478
+ <p>Each turn produces a validated <code>TASK_OUTCOME_SCHEMA</code> with:</p>
479
+ <ul>
480
+ <li>task/member/attempt identity and <code>submitted</code>, <code>needs_info</code>, or <code>failed</code> status;</li>
481
+ <li>an observable checkpoint, artifact references and unresolved requirements;</li>
482
+ <li>addressed questions/replies, contract proposals and evidence-bearing findings;</li>
483
+ <li>the input/contract revisions the result relied on.</li>
484
+ </ul>
485
+ <p>A <code>needs_info</code> result ends the CLI turn and releases its slot. Preserve partial edits for that task; do not merge them as a completed dependency. Integrate submitted artifacts serially, handle conflicts through existing controlled repair, and run applicable checks. Downstream work starts only once its required artifacts and acceptance conditions are available.</p>
486
+ <p>An agent saying “submitted” does not make its task verified. Code changes must pass the declared verification policy. No-change investigation tasks are evaluated against their artifact criteria.</p>
487
+ <h3 id="54-questions-answers-and-revision-between-waves">5.4 Questions, answers and revision between waves</h3>
488
+ <p>Represent communication as addressed records in the structured outcomes. A question has a stable request ID, sender, recipient, task, body, source provenance, and whether it blocks progress. A reply references that request ID. The runtime supplies authenticated identities rather than trusting model-written sender fields.</p>
489
+ <p>After a wave, deterministically route known replies and evaluate ready work. Call the coordinator only when a decision is needed, at most once per wave within its budget. <code>REVISION_SCHEMA</code> can propose new bounded tasks, reassignments, accepted contracts, answer tasks, evidence-backed answers, or a completion proposal. Validate the patch against the previous revision and apply it before scheduling.</p>
490
+ <p>If the recipient already supplied the answer, deliver it in the requester&#39;s next prompt. Otherwise schedule a short response task for that member in the next wave. The coordinator may answer from evidence or reroute the question, but cannot manufacture a missing requirement. Questions requiring user judgment become a visible input blocker. No-ready-work and cyclic waits produce a bounded escalation instead of empty waves or endless coordination.</p>
491
+ <p>This is cross-agent communication at turn boundaries. No separate mailbox daemon, live tool bridge, delivery table, outbox, or lease is required. The coordinator does not need to rewrite every answer: addressed contents pass through to the appropriate member.</p>
492
+ <p>Update the Auto team worker framing in <code>src/patterns/prompts.ts</code> so it explains <code>needs_info</code> rather than saying nobody can answer. Update relevant Codex app-server input-denial guidance to point Auto members at the structured protocol. Keep native permission requests subject to existing policy; supporting questions does not authorize new tool permissions.</p>
493
+ <h3 id="55-minimal-memory-and-context">5.5 Minimal memory and context</h3>
494
+ <p>Start with three small replayable objects:</p>
495
+ <ul>
496
+ <li><strong>Private checkpoint:</strong> current assignment, attempted approaches, observable progress, unresolved questions and relevant session/worktree references, scoped to that member.</li>
497
+ <li><strong>Team state:</strong> accepted plan/contracts, shared findings, decisions, questions/replies and artifact references, selected for the current task.</li>
498
+ <li><strong>Context manifest:</strong> the input commit, plan/contract revisions, message IDs and checkpoint used for each turn.</li>
499
+ </ul>
500
+ <p>Keep prompts bounded and send relevant deltas on resume. Record a compact coordinator checkpoint too: accepted plan, completed work, open decisions and remaining budget. Start a fresh coordinator session from that checkpoint when its context grows or resume fails; do not repeatedly send all worker transcripts.</p>
501
+ <p>Use existing conventions and attributable lessons as inputs; do not implement a new project-memory index yet. Auto team must not automatically write project knowledge from locked-down runs through <code>learn()</code> or another side path. <code>learn()</code> currently checks replay and the learning setting, not lockdown; the implementation must explicitly close that bypass for automatic learning, with a regression test.</p>
502
+ <h3 id="56-verify-display-and-measure">5.6 Verify, display and measure</h3>
503
+ <p>Use an independent read-only reviewer, bounded repairs and final checks on the integrated result. A review after repairs must refer to the current commit. Start check identity with commit SHA plus command and a setup fingerprint when applicable; requirement/contract changes invalidate affected acceptance/review evidence without invalidating every unrelated check merely because the plan number changed.</p>
504
+ <p>Completion is a runtime predicate: every required criterion has applicable evidence, required questions are resolved, and the integrated result matches that evidence. Use existing <code>setVerdict()</code>/<code>setFacts()</code> where their meaning fits, plus an additive team outcome/coverage projection. Do not force “completed with gaps” or an unknown check into a passed verdict.</p>
505
+ <p>Add the opt-in composer choice and a minimal roster/task/question view now, using the existing run snapshot and SSE. Agent-origin communications must not go through the existing user-note formatter unchanged. Show coordination usage as soon as the first planning call completes, then update it throughout execution.</p>
506
+ <p><strong>Likely files:</strong> new <code>src/patterns/auto-team.ts</code> and a small focused helper if needed; changes to <code>src/patterns/index.ts</code>, <code>src/patterns/schemas.ts</code>, <code>src/patterns/prompts.ts</code>, <code>src/engine.ts</code>, <code>src/store.ts</code>, <code>src/routing.ts</code>, <code>src/stats.ts</code>, <code>src/server.ts</code>, <code>ui/composer.tsx</code>, <code>ui/run.tsx</code>, shared UI types, and fake-agent fixtures. Avoid three new subsystem directories at this stage.</p>
507
+ <p><strong>Exit criteria:</strong> the composer-to-verified-result scenario in section 10 passes with fake agents; a completed initial decision replays without another model call; two same-provider members remain distinct; a question blocks only its dependent work; coordinator usage and question frequency are recorded; review/permission settings still apply. Real opt-in runs supply the first product measurements, not a prerequisite for offline CI.</p>
508
+ <h2 id="6-records-persistence-and-communication-as-they-grow">6. Records, persistence and communication as they grow</h2>
509
+ <p>The original record names remain useful domain concepts. They do not all need separate durable tables or independent state machines.</p>
510
+ <div class="table-scroll" tabindex="0"><table>
511
+ <thead>
512
+ <tr>
513
+ <th>Concept</th>
514
+ <th>Slice 0 representation</th>
515
+ <th>Split or extend when justified</th>
516
+ </tr>
517
+ </thead>
518
+ <tbody><tr>
519
+ <td>Run / workflow revision</td>
520
+ <td>Existing run plus versioned accepted plan and journaled revisions</td>
521
+ <td>Standalone workflow projection if event-driven execution needs it</td>
522
+ </tr>
523
+ <tr>
524
+ <td>Member</td>
525
+ <td>ID, role/provider/settings, session/workspace lineage</td>
526
+ <td>Derive running/waiting state from attempts and blockers; persist retirement/replacement decisions</td>
527
+ </tr>
528
+ <tr>
529
+ <td>Task / attempt</td>
530
+ <td>Accepted task graph plus recorded turn outcomes and existing steps</td>
531
+ <td>First-class attempt history during execution hardening</td>
532
+ </tr>
533
+ <tr>
534
+ <td>Message / request</td>
535
+ <td>Typed addressed records with optional request/reply reference</td>
536
+ <td>Durable per-member inbox when asynchronous delivery is needed</td>
537
+ </tr>
538
+ <tr>
539
+ <td>Delivery</td>
540
+ <td>Context manifest lists messages included in an attempt</td>
541
+ <td>Separate transport receipt only for live steering/tools</td>
542
+ </tr>
543
+ <tr>
544
+ <td>Memory revision</td>
545
+ <td>Member checkpoints and accepted team entries</td>
546
+ <td>Project store, revisions, retention and retrieval in Phase 3</td>
547
+ </tr>
548
+ <tr>
549
+ <td>Artifact / verification</td>
550
+ <td>Existing Git/check outputs plus task/criterion references</td>
551
+ <td>Additional evidence types as real tasks need them</td>
552
+ </tr>
553
+ <tr>
554
+ <td>Event / command receipt</td>
555
+ <td>Existing journal entries and stable operation IDs</td>
556
+ <td>Atomic batch and deduplication receipt for multi-record async commands</td>
557
+ </tr>
558
+ <tr>
559
+ <td>Outbox / lease</td>
560
+ <td>Not required by the wave pattern</td>
561
+ <td>Only if a measured execution architecture requires independent dispatch ownership</td>
562
+ </tr>
563
+ </tbody></table>
564
+ </div><p>Tasks can be planned, ready, running, waiting, submitted, verified, failed, cancelled or superseded. Attempts distinguish interrupted execution from a failed task. Member display status is derived. Keep explicit run outcomes for succeeded, completed with gaps, awaiting input, failed, stopped and cancelled; legacy cards can project these without changing their historical meaning.</p>
565
+ <h3 id="storage-requirements-and-default">Storage requirements and default</h3>
566
+ <p>Start with the existing single-writer store and journal. Required properties are durable acceptance, stable operation IDs, ordered replay, idempotent application and recoverable snapshots. If one command must update several control records, append one versioned batch envelope containing all those changes, then fsync before acknowledging it.</p>
567
+ <p>A filesystem append is <strong>not guaranteed physically atomic</strong>, even with one writer. Recovery must validate the complete framed record and apply the entire batch or none of it; an incomplete tail cannot expose partial logical changes. A damaged committed record in the middle of control history is a recovery error, not permission to skip a dependency. Test those semantics explicitly, including uncertain completion after a failed sync.</p>
568
+ <p>Use snapshots as disposable projections tied to a journal sequence/checksum, written through a temporary file and replacement with platform-appropriate durability checks. Replay the remaining tail; do not discard authoritative history before snapshot/retention rules make that safe. Keep existing one-server ownership and process cleanup.</p>
569
+ <p>Evaluate SQLite only if measured replay time, query volume, memory search or genuinely concurrent writers outgrow this model. Any proposal must compare complexity and durability, retain Node 20 or explicitly propose a platform change, and state install/backup/migration behavior. There is no mandatory database spike blocking Slice 0.</p>
570
+ <h3 id="delivery-semantics">Delivery semantics</h3>
571
+ <p>At turn boundaries, distinguish queued content from content recorded in an attempt&#39;s context manifest. A manifest describes intended inclusion; a completed turn provides evidence of execution. A protocol acknowledgement is not proof of comprehension. A question is resolved by an accepted reply or an explicit recorded resolution, not a delivery receipt.</p>
572
+ <p>Use stable IDs and idempotent application across repeated turns. Live transport later adds accepted-steering receipts without changing request semantics. Never allow two concurrent resumes of one session, and never acknowledge a control operation before its authoritative write succeeds.</p>
573
+ <p>Keep domain operations independent of HTTP/MCP: <code>send_message</code>, <code>ask_member</code>, <code>reply_request</code>, <code>yield_task</code>, <code>publish_finding</code>, <code>propose_contract</code>, <code>submit_task</code>, and <code>request_help</code>. Structured results are the first transport across all adapters. Add bounded inbox/memory reads only when those stores exist.</p>
574
+ <p>Extend existing run snapshots and SSE before adding dedicated endpoints. Agent tools later call the same validated handlers with member-scoped credentials; user origin is derived from authenticated user requests, not a caller-supplied field.</p>
575
+ <h2 id="7-private-team-and-project-memory">7. Private, team and project memory</h2>
576
+ <div class="table-scroll" tabindex="0"><table>
577
+ <thead>
578
+ <tr>
579
+ <th>Scope</th>
580
+ <th>Purpose</th>
581
+ <th>Visibility and lifetime</th>
582
+ </tr>
583
+ </thead>
584
+ <tbody><tr>
585
+ <td>Private</td>
586
+ <td>Portable progress checkpoint, attempted approaches, unresolved work and session references</td>
587
+ <td>Only that member&#39;s assembled context; explicitly selected handover export; retained with the run under policy</td>
588
+ </tr>
589
+ <tr>
590
+ <td>Team</td>
591
+ <td>Accepted contracts, plan, decisions, findings, questions and artifact references</td>
592
+ <td>Relevant members of the run; preserved across restart; archived with the run</td>
593
+ </tr>
594
+ <tr>
595
+ <td>Project</td>
596
+ <td>Durable conventions, architecture facts, test instructions and verified lessons</td>
597
+ <td>Applicable future runs in the project/repository; revision, invalidation and deletion controls</td>
598
+ </tr>
599
+ </tbody></table>
600
+ </div><p>Private means isolation in code-flow&#39;s context assembly and APIs. It is not filesystem secrecy from a fully trusted process on the same machine. Store concise observable checkpoints, not a claimed export of a model&#39;s internal reasoning. The user can inspect code-flow-owned records according to existing access policy.</p>
601
+ <h3 id="provenance-and-promotion-rules">Provenance and promotion rules</h3>
602
+ <p>Every shared item carries source run/task/artifact, originating source trust/lockdown, author, evidence, scope, relevant paths/commit, revision and status. Execution permission (<code>safe</code>, <code>standard</code>, etc.) and content provenance are separate: a read-only run can still read hostile source text.</p>
603
+ <ul>
604
+ <li>User-authored project rules can be saved directly under user authority.</li>
605
+ <li>Eligible agent-authored facts may be promoted under the configured verification policy after their evidence and target-branch applicability are established.</li>
606
+ <li>A locked-down run, or a proposal derived from untrusted content, cannot promote automatically. It stays a proposal until the user explicitly approves the specific content/revision.</li>
607
+ <li>Derived summaries, replies and handovers retain source provenance. A coordinator or independent reviewer repeating a claim cannot remove its untrusted origin. The server enforces this; agents cannot set their own trust fields.</li>
608
+ <li>Historical learnings with missing provenance are attributed observations, not automatically trusted conventions. The same promotion gate covers <code>learn()</code>, tool commands, summaries and imports.</li>
609
+ <li>Retrieval labels provenance, separates facts from suggestions, and cannot override current user constraints or tool permissions. Team messages inherit the run&#39;s restrictions and source labels.</li>
610
+ </ul>
611
+ <p>Memory about an unmerged implementation stays team-scoped unless explicitly marked and accepted as branch-specific project knowledge. Project-wide conventions must not be inferred from one branch&#39;s code. Recheck applicability when branch, repository membership or project ownership changes.</p>
612
+ <h3 id="selection-conflicts-and-deletion">Selection, conflicts and deletion</h3>
613
+ <p>Build each turn&#39;s context from the goal, assignment, applicable project entries, relevant team contracts, private checkpoint, pending messages and artifact/check references. Select by task, paths, tags, freshness and text search first. Store included revisions and omissions in the context manifest; introduce embeddings only when an evaluation shows a need.</p>
614
+ <p>Shared updates use expected revisions. Conflicts are visible and assigned to an owner; they do not silently overwrite accepted contracts. A changed contract identifies affected tasks and acceptance evidence.</p>
615
+ <p>Deletion covers memory-store bodies and derived memory records, including its snapshots and retrieval data; retained memory history contains deletion metadata. Project selection journals contain references rather than bodies. Source run transcripts and task checkpoints already recorded in the run journal, prompts already delivered to a CLI, provider-managed conversations and user-managed backups have separate retention. The current implementation does not claim to redact those source histories; broader run-history erasure requires a separate retention design. Test exclusions and scope isolation with actual workflow data.</p>
616
+ <h2 id="8-phases-after-slice-0">8. Phases after Slice 0</h2>
617
+ <p>The original default path was <strong>P0 + Slice 0 → P1 → P2 → P3 → P5 → P7 → P8</strong>, with conditional P4/P6 enhancements. The requested complete implementation includes all packages. Reliability, UI visibility and measurement begin in Slice 0, not at the final phase. Phase labels identify work packages, not a requirement to build every subsystem before release.</p>
618
+ <h3 id="phase-0--contracts-and-composition-policy-alongside-slice-0">Phase 0 — contracts and composition policy, alongside Slice 0</h3>
619
+ <p><strong>Deliver:</strong> plan/revision/outcome schemas, the section 4 validation rules, task-kind verification policies, fixtures and an adapter capability inventory. Record structured-output, session-resume, live-input, tool-configuration and sandbox support as tested/unsupported/unknown. Include Claude&#39;s tool allowlist and vendor-native subagent observability.</p>
620
+ <p><strong>Exit:</strong> valid/invalid plan fixtures cover duplicate members, unsupported settings, cycles, over-budget teams, reviewer independence and requirement removal. Slice 0&#39;s first PR can begin immediately; no platform migration blocks it.</p>
621
+ <p><strong>Code impact:</strong> existing pattern schemas and focused policy helpers. No broad engine extraction or new storage tree.</p>
622
+ <h3 id="phase-1--prove-recovery-and-harden-storage-where-needed">Phase 1 — prove recovery and harden storage where needed</h3>
623
+ <p><strong>Deliver:</strong> fault-injected recovery for Slice 0 and an architecture decision based on observed requirements. Verify strict journal writes, completed-plan replay, deterministic parallel identities, crash-after-Git recovery and no concurrent writer after restart. Add batch records/snapshots only for properties the existing journal cannot provide adequately.</p>
624
+ <p><strong>Exit:</strong> restart preserves accepted teams, completed decisions, pending questions and task identities; failed writes prevent dependent dispatch; incomplete records cannot yield partial plans; Node 20/22 CI remains supported. Record replay duration and data size before choosing an optimization.</p>
625
+ <p><strong>Likely files:</strong> <code>src/store.ts</code>, <code>src/engine.ts</code>, store/recovery tests. Keep JSONL; no outbox, leases or migrations merely to match the original plan.</p>
626
+ <h3 id="phase-2--harden-dynamic-execution-and-member-identity">Phase 2 — harden dynamic execution and member identity</h3>
627
+ <p><strong>Deliver:</strong> stable member/session metadata, task attempts, deterministic readiness, artifact inputs, stale-result rejection and fair admission through existing global slots. Make wave execution reusable only where another caller needs it. Keep verification and cancellation in the existing engine.</p>
628
+ <p>Define knowledge, artifact and completion dependencies separately. Do not dispatch a consumer merely because a message arrived when it actually needs merged code. Reassignment must stop/reconcile the old attempt and preserve portable progress. Reviewers retain scoped, independent context.</p>
629
+ <p><strong>Exit:</strong> same-provider members cannot receive one another&#39;s private context; downstream work gets the required integration SHA; stale attempts cannot overwrite replacements; cancellation terminates child processes/checks; changed evidence is reverified; missing required work cannot pass. Coordinator and worker usage remain separately visible.</p>
630
+ <p><strong>Likely files:</strong> Auto team helpers, <code>src/engine.ts</code>, <code>src/routing.ts</code>, <code>src/git.ts</code>, verification/recovery fixtures. Extract small shared helpers from supervisor where duplication is demonstrated; do not introduce an entirely separate executor pre-emptively.</p>
631
+ <h3 id="phase-3--grow-memory-from-observed-workflow-data">Phase 3 — grow memory from observed workflow data</h3>
632
+ <p><strong>Deliver:</strong> expand Slice 0&#39;s private/team records into versioned memory and add project retrieval, promotion, retention and deletion. Implement a basic inspector showing provenance and why an item was included. Use saved fixture traces and opt-in run data to tune relevance selection.</p>
633
+ <p>Apply the section 7 trust boundary at every write/promotion path. Add user approval for specific untrusted proposals, conflict resolution, branch applicability, lost-session reconstruction and project/repository scope checks.</p>
634
+ <p><strong>Exit:</strong> a later run reuses an eligible verified lesson without private-note leakage; an untrusted issue cannot inject a project convention directly or through a trusted-looking summary; stale branch facts are excluded; deletion removes content from retrieval and derived records; coordinator and worker recovery works without vendor sessions.</p>
635
+ <p><strong>Likely files:</strong> focused memory/context/promotion modules, <code>src/context.ts</code>, <code>src/learnings.ts</code>, <code>src/projects.ts</code>, a small memory UI. Introduce a directory only if the actual modules justify it.</p>
636
+ <h3 id="phase-4--event-driven-messaging">Phase 4 — event-driven messaging</h3>
637
+ <p><strong>Decision gate:</strong> evaluate at least 20 opt-in runs and 100 worker turns, alongside deliberately blocking fake-agent fixtures. These are initial sampling targets, not statistical guarantees. Open this phase if either at least 10% of worker turns yield for peer information, or at least 20% of runs lose more than 25% of active elapsed time to an avoidable wave barrier. Label counterfactual avoidable-delay estimates separately from directly measured waiting time. A reproducible correctness/liveness requirement beyond bounded waves can also justify the phase.</p>
638
+ <p>Before implementation, use traces or a small prototype to show that asynchronous scheduling reduces that delay within the approved coordination budget. If the sample is insufficient or waves are adequate, retain wave-based communication and record the decision.</p>
639
+ <p><strong>Deliver if opened:</strong> per-member inboxes, durable request/reply state, waiting/deadline handling, idempotent commands, answer turns for idle members, cycle/no-runnable-work detection and event coalescing. Persist a question and its wait state together so a fast reply cannot be lost. Retired/unavailable recipients route to the coordinator. An unanswered dependency never consumes a process slot.</p>
640
+ <p>Use the existing storage interfaces and validated outcome protocol. Introduce a new driver only for execution that cannot be expressed clearly as recorded waves; bridge it through existing adapter/Git/check services.</p>
641
+ <p><strong>Exit:</strong> immediate and duplicate replies cannot duplicate work; questions survive restart; late replies after reassignment are handled explicitly; cyclic waits escalate once with a bounded resolution path; all-waiting teams release their slots. The UI exposes whom each task is waiting on.</p>
642
+ <h3 id="phase-5--improve-the-coordinator-already-shipped-in-slice-0">Phase 5 — improve the coordinator already shipped in Slice 0</h3>
643
+ <p><strong>Deliver:</strong> evidence-driven expansion/retirement, safe replacement handovers, compact coordinator checkpoints, completion evaluation and reusable sub-plans. Improve task sizing and routing using observed outcomes. Start with investigate, implement, independent review and bounded repair; expand into visible validated tasks.</p>
644
+ <p>Keep user requirements distinct from implementation choices. Coalesce events if P4 is enabled; otherwise continue at wave boundaries. A session reset uses the accepted plan and checkpoint, not full transcripts. Preserve blind-comparison boundaries when using competing proposals.</p>
645
+ <p><strong>Exit:</strong> a new blocker can add an eligible specialist within limits; retired members cannot accept new assignments; invalid/stale revisions leave state unchanged; the coordinator stays within its budget; review and completion coverage hold after repairs and replans. Compare with the original supervisor on the same tasks.</p>
646
+ <p><strong>Code retirement:</strong> make supervisor&#39;s useful decomposition/integration behavior a reusable strategy. Keep its public pattern ID and saved runs working through a compatibility wrapper until parity is demonstrated; then remove duplicated helper logic. Other manual patterns migrate only when their behavior is preserved.</p>
647
+ <h3 id="phase-6--live-tools-and-steering">Phase 6 — live tools and steering</h3>
648
+ <p><strong>Deliver:</strong> expose the established operations through a scoped MCP or CLI bridge where the capability matrix proves support. Derive run/member identity server-side, use per-member credentials, and retain next-turn fallback. <code>CODEFLOW_TOKEN</code> is already withheld from agents; preserve that boundary.</p>
649
+ <p>Add collaboration tools explicitly to Claude&#39;s per-mode/trust allowlists. A read-only reviewer may communicate without gaining source-write permission. Test sandbox access without broadening filesystem/network permissions just to make the bridge work. Supported Codex steering retains origin and message identity; rejected/unsupported steering queues the message.</p>
650
+ <p>Only now add transport delivery receipts where needed. A tool request returns promptly; a blocked task yields through the existing protocol. Inventory native nested-agent controls and usage visibility; unsupported accounting must remain an explicit limitation.</p>
651
+ <p><strong>Exit:</strong> invalid/cross-run credentials fail; agents cannot spoof users; live and queued delivery have the same logical result; no double session resume; no occupied-slot deadlock; unsupported adapters remain fully functional at turn boundaries.</p>
652
+ <h3 id="phase-7--complete-product-integration-and-migration">Phase 7 — complete product integration and migration</h3>
653
+ <p><strong>Deliver:</strong> richer workflow/message/memory views, member-addressed user steering, context inspection, follow-up revisions and integration with projects, automations, sweeps, inbox/phone and review/shipping flows. The composer and basic team view already exist from Slice 0.</p>
654
+ <p>Prefer additive run snapshots. Improve persistent SSE cursors with an explicit reset/reload path, benefiting legacy runs as well. A follow-up receives an explicit execution budget and preserves applicable artifacts/memory. Existing shipping permissions remain authoritative.</p>
655
+ <p><strong>Exit:</strong> users can inspect and revise the team, answer blockers, see memory provenance, reconnect after restart and continue completed work; existing manual runs and saved automations remain usable. Disabling new Auto teams preserves compatible viewing and recovery for existing runs.</p>
656
+ <h3 id="phase-8--evaluation-and-rollout-gate">Phase 8 — evaluation and rollout gate</h3>
657
+ <p><strong>Deliver:</strong> expand the measurements started in Slice 0, publish comparison results, and move from experimental to opt-in beta, then default only if quality/cost justify it. Cover missing sessions, exhausted quota, failed setup, worktree loss, storage full, stale outputs, cancellation and crash boundaries. Record CLI versions for real trials; paid calls are not required by ordinary CI.</p>
658
+ <p><strong>Exit:</strong> no silent requirement loss or false verification passes; no duplicate logical tasks/concurrent writers after restart; trust and memory tests pass; legacy compatibility holds; observed coordinator overhead and waiting rates have an explicit product decision. P4/P6 are not release prerequisites if the turn-boundary product meets its goals.</p>
659
+ <h2 id="9-measurements-and-decisions">9. Measurements and decisions</h2>
660
+ <p>Capture the following locally from Slice 0. Fake agents prove behavior; real opt-in runs measure product usefulness. Do not conflate them.</p>
661
+ <div class="table-scroll" tabindex="0"><table>
662
+ <thead>
663
+ <tr>
664
+ <th>Measurement</th>
665
+ <th>Capture point</th>
666
+ <th>Decision it informs</th>
667
+ <th>Current result</th>
668
+ </tr>
669
+ </thead>
670
+ <tbody><tr>
671
+ <td>Coordinator invocations, tokens, time and reported cost</td>
672
+ <td>First planning call, every revision and retry</td>
673
+ <td>Coordinator budget and wake frequency</td>
674
+ <td>Captured; see <a href="dynamic-teams-evaluation.html">evidence report</a> for observed values and sample limits</td>
675
+ </tr>
676
+ <tr>
677
+ <td>Plan approvals/revisions/rejections and reasons</td>
678
+ <td>Existing approval checkpoint</td>
679
+ <td>Composition and task-sizing policy</td>
680
+ <td>Partly: the code records them, but every evidence trial disabled approval, so the report holds no approval numbers</td>
681
+ </tr>
682
+ <tr>
683
+ <td>Questions and blocked turns / worker turns</td>
684
+ <td>Every structured outcome</td>
685
+ <td>Need for asynchronous mailboxes</td>
686
+ <td>Captured; see <a href="dynamic-teams-evaluation.html">evidence report</a> for observed values and sample limits</td>
687
+ </tr>
688
+ <tr>
689
+ <td>Blocked duration and estimated avoidable wave delay</td>
690
+ <td>Yield, reply, ready and resume times; exclude user waits</td>
691
+ <td>P4 threshold and likely benefit</td>
692
+ <td>Captured; see <a href="dynamic-teams-evaluation.html">evidence report</a> for observed values and sample limits</td>
693
+ </tr>
694
+ <tr>
695
+ <td>Same-provider identity/addressing errors</td>
696
+ <td>Fixtures and actual member events</td>
697
+ <td>Scope of member-identity changes</td>
698
+ <td>Not captured: the report format has no such field; same-provider isolation is covered by tests only</td>
699
+ </tr>
700
+ <tr>
701
+ <td>Verification coverage, completion quality and repair turns</td>
702
+ <td>Final runtime evaluation</td>
703
+ <td>Auto team versus supervisor/manual baselines</td>
704
+ <td>Captured; see <a href="dynamic-teams-evaluation.html">evidence report</a> for observed values and sample limits</td>
705
+ </tr>
706
+ <tr>
707
+ <td>Journal size, replay time and failed writes</td>
708
+ <td>Recovery fixtures and runs</td>
709
+ <td>Snapshot/store investment</td>
710
+ <td>Partly: journal bytes, records and load time are reported; failed writes are not counted</td>
711
+ </tr>
712
+ <tr>
713
+ <td>Memory selected, useful, stale or corrected</td>
714
+ <td>Context manifest and later outcomes from P3</td>
715
+ <td>Retrieval and promotion policy</td>
716
+ <td>Captured; see <a href="dynamic-teams-evaluation.html">evidence report</a> for observed values and sample limits</td>
717
+ </tr>
718
+ </tbody></table>
719
+ </div><p>A coordinator outcome proposes team changes; it does not mark its own experiment successful. Record the validated plan, actual usage and runtime evidence so decisions can be reproduced. Do not fill this table with invented targets presented as measurements.</p>
720
+ <p>Decisions resolved for implementation: keep Node 20; default to the current journal/store; start communication at turn boundaries; enforce composition rules in code; retain configured plan approval; keep explicit-resume budget semantics visible; prevent automatic untrusted project promotion; make mailbox/live layers conditional. The numerical experiment defaults above can change only with a recorded rationale and updated fixtures.</p>
721
+ <h2 id="10-acceptance-scenarios-and-reviewable-implementation-sequence">10. Acceptance scenarios and reviewable implementation sequence</h2>
722
+ <h3 id="first-scenario-slice-0">First scenario: Slice 0</h3>
723
+ <ol>
724
+ <li>Start Auto team from the composer on a fixture with backend, frontend and final-check requirements. No manual worker roster is supplied.</li>
725
+ <li>A coordinator proposes the small team, contracts and graph. The user revises acceptance criteria once, then approves; a rejection variant starts no workers.</li>
726
+ <li>Independent tasks run in isolated worktrees. A variant uses two members on the same provider with different settings and sessions.</li>
727
+ <li>Frontend returns <code>needs_info</code> with a question to backend. Its process ends; unrelated ready work proceeds. A backend outcome or short answer task supplies evidence next wave.</li>
728
+ <li>Frontend receives the addressed reply and accepted contract. Its checkpoint resumes in the correct workspace; missing-session recovery uses a fresh session with selected context.</li>
729
+ <li>Integrate submitted changes. A downstream task requiring actual backend code starts from the required integration commit.</li>
730
+ <li>Independent review requests one repair. After repair, current checks and review determine the result and list any gaps. Unknown checks never become passes.</li>
731
+ <li>Display coordinator usage, wave/question counts and requirement evidence. No new project memory is promoted in this slice.</li>
732
+ <li>Restart after a completed planning decision in a variant. The decision replays, preserving roster and task IDs without another planning invocation.</li>
733
+ </ol>
734
+ <h3 id="later-recovery-messaging-and-memory-scenario">Later recovery, messaging and memory scenario</h3>
735
+ <p>In P1, stop after a question outcome is journaled but before its next prompt, then resume with the same request IDs. In P4 if enabled, repeat at asynchronous delivery boundaries with an immediate/duplicate reply, expired recipient, stale attempt and cyclic wait. In P3, promote an eligible lesson and verify that a later run retrieves it without private notes; repeat from an untrusted issue and confirm that promotion remains pending user action.</p>
736
+ <h3 id="suggested-first-pull-requests">Suggested first pull requests</h3>
737
+ <div class="table-scroll" tabindex="0"><table>
738
+ <thead>
739
+ <tr>
740
+ <th>PR</th>
741
+ <th>Reviewable scope</th>
742
+ <th>Acceptance</th>
743
+ </tr>
744
+ </thead>
745
+ <tbody><tr>
746
+ <td>S0-A</td>
747
+ <td>Plan/outcome schemas, composition policies, fake-agent fixtures, strict journal-write error propagation</td>
748
+ <td>Invalid plans rejected; failed journal writes cannot advance accepted state</td>
749
+ </tr>
750
+ <tr>
751
+ <td>S0-B</td>
752
+ <td>Auto team planning/approval, member settings, dependency waves, minimal context and final verification</td>
753
+ <td>Generated team executes; decisions replay; two same-provider members stay distinct</td>
754
+ </tr>
755
+ <tr>
756
+ <td>S0-C</td>
757
+ <td>Questions/replies, bounded revisions, portable checkpoints and automatic-learning trust guard</td>
758
+ <td>A blocked member resumes; coordinator budget enforced; untrusted learning cannot bypass the gate</td>
759
+ </tr>
760
+ <tr>
761
+ <td>S0-D</td>
762
+ <td>Opt-in composer, roster/tasks/questions, coordination metrics and end-to-end fixture</td>
763
+ <td>User-visible Slice 0 with measured counters; existing patterns still work</td>
764
+ </tr>
765
+ <tr>
766
+ <td>P1+</td>
767
+ <td>Choose the next narrow change from the phase gates and recorded measurements</td>
768
+ <td>No speculative storage or mailbox prerequisite</td>
769
+ </tr>
770
+ </tbody></table>
771
+ </div><p>The four S0 PRs make one vertical milestone; wire usage instrumentation in S0-B so the first coordinator call is measurable, then expose it in S0-D. Avoid releasing incomplete intermediate PRs as a finished Auto team feature.</p>
772
+ <p>For implementation, use <code>npm run typecheck</code> and focused <code>node:test</code> suites per change, the full <code>npm test</code> suite at shared engine/adapter boundaries, and <code>npm run test:e2e</code> for composer, approval, waiting and reconnect flows. Fault injection should test real failure boundaries, not merely serialize records. The revision-3 implementation is validated by the full test/build workflow and real CLI trials documented in the evidence report.</p>
773
+ <p>These phases are now implemented. Further model-quality tuning or a default rollout must use new, explicitly labeled evidence; it is not an unfinished infrastructure dependency.</p>
774
+ <h2 id="11-review-disposition-and-boundaries">11. Review disposition and boundaries</h2>
775
+ <div class="table-scroll" tabindex="0"><table>
776
+ <thead>
777
+ <tr>
778
+ <th>Review finding</th>
779
+ <th>Revision 1 action</th>
780
+ </tr>
781
+ </thead>
782
+ <tbody><tr>
783
+ <td>Promise arrives too late</td>
784
+ <td>Slice 0 delivers automatic team creation and basic collaboration immediately</td>
785
+ </tr>
786
+ <tr>
787
+ <td>Recovery justification already met</td>
788
+ <td>Reuse <code>remember()</code>; distinguish later asynchronous needs from dynamic planning</td>
789
+ </tr>
790
+ <tr>
791
+ <td>SQLite predetermines platform</td>
792
+ <td>Keep Node 20 and current store; technology change requires measured justification</td>
793
+ </tr>
794
+ <tr>
795
+ <td>References use simpler persistence</td>
796
+ <td>Do not infer a requirement for leases/outbox from vendor examples</td>
797
+ </tr>
798
+ <tr>
799
+ <td>“Appropriate team” undefined</td>
800
+ <td>Composition rules, budgets and fixtures are specified in section 4</td>
801
+ </tr>
802
+ <tr>
803
+ <td>Plan approval missing</td>
804
+ <td>Existing checkpoint is explicit before dispatch and on relevant scope revisions</td>
805
+ </tr>
806
+ <tr>
807
+ <td>Project memory trust gap</td>
808
+ <td>Enforced provenance/promotion rule, including the existing learning path</td>
809
+ </tr>
810
+ <tr>
811
+ <td>Coordination cost measured too late</td>
812
+ <td>Instrument the first planning call and cap coordination from Slice 0</td>
813
+ </tr>
814
+ <tr>
815
+ <td>Memory precedes useful execution data</td>
816
+ <td>Minimal runtime checkpoints now; full project memory follows execution</td>
817
+ </tr>
818
+ <tr>
819
+ <td>Too many stored state machines</td>
820
+ <td>Derive member/delivery status; split records only when behavior needs it</td>
821
+ </tr>
822
+ </tbody></table>
823
+ </div><p>Two review details are refined rather than copied literally: a single append needs complete-record recovery to provide logical batch atomicity; and at the reviewed baseline, the synced journal swallowed write failures through the shared append helper. The implementation now propagates authoritative write failures and recovers incomplete tails, without making a database a prerequisite.</p>
824
+ <p>Initial boundaries remain local official CLI execution, one coordinator per run, structured graphs, bounded expansion, isolated writers and controlled integration. Remote worker fleets, arbitrary generated workflow code, live cross-run agent messaging, vector databases and recursive autonomous teams are deferred. Manual patterns remain available while useful behavior is migrated into reusable strategies.</p>
825
+ <h2 id="references">References</h2>
826
+ <p>Repository references: <a href="dynamic-teams-plan-review-0.html">Review 0</a>, <a href="architecture.html">architecture</a>, <a href="patterns.html">patterns</a>, <a href="runs.html">runs</a>, <a href="configuration.html">configuration</a>, and <a href="security.html">security</a>.</p>
827
+ <p>Design references retained from the original proposal:</p>
828
+ <ul>
829
+ <li><a href="https://code.claude.com/docs/en/workflows">Claude dynamic workflows</a></li>
830
+ <li><a href="https://code.claude.com/docs/en/agent-teams">Claude agent teams</a></li>
831
+ <li><a href="https://learn.chatgpt.com/docs/agent-configuration/subagents">Codex subagents</a></li>
832
+ <li><a href="https://docs.langchain.com/oss/python/concepts/memory">LangGraph memory concepts</a></li>
833
+ </ul>
834
+ <p>These are architectural references, not dependencies on a vendor&#39;s internal team implementation. code-flow owns the cross-provider protocol and validates adapter capabilities in its own environment.</p>
835
+ <h2 id="revision-3-implementation-decisions">Revision 3 implementation decisions</h2>
836
+ <ul>
837
+ <li>New Auto runs default to the event scheduler; saved runs lacking <code>eventDriven</code> retain their wave schemas, ordering and operation identities. Strict wire schemas satisfy Codex requirements; internal typed dependency maps are normalized from closed wire arrays.</li>
838
+ <li>Live tool calls return after durable acceptance. They do not hold a worker open waiting for a peer. A steering receipt proves protocol acceptance only; messages keep their original IDs and agent origin in live and next-turn paths.</li>
839
+ <li>A user changing the goal chooses <strong>Revise goal</strong>. The old execution is stopped and awaited, its branches remain available, and a linked run plans the revised requirements from the integration branch with a fresh explicit budget and configured approval. Normal member notes cannot rewrite the runtime&#39;s accepted requirement set.</li>
840
+ <li>Parent attachments, source trust and lockdown survive whole-team continuation. Reading private memory cannot silently publish it through live memory tools; provenance references are persisted separately from erasable bodies.</li>
841
+ <li>User memory feedback affects relevance for the exact revision, never trust. Synthetic seeded-memory evaluation measures retrieval plumbing; it does not claim human-rated usefulness.</li>
842
+ <li>Supervisor retains its public ID and saved-run behavior through shared decomposition/integration helpers. Other manual patterns retain their established behavior; moving them to Auto is not necessary to complete this plan.</li>
843
+ </ul>
844
+ <p><a href="index.html">Documentation library</a> · <a href="architecture.html">Development guide</a></p>
845
+ <h2 id="model-discovery-and-worker-routing--implemented-2026-10-21">Model discovery and worker routing — implemented 2026-10-21</h2>
846
+ <ul>
847
+ <li>New Auto executions use a persistent, validated catalog. Existing saved runs without <code>modelRouting</code> and other workflows retain legacy model selection.</li>
848
+ <li>Claude control initialization and Codex app-server model discovery resolve exact IDs, aliases and per-model efforts without an inference prompt. Antigravity <code>agy models</code> supplies reported IDs; per-model effort support remains unknown. Remote probes optionally return catalogs from that worker/profile; containers discover in their selected image. Host catalogs never establish remote compatibility.</li>
849
+ <li>Catalog records separate CLI reports, documented facts, environment identity and bounded measured observations. Immutable discovery snapshots support step provenance. Account changes discard prior observations/documentation. Concurrent cache reads coalesce; observations merge without dropping concurrent records. Invalid proposals fail closed.</li>
850
+ <li>Optional official-document research uses origin/redirect/size/time limits and a closed schema. No page text becomes an instruction. Research cannot change permissions, establish account access or promote compatibility. Offline mode keeps the last verified evidence; missing information remains unknown.</li>
851
+ <li>Coordinator identity/settings remain fixed. Worker pool and Advanced role pins constrain model/effort proposals. Every new worker execution checks the accepted model, effort, current environment, inherited run permissions and existing budgets. Recovery preserves decisions and rechecks before execution. Existing bounded member replacement supplies checkpoint-based reassignment without cross-provider session transfer.</li>
852
+ <li>UI exposes automatic selection, catalog refresh/research opt-in, stale/unknown/unsupported states and per-task/member assignment rationale/provenance. More sophisticated performance ranking is deferred.</li>
853
+ <li>Validation adds mocked catalog/discovery/research/cache/offline/effort tests, routing/provenance assertions, thread-start/resume policy tests and browser UI/API coverage. Real-provider findings are recorded separately in <code>docs/worker-permission-verification.md</code>; mock passing tests are not real-provider certification.</li>
854
+ </ul>
855
+ <h3 id="native-control-gaps-found-by-live-verification">Native-control gaps found by live verification</h3>
856
+ <p>Codex 0.162.1 can still expose model-driven v2 delegation when only <code>features.multi_agent=false</code> and <code>features.multi_agent_v2=false</code> are set. Managed turns now also set <code>agents.enabled=false</code>, explicitly disable the structured v2 setting and hooks, and apply overrides to both process and thread start/resume configuration. Managed Codex requires at least the tested CLI version for this control. A resumed session at Ultra effort was probed after the fix.</p>
857
+ <p>Claude managed turns explicitly disable workflows, Ultracode and hooks, deny native delegation/scheduling tools, and use strict scoped MCP plus <code>--no-chrome</code> when external tools are forbidden. Help capture uses a private regular file because the installed Claude CLI truncated piped help and Antigravity prints help on stderr. Antigravity 1.4.4 remains blocked for managed runs; discovery alone does not establish equivalent permission enforcement.</p>
858
+ <p>The Antigravity follow-up tested a real custom-agent tool allowlist with <code>gemini-3.8-flash-low</code>. Fixture reads succeeded and omitted terminal/write tools were not called, but this does not establish per-run control over shared permissions, hooks, plugins, browser/MCP or recovery. <code>init.tools</code> advertised tools outside the observed model allowlist and cannot attest enforcement. Managed rejection now has one shared diagnostic, and help-only sandbox evidence is marked unknown. Tests cover trust levels, Solo, fresh/resumed turns, container/remote selection and the legacy skip-permissions environment override. Enabling Antigravity requires a verified scoped policy API or a separately designed isolated executor with protected policy and mediation of every tool surface; global settings mutation, prompts and worktree reverts are not acceptable substitutes. See <a href="worker-permission-verification.html#antigravity-auto-feasibility-follow-up">the verification report</a>.</p>
859
+ <p>An isolated-execution feasibility prototype now exercises a clean home and protected policy under macOS Seatbelt. Actual fixture tests passed for workspace writes and denials of policy tampering, outside paths, ambient workspace hooks and terminal TCP access. Antigravity 1.4.4 starts under that policy; authenticated discovery/inference does not work in the prototype. A separate clean-home discovery requires sign-in, and the installed Docker daemon was unavailable after a startup attempt. Keep this code in opt-in research probes, with no production eligibility receipt or fallback. Remaining work is a separately authenticated runtime, separated inference/command networking, protected customization mounts, and provider-level forbidden-tool/recovery tests. Full Auto support remains <strong>unimplemented and blocked</strong>, not certified by the OS fixture checks. See <a href="worker-permission-verification.html#isolated-execution-investigation">isolated execution findings</a>.</p>
860
+ <h3 id="antigravity-existing-login-follow-up-2026-10-21">Antigravity existing-login follow-up (2026-10-21)</h3>
861
+ <p>The earlier isolated-execution blocker is resolved for a narrow local macOS executor with CLI 1.4.4. It reuses the native Keychain login without exporting credentials, and grants only the OS security metadata/cache-lock access needed by the official CLI/helper. Protected per-turn settings and a file-only custom agent exclude terminal, browser, MCP, hooks and native delegation. Workspace writes remain mode-dependent; authentication/runtime paths are also denied to model file tools. Fresh project records are seeded before configuration is sealed.</p>
862
+ <p>Auto inventory exposes this tool limitation; runtime preflight is repeated before launch. Unsupported platforms, remote/container execution, interactive approvals and other CLI versions fail closed. Legacy skip-permissions flags cannot affect managed turns. The coordinator&#39;s selected provider/model remains unchanged. Isolated discovery uses a separate catalog environment; assignments retain its provenance, and steps record <code>macos-file-only-v1</code>. Native sessions are never retained or transferred; recovery uses portable context and revalidates eligibility. Native <code>manage_task</code> bookkeeping may remain available, but delegation tools do not.</p>
863
+ <p>Real existing-login discovery returned six candidates. Real file-editing, structured-output and fresh read-only adapter turns succeeded; fixture escape/policy denials, absent hook markers and zero browser requests were observed. A real Auto run with Codex coordinating and Antigravity editing completed with a passed check/review verdict, five completed steps and no failures. Tests cover protected OS profiles, environment scrubbing, forged/unsupported launches, separate catalog caching and mocked Auto dispatch with fresh workers. Full general-purpose Antigravity execution remains outside this implementation: inference networking stays enabled and Code Flow runs checks separately. Other platforms/models/efforts and arbitrary tool-call fuzzing remain unverified. See <a href="worker-permission-verification.html#existing-login-reuse-and-managed-file-workers">the latest verification report</a>.</p>
864
+ <h3 id="antigravity-permissionrecovery-review-2026-10-21">Antigravity permission/recovery review (2026-10-21)</h3>
865
+ <p>Implemented sandboxed version inspection, tracked discovery process groups, nested workspace customization protection, safe native-auth error classification/output, unexpected-tool failure detection, and guaranteed cleanup after initial callback failure. Explicit recovery rechecks login through fresh isolated discovery before clearing signed-out status; cached/offline results cannot clear it. Auto can retain an unavailable idle member without authorizing additional work, allowing bounded workflow stop and later recovery. Deterministic stop/reload/repair/resume tests preserve model pins, recorded provenance, partial checkpoints and inherited permissions. Real existing-login adapter probes passed with the strengthened profile; forced expired-token refresh remains unverified and never triggers an authority-expanding fallback. See <a href="worker-permission-verification.html#antigravity-permission-and-recovery-review-2026-10-21">the review evidence and limitations</a>.</p>
866
+ <h3 id="non-destructive-refresh-evidence-2026-10-21">Non-destructive refresh evidence (2026-10-21)</h3>
867
+ <p>Added an opt-in native refresh observer that uses ordinary isolated discovery and reports only bounded metadata. Valid-token login reuse is distinct from observed refresh, and credential persistence remains separately unverified. No documented force-refresh interface was found in CLI 1.4.4. Real probes reported six models and an unexpired token, so expired-token renewal remains pending natural expiry. Added detection of native credential-save/fallback failures in managed turns and discovery, including failure despite a successful inference result. No permission widening, credential export, forced expiry, account mutation or logout is used. See <a href="worker-permission-verification.html#non-destructive-native-refresh-investigation-2026-10-21">the investigation</a>.</p>
868
+ <h3 id="explicit-native-antigravity-execution-implemented">Explicit native Antigravity execution (implemented)</h3>
869
+ <ul>
870
+ <li>Add run authority <code>antigravityExecution: &quot;native&quot; | &quot;isolated&quot;</code>, defaulting to isolation when absent. Native is an explicit Advanced opt-in, never a model/template decision. Parent continuations cannot upgrade isolated authority.</li>
871
+ <li>Resolve native Antigravity to a truthful unrestricted receipt with provider-configured external tools and native delegation. Other providers retain ordinary inherited permissions. Reject incompatible mandatory requirements, Safe/narrowed trust, approvals, remote/container and unattended contexts.</li>
872
+ <li>Execute against the existing host profile and saved login, without sandbox flags or credential copies. Retain fresh portable turns, tracked process lifecycle and private authentication diagnostics. Keep native and isolated catalog identities separate and recover only with fresh discovery in the recorded mode.</li>
873
+ <li>Verified a real mixed-provider Auto run: Codex coordinator, native Antigravity file edit and terminal check, independent Codex review, configured checks passed. No new sign-in requested. Native discovery reported six models. Expired-token refresh and browser/MCP/hooks/native-child behavior were not exercised.</li>
874
+ <li>Deterministic tests cover opt-in receipts, forged/mismatched options, unchanged other-provider permissions, incompatible constraints, parent narrowing, private auth persistence failures, both catalog modes, and recovery with portable work and preserved assignment provenance.</li>
875
+ </ul>
876
+ <h3 id="main-integration-verification">Main integration verification</h3>
877
+ <p>Automatic role defaults now require verified Antigravity managed-runtime availability, separately from CLI flag compatibility. Unsupported isolated reviewers are rejected before a local run starts; explicit native opt-in retains its separate eligibility. Remote execution uses the remote inventory and dispatch checks rather than host runtime evidence. Auto’s free-model picker uses the same discovered catalog as its model controls. Editable retries and project drafts preserve recorded permission requirements and the explicit Antigravity mode.</p>
878
+ </article><footer><a href="https://github.com/midhunxavier/code-flow/blob/main/docs/dynamic-teams-implementation-plan.md">Edit this page on GitHub ↗</a><span>code-flow · 0.1.0-preview.1 · <a href="font-license.txt">Font license</a></span></footer><nav class="pagination" aria-label="Adjacent guides"><a href="dynamic-teams-evaluation.html"><small>← Previous</small>Dynamic teams: implementation evidence and rollout decision</a><a href="dynamic-teams-implementation-review-1.html"><small>Next →</small>Review 1: the dynamic teams implementation</a></nav></main>
879
+ <aside class="on-page" aria-label="On this page"><strong>On this page</strong><a class="depth-2" href="#revision-4--dynamic-auto-solo-and-reusable-templates">Revision 4 — dynamic Auto, Solo, and reusable templates</a><a class="depth-3" href="#delivered-scope-and-explicit-limits">Delivered scope and explicit limits</a><a class="depth-3" href="#product-decisions">Product decisions</a><a class="depth-3" href="#current-foundations-and-gaps">Current foundations and gaps</a><a class="depth-3" href="#d0--define-run-policy-and-execution-contracts">D0 — define run policy and execution contracts</a><a class="depth-3" href="#d1--strengthen-dynamic-auto-on-the-existing-runtime">D1 — strengthen dynamic Auto on the existing runtime</a><a class="depth-3" href="#d2--versioned-templates-using-the-same-execution-contracts">D2 — versioned templates using the same execution contracts</a><a class="depth-3" href="#d3--convert-existing-patterns-into-reusable-templates">D3 — convert existing patterns into reusable templates</a><a class="depth-3" href="#d4--optional-reuse-adaptation-and-saving-from-auto">D4 — optional reuse, adaptation, and saving from Auto</a><a class="depth-3" href="#d5--composer-advanced-and-default-migration">D5 — composer, Advanced, and default migration</a><a class="depth-3" href="#d6--acceptance-and-delivery-sequence">D6 — acceptance and delivery sequence</a><a class="depth-2" href="#revision-3-baseline-and-historical-implementation-record">Revision 3 baseline and historical implementation record</a><a class="depth-3" href="#implementation-status">Implementation status</a><a class="depth-2" href="#1-product-promise-and-delivery-decision">1. Product promise and delivery decision</a><a class="depth-2" href="#2-what-we-reuse-and-what-actually-needs-changing">2. What we reuse, and what actually needs changing</a><a class="depth-3" href="#recovery-correction">Recovery correction</a><a class="depth-3" href="#compatibility-facts">Compatibility facts</a><a class="depth-2" href="#3-invariants-to-keep">3. Invariants to keep</a><a class="depth-2" href="#4-define-appropriate-team-before-implementation">4. Define “appropriate team” before implementation</a><a class="depth-3" href="#approval-and-revision-policy">Approval and revision policy</a><a class="depth-3" href="#coordination-budget-and-measurements">Coordination budget and measurements</a><a class="depth-2" href="#5-slice-0--demonstrate-the-promise-on-the-existing-engine">5. Slice 0 — demonstrate the promise on the existing engine</a><a class="depth-3" href="#51-plan-and-replay">5.1 Plan and replay</a><a class="depth-3" href="#52-individual-members-and-workspace-handling">5.2 Individual members and workspace handling</a><a class="depth-3" href="#53-execute-dependency-waves">5.3 Execute dependency waves</a><a class="depth-3" href="#54-questions-answers-and-revision-between-waves">5.4 Questions, answers and revision between waves</a><a class="depth-3" href="#55-minimal-memory-and-context">5.5 Minimal memory and context</a><a class="depth-3" href="#56-verify-display-and-measure">5.6 Verify, display and measure</a><a class="depth-2" href="#6-records-persistence-and-communication-as-they-grow">6. Records, persistence and communication as they grow</a><a class="depth-3" href="#storage-requirements-and-default">Storage requirements and default</a><a class="depth-3" href="#delivery-semantics">Delivery semantics</a><a class="depth-2" href="#7-private-team-and-project-memory">7. Private, team and project memory</a><a class="depth-3" href="#provenance-and-promotion-rules">Provenance and promotion rules</a><a class="depth-3" href="#selection-conflicts-and-deletion">Selection, conflicts and deletion</a><a class="depth-2" href="#8-phases-after-slice-0">8. Phases after Slice 0</a><a class="depth-3" href="#phase-0--contracts-and-composition-policy-alongside-slice-0">Phase 0 — contracts and composition policy, alongside Slice 0</a><a class="depth-3" href="#phase-1--prove-recovery-and-harden-storage-where-needed">Phase 1 — prove recovery and harden storage where needed</a><a class="depth-3" href="#phase-2--harden-dynamic-execution-and-member-identity">Phase 2 — harden dynamic execution and member identity</a><a class="depth-3" href="#phase-3--grow-memory-from-observed-workflow-data">Phase 3 — grow memory from observed workflow data</a><a class="depth-3" href="#phase-4--event-driven-messaging">Phase 4 — event-driven messaging</a><a class="depth-3" href="#phase-5--improve-the-coordinator-already-shipped-in-slice-0">Phase 5 — improve the coordinator already shipped in Slice 0</a><a class="depth-3" href="#phase-6--live-tools-and-steering">Phase 6 — live tools and steering</a><a class="depth-3" href="#phase-7--complete-product-integration-and-migration">Phase 7 — complete product integration and migration</a><a class="depth-3" href="#phase-8--evaluation-and-rollout-gate">Phase 8 — evaluation and rollout gate</a><a class="depth-2" href="#9-measurements-and-decisions">9. Measurements and decisions</a><a class="depth-2" href="#10-acceptance-scenarios-and-reviewable-implementation-sequence">10. Acceptance scenarios and reviewable implementation sequence</a><a class="depth-3" href="#first-scenario-slice-0">First scenario: Slice 0</a><a class="depth-3" href="#later-recovery-messaging-and-memory-scenario">Later recovery, messaging and memory scenario</a><a class="depth-3" href="#suggested-first-pull-requests">Suggested first pull requests</a><a class="depth-2" href="#11-review-disposition-and-boundaries">11. Review disposition and boundaries</a><a class="depth-2" href="#references">References</a><a class="depth-2" href="#revision-3-implementation-decisions">Revision 3 implementation decisions</a><a class="depth-2" href="#model-discovery-and-worker-routing--implemented-2026-10-21">Model discovery and worker routing — implemented 2026-10-21</a><a class="depth-3" href="#native-control-gaps-found-by-live-verification">Native-control gaps found by live verification</a><a class="depth-3" href="#antigravity-existing-login-follow-up-2026-10-21">Antigravity existing-login follow-up (2026-10-21)</a><a class="depth-3" href="#antigravity-permissionrecovery-review-2026-10-21">Antigravity permission/recovery review (2026-10-21)</a><a class="depth-3" href="#non-destructive-refresh-evidence-2026-10-21">Non-destructive refresh evidence (2026-10-21)</a><a class="depth-3" href="#explicit-native-antigravity-execution-implemented">Explicit native Antigravity execution (implemented)</a><a class="depth-3" href="#main-integration-verification">Main integration verification</a></aside>
880
+ <aside id="help-panel" hidden aria-labelledby="help-title"><div class="chat-heading"><div><span class="eyebrow">Your AI companion</span><h2 id="help-title">Ask code-flow</h2></div><button id="close-help" aria-label="Close AI companion">✕</button></div><div class="chat-toolbar"><span>Grounded in your docs</span><button id="new-chat">New chat</button></div><div id="help-messages" role="log" aria-label="Help conversation" aria-live="polite"><div id="chat-welcome"><span class="chat-mark" aria-hidden="true">✦</span><h3>What would you like to do?</h3><p>Let’s find your next step. Ask about setup, workflows or something that’s unclear.</p><div class="suggestions"><button type="button" data-question="How do I start my first run?">Start my first run ↗</button><button type="button" data-question="What should I do when a check fails?">Understand a failed check ↗</button></div></div></div><p id="help-status" role="status">Checking your installed CLIs…</p><button id="retry-help" hidden>Retry connection</button><form id="help-form" hidden><label class="sr-only" for="question">Your question</label><textarea id="question" rows="3" maxlength="4000" placeholder="Ask a question…" required></textarea><div class="composer-controls"><label class="sr-only" for="help-agent">Use your CLI</label><select id="help-agent"></select><button type="button" id="stop-help" hidden>Stop</button><button class="primary" id="send-help" aria-label="Send message">Send ↗</button></div><small>Uses your CLI login and quota. Shift + Enter for a new line.</small></form><a id="help-guide" href="help.html">About your local companion →</a></aside></div>
881
+ <dialog id="search-dialog" aria-labelledby="search-title"><div class="dialog-title"><h2 id="search-title">Search documentation</h2><button data-close="search-dialog" aria-label="Close search">✕</button></div><label class="sr-only" for="search">Search all guides</label><input id="search" type="search" placeholder="Search workflows, settings, troubleshooting…" autocomplete="off"><div id="search-results" aria-live="polite"></div></dialog>
882
+ </body></html>