@llblab/pi-actors 0.14.3 → 0.15.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 (67) hide show
  1. package/AGENTS.md +5 -1
  2. package/BACKLOG.md +18 -32
  3. package/CHANGELOG.md +20 -0
  4. package/README.md +24 -20
  5. package/docs/actor-messages.md +1 -1
  6. package/docs/async-runs.md +4 -4
  7. package/docs/command-templates.md +11 -11
  8. package/docs/recipe-library.md +7 -3
  9. package/docs/task-first-recipes.md +44 -43
  10. package/docs/template-recipes.md +7 -2
  11. package/docs/tool-registry.md +7 -5
  12. package/lib/actor-messages.ts +20 -7
  13. package/lib/async-runs.ts +25 -12
  14. package/lib/command-templates.ts +6 -1
  15. package/lib/config.ts +2 -2
  16. package/lib/execution.ts +9 -5
  17. package/lib/observability.ts +20 -10
  18. package/lib/prompts.ts +13 -20
  19. package/lib/tools.ts +196 -64
  20. package/package.json +17 -9
  21. package/recipes/coordinator-locker.json +46 -0
  22. package/recipes/music-player.json +16 -2
  23. package/recipes/pipeline-architect-coordinator.json +11 -3
  24. package/recipes/pipeline-artifact-bundle.json +12 -3
  25. package/recipes/pipeline-artifact-report.json +9 -3
  26. package/recipes/pipeline-artifact-write.json +9 -3
  27. package/recipes/pipeline-async-run-ops.json +18 -9
  28. package/recipes/pipeline-checkpoint-continuation.json +14 -3
  29. package/recipes/pipeline-development-tasking.json +12 -3
  30. package/recipes/pipeline-docs-maintenance.json +12 -3
  31. package/recipes/pipeline-media-library.json +12 -3
  32. package/recipes/pipeline-quorum-review.json +12 -9
  33. package/recipes/pipeline-release-readiness.json +27 -9
  34. package/recipes/pipeline-release-summary.json +89 -0
  35. package/recipes/pipeline-repo-health.json +12 -3
  36. package/recipes/pipeline-research-synthesis.json +11 -3
  37. package/recipes/pipeline-review-readiness.json +12 -6
  38. package/recipes/subagent-artifact.json +9 -3
  39. package/recipes/subagent-checkpoint.json +10 -3
  40. package/recipes/subagent-conflict-report.json +11 -3
  41. package/recipes/subagent-contradiction-map.json +11 -3
  42. package/recipes/subagent-critic.json +11 -3
  43. package/recipes/subagent-evidence-map.json +11 -3
  44. package/recipes/subagent-followup.json +10 -3
  45. package/recipes/subagent-judge.json +11 -3
  46. package/recipes/subagent-merge.json +11 -3
  47. package/recipes/subagent-message.json +8 -3
  48. package/recipes/subagent-normalize.json +11 -3
  49. package/recipes/subagent-plan.json +11 -3
  50. package/recipes/subagent-prompt.json +10 -3
  51. package/recipes/subagent-quorum.json +10 -7
  52. package/recipes/subagent-review-coordinator.json +14 -6
  53. package/recipes/subagent-review.json +11 -3
  54. package/recipes/subagent-task-card.json +11 -3
  55. package/recipes/subagent-tools.json +10 -3
  56. package/recipes/subagent-verify.json +11 -3
  57. package/recipes/subagents-prompts.json +10 -3
  58. package/recipes/utility-coordinator-lock-snapshot.json +14 -0
  59. package/recipes/utility-run-ops-snapshot.json +3 -3
  60. package/recipes/utility-skill-summary.json +14 -0
  61. package/scripts/coordinator-locker.mjs +272 -0
  62. package/scripts/music-player.mjs +2 -1
  63. package/scripts/recipe-utils.mjs +239 -81
  64. package/scripts/validate-recipe.mjs +28 -10
  65. package/skills/actors/SKILL.md +283 -0
  66. package/skills/swarm/SKILL.md +451 -0
  67. package/skills/swarm/references/development-swarm.md +596 -0
