@ckanner/flywheel 0.31.0 → 0.31.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 (136) hide show
  1. package/CHANGELOG.md +48 -5
  2. package/CONTRIBUTING.md +19 -0
  3. package/LICENSE +21 -0
  4. package/README.en.md +4 -171
  5. package/README.md +152 -269
  6. package/README.zh-CN.md +116 -0
  7. package/bin/flywheel-claude-code-pro-worker.js +1 -1
  8. package/bin/flywheel-codex-pro-worker.js +1 -1
  9. package/bin/flywheel-dsh-worker.js +1 -1
  10. package/bin/flywheel.js +1 -1
  11. package/bin/runtime.js +1 -1
  12. package/docs/README.md +84 -0
  13. package/docs/README.zh-CN.md +64 -0
  14. package/docs/archive/README.md +13 -0
  15. package/docs/archive/codex-pro-adapter-handoff.md +197 -0
  16. package/docs/archive/design-v0.24.md +540 -0
  17. package/docs/design.md +681 -0
  18. package/docs/en/claude-code-pro.md +25 -16
  19. package/docs/en/configuration.md +306 -141
  20. package/docs/en/contributing.md +303 -0
  21. package/docs/en/flow-console.md +67 -13
  22. package/docs/en/getting-started.md +232 -126
  23. package/docs/en/investigation.md +219 -0
  24. package/docs/en/jev-shadow.md +67 -0
  25. package/docs/en/model-policy.md +147 -62
  26. package/docs/en/releasing.md +207 -0
  27. package/docs/en/session-evaluation.md +4 -2
  28. package/docs/en/session-recovery.md +49 -6
  29. package/docs/en/workflow.md +222 -114
  30. package/docs/evaluation/README.md +12 -0
  31. package/docs/evaluation/jev-historical-provisional.json +138 -0
  32. package/docs/evaluation/jev-historical-result-2026-11-10.json +174 -0
  33. package/docs/plans/2026-11-01-dsh-integration.md +67 -0
  34. package/docs/plans/2026-11-01-model-profiles-preflight.md +29 -0
  35. package/docs/plans/2026-11-01-npm-installation.md +19 -0
  36. package/docs/plans/2026-11-03-codex-pro-default.md +28 -0
  37. package/docs/plans/2026-11-06-adaptive-workflow.md +365 -0
  38. package/docs/plans/2026-11-07-session-lifecycle.en.md +424 -0
  39. package/docs/plans/2026-11-07-session-lifecycle.md +337 -0
  40. package/docs/plans/2026-11-08-flow-console.md +271 -0
  41. package/docs/plans/2026-11-10-jev-shadow.md +32 -0
  42. package/docs/plans/2026-11-10-task-discovery.md +17 -0
  43. package/docs/plans/2026-11-10-workbench-redesign.md +19 -0
  44. package/docs/plans/2026-11-12-feedback-driven-workflows.md +739 -0
  45. package/docs/plans/README.md +22 -0
  46. package/docs/reviews/2026-08-24-v0.18-review-fixplan.md +265 -0
  47. package/docs/reviews/2026-09-12-pr4-pr5-review.md +70 -0
  48. package/docs/reviews/README.md +12 -0
  49. package/docs/validation/2026-11-01-npm-installation.md +105 -0
  50. package/docs/validation/2026-11-01-profiles-preflight.md +67 -0
  51. package/docs/validation/2026-11-01-results.md +114 -0
  52. package/docs/validation/2026-11-03-codex-pro-default.md +90 -0
  53. package/docs/validation/2026-11-04-dsh-native-view.md +85 -0
  54. package/docs/validation/2026-11-04-release-0.28.1.md +33 -0
  55. package/docs/validation/2026-11-04-release-0.28.2.md +35 -0
  56. package/docs/validation/2026-11-05-dsh-0.2.2-compatibility.md +26 -0
  57. package/docs/validation/2026-11-05-registry-smoke-recovery.md +26 -0
  58. package/docs/validation/2026-11-05-release-0.28.3.md +32 -0
  59. package/docs/validation/2026-11-05-subscription-model-access.md +60 -0
  60. package/docs/validation/2026-11-05-view-order.md +14 -0
  61. package/docs/validation/2026-11-07-adaptive-workflow.md +79 -0
  62. package/docs/validation/2026-11-07-claude-code-pro.md +144 -0
  63. package/docs/validation/2026-11-07-session-lifecycle.md +136 -0
  64. package/docs/validation/2026-11-08-session-p3-p4.md +99 -0
  65. package/docs/validation/2026-11-09-flow-console.md +81 -0
  66. package/docs/validation/2026-11-10-jev-shadow.md +50 -0
  67. package/docs/validation/2026-11-10-task-discovery.md +45 -0
  68. package/docs/validation/2026-11-10-workbench-redesign.md +54 -0
  69. package/docs/validation/2026-11-11-release-0.30.2.md +65 -0
  70. package/docs/validation/2026-11-11-release-0.31.0.md +46 -0
  71. package/docs/validation/2026-11-12-dsh-0.2.2-rc.2.md +58 -0
  72. package/docs/validation/2026-11-12-feedback-driven-workflows.md +187 -0
  73. package/docs/validation/README.md +41 -0
  74. package/docs/validation/evidence/2026-11-08-session-p3-p4.json +5430 -0
  75. package/docs/validation/evidence/claude-node-bridges.txt +118 -0
  76. package/docs/validation/evidence/claude-npm-build.txt +15 -0
  77. package/docs/validation/evidence/claude-npm-candidate.json +54 -0
  78. package/docs/validation/evidence/claude-npm-install.txt +21 -0
  79. package/docs/validation/evidence/claude-npm-tests.txt +145 -0
  80. package/docs/validation/evidence/claude-plugin-tests.txt +205 -0
  81. package/docs/validation/evidence/claude-quality-gate.txt +29 -0
  82. package/docs/validation/evidence/claude-race.txt +7 -0
  83. package/docs/validation/evidence/codex-pro-070-probes.txt +4 -0
  84. package/docs/validation/evidence/dsh-bridge.txt +4 -0
  85. package/docs/validation/evidence/dsh-native-view-bridge-tests.txt +1 -0
  86. package/docs/validation/evidence/dsh-native-view-build.txt +15 -0
  87. package/docs/validation/evidence/dsh-native-view-candidate.json +54 -0
  88. package/docs/validation/evidence/dsh-native-view-inspect.txt +27 -0
  89. package/docs/validation/evidence/dsh-native-view-install-tests.txt +19 -0
  90. package/docs/validation/evidence/dsh-native-view-npm-tests.txt +143 -0
  91. package/docs/validation/evidence/dsh-native-view-plugin-tests.txt +99 -0
  92. package/docs/validation/evidence/dsh-native-view-quality-gate.txt +29 -0
  93. package/docs/validation/evidence/dsh-plugin-tests.txt +48 -0
  94. package/docs/validation/evidence/function-coverage.txt +378 -0
  95. package/docs/validation/evidence/npm-build.txt +13 -0
  96. package/docs/validation/evidence/npm-contract-tests.txt +65 -0
  97. package/docs/validation/evidence/npm-dsh-bridge.txt +18 -0
  98. package/docs/validation/evidence/npm-dsh-plugin-tests.txt +62 -0
  99. package/docs/validation/evidence/npm-function-coverage.txt +420 -0
  100. package/docs/validation/evidence/npm-install-tests.txt +20 -0
  101. package/docs/validation/evidence/npm-quality-gate.txt +29 -0
  102. package/docs/validation/evidence/npm-race.txt +7 -0
  103. package/docs/validation/evidence/pr-dsh-bridge.txt +4 -0
  104. package/docs/validation/evidence/pr-dsh-plugin-tests.txt +48 -0
  105. package/docs/validation/evidence/pr-function-coverage.txt +379 -0
  106. package/docs/validation/evidence/pr-quality-gate.txt +28 -0
  107. package/docs/validation/evidence/pr-race.txt +6 -0
  108. package/docs/validation/evidence/profiles-control-smoke.json +1 -0
  109. package/docs/validation/evidence/profiles-dsh-bridge.txt +18 -0
  110. package/docs/validation/evidence/profiles-dsh-plugin-tests.txt +59 -0
  111. package/docs/validation/evidence/profiles-function-coverage.txt +411 -0
  112. package/docs/validation/evidence/profiles-quality-gate.txt +29 -0
  113. package/docs/validation/evidence/profiles-race.txt +7 -0
  114. package/docs/validation/evidence/quality-gate.txt +28 -0
  115. package/docs/validation/evidence/race.txt +6 -0
  116. package/docs/validation/evidence/watchdog-startup-after.txt +2 -0
  117. package/docs/validation/evidence/watchdog-startup-before.txt +6 -0
  118. package/docs/validation/evidence/watchdog-startup-quality-gate.txt +29 -0
  119. package/docs/validation/evidence/watchdog-startup-race.txt +7 -0
  120. package/docs/{claude-code-pro.md → zh-CN/claude-code-pro.md} +23 -17
  121. package/docs/{configuration.md → zh-CN/configuration.md} +323 -139
  122. package/docs/zh-CN/contributing.md +240 -0
  123. package/docs/{flow-console.md → zh-CN/flow-console.md} +55 -12
  124. package/docs/zh-CN/getting-started.md +352 -0
  125. package/docs/zh-CN/investigation.md +182 -0
  126. package/docs/zh-CN/jev-shadow.md +79 -0
  127. package/docs/zh-CN/model-policy.md +123 -0
  128. package/docs/zh-CN/releasing.md +120 -0
  129. package/docs/{session-evaluation.md → zh-CN/session-evaluation.md} +4 -2
  130. package/docs/{session-recovery.md → zh-CN/session-recovery.md} +46 -12
  131. package/docs/zh-CN/workflow.md +270 -0
  132. package/npm/install.js +1 -1
  133. package/package.json +12 -25
  134. package/docs/getting-started.md +0 -418
  135. package/docs/model-policy.md +0 -65
  136. package/docs/workflow.md +0 -314
