opencode-plugin-flow 5.3.4 → 6.1.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,49 @@
2
2
 
3
3
  One short entry per release, written for users deciding whether to upgrade.
4
4
 
5
+ ## [Unreleased]
6
+
7
+ No changes yet.
8
+
9
+ ## [6.1.0] - 2026-07-21
10
+
11
+ Bounded intra-feature wave lore restores useful host-native parallel
12
+ contribution without restoring the former orchestration framework:
13
+
14
+ - A reusable hidden `flow-worker` can run as two or three concurrent instances
15
+ with exact, non-overlapping slices inside the one active run, followed by at
16
+ most one targeted follow-up cohort.
17
+ - The manager still owns integration, evidence acceptance, authoritative
18
+ validation, and review dispatch. No wave state, sidecar, admission profile,
19
+ telemetry, or concurrent feature lifecycle is added.
20
+ - This restores a capability; it does not claim a measured performance gain.
21
+ - Installation guidance now pins the exact `6.1.0` npm release.
22
+
23
+ ## [6.0.0] - 2026-07-21
24
+
25
+ Simplicity-first lifecycle lore turns Flow back into a small, durable serial
26
+ workflow:
27
+
28
+ - Session v5 replaces Session v4 with one canonical feature-run aggregate,
29
+ revision/operation-ID idempotency, session-native validation, derived status,
30
+ and no wall-clock correctness fields.
31
+ - Every run receives one independent review. The final feature derives one
32
+ final review requiring broad validation; failed reviews reset to a fresh full
33
+ run instead of entering correction modes, and blocking findings require
34
+ concrete evidence.
35
+ - The public surface is reduced to ten tools, five commands, and one hidden
36
+ read-only `flow-reviewer`.
37
+ - Orchestration profiles and admission, audit-ledger rendering, replay and
38
+ prompt-evaluation systems, detached validation receipts, and activation/cache
39
+ repair are removed.
40
+ - Installation uses OpenCode's own plugin command with an exact npm version.
41
+ Flow ships no installer, cache inventory, or automatic configuration repair.
42
+
43
+ Breaking changes: Flow v6 does not migrate active pre-v6 sessions or replay
44
+ their operations. Finish or close them before upgrading. Old archives remain
45
+ inert history. Validation interrupted before Session v5 persistence must be
46
+ rerun, and plugin configuration conflicts require manual repair.
47
+
5
48
  ## [5.3.4] - 2026-07-20
6
49
 
7
50
  Retry-safe release publishing lore makes partial registry or GitHub outages
package/README.md CHANGED
@@ -1,354 +1,226 @@
1
1
  # Flow Plugin for OpenCode
2
2
 
3
- `opencode-plugin-flow` gives OpenCode a durable, resumable planning-and-execution
4
- loop for larger coding work: plan a goal as discrete features, approve the plan,
5
- then implement one feature at a time with enforced validation and review
6
- evidence. State lives in `.flow/session.json`, so a session survives restarts,
7
- model switches, and context loss.
3
+ `opencode-plugin-flow` gives OpenCode a small, durable workflow for coding work
4
+ that benefits from an approved plan and an independent review. Flow v6 keeps
5
+ its durable lifecycle serial while allowing bounded parallel implementation
6
+ inside one active feature:
8
7
 
9
- The design is guidance-first: package-owned Markdown carries planning,
10
- execution, validation, review, and orchestration judgment, while the plugin
11
- runtime stays bounded and policy-focused — it keeps the session ledger and
12
- enforces the hard gates prompts should not be trusted to remember.
8
+ ```text
9
+ plan approve one active feature optional worker wave → integrate → validate → independent review → next or close
10
+ ```
13
11
 
14
- The maintained documentation starts at [docs/index.md](docs/index.md). The
15
- tracked `droid-wiki/` tree is an archived generated snapshot and is not a
16
- current product or contributor contract.
12
+ For multi-feature plans, the run/validate/review step repeats one feature at a
13
+ time. Only the implementation work inside that run may fan out. State lives in
14
+ `.flow/session.json`, so the workflow can resume after a restart or context
15
+ change without turning Flow into a general orchestration framework.
17
16
 