@@ -15,13 +15,20 @@
15
15
  "mode": "degraded-new-branch",
16
16
  "continuity_policy": "If mode is degraded-new-branch, explicitly state what context continuity was lost and what was reconstructed from the checkpoint.",
17
17
  "output_format": "Markdown sections: Continuation Mode, Applied Reply, Lost Context, Continued Work, Next Actions.",
18
- "model": "openai-codex/gpt-5.5",
19
18
  "thinking": "off",
20
19
  "tools": ""
21
20
  },
22
21
  "mailbox": {
23
- "accepts": ["control.reply", "control.revise", "control.stop"],
24
- "emits": ["checkpoint.continued"]
22
+ "accepts": [
23
+ "control.reply",
24
+ "control.revise",
25
+ "control.stop",
26
+ "control.cancel",
27
+ "control.kill"
28
+ ],
29
+ "emits": [
30
+ "checkpoint.continued"
31
+ ]
25
32
  },
26
33
  "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
34
  }
@@ -14,13 +14,21 @@
14
14
  "rubric": "Judge evidence preservation, severity calibration, consensus purity, internal consistency, and merge bias.",
15
15
  "evidence": "Use the provided raw outputs or artifact paths; mark any missing evidence.",
16
16
  "output_format": "Markdown sections: Verdict, Issues, Evidence Preservation, Bias Risks, Required Fixes.",
17
- "model": "openai-codex/gpt-5.5",
18
17
  "thinking": "medium",
19
18
  "tools": ""
20
19
  },
21
20
  "mailbox": {
22
- "accepts": ["control.stop"],
23
- "emits": ["judge.completed", "command.done", "run.done", "run.failed"]
21
+ "accepts": [
22
+ "control.stop",
23
+ "control.cancel",
24
+ "control.kill"
25
+ ],
26
+ "emits": [
27
+ "judge.completed",
28
+ "command.done",
29
+ "run.done",
30
+ "run.failed"
31
+ ]
24
32
  },
25
33
  "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
34
  }
@@ -14,13 +14,21 @@
14
14
  "mode": "consensus-first",
15
15
  "risk_policy": "Preserve minority severe findings and mark merger-added claims explicitly.",
16
16
  "output_format": "Markdown sections: Summary, Consensus, Minority Findings, Contradictions, Next Actions.",
17
- "model": "openai-codex/gpt-5.5",
18
17
  "thinking": "medium",
19
18
  "tools": ""
20
19
  },
21
20
  "mailbox": {
22
- "accepts": ["control.stop"],
23
- "emits": ["merge.completed", "command.done", "run.done", "run.failed"]
21
+ "accepts": [
22
+ "control.stop",
23
+ "control.cancel",
24
+ "control.kill"
25
+ ],
26
+ "emits": [
27
+ "merge.completed",
28
+ "command.done",
29
+ "run.done",
30
+ "run.failed"
31
+ ]
24
32
  },
25
33
  "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
34
  }
@@ -18,13 +18,18 @@
18
18
  "from": "run:{run_id}",
19
19
  "message_policy": "Emit an actor-message envelope-shaped JSON object for the coordinator; do not call transport tools directly.",
20
20
  "output_format": "JSON object with to, from, type, summary, body, metadata, confidence, and next_action.",
21
- "model": "openai-codex/gpt-5.5",
22
21
  "thinking": "off",
23
22
  "tools": ""
24
23
  },
25
24
  "mailbox": {
26
- "accepts": ["control.stop", "control.cancel", "control.kill"],
27
- "emits": ["component.*"]
25
+ "accepts": [
26
+ "control.stop",
27
+ "control.cancel",
28
+ "control.kill"
29
+ ],
30
+ "emits": [
31
+ "component.*"
32
+ ]
28
33
  },
29
34
  "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}"
30
35
  }
@@ -12,13 +12,21 @@
12
12
  "defaults": {
13
13
  "format": "Markdown sections: Summary, Findings, Evidence, Risks, Next Actions.",
14
14
  "preservation_policy": "Do not change meaning, severity, evidence, or uncertainty while normalizing.",
15
- "model": "openai-codex/gpt-5.5",
16
15
  "thinking": "off",
17
16
  "tools": ""
18
17
  },
