@llblab/pi-actors 0.37.0 → 0.38.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/BACKLOG.md +1 -1
- package/CHANGELOG.md +19 -0
- package/README.md +6 -5
- package/dist/index.js +23 -3
- package/dist/lib/async-runs.d.ts +5 -0
- package/dist/lib/async-runs.js +87 -8
- package/dist/lib/command-templates.d.ts +2 -0
- package/dist/lib/execution.d.ts +4 -0
- package/dist/lib/execution.js +154 -13
- package/dist/lib/model-context.d.ts +56 -0
- package/dist/lib/model-context.js +220 -0
- package/dist/lib/observability.d.ts +2 -0
- package/dist/lib/observability.js +32 -6
- package/dist/lib/preflight-diagnostics.d.ts +27 -0
- package/dist/lib/preflight-diagnostics.js +86 -0
- package/dist/lib/prompts.d.ts +1 -1
- package/dist/lib/prompts.js +2 -2
- package/dist/lib/recipes-context.d.ts +7 -0
- package/dist/lib/recipes-context.js +75 -5
- package/dist/lib/recipes-discovery.js +15 -0
- package/dist/lib/recipes-references.d.ts +2 -0
- package/dist/lib/recipes-references.js +10 -0
- package/dist/lib/tools-local.d.ts +2 -1
- package/dist/lib/tools-local.js +6 -4
- package/dist/lib/tools-response.js +22 -1
- package/dist/lib/tools-spawn.d.ts +2 -1
- package/dist/lib/tools-spawn.js +2 -1
- package/dist/recipes/lens-swarm.json +15 -2
- package/dist/recipes/pipeline-release-readiness.json +22 -3
- package/dist/recipes/pipeline-review-readiness.json +22 -3
- package/dist/recipes/subagent-judge.json +2 -1
- package/dist/recipes/subagent-merge.json +5 -2
- package/dist/recipes/subagent-normalize.json +2 -1
- package/dist/recipes/subagent-preflight.json +29 -0
- package/dist/recipes/subagent-review-coordinator.json +79 -7
- package/dist/recipes/subagent-review.json +2 -1
- package/dist/recipes/subagent-verify.json +2 -1
- package/dist/scripts/async-runner.mjs +84 -10
- package/dist/scripts/conformance.mjs +1 -0
- package/dist/skills/actors/SKILL.md +5 -3
- package/dist/skills/swarm/SKILL.md +2 -2
- package/docs/async-runs.md +3 -1
- package/docs/command-templates.md +4 -1
- package/docs/recipe-library.md +5 -2
- package/docs/template-recipes.md +2 -2
- package/index.ts +24 -3
- package/lib/async-runs.ts +157 -8
- package/lib/command-templates.ts +2 -0
- package/lib/execution.ts +218 -24
- package/lib/model-context.ts +359 -0
- package/lib/observability.ts +35 -6
- package/lib/preflight-diagnostics.ts +132 -0
- package/lib/prompts.ts +2 -2
- package/lib/recipes-context.ts +86 -5
- package/lib/recipes-discovery.ts +15 -0
- package/lib/recipes-references.ts +12 -0
- package/lib/tools-local.ts +22 -8
- package/lib/tools-response.ts +26 -1
- package/lib/tools-spawn.ts +6 -2
- package/package.json +1 -1
- package/recipes/lens-swarm.json +15 -2
- package/recipes/pipeline-release-readiness.json +22 -3
- package/recipes/pipeline-review-readiness.json +22 -3
- package/recipes/subagent-judge.json +2 -1
- package/recipes/subagent-merge.json +5 -2
- package/recipes/subagent-normalize.json +2 -1
- package/recipes/subagent-preflight.json +29 -0
- package/recipes/subagent-review-coordinator.json +79 -7
- package/recipes/subagent-review.json +2 -1
- package/recipes/subagent-verify.json +2 -1
- package/scripts/async-runner.mjs +84 -10
- package/scripts/conformance.mjs +1 -0
- package/skills/actors/SKILL.md +5 -3
- package/skills/swarm/SKILL.md +2 -2
package/dist/lib/tools-local.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import * as Rooms from "./rooms.js";
|
|
7
7
|
import * as AsyncRuns from "./async-runs.js";
|
|
8
|
+
import * as ModelContext from "./model-context.js";
|
|
8
9
|
import * as Execution from "./execution.js";
|
|
9
10
|
import * as Prompts from "./prompts.js";
|
|
10
11
|
import * as RecipesReferences from "./recipes-references.js";
|
|
@@ -124,7 +125,8 @@ export function createRuntimeToolDefinition(cfg, exec) {
|
|
|
124
125
|
ownerId: getRunOwnerId(ctx),
|
|
125
126
|
run_id: runId,
|
|
126
127
|
tool: cfg.name,
|
|
127
|
-
|
|
128
|
+
policy_values: ModelContext.withCurrentModelValues({ ...(cfg.recipe?.values ?? {}), ...values }, ctx),
|
|
129
|
+
values: Schema.normalizeRuntimeValues(ModelContext.withCurrentModelValues({ ...(cfg.recipe?.values ?? {}), ...cfg.defaults, ...values }, ctx), cfg.argTypes),
|
|
128
130
|
}, ctx.cwd);
|
|
129
131
|
Rooms.ensureDefaultRoom(meta.state_dir, String(meta.run));
|
|
130
132
|
Rooms.writeCommunicationSnapshot(meta.state_dir, String(meta.run));
|
|
@@ -139,14 +141,14 @@ export function createRuntimeToolDefinition(cfg, exec) {
|
|
|
139
141
|
};
|
|
140
142
|
}
|
|
141
143
|
if (isRecipe && recipeTemplate) {
|
|
142
|
-
const paramsWithDefaults = {
|
|
144
|
+
const paramsWithDefaults = ModelContext.withCurrentModelValues({
|
|
143
145
|
...(cfg.recipe?.values ?? {}),
|
|
144
146
|
...cfg.defaults,
|
|
145
147
|
...params,
|
|
146
|
-
};
|
|
148
|
+
}, ctx);
|
|
147
149
|
return await Execution.executeRegisteredTool({ ...cfg, template: recipeTemplate }, Schema.normalizeRuntimeValues(paramsWithDefaults, cfg.argTypes), exec, ctx.cwd, signal);
|
|
148
150
|
}
|
|
149
|
-
return await Execution.executeRegisteredTool(cfg, Schema.normalizeRuntimeValues(params, cfg.argTypes), exec, ctx.cwd, signal);
|
|
151
|
+
return await Execution.executeRegisteredTool(cfg, Schema.normalizeRuntimeValues(ModelContext.withCurrentModelValues(params, ctx), cfg.argTypes), exec, ctx.cwd, signal);
|
|
150
152
|
}
|
|
151
153
|
catch (error) {
|
|
152
154
|
throw formatRuntimeToolArgumentError(cfg, error, required, isAsyncRecipe);
|
|
@@ -30,6 +30,23 @@ export function compactNextActions(actions) {
|
|
|
30
30
|
function formatFailureCount(value) {
|
|
31
31
|
return Array.isArray(value) ? value.length : undefined;
|
|
32
32
|
}
|
|
33
|
+
function compactPolicyAxis(label, value) {
|
|
34
|
+
const axis = asRecord(value);
|
|
35
|
+
const source = typeof axis.source === "string" ? axis.source : undefined;
|
|
36
|
+
if (!source || source === "unused")
|
|
37
|
+
return undefined;
|
|
38
|
+
const renderedValue = typeof axis.value === "string" && axis.value.trim()
|
|
39
|
+
? `:${axis.value.trim()}`
|
|
40
|
+
: "";
|
|
41
|
+
return `${label}=${source}${renderedValue}`;
|
|
42
|
+
}
|
|
43
|
+
function compactModelPolicy(value) {
|
|
44
|
+
const policy = asRecord(value);
|
|
45
|
+
return [
|
|
46
|
+
compactPolicyAxis("model", policy.model),
|
|
47
|
+
compactPolicyAxis("thinking", policy.thinking),
|
|
48
|
+
].filter((token) => Boolean(token));
|
|
49
|
+
}
|
|
33
50
|
export function actorRunNextActions(run) {
|
|
34
51
|
const id = String(run ?? "").trim();
|
|
35
52
|
if (!id)
|
|
@@ -46,6 +63,7 @@ export function compactAsyncRunStatus(value) {
|
|
|
46
63
|
const result = asRecord(status.result);
|
|
47
64
|
const run = String(status.run ?? "<unknown>");
|
|
48
65
|
const tokens = [`run=${run}`, `status=${String(status.status ?? "unknown")}`];
|
|
66
|
+
tokens.push(...compactModelPolicy(status.model_policy ?? progress.model_policy));
|
|
49
67
|
if (status.tool)
|
|
50
68
|
tokens.push(`tool=${String(status.tool)}`);
|
|
51
69
|
if (status.recipe)
|
|
@@ -222,9 +240,12 @@ export function compactRecipeRegistry(summary) {
|
|
|
222
240
|
const recommendations = Array.isArray(summary.recommendations)
|
|
223
241
|
? summary.recommendations.length
|
|
224
242
|
: 0;
|
|
243
|
+
const currentPolicy = Array.isArray(summary.active)
|
|
244
|
+
? summary.active.filter((entry) => entry.current_policy).length
|
|
245
|
+
: 0;
|
|
225
246
|
const nextActions = Array.isArray(summary.next_actions)
|
|
226
247
|
? summary.next_actions
|
|
227
248
|
: [];
|
|
228
|
-
return `\nrecipes active=${active} drafts=${drafts} shadowed=${shadowed} invalid=${invalid} disabled=${disabled} recommendations=${recommendations} diagnostics=${diagnostics}${compactNextActions(nextActions)}`;
|
|
249
|
+
return `\nrecipes active=${active} drafts=${drafts} shadowed=${shadowed} invalid=${invalid} disabled=${disabled} current_policy=${currentPolicy} recommendations=${recommendations} diagnostics=${diagnostics}${compactNextActions(nextActions)}`;
|
|
229
250
|
}
|
|
230
251
|
export const DEFAULT_INSPECT_LINES = Limits.DEFAULT_INSPECT_LINES;
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Zones: actor launch, draft recipe capture, launch diagnostics
|
|
4
4
|
* Owns the public spawn execution path for run-backed actors
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
import * as ModelContext from "./model-context.ts";
|
|
7
|
+
export interface SpawnToolContext extends ModelContext.CurrentModelContext {
|
|
7
8
|
cwd: string;
|
|
8
9
|
sessionManager?: {
|
|
9
10
|
getSessionId?: () => string;
|
package/dist/lib/tools-spawn.js
CHANGED
|
@@ -7,6 +7,7 @@ import { mkdirSync, writeFileSync } from "node:fs";
|
|
|
7
7
|
import { join } from "node:path";
|
|
8
8
|
import * as AsyncRuns from "./async-runs.js";
|
|
9
9
|
import * as Messages from "./messages.js";
|
|
10
|
+
import * as ModelContext from "./model-context.js";
|
|
10
11
|
import * as Paths from "./paths.js";
|
|
11
12
|
import * as RecipesDiscovery from "./recipes-discovery.js";
|
|
12
13
|
import * as Rooms from "./rooms.js";
|
|
@@ -123,7 +124,7 @@ export function createSpawnToolDefinition() {
|
|
|
123
124
|
template: input.template,
|
|
124
125
|
}
|
|
125
126
|
: {}),
|
|
126
|
-
values: asRecord(input.values),
|
|
127
|
+
values: ModelContext.withCurrentModelValues(asRecord(input.values), ctx),
|
|
127
128
|
...(input.artifacts &&
|
|
128
129
|
typeof input.artifacts === "object" &&
|
|
129
130
|
!Array.isArray(input.artifacts)
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
"model:string",
|
|
11
11
|
"thinking:string",
|
|
12
12
|
"tools:string",
|
|
13
|
+
"subagent_ttl_ms:int",
|
|
14
|
+
"reviewer_concurrency:string",
|
|
15
|
+
"min_successful_reviewers:int",
|
|
16
|
+
"merge_policy:string",
|
|
13
17
|
"claim:string",
|
|
14
18
|
"evidence_policy:string",
|
|
15
19
|
"risk_policy:string",
|
|
@@ -21,12 +25,17 @@
|
|
|
21
25
|
"architecture",
|
|
22
26
|
"operator UX"
|
|
23
27
|
],
|
|
24
|
-
"
|
|
28
|
+
"model": "{current_model}",
|
|
29
|
+
"thinking": "{current_thinking}",
|
|
25
30
|
"tools": "",
|
|
31
|
+
"subagent_ttl_ms": 600000,
|
|
32
|
+
"reviewer_concurrency": "",
|
|
33
|
+
"min_successful_reviewers": 1,
|
|
34
|
+
"merge_policy": "Preserve partial reviewer reports, branch status, and degraded confidence markers. If reviewer evidence is below threshold, do not invent consensus.",
|
|
26
35
|
"claim": "The reviewed scope has clear, evidence-based findings, risks, and recommended next actions.",
|
|
27
36
|
"evidence_policy": "Cite inspected files, command outputs, or explicit uncertainty for every material claim.",
|
|
28
37
|
"risk_policy": "Preserve minority high-impact risks and ideas; separate confirmed issues from hypotheses.",
|
|
29
|
-
"output_format": "Markdown sections: Summary, Consensus Findings, Minority Findings, Verification, Judge Notes, Risks, Next Actions."
|
|
38
|
+
"output_format": "Markdown sections: Status (complete/degraded/insufficient_data), Summary, Consensus Findings, Minority Findings, Verification, Judge Notes, Risks, Next Actions."
|
|
30
39
|
},
|
|
31
40
|
"mailbox": {
|
|
32
41
|
"accepts": [
|
|
@@ -55,6 +64,10 @@
|
|
|
55
64
|
"judge_model": "{model}",
|
|
56
65
|
"thinking": "{thinking}",
|
|
57
66
|
"tools": "{tools}",
|
|
67
|
+
"subagent_ttl_ms": "{subagent_ttl_ms}",
|
|
68
|
+
"reviewer_concurrency": "{reviewer_concurrency}",
|
|
69
|
+
"min_successful_reviewers": "{min_successful_reviewers}",
|
|
70
|
+
"merge_policy": "{merge_policy}",
|
|
58
71
|
"evidence_policy": "{evidence_policy}",
|
|
59
72
|
"risk_policy": "{risk_policy}",
|
|
60
73
|
"output_format": "{output_format}"
|
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
"verifier_model:string",
|
|
21
21
|
"merger_model:string",
|
|
22
22
|
"judge_model:string",
|
|
23
|
-
"
|
|
23
|
+
"thinking:string",
|
|
24
|
+
"tools:string",
|
|
25
|
+
"subagent_ttl_ms:int",
|
|
26
|
+
"reviewer_concurrency:string",
|
|
27
|
+
"min_successful_reviewers:int",
|
|
28
|
+
"merge_policy:string"
|
|
24
29
|
],
|
|
25
30
|
"defaults": {
|
|
26
31
|
"scope": ".",
|
|
@@ -36,7 +41,16 @@
|
|
|
36
41
|
"documentation",
|
|
37
42
|
"packaged skills"
|
|
38
43
|
],
|
|
39
|
-
"
|
|
44
|
+
"reviewer_model": "{current_model}",
|
|
45
|
+
"verifier_model": "{current_model}",
|
|
46
|
+
"merger_model": "{current_model}",
|
|
47
|
+
"judge_model": "{current_model}",
|
|
48
|
+
"thinking": "{current_thinking}",
|
|
49
|
+
"tools": "",
|
|
50
|
+
"subagent_ttl_ms": 600000,
|
|
51
|
+
"reviewer_concurrency": "",
|
|
52
|
+
"min_successful_reviewers": 1,
|
|
53
|
+
"merge_policy": "Preserve partial reviewer reports, branch status, and degraded confidence markers. If reviewer evidence is below threshold, do not invent consensus."
|
|
40
54
|
},
|
|
41
55
|
"mailbox": {
|
|
42
56
|
"accepts": [
|
|
@@ -90,8 +104,13 @@
|
|
|
90
104
|
"verifier_model": "{verifier_model}",
|
|
91
105
|
"merger_model": "{merger_model}",
|
|
92
106
|
"judge_model": "{judge_model}",
|
|
107
|
+
"thinking": "{thinking}",
|
|
93
108
|
"tools": "{tools}",
|
|
94
|
-
"
|
|
109
|
+
"subagent_ttl_ms": "{subagent_ttl_ms}",
|
|
110
|
+
"reviewer_concurrency": "{reviewer_concurrency}",
|
|
111
|
+
"min_successful_reviewers": "{min_successful_reviewers}",
|
|
112
|
+
"merge_policy": "{merge_policy}",
|
|
113
|
+
"output_format": "Markdown sections: Status (complete/degraded/insufficient_data), Release Verdict, Blocking Issues, Package/Docs Risks, Validation Evidence, Publish Notes, Required Follow-up."
|
|
95
114
|
}
|
|
96
115
|
},
|
|
97
116
|
{
|
|
@@ -11,7 +11,12 @@
|
|
|
11
11
|
"verifier_model:string",
|
|
12
12
|
"merger_model:string",
|
|
13
13
|
"judge_model:string",
|
|
14
|
-
"
|
|
14
|
+
"thinking:string",
|
|
15
|
+
"tools:string",
|
|
16
|
+
"subagent_ttl_ms:int",
|
|
17
|
+
"reviewer_concurrency:string",
|
|
18
|
+
"min_successful_reviewers:int",
|
|
19
|
+
"merge_policy:string"
|
|
15
20
|
],
|
|
16
21
|
"defaults": {
|
|
17
22
|
"lenses": [
|
|
@@ -21,7 +26,16 @@
|
|
|
21
26
|
"operator UX"
|
|
22
27
|
],
|
|
23
28
|
"release_gate": "The scope is safe to ship or hand to the next release step.",
|
|
24
|
-
"
|
|
29
|
+
"reviewer_model": "{current_model}",
|
|
30
|
+
"verifier_model": "{current_model}",
|
|
31
|
+
"merger_model": "{current_model}",
|
|
32
|
+
"judge_model": "{current_model}",
|
|
33
|
+
"thinking": "{current_thinking}",
|
|
34
|
+
"tools": "",
|
|
35
|
+
"subagent_ttl_ms": 600000,
|
|
36
|
+
"reviewer_concurrency": "",
|
|
37
|
+
"min_successful_reviewers": 1,
|
|
38
|
+
"merge_policy": "Preserve partial reviewer reports, branch status, and degraded confidence markers. If reviewer evidence is below threshold, do not invent consensus."
|
|
25
39
|
},
|
|
26
40
|
"mailbox": {
|
|
27
41
|
"accepts": [
|
|
@@ -45,8 +59,13 @@
|
|
|
45
59
|
"verifier_model": "{verifier_model}",
|
|
46
60
|
"merger_model": "{merger_model}",
|
|
47
61
|
"judge_model": "{judge_model}",
|
|
62
|
+
"thinking": "{thinking}",
|
|
48
63
|
"tools": "{tools}",
|
|
49
|
-
"
|
|
64
|
+
"subagent_ttl_ms": "{subagent_ttl_ms}",
|
|
65
|
+
"reviewer_concurrency": "{reviewer_concurrency}",
|
|
66
|
+
"min_successful_reviewers": "{min_successful_reviewers}",
|
|
67
|
+
"merge_policy": "{merge_policy}",
|
|
68
|
+
"output_format": "Markdown sections: Status (complete/degraded/insufficient_data), Ship Verdict, Blocking Findings, Nonblocking Risks, Evidence, Required Follow-up."
|
|
50
69
|
}
|
|
51
70
|
}
|
|
52
71
|
}
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"rubric": "Judge evidence preservation, severity calibration, consensus purity, internal consistency, and merge bias.",
|
|
14
14
|
"evidence": "Use the provided raw outputs or artifact paths; mark any missing evidence.",
|
|
15
15
|
"output_format": "Markdown sections: Verdict, Issues, Evidence Preservation, Bias Risks, Required Fixes.",
|
|
16
|
-
"
|
|
16
|
+
"model": "{current_model}",
|
|
17
|
+
"thinking": "{current_thinking}",
|
|
17
18
|
"tools": ""
|
|
18
19
|
},
|
|
19
20
|
"mailbox": {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"args": [
|
|
4
4
|
"inputs:string",
|
|
5
5
|
"mode:enum(consensus-first,risk-first)",
|
|
6
|
+
"merge_policy:string",
|
|
6
7
|
"risk_policy:string",
|
|
7
8
|
"output_format:string",
|
|
8
9
|
"model:string",
|
|
@@ -11,9 +12,11 @@
|
|
|
11
12
|
],
|
|
12
13
|
"defaults": {
|
|
13
14
|
"mode": "consensus-first",
|
|
15
|
+
"merge_policy": "Preserve partial reviewer evidence, branch status, and degraded confidence markers.",
|
|
14
16
|
"risk_policy": "Preserve minority severe findings and mark merger-added claims explicitly.",
|
|
15
17
|
"output_format": "Markdown sections: Summary, Consensus, Minority Findings, Contradictions, Next Actions.",
|
|
16
|
-
"
|
|
18
|
+
"model": "{current_model}",
|
|
19
|
+
"thinking": "{current_thinking}",
|
|
17
20
|
"tools": ""
|
|
18
21
|
},
|
|
19
22
|
"mailbox": {
|
|
@@ -27,5 +30,5 @@
|
|
|
27
30
|
"run.failed"
|
|
28
31
|
]
|
|
29
32
|
},
|
|
30
|
-
"template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Merge these subagent outputs using mode {mode}: {inputs}. Risk policy: {risk_policy}. Output format: {output_format}"
|
|
33
|
+
"template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Merge these subagent outputs using mode {mode}: {inputs}. Merge policy: {merge_policy}. Risk policy: {risk_policy}. Output format: {output_format}"
|
|
31
34
|
}
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"defaults": {
|
|
12
12
|
"format": "Markdown sections: Summary, Findings, Evidence, Risks, Next Actions.",
|
|
13
13
|
"preservation_policy": "Do not change meaning, severity, evidence, or uncertainty while normalizing.",
|
|
14
|
-
"
|
|
14
|
+
"model": "{current_model}",
|
|
15
|
+
"thinking": "{current_thinking}",
|
|
15
16
|
"tools": ""
|
|
16
17
|
},
|
|
17
18
|
"mailbox": {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"async": true,
|
|
3
|
+
"args": [
|
|
4
|
+
"stage:string",
|
|
5
|
+
"model:string",
|
|
6
|
+
"thinking:string",
|
|
7
|
+
"tools:string",
|
|
8
|
+
"output_format:string"
|
|
9
|
+
],
|
|
10
|
+
"defaults": {
|
|
11
|
+
"stage": "subagent",
|
|
12
|
+
"model": "{current_model}",
|
|
13
|
+
"thinking": "{current_thinking}",
|
|
14
|
+
"tools": "",
|
|
15
|
+
"output_format": "Reply exactly: ACTOR_PREFLIGHT_OK"
|
|
16
|
+
},
|
|
17
|
+
"mailbox": {
|
|
18
|
+
"accepts": [
|
|
19
|
+
"control.kill"
|
|
20
|
+
],
|
|
21
|
+
"emits": [
|
|
22
|
+
"preflight.completed",
|
|
23
|
+
"command.done",
|
|
24
|
+
"run.done",
|
|
25
|
+
"run.failed"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Preflight check for stage {stage}. Confirm this model, thinking level, and tool policy can start before expensive fanout. Do not inspect files. {output_format}"
|
|
29
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"async": true,
|
|
3
3
|
"imports": {
|
|
4
|
+
"preflight": "subagent-preflight.json",
|
|
4
5
|
"reviewer": "subagent-review.json",
|
|
5
6
|
"verifier": "subagent-verify.json",
|
|
6
7
|
"merger": "subagent-merge.json",
|
|
@@ -17,6 +18,10 @@
|
|
|
17
18
|
"judge_model:string",
|
|
18
19
|
"thinking:string",
|
|
19
20
|
"tools:string",
|
|
21
|
+
"subagent_ttl_ms:int",
|
|
22
|
+
"reviewer_concurrency:string",
|
|
23
|
+
"min_successful_reviewers:int",
|
|
24
|
+
"merge_policy:string",
|
|
20
25
|
"evidence_policy:string",
|
|
21
26
|
"risk_policy:string",
|
|
22
27
|
"output_format:string"
|
|
@@ -28,11 +33,19 @@
|
|
|
28
33
|
"operator UX"
|
|
29
34
|
],
|
|
30
35
|
"claim": "The reviewed scope is ready for the next implementation or release step.",
|
|
31
|
-
"thinking": "
|
|
36
|
+
"thinking": "{current_thinking}",
|
|
32
37
|
"tools": "",
|
|
38
|
+
"subagent_ttl_ms": 600000,
|
|
39
|
+
"reviewer_concurrency": "",
|
|
40
|
+
"min_successful_reviewers": 1,
|
|
41
|
+
"merge_policy": "Preserve partial reviewer reports, branch status, and degraded confidence markers. If reviewer evidence is below threshold, do not invent consensus.",
|
|
33
42
|
"evidence_policy": "Cite inspected files, command output, or explicit uncertainty for every material claim.",
|
|
34
43
|
"risk_policy": "Preserve minority high-impact risks and separate confirmed issues from hypotheses.",
|
|
35
|
-
"output_format": "Markdown sections: Summary, Consensus Findings, Minority Findings, Verification, Judge Notes, Risks, Next Actions."
|
|
44
|
+
"output_format": "Markdown sections: Status (complete/degraded/insufficient_data), Summary, Consensus Findings, Minority Findings, Verification, Judge Notes, Risks, Next Actions.",
|
|
45
|
+
"reviewer_model": "{current_model}",
|
|
46
|
+
"verifier_model": "{current_model}",
|
|
47
|
+
"merger_model": "{current_model}",
|
|
48
|
+
"judge_model": "{current_model}"
|
|
36
49
|
},
|
|
37
50
|
"mailbox": {
|
|
38
51
|
"accepts": [
|
|
@@ -49,12 +62,65 @@
|
|
|
49
62
|
]
|
|
50
63
|
},
|
|
51
64
|
"template": [
|
|
65
|
+
{
|
|
66
|
+
"parallel": true,
|
|
67
|
+
"failure": "root",
|
|
68
|
+
"template": [
|
|
69
|
+
{
|
|
70
|
+
"label": "preflight:reviewer",
|
|
71
|
+
"name": "preflight",
|
|
72
|
+
"timeout": "{subagent_ttl_ms}",
|
|
73
|
+
"values": {
|
|
74
|
+
"stage": "reviewer",
|
|
75
|
+
"model": "{reviewer_model}",
|
|
76
|
+
"thinking": "{thinking}",
|
|
77
|
+
"tools": "{tools}"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"label": "preflight:verifier",
|
|
82
|
+
"name": "preflight",
|
|
83
|
+
"timeout": "{subagent_ttl_ms}",
|
|
84
|
+
"values": {
|
|
85
|
+
"stage": "verifier",
|
|
86
|
+
"model": "{verifier_model}",
|
|
87
|
+
"thinking": "{thinking}",
|
|
88
|
+
"tools": "{tools}"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"label": "preflight:merger",
|
|
93
|
+
"name": "preflight",
|
|
94
|
+
"timeout": "{subagent_ttl_ms}",
|
|
95
|
+
"values": {
|
|
96
|
+
"stage": "merger",
|
|
97
|
+
"model": "{merger_model}",
|
|
98
|
+
"thinking": "{thinking}",
|
|
99
|
+
"tools": "{tools}"
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"label": "preflight:judge",
|
|
104
|
+
"name": "preflight",
|
|
105
|
+
"timeout": "{subagent_ttl_ms}",
|
|
106
|
+
"values": {
|
|
107
|
+
"stage": "judge",
|
|
108
|
+
"model": "{judge_model}",
|
|
109
|
+
"thinking": "{thinking}",
|
|
110
|
+
"tools": "{tools}"
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
52
115
|
{
|
|
53
116
|
"parallel": true,
|
|
54
117
|
"repeat": "{lenses.length}",
|
|
118
|
+
"concurrency": "{reviewer_concurrency}",
|
|
119
|
+
"min_successful": "{min_successful_reviewers}",
|
|
55
120
|
"failure": "branch",
|
|
56
121
|
"template": {
|
|
57
122
|
"name": "reviewer",
|
|
123
|
+
"timeout": "{subagent_ttl_ms}",
|
|
58
124
|
"values": {
|
|
59
125
|
"scope": "{scope}",
|
|
60
126
|
"lens": "{lenses[index]}",
|
|
@@ -68,9 +134,10 @@
|
|
|
68
134
|
},
|
|
69
135
|
{
|
|
70
136
|
"name": "verifier",
|
|
137
|
+
"timeout": "{subagent_ttl_ms}",
|
|
71
138
|
"values": {
|
|
72
139
|
"claim": "{claim}",
|
|
73
|
-
"evidence": "Use previous reviewer outputs from stdin and named scope: {scope}.",
|
|
140
|
+
"evidence": "Use previous reviewer outputs from stdin and named scope: {scope}. Respect the parallel_status header and verify only against usable reviewer evidence.",
|
|
74
141
|
"model": "{verifier_model}",
|
|
75
142
|
"thinking": "{thinking}",
|
|
76
143
|
"tools": "{tools}",
|
|
@@ -79,32 +146,37 @@
|
|
|
79
146
|
},
|
|
80
147
|
{
|
|
81
148
|
"name": "merger",
|
|
149
|
+
"timeout": "{subagent_ttl_ms}",
|
|
82
150
|
"values": {
|
|
83
151
|
"inputs": "Use previous reviewer and verifier outputs from stdin.",
|
|
84
152
|
"mode": "consensus-first",
|
|
153
|
+
"merge_policy": "{merge_policy}",
|
|
85
154
|
"model": "{merger_model}",
|
|
86
|
-
"thinking": "
|
|
155
|
+
"thinking": "{thinking}",
|
|
87
156
|
"tools": "{tools}",
|
|
88
157
|
"risk_policy": "{risk_policy}"
|
|
89
158
|
}
|
|
90
159
|
},
|
|
91
160
|
{
|
|
92
161
|
"name": "judge",
|
|
162
|
+
"timeout": "{subagent_ttl_ms}",
|
|
93
163
|
"values": {
|
|
94
164
|
"report": "Use merged output from stdin.",
|
|
95
|
-
"evidence": "Use previous reviewer, verifier, and merger outputs from stdin.",
|
|
165
|
+
"evidence": "Use previous reviewer, verifier, and merger outputs from stdin. Preserve complete/degraded/insufficient_data status.",
|
|
96
166
|
"model": "{judge_model}",
|
|
97
|
-
"thinking": "
|
|
167
|
+
"thinking": "{thinking}",
|
|
98
168
|
"tools": "{tools}"
|
|
99
169
|
}
|
|
100
170
|
},
|
|
101
171
|
{
|
|
102
172
|
"name": "normalizer",
|
|
173
|
+
"timeout": "{subagent_ttl_ms}",
|
|
103
174
|
"values": {
|
|
104
175
|
"input": "Use merged and judged output from stdin.",
|
|
105
176
|
"format": "{output_format}",
|
|
177
|
+
"preservation_policy": "Preserve branch status and explicitly mark Status as complete, degraded, or insufficient_data.",
|
|
106
178
|
"model": "{merger_model}",
|
|
107
|
-
"thinking": "
|
|
179
|
+
"thinking": "{thinking}",
|
|
108
180
|
"tools": "{tools}"
|
|
109
181
|
}
|
|
110
182
|
}
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"evidence_policy": "Cite inspected files, command output, or explicit uncertainty for every material claim.",
|
|
18
18
|
"risk_policy": "Preserve minority high-impact risks and separate confirmed issues from hypotheses.",
|
|
19
19
|
"output_format": "Markdown sections: Findings, Evidence, Risks, Next Actions.",
|
|
20
|
-
"
|
|
20
|
+
"model": "{current_model}",
|
|
21
|
+
"thinking": "{current_thinking}",
|
|
21
22
|
"tools": ""
|
|
22
23
|
},
|
|
23
24
|
"mailbox": {
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"acceptance": "Separate proven, disproven, unknown, and missing evidence.",
|
|
15
15
|
"evidence_policy": "Do not infer beyond provided evidence or inspected artifacts.",
|
|
16
16
|
"output_format": "Markdown sections: Verdict, Evidence, Gaps, Confidence.",
|
|
17
|
-
"
|
|
17
|
+
"model": "{current_model}",
|
|
18
|
+
"thinking": "{current_thinking}",
|
|
18
19
|
"tools": ""
|
|
19
20
|
},
|
|
20
21
|
"mailbox": {
|