@chenmk/superflow 0.4.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/INSTALL.en.md +54 -12
  2. package/INSTALL.md +59 -33
  3. package/README.md +178 -54
  4. package/README.zh-CN.md +156 -51
  5. package/assets/brand/managed-review-loop.png +0 -0
  6. package/assets/manifest.json +10 -5
  7. package/assets/scripts/superflow-coding-ready.mjs +135 -0
  8. package/assets/scripts/superflow-dependency-update-hook.sh +81 -8
  9. package/assets/scripts/superflow-document-audit.mjs +240 -0
  10. package/assets/scripts/superflow-environment-preflight.mjs +398 -0
  11. package/assets/scripts/superflow-hook-guard.sh +40 -1
  12. package/assets/scripts/superflow-managed-command-guard.py +309 -0
  13. package/assets/scripts/superflow-managed-executor-preflight.mjs +421 -0
  14. package/assets/scripts/superflow-managed-owner-verification.sh +117 -0
  15. package/assets/scripts/superflow-managed-work-check.mjs +287 -26
  16. package/assets/scripts/superflow-managed-work-guard.sh +6 -92
  17. package/assets/skills/superflow-clarify/SKILL.md +14 -0
  18. package/assets/skills/superflow-design/SKILL.md +38 -13
  19. package/assets/skills/superflow-docs/SKILL.md +93 -2
  20. package/assets/skills/superflow-pipeline/SKILL.md +167 -10
  21. package/assets/skills/superflow-pipeline/references/batch-prompt-template.md +17 -9
  22. package/assets/skills/superflow-pipeline/references/document-readiness.md +157 -0
  23. package/assets/skills/superflow-pipeline/references/document-templates.md +9 -5
  24. package/assets/skills/superflow-pipeline/references/feature-gated-workflow.md +14 -0
  25. package/assets/skills/superflow-pipeline/references/implementation-prompt-template.md +20 -11
  26. package/assets/skills/superflow-pipeline/references/managed-work.md +123 -15
  27. package/assets/skills/superflow-pipeline/references/orchestration.md +2 -2
  28. package/assets/skills/superflow-pipeline/references/p0-baseline-template.md +3 -2
  29. package/assets/skills/superflow-pipeline/references/quality-gate.md +7 -5
  30. package/assets/skills/superflow-pipeline/references/reviewer-checklist.md +7 -0
  31. package/assets/skills/superflow-pipeline/scripts/superflow-guard.sh +205 -9
  32. package/assets/skills/superflow-pipeline/scripts/superflow-handoff.sh +7 -4
  33. package/assets/skills/superflow-requirement-review/SKILL.md +178 -0
  34. package/assets/skills/superflow-requirement-review/agents/openai.yaml +4 -0
  35. package/assets/skills-en/superflow-clarify/SKILL.md +17 -0
  36. package/assets/skills-en/superflow-design/SKILL.md +31 -12
  37. package/assets/skills-en/superflow-docs/SKILL.md +99 -0
  38. package/assets/skills-en/superflow-pipeline/SKILL.md +163 -9
  39. package/assets/skills-en/superflow-pipeline/references/batch-prompt-template.md +4 -0
  40. package/assets/skills-en/superflow-pipeline/references/document-readiness.md +125 -0
  41. package/assets/skills-en/superflow-pipeline/references/document-templates.md +10 -0
  42. package/assets/skills-en/superflow-pipeline/references/feature-gated-workflow.md +7 -0
  43. package/assets/skills-en/superflow-pipeline/references/implementation-prompt-template.md +7 -0
  44. package/assets/skills-en/superflow-pipeline/references/managed-work.md +160 -10
  45. package/assets/skills-en/superflow-pipeline/references/quality-gate.md +12 -0
  46. package/assets/skills-en/superflow-pipeline/references/reviewer-checklist.md +7 -0
  47. package/assets/skills-en/superflow-pipeline/scripts/superflow-guard.sh +205 -9
  48. package/assets/skills-en/superflow-pipeline/scripts/superflow-handoff.sh +7 -4
  49. package/assets/skills-en/superflow-requirement-review/SKILL.md +99 -0
  50. package/assets/skills-en/superflow-requirement-review/agents/openai.yaml +4 -0
  51. package/dist/app/cli.js +64 -9
  52. package/dist/app/cli.js.map +1 -1
  53. package/dist/app/commands/change-guard.js +19 -2
  54. package/dist/app/commands/change-guard.js.map +1 -1
  55. package/dist/app/commands/check.js +107 -45
  56. package/dist/app/commands/check.js.map +1 -1
  57. package/dist/app/commands/docs.js +7 -3
  58. package/dist/app/commands/docs.js.map +1 -1
  59. package/dist/app/commands/doctor.js +174 -198
  60. package/dist/app/commands/doctor.js.map +1 -1
  61. package/dist/app/commands/eval.js +64 -0
  62. package/dist/app/commands/eval.js.map +1 -0
  63. package/dist/app/commands/implement.js +7 -3
  64. package/dist/app/commands/implement.js.map +1 -1
  65. package/dist/app/commands/init.js +12 -24
  66. package/dist/app/commands/init.js.map +1 -1
  67. package/dist/app/commands/mcp.js +167 -0
  68. package/dist/app/commands/mcp.js.map +1 -0
  69. package/dist/app/commands/pipeline.js +652 -18
  70. package/dist/app/commands/pipeline.js.map +1 -1
  71. package/dist/app/commands/requirement-review.js +6 -0
  72. package/dist/app/commands/requirement-review.js.map +1 -0
  73. package/dist/app/commands/status.js +66 -3
  74. package/dist/app/commands/status.js.map +1 -1
  75. package/dist/app/commands/uninstall.js +3 -3
  76. package/dist/app/commands/uninstall.js.map +1 -1
  77. package/dist/app/commands/update.js +83 -9
  78. package/dist/app/commands/update.js.map +1 -1
  79. package/dist/domains/agent.js +3 -11
  80. package/dist/domains/agent.js.map +1 -1
  81. package/dist/domains/config/cli-help.js +54 -12
  82. package/dist/domains/config/cli-help.js.map +1 -1
  83. package/dist/domains/config/i18n.js +6 -8
  84. package/dist/domains/config/i18n.js.map +1 -1
  85. package/dist/domains/config/manifest.js +0 -3
  86. package/dist/domains/config/manifest.js.map +1 -1
  87. package/dist/domains/deps.js +68 -7
  88. package/dist/domains/deps.js.map +1 -1
  89. package/dist/domains/managed-work/completion-policy.js +174 -0
  90. package/dist/domains/managed-work/completion-policy.js.map +1 -0
  91. package/dist/domains/managed-work/context-manifest.js +208 -0
  92. package/dist/domains/managed-work/context-manifest.js.map +1 -0
  93. package/dist/domains/managed-work/contract.js +135 -4
  94. package/dist/domains/managed-work/contract.js.map +1 -1
  95. package/dist/domains/managed-work/control-signals.js +34 -0
  96. package/dist/domains/managed-work/control-signals.js.map +1 -0
  97. package/dist/domains/managed-work/control.js +628 -0
  98. package/dist/domains/managed-work/control.js.map +1 -0
  99. package/dist/domains/managed-work/evaluation.js +497 -0
  100. package/dist/domains/managed-work/evaluation.js.map +1 -0
  101. package/dist/domains/managed-work/evidence-path.js +14 -0
  102. package/dist/domains/managed-work/evidence-path.js.map +1 -0
  103. package/dist/domains/managed-work/execution-contract.js +167 -0
  104. package/dist/domains/managed-work/execution-contract.js.map +1 -0
  105. package/dist/domains/managed-work/executor-policy.js +65 -0
  106. package/dist/domains/managed-work/executor-policy.js.map +1 -0
  107. package/dist/domains/managed-work/failure.js +65 -0
  108. package/dist/domains/managed-work/failure.js.map +1 -0
  109. package/dist/domains/managed-work/host-review.js +77 -0
  110. package/dist/domains/managed-work/host-review.js.map +1 -0
  111. package/dist/domains/managed-work/human-messages.js +31 -0
  112. package/dist/domains/managed-work/human-messages.js.map +1 -0
  113. package/dist/domains/managed-work/input.js +29 -3
  114. package/dist/domains/managed-work/input.js.map +1 -1
  115. package/dist/domains/managed-work/journal.js +77 -3
  116. package/dist/domains/managed-work/journal.js.map +1 -1
  117. package/dist/domains/managed-work/lock.js +67 -1
  118. package/dist/domains/managed-work/lock.js.map +1 -1
  119. package/dist/domains/managed-work/notifications.js +0 -15
  120. package/dist/domains/managed-work/notifications.js.map +1 -1
  121. package/dist/domains/managed-work/pair-admission.js +108 -0
  122. package/dist/domains/managed-work/pair-admission.js.map +1 -0
  123. package/dist/domains/managed-work/prompts.js +257 -22
  124. package/dist/domains/managed-work/prompts.js.map +1 -1
  125. package/dist/domains/managed-work/redaction.js +90 -0
  126. package/dist/domains/managed-work/redaction.js.map +1 -0
  127. package/dist/domains/managed-work/review-convergence.js +41 -0
  128. package/dist/domains/managed-work/review-convergence.js.map +1 -0
  129. package/dist/domains/managed-work/review-facts.js +181 -0
  130. package/dist/domains/managed-work/review-facts.js.map +1 -0
  131. package/dist/domains/managed-work/rule-selection.js +84 -0
  132. package/dist/domains/managed-work/rule-selection.js.map +1 -0
  133. package/dist/domains/managed-work/runner.js +1967 -175
  134. package/dist/domains/managed-work/runner.js.map +1 -1
  135. package/dist/domains/managed-work/schemas.js +72 -2
  136. package/dist/domains/managed-work/schemas.js.map +1 -1
  137. package/dist/domains/managed-work/service.js +82 -13
  138. package/dist/domains/managed-work/service.js.map +1 -1
  139. package/dist/domains/managed-work/state.js +195 -5
  140. package/dist/domains/managed-work/state.js.map +1 -1
  141. package/dist/domains/managed-work/storage.js +66 -24
  142. package/dist/domains/managed-work/storage.js.map +1 -1
  143. package/dist/domains/managed-work/types.js +12 -9
  144. package/dist/domains/managed-work/types.js.map +1 -1
  145. package/dist/domains/managed-work/verification-categories.js +39 -0
  146. package/dist/domains/managed-work/verification-categories.js.map +1 -0
  147. package/dist/domains/managed-work/verification-policy.js +116 -0
  148. package/dist/domains/managed-work/verification-policy.js.map +1 -0
  149. package/dist/domains/managed-work/wait.js +21 -3
  150. package/dist/domains/managed-work/wait.js.map +1 -1
  151. package/dist/domains/managed-work/workspace-binding.js +133 -0
  152. package/dist/domains/managed-work/workspace-binding.js.map +1 -0
  153. package/dist/domains/sdd-readiness.js +44 -0
  154. package/dist/domains/sdd-readiness.js.map +1 -0
  155. package/dist/domains/skill/deploy.js +0 -6
  156. package/dist/domains/skill/deploy.js.map +1 -1
  157. package/dist/domains/skill/scripts.js +0 -8
  158. package/dist/domains/skill/scripts.js.map +1 -1
  159. package/dist/domains/state.js +1 -2
  160. package/dist/domains/state.js.map +1 -1
  161. package/dist/mcp/runtime-identity.js +21 -0
  162. package/dist/mcp/runtime-identity.js.map +1 -0
  163. package/dist/mcp/server.js +369 -0
  164. package/dist/mcp/server.js.map +1 -0
  165. package/dist/platform/agent-process.js +499 -38
  166. package/dist/platform/agent-process.js.map +1 -1
  167. package/dist/platform/executable.js +28 -0
  168. package/dist/platform/executable.js.map +1 -0
  169. package/dist/platform/paths.js +1 -17
  170. package/dist/platform/paths.js.map +1 -1
  171. package/dist/platform/process-tree.js +44 -0
  172. package/dist/platform/process-tree.js.map +1 -0
  173. package/dist/platform/process.js +1 -1
  174. package/dist/platform/process.js.map +1 -1
  175. package/package.json +16 -7
  176. package/scripts/check-design-principles.mjs +107 -0
  177. package/scripts/check-managed-work-design.mjs +507 -0
  178. package/scripts/clean-dist.js +9 -0
  179. package/scripts/ensure-bin-modes.js +11 -0
  180. package/dist/cli/index.js +0 -193
  181. package/dist/cli/index.js.map +0 -1
  182. package/dist/commands/archive.js +0 -6
  183. package/dist/commands/archive.js.map +0 -1
  184. package/dist/commands/clarify.js +0 -6
  185. package/dist/commands/clarify.js.map +0 -1
  186. package/dist/commands/design.js +0 -28
  187. package/dist/commands/design.js.map +0 -1
  188. package/dist/commands/docs.js +0 -6
  189. package/dist/commands/docs.js.map +0 -1
  190. package/dist/commands/doctor.js +0 -494
  191. package/dist/commands/doctor.js.map +0 -1
  192. package/dist/commands/implement.js +0 -6
  193. package/dist/commands/implement.js.map +0 -1
  194. package/dist/commands/init.js +0 -520
  195. package/dist/commands/init.js.map +0 -1
  196. package/dist/commands/pipeline.js +0 -6
  197. package/dist/commands/pipeline.js.map +0 -1
  198. package/dist/commands/scan.js +0 -63
  199. package/dist/commands/scan.js.map +0 -1
  200. package/dist/commands/status.js +0 -173
  201. package/dist/commands/status.js.map +0 -1
  202. package/dist/commands/uninstall.js +0 -214
  203. package/dist/commands/uninstall.js.map +0 -1
  204. package/dist/commands/update.js +0 -193
  205. package/dist/commands/update.js.map +0 -1
  206. package/dist/commands/verify.js +0 -6
  207. package/dist/commands/verify.js.map +0 -1
  208. package/dist/core/assets.js +0 -27
  209. package/dist/core/assets.js.map +0 -1
  210. package/dist/core/cli-help.js +0 -98
  211. package/dist/core/cli-help.js.map +0 -1
  212. package/dist/core/context.js +0 -123
  213. package/dist/core/context.js.map +0 -1
  214. package/dist/core/dependencies.js +0 -146
  215. package/dist/core/dependencies.js.map +0 -1
  216. package/dist/core/detect.js +0 -64
  217. package/dist/core/detect.js.map +0 -1
  218. package/dist/core/i18n.js +0 -105
  219. package/dist/core/i18n.js.map +0 -1
  220. package/dist/core/integrity.js +0 -46
  221. package/dist/core/integrity.js.map +0 -1
  222. package/dist/core/manifest.js +0 -21
  223. package/dist/core/manifest.js.map +0 -1
  224. package/dist/core/prompts.js +0 -20
  225. package/dist/core/prompts.js.map +0 -1
  226. package/dist/core/registry.js +0 -134
  227. package/dist/core/registry.js.map +0 -1
  228. package/dist/core/rules.js +0 -17
  229. package/dist/core/rules.js.map +0 -1
  230. package/dist/core/scripts.js +0 -48
  231. package/dist/core/scripts.js.map +0 -1
  232. package/dist/core/skill-check.js +0 -32
  233. package/dist/core/skill-check.js.map +0 -1
  234. package/dist/core/skills.js +0 -62
  235. package/dist/core/skills.js.map +0 -1
  236. package/dist/core/state.js +0 -54
  237. package/dist/core/state.js.map +0 -1
  238. package/dist/utils/path.js +0 -11
  239. package/dist/utils/path.js.map +0 -1
  240. package/dist/utils/shell.js +0 -29
  241. package/dist/utils/shell.js.map +0 -1