19
18
  "mailbox": {
20
- "accepts": ["control.stop"],
21
- "emits": ["normalize.completed", "command.done", "run.done", "run.failed"]
19
+ "accepts": [
20
+ "control.stop",
21
+ "control.cancel",
22
+ "control.kill"
23
+ ],
24
+ "emits": [
25
+ "normalize.completed",
26
+ "command.done",
27
+ "run.done",
28
+ "run.failed"
29
+ ]
22
30
  },
23
31
  "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
32
  }
@@ -14,13 +14,21 @@
14
14
  "constraints": "Prefer small reversible slices, explicit validation gates, and no broad speculative rewrites.",
15
15
  "scope": "Use the provided problem statement and any named artifact paths.",
16
16
  "output_format": "Markdown sections: Goal, Constraints, Plan Slices, Risks, Validation Gates, Stop Conditions.",
17
- "model": "openai-codex/gpt-5.5",
18
17
  "thinking": "medium",
19
18
  "tools": ""
20
19
  },
21
20
  "mailbox": {
22
- "accepts": ["control.stop"],
23
- "emits": ["plan.completed", "command.done", "run.done", "run.failed"]
21
+ "accepts": [
22
+ "control.stop",
23
+ "control.cancel",
24
+ "control.kill"
25
+ ],
26
+ "emits": [
27
+ "plan.completed",
28
+ "command.done",
29
+ "run.done",
30
+ "run.failed"
31
+ ]
24
32
  },
25
33
  "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
34
  }
@@ -9,14 +9,21 @@
9
9
  "output_format:string"
10
10
  ],
11
11
  "defaults": {
12
- "model": "openai-codex/gpt-5.5",
13
12
  "thinking": "off",
14
13
  "tools": "",
15
14
  "output_format": "Concise Markdown with assumptions and next actions."
16
15
  },
17
16
  "mailbox": {
18
- "accepts": ["control.stop"],
19
- "emits": ["command.done", "run.done", "run.failed"]
17
+ "accepts": [
18
+ "control.stop",
19
+ "control.cancel",
20
+ "control.kill"
21
+ ],
22
+ "emits": [
23
+ "command.done",
24
+ "run.done",
25
+ "run.failed"
26
+ ]
20
27
  },
21
28
  "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} {prompt}. Output format: {output_format}"
22
29
  }
@@ -12,18 +12,21 @@
12
12
  "output_format:string"
13
13
  ],
14
14
  "defaults": {
15
- "models": [
16
- "openai-codex/gpt-5.5",
17
- "openai-codex/gpt-5.4",
18
- "deepseek/deepseek-v4-flash"
19
- ],
20
15
  "thinking": "off",
21
16
  "tools": "",
22
17
  "output_format": "Vote-style Markdown: Verdict, Rationale, Evidence, Confidence."
23
18
  },
24
19
  "mailbox": {
25
- "accepts": ["control.stop"],
26
- "emits": ["command.done", "run.done", "run.failed"]
20
+ "accepts": [
21
+ "control.stop",
22
+ "control.cancel",
23
+ "control.kill"
24
+ ],
25
+ "emits": [
26
+ "command.done",
27
+ "run.done",
28
+ "run.failed"
29
+ ]
27
30
  },
28
31
  "repeat": "{models.length}",
29
32
  "parallel": true,
@@ -29,10 +29,6 @@
29
29
  "operator UX"
30
30
  ],
31
31
  "claim": "The reviewed scope is ready for the next implementation or release step.",
32
- "reviewer_model": "openai-codex/gpt-5.5",
33
- "verifier_model": "openai-codex/gpt-5.5",
34
- "merger_model": "openai-codex/gpt-5.5",
35
- "judge_model": "openai-codex/gpt-5.5",
36
32
  "thinking": "off",
37
33
  "tools": "",
38
34
  "evidence_policy": "Cite inspected files, command output, or explicit uncertainty for every material claim.",
@@ -40,8 +36,20 @@
40
36
  "output_format": "Markdown sections: Summary, Consensus Findings, Minority Findings, Verification, Judge Notes, Risks, Next Actions."
