@llblab/pi-actors 0.12.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.
Files changed (86) hide show
  1. package/AGENTS.md +72 -0
  2. package/BACKLOG.md +38 -0
  3. package/CHANGELOG.md +179 -0
  4. package/README.md +338 -0
  5. package/docs/README.md +21 -0
  6. package/docs/actor-messages.md +149 -0
  7. package/docs/async-runs.md +335 -0
  8. package/docs/command-templates.md +424 -0
  9. package/docs/component-recipes.md +148 -0
  10. package/docs/recipe-library.md +176 -0
  11. package/docs/task-first-recipes.md +233 -0
  12. package/docs/template-recipes.md +285 -0
  13. package/docs/tool-registry.md +142 -0
  14. package/index.ts +198 -0
  15. package/lib/actor-messages.ts +120 -0
  16. package/lib/async-runs.ts +688 -0
  17. package/lib/command-templates.ts +795 -0
  18. package/lib/config.ts +266 -0
  19. package/lib/execution.ts +720 -0
  20. package/lib/file-state.ts +24 -0
  21. package/lib/identity.ts +29 -0
  22. package/lib/observability.ts +525 -0
  23. package/lib/output.ts +123 -0
  24. package/lib/paths.ts +35 -0
  25. package/lib/prompts.ts +75 -0
  26. package/lib/recipe-references.ts +586 -0
  27. package/lib/registry.ts +302 -0
  28. package/lib/runtime.ts +101 -0
  29. package/lib/schema.ts +402 -0
  30. package/lib/temp.ts +44 -0
  31. package/lib/tools.ts +651 -0
  32. package/package.json +52 -0
  33. package/recipes/music-player.json +25 -0
  34. package/recipes/pipeline-architect-coordinator.json +88 -0
  35. package/recipes/pipeline-artifact-report.json +52 -0
  36. package/recipes/pipeline-artifact-write.json +66 -0
  37. package/recipes/pipeline-async-run-ops.json +67 -0
  38. package/recipes/pipeline-checkpoint-continuation.json +57 -0
  39. package/recipes/pipeline-development-tasking.json +73 -0
  40. package/recipes/pipeline-docs-maintenance.json +72 -0
  41. package/recipes/pipeline-media-library.json +51 -0
  42. package/recipes/pipeline-quorum-review.json +72 -0
  43. package/recipes/pipeline-release-readiness.json +83 -0
  44. package/recipes/pipeline-repo-health.json +81 -0
  45. package/recipes/pipeline-research-synthesis.json +87 -0
  46. package/recipes/pipeline-review-readiness.json +49 -0
  47. package/recipes/subagent-artifact.json +26 -0
  48. package/recipes/subagent-checkpoint.json +27 -0
  49. package/recipes/subagent-conflict-report.json +25 -0
  50. package/recipes/subagent-contradiction-map.json +26 -0
  51. package/recipes/subagent-critic.json +28 -0
  52. package/recipes/subagent-evidence-map.json +26 -0
  53. package/recipes/subagent-followup.json +27 -0
  54. package/recipes/subagent-judge.json +26 -0
  55. package/recipes/subagent-merge.json +26 -0
  56. package/recipes/subagent-message.json +29 -0
  57. package/recipes/subagent-normalize.json +24 -0
  58. package/recipes/subagent-plan.json +26 -0
  59. package/recipes/subagent-prompt.json +22 -0
  60. package/recipes/subagent-quorum.json +41 -0
  61. package/recipes/subagent-review-coordinator.json +107 -0
  62. package/recipes/subagent-review.json +30 -0
  63. package/recipes/subagent-task-card.json +28 -0
  64. package/recipes/subagent-tools.json +17 -0
  65. package/recipes/subagent-verify.json +27 -0
  66. package/recipes/subagents-prompts.json +32 -0
  67. package/recipes/utility-actor-message.json +24 -0
  68. package/recipes/utility-artifact-manifest.json +17 -0
  69. package/recipes/utility-artifact-write.json +17 -0
  70. package/recipes/utility-changelog-head.json +12 -0
  71. package/recipes/utility-changelog-section.json +14 -0
  72. package/recipes/utility-git-log.json +12 -0
  73. package/recipes/utility-git-status.json +10 -0
  74. package/recipes/utility-jsonl-tail.json +11 -0
  75. package/recipes/utility-markdown-index.json +15 -0
  76. package/recipes/utility-package-summary.json +12 -0
  77. package/recipes/utility-playlist-build.json +18 -0
  78. package/recipes/utility-playlist-scan.json +12 -0
  79. package/recipes/utility-run-state-files.json +14 -0
  80. package/recipes/utility-run-summary.json +12 -0
  81. package/recipes/utility-validate-recipe.json +14 -0
  82. package/recipes/utility-validation-wrapper.json +14 -0
  83. package/scripts/async-runner.mjs +170 -0
  84. package/scripts/music-player.mjs +637 -0
  85. package/scripts/recipe-utils.mjs +273 -0
  86. package/scripts/validate-recipe.mjs +89 -0
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "pipeline-release-readiness",
3
+ "async": true,
4
+ "imports": {
5
+ "changelog": "utility-changelog-section.json",
6
+ "validation": "utility-validation-wrapper.json",
7
+ "review": "subagent-review-coordinator.json",
8
+ "artifact": "pipeline-artifact-report.json"
9
+ },
10
+ "args": [
11
+ "scope:path",
12
+ "version:string",
13
+ "validation_command:string",
14
+ "artifact_path:path",
15
+ "lenses:array",
16
+ "reviewer_model:string",
17
+ "verifier_model:string",
18
+ "merger_model:string",
19
+ "judge_model:string",
20
+ "tools:string"
21
+ ],
22
+ "defaults": {
23
+ "scope": ".",
24
+ "version": "0.7.1",
25
+ "validation_command": "npm run validate",
26
+ "artifact_path": "./release-readiness.md",
27
+ "lenses": [
28
+ "release",
29
+ "package contents",
30
+ "operator UX",
31
+ "documentation"
32
+ ],
33
+ "reviewer_model": "openai-codex/gpt-5.5",
34
+ "verifier_model": "openai-codex/gpt-5.5",
35
+ "merger_model": "openai-codex/gpt-5.5",
36
+ "judge_model": "openai-codex/gpt-5.5",
37
+ "tools": ""
38
+ },
39
+ "mailbox": {
40
+ "accepts": ["control.stop"],
41
+ "emits": ["release.completed", "artifact.prepared", "command.done", "run.done", "run.failed"]
42
+ },
43
+ "template": [
44
+ {
45
+ "name": "changelog",
46
+ "values": {
47
+ "file": "{scope}/CHANGELOG.md",
48
+ "version": "{version}"
49
+ }
50
+ },
51
+ {
52
+ "name": "validation",
53
+ "values": {
54
+ "scope": "{scope}",
55
+ "command": "{validation_command}"
56
+ }
57
+ },
58
+ {
59
+ "name": "review",
60
+ "values": {
61
+ "scope": "Release scope {scope} for version {version}. Use changelog and validation output from stdin.",
62
+ "lenses": "{lenses}",
63
+ "claim": "Version {version} is ready for release or the remaining blockers are explicitly identified.",
64
+ "reviewer_model": "{reviewer_model}",
65
+ "verifier_model": "{verifier_model}",
66
+ "merger_model": "{merger_model}",
67
+ "judge_model": "{judge_model}",
68
+ "tools": "{tools}",
69
+ "output_format": "Markdown sections: Release Verdict, Blocking Issues, Package/Docs Risks, Validation Evidence, Publish Notes, Required Follow-up."
70
+ }
71
+ },
72
+ {
73
+ "name": "artifact",
74
+ "values": {
75
+ "input": "Use release readiness review from stdin.",
76
+ "artifact_path": "{artifact_path}",
77
+ "artifact_format": "Markdown sections: Release Verdict, Evidence, Risks, Checklist, Next Actions.",
78
+ "model": "{merger_model}",
79
+ "tools": "{tools}"
80
+ }
81
+ }
82
+ ]
83
+ }
@@ -0,0 +1,81 @@
1
+ {
2
+ "name": "pipeline-repo-health",
3
+ "async": true,
4
+ "imports": {
5
+ "git_status": "utility-git-status.json",
6
+ "git_log": "utility-git-log.json",
7
+ "docs_index": "utility-markdown-index.json",
8
+ "validation": "utility-validation-wrapper.json",
9
+ "normalizer": "subagent-normalize.json",
10
+ "artifact": "pipeline-artifact-report.json"
11
+ },
12
+ "args": [
13
+ "repo:path",
14
+ "docs_dir:path",
15
+ "validation_command:string",
16
+ "artifact_path:path",
17
+ "model:string",
18
+ "tools:string"
19
+ ],
20
+ "defaults": {
21
+ "repo": ".",
22
+ "docs_dir": "docs",
23
+ "validation_command": "npm run validate",
24
+ "artifact_path": "./repo-health.md",
25
+ "model": "openai-codex/gpt-5.5",
26
+ "tools": ""
27
+ },
28
+ "mailbox": {
29
+ "accepts": ["control.stop"],
30
+ "emits": ["repo_health.completed", "artifact.prepared", "command.done", "run.done", "run.failed"]
31
+ },
32
+ "template": [
33
+ {
34
+ "name": "git_status",
35
+ "values": {
36
+ "repo": "{repo}"
37
+ }
38
+ },
39
+ {
40
+ "name": "git_log",
41
+ "values": {
42
+ "repo": "{repo}",
43
+ "count": "8"
44
+ }
45
+ },
46
+ {
47
+ "name": "docs_index",
48
+ "values": {
49
+ "directory": "{repo}/{docs_dir}",
50
+ "title": "Documentation Index"
51
+ }
52
+ },
53
+ {
54
+ "name": "validation",
55
+ "values": {
56
+ "scope": "{repo}",
57
+ "command": "{validation_command}"
58
+ }
59
+ },
60
+ {
61
+ "name": "normalizer",
62
+ "values": {
63
+ "input": "Use repository status, recent log, docs index, and validation output from stdin. Repo: {repo}.",
64
+ "format": "Markdown sections: Branch State, Recent Commits, Docs Surface, Validation, Risks, Next Actions.",
65
+ "model": "{model}",
66
+ "thinking": "off",
67
+ "tools": "{tools}"
68
+ }
69
+ },
70
+ {
71
+ "name": "artifact",
72
+ "values": {
73
+ "input": "Use normalized repo health output from stdin.",
74
+ "artifact_path": "{artifact_path}",
75
+ "artifact_format": "Markdown sections: Branch State, Validation, Risks, Next Actions.",
76
+ "model": "{model}",
77
+ "tools": "{tools}"
78
+ }
79
+ }
80
+ ]
81
+ }
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "pipeline-research-synthesis",
3
+ "async": true,
4
+ "imports": {
5
+ "planner": "subagent-plan.json",
6
+ "evidence": "subagent-evidence-map.json",
7
+ "contradictions": "subagent-contradiction-map.json",
8
+ "verifier": "subagent-verify.json",
9
+ "merger": "subagent-merge.json",
10
+ "normalizer": "subagent-normalize.json"
11
+ },
12
+ "args": [
13
+ "question:string",
14
+ "sources:string",
15
+ "constraints:string",
16
+ "model:string",
17
+ "tools:string"
18
+ ],
19
+ "defaults": {
20
+ "sources": "Use provided source notes or artifact paths only; mark missing evidence.",
21
+ "constraints": "Bound the question, preserve contradictions, and avoid publication-style certainty when evidence is weak.",
22
+ "model": "openai-codex/gpt-5.5",
23
+ "tools": ""
24
+ },
25
+ "mailbox": {
26
+ "accepts": ["control.stop"],
27
+ "emits": ["research.completed", "command.done", "run.done", "run.failed"]
28
+ },
29
+ "template": [
30
+ {
31
+ "name": "planner",
32
+ "values": {
33
+ "goal": "Answer research question: {question}",
34
+ "scope": "Sources: {sources}",
35
+ "constraints": "{constraints}",
36
+ "model": "{model}",
37
+ "tools": "{tools}"
38
+ }
39
+ },
40
+ {
41
+ "name": "evidence",
42
+ "values": {
43
+ "question": "{question}",
44
+ "sources": "{sources}",
45
+ "model": "{model}",
46
+ "tools": "{tools}"
47
+ }
48
+ },
49
+ {
50
+ "name": "contradictions",
51
+ "values": {
52
+ "inputs": "Use plan and evidence map from stdin.",
53
+ "focus": "Contradictions, weak evidence, and missing source classes for question: {question}",
54
+ "model": "{model}",
55
+ "tools": "{tools}"
56
+ }
57
+ },
58
+ {
59
+ "name": "verifier",
60
+ "values": {
61
+ "claim": "The synthesis can answer the research question within the stated constraints.",
62
+ "evidence": "Use plan, evidence map, and contradiction map from stdin.",
63
+ "model": "{model}",
64
+ "tools": "{tools}"
65
+ }
66
+ },
67
+ {
68
+ "name": "merger",
69
+ "values": {
70
+ "inputs": "Use all previous research outputs from stdin.",
71
+ "mode": "risk-first",
72
+ "risk_policy": "Preserve uncertainty and contradictions over forced consensus.",
73
+ "model": "{model}",
74
+ "tools": "{tools}"
75
+ }
76
+ },
77
+ {
78
+ "name": "normalizer",
79
+ "values": {
80
+ "input": "Use merged research synthesis from stdin.",
81
+ "format": "Markdown sections: Question, Evidence Map, Synthesis, Contradictions, Confidence, Missing Evidence, Next Evidence Slice.",
82
+ "model": "{model}",
83
+ "tools": "{tools}"
84
+ }
85
+ }
86
+ ]
87
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "pipeline-review-readiness",
3
+ "async": true,
4
+ "imports": {
5
+ "coordinator": "subagent-review-coordinator.json"
6
+ },
7
+ "args": [
8
+ "scope:string",
9
+ "lenses:array",
10
+ "release_gate:string",
11
+ "reviewer_model:string",
12
+ "verifier_model:string",
13
+ "merger_model:string",
14
+ "judge_model:string",
15
+ "tools:string"
16
+ ],
17
+ "defaults": {
18
+ "lenses": [
19
+ "correctness",
20
+ "tests",
21
+ "release",
22
+ "operator UX"
23
+ ],
24
+ "release_gate": "The scope is safe to ship or hand to the next release step.",
25
+ "reviewer_model": "openai-codex/gpt-5.5",
26
+ "verifier_model": "openai-codex/gpt-5.5",
27
+ "merger_model": "openai-codex/gpt-5.5",
28
+ "judge_model": "openai-codex/gpt-5.5",
29
+ "tools": ""
30
+ },
31
+ "mailbox": {
32
+ "accepts": ["control.stop"],
33
+ "emits": ["review.completed", "pipeline.completed", "command.done", "run.done", "run.failed"]
34
+ },
35
+ "template": {
36
+ "name": "coordinator",
37
+ "values": {
38
+ "scope": "{scope}",
39
+ "lenses": "{lenses}",
40
+ "claim": "{release_gate}",
41
+ "reviewer_model": "{reviewer_model}",
42
+ "verifier_model": "{verifier_model}",
43
+ "merger_model": "{merger_model}",
44
+ "judge_model": "{judge_model}",
45
+ "tools": "{tools}",
46
+ "output_format": "Markdown sections: Ship Verdict, Blocking Findings, Nonblocking Risks, Evidence, Required Follow-up."
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "subagent-artifact",
3
+ "async": true,
4
+ "args": [
5
+ "input:string",
6
+ "artifact_path:path",
7
+ "artifact_format:string",
8
+ "write_policy:string",
9
+ "validation_policy:string",
10
+ "model:string",
11
+ "thinking:string",
12
+ "tools:string"
13
+ ],
14
+ "defaults": {
15
+ "artifact_format": "Markdown with stable headings and preserved evidence.",
16
+ "write_policy": "Prepare content for the artifact path and state whether the caller should write, append, or review before writing.",
17
+ "validation_policy": "List checks the caller should run before accepting the artifact; distinguish required checks from optional review.",
18
+ "model": "openai-codex/gpt-5.5",
19
+ "thinking": "off",
20
+ "tools": ""
21
+ },
22
+ "mailbox": {
23
+ "emits": ["artifact.prepared", "artifact.blocked"]
24
+ },
25
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Prepare a durable artifact. Target path: {artifact_path}. Format: {artifact_format}. Write policy: {write_policy}. Validation policy: {validation_policy}. Input: {input}"
26
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "subagent-checkpoint",
3
+ "async": true,
4
+ "args": [
5
+ "state:string",
6
+ "question:string",
7
+ "options:string",
8
+ "resume_policy:string",
9
+ "output_format:string",
10
+ "model:string",
11
+ "thinking:string",
12
+ "tools:string"
13
+ ],
14
+ "defaults": {
15
+ "options": "List options considered, recommendation, and risk if the coordinator does not answer.",
16
+ "resume_policy": "Do not claim same-context resume unless the adapter provides a resumable session id; otherwise emit degraded artifact state.",
17
+ "output_format": "Markdown sections: Preserved State, Question, Options, Recommendation, Risk If Guessed, Resume Mode.",
18
+ "model": "openai-codex/gpt-5.5",
19
+ "thinking": "off",
20
+ "tools": ""
21
+ },
22
+ "mailbox": {
23
+ "accepts": ["control.continue", "control.revise", "control.stop"],
24
+ "emits": ["checkpoint.needs_input"]
25
+ },
26
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Create a bounded coordinator checkpoint. State to preserve: {state}. Question: {question}. Options/risk format: {options}. Resume policy: {resume_policy}. Output format: {output_format}"
27
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "subagent-conflict-report",
3
+ "async": true,
4
+ "args": [
5
+ "change:string",
6
+ "conflict:string",
7
+ "preserve_policy:string",
8
+ "output_format:string",
9
+ "model:string",
10
+ "thinking:string",
11
+ "tools:string"
12
+ ],
13
+ "defaults": {
14
+ "preserve_policy": "Describe what must be preserved, what can be discarded, and suggested resolver action.",
15
+ "output_format": "Markdown sections: Conflict, My Changes, Other Changes, Preserve, Discard, Suggested Resolution, Risks.",
16
+ "model": "openai-codex/gpt-5.5",
17
+ "thinking": "off",
18
+ "tools": ""
19
+ },
20
+ "mailbox": {
21
+ "accepts": ["control.stop"],
22
+ "emits": ["conflict_report.completed", "command.done", "run.done", "run.failed"]
23
+ },
24
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Write a bounded conflict report. My change: {change}. Conflict: {conflict}. Preserve policy: {preserve_policy}. Output format: {output_format}"
25
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "subagent-contradiction-map",
3
+ "async": true,
4
+ "args": [
5
+ "inputs:string",
6
+ "focus:string",
7
+ "resolution_policy:string",
8
+ "output_format:string",
9
+ "model:string",
10
+ "thinking:string",
11
+ "tools:string"
12
+ ],
13
+ "defaults": {
14
+ "focus": "Find contradictions, unresolved assumptions, incompatible recommendations, and evidence gaps.",
15
+ "resolution_policy": "Do not force consensus; preserve unresolved conflicts and name what evidence would resolve them.",
16
+ "output_format": "Markdown sections: Contradictions, Affected Claims, Resolution Evidence, Unresolved Risks.",
17
+ "model": "openai-codex/gpt-5.5",
18
+ "thinking": "medium",
19
+ "tools": ""
20
+ },
21
+ "mailbox": {
22
+ "accepts": ["control.stop"],
23
+ "emits": ["contradiction.completed", "command.done", "run.done", "run.failed"]
24
+ },
25
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Map contradictions in these inputs: {inputs}. Focus: {focus}. Resolution policy: {resolution_policy}. Output format: {output_format}"
26
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "subagent-critic",
3
+ "async": true,
4
+ "args": [
5
+ "target:string",
6
+ "lens:string",
7
+ "constraints:string",
8
+ "risk_policy:string",
9
+ "output_format:string",
10
+ "model:string",
11
+ "thinking:string",
12
+ "tools:string"
13
+ ],
14
+ "defaults": {
15
+ "lens": "assumption and failure-mode critic",
16
+ "constraints": "Stay bounded to the target; do not redesign unrelated systems.",
17
+ "risk_policy": "Prefer falsifiable objections and separate blockers from caveats.",
18
+ "output_format": "Markdown sections: Assumptions, Failure Modes, Counterarguments, Tests, Recommendation.",
19
+ "model": "openai-codex/gpt-5.5",
20
+ "thinking": "medium",
21
+ "tools": ""
22
+ },
23
+ "mailbox": {
24
+ "accepts": ["control.stop"],
25
+ "emits": ["critique.completed", "command.done", "run.done", "run.failed"]
26
+ },
27
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Critique this target through lens {lens}: {target}. Constraints: {constraints}. Risk policy: {risk_policy}. Output format: {output_format}"
28
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "subagent-evidence-map",
3
+ "async": true,
4
+ "args": [
5
+ "question:string",
6
+ "sources:string",
7
+ "source_policy:string",
8
+ "output_format:string",
9
+ "model:string",
10
+ "thinking:string",
11
+ "tools:string"
12
+ ],
13
+ "defaults": {
14
+ "sources": "Use only provided source notes, inspected artifacts, or explicit uncertainty.",
15
+ "source_policy": "Separate direct evidence, weak evidence, contradictions, and missing evidence.",
16
+ "output_format": "Markdown sections: Question, Evidence Map, Contradictions, Missing Evidence, Confidence.",
17
+ "model": "openai-codex/gpt-5.5",
18
+ "thinking": "medium",
19
+ "tools": ""
20
+ },
21
+ "mailbox": {
22
+ "accepts": ["control.stop"],
23
+ "emits": ["evidence.completed", "command.done", "run.done", "run.failed"]
24
+ },
25
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Build an evidence map for question: {question}. Sources: {sources}. Source policy: {source_policy}. Output format: {output_format}"
26
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "subagent-followup",
3
+ "async": true,
4
+ "args": [
5
+ "checkpoint:string",
6
+ "reply:string",
7
+ "mode:enum(same-context,degraded-new-branch)",
8
+ "continuity_policy:string",
9
+ "output_format:string",
10
+ "model:string",
11
+ "thinking:string",
12
+ "tools:string"
13
+ ],
14
+ "defaults": {
15
+ "mode": "degraded-new-branch",
16
+ "continuity_policy": "If mode is degraded-new-branch, explicitly state what context continuity was lost and what was reconstructed from the checkpoint.",
17
+ "output_format": "Markdown sections: Continuation Mode, Applied Reply, Lost Context, Continued Work, Next Actions.",
18
+ "model": "openai-codex/gpt-5.5",
19
+ "thinking": "off",
20
+ "tools": ""
21
+ },
22
+ "mailbox": {
23
+ "accepts": ["control.reply", "control.revise", "control.stop"],
24
+ "emits": ["checkpoint.continued"]
25
+ },
26
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Continue from checkpoint using mode {mode}. Checkpoint: {checkpoint}. Coordinator reply: {reply}. Continuity policy: {continuity_policy}. Output format: {output_format}"
27
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "subagent-judge",
3
+ "async": true,
4
+ "args": [
5
+ "report:string",
6
+ "rubric:string",
7
+ "evidence:string",
8
+ "output_format:string",
9
+ "model:string",
10
+ "thinking:string",
11
+ "tools:string"
12
+ ],
13
+ "defaults": {
14
+ "rubric": "Judge evidence preservation, severity calibration, consensus purity, internal consistency, and merge bias.",
15
+ "evidence": "Use the provided raw outputs or artifact paths; mark any missing evidence.",
16
+ "output_format": "Markdown sections: Verdict, Issues, Evidence Preservation, Bias Risks, Required Fixes.",
17
+ "model": "openai-codex/gpt-5.5",
18
+ "thinking": "medium",
19
+ "tools": ""
20
+ },
21
+ "mailbox": {
22
+ "accepts": ["control.stop"],
23
+ "emits": ["judge.completed", "command.done", "run.done", "run.failed"]
24
+ },
25
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Judge this report: {report}. Rubric: {rubric}. Evidence: {evidence}. Output format: {output_format}"
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "subagent-merge",
3
+ "async": true,
4
+ "args": [
5
+ "inputs:string",
6
+ "mode:enum(consensus-first,risk-first)",
7
+ "risk_policy:string",
8
+ "output_format:string",
9
+ "model:string",
10
+ "thinking:string",
11
+ "tools:string"
12
+ ],
13
+ "defaults": {
14
+ "mode": "consensus-first",
15
+ "risk_policy": "Preserve minority severe findings and mark merger-added claims explicitly.",
16
+ "output_format": "Markdown sections: Summary, Consensus, Minority Findings, Contradictions, Next Actions.",
17
+ "model": "openai-codex/gpt-5.5",
18
+ "thinking": "medium",
19
+ "tools": ""
20
+ },
21
+ "mailbox": {
22
+ "accepts": ["control.stop"],
23
+ "emits": ["merge.completed", "command.done", "run.done", "run.failed"]
24
+ },
25
+ "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}"
26
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "subagent-message",
3
+ "async": true,
4
+ "args": [
5
+ "type:string",
6
+ "payload:string",
7
+ "to:string",
8
+ "from:string",
9
+ "message_policy:string",
10
+ "output_format:string",
11
+ "model:string",
12
+ "thinking:string",
13
+ "tools:string"
14
+ ],
15
+ "defaults": {
16
+ "type": "component.update",
17
+ "to": "coordinator",
18
+ "from": "run:{run_id}",
19
+ "message_policy": "Emit an actor-message envelope-shaped JSON object for the coordinator; do not call transport tools directly.",
20
+ "output_format": "JSON object with to, from, type, summary, body, metadata, confidence, and next_action.",
21
+ "model": "openai-codex/gpt-5.5",
22
+ "thinking": "off",
23
+ "tools": ""
24
+ },
25
+ "mailbox": {
26
+ "emits": ["component.*"]
27
+ },
28
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Create an actor-message envelope-shaped record. To: {to}. From: {from}. Type: {type}. Message policy: {message_policy}. Payload/body: {payload}. Output format: {output_format}"
29
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "subagent-normalize",
3
+ "async": true,
4
+ "args": [
5
+ "input:string",
6
+ "format:string",
7
+ "preservation_policy:string",
8
+ "model:string",
9
+ "thinking:string",
10
+ "tools:string"
11
+ ],
12
+ "defaults": {
13
+ "format": "Markdown sections: Summary, Findings, Evidence, Risks, Next Actions.",
14
+ "preservation_policy": "Do not change meaning, severity, evidence, or uncertainty while normalizing.",
15
+ "model": "openai-codex/gpt-5.5",
16
+ "thinking": "off",
17
+ "tools": ""
18
+ },
19
+ "mailbox": {
20
+ "accepts": ["control.stop"],
21
+ "emits": ["normalize.completed", "command.done", "run.done", "run.failed"]
22
+ },
23
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Normalize this subagent output. Target format: {format}. Preservation policy: {preservation_policy}. Input: {input}"
24
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "subagent-plan",
3
+ "async": true,
4
+ "args": [
5
+ "goal:string",
6
+ "constraints:string",
7
+ "scope:string",
8
+ "output_format:string",
9
+ "model:string",
10
+ "thinking:string",
11
+ "tools:string"
12
+ ],
13
+ "defaults": {
14
+ "constraints": "Prefer small reversible slices, explicit validation gates, and no broad speculative rewrites.",
15
+ "scope": "Use the provided problem statement and any named artifact paths.",
16
+ "output_format": "Markdown sections: Goal, Constraints, Plan Slices, Risks, Validation Gates, Stop Conditions.",
17
+ "model": "openai-codex/gpt-5.5",
18
+ "thinking": "medium",
19
+ "tools": ""
20
+ },
21
+ "mailbox": {
22
+ "accepts": ["control.stop"],
23
+ "emits": ["plan.completed", "command.done", "run.done", "run.failed"]
24
+ },
25
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Plan how to reach this goal: {goal}. Scope: {scope}. Constraints: {constraints}. Output format: {output_format}"
26
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "name": "subagent-prompt",
3
+ "async": true,
4
+ "args": [
5
+ "prompt:string",
6
+ "model:string",
7
+ "thinking:string",
8
+ "tools:string",
9
+ "output_format:string"
10
+ ],
11
+ "defaults": {
12
+ "model": "openai-codex/gpt-5.5",
13
+ "thinking": "off",
14
+ "tools": "",
15
+ "output_format": "Concise Markdown with assumptions and next actions."
16
+ },
17
+ "mailbox": {
18
+ "accepts": ["control.stop"],
19
+ "emits": ["command.done", "run.done", "run.failed"]
20
+ },
21
+ "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} {prompt}. Output format: {output_format}"
22
+ }