package/INSTALL.en.md CHANGED
@@ -3,8 +3,7 @@
3
3
  [中文教程](./INSTALL.md)
4
4
 
5
5
  SuperBridge Flow installs OpenSpec, Superpowers, skills, hooks or command
6
- aliases, scripts, rules, and handoff state for Claude Code, Codex, and
7
- OpenCode.
6
+ aliases, scripts, rules, and handoff state for Claude Code and Codex.
8
7
 
9
8
  ## 1. Install
10
9
 
@@ -12,6 +11,11 @@ OpenCode.
12
11
  npm install -g @chenmk/superflow
13
12
  ```
14
13
 
14
+ The repository `install.sh` and `install.ps1` scripts detect the Codex/Claude
15
+ Hosts actually installed and register their managed MCP entries together with
16
+ CLI, Skills, and Hooks. Single and non-default Host combinations are not forced
17
+ through `both`; only restart the detected Hosts after installation.
18
+
15
19
  ## 2. Initialize A Project
16
20
 
17
21
  ```bash
@@ -43,9 +47,50 @@ SUPERFLOW_LANG=en superflow init
43
47
  7. Register hooks and rules.
44
48
  8. Scaffold `docs/sdd-context/`.
45
49
 
46
- OpenSpec and Superpowers are required for the full workflow. OpenCode receives
47
- skills and command aliases; native hook registration is not enabled for
48
- OpenCode yet. understand-anything is best-effort.
50
+ ### 2.1 Register The Managed MCP (Recommended)
51
+
52
+ To start managed delivery directly from the current Codex or Claude host while
53
+ Superflow launches only the peer executor in the background, register the stdio
54
+ MCP server:
55
+
56
+ ```bash
57
+ superflow mcp install --agent both
58
+ superflow mcp status --agent both
59
+ ```
60
+
61
+ Restart Codex and Claude after registration. The current host remains responsible
62
+ for user interaction and independent review. MCP-created tasks always use
63
+ `external_host`, so Superflow does not launch another supervisor CLI of the same
64
+ type. This avoids duplicated context, nested-session authentication retries, and
65
+ duplicate supervisor token usage.
66
+
67
+ Use `superflow_managed_wait` for a local wait of up to twelve hours by default.
68
+ An active request exposes healthy progress through standard MCP progress
69
+ notifications. One checkpoint does not wake Host; two consecutive checkpoints
70
+ without an effective milestone return for attention, without repeating large
71
+ evidence payloads. When a task reaches `waiting_for_host_review`, the current host performs
72
+ one complete review and submits the structured result. Superflow then enters a
73
+ three-stage delivery state and never commits, pushes, deploys, or writes to production automatically.
74
+
75
+ To remove the registration:
76
+
77
+ ```bash
78
+ superflow mcp remove --agent both
79
+ ```
80
+
81
+ Superflow no longer provides a background supervisor CLI mode. Historical tasks
82
+ are migrated to direct host review on resume, and no entry point starts a second
83
+ supervisor Agent process.
84
+
85
+ Verify the registrations with:
86
+
87
+ ```bash
88
+ codex mcp get superflow
89
+ claude mcp get superflow
90
+ ```
91
+
92
+ OpenSpec and Superpowers are required for the full workflow. understand-anything
93
+ is best-effort.
49
94
 