package/CHANGELOG.md CHANGED
@@ -1,6 +1,49 @@
1
1
  # Changelog
2
2
 
3
- ## 0.31.0 — 项目归属与执行目录分离(发行候选)
3
+ This file records source changes. Published package identities and validation
4
+ results are recorded separately in the [release runbook](docs/en/releasing.md)
5
+ and [validation index](docs/validation/README.md). Historical entries retain
6
+ their original language.
7
+
8
+ ## Unreleased
9
+
10
+ ## 0.31.1 — Feedback-driven workflows and DSH rc.2 compatibility
11
+
12
+ - Declare DSH `0.2.2-rc.2` alongside `0.2.1-rc.5` and `0.2.2-rc.1`; the host gate
13
+ now admits the current desktop release without an exact-version exemption.
14
+ - Keep all six Flywheel package versions and exact internal dependency pins at
15
+ 0.31.1. The vendored Codex Pro 0.9.0 candidate and optional Claude Code Pro
16
+ 0.4.0 peer remain unchanged; preserve prior test results in the validation record.
17
+ - Regenerate the lockfile against rc.2 dev dependencies; `npm ci --ignore-scripts`
18
+ still resolves the reviewed `vendor/dsh-subagent-codex-pro-0.9.0.tgz`.
19
+
20
+ - Add versioned, Go-owned bounded investigations with background control, token-bound
21
+ cancellation, evidence reports, original-scope repair handoff and nonduplicating usage.
22
+ - Preserve Task, New, Run and direct stages while retaining Auto as a Quick/Full selector.
23
+ - Reuse trusted persisted Plan checkpoints; provide structured comparable feedback and
24
+ conservative progress detection without weakening complete acceptance or review.
25
+ - Add opt-in complete execution-binding allowlists and verified same-role incremental
26
+ context; retain default providers/models, cold-start identity checks and unknown blocking.
27
+ - Add paired Choice/Noul decisions with separate data opt-in, durable unknown recovery and
28
+ atomic diagnostic-action adoption; move legacy automatic shadow HTTP off the task path.
29
+ - Measure observable engine phase intervals with unknown coverage and separate cumulative
30
+ durations from wall-time interval unions. Real model speed/quality remains uncalibrated.
31
+
32
+ - Make English the default root and DSH plugin README, with matching Simplified
33
+ Chinese editions and compatibility links from the previous English paths.
34
+ - Organize bilingual guides, architecture, plans, validation records, and
35
+ archives behind documentation indexes; reconcile current workflow and
36
+ workbench descriptions with the implementation.
37
+ - Adopt the MIT License for Flywheel source and all six npm packages, retain
38
+ third-party notices, and include both language editions in distributions.
39
+ - Define the AI agent change workflow, documentation ownership and update rules,
40
+ bilingual review checklist, and evidence requirements in AGENTS.md and the
41
+ contribution guides.
42
+ - Align skill instructions with task selection and read-only association, remove
43
+ retired path-form guidance, and distinguish configured scheduling, unmanaged
44
+ execution directories, and serial versus parallel Worktree failure behavior.
45
+
46
+ ## 0.31.0 — 项目归属与执行目录分离
4
47
 
