@ckanner/flywheel 0.30.2 → 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 +58 -3
  2. package/CONTRIBUTING.md +19 -0
  3. package/LICENSE +21 -0
  4. package/README.en.md +4 -169
  5. package/README.md +152 -267
  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 -139
  20. package/docs/en/contributing.md +303 -0
  21. package/docs/en/flow-console.md +75 -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 -4
  29. package/docs/en/workflow.md +223 -113
  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 -137
  122. package/docs/zh-CN/contributing.md +240 -0
  123. package/docs/{flow-console.md → zh-CN/flow-console.md} +63 -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 -10
  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 -312
@@ -0,0 +1,303 @@
1
+ # Contributing to Flywheel
2
+
3
+ English · [简体中文](../zh-CN/contributing.md) · [Documentation](../README.md)
4
+
5
+ Start with the [project overview](../../README.md), the authoritative
6
+ [system design](../design.md) (Chinese), and [AGENTS.md](https://github.com/ckanner/flywheel/blob/main/AGENTS.md).
7
+ Flywheel is a deterministic Go orchestrator: models plan, implement, and review
8
+ bounded tasks; code owns state transitions, verification, budgets, and process
9
+ lifecycles. Contributions must preserve that boundary.
10
+
11
+ ## License and scope
12
+
13
+ Flywheel is distributed under the [MIT License](../../LICENSE). Keep its copyright
14
+ and license notice with copies or substantial portions of the software. Preserve
15
+ third-party notices and the provenance of bundled dependencies; the repository's
16
+ license does not replace their terms.
17
+
18
+ Keep credentials, private project contents, and unredacted model/session logs out
19
+ of issues, PRs, and fixtures. For a sensitive security report, request a private
20
+ reporting route before disclosing details; the repository does not publish a
21
+ separate response-time commitment.
22
+
23
+ ## Choose a branch and execution directory
24
+
25
+ Use or reuse a worktree dedicated to the change. For a new change, when `origin`
26
+ and `main` are the intended remote and base:
27
+
28
+ ```sh
29
+ git status --short
30
+ git fetch origin
31
+ git worktree add -b task/my-change ../flywheel-my-change origin/main
32
+ cd ../flywheel-my-change
33
+ ```
34
+
35
+ Inspect an existing branch or directory before reusing it. Preserve other work
36
+ and keep the change's contracts, configuration, checks, and commits in the same
37
+ integration checkout. The original repository remains the session's project
38
+ workspace; the integration checkout and packet worktrees are execution locations.
39
+ When Flywheel develops the change, follow the effective `worktree.enabled` policy.
40
+ The engine merges accepted packets into the integration checkout's current
41
+ branch, not automatically into `main`.
42
+
43
+ Worktrees isolate checkout files and the index; they are not security sandboxes.
44
+ Serial execution can retain the documented `in-place` fallback. Parallel execution
45
+ with automatic worktree management requires successfully created isolated
46
+ worktrees. With automatic management disabled, shared execution uses batch-wide
47
+ verification and delivery. See the [workflow](workflow.md) and
48
+ [console](flow-console.md) guides for these distinctions and external directory
49
+ registration.
50
+
51
+ Prepare requirements, scope, and executable acceptance criteria before a large
52
+ implementation. Open a Draft PR once there is a useful reviewable plan or change;
53
+ one PR may cover several packets. Keep commits focused and use English
54
+ Conventional Commit subjects, such as `fix: preserve cleanup evidence`.
55
+ Agents follow the user's existing commit, push, and merge authorization without
56
+ asking again for an already authorized step or extending it to a different action.
57
+
58
+ ## Implement against observable contracts
59
+
60
+ The [design invariants](../design.md#2-设计不变量) and AGENTS file define the core rules:
61
+
62
+ - Go and `internal/state` own task state. Writes use revision compare-and-set and
63
+ atomic replacement; models and skills never edit `state.json`.
64
+ - Contract schemas define valid input. Validate at load time and update the design
65
+ before changing a wire contract, including the error taxonomy.
66
+ - Test completion, cancellation, timeouts, and cleanup using observable results.
67
+ A terminal text marker or worker exit does not prove its child groups stopped.
68
+ - Verification and independent review apply to the candidate that is committed
69
+ and merged. Preserve work and evidence when a gate or Git delivery fails.
70
+ - Missing usage, cost, permission, or capability evidence stays unknown; it cannot
71
+ become success or zero cost.
72
+ - Skills validate inputs and invoke the CLI. The desktop plugin consumes Go
73
+ control interfaces; neither owns a second state machine or retry loop.
74
+
75
+ Use meaningful failure-path tests and narrow I/O injection points. Every measured
76
+ Go function must reach 100% statement coverage; only the trivial `cmd/flywheel`
77
+ entry stub is excluded. Preserve that gate and test behavior rather than repeating
78
+ the implementation solely to increase the percentage.
79
+
80
+ ## Build and verification
81
+
82
+ Source development needs **Go 1.27 or later** and Git. Flywheel's npm runtime
83
+ requires **Node 22.18.0 or later**; the selected DSH release may require a newer
84
+ Node version. CI and releases pin **Node 24.22.1 / npm 12.2.1**. Use those versions
85
+ when reproducing package and installation evidence.
86
+
87
+ Run the applicable checks from the repository root:
88
+
89
+ ```sh
90
+ make quality-gate
91
+ npm --prefix plugins/dsh ci --ignore-scripts
92
+ npm --prefix plugins/dsh run check
93
+ FLYWHEEL_TEST_NODE_BRIDGE=1 go test ./internal/drivers -run '^Test(DSH|CodexPro|ClaudeCodePro)NodeWorkerOfflineBridge$' -count=1
94
+ npm test
95
+ npm run build:npm
96
+ FLYWHEEL_NPM_PACKAGES_DIR=dist-npm npm run test:install
97
+ ```
98
+
99
+ | Change | Required verification |
100
+ |---|---|
101
+ | Go engine | `make quality-gate`: vet, formatting, tests, and coverage |
102
+ | DSH plugin or worker | Plugin checks and the applicable Go-to-Node bridges |
103
+ | npm installation or release | Root npm tests, a six-package candidate build, and installation of those tarballs |
104
+ | Documentation | Links, anchors, fences, runnable examples, translation consistency, and affected embedding/package contents |
105
+
106
+ The Claude bridge needs the exact optional 0.4.0 machine API in the worker's
107
+ dependency tree. An absent-peer skip does not verify that backend. Preserve the
108
+ reviewed source/tarball identity when using a source candidate. Codex Pro's
109
+ bundled 0.9.0 source package is likewise pinned by its actual integrity and
110
+ [vendor record](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md).
111
+
112
+ For lifecycle, state, or process changes, reproduce the Linux CI race check:
113
+
114
+ ```sh
115
+ go test -race ./internal/machine ./internal/verify ./internal/watchdog ./internal/drivers ./internal/cli ./internal/modules ./internal/diagnostic -count=1
116
+ ```
117
+
118
+ For changes to session quality or the evaluation harness, use the fixed offline
119
+ paired scenarios described in [Session evaluation](session-evaluation.md):
120
+
121
+ ```sh
122
+ make build
123
+ FLYWHEEL_EVAL_BINARY="$PWD/flywheel" npm run test:sessions
124
+ ```
125
+
126
+ Default tests exercise real Git, processes, workers, and public adapter packages
127
+ with offline fixtures. Installation tests consume actual candidate tarballs in an
128
+ isolated registry and user directory; desktop registration uses a CLI fixture.
129
+ Dependencies require registry access or the documented verified fixture. These
130
+ checks do not establish live account access, model quality, subscription quota,
131
+ or a real Mac desktop pass.
132
+
133
+ CI uses the same candidate on Ubuntu and macOS, with race checks on Linux. Report
134
+ what actually ran: unavailable CI remains unavailable, and cross-compiling a Mac
135
+ binary does not establish its runtime behavior. Stop additional testing once the
136
+ applicable gates and concrete remaining risks are resolved.
137
+
138
+ ## Keep documentation organized
139
+
140
+ Documentation changes belong in the same PR as the behavior they describe. Identify
141
+ which guides are affected before implementation, then update those guides in both
142
+ languages. A narrow change does not require rewriting every guide or running every
143
+ repository test.
144
+
145
+ ### Use the right source for each claim
146
+
147
+ | Claim | Authoritative source | How to use it |
148
+ |---|---|---|
149
+ | Architecture, responsibilities, and invariants | [System design](../design.md), especially its design invariants | Treat these as intended constraints, not optional descriptions. |
150
+ | Legal fields, types, required values, and wire formats | [Schemas and templates](https://github.com/ckanner/flywheel/tree/main/templates), the relevant parser, and [worker protocol](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/PROTOCOL.md) | Check examples against the applicable schema and implemented interface. A schema accepting a field does not prove a backend supports it. |
151
+ | Defaults, precedence, migration, and model bindings | [Templates embedded from the current source revision](https://github.com/ckanner/flywheel/tree/main/templates) and [configuration parsing and normalization](https://github.com/ckanner/flywheel/tree/main/internal/config) | For an installed release, also verify that version's actual templates and `config inspect` output. Distinguish defaults, omitted-field compatibility, and the user's effective configuration; an older installation cannot establish new source defaults. |
152
+ | CLI, worker, and desktop behavior | Current [CLI](https://github.com/ckanner/flywheel/tree/main/internal/cli), [drivers](https://github.com/ckanner/flywheel/tree/main/internal/drivers), and [DSH plugin](https://github.com/ckanner/flywheel/tree/main/plugins/dsh) implementation and relevant tests | Verify commands, lifecycle boundaries, permission support, and UI labels against the implemented path. |
153
+ | Packaging, release order, and automated gates | [Package manifest](https://github.com/ckanner/flywheel/blob/main/package.json), lockfiles, [scripts](https://github.com/ckanner/flywheel/tree/main/scripts), and [workflows](https://github.com/ckanner/flywheel/tree/main/.github/workflows) | Document the commands and gates that exist. A policy in prose is not evidence that CI enforces it. |
154
+ | Completed tests, releases, or evaluations | [Dated validation records](../validation/README.md) and [evaluation evidence](../evaluation/README.md) | Limit claims to the recorded source, platform, inputs, and results; past results do not establish current registry or live-account status. |
155
+
156
+ When design and implementation disagree, record the mismatch and resolve the
157
+ intended behavior from the task's accepted requirements and design constraints.
158
+ Correct the implementation when it violates that contract; update the design when
159
+ an intended design change is part of the task, then align code, tests, and guides in
160
+ the same PR. Do not silently declare the code correct by weakening an invariant,
161
+ or describe a planned capability as implemented. If the intended behavior remains
162
+ unresolved, state that limit instead of inventing a resolution.
163
+
164
+ ### Put content in its canonical location
165
+
166
+ The default root and plugin `README.md` are English, with `README.zh-CN.md`
167
+ counterparts. `README.en.md` remains a compatibility link, not another manual.
168
+ Current user and maintainer guides use matching filenames in `docs/en/` and
169
+ `docs/zh-CN/`, with reciprocal language links and the appropriate documentation index.
170
+
171
+ | Content | Canonical location |
172
+ |---|---|
173
+ | Product overview and first commands | Root READMEs |
174
+ | Current installation, workflow, configuration, and maintenance | `docs/en/` and `docs/zh-CN/` |
175
+ | Current architecture and invariants | `docs/design.md` |
176
+ | Design proposals and their original context | `docs/plans/` |
177
+ | Executed checks, environments, evidence, and limits | `docs/validation/` and `docs/evaluation/` |
178
+ | Historical reviews and superseded material | `docs/reviews/` and `docs/archive/` |
179
+ | Package-specific interfaces and provenance | `plugins/dsh/` |
180
+ | Rules for contributors and coding agents | The paired contribution guides and [AGENTS.md](https://github.com/ckanner/flywheel/blob/main/AGENTS.md) |
181
+
182
+ This repository's documentation is separate from the `docs/<task>/` contracts and
183
+ runtime ledger created in a target repository.
184
+
185
+ ### Map a change to its documentation
186
+
187
+ Use the following as an impact checklist. Update the named material only where the
188
+ change affects its claims; design/schema/protocol changes also follow their own
189
+ contract rules.
190
+
191
+ | Change | Documentation to inspect and update when affected |
192
+ |---|---|
193
+ | Installation, upgrade, prerequisites, or setup | Root and plugin READMEs, `getting-started.md`, installation examples, and package contents |
194
+ | CLI commands, control responses, workers, or backend support | `getting-started.md`, `workflow.md`, relevant backend guide, plugin README/`PROTOCOL.md`, and affected skill instructions |
195
+ | Configuration, defaults, accounts, models, or permissions | `configuration.md`, `model-policy.md`, relevant README tables, actual template explanations, and migration instructions |
196
+ | Scheduling, worktrees, execution locations, or delivery | `workflow.md`, `configuration.md`, `flow-console.md`, design sections, and affected skills |
197
+ | Session reuse, recovery, handoff, or accounting | `session-recovery.md`, configuration/workflow/console sections, design, and affected worker contracts |
198
+ | Desktop UI, task discovery, or operator controls | `flow-console.md`, plugin READMEs, and getting-started instructions that name the UI |
199
+ | Evaluation tools, scenarios, or result interpretation | `session-evaluation.md` or `jev-shadow.md`, their input/output contracts, and dated evidence when new checks actually run |
200
+ | Package layout, licenses, or release behavior | `releasing.md`, relevant installation instructions, manifests/lockfiles, packaged links, and applicable license/provenance notices |
201
+ | A documentation move, rename, or heading change | Both documentation indexes, language links, all incoming paths/anchors, package lists, embedding references, scripts, and tests |
202
+ | Contributor or AI operating rules | [AGENTS.md](https://github.com/ckanner/flywheel/blob/main/AGENTS.md), both contribution guides, and their navigation; keep the requirements consistent |
203
+
204
+ The affected English and Chinese guides must ship in the same PR. Translate the
205
+ meaning, not just the headings: commands, model IDs, JSON fields, examples, defaults,
206
+ permissions, failure behavior, and capability limits must agree. A translation must
207
+ not promise a broader capability or hide a limitation present in the other language.
208
+
209
+ ### Maintain readable structure and reliable history
210
+
211
+ Update the section that owns a behavior; add a named subsection only when needed.
212
+ Keep one page title, a logical heading hierarchy, short introductions, typed code
213
+ fences, readable tables, and blank lines around headings and lists. Label fragments
214
+ and placeholders, and use consistent terminology for project workspace, execution
215
+ directory, task, packet, and session. Write concrete instructions rather than a
216
+ conversation transcript. Do not prepend development updates to introductions or
217
+ append unrelated status paragraphs after the license. Release changes belong in
218
+ `CHANGELOG.md`; dated execution evidence belongs in validation records.
219
+
220
+ Historical plans, reviews, archives, and validation records retain their original
221
+ language and dated context. Preserve recorded dates, commits, trees, versions,
222
+ hashes, inputs, platforms, and pass/fail/skip/not-run results. Correct a historical
223
+ error with an explicitly labelled correction that identifies what changed and why;
224
+ do not silently rewrite an old outcome or replace its candidate identity with a
225
+ new one. Later completion belongs in a new dated record, linked from the old record
226
+ when useful. Historical material does not need duplicate translations, but indexes
227
+ must make its language and status clear.
228
+
229
+ ### Validate the affected documentation
230
+
231
+ Before requesting review, check the items relevant to this change:
232
+
233
+ - [ ] Update the owning section and affected English/Chinese counterparts in the
234
+ same PR, with equivalent meaning, matching filenames, and reciprocal language links.
235
+ - [ ] Verify behavior and default claims against the relevant design, CLI, schema,
236
+ and source templates; support completed-test claims with matching dated evidence.
237
+ State unresolved differences and validation limits.
238
+ - [ ] For moves or heading changes, use `rg` to check incoming paths and anchors in
239
+ guides, READMEs, skills, template embedding code, manifests, scripts, and tests.
240
+ Resolve links from the referring file; preserve historical immutable commit links.
241
+ - [ ] Check local links, anchors, headings, fences, JSON/YAML examples, and safe shell
242
+ syntax as applicable; run `git diff --check`. Use a repository documentation checker
243
+ only if one exists; identify manual or ad hoc checks accurately.
244
+ - [ ] For package or embedding changes, inspect the relevant build/pack output and
245
+ links in the actual candidate. Include relative-link targets or use repository URLs
246
+ for source-only material; an old tarball cannot verify newly edited documentation.
247
+ - [ ] Record actual passed/failed/skipped/not-run results, methods, environments, and
248
+ applicable candidate identity in the PR. Do not imply unconfigured CI checks or
249
+ validation beyond the evidence; apply only gates relevant to the change.
250
+
251
+ Use source/help inspection, syntax checks, or isolated fixtures for examples. Do not
252
+ run live models, change accounts, install into real user profiles, publish, or deploy
253
+ merely to check documentation; those actions require an already authorized task scope.
254
+
255
+ ## AI-assisted contribution workflow
256
+
257
+ 1. Establish the current task scope and existing authorization. Read applicable
258
+ repository instructions, inspect the branch, HEAD, and dirty work, and preserve
259
+ unrelated edits. Reuse the intended PR/worktree when continuing a task.
260
+ 2. Inspect the relevant authoritative sources and identify documentation impact
261
+ before implementation. Separate current behavior, proposed changes, and historical
262
+ evidence; surface unresolved design/code differences.
263
+ 3. Implement the scoped change and its affected bilingual documentation in the same
264
+ PR. Preserve the engine's state ownership, frozen contracts, and user customizations.
265
+ 4. Run the applicable checks and resolve concrete failures. Do not expand a small
266
+ documentation change into unrelated runtime work or live-account experiments.
267
+ 5. Review the final diff, relevant branch/base changes, translations, references, and
268
+ verification evidence. Recheck any conclusions invalidated by later edits.
269
+ 6. Complete the authorized commit/push/PR work and report the result. Reuse prior
270
+ authorization without asking again for the same action; a request for a PR alone
271
+ does not authorize merging, publishing, deploying, or changing repository visibility.
272
+
273
+ ## Prepare a reviewable PR
274
+
275
+ Explain the concrete problem, the change and resulting behavior, the affected
276
+ bilingual guides, and any intentionally unchanged documentation whose relevance is
277
+ not obvious. Review the final diff and evidence independently of an implementing
278
+ model's completion claim. Follow active merge requirements and the user's
279
+ authorization; preserve required gates and repository settings.
280
+
281
+ Record each applicable check as **passed**, **failed**, **skipped**, or **not run**,
282
+ including the command/method, relevant environment, and reason for skipped or
283
+ unavailable checks. Distinguish local evidence from remote CI and live validation.
284
+ For package or release work, record the tested candidate's source commit/tree,
285
+ snapshot hash, tarball integrity, and dirty/clean status as applicable. Do not attach
286
+ results from a different source or candidate to the PR's final state without stating
287
+ that limitation. Source merge and npm publication remain separate operations.
288
+
289
+ ## Release changes
290
+
291
+ Follow the [release guide](releasing.md). All six Flywheel packages share one exact
292
+ version with exact internal dependencies and the pinned Codex Pro runtime. Build
293
+ once from final clean source and test those tarballs. Preserve the source commit,
294
+ tree, snapshot hash, and package integrity values; the release tag must identify
295
+ that source. Do not relabel a dirty candidate as a clean release or rebuild
296
+ different bytes for a published version.
297
+
298
+ Use the repository's release scripts for candidate checks, publication, registry
299
+ verification, and promotion. Publish platform packages and the plugin before the
300
+ meta package, test the exact registry version before moving `latest`, and verify
301
+ all six tags and integrities. A partial publication resumes with the same
302
+ candidate. Manual publication requires its own explicit authorization and an
303
+ accurate record of completed and unavailable checks.
@@ -1,28 +1,68 @@
1
- # Flywheel workflow console
1
+ # Workflow console
2
2
 
3
- This guide describes the current source. Source, development candidates, local installation and npm publication are separate acceptance boundaries. Keep the CLI, platform packages and DSH plugin at one version.
3
+ [Documentation](../README.md) · English · [简体中文](../zh-CN/flow-console.md)
4
+
5
+ The DSH Flywheel view brings task selection, workflow stages, configuration, session
6
+ interaction, and delivery into one place. Keep the CLI, platform packages, and DSH
7
+ plugin at the same version. For installation, see [Getting started](getting-started.md).
4
8
 
5
9
  ## Find a task without entering paths
6
10
 
7
- The canvas starts with task selection. One registered task belonging to the current DSH conversation opens automatically; multiple tasks require a choice. Terminal runs also record DSH's host session ID. This is discovery metadata, never authorization. The UI reads Go state after finding an index entry; the index is not proof of liveness or completion.
11
+ The canvas starts with task selection. One registered task belonging to the current DSH conversation opens automatically; multiple tasks require a choice. Terminal runs record DSH's host session ID when it is available. This is discovery metadata, never authorization. The UI reads Go state after finding an index entry; the index is not proof of liveness or completion.
8
12
 
9
13
  Older records without a host ID remain selectable under Recent tasks on this computer. Selection performs a read-only status query and associates the task with the conversation. Refreshing the list does not start, retry or replace a manually selected task. Read failures retain the existing canvas; unresolved operations still require reconciliation against their original task.
10
14
 
11
- There are no editable task/project path fields. The assistant and engine supply the location; known workspace, task-record location and branch values appear as read-only information, while missing values are omitted. The task folder contains the specification, acceptance checks and progress; the workspace is the actual execution project/worktree. A prepared task can be associated by the assistant using read-only status and then selected from the list.
15
+ There are no editable task/project path fields. The project workspace remains the original repository; the execution directory may be a task checkout or independent Worktree. These locations are displayed separately when known. The task folder contains the specification, acceptance checks and progress. A prepared task can be associated using read-only status and then selected from the list.
16
+
17
+ DSH keeps the original repository in the Session header and switches the current execution directory through its public API. The desktop Host periodically attaches Flywheel SDK sessions to matching existing projects; task status also ensures the original project is registered. It does not create a desktop workspace for every packet Worktree or rewrite old Session headers. Probes use temporary persistence, leaving no new user sessions. Native Providers start sessions in the project; task prompts name the actual execution directory for every shell/file operation. Backends unable to separate a `workspace-write` sandbox root reject that combination before dispatch instead of widening permissions. Full access and supported read-only modes retain their actual semantics.
18
+
19
+ Loading a skill does not start the engine. `flywheel-task` prepares the appropriate contract and invokes either the bounded investigation control or `flywheel_launch` for implementation. A preparation/proposal-only response must explicitly say execution was not started. Single-stage skills query `flywheel_control status` afterward to associate their canvas, or disclose the exact path when that tool is absent rather than claiming association.
20
+
21
+ | Conversation entry | Does it start the engine? | How the UI finds the task |
22
+ |---|---|---|
23
+ | `/flywheel-new <goal>` | Prepares contracts for review only | Before handing over the proposal, the assistant registers a candidate through read-only `status`; an uninitialized task shows its identity and location, not execution progress |
24
+ | `/flywheel-run <task directory>` | Starts or resumes an existing task | Start and query the original task path to associate it with the conversation; select the intended task when there are multiple candidates |
25
+ | `/flywheel-task <goal>` | Prepares, then starts | Launch and associate through `flywheel_launch`, then check status |
12
26
 
13
- Loading a skill does not start the engine. flywheel-task prepares and calls flywheel_launch; a research/proposal-only response must explicitly say the engine was not started. Single-stage skills query flywheel_control status afterward to associate their canvas, or disclose the exact path when that tool is absent rather than claiming association.
27
+ `new → run` and `task` use the same engine; the canvas is not exclusive to one
28
+ skill. Writing task files alone does not register a view, and a failed association
29
+ query must not be replaced with launch merely to populate the canvas. Report an
30
+ unavailable association tool explicitly. Tasks actually run from a standalone
31
+ terminal remain selectable under Recent tasks on this computer.
32
+
33
+ While the canvas is visible, registered-task discovery refreshes every five seconds.
34
+ An observed running task refreshes status every two seconds, backing off to ten
35
+ seconds after an unsuccessful response. Hidden documents skip those requests.
36
+ Refresh is read-only and does not replay uncertain operations.
14
37
 
15
38
  ## This stage versus the full workflow
16
39
 
17
- When run.kind and control.kind identify the same single-stage operation, This run shows its recorded outcome. A review-only run defaults to **L1 → Review**, including the recorded verdict and score, while stating that overall delivery is not complete. Switch to Full workflow for the larger graph.
40
+ When `run.kind` and `control.kind` identify the same single-stage operation, This run shows its recorded outcome. A review-only run defaults to **L1 → Review**, including the recorded verdict and score, while stating that overall delivery is not complete. Switch to Full workflow for the larger graph.
18
41
 
19
42
  Continue workflow is behind an explicit disclosure. A passed stage does not start subsequent stages or mark the task completed. Failed, cancelled and unknown operations cannot inherit an older green verdict. Run ID, HEAD and digests are collapsed under Run details and file locations.
20
43
 
44
+ ## Investigation before implementation
45
+
46
+ A task with a preparation record and no implementation state opens the investigation
47
+ panel. It shows the goal, action budget, collected observations, truncated excerpts,
48
+ decision receipts, and the evidence report. Continue investigation submits the current
49
+ revision to Go; a pending invocation instead offers reconciliation of the original
50
+ receipt. Unknown control results require status reconciliation before another mutation.
51
+ Stop waits for the running owner to settle; it cannot turn a missing action receipt
52
+ into a confirmed cancellation.
53
+
54
+ The panel does not offer ordinary code-workflow launch while the task is in preparation.
55
+ `awaiting-report` asks the host assistant to submit an evidence-based analysis; it is
56
+ not implementation completion. A report-only goal ends with that report. An already
57
+ authorized repair can proceed after a supported report and a valid Spec are prepared,
58
+ retaining the original scope and usage. See [bounded investigation](investigation.md)
59
+ for the supported read/search actions, command protocol, and handoff requirements.
60
+
21
61
  ## Configuration
22
62
 
23
- In an existing DSH conversation view, Flywheel remains after Statistics; the blank new-session landing page does not yet show these conversation views. Its pages are Workflow canvas, Global/project configuration, and Runs and comparison. Global settings require no task directory. Project settings target the selected Git root. Discovery still selects one complete file in task → project → global → embedded order; it does not deep-merge files.
63
+ In an existing DSH conversation view, Flywheel remains after Statistics; the blank new-session landing page does not yet show these conversation views. Its navigation tabs are Workflow, Run history, and Configuration. Global settings require no task directory. Project settings target the selected Git root. Discovery still selects one complete file in task → project → global → embedded order; it does not deep-merge files.
24
64
 
25
- Opening Configuration automatically reads the selected scope. Workflow policy, model assignments, budget/retries and JEV shadow advice have separate sections. Save and Discard appear beside the form only after edits. Ordinary saving takes one click; first enabling JEV confirms the task-summary transfer boundary. Serial mode omits concurrency controls. Minutes and seconds are converted precisely to engine millisecond fields.
65
+ Opening Configuration automatically reads the selected scope. Workflow policy, model assignments, budget/retries and JEV shadow advice have separate sections. Save and Discard appear beside the form only after edits. Ordinary saving takes one click; first enabling JEV explains local capture and the separate explicit evaluation transfer. Serial mode omits concurrency controls. Minutes and seconds are converted precisely to engine millisecond fields.
26
66
 
27
67
  More configuration actions provides reload and installed-default restoration. Scope changes or reloads first disclose unsaved drafts; restoring defaults loads a pending full replacement before saving. Failures retain the draft and an uncertain save requires reconciliation. Go checks file identity, backs up the original and publishes atomically. A running engine retains its snapshot. The displayed source is file-level: task → project → global → installed defaults selects one file, not a per-field overlay. New files start from the installed template.
28
68
 
@@ -30,6 +70,11 @@ Resources include ChatGPT through DSH or Codex Pro, Kimi Code, DeepSeek Account
30
70
 
31
71
  `permissions.bindings` overrides `loops.<role>`, `routes.<route>` or `judge-panel`. Unspecified bindings use the global policy. History overrides are role-based: execution routes share the execute policy while each packet keeps its own session. Scoped continuation requires the same task, role, goal and eligible binding; fresh also retains invocation-safety records.
32
72
 
73
+ The optional [JEV shadow evaluator](jev-shadow.md) is disabled by default. Enabling
74
+ it captures a local task summary; only an explicit `shadow run` sends it for evaluation.
75
+ Advice does not select workflow policy. Investigation decisions use a separate,
76
+ explicit policy described in the [investigation guide](investigation.md).
77
+
33
78
  ## Canvas and operations
34
79
 
35
80
  The left-to-right overview groups Plan/decomposition, scheduling, task branches, integration/final checks and PR/Merge. Selecting a node opens view-local Progress, Sessions and Run configuration details. Open task workflow drills into Execute, L1, Review and Git delivery; integration and remote delivery groups also expand. Colors have text labels. Identity, project/worktree, branch, HEAD, run ID, bindings and evidence come from actual receipts.
@@ -48,17 +93,19 @@ Node operation confirmation freezes the observed revision; a changed snapshot in
48
93
  - Continue workflow resumes the persisted Full or ultraWork/Quick policy.
49
94
  - Stop waits for managed work to settle; closing a view is not a stop.
50
95
 
51
- Explicitly independent packets with satisfied dependencies can be run ahead in isolated worktrees. Integration changes invalidate old acceptance. Each asynchronous node operation records running/passed/failed/cancelled and its reason. Quick retains deterministic checks and independent final Review; omitted Plan/Judge stages are not presented as passes.
96
+ Explicitly independent packets with satisfied dependencies can be run ahead in their registered execution directories, subject to the selected worktree policy. Integration changes invalidate old acceptance. Each asynchronous node operation records running/passed/failed/cancelled and its reason. Quick retains deterministic checks and independent final Review; omitted Plan/Judge stages are not presented as passes.
52
97
 
53
98
  ## Parallel execution
54
99
 
100
+ ### Eligibility and limits
101
+
55
102
  Read `flywheel template scheduler-policy.schema.json` for the current fields and bounds. For example:
56
103
 
57
104
  ```json
58
105
  {"scheduler":{"mode":"parallel","max-parallel":2,"providers":{"deepseek-account":1}}}
59
106
  ```
60
107
 
61
- Provider-limit keys are account channel names. Eligibility comes from frozen packet contracts:
108
+ Provider-limit keys are actual configuration channel names. The example uses the inline template's `deepseek-account`; a binding using `deepseek-account-sdk` needs that key instead. Eligibility comes from frozen packet contracts:
62
109
 
63
110
  ```yaml
64
111
  schedule:
@@ -68,10 +115,20 @@ schedule:
68
115
 
69
116
  Dependencies reference earlier known packet IDs. Writes are normalized relative paths or directory prefixes, without globs or escapes. Include ordinary tests/configuration and account for shared test resources. Undeclared independence, overlapping scopes and live-credential units remain serial.
70
117
 
71
- Only Execute/L1 run concurrently. Each unit has a worktree; one Go coordinator serializes CAS writes and accounting. Hard budgets admit only one model call at a time, retaining its slot through durable accounting. Other modes enforce total and channel concurrency. Cancellation awaits every started worker.
118
+ ### Execution directories
119
+
120
+ Configuration → Workflow policy → Automatically manage task Worktrees is on by default (`worktree.enabled`). It controls automatic directory creation/management independently from parallel scheduling. The installation default allows parallel execution with a limit of two; existing complete files without `scheduler` remain serial, as do explicit serial settings. Parallel automatic management requires isolated worktrees and stops if creation fails; the legacy serial path can record an in-place fallback. With automatic management off, tasks may run concurrently in the task checkout or choose their own Worktrees. Shared directories do not provide file isolation: write-scope conflicts, candidate drift and failed acceptance still stop progress.
121
+
122
+ To select another execution Worktree, the executor first prepares a clean checkout of the same repository and task baseline, unclaimed by another unit in this workflow and with a branch not shared by multiple Worktrees, then returns only `{"flywheelExecutionDirectory":{"cwd":"/absolute/worktree","branch":"actual-branch"}}` before implementation. Go validates and records it; the next invocation, tests, Review and delivery follow that directory. Registration is not task completion and its model usage is still billed. External Worktrees are retained. A prompt-only directory claim or edited state file cannot replace this registration.
123
+
124
+ Independent Worktrees permit concurrent Execute/L1. Shared checkouts run Execute concurrently, then verify and review serially after all workers finish. One Go coordinator serializes CAS writes and accounting. Hard budgets admit only one model call at a time, retaining its slot through durable accounting. Other modes enforce total and channel concurrency. Cancellation awaits every started worker.
72
125
 
73
126
  Review, integration and milestone gates remain serial. A combined candidate is revalidated after incorporating earlier work. Bounded execution failures retain their escalation policy. Integration conflicts and failed gates preserve the worktree and evidence. Write scopes are orchestration/acceptance contracts; full access is not an OS sandbox.
74
127
 
128
+ ### Shared-checkout batches
129
+
130
+ When a batch shares one checkout, all executor calls finish before L1 and independent Review validate the complete combined candidate. Changes are projected onto declared scopes; undeclared and forbidden paths still fail. This does not attribute filesystem writes to individual processes. Repairs invalidate earlier proofs. Only after every peer passes can code be committed and all completions published in one state CAS; failed publication never optimistically completes a subset. Mixed batches deliver the shared checkout first, then revalidate and integrate external Worktrees. Manual integration/final checks cannot bypass the batch barrier; resume the complete workflow. The canvas shows the cohort and previous error.
131
+
75
132
  ## Controlled Provider session interaction
76
133
 
77
134
  Read latest response opens the exact digest-bound receipt, not an invented native history path or a claim of complete provider history.
@@ -91,7 +148,7 @@ Ledger storage v2 is accepted by the new engine alongside legacy v1. Older engin
91
148
 
92
149
  ## Discovery and comparison
93
150
 
94
- CLI and desktop starts register run IDs. A conversation retains multiple confirmed task associations. The index lives in runs/ beside the global configuration, optionally overridden by absolute FLYWHEEL_RUNS_DIR. It shows the latest 100 registrations and never scans the disk. Query Go again for liveness.
151
+ CLI and desktop starts register run IDs. A conversation retains multiple confirmed task associations. The index lives in `runs/` beside the global configuration, optionally overridden by absolute `FLYWHEEL_RUNS_DIR`. It shows the latest 100 registrations and never scans the disk. Query Go again for liveness.
95
152
 
96
153
  Run history uses a selection list with adjacent details for operation kind, branch, HEAD, contract/configuration conditions, elapsed time and newly observed attempts, failures and deliveries. Selecting a record does not launch it; opening its canvas refreshes current Go state. Metrics scope chooses the selected run or all calls for its task, including legacy observations. The reference compares conditions without changing the metrics target. Invocation/receipt reconciliation precedes aggregation; late receipts keep their original attribution and are not double-billed. A group with entirely missing cost shows Not reported, not $0.
97
154
 
@@ -107,4 +164,9 @@ Merge rechecks the PR, head, base and checks, using `--match-head-commit`. It ne
107
164
 
108
165
  Retries reconcile existing PR/merge results before mutations. Missing receipts remain unknown. Remote state is separate from local engine completion. Publication must bind the actual merge commit and artifacts for its own validation; Merge does not automatically publish npm packages or deploy.
109
166
 
110
- The configuration panel also exposes default-off **JEV shadow evaluation (optional)**. See the [JEV guide](jev-shadow.md) for the switch, transmitted data and nonblocking failures. This requires the 0.30.1 CLI/plugin.
167
+ ## Related guides
168
+
169
+ - [Configuration](configuration.md): complete files, model bindings, permissions, and scheduling.
170
+ - [Workflow](workflow.md): preparation, execution, and PR review checkpoints.
171
+ - [Investigation](investigation.md): bounded evidence collection, reports, and optional JEV decisions.
172
+ - [Recovery](session-recovery.md): durable receipts and unresolved invocation handling.