opencode-plugin-flow 4.3.9 → 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.
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Frozen historical prompt assembly used only for comparative evaluation.
3
+ *
4
+ * These strings capture the pre-compiler public startup and hidden-worker
5
+ * prompts. They are not production prompt sources and must never be selected by
6
+ * the default compiled Flow surfaces. Keep the exception explicit so manual
7
+ * baseline text cannot be mistaken for a maintained projection of skill rules.
8
+ */
9
+ export declare const LEGACY_PROMPT_BASELINE: Readonly<{
10
+ publicCommandPreflight: string;
11
+ workerPrompts: Readonly<{
12
+ "flow-evidence-worker": "Use Flow evidence mode. Inspect only the assigned slice, do not edit files, do not call state-changing Flow tools, and return coverage, evidence inspected, confidence-tagged findings or facts, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
13
+ "flow-validation-worker": "Use Flow validation mode. Run only manager-specified commands or propose focused checks, do not edit files, do not call state-changing Flow tools, and report exact command, status, raw outcome summary, coverage, confidence, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
14
+ "flow-audit-worker": "Use Flow audit mode. Inspect only the assigned slice, actively refute candidate findings before reporting them, do not edit files, do not call state-changing Flow tools, and return coverage, evidence, guards checked, confidence, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
15
+ "flow-candidate-worker": "Use Flow candidate-implementation mode only when the manager assigned an isolated worktree or exact non-overlapping path ownership. Do not edit .flow/**, do not call state-changing Flow tools, do not complete Flow state, and return changed or proposed patch, verification run, coverage, confidence, merge risks, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
16
+ "flow-verifier-worker": "Use Flow verifier mode. Verify only the assigned claims against the provided sources, commands, counts, or current docs. Do not generate new scope, do not edit files, do not call state-changing Flow tools, and return supported, partly-supported, unsupported, or source-not-found per claim with evidence, confidence, gaps, and manager follow-ups. Return only the assigned Flow handoff. Cite or drop every claim, label single-source, inferred, and unsettled claims, and report blocked if the assigned scope, expected coverage, or handoff shape is missing. Empty or unstructured output is a failed handoff; return blocked with the missing elements instead.";
17
+ }>;
18
+ reviewerSections: readonly string[];
19
+ }>;
@@ -0,0 +1,99 @@
1
+ import { z } from "zod";
2
+ import { type FlowPromptVariant } from "./prompt-surfaces";
3
+ declare const ModelDecisionSchema: z.ZodObject<{
4
+ id: z.ZodString;
5
+ route: z.ZodEnum<{
6
+ "flow-plan": "flow-plan";
7
+ "flow-run": "flow-run";
8
+ "flow-review": "flow-review";
9
+ "flow-evidence-worker": "flow-evidence-worker";
10
+ "flow-validation-worker": "flow-validation-worker";
11
+ "flow-audit-worker": "flow-audit-worker";
12
+ "flow-candidate-worker": "flow-candidate-worker";
13
+ "flow-verifier-worker": "flow-verifier-worker";
14
+ "flow-auto": "flow-auto";
15
+ "flow-status": "flow-status";
16
+ "flow-reviewer": "flow-reviewer";
17
+ }>;
18
+ executionMode: z.ZodEnum<{
19
+ blocked: "blocked";
20
+ serial: "serial";
21
+ readonly_parallel: "readonly_parallel";
22
+ candidate_worker: "candidate_worker";
23
+ }>;
24
+ workers: z.ZodArray<z.ZodString>;
25
+ stateOwner: z.ZodEnum<{
26
+ "root-manager": "root-manager";
27
+ worker: "worker";
28
+ }>;
29
+ callsStatusFirst: z.ZodBoolean;
30
+ planOnly: z.ZodBoolean;
31
+ reviewFirst: z.ZodBoolean;
32
+ validation: z.ZodArray<z.ZodEnum<{
33
+ broad: "broad";
34
+ focused: "focused";
35
+ behavioral: "behavioral";
36
+ ui: "ui";
37
+ browser: "browser";
38
+ }>>;
39
+ independentReview: z.ZodBoolean;
40
+ reviewDepth: z.ZodEnum<{
41
+ broad: "broad";
42
+ quick: "quick";
43
+ standard: "standard";
44
+ detailed: "detailed";
45
+ not_applicable: "not_applicable";
46
+ }>;
47
+ manifestComplete: z.ZodBoolean;
48
+ coverage: z.ZodEnum<{
49
+ missing: "missing";
50
+ partial: "partial";
51
+ not_applicable: "not_applicable";
52
+ complete: "complete";
53
+ }>;
54
+ handoffStatus: z.ZodEnum<{
55
+ blocked: "blocked";
56
+ partial: "partial";
57
+ success: "success";
58
+ not_applicable: "not_applicable";
59
+ }>;
60
+ handoffHasRequiredSections: z.ZodBoolean;
61
+ retryReviews: z.ZodNumber;
62
+ stopsAfterRetryFailure: z.ZodBoolean;
63
+ phaseBoundaryAction: z.ZodEnum<{
64
+ none: "none";
65
+ stop: "stop";
66
+ resume_with_ack: "resume_with_ack";
67
+ }>;
68
+ sessionContinuation: z.ZodEnum<{
69
+ continue: "continue";
70
+ not_applicable: "not_applicable";
71
+ stop_on_runtime_boundary: "stop_on_runtime_boundary";
72
+ self_initiated_rollover: "self_initiated_rollover";
73
+ }>;
74
+ candidateDecision: z.ZodEnum<{
75
+ used: "used";
76
+ serial_required: "serial_required";
77
+ not_applicable: "not_applicable";
78
+ }>;
79
+ completionClaimed: z.ZodBoolean;
80
+ reason: z.ZodString;
81
+ }, z.core.$strict>;
82
+ export type ModelDecision = z.infer<typeof ModelDecisionSchema>;
83
+ export type ModelEvaluationGrade = {
84
+ passedScenarios: number;
85
+ totalScenarios: number;
86
+ passedCriteria: number;
87
+ totalCriteria: number;
88
+ scenarios: Array<{
89
+ id: string;
90
+ passed: boolean;
91
+ passedCriteria: number;
92
+ totalCriteria: number;
93
+ failures: string[];
94
+ }>;
95
+ };
96
+ export declare function buildPromptModelEvaluationPacket(variant: FlowPromptVariant): string;
97
+ export declare function parseModelDecisionResponse(text: string): ModelDecision[];
98
+ export declare function gradeModelDecisions(decisions: readonly ModelDecision[]): ModelEvaluationGrade;
99
+ export {};
@@ -0,0 +1,73 @@
1
+ import { type CompiledFlowPrompt, type FlowPromptSurfaceName, type FlowPromptVariant } from "./prompt-surfaces";
2
+ export type PromptMetric = {
3
+ surface: string;
4
+ variant: FlowPromptVariant | "runtime";
5
+ sources: string[];
6
+ characters: number;
7
+ words: number;
8
+ approximateTokens: number;
9
+ actionableInstructions: number;
10
+ exactDuplicateLines: number;
11
+ repeatedFiveGrams: number;
12
+ nearDuplicateLinePairs: number;
13
+ negativeInstructions: number;
14
+ negativeInstructionDensity: number;
15
+ codeFences: number;
16
+ conditionalFragments: string[];
17
+ roleInapplicableFragments: string[];
18
+ roleInapplicableLines: number;
19
+ criticalRulePositions: Record<string, number | null>;
20
+ structurallyEnforcedRulesPresent: string[];
21
+ terminologyWarnings: string[];
22
+ };
23
+ export type PromptEvaluationResult = {
24
+ variant: FlowPromptVariant;
25
+ scenariosPassed: number;
26
+ scenariosTotal: number;
27
+ criteriaPassed: number;
28
+ criteriaTotal: number;
29
+ staticApproximateTokens: number;
30
+ roleInapplicableLines: number;
31
+ exactDuplicateLines: number;
32
+ scenarios: Array<{
33
+ id: string;
34
+ name: string;
35
+ passed: boolean;
36
+ passedCriteria: number;
37
+ totalCriteria: number;
38
+ failures: string[];
39
+ }>;
40
+ };
41
+ export type PromptRepetitionClassification = {
42
+ id: string;
43
+ classification: "keep" | "consolidate" | "enforce-structurally" | "load-conditionally" | "remove" | "evaluate";
44
+ occurrences: string[];
45
+ rationale: string;
46
+ };
47
+ export declare function measurePromptText(options: {
48
+ surface: string;
49
+ variant: FlowPromptVariant | "runtime";
50
+ text: string;
51
+ compiled?: CompiledFlowPrompt;
52
+ }): PromptMetric;
53
+ export declare function measureCompiledPrompt(compiled: CompiledFlowPrompt): PromptMetric;
54
+ type PromptScenario = {
55
+ id: string;
56
+ name: string;
57
+ input: string;
58
+ expectedRoute: FlowPromptSurfaceName;
59
+ surface: FlowPromptSurfaceName;
60
+ required: Array<{
61
+ label: string;
62
+ pattern: RegExp;
63
+ }>;
64
+ forbidden?: Array<{
65
+ label: string;
66
+ pattern: RegExp;
67
+ }>;
68
+ };
69
+ export declare const PROMPT_EVALUATION_SCENARIOS: readonly PromptScenario[];
70
+ export declare function evaluatePromptVariant(variant: FlowPromptVariant): PromptEvaluationResult;
71
+ export declare const PROMPT_REPETITION_CLASSIFICATIONS: readonly PromptRepetitionClassification[];
72
+ export declare function promptInventoryForVariant(variant: FlowPromptVariant): PromptMetric[];
73
+ export {};
@@ -0,0 +1,28 @@
1
+ export type FlowPromptVariant = "baseline" | "lexically-deduplicated" | "surface-specific" | "surface-specific-bookended";
2
+ export type FlowPromptSurfaceName = "flow-auto" | "flow-plan" | "flow-run" | "flow-review" | "flow-status" | "flow-reviewer" | "flow-evidence-worker" | "flow-validation-worker" | "flow-audit-worker" | "flow-candidate-worker" | "flow-verifier-worker";
3
+ export type FlowPromptRole = "manager" | "reviewer" | "evidence-worker" | "validation-worker" | "audit-worker" | "candidate-worker" | "verifier-worker";
4
+ export type FlowPromptFragmentKind = "purpose" | "invariant" | "procedure" | "reference" | "schema" | "checkpoint";
5
+ export type FlowPromptFragment = {
6
+ id: string;
7
+ source: string;
8
+ origin: "skill-source" | "compiler";
9
+ kind: FlowPromptFragmentKind;
10
+ text: string;
11
+ roles: readonly FlowPromptRole[];
12
+ conditional?: boolean;
13
+ };
14
+ export type CompiledFlowPrompt = {
15
+ surface: FlowPromptSurfaceName;
16
+ variant: FlowPromptVariant;
17
+ role: FlowPromptRole;
18
+ text: string;
19
+ fragments: readonly FlowPromptFragment[];
20
+ };
21
+ export type FlowWorkerHandoffKind = "evidence" | "validation" | "audit" | "review-slice" | "verifier" | "candidate";
22
+ export declare function compileFlowPromptSurface(surface: FlowPromptSurfaceName, variant?: FlowPromptVariant): CompiledFlowPrompt;
23
+ export declare const FLOW_STATIC_PROMPT_SURFACES: readonly FlowPromptSurfaceName[];
24
+ export declare function compiledFlowPromptSurfaces(variant?: FlowPromptVariant): Record<FlowPromptSurfaceName, CompiledFlowPrompt>;
25
+ export declare function validateFlowWorkerHandoff(kind: FlowWorkerHandoffKind, text: string): {
26
+ ok: boolean;
27
+ errors: string[];
28
+ };
@@ -127,17 +127,17 @@ export declare const FlowFeatureCompleteToolSchema: z.ZodObject<{
127
127
  orchestrationPasses: z.ZodOptional<z.ZodArray<z.ZodObject<{
128
128
  id: z.ZodString;
129
129
  kind: z.ZodEnum<{
130
- discovery: "discovery";
130
+ validation: "validation";
131
131
  audit: "audit";
132
+ candidate: "candidate";
133
+ discovery: "discovery";
132
134
  review: "review";
133
- validation: "validation";
134
135
  verification: "verification";
135
- candidate: "candidate";
136
136
  "implementation-decision": "implementation-decision";
137
137
  }>;
138
138
  decision: z.ZodOptional<z.ZodEnum<{
139
- serial: "serial";
140
139
  parallel: "parallel";
140
+ serial: "serial";
141
141
  "candidate-exact-path": "candidate-exact-path";
142
142
  "candidate-worktree": "candidate-worktree";
143
143
  tournament: "tournament";
@@ -163,11 +163,11 @@ export declare const FlowFeatureCompleteToolSchema: z.ZodObject<{
163
163
  validation_available: "validation_available";
164
164
  }>>>;
165
165
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
166
- audit: "audit";
167
- review: "review";
168
- validation: "validation";
169
166
  evidence: "evidence";
167
+ validation: "validation";
168
+ audit: "audit";
170
169
  verifier: "verifier";
170
+ review: "review";
171
171
  "candidate-implementation": "candidate-implementation";
172
172
  }>>>;
173
173
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -36,25 +36,25 @@ export declare const FinalReviewPolicySchema: z.ZodEnum<{
36
36
  detailed: "detailed";
37
37
  }>;
38
38
  export declare const OrchestrationPassKindSchema: z.ZodEnum<{
39
- discovery: "discovery";
39
+ validation: "validation";
40
40
  audit: "audit";
41
+ candidate: "candidate";
42
+ discovery: "discovery";
41
43
  review: "review";
42
- validation: "validation";
43
44
  verification: "verification";
44
- candidate: "candidate";
45
45
  "implementation-decision": "implementation-decision";
46
46
  }>;
47
47
  export declare const OrchestrationModeSchema: z.ZodEnum<{
48
- audit: "audit";
49
- review: "review";
50
- validation: "validation";
51
48
  evidence: "evidence";
49
+ validation: "validation";
50
+ audit: "audit";
52
51
  verifier: "verifier";
52
+ review: "review";
53
53
  "candidate-implementation": "candidate-implementation";
54
54
  }>;
55
55
  export declare const OrchestrationDecisionSchema: z.ZodEnum<{
56
- serial: "serial";
57
56
  parallel: "parallel";
57
+ serial: "serial";
58
58
  "candidate-exact-path": "candidate-exact-path";
59
59
  "candidate-worktree": "candidate-worktree";
60
60
  tournament: "tournament";
@@ -115,17 +115,17 @@ export declare function hasVerifierExecutionEvidence(pass: {
115
115
  export declare const OrchestrationPassRecordSchema: z.ZodObject<{
116
116
  id: z.ZodString;
117
117
  kind: z.ZodEnum<{
118
- discovery: "discovery";
118
+ validation: "validation";
119
119
  audit: "audit";
120
+ candidate: "candidate";
121
+ discovery: "discovery";
120
122
  review: "review";
121
- validation: "validation";
122
123
  verification: "verification";
123
- candidate: "candidate";
124
124
  "implementation-decision": "implementation-decision";
125
125
  }>;
126
126
  decision: z.ZodOptional<z.ZodEnum<{
127
- serial: "serial";
128
127
  parallel: "parallel";
128
+ serial: "serial";
129
129
  "candidate-exact-path": "candidate-exact-path";
130
130
  "candidate-worktree": "candidate-worktree";
131
131
  tournament: "tournament";
@@ -151,11 +151,11 @@ export declare const OrchestrationPassRecordSchema: z.ZodObject<{
151
151
  validation_available: "validation_available";
152
152
  }>>>;
153
153
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
154
- audit: "audit";
155
- review: "review";
156
- validation: "validation";
157
154
  evidence: "evidence";
155
+ validation: "validation";
156
+ audit: "audit";
158
157
  verifier: "verifier";
158
+ review: "review";
159
159
  "candidate-implementation": "candidate-implementation";
160
160
  }>>>;
161
161
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -202,17 +202,17 @@ export declare const OrchestrationTelemetrySchema: z.ZodObject<{
202
202
  latestPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
203
203
  id: z.ZodString;
204
204
  kind: z.ZodEnum<{
205
- discovery: "discovery";
205
+ validation: "validation";
206
206
  audit: "audit";
207
+ candidate: "candidate";
208
+ discovery: "discovery";
207
209
  review: "review";
208
- validation: "validation";
209
210
  verification: "verification";
210
- candidate: "candidate";
211
211
  "implementation-decision": "implementation-decision";
212
212
  }>;
213
213
  decision: z.ZodOptional<z.ZodEnum<{
214
- serial: "serial";
215
214
  parallel: "parallel";
215
+ serial: "serial";
216
216
  "candidate-exact-path": "candidate-exact-path";
217
217
  "candidate-worktree": "candidate-worktree";
218
218
  tournament: "tournament";
@@ -238,11 +238,11 @@ export declare const OrchestrationTelemetrySchema: z.ZodObject<{
238
238
  validation_available: "validation_available";
239
239
  }>>>;
240
240
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
241
- audit: "audit";
242
- review: "review";
243
- validation: "validation";
244
241
  evidence: "evidence";
242
+ validation: "validation";
243
+ audit: "audit";
245
244
  verifier: "verifier";
245
+ review: "review";
246
246
  "candidate-implementation": "candidate-implementation";
247
247
  }>>>;
248
248
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -492,17 +492,17 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
492
492
  orchestrationPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
493
493
  id: z.ZodString;
494
494
  kind: z.ZodEnum<{
495
- discovery: "discovery";
495
+ validation: "validation";
496
496
  audit: "audit";
497
+ candidate: "candidate";
498
+ discovery: "discovery";
497
499
  review: "review";
498
- validation: "validation";
499
500
  verification: "verification";
500
- candidate: "candidate";
501
501
  "implementation-decision": "implementation-decision";
502
502
  }>;
503
503
  decision: z.ZodOptional<z.ZodEnum<{
504
- serial: "serial";
505
504
  parallel: "parallel";
505
+ serial: "serial";
506
506
  "candidate-exact-path": "candidate-exact-path";
507
507
  "candidate-worktree": "candidate-worktree";
508
508
  tournament: "tournament";
@@ -528,11 +528,11 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
528
528
  validation_available: "validation_available";
529
529
  }>>>;
530
530
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
531
- audit: "audit";
532
- review: "review";
533
- validation: "validation";
534
531
  evidence: "evidence";
532
+ validation: "validation";
533
+ audit: "audit";
535
534
  verifier: "verifier";
535
+ review: "review";
536
536
  "candidate-implementation": "candidate-implementation";
537
537
  }>>>;
538
538
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -634,17 +634,17 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
634
634
  orchestrationPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
635
635
  id: z.ZodString;
636
636
  kind: z.ZodEnum<{
637
- discovery: "discovery";
637
+ validation: "validation";
638
638
  audit: "audit";
639
+ candidate: "candidate";
640
+ discovery: "discovery";
639
641
  review: "review";
640
- validation: "validation";
641
642
  verification: "verification";
642
- candidate: "candidate";
643
643
  "implementation-decision": "implementation-decision";
644
644
  }>;
645
645
  decision: z.ZodOptional<z.ZodEnum<{
646
- serial: "serial";
647
646
  parallel: "parallel";
647
+ serial: "serial";
648
648
  "candidate-exact-path": "candidate-exact-path";
649
649
  "candidate-worktree": "candidate-worktree";
650
650
  tournament: "tournament";
@@ -670,11 +670,11 @@ export declare const WorkerResultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
670
670
  validation_available: "validation_available";
671
671
  }>>>;
672
672
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
673
- audit: "audit";
674
- review: "review";
675
- validation: "validation";
676
673
  evidence: "evidence";
674
+ validation: "validation";
675
+ audit: "audit";
677
676
  verifier: "verifier";
677
+ review: "review";
678
678
  "candidate-implementation": "candidate-implementation";
679
679
  }>>>;
680
680
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -783,17 +783,17 @@ export declare const ExecutionHistoryEntrySchema: z.ZodObject<{
783
783
  orchestrationPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
784
784
  id: z.ZodString;
785
785
  kind: z.ZodEnum<{
786
- discovery: "discovery";
786
+ validation: "validation";
787
787
  audit: "audit";
788
+ candidate: "candidate";
789
+ discovery: "discovery";
788
790
  review: "review";
789
- validation: "validation";
790
791
  verification: "verification";
791
- candidate: "candidate";
792
792
  "implementation-decision": "implementation-decision";
793
793
  }>;
794
794
  decision: z.ZodOptional<z.ZodEnum<{
795
- serial: "serial";
796
795
  parallel: "parallel";
796
+ serial: "serial";
797
797
  "candidate-exact-path": "candidate-exact-path";
798
798
  "candidate-worktree": "candidate-worktree";
799
799
  tournament: "tournament";
@@ -819,11 +819,11 @@ export declare const ExecutionHistoryEntrySchema: z.ZodObject<{
819
819
  validation_available: "validation_available";
820
820
  }>>>;
821
821
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
822
- audit: "audit";
823
- review: "review";
824
- validation: "validation";
825
822
  evidence: "evidence";
823
+ validation: "validation";
824
+ audit: "audit";
826
825
  verifier: "verifier";
826
+ review: "review";
827
827
  "candidate-implementation": "candidate-implementation";
828
828
  }>>>;
829
829
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -905,17 +905,17 @@ export declare const BudgetTelemetrySchema: z.ZodObject<{
905
905
  latestPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
906
906
  id: z.ZodString;
907
907
  kind: z.ZodEnum<{
908
- discovery: "discovery";
908
+ validation: "validation";
909
909
  audit: "audit";
910
+ candidate: "candidate";
911
+ discovery: "discovery";
910
912
  review: "review";
911
- validation: "validation";
912
913
  verification: "verification";
913
- candidate: "candidate";
914
914
  "implementation-decision": "implementation-decision";
915
915
  }>;
916
916
  decision: z.ZodOptional<z.ZodEnum<{
917
- serial: "serial";
918
917
  parallel: "parallel";
918
+ serial: "serial";
919
919
  "candidate-exact-path": "candidate-exact-path";
920
920
  "candidate-worktree": "candidate-worktree";
921
921
  tournament: "tournament";
@@ -941,11 +941,11 @@ export declare const BudgetTelemetrySchema: z.ZodObject<{
941
941
  validation_available: "validation_available";
942
942
  }>>>;
943
943
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
944
- audit: "audit";
945
- review: "review";
946
- validation: "validation";
947
944
  evidence: "evidence";
945
+ validation: "validation";
946
+ audit: "audit";
948
947
  verifier: "verifier";
948
+ review: "review";
949
949
  "candidate-implementation": "candidate-implementation";
950
950
  }>>>;
951
951
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -1110,17 +1110,17 @@ export declare const SessionSchema: z.ZodObject<{
1110
1110
  orchestrationPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
1111
1111
  id: z.ZodString;
1112
1112
  kind: z.ZodEnum<{
1113
- discovery: "discovery";
1113
+ validation: "validation";
1114
1114
  audit: "audit";
1115
+ candidate: "candidate";
1116
+ discovery: "discovery";
1115
1117
  review: "review";
1116
- validation: "validation";
1117
1118
  verification: "verification";
1118
- candidate: "candidate";
1119
1119
  "implementation-decision": "implementation-decision";
1120
1120
  }>;
1121
1121
  decision: z.ZodOptional<z.ZodEnum<{
1122
- serial: "serial";
1123
1122
  parallel: "parallel";
1123
+ serial: "serial";
1124
1124
  "candidate-exact-path": "candidate-exact-path";
1125
1125
  "candidate-worktree": "candidate-worktree";
1126
1126
  tournament: "tournament";
@@ -1146,11 +1146,11 @@ export declare const SessionSchema: z.ZodObject<{
1146
1146
  validation_available: "validation_available";
1147
1147
  }>>>;
1148
1148
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1149
- audit: "audit";
1150
- review: "review";
1151
- validation: "validation";
1152
1149
  evidence: "evidence";
1150
+ validation: "validation";
1151
+ audit: "audit";
1153
1152
  verifier: "verifier";
1153
+ review: "review";
1154
1154
  "candidate-implementation": "candidate-implementation";
1155
1155
  }>>>;
1156
1156
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -1213,17 +1213,17 @@ export declare const SessionSchema: z.ZodObject<{
1213
1213
  latestPasses: z.ZodDefault<z.ZodArray<z.ZodObject<{
1214
1214
  id: z.ZodString;
1215
1215
  kind: z.ZodEnum<{
1216
- discovery: "discovery";
1216
+ validation: "validation";
1217
1217
  audit: "audit";
1218
+ candidate: "candidate";
1219
+ discovery: "discovery";
1218
1220
  review: "review";
1219
- validation: "validation";
1220
1221
  verification: "verification";
1221
- candidate: "candidate";
1222
1222
  "implementation-decision": "implementation-decision";
1223
1223
  }>;
1224
1224
  decision: z.ZodOptional<z.ZodEnum<{
1225
- serial: "serial";
1226
1225
  parallel: "parallel";
1226
+ serial: "serial";
1227
1227
  "candidate-exact-path": "candidate-exact-path";
1228
1228
  "candidate-worktree": "candidate-worktree";
1229
1229
  tournament: "tournament";
@@ -1249,11 +1249,11 @@ export declare const SessionSchema: z.ZodObject<{
1249
1249
  validation_available: "validation_available";
1250
1250
  }>>>;
1251
1251
  modes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
1252
- audit: "audit";
1253
- review: "review";
1254
- validation: "validation";
1255
1252
  evidence: "evidence";
1253
+ validation: "validation";
1254
+ audit: "audit";
1256
1255
  verifier: "verifier";
1256
+ review: "review";
1257
1257
  "candidate-implementation": "candidate-implementation";
1258
1258
  }>>>;
1259
1259
  workerCount: z.ZodDefault<z.ZodNumber>;
@@ -101,10 +101,10 @@ export declare function summarizeSession(session: Session | null): {
101
101
  recordedPassIds: string[];
102
102
  latestPasses: {
103
103
  id: string;
104
- kind: "discovery" | "audit" | "review" | "validation" | "verification" | "candidate" | "implementation-decision";
104
+ kind: "validation" | "audit" | "candidate" | "discovery" | "review" | "verification" | "implementation-decision";
105
105
  candidateEligibility: "eligible" | "not_eligible" | "unknown";
106
106
  decisionFactors: ("shared_state" | "overlapping_files" | "small_slice" | "needs_manager_judgment" | "independent_surface" | "validation_available")[];
107
- modes: ("audit" | "review" | "validation" | "evidence" | "verifier" | "candidate-implementation")[];
107
+ modes: ("evidence" | "validation" | "audit" | "verifier" | "review" | "candidate-implementation")[];
108
108
  workerCount: number;
109
109
  candidateWorkerCount: number;
110
110
  verifierWorkerCount: number;
@@ -114,7 +114,7 @@ export declare function summarizeSession(session: Session | null): {
114
114
  handoffRefs: string[];
115
115
  verificationStatus: "pending" | "passed" | "failed" | "mixed" | "not-needed" | "downgraded";
116
116
  outcome: "accepted" | "modified" | "rejected" | "partial" | "not-covered" | "superseded";
117
- decision?: "serial" | "parallel" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
117
+ decision?: "parallel" | "serial" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
118
118
  decisionReason?: string | undefined;
119
119
  candidateDecision?: "skipped" | "used" | "serial_required" | undefined;
120
120
  synthesisRef?: string | undefined;
@@ -177,10 +177,10 @@ export declare function summarizeSession(session: Session | null): {
177
177
  }[];
178
178
  orchestrationPasses: {
179
179
  id: string;
180
- kind: "discovery" | "audit" | "review" | "validation" | "verification" | "candidate" | "implementation-decision";
180
+ kind: "validation" | "audit" | "candidate" | "discovery" | "review" | "verification" | "implementation-decision";
181
181
  candidateEligibility: "eligible" | "not_eligible" | "unknown";
182
182
  decisionFactors: ("shared_state" | "overlapping_files" | "small_slice" | "needs_manager_judgment" | "independent_surface" | "validation_available")[];
183
- modes: ("audit" | "review" | "validation" | "evidence" | "verifier" | "candidate-implementation")[];
183
+ modes: ("evidence" | "validation" | "audit" | "verifier" | "review" | "candidate-implementation")[];
184
184
  workerCount: number;
185
185
  candidateWorkerCount: number;
186
186
  verifierWorkerCount: number;
@@ -190,7 +190,7 @@ export declare function summarizeSession(session: Session | null): {
190
190
  handoffRefs: string[];
191
191
  verificationStatus: "pending" | "passed" | "failed" | "mixed" | "not-needed" | "downgraded";
192
192
  outcome: "accepted" | "modified" | "rejected" | "partial" | "not-covered" | "superseded";
193
- decision?: "serial" | "parallel" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
193
+ decision?: "parallel" | "serial" | "candidate-exact-path" | "candidate-worktree" | "tournament" | "skipped" | undefined;
194
194
  decisionReason?: string | undefined;
195
195
  candidateDecision?: "skipped" | "used" | "serial_required" | undefined;
196
196
  synthesisRef?: string | undefined;
@@ -30,6 +30,7 @@ export declare function flowSessionProgress(session: Session): {
30
30
  completed: number;
31
31
  total: number;
32
32
  };
33
+ export declare function renderFlowInstructionFile(session: Session): string;
33
34
  export declare function refreshFlowInstructionFile(worktree: string): Promise<void>;
34
35
  export declare function saveSession(worktree: string, session: Session): Promise<Session>;
35
36
  export declare function archiveAndClearSession(worktree: string, session: Session): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-plugin-flow",
3
- "version": "4.3.9",
3
+ "version": "4.4.0",
4
4
  "description": "Stateful planning and execution workflow plugin for OpenCode",
5
5
  "type": "module",
6
6
  "repository": {
@@ -30,7 +30,9 @@
30
30
  "build:plugin": "bun build --target=node --outdir=./dist --entry-naming=index.js --external=@opencode-ai/plugin --external=zod --sourcemap=external ./src/index.ts",
31
31
  "build:cli": "bun build --target=node --outdir=./dist --entry-naming=cli.js --banner='#!/usr/bin/env node' --sourcemap=external ./src/cli.ts",
32
32
  "build:types": "tsc -p tsconfig.types.json",
33
- "lint": "bunx biome check src tests --files-ignore-unknown=true --vcs-use-ignore-file=true",
33
+ "lint": "bunx biome check src tests scripts --files-ignore-unknown=true --vcs-use-ignore-file=true",
34
+ "prompt:quality": "bun run scripts/prompt-quality.ts",
35
+ "prompt:model-eval": "bun run scripts/prompt-model-eval.ts",
34
36
  "package:smoke": "bun test tests/package-smoke.test.ts",
35
37
  "release:monitor": "node scripts/release-monitor.mjs",
36
38
  "smoke:live": "FLOW_LIVE_SMOKE=1 bun test tests/live-opencode-smoke.test.ts",