opencode-plugin-flow 6.6.0 → 6.8.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
@@ -6,6 +6,97 @@ One short entry per release, written for users deciding whether to upgrade.
6
6
 
7
7
  No changes yet.
8
8
 
9
+ ## [6.8.0] - 2026-07-24
10
+
11
+ Checkpoint-safe continuation and leaner review convergence:
12
+
13
+ - `/flow-auto` now remains waiting through same-revision checkpoint replies and
14
+ enqueues exactly one continuation only after the same host observes an
15
+ accepted Flow mutation whose tool assistant resolves through cached
16
+ `message.updated` parentage to the authoritative user reply; missing or
17
+ mismatched provenance fails closed. Mechanical progress must match that
18
+ revision exactly, except for the single state-constrained reviewer-result
19
+ revision after an authenticated `flow_review_start`.
20
+ - Compaction carries reply authority only across an authenticated trigger
21
+ assistant, automatic compaction marker, summary assistant, and successor user
22
+ lineage while authority remains unchanged; incomplete or unrelated lineage
23
+ fails closed.
24
+ - From idle, auto-routing requires a same-host accepted non-replayed
25
+ `flow_plan_save` for the newly created Flow session; a baseline that already
26
+ has a pending reviewer retains a narrow temporal exception.
27
+ - `/flow-auto stop` and `/flow-auto cancel` now revoke the process-local
28
+ continuation lease without closing, deferring, abandoning, or otherwise
29
+ mutating the durable Flow session.
30
+ - Manager command rewrites preserve every nonblank raw request, including
31
+ exterior whitespace, exactly once while keeping synthetic guidance separate.
32
+ - Initial auto/run prompts, dynamically loaded run guidance, compaction context,
33
+ and synthetic continuations share one concise manager kernel for reserved
34
+ roles, the exact `failedReviewCount === 1` retry gate, and current-source plus
35
+ relevant baseline evidence.
36
+ - Guidance represents race-heavy risk checks as one transition matrix and
37
+ preserves stable finding IDs, relevant baseline facts, and prior dispositions.
38
+ Ordinary reviewer summaries keep IDs mapped to the active feature or supplied
39
+ explicitly in its packet; final review covers every approved requirement or
40
+ feature ID. Both keep each still-live prior finding through failed reviews; a
41
+ proven repair remains pending until a later passing review, so closure and
42
+ archive replay need no prerequisite detail read or unbounded historical
43
+ ledger. The Session v5 schema is unchanged.
44
+ Provider/model execution remains unverified unless the opt-in manual canary
45
+ is run.
46
+
47
+ Install or update:
48
+
49
+ ```bash
50
+ opencode plugin opencode-plugin-flow@6.8.0 --global --force
51
+ ```
52
+
53
+ ## [6.7.0] - 2026-07-23
54
+
55
+ Bounded auto-continuation lore keeps user-authorized goals moving while making
56
+ checkpoints, retries, and validation freshness explicit:
57
+
58
+ - `/flow-auto` now treats ready features and completed sessions as mechanical
59
+ loop states, so authorized work continues without an intermediate “ready for
60
+ the next feature” handoff. Its host lease starts from a provisional compact
61
+ baseline and auto-routes only after the initiating turn advances that same
62
+ Flow session; unchanged or replacement sessions fail closed, while
63
+ conversational plan approval remains resumable.
64
+ - Failed features are never selected implicitly while their latest relevant
65
+ reviewed outcome remains failed. Auto mode may continue untouched independent
66
+ work; when only retry-required candidates remain it waits for direction.
67
+ While a failed run is blocked, optional `nextFeatureId` makes its authorized
68
+ reset and exact next run atomic. Once that run is superseded and status is
69
+ ready, explicit `flow_run_start(featureId)` starts its authorized retry. This
70
+ adds no durable hold or retry ledger.
71
+ - Each feature now receives a before-edit evidence/environment preflight and
72
+ adversarial risk checklist. Manager policy withholds review while required
73
+ evidence is knowingly skipped, and reviewers treat missing proof as blocking;
74
+ no skipped-evidence state is persisted. Workers receive the checklist before
75
+ coding, and reviewers explicitly inspect adjacent/repeated transitions,
76
+ overlapping invariants, base diffs, and file modes.
77
+ - Stable source finding IDs remain traceable in immutable feature prose.
78
+ Active Flow work uses only the reserved worker and reviewer roles, while
79
+ precise missing-evidence review failures can request manager-run proof.
80
+ - Accepted validation markers expose their recorded revision as a concurrency
81
+ token, avoiding status reads made only to recover it. Only `passed: true` may
82
+ feed review while all runtime gates hold; failed, incomplete, and
83
+ source-drifted observations may use the token only for fresh validation. A
84
+ drifted marker reports `passed: false` plus its explicit ineligibility reason.
85
+ New review admission requires its current-source pass to be newer than the
86
+ latest relevant failure or drift; accepted reviews remain grandfathered.
87
+ - Status workflow data now includes a small non-authoritative timer for the
88
+ latest `/flow-auto` in the current plugin process. Active milliseconds are
89
+ coordinator-classified wall time, not CPU or pure coding time; user-wait
90
+ milliseconds cover only projected plan-approval and
91
+ `await-user-direction` checkpoints. Paused, inactive, errored, and
92
+ unprojected waits are excluded, and reload resets the timer.
93
+
94
+ Install or update:
95
+
96
+ ```bash
97
+ opencode plugin opencode-plugin-flow@6.7.0 --global --force
98
+ ```
99
+
9
100
  ## [6.6.0] - 2026-07-22