18
- ## Quick start
17
+ ## Install
18
+
19
+ Install the exact npm release through OpenCode:
19
20
 
20
21
  ```bash
21
- npx -y opencode-plugin-flow@latest install \
22
- --project "$PWD" --scope global
22
+ opencode plugin opencode-plugin-flow@6.1.0 --global --force
23
23
  ```
24
24
 
25
- `install` resolves npm's current release before it starts, writes that package's
26
- embedded exact version as the sole Flow activation, and permanently removes
27
- positively identified older Flow wrappers and OpenCode cache artifacts. It
28
- refuses a downgrade when a newer installed version is detected. The final check
29
- performed by that same fetched CLI must report exactly one active Flow source at
30
- the installed exact version and no proven inactive Flow cache artifacts. Do not
31
- resolve `@latest` a second time for post-install verification. Inventory covers
32
- global sources plus the selected `--project`; it does not scan unrelated project
33
- trees. Run the installer from each project that has its own OpenCode config. Use
34
- `--scope project` when the canonical pin should live with that selected project
35
- instead of global config.
36
-
37
- For a read-only preview, run `activation-apply` without `--apply` using an exact
38
- package version. Flow refuses ambiguous local wrappers, cache entries, unsafe
39
- links, and config it cannot change conservatively rather than guessing which
40
- copy is authoritative.
41
-
42
- Start or restart OpenCode, then give Flow a goal:
25
+ Omit `--global` for project scope. To update, replace `6.1.0` with the new exact
26
+ release and rerun the command. OpenCode owns package installation and config
27
+ mutation; Flow does not scan projects, delete caches, elect versions, or repair
28
+ configuration.
43
29
 
44
- ```text
45
- /flow-auto add rate limiting to the public API
30
+ The equivalent manual project configuration is:
31
+
32
+ ```json
33
+ {
34
+ "$schema": "https://opencode.ai/config.json",
35
+ "plugin": ["opencode-plugin-flow@6.1.0"]
36
+ }
46
37
  ```
47
38
 
48
- Flow inspects the repo, saves a plan of features, asks for approval (or
49
- proceeds if you already authorized autonomous work), then runs the loop:
50
- implement one feature → validate it → review it → record evidence → next
51
- feature. `/flow-status` shows where you are at any point, including after a
52
- restart.
39
+ Then restart OpenCode. OpenCode resolves npm plugins from this configuration;
40
+ see the official [OpenCode plugin documentation](https://opencode.ai/docs/plugins/).
41
+
42
+ Flow has no installer or activation CLI. Removing the configuration entry
43
+ disables Flow. If two Flow copies load for the same project, both fail closed
44
+ until the duplicate is removed.
53
45
 
54
- `/flow-auto` still respects the scope of the request. If you ask for a plan
55
- only or explicitly say not to implement, it saves and summarizes the plan and
56
- stops before `flow_run_start`.
46
+ ## Quick start
57
47
 
58
- ## What a session looks like
48
+ Start a complete workflow:
59
49
 
60
50
  ```text
