opencode-plugin-flow 4.3.8 → 4.4.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,56 @@
2
2
 
3
3
  One short entry per release, written for users deciding whether to upgrade.
4
4
 
5
+ ## [4.4.0] - 2026-07-17
6
+
7
+ Prompt economy lore makes Flow's instructions smaller, more role-specific, and
8
+ easier to verify without weakening runtime, validation, or review gates:
9
+
10
+ - Public commands and hidden workers now compile role- and phase-specific
11
+ prompts from canonical skill fragments instead of concatenating whole skills
12
+ or maintaining parallel prompt copies in TypeScript.
13
+ - Parallel guidance uses progressive disclosure: a short routing index loads
14
+ decision rules first, manifest and execution rules only after fan-out is
15
+ selected, and synthesis rules only when handoffs return. Serial-decision
16
+ context is about 76% smaller while the complete advanced contract remains
17
+ available.
18
+ - Each hidden worker receives one role contract and one matching handoff schema;
19
+ empty, malformed, partial, and blocked handoffs remain explicit coverage gaps,
20
+ and candidate implementation stays subordinate to the root `flow-run`
21
+ manager.
22
+ - Runtime-unavailable guards, planned review depth, cleanup/UI/audit evidence,
23
+ bounded review repair, and root-manager state ownership are covered across
24
+ the compiled surfaces.
25
+ - Skills no longer estimate context pressure or request host compaction, and
26
+ the experimental compaction hook and environment switch have been removed;
27
+ durable runtime phase boundaries remain the continuation mechanism.
28
+ - New deterministic prompt-quality tooling covers 18 scenarios and 52 static
29
+ criteria, with an opt-in structured model evaluator for GPT-5.4, GPT-5.6 Sol,
30
+ and other configured OpenCode models.
31
+
32
+ ## [4.3.9] - 2026-07-08
33
+
34
+ Candidate accounting coherence lore makes the 4.3.8 orchestration accounting
35
+ rules self-consistent, so valid manager records stop bouncing off the schema:
36
+
37
+ - `decision: "parallel"` on implementation-decision records is now rejected
38
+ with one clear message (it stays valid for discovery, audit, and review
39
+ passes); previously every `candidateDecision` pairing produced contradictory
40
+ errors.
41
+ - Candidate-shaped decisions now require candidate execution evidence on every
42
+ pass kind, so a decision label alone can no longer validate while being
43
+ excluded from `candidatePassCount`.
44
+ - Candidate and verifier worker counts are checked per subtype instead of
45
+ summed, so one worker may fill both roles on a single pass row.
46
+ - Orchestration pass dedup now remembers every recorded pass id in
47
+ `recordedPassIds`, so resubmitted completions no longer double-count
48
+ telemetry after the recent-pass window rolls over.
49
+ - The candidate accounting rules are documented once, in
50
+ `skills/flow/references/parallel-orchestration.md`; the run skill, handoff
51
+ format, and wiki point there instead of restating them, and the two doc
52
+ instructions that contradicted the schema (omitted `decision` on decision
53
+ records, `workerCount=0` with positive `candidateWorkerCount`) are fixed.
54
+
5
55
  ## [4.3.8] - 2026-07-08
6
56
 
7
57
  Parallel orchestration accounting lore makes broad worker use visible without
package/README.md CHANGED
@@ -17,8 +17,8 @@ Full project documentation is available in the
17
17
  ## Quick start
18
18
 
19
19
  ```bash
20
- opencode plugin opencode-plugin-flow@4.3.8 --global --force
21
- npx -y opencode-plugin-flow@4.3.8 sync
20
+ opencode plugin opencode-plugin-flow@4.4.0 --global --force
21
+ npx -y opencode-plugin-flow@4.4.0 sync
22
22
  ```
23
23
 
24
24
  Restart OpenCode, then give Flow a goal:
@@ -71,9 +71,11 @@ completed.
71
71
  | `/flow-review` | Run a read-only review. |
72
72
  | `/flow-status` | Show the active session and next action. |
73
73
 
74
- Commands are bundled entrypoints: they carry their own instructions, so they
75
- keep working even when OpenCode's native skill discovery lags behind a fresh
76
- install (see [docs/troubleshooting.md](docs/troubleshooting.md)).
74
+ Commands are compiled entrypoints: manager commands carry only their applicable
75
+ core instructions, while `/flow-review` runs against the reserved reviewer's
76
+ role-specific agent contract. They keep working even when OpenCode's native
77
+ skill discovery lags behind a fresh install (see
78
+ [docs/troubleshooting.md](docs/troubleshooting.md)).
77
79
 