10
101
 
11
102
  Projection-guided recovery lore makes Flow's next step easier to understand
package/README.md CHANGED
@@ -21,11 +21,11 @@ into the active goal.
21
21
  Install the exact npm release through OpenCode:
22
22
 
23
23
  ```bash
24
- opencode plugin opencode-plugin-flow@6.6.0 --global --force
24
+ opencode plugin opencode-plugin-flow@6.8.0 --global --force
25
25
  ```
26
26
 
27
27
  Omit `--global` for project scope. Exact version pins do not update
28
- automatically. To update, replace `6.6.0` with the new release and rerun the
28
+ automatically. To update, replace `6.8.0` with the new release and rerun the
29
29
  command.
30
30
 
31
31
  Before upgrading from Flow v5 or earlier, finish or explicitly close any active
@@ -43,7 +43,7 @@ The equivalent manual project configuration is:
43
43
  ```json
44
44
  {
45
45
  "$schema": "https://opencode.ai/config.json",
46
- "plugin": ["opencode-plugin-flow@6.6.0"]
46
+ "plugin": ["opencode-plugin-flow@6.8.0"]
47
47
  }
48
48
  ```
49
49
 
@@ -64,7 +64,17 @@ Start a complete workflow:
64
64
  Flow inspects the worktree, proposes a feature plan, and asks for approval
65
65
  unless your request already authorized implementation. It then runs one
66
66
  runnable feature at a time, validates the actual workspace, obtains an
67
- independent review, and repeats until it can close the session.
67
+ independent review, and repeats until it can close the session. While
68
+ implementation remains authorized, `ready` and `completed` are internal loop
69
+ states: `/flow-auto` does not hand back “ready for the next feature” or wait for
70
+ another command between passing features. From idle, auto-routing first requires
71
+ a same-host accepted non-replayed `flow_plan_save` for the created Flow session;
72
+ an active baseline that already has a pending reviewer retains a narrow temporal
73
+ exception for that completion.
74
+
75
+ Send `/flow-auto stop` or `/flow-auto cancel` in the same OpenCode session to
76
+ revoke only the process-local continuation lease. This does not close, defer,
77
+ abandon, or otherwise mutate the durable Flow session.
68
78
 
69
79
  Before every manager-owned Flow mutation, including direct `/flow-plan` and
70
80
  `/flow-run` use, the manager compares the current request with the active goal.