41
37
  },
42
38
  "mailbox": {
43
- "accepts": ["control.stop"],
44
- "emits": ["review.completed", "verification.completed", "merge.completed", "judge.completed", "command.done", "run.done", "run.failed"]
39
+ "accepts": [
40
+ "control.stop",
41
+ "control.cancel",
42
+ "control.kill"
43
+ ],
44
+ "emits": [
45
+ "review.completed",
46
+ "verification.completed",
47
+ "merge.completed",
48
+ "judge.completed",
49
+ "command.done",
50
+ "run.done",
51
+ "run.failed"
52
+ ]
45
53
  },
46
54
  "template": [
47
55
  {
@@ -18,13 +18,21 @@
18
18
  "evidence_policy": "Cite inspected files, command output, or explicit uncertainty for every material claim.",
19
19
  "risk_policy": "Preserve minority high-impact risks and separate confirmed issues from hypotheses.",
20
20
  "output_format": "Markdown sections: Findings, Evidence, Risks, Next Actions.",
21
- "model": "openai-codex/gpt-5.5",
22
21
  "thinking": "off",
23
22
  "tools": ""
24
23
  },
25
24
  "mailbox": {
26
- "accepts": ["control.stop"],
27
- "emits": ["review.completed", "command.done", "run.done", "run.failed"]
25
+ "accepts": [
26
+ "control.stop",
27
+ "control.cancel",
28
+ "control.kill"
29
+ ],
30
+ "emits": [
31
+ "review.completed",
32
+ "command.done",
33
+ "run.done",
34
+ "run.failed"
35
+ ]
28
36
  },
29
37
  "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Review {scope} through this lens: {lens}. Instructions: {instructions}. Evidence policy: {evidence_policy}. Risk policy: {risk_policy}. Output format: {output_format}"
30
38
  }
@@ -16,13 +16,21 @@
16
16
  "avoided": "Avoid unrelated files, public contracts, generated artifacts, and broad refactors unless explicitly allowed.",
17
17
  "checks": "Name the smallest validation commands or review gates that prove completion.",
18
18
  "handoff_format": "Markdown sections: Task, Allowed Files, Avoid Files, Expected Output, Checks, Handoff Notes.",
19
- "model": "openai-codex/gpt-5.5",
20
19
  "thinking": "off",
21
20
  "tools": ""
22
21
  },
23
22
  "mailbox": {
24
- "accepts": ["control.stop"],
25
- "emits": ["task_card.completed", "command.done", "run.done", "run.failed"]
23
+ "accepts": [
24
+ "control.stop",
25
+ "control.cancel",
26
+ "control.kill"
27
+ ],
28
+ "emits": [
29
+ "task_card.completed",
30
+ "command.done",
31
+ "run.done",
32
+ "run.failed"
33
+ ]
26
34
  },
27
35
  "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Create a bounded implementation task card. Goal: {goal}. Allowed: {allowed}. Avoided: {avoided}. Checks: {checks}. Handoff format: {handoff_format}"
28
36
  }
@@ -9,13 +9,20 @@
9
9
  "output_format:string"
10
10
  ],
11
11
  "defaults": {
12
- "model": "openai-codex/gpt-5.5",
13
12
  "thinking": "off",
14
13
  "output_format": "Concise Markdown with assumptions and next actions."
15
14
  },
16
15
  "mailbox": {
17
- "accepts": ["control.stop"],
18
- "emits": ["command.done", "run.done", "run.failed"]
16
+ "accepts": [
17
+ "control.stop",
18
+ "control.cancel",
19
+ "control.kill"
20
+ ],
21
+ "emits": [
22
+ "command.done",
23
+ "run.done",
24
+ "run.failed"
25
+ ]
19
26
  },
20
27
  "template": "pi -p --model {model} --thinking {thinking} --tools {tools} {prompt}. Output format: {output_format}"
21
28
  }
@@ -15,13 +15,21 @@
15
15
  "acceptance": "Separate proven, disproven, unknown, and missing evidence.",
16
16
  "evidence_policy": "Do not infer beyond provided evidence or inspected artifacts.",