78
80
  `flow-test`, `flow-deslop`, `flow-ui-quality`, and `flow-commit` are managed
79
81
  helper skills, not public commands.
@@ -114,8 +116,10 @@ The runtime owns only safety; judgment lives in the skills:
114
116
  repair is limited to one repair plus one retry before the feature blocks.
115
117
  - Completed feature counts are telemetry only; Flow does not stop an approved
116
118
  plan just because several features have completed. Review retry boundaries
117
- still return a compact resume packet and require explicit `phaseBoundaryAck`
119
+ still return a bounded resume packet and require explicit `phaseBoundaryAck`
118
120
  before starting the next feature.
121
+ - Skills do not estimate context pressure or request host compaction. Only a
122
+ runtime-issued phase boundary stops the current loop for a fresh invocation.
119
123
  - A session can close as `completed` only after final completion has passed.
120
124
  - Crash recovery is built in: stale session locks expire automatically and
121
125
  unreadable session files are quarantined with recovery guidance, never
@@ -126,7 +130,7 @@ The runtime owns only safety; judgment lives in the skills:
126
130
 
127
131
  ## Hidden workers
128
132
 
129
- For broad work, Flow's manager can fan out read-only workers
133
+ For broad work, Flow's manager can fan out isolated hidden workers
130
134
  (`flow-evidence-worker`, `flow-validation-worker`, `flow-audit-worker`,
131
135
  `flow-candidate-worker`, `flow-verifier-worker`, and the `flow-reviewer`) with
132
136
  locked-down permissions. Workers gather evidence; they never approve plans,
@@ -134,10 +138,22 @@ complete features, or close sessions. Flow reserves those agent ids and the
134
138
  public command ids while the plugin is enabled, and warns if they collide with
135
139
  your own config.
136
140
 
141
+ Each hidden worker receives only its applicable handoff schema. The manager
142
+ contract treats empty or malformed handoffs as coverage gaps instead of
143
+ success. The offline handoff validator detects missing headings, empty sections,
144
+ unresolved placeholders, and invalid statuses; current OpenCode worker output
145
+ remains plain text, so runtime acceptance still depends on the manager applying
146
+ that contract. Inspect rendered surfaces and static contracts with
147
+ `bun run prompt:quality`; run opt-in model decisions with
148
+ `bun run prompt:model-eval -- --model <provider/model> --timeout-ms 300000`;
149
+ see
150
+ [docs/prompt-quality.md](docs/prompt-quality.md).
151
+
137
152
  For broad implementation, the manager records whether work stayed serial,
138
153
  used exact-path candidate workers, used isolated worktrees, ran a tournament, or
139
- skipped candidates. Feature completion can carry compact
140
- `orchestrationPasses`; `flow_status` reports the aggregate under
154
+ skipped eligible candidates. Feature completion can carry bounded
155
+ `orchestrationPasses` with candidate eligibility, decision, and structured
156
+ factors; `flow_status` reports the aggregate under
141
157
  `session.budget.orchestration`.
142
158
 
143
159
  ## Install details, doctor, repair, uninstall
@@ -150,17 +166,9 @@ To update a pinned Flow version, rerun the install command with the new
150
166
  version. To inspect skill health:
151
167
 
152
168
  ```bash
153
- npx -y opencode-plugin-flow@4.3.8 doctor
169
+ npx -y opencode-plugin-flow@4.4.0 doctor
154
170
  ```
155
171
 
156
- ## Experimental: compaction context
157
-
158
- Flow's ambient context uses stable OpenCode configuration by default. If you
159
- want the active session summary injected into OpenCode's session compaction as
160
- well, opt in with the environment variable `FLOW_EXPERIMENTAL_COMPACTION=1`.
161
- This uses OpenCode's experimental compaction hook and may change with OpenCode
162
- versions; the default remains hook-free.
163
-
164
172
  ## Development
165
173
 