@@ -76,13 +86,53 @@ continue, defer, or abandon the active work. If that work is completed but not
76
86
  closed, Flow closes it as completed before starting the new request.
77
87
 
78
88
  Existing implementation authority carries across approval and feature outcomes.
79
- Only the first in-scope failed review automatically resets for one fresh full
80
- retry; a `[scope-blocker]` checkpoints immediately. A second failed review
81
- projects `await-user-direction`, so Flow reports the blocker and waits for
82
- explicit direction before one additional attempt. The active session remains
83
- authoritative while it waits. Ordinary blocking findings are in-scope by
84
- default; a reviewer uses `[scope-blocker]` only when the required repair would
85
- materially exceed the approved plan.
89
+ Only when `failedReviewCount === 1` and no `[scope-blocker]` is present may Flow
90
+ automatically reset and atomically start one fresh full retry. A
91
+ feature whose latest relevant reviewed outcome remains failed is never selected
92
+ implicitly. `/flow-auto` may continue untouched, dependency-independent
93
+ features, but when only retry-required candidates remain it projects
94
+ `await-user-direction`. Flow then reports the blocker and waits for an explicit
95
+ retry or independent-feature choice. While the failed run is still blocked, the
96
+ chosen feature is attached to `flow_feature_reset` as `nextFeatureId`, so reset
97
+ and the next run are one operation. If independent work later finishes and only
98
+ the superseded failed feature remains, status is ready with
99
+ `await-user-direction`; explicit retry then uses `flow_run_start` with that
100
+ feature's exact `featureId`, because there is no blocked run left to reset. The
101
+ active session remains authoritative while it waits. Ordinary blocking findings
102
+ are in-scope by default; a reviewer uses `[scope-blocker]` only when the required
103
+ repair would materially exceed the approved plan. After a user checkpoint, the
104
+ process-local continuation resumes only after that same OpenCode session observes
105
+ an accepted non-replayed Flow mutation whose tool assistant ID resolves, through
106
+ the cached `message.updated` `parentID`, to the authoritative user reply. A
107
+ missing or mismatched origin fails closed. Another host cannot establish that
108
+ authority. The mechanical projection must match the credited revision exactly;
109
+ the sole successor allowance is one revision after an authenticated
110
+ `flow_review_start`, where the state machine admits the reserved reviewer result.
111
+ Compaction transfers the reply authority only across an authenticated trigger
112
+ assistant, automatic compaction marker, summary assistant, and successor user
113
+ lineage while the authority is unchanged; an incomplete or unrelated lineage
114
+ fails closed.
115
+
116
+ Before coding each feature, Flow inventories required evidence and its
117
+ environment, then applies an adversarial risk checklist covering failure
118
+ ordering, repeated and interrupted operations, adjacent state transitions,
119
+ overlapping invariants, and relevant file-mode or platform risks. While required
120
+ behavior or environment evidence is knowingly skipped, manager policy forbids
121
+ requesting review; the reviewer treats proof required to approve the outcome as
122
+ blocking if it is missing from the packet. Flow persists no skipped-evidence
123
+ ledger. Asking the user remains the default when external evidence or authority
124
+ is missing. At a blocked checkpoint, atomic reset-and-start can discard that
125
+ attempt and continue the
126
+ exact authorized retry or dependency-independent feature. At a ready retry
127
+ checkpoint, explicit feature start resumes the already superseded failure.
128
+ Neither route adds a hold or second blocker ledger.
129
+
130
+ Flow guidance represents the checklist for concurrency and state-machine work
131
+ as one compact transition matrix shared by workers and the reviewer. Review
132
+ packets reuse a refreshed run baseline, carry only feature-relevant file facts
133
+ until final review, and preserve source IDs, current-source evidence, risk
134
+ coverage, and prior finding dispositions in existing text fields—no new audit
135
+ schema.
86
136
 
87
137
  For plan-only or advanced use, plan first:
88
138
 
@@ -97,24 +147,55 @@ Repeating a same-goal plan-only request after approval reports the immutable pla
97
147
  and current progress, then stops without rewriting the plan or starting work.