5
48
  - Session 归属原仓库,执行、验收与交付仍绑定实际任务目录;提示词和界面分别展示两层位置。
6
49
  - DSH SDK Session 使用稳定项目 header 和公开目录切换;桌面 Host 通过 Workspace 注册表补齐归属,探测会话使用临时持久化目录。
@@ -10,7 +53,7 @@
10
53
  - 旧回执先按原身份核对;同项目的旧会话可继续使用,不重写历史头部。无法分离 workspace-write 沙箱根的后端明确拒绝该权限组合,不静默扩大权限。
11
54
  - 插件测试按文件串行运行,避免并发启动的测试进程挤占用于故障注入的真实截止时间;未放宽断言或 timeout。
12
55
 
13
- 当前为本地候选,尚未提交、发布或安装;0.30.2 正式发行不包含本轮修复。
56
+ 六包正式发布、官方 registry 安装、全部 latest 与 Mac 桌面升级均已验收;详见 [0.31.0 发行记录](docs/validation/2026-11-11-release-0.31.0.md)。
14
57
 
15
58
  ## 0.30.2 — 画布优先的流程工作台
16
59
 
@@ -99,7 +142,7 @@
99
142
 
100
143
  ## 0.28.0
101
144
 
102
- Codex Pro 默认接入。安装和迁移见 [配置指南](docs/configuration.md#codex-pro-默认与旧配置迁移);源码、测试、CI 和 registry 发布证据分别记录,不用离线通过代替用户 Mac 实测。
145
+ Codex Pro 默认接入。安装和迁移见 [配置指南](docs/zh-CN/configuration.md#codex-pro-与旧配置迁移);源码、测试、CI 和 registry 发布证据分别记录,不用离线通过代替用户 Mac 实测。
103
146
 
104
147
  - 新增 `codex-pro` Go driver 与独立 Node worker,直接使用 `dsh-subagent-codex-pro@0.8.0` 的公开 machine API。默认 hard 路由使用此插件;DSH Flash 默认执行、Kimi CLI 规划/前端、DSH 原生 GPT 评审保持原角色。旧 `codex` CLI 仅作为用户显式配置的兼容入口。
105
148
  - 完整传递模型、effort、目录、权限、取消与 deadline。每次使用 ephemeral 新会话;结果必须同时满足外层 worker 和插件终态/清理要求,正常 app-server 主动终止不冒充调用方取消。
@@ -139,7 +182,7 @@ Codex Pro 默认接入。安装和迁移见 [配置指南](docs/configuration.md
139
182
 
140
183
  ## 0.27.0
141
184
 
142
- DSH 桌面集成、可靠交付闭环与 npm 一条命令安装。此节记录对应版本的源码变更,不单独证明 npm 已发布或用户 Mac 已验收;用 `npm view @ckanner/flywheel version` 核对实际发行。旧 0.22.1 不包含本节新增安装和 DSH 接口。安装与迁移见 [入门教程](docs/getting-started.md)。
185
+ DSH 桌面集成、可靠交付闭环与 npm 一条命令安装。此节记录对应版本的源码变更,不单独证明 npm 已发布或用户 Mac 已验收;用 `npm view @ckanner/flywheel version` 核对实际发行。旧 0.22.1 不包含本节新增安装和 DSH 接口。安装与迁移见 [入门教程](docs/zh-CN/getting-started.md)。
143
186
 
144
187
  - **启动期间的停止快照**:修复真实子进程已经运行、`Cmd.Start` 尚未返回登记时,`KillActiveChildren` 可能取得空快照的竞态;启动与登记由同一把快照锁保护,失败路径也释放锁。新增真实进程的确定性回归,原验收停止测试及 3 秒期限保持不变。正常 machine SIGTERM 路径已有 context 取消兜底,本修复补足独立 kill snapshot 的已启动进程契约。
145
188
  - **npm 一条命令安装**:新增 `npx -y @ckanner/flywheel@latest install` 与 `flywheel setup`,全局安装精确同版 CLI、平台二进制、worker、10 个内嵌 skills,再通过已有桌面 DSH 的正式接口注册并核验插件。支持 prefix/project/DSH 命令/profile、显式跳过、超时和 JSON 输出;普通 npm 包安装不通过 postinstall 修改用户目录。
@@ -175,4 +218,4 @@ DSH 桌面集成、可靠交付闭环与 npm 一条命令安装。此节记录
175
218
  - **配置四级发现链**:任务目录 → 项目根 → 全局 `~/.config/flywheel/flywheel.config.json`(首装自动物化,可直接编辑)→ 内嵌法定表兜底。
176
219
  - watchdog 交互钩子(协议驱动)、multimodal 执行路由、`FLYWHEEL_CONFIG` 覆盖。
177
220
 
178
- 更早历史见 [历史设计](docs/design-history-v0.24.md) 的变更记录。
221
+ 更早历史见 [历史设计](docs/archive/design-v0.24.md) 的变更记录。
@@ -0,0 +1,19 @@
1
+ # Contributing to Flywheel
2
+
3
+ English · [简体中文贡献指南](docs/zh-CN/contributing.md)
4
+
5
+ Read the [contribution guide](docs/en/contributing.md) for the development
6
+ setup, architecture constraints, validation requirements, and pull request
7
+ workflow.
8
+
9
+ Documentation changes follow the [maintenance rules and review checklist](docs/en/contributing.md#keep-documentation-organized)
10
+ ([中文规范](docs/zh-CN/contributing.md#保持文档结构清晰)). Use the change-to-document
11
+ table to identify affected guides, update their owning sections, and keep the
12
+ English and Chinese editions in the same PR. The [documentation index](docs/README.md)
13
+ explains where current guides, proposals, and dated evidence belong.
14
+
15
+ AI agents must also follow [AGENTS.md](https://github.com/ckanner/flywheel/blob/main/AGENTS.md)
16
+ for task scope, repository contracts, validation, and authorized delivery.
17
+
18
+ Flywheel is licensed under the [MIT License](LICENSE). Preserve third-party
19
+ copyright and license notices when modifying or distributing their code.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ckanner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md CHANGED
@@ -1,175 +1,8 @@
1
1
  # Flywheel
2
2
 
3
- Project workspaces and execution directories are separate: sessions belong to the original repository, while tasks may execute in independent Worktrees. Automatic Worktree management is enabled by default and is independent from parallel scheduling. Caller-selected execution directories are validated and registered by the engine. See the [flow console guide](docs/en/flow-console.md).
3
+ The English README is now the default [README.md](README.md).
4
4
 
5
- English | [简体中文](README.md)
5
+ [English](README.md) · [简体中文](README.zh-CN.md) · [Documentation](docs/README.md)
6
6
 
7
- Flywheel turns reviewed software requirements into bounded coding tasks with explicit acceptance criteria. A deterministic Go engine runs Plan, Execute, Review, and verification loops. Models propose plans, implement changes, and review candidates; the engine owns state, retries, budgets, workspaces, verification, local Git delivery, and stopping.
8
-
9
- Current source supports **Auto, Quick, and Full** workflows. `flywheel-task` prepares and launches an authorized goal. A qualified small task uses Execute, all required checks, one independent final Review, and persisted Git delivery; larger or uncertain tasks retain the full loop. Existing tasks remain Full. Workflow selection does not change model bindings, permissions, or delivery authorization.
10
-
11
- Session policy supports **fresh/scoped**: new templates explicitly choose scoped, while old configurations default to fresh. Scoped mode can continue compatible history for the same task, role, and scope after a trusted normal terminal outcome; independent re-review still checks the complete current candidate. Both modes journal main-task Codex Pro, Claude Code Pro, DSH, and Kimi calls. Unknown dispatch, outcome, or cleanup blocks execution and cannot be bypassed by switching modes. P3 adds public typed lifecycle events, durable acknowledgements, and read-only Codex/Claude receipt recovery. P4 adds role overrides, bounded quality rebuilds, and paired evaluation tools. Real-account quality, cache, and performance results remain unverified; offline tests cannot establish them. See [Interrupted calls and context quality](docs/en/session-recovery.md). See [Session policy](docs/en/configuration.md#session-policy-history-reuse-and-invocation-safety).
12
-
13
- This source targets **0.30.1**, including account defaults, account-error handling, and the current session directory. Check the npm registry before installing; merging source does not update an installed package. The desktop integration covers the checked **DSH Mac 0.2.1-rc.5 and 0.2.2-rc.1** interfaces. Version 0.28.4 declares only these two runtime versions. Check the registry before installing a version. Offline tests do not establish a live user Mac, account, or model pass.
14
-
15
- The adaptive workflow and `flywheel-task` require a matching CLI/plugin release containing these changes. Check `flywheel control launch --help`; the older installation commands alone do not establish that this new interface is available.
16
-
17
- Current source also supports an optional [Claude Code Pro backend](docs/en/claude-code-pro.md), with explicit models/efforts and scoped role history. No default stage selects it. It requires the companion 0.4.0 machine API and explicit full access; the 0.3.1 desktop tool is not a compatible substitute.
18
-
19
- ## Install
20
-
21
- You need **Node.js 22.18.0 or later**, npm, Git with a commit identity, and DSH Mac with its desktop-supplied `dsh` command. The default configuration also needs an authenticated Kimi CLI, a Codex installation and login for the hard route, and configured DeepSeek and ChatGPT providers in the DSH SDK profile. Go is needed for source builds and the Go example, but not for npm binary installation.
22
-
23
- First check the published version:
24
-
25
- ```sh
26
- npm view @ckanner/flywheel version
27
- ```
28
-
29
- Once the version you intend to use is available:
30
-
31
- ```sh
32
- npx -y @ckanner/flywheel@latest install
33
- ```
34
-
35
- Add `--json` for a structured installation result. The installer selects one exact version for the CLI, platform binary, workers, and DSH plugin; installs that version's bundled skills (eleven in current source); preserves existing configuration and modified skills; and records a managed desktop launcher. Binary packages cover macOS and Linux on arm64 and amd64.
36
-
37
- `ok:true` means installation succeeded. `ready:false` means local diagnostics still found a blocker; these values can occur together. The installer does not install or log in to Kimi/Codex or prove model access. Current source defaults reuse the signed-in DeepSeek account in DSH; API-key credentials are needed only for an explicitly selected API provider. Plain `npm install --global @ckanner/flywheel` only installs package files; run `flywheel setup --no-global` afterward to perform explicit user setup.
38
-
39
- Follow [Getting started](docs/en/getting-started.md) for prerequisites, desktop versus SDK setup, a runnable first task, and recovery. Use `--prefix "$HOME/.local"` if you need a user-owned npm prefix.
40
-
41
- ## Default model routes
42
-
43
- These bindings are editable starting points, not a model ranking or a performance guarantee. Availability depends on the actual account, adapter, and model catalog.
44
-
45
- | Stage or route | Harness | Provider or channel | Model | Requested thinking |
46
- |---|---|---|---|---|
47
- | Plan | Kimi CLI | `kimi-subscription` | `kimi-code/k3.1-pro` | `high` |
48
- | Execute: `default` | DSH SDK | `deepseek-account` | `deepseek-flash` | `high` |
49
- | Execute: `frontend` | Kimi CLI | `kimi-subscription` | `kimi-code/k3.1-pro` | `high` |
50
- | Execute: `hard` | Codex Pro machine API | `chatgpt-subscription` | `gpt-6.1-sol` | `high` |
51
- | Review | DSH SDK | `chatgpt` | `gpt-6.1-sol` | `high` |
52
- | Judge | DSH SDK | `chatgpt` | `gpt-6-astra` | `high` |
53
- | Intake, optional | DSH SDK | `deepseek-account` | `deepseek-flash` | `low` |
54
- | Garden, optional | Kimi CLI | `kimi-subscription` | `kimi-code/k3.1-pro` | `high` |
55
-
56
- Initial requirement preparation is separate: `flywheel-task` and the preparation-only `flywheel-new` use the host's current conversation model. Changing `loops.plan` does not change that conversation. Quick reuses the configured Execute route and Review binding; it does not change effort or add a paid fallback. The [workflow guide](docs/en/workflow.md) explains preparation and the later engine loops.
57
-
58
- The default configuration has no automatic paid fallback across channels and no second judge. Flash's checked DSH effort values are `off`, `low`, `high`, and `max`; there is no `medium` in that adapter baseline. There is no default multimodal route: the current bridge has a text contract, so a model's vision capability alone does not establish attachment support.
59
-
60
- Seven high bindings and Intake low are an engineering baseline, without a project high/xhigh/max comparison. GPT supports xhigh/max; Kimi K3.1 Pro natively supports low/high/max. Hard execution and high-impact Judge are useful first xhigh evaluation candidates. See [Reasoning effort](docs/en/model-policy.md) for evidence and limits.
61
-
62
- The standard SDK already includes the DeepSeek account provider and account service. Under the same `DSH_HOME`, it shares the standard desktop account credential store without copying tokens or adding an API key. Desktop default-model selection does not control an independent SDK session, so Flywheel explicitly requests `deepseek-account` and `deepseek-flash`. Version 0.28.2 still selects the API provider; upgrade to 0.28.3 or later and use [explicit migration](docs/en/configuration.md#apply-the-subscription-preset-to-existing-configuration) to adopt the account default. Custom API-key configuration remains supported.
63
-
64
- ## Codex Pro uses the actual plugin runtime
65
-
66
- The hard route uses `harness: "codex-pro"`. Its worker directly imports the public `dsh-subagent-codex-pro/machine` API from the exact dependency **`dsh-subagent-codex-pro@0.9.0`**, using machine protocol 1 and lifecycle version 1. The reviewed source candidate is bundled with Flywheel; [provenance and hashes](plugins/dsh/vendor/README.md) identify its exact bytes. The plugin runs Codex app-server with the user's existing Codex installation and login. No parent DSH model is required to delegate the task again.
67
-
68
- `subagent_codex_pro` is an external tool name, not a DSH LLM provider. Native DSH GPT calls use the `chatgpt` provider and have a different execution backend. The older `harness: "codex"` driver remains an explicit compatibility choice; the new route does not silently fall back to `codex exec`.
69
-
70
- Existing configuration is preserved during upgrades. To adopt the new route, inspect the effective configuration and update the hard route or its model profile explicitly. See [Configuration](docs/en/configuration.md#codex-pro-and-migration).
71
-
72
- ## From a requirement to a pull request
73
-
74
- Describe an authorized goal in DSH without filling directory fields first:
75
-
76
- ```text
77
- /flywheel-task Fix the identified empty-list behavior, add regression coverage, and deliver the verified change. mode=auto
78
- ```
79
-
80
- | Choice | Use | Engine behavior |
81
- |---|---|---|
82
- | Auto | Let the engine select from researched contract facts | Quick when eligibility is established; otherwise Full |
83
- | Quick | One milestone and packet, known implementation, complete checks | Execute, required checks, independent final Review, Git delivery; upgrade on a gap or new risk |
84
- | Full | Multiple units, unresolved design, significant impact, or explicit choice | Plan, packet Execute/Review, integrated L2/L3, Judge |
85
-
86
- Quick retains repository gates, applicable L2/L3, defect sampling, and persistence checks. Its first-success path has two stage-agent calls, excluding host preparation, internal tool turns, and retries. A legacy task remains Full; restarting does not reclassify or downgrade an existing Full task.
87
-
88
- Use one task integration branch and worktree for a deliverable. The host creates or deliberately reuses it before preparing contracts and keeps the task directory inside it. Flywheel manages the inner packet workspaces. `/flywheel-task` prepares and launches, `/flywheel-new` prepares a proposal without starting, and `/flywheel-run` starts or resumes an existing task. Kimi uses the `/skill:` prefix for the same skill names. Existing authorizations remain valid; an explicit request to review a proposal first remains a stopping point.
89
-
90
- A normal workflow is:
91
-
92
- 1. Prepare the Spec, task packets, workflow facts, frozen acceptance tests, and actual dry-run evidence in the task worktree; honor any requested proposal review.
93
- 2. Commit the substantive contract files. Push the task branch and open a task-level Draft PR through the host or GitHub CLI.
94
- 3. Launch with the task worktree as `cwd`, its own task directory as `taskDir`, and the requested mode. DSH's `flywheel_launch` associates this concrete task with the initiating session's view.
95
- 4. Let the Go engine select and run Quick or Full, including all applicable checks and independent review against the same candidate.
96
- 5. Push the completed result, verify the current PR head, review it, and merge under the repository's chosen policy.
97
-
98
- For example, from an already prepared task worktree:
99
-
100
- ```sh
101
- flywheel config inspect --cwd "$PWD" --task-dir "$PWD/docs/my-feature" --json
102
- flywheel doctor --cwd "$PWD" --task-dir "$PWD/docs/my-feature" --probe --json
103
- flywheel control launch --cwd "$PWD" --task-dir "$PWD/docs/my-feature" --mode auto
104
- flywheel control status --cwd "$PWD" --task-dir "$PWD/docs/my-feature"
105
- ```
106
-
107
- `control launch` defaults to Auto and consumes prepared contracts; it does not invent requirements or create the outer task branch. `control start` and foreground `run` preserve the contract/persisted selection when `--mode` is omitted. Their optional mode is `auto|quick|full`; Go still enforces eligibility and one-way upgrade rules. `--only execute` is a partial loop, not Quick or complete delivery.
108
-
109
- Packet delivery is a **local Git operation**. After evidence matches the current candidate, the engine commits the packet and fast-forwards it into the branch checked out at `cwd`. With the recommended layout, that is the task integration branch. Ordinary run does not publish remotely. Explicit console/CLI delivery controls can push a verified commit, create a PR and merge its exact head after authorization; release publication remains a separate operation. See [Workflow](docs/en/workflow.md) for commands, directory ownership, and merge timing.
110
-
111
- ### Desktop task controls
112
-
113
- From `0.28.1`, the native **Flywheel** conversation view appears alongside the built-in views (after Statistics from 0.28.5), preserving DSH's composer, model selector, and right sidebar. Version `0.28.0` uses the old composer popup; upgrade the CLI and desktop plugin together. **Task files directory** selects the prepared `docs/<slug>/`; **Project directory** is its project/integration worktree and may stay blank. From 0.28.3, Flywheel reads DSH's `workingDirectory.get(session)`, following session directory changes. Version 0.28.2 still uses the original header directory: explicitly fill the project path after switching worktrees. Configuration and diagnostics can omit the task; start, refresh, and stop require an existing task directory.
114
-
115
- DSH tool launch/start associates the exact task with the initiating session. The view shows requested and effective modes, reasons, stage applicability, and upgrades. It does not scan directories to guess tasks or poll tasks started separately in a terminal; manual opening remains supported. An unconfirmed start/stop outcome requires a successful refresh of the original task before further mutations; late responses cannot overwrite a different session or newer binding. Closing the view does not stop the independent engine. DSH's trajectory keeps its parent-session records, without automatically merging worker history. See the [plugin guide](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/README.en.md#use-the-desktop-controls) for association lifetime and runtime boundaries.
116
-
117
- ## Verification and operating boundaries
118
-
119
- L1 validates a packet; L2/L3 validate integration and user paths. Quick runs applicable L2/L3 in the actual packet candidate before its final Review, which covers every requirement and acceptance sufficiency. Full keeps the integrated milestone gates and Judge. Review is independent of the executor transcript. Candidate, contract, verification configuration, and effective workflow policy changes invalidate incompatible evidence. Completion requires verified Git delivery and persisted state; an agent's claim that it finished is insufficient.
120
-
121
- Keep these boundaries in mind:
122
-
123
- - **Worktrees isolate Git work, not process permissions.** Packet worktree creation can currently fall back to in-place execution. There is no engine option requiring isolation in every case. Skills check the recommended task location; direct CLI/GUI use does not execute those skill checks.
124
- - **Permissions are explicit.** New templates and the subscription migration select `permissions.mode:full-access` for every stage, using DSH/Codex full access with approval never and native Kimi print auto. Existing configurations without this field retain role-based permissions. Kimi does not provide an OS confinement guarantee; task and acceptance identity checks remain enforced.
125
- - **Codex Pro's complete policy check is after the run.** The plugin checks model, directory, approval, and sandbox mode before a turn. Flywheel validates the full returned policy afterward, allowing the workspace and standard Codex temporary directories. Additional external write roots, enabled network access, or unconfirmed policy prevent acceptance. This check cannot prevent access already allowed by custom Codex configuration.
126
- - **Cleanup needs evidence.** A worker exiting does not prove that the plugin's separate app-server or guardian processes stopped. An unconfirmed cleanup result escalates and stops the run; inspect and resolve it before resuming.
127
- - **Unknown usage remains unknown.** Missing usage or monetary cost is not zero. Soft budgets report uncertainty; hard budgets stop when unknown usage makes the limit unverifiable.
128
- - **Preflight is not a model smoke test.** `doctor --probe` initializes supported SDK sessions without an inference prompt. Codex Pro checks import/version/protocol and local commands, leaving actual model, authorization, and full runtime policy unverified.
129
-
130
- The engine alone writes `state.json`, atomically with revision checks. Do not edit it to force progress or delete retained work to make a retry look clean.
131
-
132
- ## Documentation
133
-
134
- | Guide | Contents |
135
- |---|---|
136
- | [Getting started](docs/en/getting-started.md) | Install, configure, diagnose, run a small task, stop, and recover |
137
- | [Workflow](docs/en/workflow.md) | Preparation models, task and packet worktrees, Draft PRs, completion, and merge policy |
138
- | [Session lifecycle proposal](docs/en/plans/2026-11-07-session-lifecycle.md) | Original P1–P4 proposal; implemented recovery and quality policy are documented in the current guides |
139
- | [Configuration](docs/en/configuration.md) | File precedence, profiles, providers, channels, Codex Pro, and diagnostics |
140
- | [Reasoning effort](docs/en/model-policy.md) | Supported levels, high baseline, evaluation candidates, and account-provider choice |
141
- | [Chinese documentation](README.md) | Default language and additional implementation detail |
142
- | [System design](https://github.com/ckanner/flywheel/blob/main/docs/design.md) (Chinese) | Authoritative design and invariants |
143
- | [DSH plugin](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/README.en.md) / [protocol](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/PROTOCOL.md) (protocol in Chinese) | Desktop control surface, workers, permissions, and lifecycle |
144
- | [Release guide](https://github.com/ckanner/flywheel/blob/main/docs/en/releasing.md) | Candidate artifacts, registry verification, and release recovery |
145
- | [Contributing](https://github.com/ckanner/flywheel/blob/main/docs/contributing.md) | Development workflow, validation, and contribution boundaries |
146
-
147
- The English guides cover current operation. Historical design and validation ledgers remain in their original language. Source and design links are intended for browsing the repository; the npm package contains selected runtime and user documentation rather than the entire repository.
148
-
149
- ## Development
150
-
151
- Read [AGENTS.md](https://github.com/ckanner/flywheel/blob/main/AGENTS.md) and the [design](https://github.com/ckanner/flywheel/blob/main/docs/design.md) before changing the engine. Source development needs Go 1.27 or later and Node.js 22.18.0 or later. Relevant local gates include:
152
-
153
- ```sh
154
- make quality-gate
155
- npm --prefix plugins/dsh ci --ignore-scripts
156
- npm --prefix plugins/dsh run check
157
- FLYWHEEL_TEST_NODE_BRIDGE=1 go test ./internal/drivers -run '^Test(DSH|CodexPro)NodeWorkerOfflineBridge$' -count=1
158
- npm test
159
- ```
160
-
161
- These commands cover local code and protocol behavior. Real desktop UI, macOS permissions, account access, and model inference require separate, recorded testing in the intended environment.
162
-
163
- Maintainers can build the six packages from a tagged source checkout and use the repository's `npm run release:local` command for interactive publication. No prebuilt archive is required. The command runs candidate and registry installation checks before promoting `latest`; see [local publication from source](https://github.com/ckanner/flywheel/blob/main/docs/en/releasing.md#local-build-and-publication-from-source) for the exact worktree and authentication steps.
164
-
165
- ## License status
166
-
167
- The package currently declares **`UNLICENSED`**. An open-source license has not been selected; these English documents do not change the repository's visibility or licensing status.
168
-
169
- ### Workflow console (current source)
170
-
171
- The DSH view adds a horizontal task canvas, stage run/retry, per-stage configuration, controlled Provider-session interaction, declared parallel execution with serial integration, observed run metrics and PR/Merge receipts. See the [console guide](docs/en/flow-console.md). Source implementation does not imply npm publication or a local upgrade.
172
-
173
- The workbench prioritizes a large task overview, on-demand node details and separate task subgraphs. Configuration loads automatically into focused sections; adjacent save actions appear only after edits. Saved defaults apply to subsequent starts.
174
-
175
- Optional, default-off JEV shadow evaluation is included in the 0.30.1 source; see the [guide](docs/en/jev-shadow.md). Advice cannot change workflows, and observer failures do not block tasks.
7
+ This compatibility entry preserves existing links. Maintain the full English
8
+ introduction in `README.md`.