166
174
  ```bash
@@ -158,29 +158,47 @@ export declare function createTools(ctx: unknown): {
158
158
  orchestrationPasses: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodObject<{
159
159
  id: import("zod").ZodString;
160
160
  kind: import("zod").ZodEnum<{
161
- discovery: "discovery";
161
+ validation: "validation";
162
162
  audit: "audit";
163
+ candidate: "candidate";
164
+ discovery: "discovery";
163
165
  review: "review";
164
- validation: "validation";
165
166
  verification: "verification";
166
- candidate: "candidate";
167
167
  "implementation-decision": "implementation-decision";
168
168
  }>;
169
169
  decision: import("zod").ZodOptional<import("zod").ZodEnum<{
170
- serial: "serial";
171
170
  parallel: "parallel";
171
+ serial: "serial";
172
172
  "candidate-exact-path": "candidate-exact-path";
173
173
  "candidate-worktree": "candidate-worktree";
174
174
  tournament: "tournament";
175
175
  skipped: "skipped";
176
176
  }>>;
177
177
  decisionReason: import("zod").ZodOptional<import("zod").ZodString>;
178
+ candidateEligibility: import("zod").ZodDefault<import("zod").ZodEnum<{
179
+ eligible: "eligible";
180
+ not_eligible: "not_eligible";
181
+ unknown: "unknown";
182
+ }>>;
183
+ candidateDecision: import("zod").ZodOptional<import("zod").ZodEnum<{
184
+ skipped: "skipped";
185
+ used: "used";
186
+ serial_required: "serial_required";
187
+ }>>;
188
+ decisionFactors: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{
189
+ shared_state: "shared_state";
190
+ overlapping_files: "overlapping_files";
191
+ small_slice: "small_slice";
192
+ needs_manager_judgment: "needs_manager_judgment";
193
+ independent_surface: "independent_surface";
194
+ validation_available: "validation_available";
195
+ }>>>;
178
196
  modes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{
179
- audit: "audit";
180
- review: "review";
181
- validation: "validation";
182
197
  evidence: "evidence";
198
+ validation: "validation";
199
+ audit: "audit";
183
200
  verifier: "verifier";
201
+ review: "review";
184
202
  "candidate-implementation": "candidate-implementation";
185
203
  }>>>;
186
204
  workerCount: import("zod").ZodDefault<import("zod").ZodNumber>;
@@ -206,6 +224,7 @@ export declare function createTools(ctx: unknown): {
206
224
  }>>;
207
225
  outcome: import("zod").ZodDefault<import("zod").ZodEnum<{
208
226
  accepted: "accepted";
227
+ modified: "modified";
209
228
  rejected: "rejected";
210
229
  partial: "partial";
211
230
  "not-covered": "not-covered";
@@ -256,8 +275,10 @@ export declare function createTools(ctx: unknown): {
256
275
  } | undefined;
257
276
  orchestrationPasses?: {
258
277
  id: string;
259
- kind: "discovery" | "audit" | "review" | "validation" | "verification" | "candidate" | "implementation-decision";
260
- modes: ("audit" | "review" | "validation" | "evidence" | "verifier" | "candidate-implementation")[];
278
+ kind: "validation" | "audit" | "candidate" | "discovery" | "review" | "verification" | "implementation-decision";
279
+ candidateEligibility: "eligible" | "not_eligible" | "unknown";
280
+ decisionFactors: ("shared_state" | "overlapping_files" | "small_slice" | "needs_manager_judgment" | "independent_surface" | "validation_available")[];
281
+ modes: ("evidence" | "validation" | "audit" | "verifier" | "review" | "candidate-implementation")[];
261
282
  workerCount: number;
262
283
  candidateWorkerCount: number;
263
284
  verifierWorkerCount: number;
@@ -266,9 +287,10 @@ export declare function createTools(ctx: unknown): {
266
287
  writeScope: "none" | "manager-serial" | "exact-path" | "isolated-worktree" | "mixed";
267
288
  handoffRefs: string[];
268
289
  verificationStatus: "pending" | "passed" | "failed" | "mixed" | "not-needed" | "downgraded";
269
- outcome: "accepted" | "rejected" | "partial" | "not-covered" | "superseded";
270
- decision?: "serial" | "parallel" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
290
+ outcome: "accepted" | "modified" | "rejected" | "partial" | "not-covered" | "superseded";
291
+ decision?: "parallel" | "serial" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
271
292
  decisionReason?: string | undefined;
293
+ candidateDecision?: "skipped" | "used" | "serial_required" | undefined;
272
294
  synthesisRef?: string | undefined;
273
295
  }[] | undefined;
274
296
  }, context: ToolContext): Promise<import("@opencode-ai/plugin").ToolResult>;