50
95
  ## 3. Daily Workflow
51
96
 
@@ -61,12 +106,6 @@ In Claude Code:
61
106
  /superflow-pipeline
62
107
  ```
63
108
 
64
- In OpenCode:
65
-
66
- ```text
67
- /superflow-pipeline
68
- ```
69
-
70
109
  The workflow phases are:
71
110
 
72
111
  ```text
@@ -120,13 +159,16 @@ export SUPERFLOW_UPDATE_MIN_INTERVAL_SECONDS=21600
120
159
  ```
121
160
 
122
161
  Team environments should keep `check`. Personal machines may choose `apply`.
162
+ In `apply` mode, package upgrades are followed by the newly installed CLI, which
163
+ redeploys Skills, Hooks, rules, scripts, and managed MCP registrations. Partial
164
+ failure removes the throttle stamp and remains eligible for the next-session retry.
165
+ Restart the Agent after success to load the new MCP process.
123
166
 
124
167
  ## 6. Uninstall
125
168
 
126
169
  ```bash
127
170
  superflow uninstall --agent codex --force
128
171
  superflow uninstall --agent claude --force
129
- superflow uninstall --agent opencode --force
130
172
  ```
131
173
 
132
174
  This removes SuperBridge Flow managed assets only. It does not remove unrelated
package/INSTALL.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SuperBridge Flow 安装、初始化与日常使用教程
2
2
 
3
- `@chenmk/superflow` 是面向 Claude Code、Codex 和 OpenCode 的 SDD 开发工作流 CLI。它把
3
+ `@chenmk/superflow` 是面向 Claude Code 和 Codex 的 SDD 开发工作流 CLI。它把
4
4
  OpenSpec、Superpowers、SuperBridge Flow 技能、状态机、handoff 上下文包、hook 脚本和
5
5
  质量门禁安装到你的 agent 环境里,让一个需求可以沿着固定阶段推进:
6
6
 
@@ -24,7 +24,7 @@ docs -> design -> implement -> verify -> archive
24
24
  | Node.js | 20+ | `node -v` |
25
25
  | npm | 9+ | `npm -v` |
26
26
  | Git | 已安装 | `git --version` |
27
- | Agent | Claude Code、Codex 或 OpenCode 至少一个 | `claude --version` / `codex --version` / `opencode --version` |
27
+ | Agent | Claude Code、Codex 至少一个 | `claude --version` / `codex --version` |
28
28
  | Shell | macOS/Linux 原生 shell;Windows 使用 Git Bash 或兼容 shell | `bash --version` |
29
29
  | Python | hook 中的 Python 脚本需要 | `python3 --version` |
30
30
 
@@ -68,6 +68,9 @@ macOS/Linux 也可以使用仓库里的脚本:
68
68
  bash install.sh
69
69
  ```