17
17
  "output_format": "Markdown sections: Verdict, Evidence, Gaps, Confidence.",
18
- "model": "openai-codex/gpt-5.5",
19
18
  "thinking": "off",
20
19
  "tools": ""
21
20
  },
22
21
  "mailbox": {
23
- "accepts": ["control.stop"],
24
- "emits": ["verification.completed", "command.done", "run.done", "run.failed"]
22
+ "accepts": [
23
+ "control.stop",
24
+ "control.cancel",
25
+ "control.kill"
26
+ ],
27
+ "emits": [
28
+ "verification.completed",
29
+ "command.done",
30
+ "run.done",
31
+ "run.failed"
32
+ ]
25
33
  },
26
34
  "template": "pi -p --model {model} --thinking {thinking} {tools?--tools:--no-tools} {tools} Verify this claim against the provided evidence. Claim: {claim}. Evidence or artifact paths: {evidence}. Acceptance: {acceptance}. Evidence policy: {evidence_policy}. Output format: {output_format}"
27
35
  }
@@ -14,7 +14,6 @@
14
14
  "summary_path:path"
15
15
  ],
16
16
  "defaults": {
17
- "model": "openai-codex/gpt-5.5",
18
17
  "thinking": "off",
19
18
  "tools": "",
20
19
  "output_format": "Concise Markdown with assumptions and next actions.",
@@ -26,8 +25,16 @@
26
25
  "summary": "{summary_path}"
27
26
  },
28
27
  "mailbox": {
29
- "accepts": ["control.stop", "control.cancel", "control.kill"],
30
- "emits": ["command.done", "run.done", "run.failed"]
28
+ "accepts": [
29
+ "control.stop",
30
+ "control.cancel",
31
+ "control.kill"
32
+ ],
33
+ "emits": [
34
+ "command.done",
35
+ "run.done",
36
+ "run.failed"
37
+ ]
31
38
  },
32
39
  "repeat": "{prompts.length}",
33
40
  "parallel": true,
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "utility-coordinator-lock-snapshot",
3
+ "args": [
4
+ "repo:path",
5
+ "state_dir:path",
6
+ "lines:int"
7
+ ],
8
+ "defaults": {
9
+ "repo": "~/.pi/agent/extensions/pi-actors",
10
+ "state_dir": "~/.pi/agent/tmp/pi-actors/runs/coordinator-locker",
11
+ "lines": "20"
12
+ },
13
+ "template": "{repo}/scripts/coordinator-locker.mjs snapshot --state-dir {state_dir} --lines {lines}"
14
+ }
@@ -3,16 +3,16 @@
3
3
  "args": [
4
4
  "repo:path",
5
5
  "state_root:path",
6
- "message_file:path",
6
+ "run_id:string",
7
7
  "lines:int",
8
8
  "stale_minutes:int"
9
9
  ],
10
10
  "defaults": {
11
11
  "repo": "~/.pi/agent/extensions/pi-actors",
12
12
  "state_root": "~/.pi/agent/tmp/pi-actors/runs",
13
- "message_file": "~/.pi/agent/tmp/pi-actors/runs/music/outbox.jsonl",
13
+ "run_id": "music",
14
14
  "lines": "80",
15
15
  "stale_minutes": "60"
16
16
  },
17
- "template": "{repo}/scripts/recipe-utils.mjs run-ops-snapshot {state_root} {message_file} {lines} {stale_minutes}"
17
+ "template": "{repo}/scripts/recipe-utils.mjs run-ops-snapshot {state_root} {run_id} {lines} {stale_minutes}"
18
18
  }
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "utility-skill-summary",
3
+ "args": [
4
+ "skill:path",
5
+ "package_json:path",
6
+ "repo:path"
7
+ ],
8
+ "defaults": {
9
+ "skill": "skills/actors/SKILL.md",
10
+ "package_json": "package.json",
11
+ "repo": "~/.pi/agent/extensions/pi-actors"
12
+ },
13
+ "template": "{repo}/scripts/recipe-utils.mjs skill-summary {skill} {package_json}"
14
+ }