opencode-plugin-flow 4.2.1 → 4.3.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 +23 -0
- package/README.md +3 -3
- package/dist/cli.js +291 -392
- package/dist/cli.js.map +3 -3
- package/dist/index.js +292 -399
- package/dist/index.js.map +4 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -84,7 +84,7 @@ Example evidence quality:
|
|
|
84
84
|
|
|
85
85
|
Use this for \`flow-verifier-worker\`. Give it atomic claims and the cited sources
|
|
86
86
|
or commands. Do not include the generator's reasoning unless that reasoning is
|
|
87
|
-
the thing being verified.
|
|
87
|
+
the thing being verified, and do not say which worker produced the claim.
|
|
88
88
|
|
|
89
89
|
\`\`\`markdown
|
|
90
90
|
## Status
|
|
@@ -113,8 +113,8 @@ success | partial | blocked
|
|
|
113
113
|
|
|
114
114
|
## Candidate implementation worker report
|
|
115
115
|
|
|
116
|
-
Use this only
|
|
117
|
-
|
|
116
|
+
Use this only with explicit user authorization, in an isolated worktree or an
|
|
117
|
+
exact non-overlapping path-owned slice assigned by the manager.
|
|
118
118
|
|
|
119
119
|
\`\`\`markdown
|
|
120
120
|
## Status
|
|
@@ -159,76 +159,60 @@ evidence faster than one linear pass. The manager still owns the Flow session:
|
|
|
159
159
|
only the manager calls state-changing Flow tools, approves plans, completes
|
|
160
160
|
features, records reviews, or closes sessions.
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
- \`
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
-
|
|
162
|
+
Every parallel pass runs the same loop:
|
|
163
|
+
|
|
164
|
+
**orient → slice → manifest → fan out → account → verify → synthesize →
|
|
165
|
+
extend or stop.**
|
|
166
|
+
|
|
167
|
+
This file is the whole playbook; read it once and run the pass. Two companions
|
|
168
|
+
stay separate:
|
|
169
|
+
|
|
170
|
+
- \`handoff-format.md\` holds the worker response templates. The manager pastes
|
|
171
|
+
the matching template verbatim into every worker prompt.
|
|
172
|
+
- \`parallel-pass-example.md\` walks one concrete end-to-end pass (synced with
|
|
173
|
+
the \`flow\` skill; not bundled into commands).
|
|
174
|
+
|
|
175
|
+
## Choose a pass
|
|
176
|
+
|
|
177
|
+
| Situation | Flow pass | Output the manager may synthesize |
|
|
178
|
+
| --- | --- | --- |
|
|
179
|
+
| Repo shape is unclear before planning | Discovery pass | Requirements, decisions, targets, validation entries, or a review-first feature |
|
|
180
|
+
| A broad finding set needs refutation | Audit pass | Surviving findings with guards checked and gaps named |
|
|
181
|
+
| Changed files or risk lenses are too broad for one review pass | Review pass | One \`featureReview\` or \`finalReview\` payload owned by the manager |
|
|
182
|
+
| Test strategy or route coverage is unclear | Validation pass | Candidate commands or authorized raw command evidence |
|
|
183
|
+
| A claim is single-source, surprising, high-stakes, or payload-bound | Verification pass | Per-claim keep, narrow, rewrite, or remove decisions |
|
|
184
|
+
| Multiple implementation paths are plausible | Candidate pass | Candidate patches inspected and validated by the manager before use |
|
|
185
|
+
|
|
186
|
+
Pass notes:
|
|
187
|
+
|
|
188
|
+
- **Discovery**: workers read specific modules, routes, docs, commands, or risk
|
|
189
|
+
lenses; only evidenced claims become plan fields.
|
|
190
|
+
- **Audit**: workers actively look for guards, lifecycle resets, deployment
|
|
191
|
+
constraints, and counterexamples before reporting a finding. A finding
|
|
192
|
+
without refutation work stays advisory or becomes a follow-up question.
|
|
193
|
+
- **Review**: workers separate blocking findings from advisory notes; the
|
|
194
|
+
manager resolves conflicts and returns one review payload.
|
|
195
|
+
- **Validation**: workers run only manager-authorized commands and report the
|
|
196
|
+
exact command, status, and raw outcome summary.
|
|
197
|
+
- **Verification**: verifiers judge atomic claims against cited sources or
|
|
198
|
+
commands; do not ask a verifier to redesign the work or review the whole
|
|
199
|
+
feature.
|
|
200
|
+
- **Candidate**: only with explicit user authorization plus isolated worktrees
|
|
201
|
+
or exact non-overlapping path ownership. Patches stay proposals until the
|
|
202
|
+
manager inspects, merges or rejects, and validates.
|
|
203
|
+
|
|
204
|
+
## When to stay serial
|
|
205
|
+
|
|
206
|
+
- One file, command, or design question determines the next step.
|
|
207
|
+
- Slices would share the same contracts, fixtures, or edit targets.
|
|
208
|
+
- The manager can inspect the full scope faster than writing and checking
|
|
207
209
|
worker prompts.
|
|
208
|
-
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
commands, or artifacts to identify real slices.
|
|
215
|
-
3. Define the local manager task. Do not delegate the immediate blocker that
|
|
216
|
-
determines whether fan-out is even valid.
|
|
217
|
-
4. Build the pre-fan-out coverage gate defined in \`verification-gates.md\`
|
|
218
|
-
("Before fan-out"): total scope, one line per slice with expected count,
|
|
219
|
-
partition check, and overlap/gap check.
|
|
220
|
-
5. Spawn only named Flow workers. Use exact slices and the required handoff
|
|
221
|
-
shape. Keep each prompt self-contained.
|
|
222
|
-
6. Continue non-overlapping manager work while workers run.
|
|
223
|
-
7. Read every handoff. Keep only claims that have evidence, match the assigned
|
|
224
|
-
scope, and carry confidence labels.
|
|
225
|
-
8. Send important low-confidence, single-source, contested, or citation-heavy
|
|
226
|
-
claims to \`flow-verifier-worker\`.
|
|
227
|
-
9. Run follow-up passes only for material gaps, conflicts, narrowed scope, or
|
|
228
|
-
verification needs.
|
|
229
|
-
10. Apply the manager synthesis barrier from \`verification-gates.md\`: keep
|
|
230
|
-
only distilled, evidence-backed claims and synthesize one Flow artifact.
|
|
231
|
-
Do not paste worker handoffs as the user-facing result.
|
|
210
|
+
- The result would still need the same manual synthesis with no time saved.
|
|
211
|
+
|
|
212
|
+
Do not fan out to keep agents busy. Every worker should reduce a named
|
|
213
|
+
planning, validation, review, audit, or implementation uncertainty. A normal
|
|
214
|
+
first pass is two to five workers with independent slices; use more only when
|
|
215
|
+
the manifest stays countable and non-overlapping.
|
|
232
216
|
|
|
233
217
|
## Modes
|
|
234
218
|
|
|
@@ -246,20 +230,10 @@ carry the permission boundaries for each mode.
|
|
|
246
230
|
| \`verifier\` | \`flow-verifier-worker\` | Per-claim verdicts against cited evidence or commands | No | \`flow_status\` only if needed |
|
|
247
231
|
| \`candidate-implementation\` | \`flow-candidate-worker\` | Candidate patch summary from an isolated worktree or exact path-owned slice | Only with explicit user authorization plus isolation or exact non-overlapping path ownership | No state-changing Flow tools |
|
|
248
232
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
- Use \`flow-reviewer\` when changed files or risk lenses can be reviewed
|
|
254
|
-
independently before the manager returns one review payload.
|
|
255
|
-
- Use \`flow-validation-worker\` when the manager needs command options or raw
|
|
256
|
-
output from an explicitly authorized command.
|
|
257
|
-
- Use \`flow-audit-worker\` when candidate findings must be refuted before they
|
|
258
|
-
can become a report or follow-up feature.
|
|
259
|
-
- Use \`flow-verifier-worker\` for atomic claims that are contested,
|
|
260
|
-
single-sourced, high-stakes, or destined for a Flow payload.
|
|
261
|
-
- Use \`flow-candidate-worker\` only after explicit user authorization and only
|
|
262
|
-
with an isolated worktree or exact non-overlapping path ownership.
|
|
233
|
+
If the runtime exposes per-worker model or effort choices, spend them where
|
|
234
|
+
being wrong is expensive: read-heavy discovery slices tolerate the cheapest
|
|
235
|
+
configured option, while verifier and review slices deserve the strongest.
|
|
236
|
+
Otherwise route by scope: give weaker slices narrower, more countable scope.
|
|
263
237
|
|
|
264
238
|
## Permission contract
|
|
265
239
|
|
|
@@ -281,27 +255,56 @@ Do not fan out parallel \`flow_plan_save\`, \`flow_plan_approve\`,
|
|
|
281
255
|
\`flow_session_close\` calls. Runtime locking protects files, but Flow accepts only
|
|
282
256
|
one active feature result at a time.
|
|
283
257
|
|
|
284
|
-
## Worker rules
|
|
285
|
-
|
|
286
258
|
Workers may read files, inspect docs, run authorized read-only commands, and
|
|
287
259
|
summarize evidence. Candidate implementation workers may edit only when the
|
|
288
260
|
manager assigned an isolated worktree or exact path ownership that does not
|
|
289
|
-
overlap sibling workers or manager edits.
|
|
261
|
+
overlap sibling workers or manager edits. Workers must not edit \`.flow/**\`,
|
|
262
|
+
must not call state-changing Flow tools, and must not approve work, close
|
|
263
|
+
sessions, record Flow validation, or claim validation they did not run. A
|
|
264
|
+
worker may report raw validation output it actually ran; the manager decides
|
|
265
|
+
whether it is strong enough to record.
|
|
266
|
+
|
|
267
|
+
## Stage 1 — Orient (serial)
|
|
268
|
+
|
|
269
|
+
Call \`flow_status\` if a Flow session may already exist. Read enough files,
|
|
270
|
+
schemas, docs, tests, commands, or artifacts to identify real slices. Keep the
|
|
271
|
+
immediate blocker local: do not delegate the question that determines whether
|
|
272
|
+
fan-out is even valid.
|
|
273
|
+
|
|
274
|
+
## Stage 2 — Slice
|
|
275
|
+
|
|
276
|
+
Split along whichever axis keeps slices independent: modules or path sets,
|
|
277
|
+
route or endpoint groups, risk lenses, command surfaces, data ranges, or claim
|
|
278
|
+
sets. Each slice needs a one-line scope, expected coverage, and a defined
|
|
279
|
+
output the manager can check.
|
|
280
|
+
|
|
281
|
+
## Stage 3 — Manifest (the pre-fan-out coverage gate)
|
|
282
|
+
|
|
283
|
+
Before spawning, write a pass manifest: one row per slice, plus a totals check.
|
|
284
|
+
|
|
285
|
+
| # | Slice scope | Expected coverage | Mode | Verification tier |
|
|
286
|
+
| --- | --- | --- | --- | --- |
|
|
287
|
+
| 1 | \`src/core/**\` plus its tests | 14 files | \`evidence\` | accept locally |
|
|
288
|
+
| 2 | release contract: CI workflows, \`package.json\`, changelog | 6 files | \`evidence\` | verify once |
|
|
290
289
|
|
|
291
|
-
|
|
290
|
+
- Count the total work items when countable: files, modules, routes, commands,
|
|
291
|
+
rows, findings, screenshots, or claims. Confirm slice counts add back to the
|
|
292
|
+
total, with no overlaps, gaps, empty slices, or ambiguous shared contracts.
|
|
293
|
+
- If the scope cannot be counted, state the completeness rule instead, such as
|
|
294
|
+
"all changed files plus callers" or "all public commands plus release docs."
|
|
295
|
+
- Assign each slice's verification tier now (see Stage 6). Deciding where a
|
|
296
|
+
wrong claim is expensive belongs before handoffs arrive, not after.
|
|
297
|
+
- Fix the slice map centrally before spawning if the gate does not reconcile.
|
|
292
298
|
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
- \`flow_run_start\`
|
|
296
|
-
- \`flow_feature_complete\`
|
|
297
|
-
- \`flow_feature_reset\`
|
|
298
|
-
- \`flow_session_close\`
|
|
299
|
+
The manifest is also the accounting contract for the pass: N rows spawned means
|
|
300
|
+
N handoffs collected and checked in Stage 5 before anything is synthesized.
|
|
299
301
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
302
|
+
Write the manifest where it survives the pass: the conversation is enough for a
|
|
303
|
+
single bounded pass, but when a follow-up pass or a session resume is
|
|
304
|
+
plausible, persist it with the synthesis (Stage 7) so the accounting can be
|
|
305
|
+
reconstructed.
|
|
303
306
|
|
|
304
|
-
##
|
|
307
|
+
## Stage 4 — Fan out
|
|
305
308
|
|
|
306
309
|
Every worker prompt includes:
|
|
307
310
|
|
|
@@ -318,43 +321,139 @@ Return only the Flow handoff in this exact shape:
|
|
|
318
321
|
|
|
319
322
|
Hidden workers cannot load skills or read \`handoff-format.md\` themselves. The
|
|
320
323
|
manager copies the matching handoff template into every worker prompt; a bare
|
|
321
|
-
filename reference is not enough.
|
|
324
|
+
filename reference is not enough. Workers also cannot read the conversation, so
|
|
325
|
+
prompts cite file paths — including any synthesis file from an earlier pass —
|
|
326
|
+
instead of restating chat history.
|
|
322
327
|
|
|
323
328
|
For research or current-doc slices, require source checks for versioned or
|
|
324
329
|
time-sensitive facts. For implementation candidates, remind workers that other
|
|
325
330
|
work may be active and that they must not revert unrelated changes.
|
|
326
331
|
|
|
327
|
-
|
|
332
|
+
Continue non-overlapping manager work while workers run.
|
|
333
|
+
|
|
334
|
+
## Stage 5 — Account
|
|
335
|
+
|
|
336
|
+
Check every manifest row off against a returned handoff before synthesis. A
|
|
337
|
+
worker that never returns, errors out, or reports \`partial\` or \`blocked\` is a
|
|
338
|
+
hole in the pass, and synthesizing around it silently drops a slice.
|
|
339
|
+
|
|
340
|
+
Worker failure ladder:
|
|
341
|
+
|
|
342
|
+
1. Re-spawn once with a narrower slice and a note about what the first attempt
|
|
343
|
+
returned.
|
|
344
|
+
2. If it fails again, cover the slice directly in the manager session.
|
|
345
|
+
3. If it stays blocked, carry the slice into the synthesis explicitly as
|
|
346
|
+
not-covered. Never present results as if coverage were complete.
|
|
347
|
+
|
|
348
|
+
## Stage 6 — Verify
|
|
349
|
+
|
|
350
|
+
\`Status: success\` only says the worker believes its slice is done. Accept a
|
|
351
|
+
handoff only after a cheap manager-side pass:
|
|
352
|
+
|
|
353
|
+
- \`Status\` is present and terminal: \`success\`, \`partial\`, or \`blocked\`.
|
|
354
|
+
- Coverage matches the assigned slice, or skips are explicit.
|
|
355
|
+
- Important claims have concrete evidence and confidence tags.
|
|
356
|
+
- Cited paths, commands, screenshots, URLs, or metrics resolve.
|
|
357
|
+
- The evidence supports the claim, not just the topic.
|
|
358
|
+
- Findings stay inside the worker's slice.
|
|
359
|
+
- Headline counts can be recounted or traced.
|
|
360
|
+
- Contradictions between workers are either resolved or explicitly marked as
|
|
361
|
+
contested.
|
|
362
|
+
|
|
363
|
+
Demote, drop, re-task, or verify claims that fail this pass.
|
|
364
|
+
|
|
365
|
+
### Verification tiers
|
|
366
|
+
|
|
367
|
+
One taxonomy decides how much verification a claim gets: the manifest assigns
|
|
368
|
+
a default tier per slice, and this stage applies it per claim. Use the cheapest
|
|
369
|
+
check that matches the risk:
|
|
370
|
+
|
|
371
|
+
- **Accept locally**: low-risk claims with direct evidence that the manager can
|
|
372
|
+
cheaply inspect or recount.
|
|
373
|
+
- **Verify once** with \`flow-verifier-worker\`: single-source, surprising,
|
|
374
|
+
inferred, low-confidence, citation-heavy, contested, or Flow-payload-bound
|
|
375
|
+
claims, including any count, benchmark, command result, or pass/fail claim a
|
|
376
|
+
Flow payload will rely on.
|
|
377
|
+
- **Verify strongly**: blocking or release-sensitive claims and claims that
|
|
378
|
+
affect user data, security, persistence, permissions, public API behavior,
|
|
379
|
+
release behavior, or data loss. Use independent verifier checks, manager-run
|
|
380
|
+
commands, or direct artifact inspection strong enough to settle the claim.
|
|
381
|
+
- **Do not accept**: claims without concrete evidence, claims outside the
|
|
382
|
+
assigned slice, claims contradicted by inspected artifacts, or claims where
|
|
383
|
+
the cited evidence supports only the topic rather than the assertion.
|
|
384
|
+
|
|
385
|
+
Verifier prompts use stable claim ids, one atomic assertion per id, the cited
|
|
386
|
+
source or command for each id, and the exact acceptance question. Do not
|
|
387
|
+
include the generator's reasoning unless that reasoning is the thing being
|
|
388
|
+
verified, do not say which worker produced the claim, and do not ask a
|
|
389
|
+
verifier to redesign the work or review the whole feature.
|
|
390
|
+
|
|
391
|
+
## Stage 7 — Synthesize
|
|
392
|
+
|
|
393
|
+
Apply the manager synthesis barrier before presenting or recording anything:
|
|
394
|
+
|
|
395
|
+
- Preserve confidence: verified, single-sourced, inferred, and unresolved claims
|
|
396
|
+
stay distinct when it matters.
|
|
397
|
+
- When workers disagree, inspect the cited artifact or rerun the cited command
|
|
398
|
+
instead of arbitrating from summaries. Do not average conflicting claims.
|
|
399
|
+
- Run the strongest practical local check for the deliverable.
|
|
400
|
+
- Re-read critical files or docs that will be cited in the final decision.
|
|
401
|
+
- Move only distilled, evidence-backed claims forward; raw handoffs remain
|
|
402
|
+
candidate evidence, not a plan, review, completion payload, or final answer.
|
|
403
|
+
- Record gaps honestly instead of converting missing evidence into success
|
|
404
|
+
language.
|
|
405
|
+
|
|
406
|
+
Where accepted evidence goes:
|
|
328
407
|
|
|
329
408
|
- Planning evidence becomes \`requirements\`, \`decisions\`, feature \`targets\`,
|
|
330
|
-
feature \`validation\`, or plan notes
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
- Validation evidence may become \`validationRun\` only when the
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
409
|
+
feature \`validation\`, or plan notes — only when the source and scope are
|
|
410
|
+
clear. Unverified broad findings become a review-first feature, not a fix
|
|
411
|
+
plan.
|
|
412
|
+
- Validation evidence may become \`validationRun\` only when the worker was
|
|
413
|
+
explicitly authorized to run the command and reported the exact command,
|
|
414
|
+
status, and raw outcome summary.
|
|
415
|
+
- Review evidence informs \`featureReview\` or \`finalReview\`, but the manager
|
|
416
|
+
owns the pass/fail verdict and must resolve blockers, contradictions, and
|
|
417
|
+
coverage gaps before returning the payload.
|
|
418
|
+
- Audit evidence becomes findings only after refutation; blocking findings need
|
|
419
|
+
guards checked, deployment context, and evidence that the current code
|
|
420
|
+
exhibits the behavior.
|
|
421
|
+
- Candidate patches are not Flow evidence until the manager inspects, merges or
|
|
422
|
+
rejects them, and validates the main Flow-managed workspace.
|
|
423
|
+
|
|
424
|
+
Persist the manifest and the synthesis when another pass may follow or the
|
|
425
|
+
session is long enough to be compacted or resumed: write the distilled result —
|
|
426
|
+
the accounted manifest, accepted claims with evidence and confidence, dropped
|
|
427
|
+
claims with one-line reasons, and open gaps — into plan prose fields or a
|
|
428
|
+
manager-owned scratch file outside both \`.flow/**\` and the repository worktree,
|
|
429
|
+
such as a file in the OS temporary directory. The runtime owns the \`.flow/**\`
|
|
430
|
+
layout, and scratch files left in the worktree end up staged or reviewed as if
|
|
431
|
+
they were project changes. Follow-up worker prompts cite that path; files are
|
|
432
|
+
the only shared memory between passes.
|
|
433
|
+
|
|
434
|
+
## Stage 8 — Extend or stop
|
|
435
|
+
|
|
436
|
+
Stop after a pass when:
|
|
437
|
+
|
|
438
|
+
- the manifest's coverage rule is satisfied and every row is accounted for.
|
|
439
|
+
- accepted claims are evidenced, scoped, and confidence-labeled.
|
|
440
|
+
- material single-source, contested, high-stakes, or payload-bound claims have
|
|
441
|
+
been verified or downgraded.
|
|
442
|
+
- remaining gaps are explicit and do not block the Flow artifact being produced.
|
|
443
|
+
|
|
444
|
+
Start a bounded follow-up pass only when:
|
|
445
|
+
|
|
446
|
+
- the original slice map missed material scope.
|
|
447
|
+
- workers disagree on a claim that affects the Flow decision.
|
|
448
|
+
- a high-stakes or payload-bound claim needs verification.
|
|
449
|
+
- a first pass exposes a narrower implementation or validation slice worth
|
|
450
|
+
isolating.
|
|
451
|
+
|
|
452
|
+
Run at most one routine follow-up pass. Extra passes need an explicit manager
|
|
453
|
+
reason, such as a high-stakes verifier check or a newly discovered bounded
|
|
454
|
+
slice. Do not recurse by default: if a worker says it needs another worker, the
|
|
455
|
+
manager decides whether that is a follow-up pass and writes the next bounded
|
|
456
|
+
prompt, starting again from the manifest.
|
|
358
457
|
`;
|
|
359
458
|
|
|
360
459
|
// skills/flow/references/parallel-pass-example.md
|
|
@@ -372,11 +471,14 @@ twelve API route modules, one shared error middleware, and an integration test
|
|
|
372
471
|
directory. The manager keeps the middleware local because it is one file and
|
|
373
472
|
anchors every other judgment.
|
|
374
473
|
|
|
375
|
-
|
|
474
|
+
Pass manifest: twelve countable route modules remain after the local check, and
|
|
475
|
+
4 + 3 + 5 adds back to 12 with no overlaps or gaps.
|
|
376
476
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
477
|
+
| # | Slice scope | Expected coverage | Mode | Verification tier |
|
|
478
|
+
| --- | --- | --- | --- | --- |
|
|
479
|
+
| A | auth and account routes | 4/12 modules | \`evidence\` | accept locally |
|
|
480
|
+
| B | billing and subscription routes | 3/12 modules | \`review\` | verify once |
|
|
481
|
+
| C | remaining content and admin routes | 5/12 modules | \`audit\` | verify once |
|
|
380
482
|
|
|
381
483
|
Worker prompts:
|
|
382
484
|
|
|
@@ -413,6 +515,11 @@ Return only the Flow handoff in this exact shape:
|
|
|
413
515
|
<matching handoff template copied verbatim from handoff-format.md>
|
|
414
516
|
\`\`\`
|
|
415
517
|
|
|
518
|
+
Accounting: three manifest rows spawned means three handoffs collected before
|
|
519
|
+
synthesis. If slice B returned \`partial\`, the manager would re-spawn it once
|
|
520
|
+
with a narrower scope, then cover it directly, and as a last resort carry it
|
|
521
|
+
into the synthesis explicitly as not-covered.
|
|
522
|
+
|
|
416
523
|
Handoff checks: the manager accepts only reports with terminal status, matching
|
|
417
524
|
coverage counts, concrete file:line evidence, confidence tags, and claims inside
|
|
418
525
|
the assigned slice. A claim such as \`[high] billing routes bypass the error
|
|
@@ -431,222 +538,11 @@ a plan decision, review payload, or docs patch. Raw handoffs and unverified
|
|
|
431
538
|
suggestions do not move into the next pass or user-facing answer.
|
|
432
539
|
`;
|
|
433
540
|
|
|
434
|
-
// skills/flow/references/parallel-pass-patterns.md
|
|
435
|
-
var parallel_pass_patterns_default = `# Parallel pass patterns
|
|
436
|
-
|
|
437
|
-
Flow uses parallel workers to reduce uncertainty, not to delegate decisions.
|
|
438
|
-
Each pass has a bounded purpose, an explicit coverage rule, and one
|
|
439
|
-
manager-owned synthesis result.
|
|
440
|
-
|
|
441
|
-
## Choose a pass
|
|
442
|
-
|
|
443
|
-
| Situation | Flow pass | Output the manager may synthesize |
|
|
444
|
-
| --- | --- | --- |
|
|
445
|
-
| Repo shape is unclear before planning | Discovery pass | Requirements, decisions, targets, validation entries, or a review-first feature |
|
|
446
|
-
| A broad finding set needs refutation | Audit pass | Surviving findings with guards checked and gaps named |
|
|
447
|
-
| Changed files or risk lenses are too broad for one review pass | Review pass | One \`featureReview\` or \`finalReview\` payload owned by the manager |
|
|
448
|
-
| Test strategy or route coverage is unclear | Validation pass | Candidate commands or authorized raw command evidence |
|
|
449
|
-
| A claim is single-source, surprising, high-stakes, or payload-bound | Verification pass | Per-claim keep, narrow, rewrite, or remove decisions |
|
|
450
|
-
| Multiple implementation paths are plausible | Candidate pass | Candidate patches inspected and validated by the manager before use |
|
|
451
|
-
|
|
452
|
-
Prefer serial work when one file, command, or design question determines the
|
|
453
|
-
next step. A parallel pass should reduce a named planning, validation, review,
|
|
454
|
-
audit, or implementation uncertainty.
|
|
455
|
-
|
|
456
|
-
## Pass Shapes
|
|
457
|
-
|
|
458
|
-
### Discovery pass
|
|
459
|
-
|
|
460
|
-
Use before planning when the manager has oriented enough to name disjoint slices
|
|
461
|
-
but not enough to write reliable plan fields. Workers read specific modules,
|
|
462
|
-
routes, docs, commands, or risk lenses. The manager turns only evidenced claims
|
|
463
|
-
into plan fields.
|
|
464
|
-
|
|
465
|
-
### Audit pass
|
|
466
|
-
|
|
467
|
-
Use when a report starts from candidate findings. Workers actively look for
|
|
468
|
-
guards, lifecycle resets, deployment constraints, and counterexamples before
|
|
469
|
-
reporting a finding. A finding that lacks refutation work stays advisory or
|
|
470
|
-
becomes a follow-up question.
|
|
471
|
-
|
|
472
|
-
### Review pass
|
|
473
|
-
|
|
474
|
-
Use when changed files or risks can be reviewed independently. Review workers
|
|
475
|
-
separate blocking findings from advisory notes. The manager resolves conflicts,
|
|
476
|
-
checks cited artifacts, and returns one review payload.
|
|
477
|
-
|
|
478
|
-
### Validation pass
|
|
479
|
-
|
|
480
|
-
Use when coverage is unclear or command evidence can be gathered independently.
|
|
481
|
-
Validation workers may run only manager-authorized commands and must report
|
|
482
|
-
exact command, status, raw outcome summary, coverage, confidence, and gaps.
|
|
483
|
-
|
|
484
|
-
### Verification pass
|
|
485
|
-
|
|
486
|
-
Use for atomic claims. Give the verifier claim ids, cited sources or commands,
|
|
487
|
-
and the acceptance question. Do not ask a verifier to redesign the work or
|
|
488
|
-
review the whole feature.
|
|
489
|
-
|
|
490
|
-
### Candidate pass
|
|
491
|
-
|
|
492
|
-
Use only with explicit user authorization plus isolated worktrees or exact
|
|
493
|
-
non-overlapping path ownership. Candidate patches are proposals until the
|
|
494
|
-
manager inspects, merges or rejects them, and validates the main workspace.
|
|
495
|
-
|
|
496
|
-
## Effort Defaults
|
|
497
|
-
|
|
498
|
-
- Start with two to five workers. Use more only when the coverage gate is
|
|
499
|
-
countable and the manager can verify every handoff.
|
|
500
|
-
- Run at most one routine follow-up pass. Extra passes need a stated reason,
|
|
501
|
-
such as a high-stakes verification check or a newly discovered bounded slice.
|
|
502
|
-
- Spend effort where being wrong costs more: public API, persistence, security,
|
|
503
|
-
permissions, release behavior, data loss, and Flow payload claims.
|
|
504
|
-
- Do not fan out to keep agents busy. Worker setup and synthesis have real cost.
|
|
505
|
-
|
|
506
|
-
## Stop And Extend
|
|
507
|
-
|
|
508
|
-
Stop after a pass when:
|
|
509
|
-
|
|
510
|
-
- the coverage rule is satisfied.
|
|
511
|
-
- accepted claims are evidenced, scoped, and confidence-labeled.
|
|
512
|
-
- material single-source, contested, high-stakes, or payload-bound claims have
|
|
513
|
-
been verified or downgraded.
|
|
514
|
-
- remaining gaps are explicit and do not block the Flow artifact being produced.
|
|
515
|
-
|
|
516
|
-
Start a bounded follow-up pass only when:
|
|
517
|
-
|
|
518
|
-
- the original slice map missed material scope.
|
|
519
|
-
- workers disagree on a claim that affects the Flow decision.
|
|
520
|
-
- a high-stakes or payload-bound claim needs verification.
|
|
521
|
-
- a first pass exposes a narrower implementation or validation slice worth
|
|
522
|
-
isolating.
|
|
523
|
-
|
|
524
|
-
After every pass, the manager synthesis barrier from \`verification-gates.md\`
|
|
525
|
-
applies before any handoff content moves forward.
|
|
526
|
-
`;
|
|
527
|
-
|
|
528
541
|
// skills/flow/references/recovery-playbook.md
|
|
529
542
|
var recovery_playbook_default = '# Recovery playbook\n\nUse this when a Flow tool returns `status: "error"`, a blocker, or a `nextAction` that conflicts with memory.\n\n## First response\n\n1. Re-anchor with `flow_status`.\n2. Read the returned `summary`, `recovery`, `lastError`, and active feature.\n3. Fix the cause, then retry the smallest valid Flow action.\n\n## Common cases\n\n- `missing_session`: start with `flow_plan_save` using the user\'s goal.\n- `missing_goal`: ask for a concrete goal before planning.\n- `Approved plans cannot be changed`: use `flow_feature_reset` when only affected features need another pass; otherwise close and start a new goal.\n- `No feature is currently running`: call `flow_run_start` before completing.\n- `already in progress`: finish, reset, or block the active feature before starting another.\n- `Completion requires recorded validation evidence`: run real validation and include at least one passing `validationRun`.\n- `Completion requires all recorded validation to pass`: fix failures and rerun. Do not relabel failed checks as passed.\n- `Non-final feature completion requires targeted validation`: use `validationScope: "targeted"` for ordinary features.\n- `Final feature completion requires broad validation`: run the project-level gate and use `validationScope: "broad"`.\n- `Completion requires a passing featureReview`: run or request a real review and include a passing `featureReview` only when there are no blocking findings.\n- `Final feature completion requires a finalReview`: perform final review and include `finalReview`.\n- `Final review depth must match the plan policy`: use `reviewDepth` equal to the approved plan\'s `finalReviewPolicy`; valid final-review values are `broad` and `detailed`.\n- `Cannot close ... unfinished features`: complete, reset, defer, or abandon honestly. Do not mark completed while work remains.\n\n## Reset guidance\n\nUse `flow_feature_reset` when the active or completed work was built on the wrong assumption, validation revealed a design issue, dependencies need to be rerun, or dependent features must be invalidated. Resetting a feature also resets its dependents.\n\n## Closure guidance\n\nUse `flow_session_close`:\n\n- `completed`: only after all planned features are complete.\n- `deferred`: the user intentionally postpones unfinished work.\n- `abandoned`: the session should be archived without claiming delivery.\n\nAfter closure, the active `.flow/session.json` is removed and the archived JSON is stored under `.flow/history/`.\n';
|
|
530
543
|
|
|
531
|
-
// skills/flow/references/verification-gates.md
|
|
532
|
-
var verification_gates_default = `# Verification gates
|
|
533
|
-
|
|
534
|
-
Verification is how Flow keeps parallel work from turning into parallel
|
|
535
|
-
guesswork. Worker handoffs are candidate evidence; the manager decides what can
|
|
536
|
-
enter the plan, validation record, review payload, audit report, or final
|
|
537
|
-
answer.
|
|
538
|
-
|
|
539
|
-
Sections: before fan-out, every handoff, verifier triggers, verification tiers,
|
|
540
|
-
Flow payload acceptance, and manager synthesis barrier.
|
|
541
|
-
|
|
542
|
-
## Before fan-out
|
|
543
|
-
|
|
544
|
-
Run a pre-fan-out gate after serial orientation and before spawning workers:
|
|
545
|
-
|
|
546
|
-
- Count the total work items when countable: files, modules, routes, commands,
|
|
547
|
-
rows, findings, screenshots, or claims.
|
|
548
|
-
- List every slice with path/range/lens and expected count.
|
|
549
|
-
- Check that countable slices add back to the total.
|
|
550
|
-
- Check for overlapping ownership, missing areas, empty slices, and ambiguous
|
|
551
|
-
shared contracts.
|
|
552
|
-
- Fix the slice map centrally before spawning if the gate does not reconcile.
|
|
553
|
-
|
|
554
|
-
If the scope cannot be counted, state the completeness rule instead, such as
|
|
555
|
-
"all changed files plus callers" or "all public commands plus release docs."
|
|
556
|
-
|
|
557
|
-
## Every handoff
|
|
558
|
-
|
|
559
|
-
Accept a handoff only after a cheap manager-side pass:
|
|
560
|
-
|
|
561
|
-
- \`Status\` is terminal: \`success\`, \`partial\`, or \`blocked\`.
|
|
562
|
-
- Coverage matches the assigned slice, or skips are explicit.
|
|
563
|
-
- Important claims have concrete evidence and confidence tags.
|
|
564
|
-
- Cited paths, commands, screenshots, URLs, or metrics resolve.
|
|
565
|
-
- The evidence supports the claim, not just the topic.
|
|
566
|
-
- Findings stay inside the worker's slice.
|
|
567
|
-
- Headline counts can be recounted or traced.
|
|
568
|
-
- Contradictions between workers are either resolved or explicitly marked as
|
|
569
|
-
contested.
|
|
570
|
-
|
|
571
|
-
Demote, drop, re-task, or verify claims that fail this pass.
|
|
572
|
-
|
|
573
|
-
## Verifier triggers
|
|
574
|
-
|
|
575
|
-
Use \`flow-verifier-worker\` when a claim is:
|
|
576
|
-
|
|
577
|
-
- blocking or release-sensitive.
|
|
578
|
-
- high-stakes for user data, security, persistence, permissions, or public API
|
|
579
|
-
behavior.
|
|
580
|
-
- low-confidence, inferred, surprising, or single-sourced.
|
|
581
|
-
- citation-heavy enough that source drift would change the conclusion.
|
|
582
|
-
- contradicted by another worker or by manager inspection.
|
|
583
|
-
- a count, benchmark, command result, or pass/fail claim that a Flow payload will
|
|
584
|
-
rely on.
|
|
585
|
-
|
|
586
|
-
Give the verifier atomic claims, cited sources or commands, and the acceptance
|
|
587
|
-
question. Do not ask it to redesign the work or review the whole feature.
|
|
588
|
-
|
|
589
|
-
## Verification tiers
|
|
590
|
-
|
|
591
|
-
Use the cheapest check that matches the risk:
|
|
592
|
-
|
|
593
|
-
- **Accept locally**: low-risk claims with direct evidence that the manager can
|
|
594
|
-
cheaply inspect or recount.
|
|
595
|
-
- **Verify once**: single-source, surprising, inferred, citation-heavy, or
|
|
596
|
-
Flow-payload-bound claims.
|
|
597
|
-
- **Verify strongly**: claims that affect security, persistence, permissions,
|
|
598
|
-
public API behavior, release behavior, data loss, or blocking review outcome.
|
|
599
|
-
Use independent verifier checks, manager-run commands, or direct artifact
|
|
600
|
-
inspection strong enough to settle the claim.
|
|
601
|
-
- **Do not accept**: claims without concrete evidence, claims outside the
|
|
602
|
-
assigned slice, claims contradicted by inspected artifacts, or claims where the
|
|
603
|
-
cited evidence supports only the topic rather than the assertion.
|
|
604
|
-
|
|
605
|
-
Verifier prompts should use stable claim ids, one atomic assertion per id, the
|
|
606
|
-
cited source or command for each id, and the exact acceptance question.
|
|
607
|
-
|
|
608
|
-
## Flow payload acceptance
|
|
609
|
-
|
|
610
|
-
Planning fields may use worker evidence only when the source and scope are clear.
|
|
611
|
-
Unverified broad findings should become a review-first feature, not a fix plan.
|
|
612
|
-
|
|
613
|
-
\`validationRun\` entries may use worker-reported commands only when the worker
|
|
614
|
-
was explicitly authorized to run the command and reported the exact command,
|
|
615
|
-
status, and raw outcome summary.
|
|
616
|
-
|
|
617
|
-
\`featureReview\` and \`finalReview\` may use worker review slices, but the manager
|
|
618
|
-
owns the pass/fail decision and must resolve blockers, contradictions, and
|
|
619
|
-
coverage gaps before returning the payload.
|
|
620
|
-
|
|
621
|
-
Audit reports may include only findings that survived refutation. Blocking audit
|
|
622
|
-
findings need guards checked, deployment context, and evidence that the current
|
|
623
|
-
code exhibits the behavior.
|
|
624
|
-
|
|
625
|
-
Candidate implementation patches are not Flow evidence until the manager
|
|
626
|
-
inspects, merges or rejects them, and runs suitable validation in the main
|
|
627
|
-
Flow-managed workspace.
|
|
628
|
-
|
|
629
|
-
## Manager synthesis barrier
|
|
630
|
-
|
|
631
|
-
Before presenting or recording the result:
|
|
632
|
-
|
|
633
|
-
- Preserve confidence: verified, single-sourced, inferred, and unresolved claims
|
|
634
|
-
stay distinct when it matters.
|
|
635
|
-
- When workers disagree, inspect the cited artifact or rerun the cited command
|
|
636
|
-
instead of arbitrating from summaries.
|
|
637
|
-
- Run the strongest practical local check for the deliverable.
|
|
638
|
-
- Re-read critical files or docs that will be cited in the final decision.
|
|
639
|
-
- Move only distilled, evidence-backed claims forward; raw handoffs remain
|
|
640
|
-
candidate evidence, not a plan, review, completion payload, or final answer.
|
|
641
|
-
- Record gaps honestly instead of converting missing evidence into success
|
|
642
|
-
language.
|
|
643
|
-
|
|
644
|
-
\`Status: success\` only says the worker believes its slice is done. The manager
|
|
645
|
-
still checks coverage and evidence before trusting the result.
|
|
646
|
-
`;
|
|
647
|
-
|
|
648
544
|
// skills/flow/SKILL.md
|
|
649
|
-
var SKILL_default = "---\nname: flow\ndescription: Manage the end-to-end Flow loop for skills-first OpenCode work. Use when a user asks for Flow-guided delivery from goal to completion, resumable autonomous delivery, or resuming or closing a Flow session. For plan-only work use flow-plan; for executing one approved feature use flow-run.\n---\n\n# Flow\n\nUse Flow as a minimal state ledger, not as a framework. Skills provide judgment; the runtime only records the approved plan, active feature, validation evidence, review evidence, and closure.\n\nRouting: this manager skill owns the whole loop and every state-changing `flow_*` call. Load `flow-plan` alone for plan-only requests and `flow-run` alone when an approved plan needs one feature executed. Answer status-only questions with `flow_status`; no skill load is needed. `flow-test`, `flow-deslop`, and `flow-ui-quality` are optional helpers loaded from inside the loop; `flow-commit` is user-triggered only and never part of the autonomous loop.\n\n## Loop\n\n1. Call `flow_status` first. Trust its active session and next action over conversation memory.\n If the result includes `setup.skills`, follow the Skill Availability rules\n below before loading any Flow skill.\n2. If there is no active session and the user gave a goal, load `flow-plan`, save a plan with `flow_plan_save`, then approve it with `flow_plan_approve` only after explicit user approval or prior authorization for autonomous implementation. If there is no goal, ask for one.\n3. Load `flow-run`, call `flow_run_start`, implement exactly one feature, validate it, and prepare a `flow_feature_complete` payload. For validation-heavy, regression-sensitive, browser QA, route QA, or failure-prone work, use `flow-test` to choose and summarize evidence before completion.\n4. Load `flow-review` for the required feature review. The reviewer reports a `featureReview` payload; the manager records it inside `flow_feature_complete`.\n5. On the final feature, run broad validation and include `finalReview` in the same `flow_feature_complete` call. Its `reviewDepth` must match the plan's `finalReviewPolicy`.\n6. After all features are complete, archive the session with `flow_session_close` using `kind: \"completed\"`.\n\nUse `references/parallel-orchestration.md` for broad read-only discovery, audit, validation, review, verification, or candidate implementation passes.
|
|
545
|
+
var SKILL_default = "---\nname: flow\ndescription: Manage the end-to-end Flow loop for skills-first OpenCode work. Use when a user asks for Flow-guided delivery from goal to completion, resumable autonomous delivery, or resuming or closing a Flow session. For plan-only work use flow-plan; for executing one approved feature use flow-run.\n---\n\n# Flow\n\nUse Flow as a minimal state ledger, not as a framework. Skills provide judgment; the runtime only records the approved plan, active feature, validation evidence, review evidence, and closure.\n\nRouting: this manager skill owns the whole loop and every state-changing `flow_*` call. Load `flow-plan` alone for plan-only requests and `flow-run` alone when an approved plan needs one feature executed. Answer status-only questions with `flow_status`; no skill load is needed. `flow-test`, `flow-deslop`, and `flow-ui-quality` are optional helpers loaded from inside the loop; `flow-commit` is user-triggered only and never part of the autonomous loop.\n\n## Loop\n\n1. Call `flow_status` first. Trust its active session and next action over conversation memory.\n If the result includes `setup.skills`, follow the Skill Availability rules\n below before loading any Flow skill.\n2. If there is no active session and the user gave a goal, load `flow-plan`, save a plan with `flow_plan_save`, then approve it with `flow_plan_approve` only after explicit user approval or prior authorization for autonomous implementation. If there is no goal, ask for one.\n3. Load `flow-run`, call `flow_run_start`, implement exactly one feature, validate it, and prepare a `flow_feature_complete` payload. For validation-heavy, regression-sensitive, browser QA, route QA, or failure-prone work, use `flow-test` to choose and summarize evidence before completion.\n4. Load `flow-review` for the required feature review. The reviewer reports a `featureReview` payload; the manager records it inside `flow_feature_complete`.\n5. On the final feature, run broad validation and include `finalReview` in the same `flow_feature_complete` call. Its `reviewDepth` must match the plan's `finalReviewPolicy`.\n6. After all features are complete, archive the session with `flow_session_close` using `kind: \"completed\"`.\n\nUse `references/parallel-orchestration.md` for broad read-only discovery, audit, validation, review, verification, or candidate implementation passes. It is the whole pass playbook — orient, slice, manifest, fan out, account, verify, synthesize, extend or stop — and its `references/handoff-format.md` companion holds the worker report templates the manager pastes into prompts. Hidden Flow workers are injected by plugin config; invoke the named worker when it is available. The manager owns every `flow_*` state change.\n\nDo not commit, push, amend, rebase, publish, or mutate releases during the\nautonomous Flow loop. Load `flow-commit` only when the user explicitly asks for\ncommit preparation or commit creation.\n\n## Skill Availability\n\nIf `flow_status` returns `setup.skills`, report that setup status and stop\nnative-loading Flow skills in the current OpenCode startup. Missing, incomplete,\nor outdated managed skills require a sync/restart cycle before their native skill\ninstructions can be trusted by the running process. Public command bundles are\nself-contained and may continue when the command prompt already embeds the\nrequired Flow instructions.\n\nIf optional helper skills such as `flow-test`, `flow-deslop`, or\n`flow-ui-quality` are unavailable, continue only with explicit coverage gaps. Do\nnot copy their rubrics into another skill and do not claim their quality checks\nwere completed.\n\n## Runtime Surface\n\n- `flow_status`: read the active session.\n- `flow_plan_save`: create a session and/or save a draft plan.\n- `flow_plan_approve`: lock the draft plan.\n- `flow_run_start`: start one runnable feature.\n- `flow_feature_complete`: record completion or a real blocker with validation and review evidence.\n- `flow_feature_reset`: reset one feature and its dependents.\n- `flow_session_close`: archive the active session as `completed`, `deferred`, or `abandoned`.\n\nThere is no `flow_context`, no separate review-record tool, and no multi-session activation surface. The single active source of truth is `.flow/session.json`; closed sessions are archived under `.flow/history/`.\n\nPlanning and running require loaded Flow tools; do not simulate plan approval or feature completion when the runtime is unavailable. Review may still return advisory output when tools, skills, or references are stale or unavailable, but the manager must not record it as Flow-gated evidence.\n\n## Hard Gates\n\n- Approved plans are immutable. To change direction, reset affected features or close the session and start a new goal.\n- Only one feature can be active at a time.\n- Completion requires at least one passing `validationRun` entry.\n- Non-final completion requires `validationScope: \"targeted\"`.\n- Final completion requires `validationScope: \"broad\"` and a passing `finalReview`.\n- Every completed feature requires a passing `featureReview` with no blocking findings.\n- `flow_session_close` accepts `kind: \"completed\"` only after an approved plan has passed final completion.\n\n## Recovery\n\n- Confused state: call `flow_status` and follow `nextAction`.\n- Wrong assumption or failed implementation path: use `flow_feature_reset` for the feature and dependents, then rerun from the corrected plan.\n- Missing validation or review evidence: gather real evidence, then call `flow_feature_complete`.\n- Approved plan is materially wrong: reset the affected features, save a revised plan if the session is back in planning; otherwise close and start a new goal.\n- Unknown runtime error: read `summary` and `recovery`; see `references/recovery-playbook.md` for common cases.\n\nNever fabricate validation output, backfill review approval you did not perform, or close as `deferred`/`abandoned` merely to avoid an unfinished-work blocker.\n";
|
|
650
546
|
|
|
651
547
|
// skills/flow-commit/SKILL.md
|
|
652
548
|
var SKILL_default2 = `---
|
|
@@ -896,7 +792,7 @@ var parallel_discovery_default = `# Parallel discovery
|
|
|
896
792
|
Use this only after a serial orientation pass has identified the repo shape and the likely slices. Workers are read-only evidence gatherers; the planner owns the plan.
|
|
897
793
|
|
|
898
794
|
For broad parallel passes, also load \`../../flow/references/parallel-orchestration.md\`.
|
|
899
|
-
Use its pre-fan-out coverage gate and
|
|
795
|
+
Use its pass manifest as the pre-fan-out coverage gate and
|
|
900
796
|
\`../../flow/references/handoff-format.md\` response shapes.
|
|
901
797
|
|
|
902
798
|
## Good slices
|
|
@@ -917,35 +813,21 @@ config, and docs. Name each slice by the paths it owns, for example "runtime:
|
|
|
917
813
|
|
|
918
814
|
Treat derived slices as starting points, not a simultaneous coverage map.
|
|
919
815
|
Before fan-out, choose the relevant entries and de-overlap shared docs,
|
|
920
|
-
config, or release surfaces in the
|
|
816
|
+
config, or release surfaces in the pass manifest.
|
|
921
817
|
|
|
922
|
-
##
|
|
818
|
+
## Manifest and prompts
|
|
923
819
|
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
820
|
+
Write the pass manifest and the worker prompts exactly as Stages 3 and 4 of
|
|
821
|
+
\`../../flow/references/parallel-orchestration.md\` define them: one manifest row
|
|
822
|
+
per slice with expected coverage and a verification tier, and a self-contained
|
|
823
|
+
prompt per worker naming the mode (usually \`evidence\`), the exact slice, and
|
|
824
|
+
the expected coverage. Discovery-specific rules:
|
|
928
825
|
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
<matching handoff template copied verbatim from handoff-format.md>
|
|
935
|
-
\`\`\`
|
|
936
|
-
|
|
937
|
-
For validation-oriented discovery:
|
|
938
|
-
|
|
939
|
-
\`\`\`text
|
|
940
|
-
Inspect <slice> for validation risk. Read-only. Do not edit files or call
|
|
941
|
-
state-changing Flow tools. You may report commands that should be run, and
|
|
942
|
-
include raw output only for commands you actually ran. Return only the Flow
|
|
943
|
-
handoff in this exact shape:
|
|
944
|
-
<matching handoff template copied verbatim from handoff-format.md>
|
|
945
|
-
\`\`\`
|
|
946
|
-
|
|
947
|
-
Workers cannot read reference files themselves; paste the matching handoff
|
|
948
|
-
template from \`../../flow/references/handoff-format.md\` into the prompt.
|
|
826
|
+
- Workers are read-only. For validation-oriented discovery, workers may report
|
|
827
|
+
commands that should be run, and include raw output only for commands they
|
|
828
|
+
actually ran.
|
|
829
|
+
- Workers cannot read reference files themselves; paste the matching handoff
|
|
830
|
+
template from \`../../flow/references/handoff-format.md\` into the prompt.
|
|
949
831
|
|
|
950
832
|
## Synthesis
|
|
951
833
|
|
|
@@ -959,8 +841,8 @@ Convert only evidence-backed work into plan fields:
|
|
|
959
841
|
If workers disagree, inspect the source artifact yourself. If a candidate finding lacks a concrete citation or refutation pass, make it a review-first deliverable rather than a fix feature.
|
|
960
842
|
|
|
961
843
|
Apply the manager synthesis barrier from
|
|
962
|
-
\`../../flow/references/
|
|
963
|
-
claims become plan fields.
|
|
844
|
+
\`../../flow/references/parallel-orchestration.md\`: only distilled,
|
|
845
|
+
evidence-backed claims become plan fields.
|
|
964
846
|
`;
|
|
965
847
|
|
|
966
848
|
// skills/flow-plan/references/planning-examples.md
|
|
@@ -1054,7 +936,7 @@ Better plan:
|
|
|
1054
936
|
// skills/flow-plan/SKILL.md
|
|
1055
937
|
var SKILL_default4 = `---
|
|
1056
938
|
name: flow-plan
|
|
1057
|
-
description: "
|
|
939
|
+
description: "Use when Flow work needs planning before implementation: a new goal to turn into an approved Flow feature plan, a draft plan to revise, or a decomposition or plan-approval decision in the v4 skills-first runtime. For executing an approved feature use flow-run; for the full goal-to-completion loop use flow."
|
|
1058
940
|
---
|
|
1059
941
|
|
|
1060
942
|
# Flow Plan
|
|
@@ -1066,7 +948,7 @@ If \`flow_plan_save\` or \`flow_plan_approve\` is unavailable, stop and tell the
|
|
|
1066
948
|
## Inspect first
|
|
1067
949
|
|
|
1068
950
|
- Read the files, docs, tests, package scripts, and local conventions that determine the work.
|
|
1069
|
-
- For broad discovery, read \`references/parallel-discovery.md\` after a serial orientation pass. Use \`../flow/references/parallel-orchestration.md\` when discovery needs multiple workers, and
|
|
951
|
+
- For broad discovery, read \`references/parallel-discovery.md\` after a serial orientation pass. Use \`../flow/references/parallel-orchestration.md\` when discovery needs multiple workers, and write its pass manifest before fan-out.
|
|
1070
952
|
- Helper rule: when a named helper skill is unavailable, record a planning gap
|
|
1071
953
|
and keep the corresponding claims conservative instead of simulating its
|
|
1072
954
|
checks.
|
|
@@ -1076,6 +958,25 @@ If \`flow_plan_save\` or \`flow_plan_approve\` is unavailable, stop and tell the
|
|
|
1076
958
|
- For UI/frontend goals, load \`flow-ui-quality\`.
|
|
1077
959
|
- Do not invent findings. Broad "review and fix" goals start with a review-first feature whose deliverable is evidence-backed findings.
|
|
1078
960
|
|
|
961
|
+
## Reduce uncertainty before decomposing
|
|
962
|
+
|
|
963
|
+
A vague goal does not slice into reliable features yet. Name what is uncertain,
|
|
964
|
+
because the two kinds resolve differently:
|
|
965
|
+
|
|
966
|
+
- **Specification uncertainty** — what the user wants: ambiguous goal, missing
|
|
967
|
+
acceptance criteria, unstated constraints. Resolve by stating an explicit
|
|
968
|
+
assumption in \`decisions\` and proceeding, or by asking only when a wrong
|
|
969
|
+
guess would be expensive to undo.
|
|
970
|
+
- **Environment uncertainty** — facts the repo, docs, commands, or data can
|
|
971
|
+
answer: code shape, schema, API behavior, current conventions. Resolve by
|
|
972
|
+
inspecting or by a discovery pass, never by asking the user.
|
|
973
|
+
|
|
974
|
+
Spend the cheapest probe that removes the most uncertainty first: local reads
|
|
975
|
+
before worker fan-out, fan-out before user questions. Decompose into features
|
|
976
|
+
only once the remaining uncertainty is low enough that \`targets\` and
|
|
977
|
+
\`validation\` can be stated concretely; otherwise the first feature is a
|
|
978
|
+
review-first or discovery deliverable that produces the missing evidence.
|
|
979
|
+
|
|
1079
980
|
## Plan shape
|
|
1080
981
|
|
|
1081
982
|
Call \`flow_plan_save\` with:
|
|
@@ -1217,7 +1118,7 @@ Approve only on evidence actually inspected. A review is a claim of coverage, no
|
|
|
1217
1118
|
// skills/flow-review/SKILL.md
|
|
1218
1119
|
var SKILL_default5 = `---
|
|
1219
1120
|
name: flow-review
|
|
1220
|
-
description: "
|
|
1121
|
+
description: "Use when Flow work needs a review verdict in the v4 runtime: a completed feature awaiting its featureReview, a final session review, or an assigned review slice. Validation evidence gathering stays in flow-test; cleanup judgment stays in flow-deslop."
|
|
1221
1122
|
---
|
|
1222
1123
|
|
|
1223
1124
|
# Flow Review
|
|
@@ -1296,8 +1197,12 @@ Use \`status: "failed"\` when any blocking finding remains. Advisory findings ma
|
|
|
1296
1197
|
\`../flow/references/parallel-orchestration.md\` for read-only slices by
|
|
1297
1198
|
changed-file group, risk lens, or validation surface. Use the named review,
|
|
1298
1199
|
audit, evidence, or validation agents from that reference instead of generic
|
|
1299
|
-
subagents.
|
|
1300
|
-
|
|
1200
|
+
subagents. Write its pass manifest before fan-out and apply its Stage 6
|
|
1201
|
+
handoff acceptance and verification tiers; only the manager
|
|
1202
|
+
returns the final \`featureReview\` or \`finalReview\` payload. If that reference
|
|
1203
|
+
is unavailable in the current context (for example in a bundled public Flow
|
|
1204
|
+
command that does not include it), review serially and record the skipped
|
|
1205
|
+
fan-out as a coverage gap instead of improvising worker contracts. The hidden
|
|
1301
1206
|
reviewer cannot spawn workers; it reviews its assigned scope directly and
|
|
1302
1207
|
reports coverage gaps for the rest.
|
|
1303
1208
|
|
|
@@ -1379,7 +1284,7 @@ Use the strongest practical tier. For risky work, combine tiers.
|
|
|
1379
1284
|
- Each \`validationRun\` entry has \`command\`, \`status\`, and \`summary\`.
|
|
1380
1285
|
- Completion accepts only passing entries. Failed or skipped checks belong in the summary/notes and must be resolved or explained as blockers.
|
|
1381
1286
|
- Do not claim a command was run unless it was run in this session or directly reported by a trusted worker with raw output.
|
|
1382
|
-
- Worker-reported command output must satisfy \`../../flow/references/
|
|
1287
|
+
- Worker-reported command output must satisfy the verification stage of \`../../flow/references/parallel-orchestration.md\`: exact command, status, raw outcome summary, coverage, and manager acceptance.
|
|
1383
1288
|
- Include scope in the summary: what behavior, files, routes, or states the check covered.
|
|
1384
1289
|
- UI work should include browser or screenshot evidence when the app can run locally.
|
|
1385
1290
|
- Cleanup/refactor work should show behavior preservation, not only formatting success.
|
|
@@ -1423,7 +1328,7 @@ Never trim failing output, relabel a failed command as passed, or use "not run"
|
|
|
1423
1328
|
// skills/flow-run/SKILL.md
|
|
1424
1329
|
var SKILL_default6 = `---
|
|
1425
1330
|
name: flow-run
|
|
1426
|
-
description: "
|
|
1331
|
+
description: "Use when an approved Flow plan has a feature to implement, validate, or complete in the v4 runtime, and the work is scoped to one active feature. For planning a goal first use flow-plan; for the full goal-to-completion loop or resuming a session use flow."
|
|
1427
1332
|
---
|
|
1428
1333
|
|
|
1429
1334
|
# Flow Run
|
|
@@ -1468,7 +1373,9 @@ If \`flow_run_start\` is unavailable, stop and tell the user to check that \`ope
|
|
|
1468
1373
|
For broad validation research, risky changes, or unclear coverage, use
|
|
1469
1374
|
\`../flow/references/parallel-orchestration.md\` to fan out named Flow workers.
|
|
1470
1375
|
Use the mode-to-agent mapping in that reference instead of generic subagents.
|
|
1471
|
-
|
|
1376
|
+
Write its pass manifest before fan-out, paste the matching handoff template
|
|
1377
|
+
from \`../flow/references/handoff-format.md\` into every worker prompt, and
|
|
1378
|
+
apply its verification tiers to the handoffs that come back.
|
|
1472
1379
|
They may report command output they actually ran or propose focused checks; the
|
|
1473
1380
|
manager decides what is strong enough to record.
|
|
1474
1381
|
|
|
@@ -1794,10 +1701,6 @@ var FLOW_SKILL_DEFINITIONS = [
|
|
|
1794
1701
|
relativePath: "references/parallel-orchestration.md",
|
|
1795
1702
|
content: parallel_orchestration_default
|
|
1796
1703
|
},
|
|
1797
|
-
{
|
|
1798
|
-
relativePath: "references/parallel-pass-patterns.md",
|
|
1799
|
-
content: parallel_pass_patterns_default
|
|
1800
|
-
},
|
|
1801
1704
|
{
|
|
1802
1705
|
relativePath: "references/parallel-pass-example.md",
|
|
1803
1706
|
content: parallel_pass_example_default
|
|
@@ -1805,10 +1708,6 @@ var FLOW_SKILL_DEFINITIONS = [
|
|
|
1805
1708
|
{
|
|
1806
1709
|
relativePath: "references/handoff-format.md",
|
|
1807
1710
|
content: handoff_format_default
|
|
1808
|
-
},
|
|
1809
|
-
{
|
|
1810
|
-
relativePath: "references/verification-gates.md",
|
|
1811
|
-
content: verification_gates_default
|
|
1812
1711
|
}
|
|
1813
1712
|
]
|
|
1814
1713
|
},
|
|
@@ -2354,4 +2253,4 @@ main(process.argv).catch((error) => {
|
|
|
2354
2253
|
process.exitCode = 1;
|
|
2355
2254
|
});
|
|
2356
2255
|
|
|
2357
|
-
//# debugId=
|
|
2256
|
+
//# debugId=A231A45541CC089364756E2164756E21
|