70
70
 
71
+ 源码安装脚本会自动检测本机已有的 Codex/Claude,完成 CLI、Skills/Hooks 和对应
72
+ 托管 MCP 注册;任意单侧或组合安装都不会被强行注册成 `both`。完成后只需重启检测到的 Agent。
73
+
71
74
  Windows PowerShell:
72
75
 
73
76
  ```powershell
@@ -83,7 +86,7 @@ cd your-project
83
86
  superflow init
84
87
  ```
85
88
 
86
- CLI 会弹出工具选择列表。你可以只选 Codex、只选 Claude Code、只选 OpenCode,
89
+ CLI 会弹出工具选择列表。你可以只选 Codex、只选 Claude Code,
87
90
  也可以选择多个工具。
88
91
  选择结果会替代手写 `--agent codex` / `--agent claude`。
89
92
 
@@ -94,13 +97,12 @@ CLI 会弹出工具选择列表。你可以只选 Codex、只选 Claude Code、
94
97
  3. 在当前项目目录执行 OpenSpec 原生初始化,并把你选择的工具下发给
95
98
  OpenSpec,例如 `openspec init <project> --tools claude,codex --profile custom`。
96
99
  4. 为 Claude Code / Codex 安装 Superpowers;这是 Superflow 的核心 HOW/TDD
97
- 依赖,安装失败会中断初始化。OpenCode 侧会部署 SuperBridge Flow skills
98
- 和 commands,不注册原生 hook。
100
+ 依赖,安装失败会中断初始化。
99
101
  5. 尝试安装 understand-anything,并复制 api-doc-changelog;失败只警告,
100
102
  不阻断初始化。
101
103
  6. 部署 SuperBridge Flow/OpenSpec skills。
102
104
  7. 部署 hook/command 脚本;Codex 写入 `hooks.json`,Claude Code 写入
103
- `settings.json`,OpenCode 写入 `.opencode/commands`。
105
+ `settings.json`。
104
106
  8. 部署 SuperBridge Flow 防漂移规则。
105
107
  9. 初始化 `docs/sdd-context/` 项目上下文模板,并提示
106
108
  understand-anything 扫描状态。
@@ -111,9 +113,8 @@ CLI 会弹出工具选择列表。你可以只选 Codex、只选 Claude Code、
111
113
  请选择要初始化的 agent 工具(可多选):
112
114
  1) Claude Code
113
115
  2) Codex
114
- 3) OpenCode
115
- a) 安装 Claude Code + Codex(默认);输入 all 会包含 OpenCode
116
- 输入序号,例如 1,2 / 2,3 / all / a:
116
+ a) 安装 Claude Code + Codex(默认)
117
+ 输入序号,例如 1,2 / all / a:
117
118
  ```
118
119
 
119
120
  选择结果会同时影响:
@@ -128,10 +129,8 @@ CLI 会弹出工具选择列表。你可以只选 Codex、只选 Claude Code、
128
129
 
129
130
  | 命令 | 说明 |
130
131
  |------|------|
131
- | `superflow init` | 交互式初始化,可多选 Codex / Claude Code / OpenCode |
132
+ | `superflow init` | 交互式初始化,可多选 Codex / Claude Code |
132
133
  | `superflow init --yes` | 非交互执行,默认初始化 Claude Code + Codex |
133
- | `superflow init --agent opencode` | 只初始化 OpenCode |
134
- | `superflow init --agent all` | 初始化 Claude Code + Codex + OpenCode |
135
134
  | `superflow init --scope global` | 安装到用户主目录,默认值 |
136
135
  | `superflow init --scope project` | 安装到当前项目目录 |
137
136
  | `superflow init --no-hooks` | 只安装技能和脚本,不注册 hook |
@@ -165,14 +164,42 @@ superflow scan --language en --force
165
164
  `scan` 默认保留已经编辑过的文件;加 `--force` 才会覆盖
166
165
  `docs/sdd-context/` 下的 4 个模板文件。
167
166
 
168
- 初始化后建议重启 Claude Code、Codex 或 OpenCode,让 agent 重新加载技能列表。
167
+ 初始化后建议重启 Claude Code 或 Codex,让 agent 重新加载技能列表。
168
+
169
+ ### 3.1 注册托管 MCP(推荐)
170
+
171
+ 如果希望直接在当前 Codex 或 Claude 主 Agent 会话中发起托管,并由 Superflow
172
+ 在后台只启动对端研发 Agent,请注册 stdio MCP:
173
+
174
+ ```bash
175
+ superflow mcp install --agent both
176
+ superflow mcp status --agent both
177
+ ```
178
+
179
+ 注册完成后重启 Codex/Claude。当前主 Agent 继续负责与用户沟通和独立评审,MCP
180
+ 创建的任务固定使用 `external_host`,不会再额外启动一个同类型 Supervisor CLI。
181
+ 因此可以避免重复传递完整上下文、嵌套会话 401 重试,以及监督侧 Token 重复消耗。
182
+
183
+ 托管期间应使用 `superflow_managed_wait` 默认最长等待 12 小时;活动请求通过标准 MCP
184
+ progress notification 展示健康进度,单个监督点不会唤醒,连续两个无有效里程碑才返回,
185
+ 不会通过模型回合做固定频率轮询或重复回传大段证据。任务进入
186
+ `waiting_for_host_review` 后,当前主 Agent 一次性完成全量
187
+ 评审并提交结构化结果。进入三段交付状态之一后停止,不会自动提交、推送、部署或写入生产环境。
188
+
189
+ 如需移除注册:
190
+
191
+ ```bash
192
+ superflow mcp remove --agent both
193
+ ```
194
+
195
+ Superflow 不再提供后台 Supervisor CLI 模式。历史任务恢复时会自动迁移为当前 Host
196
+ 直接评审,任何入口都不会再启动第二个监督 Agent 进程。
169
197
 
170
198
  ## 4. 验证安装
171
199
 
172
200
  ```bash