98
148
 
99
149
  `/flow-run` and `/flow-status` are advanced/recovery controls. At any point,
100
- `/flow-status` reports the durable state and next action.
150
+ `/flow-status` reports the durable state and next action. After `/flow-auto` has
151
+ run in the current plugin process, status also reports a non-authoritative timer
152
+ for the latest invocation. `activeMs` is process-local wall time classified as
153
+ active by the coordinator, not CPU time or pure coding time.
154
+ `waitingForUserMs` counts only projected `flow_plan_approve` and
155
+ `await-user-direction` checkpoints. Plugin restart resets the timer; paused,
156
+ inactive, errored, and unprojected waits are excluded.
101
157
 
102
158
  ## How Flow works
103
159
 
104
160
  1. Planning saves a small feature DAG. Approval locks it.
105
161
  2. `/flow-run` starts one feature whose dependencies are complete.
106
- 3. The manager implements it serially or integrates an optional bounded worker
162
+ 3. Before editing, the manager preflights required evidence and gives any
163
+ bounded workers an explicit adversarial acceptance and risk checklist.
164
+ 4. The manager implements it serially or integrates an optional bounded worker
107
165
  wave.
108
- 4. Flow observes the exact armed validation command against the current
166
+ 5. Flow observes the exact armed validation command against the current
109
167
  workspace, then creates one independent review assignment. At new review
110
- admission, a known-failed exact planned gate needs a current-source pass;
111
- already accepted Session v5 pending or completed reviews are not reopened or
112
- vetoed later at close.
113
- 5. A passing feature advances the plan. A blocked feature is reset as a fresh
114
- full attempt within the retry boundary above. The final passing feature
115
- allows explicit closure. Every accepted close returns a concise delivery
116
- summary with each feature's attempt count, latest outcome, and terminal
117
- findings, derived from Flow's recorded state.
168
+ admission, a relevant failure or source-drift observation invalidates older
169
+ passes; the qualifying pass must be newer and match current source. Separately,
170
+ the manager must not call `flow_review_start` while known required behavior or
171
+ environment evidence is skipped; this is workflow policy, not persisted
172
+ admission state. Already accepted Session v5 pending or completed reviews are
173
+ not reopened or vetoed later at close.
174
+ 6. The reviewer inspects adjacent and repeated state transitions, overlapping
175
+ feature invariants, the changed artifacts, and the packet's base-diff and
176
+ file-mode inventory. Stable finding IDs survive retries; reviewer guidance
177
+ requires checking prior dispositions and completing the supplied risk
178
+ checklist, represented as a bounded matrix when applicable. Missing proof is
179
+ a precise blocker only when it is required to approve the outcome.
180
+ 7. A passing feature advances the plan. A failed feature is not selected again
181
+ by default. From blocked status, reset atomically starts the exact authorized
182
+ retry or independent feature through optional `nextFeatureId`. From ready
183
+ `await-user-direction`, the failed run is already superseded and explicit
184
+ `flow_run_start(featureId)` begins its retry. The final passing feature allows
185
+ explicit closure. Every accepted close returns a concise delivery summary
186
+ with each feature's attempt count, latest outcome, and terminal findings,
187
+ derived from Flow's recorded state. Ordinary reviewer summaries carry IDs
188
+ mapped to the active feature or explicitly supplied in its packet; final
189
+ review carries every approved requirement or feature ID. Both carry each
190
+ still-live prior finding with its severity and disposition into the latest
191
+ `outcomeSummary`. Terminal
192
+ `fixed` requires a later passing review and current evidence. If a failed
193
+ retry proves one repair but finds another blocker, it carries that ID and a
194
+ concise evidence reference forward as terminal fixed pending pass; it cannot
195
+ drop the ID or call it fixed. Unproven fixes stay unverified, `recurring`
196
+ confirms recurrence, and `residual` requires a confirmed nonblocker. Only a
197
+ passing review may remove fixed history from the live carry-forward set.
198
+ Terminal findings retain unresolved blockers and the handoff stays bounded.
118
199
 