61
- > /flow-auto add rate limiting to the public API
62
-
63
- flow_plan_save goal: "add rate limiting to the public API"
64
- features: rate-limit-middleware, per-route-config, docs-update
65
- (you approve the plan)
66
- flow_plan_approve plan locked — features are now immutable
67
- flow_run_start mutation acknowledged
68
- flow_status request.view: execution, feature: rate-limit-middleware
69
- ... implementation, tests ...
70
- flow_validation_start
71
- command: exact next Bash command
72
- coverageScope: focused
73
- bash exact armed command
74
- [flow-validation-receipt] immutable receipt reference
75
- flow_review_start request.validationRefs: [receipt reference]
76
- request.reviewKind: feature
77
- request.validationScope: targeted
78
- assignmentId: review-assignment:runtime-id
79
- flow_status request.view: reviewer
80
- request.assignmentId: review-assignment:runtime-id
81
- ... independent review ...
82
- flow_feature_complete
83
- request.result.kind: completed
84
- request.result.validationScope: targeted
85
- request.result.featureReview.assignmentId: review-assignment:runtime-id
86
- request.result.featureReview.verdict: passed
87
- flow_run_start mutation acknowledged
88
- flow_status request.view: execution, feature: per-route-config
89
- ...
90
-
91
- > /flow-status
92
- status: ok
93
- workflowData.projection.view: compact
94
- workflowData.projection.status: running
95
- workflowData.projection.progress: { completed: 1, total: 3, remaining: 2 }
96
-
97
- > /flow-run
98
- flow_status request.view: execution
99
- workflowData.projection: full active-feature scope
51
+ /flow-auto add rate limiting to the public API
100
52
  ```
101
53
 
102
- `flow_status` returns workflow state under `workflowData.projection`: compact is
103
- routing-only, execution is the full active-feature working scope, detail is
104
- diagnostic, and reviewer is narrow assignment context. State-changing tools
105
- return `workflowData.receipt` acknowledgements; a receipt never replaces a
106
- fresh status projection. Rejected mutations explicitly report
107
- `operationAccepted: false` and `operationIdConsumed: false`; accepted results,
108
- including durable review blockers, report the corresponding accepted receipt.
54
+ Flow inspects the Git worktree, saves a feature DAG, and asks for approval unless
55
+ the request already grants that authority. It then starts one runnable feature,
56
+ arms the exact validation command, creates one independent review assignment,
57
+ and records the result. `/flow-status` reports the durable next action at any
58
+ time.
59
+
60
+ Use a narrower command when you want to control the phase:
61
+
62
+ ```text
63
+ /flow-plan add rate limiting to the public API
64
+ /flow-run
65
+ /flow-status
66
+ ```
109
67
 
110
- Interrupt at any point; `/flow-run` resumes the next approved feature. On the
111
- final feature Flow requires broad project-level validation and a final review
112
- whose depth matches the approved plan before the session can close as
113
- completed.
68
+ Asking for a plan only stops after planning. Flow does not infer permission to
69
+ implement, commit, push, or publish from a planning request.
70
+
71
+ ## Lifecycle
72
+
73
+ An approved plan is immutable and contains a directed acyclic graph of
74
+ features. The runtime starts only a feature whose dependencies are complete,
75
+ and only one run may be active.
76
+
77
+ For each run:
78
+
79
+ 1. The manager implements the feature serially by default. Flow guidance permits
80
+ an ephemeral worker cohort only when it can name two or three genuinely
81
+ independent slices with exact, non-overlapping ownership.
82
+ 2. Each `flow-worker` instance returns its bounded contribution and evidence to
83
+ the manager. Workers cannot delegate, operate outside the project, call Flow
84
+ tools, or approve their own work. One targeted follow-up cohort may address a
85
+ concrete gap, retry, or consequential verification; automatic further waves
86
+ are not allowed.
87
+ 3. The manager inspects and integrates the combined work, accepts or rejects
88
+ worker evidence, and remains the only owner of lifecycle mutations. Shared
89
+ contracts and integration files stay manager-owned.
90
+ 4. `flow_validation_start` binds the current run and workspace-content digest
91
+ to the exact next Bash command.
92
+ 5. OpenCode observes that command's structured exit status and output
93
+ completeness, then records the observation directly in Session v5.
94
+ 6. `flow_review_start` records the changed artifact paths, selects applicable
95
+ passing validation, and creates one durable assignment for the hidden
96
+ `flow-reviewer`.
97
+ 7. `flow_feature_complete` records the review result and marks the run complete
98
+ or blocked.
99
+
100
+ The worker wave is an execution convenience, not another lifecycle. Flow writes
101
+ no wave ledger, manifest, or sidecar file. If execution is interrupted, the
102
+ manager recovers from ordinary Flow status and worktree inspection, then reruns
103
+ or finishes uncovered work. The manager always performs combined authoritative
104
+ validation before the one independent review. The cohort limit is a guidance
105
+ contract, not a scheduler or admission gate; the runtime enforces worker
106
+ permissions and the existing one-run validation/review boundary.
107
+
108
+ The final runnable feature derives a `final` review instead of adding a second
109
+ review pass. It requires broad passing validation for current workspace
110
+ content. Every other run derives a feature review. A failed review blocks the
111
+ feature; `flow_feature_reset` supersedes the failed run and creates a fresh full
112
+ attempt with no carried validation or review.
113
+
114
+ After every feature passes, `flow_session_close` records the terminal
115
+ disposition and archives the session. A session may also be closed explicitly
116
+ as deferred or abandoned.
114
117
 
115
118
  ## Commands
116
119
 
117
120
  | Command | Purpose |
118
121
  | --- | --- |
119
- | `/flow-auto <goal>` | Drive the authorized loop; stop after planning when requested. |
122
+ | `/flow-auto <goal>` | Drive the authorized lifecycle, stopping after planning when requested. |
120
123
  | `/flow-plan <goal>` | Create or approve a plan. |
121
- | `/flow-run` | Execute one approved feature. |
122
- | `/flow-review` | Run a read-only review. |
123
- | `/flow-status` | Show the active session and next action. |
124
-
125
- Commands are compiled entrypoints: manager commands carry only their applicable
126
- core instructions, while `/flow-review` runs against the reserved reviewer's
127
- role-specific agent contract. Flow does not install files into OpenCode's
128
- global skill registry and does not depend on native skill discovery.
129
-
130
- `flow-test`, `flow-deslop`, `flow-ui-quality`, and `flow-commit` are optional
131
- package-owned guides loaded on demand through `flow_guidance`, not public
132
- commands. `flow-commit` is user-triggered only and stays outside the autonomous
133
- loop.
124
+ | `/flow-run` | Run or resume one approved feature. |
125
+ | `/flow-review` | Dispatch the independent read-only reviewer. |
126
+ | `/flow-status` | Inspect the active session and next action. |
127
+
128
+ Flow registers exactly two hidden subagents: `flow-worker` and
129
+ `flow-reviewer`. The implementation worker is reusable across a bounded wave;
130
+ edits and Bash require host approval, while external-directory access, skill
131
+ loading, delegation, and every Flow tool are denied. The reviewer remains
132
+ read-only and can read reviewer status, but cannot edit files, run Bash, load
133
+ skills, delegate work, or call state-changing Flow tools. The root manager owns
134
+ the lifecycle, integration, and evidence acceptance.
134
135
 
135
136
  ## Tools
136
137
 
137
- The plugin exposes 12 tools. Nine own the durable lifecycle; three add bounded
138
- harness admission, runtime-attested validation, and deterministic audit
139
- rendering:
138
+ The plugin exposes ten tools:
140
139
 
141
140
  | Tool | Purpose |
142
141
  | --- | --- |
143
- | `flow_guidance` | Load exact package-owned guidance by stable id. |
144
- | `flow_status` | Read the active session and next action. |
145
- | `flow_plan_save` | Create a session or update its active same-goal draft. |
146
- | `flow_plan_approve` | Approve the draft plan. |
147
- | `flow_run_start` | Start the next runnable feature. |
148
- | `flow_review_start` | Bind validation to current source and create a runtime-owned reviewer assignment; final review also binds the passing feature result. |
149
- | `flow_feature_complete` | Atomically record a completed or blocked assignment result. |
150
- | `flow_feature_reset` | Reset one feature and its dependents. |
151
- | `flow_session_close` | Archive the active session as completed, deferred, or abandoned. |
152
- | `flow_orchestration_admit` | Evaluate and arm one bounded optional-worker proposal for the active harness profile. |
153
- | `flow_validation_start` | Arm capture for the exact next Bash command against current causal guards, feature run, and source. |
154
- | `flow_audit_render` | Validate `AuditLedgerV1` and render its reconciled Markdown deterministically. |
155
-
156
- Only the root manager calls `flow_review_start`. Reviewers recover the exact
157
- assignment with
158
- `flow_status { request: { view: "reviewer", assignmentId } }` and return only
159
- the assignment id, verdict, typed findings, reported time, and terminal
160
- disposition. The runtime derives all attempt, pass, source, packet, run,
161
- start-time, and required-depth identity. Final assignment creation durably binds
162
- the exact passing feature-assignment result. The final feature outcome submits
163
- only the final-assignment result; Flow records both results atomically from the
164
- durable binding.
165
-
166
- Validation input is no longer a caller-authored success claim. Immediately
167
- before a check, call `flow_validation_start` with the exact command and current
168
- guards, execute that exact command as the next Bash call, and copy the emitted
169
- immutable receipt reference into `flow_review_start.request.validationRefs`.
170
- Flow verifies receipt bytes, run, feature, current source, host-observed exit,
171
- output completeness, and scope before materializing Session v4 evidence. A
172
- failed, truncated, missing, stale, altered, or duplicate receipt is rejected
173
- without consuming the review-start operation id.
174
-
175
- The first final assignment pins that binding for every same-source final-review
176
- retry. A manager recovering context loads detail status and copies
177
- `workflowData.projection.finalReviewRetry.prerequisite.result` unchanged into
178
- the new final review start's `request.featureReview`. Compact and reviewer views
179
- omit the aggregate. A mismatch records nothing and leaves its operation id
180
- reusable; a source edit requires a new targeted feature-review sequence.
142
+ | `flow_guidance` | Load one concise package-owned guide. |
143
+ | `flow_status` | Read compact, execution, detail, or reviewer state. |
144
+ | `flow_plan_save` | Create or replace the active draft plan. |
145
+ | `flow_plan_approve` | Approve and lock the current plan. |
146
+ | `flow_run_start` | Start one runnable approved feature. |
147
+ | `flow_validation_start` | Arm observation for the exact next Bash command. |
148
+ | `flow_review_start` | Create the run's one independent review assignment. |
149
+ | `flow_feature_complete` | Record the review result and feature outcome atomically. |
150
+ | `flow_feature_reset` | Reset a feature and its dependents for a fresh full retry. |
151
+ | `flow_session_close` | Close and archive a session in one operation. |
152
+
153
+ The nine lifecycle tools use a strict nested `request` object and return state
154
+ under `workflowData`. Mutations require the current session revision and a
155
+ stable operation ID. Repeating the exact accepted operation is idempotent;
156
+ reusing its ID for different input fails. `flow_guidance` is the one exception:
157
+ it accepts `{ "id": "..." }` and returns the guide as Markdown.
158
+
159
+ ## Guides
160
+
161
+ Flow exposes exactly four concise guides through `flow_guidance`:
162
+
163
+ | Guide | Purpose |
164
+ | --- | --- |
165
+ | `flow` | Orient the manager to the complete lifecycle and authority boundary. |
166
+ | `flow-plan` | Create a small approved feature DAG. |
167
+ | `flow-run` | Execute one feature, optionally using a bounded worker wave. |
168
+ | `flow-review` | Perform the run's independent review assignment. |
181
169
 
182
170
  ## What the runtime enforces
183
171
 
184
- The runtime owns only safety; judgment lives in package-owned guidance:
185
-
186
- - `.flow/session.json` is the single source of truth; writes are locked and
187
- atomic, and closed sessions are archived under `.flow/history/`.
188
- - Plans cannot be changed after approval.
189
- - A different-goal plan save cannot replace an unclosed session, including an
190
- unapproved draft. Close it explicitly as `deferred` or `abandoned` and finish
191
- archive publication before saving the new goal.
192
- - Only one feature run can be active at a time; reset preserves its audit
193
- history but the next start receives a fresh run id.
194
- - Reviewer assignment requires source-bound passing validation: `targeted` for
195
- feature review and `broad` for final review. A source edit invalidates stale
196
- pending review work when its replacement is created.
197
- - Validation receipts are host-attested from the exact next Bash execution.
198
- Callers cannot supply validation timestamps, exit status, command class, or
199
- output digest to `flow_review_start`.
200
- - Feature outcome uses a nested `completed` or `blocked` result. Invalid or stale
201
- input records nothing and does not consume its operation id.
202
- - Each OpenCode handler validates the registered nested schema again at entry;
203
- invalid host invocations fail as tool errors before Flow state I/O.
204
- - The runtime derives review depth from the approved plan and owns assignment,
205
- attempt, logical-pass, packet, source, and start-time identity.
206
- - Failed reviews are bounded: an accepted blocker returns operation status
207
- `ok`, and autonomous repair is limited to one repair plus one retry before
208
- the feature blocks.
209
- - Review exhaustion uses the ordinary blocked-feature state; continuing requires
210
- an explicit `flow_feature_reset`, not a second checkpoint protocol.
211
- - A passing final feature outcome marks progress completed but leaves closure null;
212
- `flow_session_close` exclusively records and archives it.
213
- - Once a closure is recorded, the session is archive-only. If publication fails,
214
- compact status supplies `closure.retryOperationId`; retry only with
215
- `flow_session_close { request: { mode: "retry", operationId } }`. No new
216
- close, run, reset, approval, or replan can reopen or adopt it.
217
- - A new close operation id must be absent from the active causal chain and every
218
- mutation in canonical Session v4 workspace history. Any archived match is a
219
- collision; malformed or ambiguous canonical history fails closed before
220
- active state changes.
221
- - Archive publication requires explicit non-null closure. Closureless Session
222
- v4 state may remain active, but it is rejected as canonical history and makes
223
- canonical lookup fail closed if found there.
224
- - Every closure is quiescent: no active execution or pending review assignment
225
- remains. A session can close as `completed` only after the final feature
226
- outcome has passed.
227
- - Host-observed validation times and reviewer-reported result times must follow
228
- run, validation, and assignment order and cannot postdate runtime acceptance.
229
- - Session locks fail closed: Flow never guesses that an old lock is abandoned,
230
- and only the unique owner may release it. Only a valid Session v4 document can
231
- become active state; canonical history additionally requires explicit
232
- non-null closure.
233
- - Flow writes `.flow/.gitignore` so session state stays out of Git by default.
234
- - `.flow/session.json` is the only active-state representation. Canonical Flow
235
- commands call `flow_status` before acting; plugin configuration does not read,
236
- refresh, or project workspace state.
237
- - Exactly one Flow runtime instance may operate in an OpenCode process. If
238
- duplicate copies load, every copy fails closed; the highest semantic version
239
- is named only as a diagnostic leader and does not become operational.
240
-
241
- ## Hidden workers
242
-
243
- For broad work, Flow's manager can fan out isolated hidden workers
244
- (`flow-evidence-worker`, `flow-validation-worker`, `flow-audit-worker`,
245
- `flow-candidate-worker`, `flow-verifier-worker`, and the `flow-reviewer`) with
246
- locked-down permissions. Workers gather evidence; they never approve plans,
247
- complete features, or close sessions. Flow reserves those agent ids and the
248
- public command ids while the plugin is enabled, and warns if they collide with
249
- your own config.
250
-
251
- Each hidden worker receives only its applicable handoff schema. The manager
252
- contract treats empty or malformed handoffs as coverage gaps instead of
253
- success. The offline handoff validator detects missing headings, empty sections,
254
- unresolved placeholders, and invalid statuses; current OpenCode worker output
255
- remains plain text, so runtime acceptance still depends on the manager applying
256
- that contract. Inspect rendered surfaces and static contracts with
257
- `bun run prompt:quality`; run opt-in model decisions with
258
- `bun run prompt:model-eval -- --model <provider/model> --timeout-ms 300000`;
259
- see
260
- [docs/prompt-quality.md](docs/prompt-quality.md).
261
-
262
- The trusted command footer selects one harness profile with
263
- `OPENCODE_FLOW_HARNESS_PROFILE=control|standard|assurance` (default
264
- `standard`) and one admission rollout with
265
- `OPENCODE_FLOW_ROLLOUT_MODE=control|observe|enforce` (default `observe`).
266
- `control` preserves discretionary optional-worker behavior without admission
267
- ceremony. `standard` admits a small bounded discovery/challenge path;
268
- `assurance` permits broader bounded evidence and audit coverage when risk
269
- justifies it. In `observe`, a policy violation is reported but does not block;
270
- in `enforce`, the exact admitted optional worker class and count must be
271
- dispatched. Lifecycle-required reviewer and validation workers are not optional
272
- passes and do not use orchestration admission. Validation receipts remain
273
- mandatory in every profile.
274
-
275
- Hidden worker routing can be tuned without changing the domain contract. Set
276
- `OPENCODE_FLOW_READONLY_WORKER_MODEL`,
277
- `OPENCODE_FLOW_REVIEW_WORKER_MODEL`, or
278
- `OPENCODE_FLOW_CANDIDATE_WORKER_MODEL`, with
279
- `OPENCODE_FLOW_WORKER_MODEL` as the fallback. Matching `*_WORKER_STEPS`
280
- variables set OpenCode's current `steps` limit; values must be integers from 1
281
- through 1000.
282
-
283
- For broad implementation, the manager records whether work stayed serial,
284
- used exact-path candidate workers, used isolated worktrees, ran a tournament, or
285
- skipped eligible candidates. Feature completion can carry bounded
286
- `result.orchestrationPasses` with candidate eligibility, decision, and structured
287
- factors. Bounded projections report the relevant aggregate while full worker
288
- handoffs remain outside `.flow/**`.
289
-
290
- ## Install details and legacy cleanup
291
-
292
- See [docs/troubleshooting.md](docs/troubleshooting.md) for updates,
293
- activation refusal and duplicate-runtime recovery, stuck session recovery, and
294
- removal of global Flow skill folders left by v4.
295
-
296
- To update, run the same `@latest install` command. The installer inventories
297
- OpenCode's global sources plus the selected project's project, `.opencode`,
298
- custom, inline, and readable managed configuration; singular and plural plugin
299
- directories; and the Flow package cache. Other project trees are deliberately
300
- not discovered; run the command from each project with project-local OpenCode
301
- configuration. It preserves unrelated plugins, removes recognized Flow config
302
- entries outside the selected canonical scope, and permanently removes only
303
- marker-proven wrappers, the exact known legacy wrapper format, and
304
- manifest-proven inactive cache artifacts. Applied changes receive config
305
- backups and a recovery journal. Obsolete artifacts are staged reversibly while
306
- activation changes are verified, restored if activation fails, and deleted
307
- before installation reports success.
308
- Sources that cannot be proved safe—including unknown wrappers, ambiguous cache
309
- artifacts, JSONC that would require a lossy rewrite, inline config, and
310
- administrator-managed config—produce manual remediation instead of mutation.
311
- If an applied multi-source change fails, Flow attempts exact safe rollback and
312
- records either `rolled-back` or `rollback-failed` in the recovery journal;
313
- concurrent or unsafe state is preserved for manual recovery. Remote and
314
- managed-preference sources that cannot be decoded offline remain covered by
315
- fail-closed runtime leadership within each OpenCode project context. A later
316
- install reconciles interrupted v2 journals before planning: pre-commit work is
317
- rolled back, while committed removal work finishes verified deletion.
318
-
319
- To preview recoverable migration of pristine v4 global skill folders:
320
-
321
- ```bash
322
- npx -y opencode-plugin-flow@5.3.4 legacy-cleanup --dry-run
323
- ```
172
+ - Session v5 is the only active document format supported by Flow v6. Finish or
173
+ close older active sessions before upgrading; old archives are inert history.
174
+ - Lifecycle order is carried by revisions and durable record order, not UTC
175
+ timestamps or caller clocks.
176
+ - Plans are immutable after approval, dependencies must be acyclic, and only one
177
+ durable run can be active. An ephemeral worker wave does not create additional
178
+ runs or concurrent Flow state.
179
+ - Validation must be observed from the exact armed Bash command. Failed,
180
+ incomplete, stale-source, or mismatched observations cannot authorize review.
181
+ - Each run has one review. Final-feature review requires broad validation;
182
+ there is no targeted-then-broad dual pass.
183
+ - Completion fails if workspace content changed after review started.
184
+ - Failed review retries are full resets, not correction modes or delta-scoped
185
+ review protocols.
186
+ - Every blocking review finding carries concrete artifact, missing-evidence, or
187
+ unmet-requirement evidence.
188
+ - `.flow/session.json` is written under a project lock with schema validation,
189
+ atomic replacement, quarantine for unreadable state, and no-follow path
190
+ checks. Closed state is archived beneath `.flow/history/`.
191
+ - Source binding requires a readable Git worktree. Git submodules are rejected
192
+ explicitly; Flow does not claim to fingerprint work split across repositories.
193
+ - Duplicate runtime copies for one project fail closed. This is a safety guard,
194
+ not version election or automatic configuration repair.
195
+
196
+ Flow deliberately does not include orchestration profiles, worker admission,
197
+ wave telemetry or ledgers, audit-ledger rendering, replay reports, detached
198
+ validation receipts, or automatic activation and cache repair. Bounded waves
199
+ restore useful host-native parallel contribution without reviving that
200
+ machinery. They are a capability boundary, not a claim of measured performance
201
+ improvement.
324
202
 
325
203
  ## Development
326
204
 
327
- ```bash
328
- bun install
329
- bun run check # typecheck + lint + release metadata + prompt quality + build + tests
330
- bun run harness:report # sanitized control/candidate resource and quality status
331
- bun run smoke:live # boots a real OpenCode server against the packed tarball
332
- ```
333
-
334
- The package exports only the OpenCode plugin entrypoint:
205
+ Requirements: Git, Node.js 24 or newer, Bun 1.3.14, and the versions pinned in
206
+ `package.json`.
335
207
 
336
- ```ts
337
- import flowPlugin from "opencode-plugin-flow";
208
+ ```bash
209
+ bun install --frozen-lockfile
210
+ bun run check
338
211
  ```
339
212
 
340
- See [docs/development.md](docs/development.md) and
341
- [docs/maintainer-contract.md](docs/maintainer-contract.md) for the
342
- v5 domain/application/infrastructure/platform boundaries, guidance split, and
343
- release process.
213
+ The normal check runs typechecking, formatting/lint checks, build verification,
214
+ tests, and package smoke. Release CI also exercises the packed plugin in a real
215
+ OpenCode host.
344
216
 
345
- ## Credits
217
+ Maintained documentation starts at [docs/index.md](docs/index.md). See
218
+ [development](docs/development.md) for repository structure and focused checks,
219
+ [troubleshooting](docs/troubleshooting.md) for recovery, and
220
+ [ADR 0005](docs/adr/0005-flow-v6-session-v5-simplicity-first.md) for the v6
221
+ tradeoffs. [ADR 0006](docs/adr/0006-bounded-intra-feature-waves.md) defines the
222
+ bounded intra-feature wave amendment.
346
223
 
347
- Flow's parallel orchestration guidance was inspired by Ray Fernando's skill
348
- work on parallel agent workflows. Flow also draws conceptual inspiration from
349
- [RepoPrompt CE](https://github.com/repoprompt/repoprompt-ce), especially its
350
- emphasis on codebase orientation, context engineering, agent orchestration,
351
- and reviewable handoffs.
224
+ ## License
352
225
 
353
- The Flow version is its own OpenCode-native design: package-owned guidance,
354
- manager-owned state, hidden workers, and no extra runtime ledger.
226
+ MIT