173
201
  superflow doctor --agent codex
174
202
  superflow doctor --agent claude
175
- superflow doctor --agent opencode
176
203
  ```
177
204
 
178
205
  也可以同时检查两侧:
@@ -181,6 +208,13 @@ superflow doctor --agent opencode
181
208
  superflow doctor
182
209
  ```
183
210
 
211
+ 若已注册托管 MCP,还可以检查两侧配置:
212
+
213
+ ```bash
214
+ codex mcp get superflow
215
+ claude mcp get superflow
216
+ ```
217
+
184
218
  `doctor` 会检查:
185
219
 
186
220
  - `superflow` CLI 是否在 PATH。
@@ -188,7 +222,7 @@ superflow doctor
188
222
  - Superpowers、understand-anything、api-doc-changelog 是否可检测。
189
223
  - SuperBridge Flow skills 是否完整。
190
224
  - hook 脚本是否存在。
191
- - hook 是否已注册;OpenCode 当前检查 command alias,不把原生 hook 作为硬门禁。
225
+ - hook 是否已注册。
192
226
  - SDD rule 是否已部署。
193
227
  - 当前项目里的 `.sdd/state.yaml` 是否符合状态机字段约束。
194
228
 
@@ -196,7 +230,6 @@ superflow doctor
196
230
 
197
231
  ```bash
198
232
  superflow pipeline --agent codex
199
- superflow pipeline --agent opencode
200
233
  superflow docs --agent codex
201
234
  superflow design --agent codex
202
235
  superflow implement --agent codex
@@ -208,21 +241,18 @@ superflow archive --agent codex
208
241
 
209
242
  ### 5.1 开始一个完整需求
210
243
 
211
- Codex、Claude Code 和 OpenCode 的触发方式不同:
244
+ Codex、Claude Code 的触发方式不同:
212
245
 
213
246
  - Codex:通常用自然语言或 `$skill-name` 触发,例如“请使用 SuperBridge Flow 流程”或
214
247
  `$superflow-pipeline`。
215
248
  - Claude Code:安装后可以直接使用 slash command,例如
216
249
  `/superflow-pipeline`、`/superflow-clarify`、`/superflow-docs`、`/superflow-design`、
217
250
  `/superflow-implement`、`/superflow-verify`、`/superflow-archive`。
218
- - OpenCode:安装后使用 `.opencode/commands` 里的 slash command,例如
219
- `/superflow-pipeline`、`/superflow-docs`、`/superflow-design`、`/superflow-verify`。
220
251
 
221
252
  普通使用建议始终先走总路由,让 SDD 自己判断阶段:
222
253
 
223
254
  - Codex:优先 `$superflow-pipeline` 或自然语言“请使用 SuperBridge Flow 流程”。
224
255
  - Claude Code:优先 `/superflow-pipeline`。
225
- - OpenCode:优先 `/superflow-pipeline`。
226
256
 
227
257
  只有你非常明确当前就是需求澄清、文档补齐、技术详设或实现阶段时,才直达
228
258
  `$superflow-clarify` / `/superflow-clarify`、`$superflow-docs` / `/superflow-docs` 等阶段命令。
@@ -239,12 +269,6 @@ Codex、Claude Code 和 OpenCode 的触发方式不同:
239
269
  /superflow-pipeline 处理这个需求:……
240
270
  ```
241
271
 
242
- 在 OpenCode 会话里同样可以运行:
243
-
244
- ```text
245
- /superflow-pipeline 处理这个需求:……
246
- ```
247
-
248
272
  两种方式都会从 SDD 总入口路由,通常按下面阶段推进。
249
273
 
250
274
  #### 示例:读取飞书在线文档中的某个小节
@@ -491,7 +515,7 @@ Claude Code 里也可以直接用当前阶段命令继续,例如:
491
515
 
492
516
  - `@chenmk/superflow`
493
517
  - `@fission-ai/openspec`
494
- - Claude Code / Codex 的 Superpowers 插件;OpenCode 侧刷新 SuperBridge Flow assets
518
+ - Claude Code / Codex 的 Superpowers 插件
495
519
 
496
520
  同一会话只检查一次;默认只提示,不自动安装。至少间隔 6 小时才真正访问
497
521
  npm/plugin 源,避免每次 prompt 都联网。可用:
@@ -503,7 +527,7 @@ export SUPERFLOW_AUTO_UPDATE=check
503
527
  # 关闭自动检查
504
528
  export SUPERFLOW_AUTO_UPDATE=0
505
529
 
506
- # 个人机器可选:检查到新版本后自动安装
530
+ # 个人机器可选:自动完整更新 CLI、Skills、Hooks、规则、脚本和托管 MCP
507
531
  export SUPERFLOW_AUTO_UPDATE=apply
508
532
 
509
533
  # 调整最小检查间隔,默认 21600 秒(6 小时)
@@ -514,6 +538,10 @@ export SUPERFLOW_UPDATE_MIN_INTERVAL_SECONDS=21600
514
538
  `superflow update --with-package` 更新;个人机器如果接受自动升级风险,再设置
515
539
  `SUPERFLOW_AUTO_UPDATE=apply`。
516
540
 