119
200
  State lives in `.flow/session.json`, so `/flow-status` can recover the next
120
201
  action after a restart or context change.
@@ -128,6 +209,9 @@ targeted follow-up wave may address a concrete gap. Once implementation is
128
209
  authorized, a qualifying wave needs no separate approval.
129
210
 
130
211
  Workers cannot delegate, call Flow lifecycle tools, or approve their own work.
212
+ Generic or general-purpose agents are not used for active Flow work: bounded
213
+ implementation uses `flow-worker`, and independent review uses
214
+ `flow-reviewer`.
131
215
  Flow persists no wave state: the manager remains responsible for the combined
132
216
  diff, authoritative validation, and the one independent review. Small or
133
217
  integration-heavy tasks stay serial.
@@ -136,7 +220,7 @@ integration-heavy tasks stay serial.
136
220
 
137
221
  | Command | Purpose |
138
222
  | --- | --- |
139
- | `/flow-auto <goal>` | Normal end-to-end driver for the authorized lifecycle; stop after planning if implementation was not authorized. |
223
+ | `/flow-auto <goal>` | Normal end-to-end driver; it stops after planning without implementation authority, otherwise loops through every runnable feature and closure without an intermediate handoff. |
140
224
  | `/flow-plan <goal>` | Plan-only/advanced creation, revision, and approval. |
141
225
  | `/flow-run` | Advanced/recovery execution of one approved feature. |
142
226
  | `/flow-review` | Internal/recovery dispatch for a runtime-created reviewer assignment. |
@@ -150,17 +234,29 @@ plan-only, advanced, internal, or recovery controls.
150
234
  Start with `/flow-status`; its next action is durable default workflow
151
235
  direction, not permission to exceed the user's authority. For a first failed
152
236
  review, read detail once before reset because scope-blocker findings refine the
153
- compact default. Environment-sensitive transition guards remain authoritative
154
- when a mutation is attempted. Do not hand-edit
237
+ compact default. Pass the exact retry or dependency-independent choice as
238
+ `nextFeatureId` so reset and run start are atomic; do not reset and then rely on
239
+ default selection. If status is ready with `await-user-direction`, read detail
240
+ once and pass the explicitly authorized retry's exact `featureId` to
241
+ `flow_run_start`; reset is invalid because the failed run was already
242
+ superseded. Environment-sensitive transition guards remain authoritative when a
243
+ mutation is attempted. Do not hand-edit
155
244
  `.flow/session.json` to bypass a gate. If validation, review, locking,
156
245
  fingerprinting, or archive publication fails, follow the focused steps in
157
246
  [troubleshooting](docs/troubleshooting.md).
158
247
 
159
- For an interrupted accepted close, replay the projected `archiveRetry.request`
160
- exactly once. Flow confirms the existing bytes without rewriting Session v5 and
161
- re-confirms archive cleanup. A real archive collision removes the automatic
162
- retry instruction and requires manual inspection; preserve both documents and
163
- do not overwrite, delete, or loop the request.
248
+ For an interrupted accepted close, compact `/flow-status` supplies
249
+ `archiveRetry.request`. Replay that request exactly once before any additional
250
+ or detail recovery read. Flow confirms the existing bytes without rewriting
251
+ Session v5, re-confirms archive cleanup, and returns the existing concise
252
+ `workflowData.delivery`. Reconstruct only the plan-bounded, terminal disposition
253
+ map from its latest `outcomeSummary` and terminal findings. If delivery is absent,
254
+ report the exact recovery and claim no map. On a close revision conflict,
255
+ refresh compact status and retry only after confirming the same session and goal
256
+ and that status still permits the selected
257
+ closure kind; never close a replacement. A real archive collision removes the
258
+ automatic retry instruction and requires manual inspection; preserve both
259
+ documents and do not overwrite, delete, or loop the request.
164
260
 
165
261
  ## Development
166
262