541
+ 显式更新和 Hook `apply` 使用同一闭环:先更新依赖包,再由新版本 CLI 重新部署全部 Agent
542
+ 资产并刷新 MCP 注册。任一步失败会记录日志、删除本轮节流戳并允许下次会话重试;成功后需
543
+ 重启 Agent 才会加载新的 MCP 进程。
544
+
517
545
  ### 8.2 手动更新
518
546
 
519
547
  只刷新已安装技能、脚本、规则和 hook:
@@ -529,8 +557,8 @@ superflow update --agent claude
529
557
  superflow update --with-package
530
558
  ```
531
559
 
532
- 该命令会统一更新 `@chenmk/superflow`、`@fission-ai/openspec` 和已选择
533
- agent 的 Superpowers 插件。
560
+ 该命令会统一更新 `@chenmk/superflow`、`@fission-ai/openspec`、已选择 agent 的
561
+ Superpowers 插件、Skills、Hooks、规则、脚本和托管 MCP 注册。
534
562
 
535
563
  只查看更新计划:
536
564
 
@@ -599,13 +627,11 @@ python3 --version
599
627
 
600
628
  ### 技能装好了,但 agent 没触发
601
629
 
602
- 重启 Claude Code、Codex 或 OpenCode。若仍不触发:
630
+ 重启 Claude Code 或 Codex。若仍不触发:
603
631
 
604
632
  ```bash
605
633
  superflow doctor --agent codex
606
- superflow doctor --agent opencode
607
634
  superflow pipeline --agent codex
608
- superflow pipeline --agent opencode
609
635
  ```
610
636
 
611
637
  然后在会话里明确说:
package/README.md CHANGED
@@ -44,14 +44,16 @@ real verified delivery. SuperBridge Flow makes that gap explicit:
44
44
  conversations get compacted or split across agent sessions.
45
45
 
46
46
  The CLI installs skills, hooks or command aliases, rules, scripts, handoff
47
- state, and dependency guards for Claude Code, Codex, and OpenCode.
47
+ state, and dependency guards for Claude Code and Codex.
48
48
 
49
49
  ## Highlights
50
50
 
51
- - **Dual-Agent managed delivery.** The current Agent supervises while the peer
52
- Agent develops, starts, and verifies through a non-interactive CLI. Repair
53
- rounds resume exact sessions and are capped at 5 reviews, 7 executor calls,
54
- and 12 total calls. Durable journals allow recovery after terminal or network
51
+ - **Dual-Agent managed delivery.** The current host Agent reviews directly while
52
+ the peer Agent develops, starts, and verifies in one CLI session without a
53
+ tool-turn limit, then actively returns one structured result. A later session
54
+ is created only for review repair, process failure, or human recovery. Review
55
+ and execution default to 5 reviews, 7 executor calls, and 12 total calls.
56
+ Durable journals allow recovery after terminal or network
55
57
  interruption, and passing work stops for explicit Git approval.
56
58
  - **9 catalogued failure modes, blocked at the gate.** Nine real ways AI breaks
57
59
  in production — swallowing the whole PRD then forgetting details, editing
@@ -86,17 +88,50 @@ state, and dependency guards for Claude Code, Codex, and OpenCode.
86
88
  required: `> use SuperFlow to handle this requirement` triggers clarify →
87
89
  docs → design → implement → verify → archive. Phase progression, guards,
88
90
  hashes, and hooks are flow-enforced, not user-discipline.
89
- - **`superflow check` audits document completeness.** Runs against a 13-item
90
- required-file checklist per change. Missing a required doc? Exit 1. No more
91
- surprises at the implement phase — the gate catches gaps while you're still
92
- in docs.
91
+ - **`superflow check` audits delivery readiness by level.** `files` checks the
92
+ required set, `docs` adds every-prompt links, independent reviews, and complex
93
+ diagrams, while `coding-ready` adds environment preflight plus the complete
94
+ docs/design/implement gates and writes a receipt bound to the current handoff hash.
93
95
  - **`superflow config` tunes review depth per change.** `--review-mode
94
- off|standard|thorough` controls code-review intensity; `--auto-transition`
96
+ off|standard|thorough` controls code-review intensity; `--auto-transition`
95
97
  controls automatic phase progression. Match the rigor to the risk.
96
98
  - **Startup version check.** Every superflow command silently compares your
97
99
  installed version against the npm registry. A new version triggers a
98
100
  non-blocking upgrade hint on stderr.
99
101
 
102
+ ## Managed delivery: a bounded review loop
103
+
104
+ ![A bounded review loop: task and contract enter, review returns fixes to
105
+ implementation, and only a passing result reaches delivery.](./assets/brand/managed-review-loop.png)
106
+
107
+ Give Superflow a straightforward development task or a frozen Superflow / SDD
108
+ contract. The peer Agent implements and verifies; the current Host reviews the
109
+ workspace, gates, and evidence.
110
+
111
+ ```text
112
+ Task or frozen contract
113
+ ↓
114
+ Peer Agent builds and verifies
115
+ ↓
116
+ Current Host reviews source, gates, and evidence
117
+ ├─ needs_fix → findings + prior evidence → Peer Agent ↺
118
+ └─ pass → delivery-ready state → waits for your Git / release approval
119
+ ```
120
+
121
+ The loop is deliberately bounded, not an unattended agent swarm:
122
+
123
+ - The Host owns semantic review; the peer owns source changes and verification.
124
+ - A failed review returns precise findings and durable evidence, so the peer
125
+ repairs the current workspace instead of restarting from a blank prompt.
126
+ - Default budgets cap the work at 5 Host reviews, 7 peer invocations, and 12
127
+ total Agent calls. Journals make interruption recovery auditable.
128
+ - A pass means the frozen delivery contract is satisfied. It never means an
129
+ absolute risk guarantee, and it never auto-commits, pushes, deploys, or
130
+ writes to production.
131
+
132
+ Read the [managed delivery loop guide](./docs/managed-delivery-loop.en.md) for
133
+ the role boundary, transition rules, and recovery behavior.
134
+
100
135
  ## Workflow
101
136
 
102
137
  ```text
@@ -105,13 +140,13 @@ docs -> design -> implement -> verify -> archive
105
140
 
106
141
  Each phase has a clear owner and an exit gate:
107
142
 
108
- | Phase | Owner | Output |
109
- | --- | --- | --- |
110
- | `docs` | OpenSpec/SDD | Requirements, contracts, API/DB/test docs |
111
- | `design` | Superpowers | Source-level technical design and TDD plan |
112
- | `implement` | Superpowers + SuperBridge Flow | Batched implementation prompts and review gates |
113
- | `verify` | SuperBridge Flow hooks | Evidence-backed test report and real-entry checks |
114
- | `archive` | OpenSpec/SDD | Final spec archive and lifecycle closure |
143
+ | Phase | Owner | Output |
144
+ | ----------- | ------------------------------ | ------------------------------------------------- |
145
+ | `docs` | OpenSpec/SDD | Requirements, contracts, API/DB/test docs |
146
+ | `design` | Superpowers | Source-level technical design and TDD plan |
147
+ | `implement` | Superpowers + SuperBridge Flow | Batched implementation prompts and review gates |
148
+ | `verify` | SuperBridge Flow hooks | Evidence-backed test report and real-entry checks |
149
+ | `archive` | OpenSpec/SDD | Final spec archive and lifecycle closure |
115
150
 
116
151
  ## Install
117
152
 
@@ -119,6 +154,10 @@ Each phase has a clear owner and an exit gate:
119
154
  npm install -g @chenmk/superflow
120
155
  ```
121
156
 
157
+ For a source checkout, `bash install.sh` detects installed Codex, Claude, and
158
+ Codex and Claude Hosts and installs CLI, Skills/Hooks, and their managed MCP registrations
159
+ in one pass. Restart the detected Hosts afterwards.
160
+
122
161
  Then initialize a project:
123
162
 
124
163
  ```bash
@@ -127,7 +166,7 @@ superflow init
127
166
 
128
167
  Interactive init lets you select:
129
168
 
130
- - target agent tools: Claude Code, Codex, OpenCode, or selected combinations
169
+ - target agent tools: Claude Code, Codex, or both
131
170
  - language: English or Chinese
132
171
  - install scope: global or project
133
172
 
@@ -150,11 +189,97 @@ Manage an implementation prompt, OpenSpec change, or direct development task:
150
189
 
151
190
  ```bash
152
191
  superflow pipeline "<prompt path, change directory, or task>" --managed \
153
- --project "<project root>"
192
+ --project "<project root>" --supervisor current --executor peer
154
193
  ```
155
194
 
156
195
  The selected language is frozen into the task contract and reused by Agent
157
196
  prompts, reviews, journals, reports, notifications, and resumed rounds.
197
+ The first executor invocation runs continuously without a Superflow tool-turn
198
+ limit, while the current host agent reviews directly instead of the service
199
+ spawning a nested copy. The first invocation receives the frozen task prompt;
200
+ later repair or recovery invocations receive a condensed handoff so a new
201
+ session can continue from the workspace, pending tasks, and complete review
202
+ findings. When the
203
+ task reports `external_supervisor_review_required`, submit the review and resume:
204
+
205
+ ```bash
206
+ superflow pipeline --resume-task <task-id> --submit-host-review <review.json>
207
+ ```
208
+
209
+ ### Interact from the current host Agent (recommended MCP path)
210
+
211
+ Register the bundled local stdio MCP server for Codex or Claude:
212
+
213
+ ```bash
214
+ superflow mcp install --agent both
215
+ ```
216
+
217
+ After restarting the host Agent session, keep talking to the current Codex or
218
+ Claude Agent. The host uses MCP to supervise while Superflow starts only the
219
+ peer executor:
220
+
221
+ - `superflow_managed_start` freezes the task and always uses `external_host`.
222
+ - `superflow_managed_status` and `superflow_managed_list` expose state and evidence.
223
+ - `superflow_managed_wait` defaults to a 240-second compatible transport window;
224
+ Hosts with longer tool limits may explicitly request up to twelve hours. Window
225
+ expiry continues compactly from `latestSequence`. Active requests expose healthy
226
+ progress through standard MCP notifications, while two checkpoints without an
227
+ effective milestone return for semantic attention.
228
+ - `superflow_managed_message` carries user guidance to the current execution
229
+ boundary or the next handoff.
230
+ - `superflow_managed_authorize_executor` freezes task-scoped repository consent without bypassing host DLP.
231
+ - `superflow_managed_pause` and `superflow_managed_resume` interrupt the active executor, persist pause, and resume from state.
232
+ - `superflow_managed_submit_review` submits one complete structured host review.
233
+ - `superflow_managed_record_validation` records environment/release evidence and recomputes three-stage delivery.
234
+
235
+ Claude Executors receive neither `--max-turns` nor `--max-budget-usd`, so normal
236
+ work is not split by a fixed tool-step count or an inaccurate provider-dollar
237
+ estimate. The defaults stop a process after 60 minutes with no output or a
238
+ two-hour single-invocation deadline. Repeated provider failures,
239
+ token/invocation budgets, safety boundaries, and user pause still stop
240
+ execution. Safe Java, Maven, Node, and npm executable paths found during
241
+ preflight are written into the executor policy to avoid redundant environment
242
+ discovery.
243
+ To prevent a 1M context window from multiplying input tokens across hundreds of
244
+ tool turns, Claude Executors default to early auto-compaction at 70 percent of a
245
+ 200K effective window. Explicit Claude environment settings win, and the frozen
246
+ prompt plus handoff are reloaded after compaction.
247
+
248
+ MCP mode never starts a nested supervisor CLI. Host conversation and review do
249
+ not consume the background Agent invocation budget; only real executor calls do.
250
+ Passing delivery enters `environment_validation_blocked`, `local_delivery_ready`,
251
+ or `release_ready` according to three-track progress, without automatic commit,
252
+ push, deployment, or production writes.
253
+
254
+ Managed work uses three default circuit breakers: the same mechanical delivery
255
+ error receives only one automatic repair, no more than two automatic repairs run
256
+ before escalation to the current host, and the next executor call is stopped at
257
+ two million cumulative token units. Dollar pricing is not comparable across
258
+ model providers, so the default contract has no USD circuit and Claude receives
259
+ no `--max-budget-usd`. Three or more permission denials in one invocation also
260
+ suppress another executor retry. The Runner derives changedFiles, baseline task
261
+ evidence, and verification categories from the real workspace and commands
262
+ instead of spending full executor rounds repairing JSON.
263
+
264
+ Inspect or remove the integration with:
265
+
266
+ ```bash
267
+ superflow mcp status --agent both
268
+ superflow mcp remove --agent both
269
+ ```
270
+
271
+ MCP is the communication channel between the host Agent and the local managed
272
+ state machine, not a third model. Host data-disclosure policy for an external
273
+ executor provider remains separate from local filesystem access.
274
+ An existing task prompt uses a full contract, a direct engineering request gets a
275
+ standard execution contract, and even a one-line request receives a minimal
276
+ implementation and verification plan before the executor starts.
277
+
278
+ Design and field evidence:
279
+
280
+ - [Cross-Agent Managed Work implementation plan](docs/cross-agent-development-implementation-plan.en.md)
281
+ - [Managed Work design principles](docs/managed-work-design-principles.en.md)
282
+ - [Managed Agent protocol](docs/managed-agent-protocol.en.md)
158
283
 
159
284
  ## What Init Installs
160
285
 
@@ -176,29 +301,28 @@ best-effort and does not block initialization.
176
301
 
177
302
  ## Commands
178
303
 
179
- | Command | Purpose |
180
- | --- | --- |
181
- | `superflow init` | Install and configure SuperBridge Flow interactively |
182
- | `superflow init --agent opencode` | Install OpenCode skills and command aliases |
183
- | `superflow init --agent all` | Install Claude Code, Codex, and OpenCode |
184
- | `superflow update` | Refresh installed skills, hooks, scripts, and rules |
185
- | `superflow update --with-package` | Also update `@chenmk/superflow`, OpenSpec, and Superpowers |
186
- | `superflow doctor` | Diagnose installed assets and project state |
187
- | `superflow status` | Show active changes, current phase, next command, and risks |
188
- | `superflow --language en --help` | Show English CLI help |
189
- | `superflow scan --language en` | Regenerate project context templates in English |
190
- | `superflow pipeline` | Check pipeline skill deployment |
191
- | `superflow pipeline "<task>" --managed --project <path>` | Run Dual-Agent managed development to a terminal delivery state |
192
- | `superflow docs` | Check docs-phase skill deployment |
193
- | `superflow design` | Check design-phase skill deployment |
194
- | `superflow implement` | Check implement-phase skill deployment |
195
- | `superflow verify` | Check verify-phase skill deployment |
196
- | `superflow archive` | Check archive-phase skill deployment |
197
- | `superflow check <change>` | Audit 13-file SDD document completeness |
198
- | `superflow config <change> --review-mode <mode>` | Set review depth (off/standard/thorough) |
199
- | `superflow config <change> --auto-transition <bool>` | Toggle automatic phase progression |
200
- | `superflow status` | List active changes with phase, tasks, and doc gaps |
201
- | `superflow update --with-package` | Update superflow, OpenSpec, and Superpowers |
304
+ | Command | Purpose |
305
+ | ------------------------------------------------------------ | ------------------------------------------------------------------------ |
306
+ | `superflow init` | Install and configure SuperBridge Flow interactively |
307
+ | `superflow update` | Refresh installed skills, hooks, scripts, and rules |
308
+ | `superflow update --with-package` | Also update `@chenmk/superflow`, OpenSpec, and Superpowers |
309
+ | `superflow doctor` | Diagnose CLIs, MCP runtime paths, installed assets, and project state |
310
+ | `superflow status` | Show active changes, current phase, next command, and risks |
311
+ | `superflow --language en --help` | Show English CLI help |
312
+ | `superflow scan --language en` | Regenerate project context templates in English |
313
+ | `superflow pipeline` | Check pipeline skill deployment |
314
+ | `superflow pipeline "<task>" --managed --project <path>` | Run short-session execution with direct review by the current host agent |
315
+ | `superflow docs [change]` | Run the docs gate and check the phase skill |
316
+ | `superflow design` | Check design-phase skill deployment |
317
+ | `superflow implement [change]` | Create a current Coding Ready receipt before implementation |
318
+ | `superflow verify` | Check verify-phase skill deployment |
319
+ | `superflow archive` | Check archive-phase skill deployment |
320
+ | `superflow check <change> --level files\|docs\|coding-ready` | Audit file, document-delivery, or coding readiness |
321
+ | `superflow config <change> --review-mode <mode>` | Set review depth (off/standard/thorough) |
322
+ | `superflow config <change> --auto-transition <bool>` | Toggle automatic phase progression |
323
+ | `superflow status` | List active changes with phase, tasks, and doc gaps |
324
+ | `superflow eval <taskPath> [--json]` | Evaluate managed quality, calls, tokens, cache, and time offline |
325
+ | `superflow update --with-package` | Update superflow, OpenSpec, and Superpowers |
202
326
 
203
327
  ## Agent Usage
204
328
 
@@ -214,16 +338,6 @@ In Claude Code:
214
338
  /superflow-pipeline
215
339
  ```
216
340
 
217
- In OpenCode:
218
-
219
- ```text
220
- /superflow-pipeline
221
- ```
222
-
223
- OpenCode receives `.opencode/skills` and `.opencode/commands` assets. Native
224
- hook registration is not enabled for OpenCode yet; use `/superflow-*` commands
225
- to run workflow gates explicitly.
226
-
227
341
  For large requirements, ask the agent to read one section or one feature at a
228
342
  time. The total router automatically uses embedded deep clarification when a
229
343
  feature needs an owner decision; it investigates available facts first and asks
@@ -253,13 +367,18 @@ export SUPERFLOW_AUTO_UPDATE=check
253
367
  # Disable automatic checks
254
368
  export SUPERFLOW_AUTO_UPDATE=0
255
369
 
256
- # Optional for personal machines: install automatically when updates are found
370
+ # Optional: update packages, Skills, Hooks, rules, scripts, and managed MCP
257
371
  export SUPERFLOW_AUTO_UPDATE=apply
258
372
 
259
373
  # Minimum check interval in seconds; default is 21600
260
374
  export SUPERFLOW_UPDATE_MIN_INTERVAL_SECONDS=21600
261
375
  ```
262
376
 
377
+ `apply` re-enters the newly installed CLI after package upgrade and refreshes all
378
+ detected Agent assets plus managed MCP registrations. A partial failure keeps its
379
+ log and removes the throttle stamp so the next session can retry. Restart the
380
+ Agent after success because an existing MCP process cannot hot-load the upgrade.
381
+
263
382
  ## Language Support
264
383
 
265
384
  SuperBridge Flow supports English and Chinese installation modes.
@@ -275,10 +394,15 @@ keeps the same workflow contracts.
275
394
  ## Requirements
276
395
 
277
396
  - Node.js 20+
278
- - Claude Code, Codex, or OpenCode
397
+ - Claude Code or Codex
279
398
  - npm access to install OpenSpec and Superpowers
280
399
  - Git Bash or a compatible shell on Windows for hook scripts
281
400
 
401
+ On Windows, managed work resolves Agent `.exe/.cmd/.bat` shims and stops the
402
+ complete Agent process tree on pause or timeout. macOS/Linux keep detached
403
+ process groups; none of the three Agent launch paths concatenates commands in a
404
+ general-purpose shell.
405
+
282
406
  ## Star History
283
407
 
284
408
  The chart is generated by Star History from public GitHub star data. It may stay