@llblab/pi-actors 0.42.2 → 0.43.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 (254) hide show
  1. package/AGENTS.md +121 -175
  2. package/CHANGELOG.md +16 -0
  3. package/README.md +113 -276
  4. package/dist/fixtures/protocol/control-endpoint.json +6 -0
  5. package/dist/fixtures/protocol/control-record.json +9 -0
  6. package/dist/fixtures/protocol/recipe-summary.json +4 -12
  7. package/dist/fixtures/protocol/trace-event.json +9 -0
  8. package/dist/lib/async-runs.d.ts +14 -38
  9. package/dist/lib/async-runs.js +158 -108
  10. package/dist/lib/control.d.ts +12 -0
  11. package/dist/lib/control.js +84 -0
  12. package/dist/lib/execution-sessions.d.ts +17 -0
  13. package/dist/lib/execution-sessions.js +85 -0
  14. package/dist/lib/file-state.d.ts +1 -0
  15. package/dist/lib/file-state.js +17 -5
  16. package/dist/lib/inspector-actions.d.ts +2 -2
  17. package/dist/lib/inspector-actions.js +2 -2
  18. package/dist/lib/inspector-command.js +3 -3
  19. package/dist/lib/inspector-overlay.d.ts +52 -70
  20. package/dist/lib/inspector-overlay.js +532 -905
  21. package/dist/lib/inspector.d.ts +3 -71
  22. package/dist/lib/inspector.js +19 -665
  23. package/dist/lib/limits.d.ts +4 -2
  24. package/dist/lib/limits.js +4 -2
  25. package/dist/lib/observability.d.ts +17 -17
  26. package/dist/lib/observability.js +45 -84
  27. package/dist/lib/pi.d.ts +1 -1
  28. package/dist/lib/prompts.d.ts +1 -1
  29. package/dist/lib/prompts.js +2 -2
  30. package/dist/lib/recipe-control.d.ts +7 -0
  31. package/dist/lib/recipe-control.js +39 -0
  32. package/dist/lib/recipes-discovery.js +2 -0
  33. package/dist/lib/recipes-references.d.ts +1 -14
  34. package/dist/lib/recipes-references.js +6 -21
  35. package/dist/lib/review-projection.js +1 -5
  36. package/dist/lib/run-ui-runtime.js +2 -2
  37. package/dist/lib/runs-control-delivery.d.ts +21 -0
  38. package/dist/lib/runs-control-delivery.js +127 -0
  39. package/dist/lib/runs-controls.d.ts +35 -0
  40. package/dist/lib/runs-controls.js +144 -0
  41. package/dist/lib/runs-retention.d.ts +7 -0
  42. package/dist/lib/runs-retention.js +27 -3
  43. package/dist/lib/runs-start.js +4 -2
  44. package/dist/lib/runs-status.js +11 -6
  45. package/dist/lib/runs-trace.d.ts +24 -0
  46. package/dist/lib/runs-trace.js +98 -0
  47. package/dist/lib/runtime-notifier.d.ts +1 -1
  48. package/dist/lib/runtime-notifier.js +1 -1
  49. package/dist/lib/tools-inspect.d.ts +3 -3
  50. package/dist/lib/tools-inspect.js +203 -708
  51. package/dist/lib/tools-local.js +2 -10
  52. package/dist/lib/tools-message.d.ts +7 -7
  53. package/dist/lib/tools-message.js +95 -396
  54. package/dist/lib/tools-response.d.ts +1 -4
  55. package/dist/lib/tools-response.js +5 -39
  56. package/dist/lib/tools-spawn.js +16 -28
  57. package/dist/lib/tools.js +1 -2
  58. package/dist/lib/trace-projection.d.ts +22 -0
  59. package/dist/lib/trace-projection.js +165 -0
  60. package/dist/recipes/draft-review.json +0 -10
  61. package/dist/recipes/lens-swarm.json +0 -14
  62. package/dist/recipes/music-player.json +10 -19
  63. package/dist/recipes/pipeline-architect-coordinator.json +0 -11
  64. package/dist/recipes/pipeline-artifact-bundle.json +1 -22
  65. package/dist/recipes/pipeline-artifact-report.json +1 -18
  66. package/dist/recipes/pipeline-artifact-write.json +1 -18
  67. package/dist/recipes/pipeline-async-run-ops.json +0 -12
  68. package/dist/recipes/pipeline-checkpoint-continuation.json +0 -14
  69. package/dist/recipes/pipeline-development-tasking.json +0 -12
  70. package/dist/recipes/pipeline-docs-maintenance.json +0 -12
  71. package/dist/recipes/pipeline-media-library.json +0 -12
  72. package/dist/recipes/pipeline-quorum-review.json +0 -12
  73. package/dist/recipes/pipeline-release-readiness.json +0 -12
  74. package/dist/recipes/pipeline-release-summary.json +0 -12
  75. package/dist/recipes/pipeline-repo-health.json +0 -12
  76. package/dist/recipes/pipeline-research-synthesis.json +0 -11
  77. package/dist/recipes/pipeline-review-readiness.json +0 -12
  78. package/dist/recipes/resource-locker.json +27 -0
  79. package/dist/recipes/subagent-artifact.json +0 -9
  80. package/dist/recipes/subagent-checkpoint.json +0 -10
  81. package/dist/recipes/subagent-conflict-report.json +0 -11
  82. package/dist/recipes/subagent-contradiction-map.json +0 -11
  83. package/dist/recipes/subagent-critic.json +0 -11
  84. package/dist/recipes/subagent-evidence-map.json +0 -11
  85. package/dist/recipes/subagent-followup.json +0 -10
  86. package/dist/recipes/subagent-judge.json +0 -11
  87. package/dist/recipes/subagent-merge.json +0 -11
  88. package/dist/recipes/subagent-normalize.json +0 -11
  89. package/dist/recipes/subagent-plan.json +0 -11
  90. package/dist/recipes/subagent-preflight.json +0 -11
  91. package/dist/recipes/subagent-prompt.json +0 -10
  92. package/dist/recipes/subagent-quorum.json +0 -10
  93. package/dist/recipes/subagent-review-coordinator.json +0 -14
  94. package/dist/recipes/subagent-review.json +0 -11
  95. package/dist/recipes/subagent-task-card.json +0 -11
  96. package/dist/recipes/subagent-tools.json +0 -10
  97. package/dist/recipes/subagent-verify.json +0 -11
  98. package/dist/recipes/subagents-prompts.json +0 -10
  99. package/dist/recipes/tool-review.json +0 -10
  100. package/dist/scripts/async-runner.mjs +25 -25
  101. package/dist/scripts/conformance.mjs +4 -2
  102. package/dist/scripts/locker.mjs +200 -66
  103. package/dist/scripts/music-player.mjs +159 -150
  104. package/dist/scripts/recipe-utils.mjs +6 -96
  105. package/dist/scripts/release-gates.mjs +60 -0
  106. package/dist/scripts/validate-recipe.mjs +3 -53
  107. package/dist/skills/actors/SKILL.md +53 -266
  108. package/dist/skills/swarm/SKILL.md +11 -33
  109. package/docs/0.43-baseline.md +44 -0
  110. package/docs/README.md +3 -3
  111. package/docs/actor-inspector.md +26 -64
  112. package/docs/actors-deep-reference.md +92 -50
  113. package/docs/async-runs.md +81 -328
  114. package/docs/command-templates.md +2 -2
  115. package/docs/component-recipes.md +30 -133
  116. package/docs/recipe-library.md +57 -182
  117. package/docs/task-first-recipes.md +10 -12
  118. package/docs/template-recipes.md +76 -289
  119. package/docs/tool-registry.md +41 -161
  120. package/fixtures/protocol/control-endpoint.json +6 -0
  121. package/fixtures/protocol/control-record.json +9 -0
  122. package/fixtures/protocol/recipe-summary.json +4 -12
  123. package/fixtures/protocol/trace-event.json +9 -0
  124. package/lib/async-runs.ts +202 -201
  125. package/lib/control.ts +102 -0
  126. package/lib/execution-sessions.ts +111 -0
  127. package/lib/file-state.ts +17 -4
  128. package/lib/inspector-actions.ts +2 -2
  129. package/lib/inspector-command.ts +3 -3
  130. package/lib/inspector-overlay.ts +577 -1121
  131. package/lib/inspector.ts +46 -979
  132. package/lib/limits.ts +4 -2
  133. package/lib/observability.ts +63 -104
  134. package/lib/pi.ts +1 -1
  135. package/lib/prompts.ts +2 -2
  136. package/lib/recipe-control.ts +45 -0
  137. package/lib/recipes-discovery.ts +2 -0
  138. package/lib/recipes-references.ts +9 -45
  139. package/lib/review-projection.ts +1 -5
  140. package/lib/run-ui-runtime.ts +2 -2
  141. package/lib/runs-control-delivery.ts +181 -0
  142. package/lib/runs-controls.ts +204 -0
  143. package/lib/runs-retention.ts +38 -3
  144. package/lib/runs-start.ts +4 -2
  145. package/lib/runs-status.ts +11 -6
  146. package/lib/runs-trace.ts +132 -0
  147. package/lib/runtime-notifier.ts +1 -1
  148. package/lib/tools-inspect.ts +240 -901
  149. package/lib/tools-local.ts +2 -12
  150. package/lib/tools-message.ts +112 -519
  151. package/lib/tools-response.ts +5 -52
  152. package/lib/tools-spawn.ts +16 -32
  153. package/lib/tools.ts +1 -2
  154. package/lib/trace-projection.ts +221 -0
  155. package/package.json +2 -1
  156. package/recipes/draft-review.json +0 -10
  157. package/recipes/lens-swarm.json +0 -14
  158. package/recipes/music-player.json +10 -19
  159. package/recipes/pipeline-architect-coordinator.json +0 -11
  160. package/recipes/pipeline-artifact-bundle.json +1 -22
  161. package/recipes/pipeline-artifact-report.json +1 -18
  162. package/recipes/pipeline-artifact-write.json +1 -18
  163. package/recipes/pipeline-async-run-ops.json +0 -12
  164. package/recipes/pipeline-checkpoint-continuation.json +0 -14
  165. package/recipes/pipeline-development-tasking.json +0 -12
  166. package/recipes/pipeline-docs-maintenance.json +0 -12
  167. package/recipes/pipeline-media-library.json +0 -12
  168. package/recipes/pipeline-quorum-review.json +0 -12
  169. package/recipes/pipeline-release-readiness.json +0 -12
  170. package/recipes/pipeline-release-summary.json +0 -12
  171. package/recipes/pipeline-repo-health.json +0 -12
  172. package/recipes/pipeline-research-synthesis.json +0 -11
  173. package/recipes/pipeline-review-readiness.json +0 -12
  174. package/recipes/resource-locker.json +27 -0
  175. package/recipes/subagent-artifact.json +0 -9
  176. package/recipes/subagent-checkpoint.json +0 -10
  177. package/recipes/subagent-conflict-report.json +0 -11
  178. package/recipes/subagent-contradiction-map.json +0 -11
  179. package/recipes/subagent-critic.json +0 -11
  180. package/recipes/subagent-evidence-map.json +0 -11
  181. package/recipes/subagent-followup.json +0 -10
  182. package/recipes/subagent-judge.json +0 -11
  183. package/recipes/subagent-merge.json +0 -11
  184. package/recipes/subagent-normalize.json +0 -11
  185. package/recipes/subagent-plan.json +0 -11
  186. package/recipes/subagent-preflight.json +0 -11
  187. package/recipes/subagent-prompt.json +0 -10
  188. package/recipes/subagent-quorum.json +0 -10
  189. package/recipes/subagent-review-coordinator.json +0 -14
  190. package/recipes/subagent-review.json +0 -11
  191. package/recipes/subagent-task-card.json +0 -11
  192. package/recipes/subagent-tools.json +0 -10
  193. package/recipes/subagent-verify.json +0 -11
  194. package/recipes/subagents-prompts.json +0 -10
  195. package/recipes/tool-review.json +0 -10
  196. package/scripts/async-runner.mjs +25 -25
  197. package/scripts/conformance.mjs +4 -2
  198. package/scripts/locker.mjs +200 -66
  199. package/scripts/music-player.mjs +159 -150
  200. package/scripts/recipe-utils.mjs +6 -96
  201. package/scripts/release-gates.mjs +60 -0
  202. package/scripts/validate-recipe.mjs +3 -53
  203. package/skills/actors/SKILL.md +53 -266
  204. package/skills/swarm/SKILL.md +11 -33
  205. package/dist/fixtures/protocol/actor-message-branch.json +0 -13
  206. package/dist/fixtures/protocol/mailbox-contract.json +0 -15
  207. package/dist/fixtures/protocol/room-message.json +0 -11
  208. package/dist/fixtures/protocol/room-roster.json +0 -11
  209. package/dist/fixtures/protocol/run-inbox-message.json +0 -9
  210. package/dist/fixtures/protocol/run-outbox-event.json +0 -9
  211. package/dist/lib/mailbox-loop.d.ts +0 -41
  212. package/dist/lib/mailbox-loop.js +0 -60
  213. package/dist/lib/messages.d.ts +0 -25
  214. package/dist/lib/messages.js +0 -122
  215. package/dist/lib/rooms.d.ts +0 -104
  216. package/dist/lib/rooms.js +0 -647
  217. package/dist/lib/runs-mailbox.d.ts +0 -25
  218. package/dist/lib/runs-mailbox.js +0 -146
  219. package/dist/lib/runs-messages.d.ts +0 -15
  220. package/dist/lib/runs-messages.js +0 -179
  221. package/dist/lib/runs-outbox.d.ts +0 -41
  222. package/dist/lib/runs-outbox.js +0 -87
  223. package/dist/lib/tools-mailbox.d.ts +0 -8
  224. package/dist/lib/tools-mailbox.js +0 -48
  225. package/dist/recipes/actor-worker.json +0 -39
  226. package/dist/recipes/coordinator-locker.json +0 -45
  227. package/dist/recipes/locker.json +0 -45
  228. package/dist/recipes/pipeline-room-swarm.json +0 -50
  229. package/dist/recipes/subagent-message.json +0 -32
  230. package/dist/recipes/utility-actor-message.json +0 -23
  231. package/dist/scripts/actor-worker.mjs +0 -214
  232. package/dist/scripts/coordinator.mjs +0 -799
  233. package/docs/actor-messages.md +0 -225
  234. package/fixtures/protocol/actor-message-branch.json +0 -13
  235. package/fixtures/protocol/mailbox-contract.json +0 -15
  236. package/fixtures/protocol/room-message.json +0 -11
  237. package/fixtures/protocol/room-roster.json +0 -11
  238. package/fixtures/protocol/run-inbox-message.json +0 -9
  239. package/fixtures/protocol/run-outbox-event.json +0 -9
  240. package/lib/mailbox-loop.ts +0 -144
  241. package/lib/messages.ts +0 -151
  242. package/lib/rooms.ts +0 -939
  243. package/lib/runs-mailbox.ts +0 -208
  244. package/lib/runs-messages.ts +0 -252
  245. package/lib/runs-outbox.ts +0 -144
  246. package/lib/tools-mailbox.ts +0 -56
  247. package/recipes/actor-worker.json +0 -39
  248. package/recipes/coordinator-locker.json +0 -45
  249. package/recipes/locker.json +0 -45
  250. package/recipes/pipeline-room-swarm.json +0 -50
  251. package/recipes/subagent-message.json +0 -32
  252. package/recipes/utility-actor-message.json +0 -23
  253. package/scripts/actor-worker.mjs +0 -214
  254. package/scripts/coordinator.mjs +0 -799
@@ -1,148 +1,45 @@
1
1
  # Component Recipes
2
2
 
3
- Component recipes are small saved recipe definitions that expose one coordination capability each. They are the construction kit for higher-level subagent coordinators: a coordinator composes components instead of embedding one large orchestration DSL.
3
+ Component Recipes are weakly coupled command-template cells used inside higher-level Recipes. They do not create a social protocol or become independently addressable peers.
4
4
 
5
- ## Boundary
5
+ ## Contract
6
6
 
7
- This is a weak abstract contract, not a hard dependency model.
7
+ A useful component has:
8
8
 
9
- - `pi-actors` provides root `recipes/` actor component definitions and runtime bindings.
10
- - Portable coordination skills should target capabilities, not this extension by name.
11
- - Local adapters bind abstract components to concrete recipes, command templates, async runs, model aliases, files, and tool registries.
12
- - A component should be replaceable by another implementation with the same capability contract.
9
+ - explicit typed inputs and caller-owned policy knobs;
10
+ - one narrow responsibility;
11
+ - deterministic output shape or declared artifact;
12
+ - bounded failure behavior;
13
+ - no hidden model/provider assumption;
14
+ - no actor-local Control unless it owns a real service loop.
13
15
 
14
- ## Component Contract
16
+ ## Families
15
17
 
16
- Every reusable component recipe should make the following clear:
18
+ - normalization and prompt shaping;
19
+ - planning and task-card generation;
20
+ - evidence maps, contradiction maps, and criticism;
21
+ - review, verification, merge, judge, and quorum stages;
22
+ - artifact generation, manifesting, and deterministic writes;
23
+ - validation and package/skill summaries.
17
24
 
18
- - **Capability**: the one operation it performs.
19
- - **Args**: caller-controlled prompts, scopes, paths, models, and policy knobs.
20
- - **Output**: the expected shape of stdout or artifact paths.
21
- - **Messages**: optional actor-message envelopes for checkpoints, questions, progress, or findings.
22
- - **Failure policy**: whether failures stop the root, only fail a branch, or are recoverable.
23
- - **Non-goals**: coordination behavior the component intentionally does not own.
25
+ ## Composition
24
26
 
25
- Reusable components should expose common policy knobs instead of baking in local choices: `model`, `thinking`, `tools`, `output_format`, `evidence_policy`, `risk_policy`, source policy, continuity/resume policy, handoff format, merge mode, model pools, and stage-specific models. Higher-level recipes may pass these knobs through so the same component can run as a safe no-tools reviewer, a file-reading reviewer, a release gate, a research synthesizer, a task-card author, or a high-thinking merger.
27
+ Import components by alias and call named nodes in a template array/object. Parent command-template flags own sequence, parallelism, concurrency, retries, failure scope, recovery, repetition, and output acceptance.
26
28
 
27
- Keep components narrow. Higher-level recipes should own composition, not hidden behavior inside a leaf.
29
+ Variable branch output should converge into stable JSON, Markdown, artifacts, or command results before downstream stages. Large evidence belongs in artifacts or complete captures; concise milestones belong in Trace.
28
30
 
29
- ## Spectrum of Components
31
+ ## Boundaries
30
32
 
31
- ### Launchers
33
+ - Imports are definitions inside one Run.
34
+ - One-shot components omit Control.
35
+ - Components never infer caller identity or lifecycle authority.
36
+ - A parent may declare artifacts that imported cells write.
37
+ - A child failure follows explicit parent failure/recovery policy.
32
38
 
33
- Start one subagent or branch with a caller-provided prompt and model. Launchers do not judge or merge output.
39
+ Use the packaged Recipe library before creating a new component. Add one only when at least two stable compositions need the same narrow behavior.
34
40
 
35
- Examples: `recipes/subagent-prompt.json`, `recipes/subagent-tools.json`, and `recipes/subagents-prompts.json`.
41
+ ## Related
36
42
 
37
- ### Reviewers
38
-
39
- Inspect a scope through a declared lens and return evidence-grounded findings.
40
-
41
- Seed example: `recipes/subagent-review.json`.
42
-
43
- ### Critics
44
-
45
- Attack assumptions, edge cases, and failure modes. Critics should not rewrite the plan unless asked.
46
-
47
- Seed example: `recipes/subagent-critic.json`.
48
-
49
- ### Planners
50
-
51
- Turn a goal into bounded slices, validation gates, risks, and stop conditions.
52
-
53
- Seed example: `recipes/subagent-plan.json`.
54
-
55
- ### Verifiers
56
-
57
- Check a claim, artifact, or proposed result against evidence. Verifiers should separate proven, disproven, and unknown.
58
-
59
- Seed example: `recipes/subagent-verify.json`.
60
-
61
- ### Evidence and Contradiction Mappers
62
-
63
- Map source support, weak evidence, contradictions, unresolved assumptions, and missing source classes before synthesis.
64
-
65
- Seed examples: `recipes/subagent-evidence-map.json` and `recipes/subagent-contradiction-map.json`.
66
-
67
- ### Mergers
68
-
69
- Combine multiple branch outputs into a single synthesis. Mergers preserve minority findings and mark unsupported additions.
70
-
71
- Seed example: `recipes/subagent-merge.json`.
72
-
73
- ### Normalizers, Artifacts, and Events
74
-
75
- Convert variable branch output into stable JSON, Markdown sections, file artifacts, or actor-message records for downstream recipes.
76
-
77
- Seed examples: `recipes/subagent-normalize.json`, `recipes/subagent-artifact.json`, and `recipes/subagent-message.json`.
78
-
79
- ### Quorum Operators
80
-
81
- Run the same task across several independent models or instances and preserve vote shape for a later merger.
82
-
83
- Seed example: `recipes/subagent-quorum.json`.
84
-
85
- ### Tasking and Conflict Handoffs
86
-
87
- Produce bounded task cards or conflict reports for development swarms and integrator workflows.
88
-
89
- Seed examples: `recipes/subagent-task-card.json` and `recipes/subagent-conflict-report.json`.
90
-
91
- ### Checkpoint Emitters
92
-
93
- Emit bounded coordinator questions, partial state, or branch decisions as coordinator-bound actor messages. Checkpoint components should not pretend same-context resume exists unless the adapter can prove it.
94
-
95
- Seed example: `recipes/subagent-checkpoint.json`.
96
-
97
- ### Follow-up Continuations
98
-
99
- Resume or continue a branch with a bounded reply. If same-context continuation is unavailable, the component must declare a degraded mode such as creating a new branch with the checkpoint artifact included.
100
-
101
- Seed example: `recipes/subagent-followup.json`.
102
-
103
- ### Judges
104
-
105
- Evaluate report quality, evidence preservation, severity calibration, consensus purity, and internal consistency. Judges should not silently become another domain reviewer.
106
-
107
- Seed example: `recipes/subagent-judge.json`.
108
-
109
- ## Composition Shape
110
-
111
- A coordinator recipe can stay small by composing components:
112
-
113
- ```text
114
- launch/review fanout → verify claims → merge → judge → final synthesis
115
- ```
116
-
117
- Seed example: `recipes/subagent-review-coordinator.json` composes reviewer fanout, verification, merge, judge, and normalization.
118
-
119
- Higher-level examples:
120
-
121
- - `recipes/pipeline-review-readiness.json`: Release/readiness gate over selected lenses.
122
- - `recipes/pipeline-quorum-review.json`: Same prompt across a model pool, then merge, judge, and normalize vote shape.
123
- - `recipes/pipeline-architect-coordinator.json`: Architecture direction synthesis with lens fanout, critique, verification, merge, and next-slice output.
124
- - `recipes/pipeline-research-synthesis.json`: Plan, evidence map, contradiction map, verification, merge, and normalized research synthesis.
125
- - `recipes/pipeline-checkpoint-continuation.json`: Checkpoint artifact, follow-up continuation, and normalized handoff with explicit degraded-mode handling.
126
- - `recipes/pipeline-development-tasking.json`: Plan, task card, critique, and normalized integrator handoff for bounded implementation work.
127
- - `recipes/pipeline-artifact-report.json`: Normalized report → durable artifact-shaped output → actor-message-shaped record.
128
-
129
- For high-risk work, split breadth and confidence:
130
-
131
- ```text
132
- lens swarm → quorum per lens → merger → post-merge judge
133
- ```
134
-
135
- For implementation work, combine coordination with local ownership policy:
136
-
137
- ```text
138
- task cards → scoped branch agents → conflict reports → integrator merge → review
139
- ```
140
-
141
- ## Design Rules
142
-
143
- - Prefer public args/defaults over baked-in local policy.
144
- - Use `failure: "branch"` for independent fanout branches unless one failure invalidates the whole run.
145
- - Keep model pools and provider aliases configurable.
146
- - Use artifacts or actor messages for intermediate outputs that must survive compaction.
147
- - Do not hide broad coordinator behavior inside a component named like a leaf.
148
- - Do not introduce scheduler, goto, or workflow-only syntax; compose saved recipes and command templates.
43
+ - [Recipe library](./recipe-library.md)
44
+ - [Template Recipes](./template-recipes.md)
45
+ - [Command templates](./command-templates.md)
@@ -1,212 +1,87 @@
1
- # Recipe Library
1
+ # Packaged Recipe Library
2
2
 
3
- The root `recipes/` directory is the packaged standard actor recipe library for pi-actors. These recipes are reusable building blocks, not automatically installed operator policy. Copy or reference them from local tool registrations when the operator wants a durable callable tool.
3
+ Packaged Recipes provide maintained execution graphs and service definitions. User Recipes with the same name shadow packaged definitions; invalid shadowing fails closed.
4
4
 
5
- Helper scripts that belong to library recipes live in root `scripts/`. The music player standard uses the executable Node.js wrapper only: `scripts/music-player.mjs`.
5
+ ## Recommended Entry Points
6
6
 
7
- ## Layout
7
+ ### Repository and delivery
8
8
 
9
- - `recipes/subagent-*.json`: Atomic subagent components such as prompt launchers, reviewers, critics, planners, verifiers, mergers, checkpoints, follow-ups, judges, and normalizers.
10
- - `recipes/pipeline-*.json`: Higher-level composed recipes built from component imports.
11
- - `recipes/music-player.json`: Async local music player recipe backed by `scripts/music-player.mjs`.
12
- - `recipes/utility-*.json`: Small operator utility recipes that are not subagent coordinators.
9
+ - `pipeline-repo-health.json` — repository inspection and bounded health artifact.
10
+ - `pipeline-docs-maintenance.json` — documentation analysis and artifact preparation.
11
+ - `pipeline-release-readiness.json` — release checks and readiness artifact.
12
+ - `pipeline-release-summary.json` — release-summary artifact.
13
+ - `pipeline-development-tasking.json` — task-card and implementation planning pipeline.
13
14
 
14
- ## Install Locally
15
+ ### Review and synthesis
15
16
 
16
- Select only the operator-facing recipe or wrapper you intend to own locally. For example:
17
+ - `pipeline-quorum-review.json` — parallel reviewers with quorum-oriented synthesis.
18
+ - `pipeline-review-readiness.json` — review plus readiness stages.
19
+ - `pipeline-research-synthesis.json` — evidence-oriented research synthesis.
20
+ - `lens-swarm.json` — configurable repeated review lenses.
21
+ - `subagent-review-coordinator.json` — lower-level review/verify/merge/judge composition.
17
22
 
18
- ```bash
19
- mkdir -p ~/.pi/agent/recipes
20
- cp <repo>/recipes/pipeline-review-readiness.json ~/.pi/agent/recipes/
21
- ```
22
-
23
- Do not bulk-copy `recipes/*.json`. The packaged library also contains internal composition stages, including `draft-review.json` and `tool-review.json`; the automatic-review runtime launches those selectors with fenced inputs and they must not become user-installed callable tools.
24
-
25
- A registered tool can instead point at one selected recipe path when a durable operator-facing name is useful. Prefer a thin wrapper for public defaults or policy rather than copying the wrapper's internal imports.
26
-
27
- ## Async Subagent Components
28
-
29
- Core subagent recipes:
30
-
31
- - `recipes/subagent-prompt.json`: Start one prompt-driven subagent.
32
- - `recipes/subagent-tools.json`: Start a subagent with an explicit tool allowlist.
33
- - `recipes/subagents-prompts.json`: Run prompt fanout with one imported subagent component.
34
- - `recipes/subagent-preflight.json`: Tiny model/thinking/tool-policy smoke check before expensive fanout; failures surface `ACTOR_PREFLIGHT_FAILED` with stage, selected policy, provider error class, prompt file, and override args.
35
- - Packaged reviewer, verifier, merger, judge, and normalizer stages use `accept_output: review_evidence` and require `ACTOR_REVIEW_RESULT` as the exact first non-whitespace output line. Marker prefixes, format acknowledgements, and input requests therefore remain rejected branch diagnostics rather than usable quorum evidence.
36
- - `recipes/subagent-review.json`: Evidence-grounded review lens.
37
- - `recipes/draft-review.json`: Internal no-tools selector for one immutable automatic draft batch. It receives an attached value-free structural projection with batch-local opaque occurrence/content-group identities, counts, risk labels, and usage—not canonical names, draft basenames, raw hashes, recipe bodies, template text, defaults, authored prose, or filesystem paths—then emits one terminal `DRAFT_REVIEW_RESULT` with quota-free promote/discard decisions. The executor derives any promotion from the separate trusted captured source.
38
- - `recipes/tool-review.json`: Internal no-tools selector for one immutable 36-tool portfolio. It receives the same identity-opaque value-free structural projection and may recommend quota-free keep, unchanged-source rename (`evolve`), unchanged-source demote, or identical-source merge decisions. `replace`, `split`, and returned recipe content fail mechanically; deterministic executors alone read trusted captured recipes and own validated safe-boundary activation.
39
- - `recipes/subagent-critic.json`: Assumption and failure-mode critique.
40
- - `recipes/subagent-plan.json`: Bounded plan slices and validation gates.
41
- - `recipes/subagent-evidence-map.json`: Evidence and confidence map.
42
- - `recipes/subagent-contradiction-map.json`: Contradiction and missing-evidence map.
43
- - `recipes/subagent-verify.json`: Claim verification.
44
- - `recipes/subagent-merge.json`: Consensus/risk-first synthesis.
45
- - `recipes/subagent-normalize.json`: Stable output shaping.
46
- - `recipes/subagent-artifact.json`: Durable artifact-shaped output for a target path. It prepares content and write guidance; it does not write files unless the caller deliberately grants write tools or uses a deterministic writer.
47
- - `recipes/subagent-message.json`: Prompted actor-message-envelope-shaped coordinator message record with envelope-aligned args.
48
- - `recipes/subagent-quorum.json`: Same prompt across a model pool.
49
- - `recipes/subagent-task-card.json`: Bounded implementation task card.
50
- - `recipes/subagent-conflict-report.json`: Integrator-oriented conflict report.
51
- - `recipes/subagent-checkpoint.json`: Coordinator checkpoint artifact.
52
- - `recipes/subagent-followup.json`: Same-context or degraded continuation.
53
- - `recipes/subagent-judge.json`: Post-merge/report quality judge.
54
-
55
- Most atoms expose policy knobs such as `model`, `thinking`, `tools`, `output_format`, `evidence_policy`, `risk_policy`, source policy, continuity policy, handoff format, or model pools. Packaged recipes intentionally do not ship concrete model-version defaults: review-oriented subagent and lens-swarm recipes default model/thinking args through `{current_model}` and `{current_thinking}` so they inherit the selected Pi session policy, and callers can still pass explicit values when a run should diverge. Recipe inspection marks these inherited policy defaults as `current_policy`, and run status/progress records whether launch policy was inherited, explicit, mixed, or unresolved. Generic prompt launchers, including `subagent-tools` and `subagents-prompts`, expose the same core model/thinking/tool/output knobs so callers do not need separate recipe families for policy tuning. Interactive async atoms also declare mailbox metadata for their basic control, completion, and domain-result message surface. Higher-level recipes pass these knobs through instead of hard-coding local policy.
56
-
57
- For one-off packaged subagent reviews, launch the recipe directly with `spawn file="subagent-review" values={...}` or `spawn file="pipeline-review-readiness" values={...}`. Do not copy the underlying `pi -p` command or wrap the recipe unless you are creating a durable operator tool with a narrower interface.
58
-
59
- For build-oriented swarms, prefer a consensus-first shape over parallel writers: proposer roles coordinate in a room with message/inspect tools, a named implementer owns the first artifact write, a QA reviewer inspects the result, and a finalizer applies review-grounded fixes before `run.done`. This pattern keeps creative/lens diversity while preserving one coherent artifact and gives recipes concrete artifact assertions instead of treating room discussion as success.
60
-
61
- Register one atom:
62
-
63
- ```text
64
- register_tool name=subagent_prompt \
65
- description="Start an async no-tools pi subagent" \
66
- template="subagent-prompt.json"
67
- ```
68
-
69
- Start it:
23
+ Callers should own model, thinking, concurrency, quorum, and mission policy. Review pipelines preflight provider/model availability before expensive fanout.
70
24
 
71
- ```text
72
- subagent_prompt prompt="Review docs/async-runs.md for unclear wording." run_id=docs_review
73
- inspect target=run:docs_review view=status
74
- inspect target=run:docs_review view=tail
75
- ```
76
-
77
- ## Composed Pipelines
78
-
79
- Pipeline recipes demonstrate second-order composition:
80
-
81
- - `recipes/coordinator-locker.json`: Long-lived coordinator cell with queue, acquire/renew/release lease locks, journal, actor messages for worker coordination, and platform-adapted control metadata.
82
- - `recipes/subagent-review-coordinator.json`: Model/tool preflight with compact provider diagnostics → quorum-aware lens reviewers → verifier → merger → judge → normalizer. Review pipelines expose `subagent_ttl_ms`, `reviewer_concurrency`, `min_successful_reviewers`, and `merge_policy` knobs; reviewer joins preserve partial evidence and mark `complete`, `degraded`, or `insufficient_data`. `npm run conformance` includes a fake-`pi` review-readiness dogfood fixture for this packaged path.
83
- - `recipes/pipeline-release-readiness.json`: Task-first release cell: changelog section → package summary → packaged skill summary → validation → release review → artifact report.
84
- - `recipes/pipeline-release-summary.json`: Evidence-only release summary cell: changelog section → package summary → packaged skill summary → validation → release summary / risks / PR body draft artifact. It does not commit, open a PR, merge, tag, publish, or perform external release side effects.
85
- - `recipes/pipeline-repo-health.json`: Task-first repository-health cell: git status/log → docs index → validation → normalized artifact report.
86
- - `recipes/pipeline-async-run-ops.json`: Task-first async-run operations cell: run summary → actor-message tail → normalized operations report → artifact report.
87
- - `recipes/pipeline-review-readiness.json`: Release/readiness gate over selected lenses.
88
- - `recipes/pipeline-quorum-review.json`: Quorum vote shape → merge → judge → normalize.
89
- - `recipes/pipeline-architect-coordinator.json`: Architecture lens fanout → critique → verification → synthesis → next slice.
90
- - `recipes/pipeline-research-synthesis.json`: Plan → evidence map → contradiction map → verification → synthesis.
91
- - `recipes/pipeline-checkpoint-continuation.json`: Checkpoint → follow-up → normalized handoff.
92
- - `recipes/pipeline-development-tasking.json`: Plan → task card → critique → integrator handoff.
93
- - `recipes/pipeline-docs-maintenance.json`: Docs index → documentation review → maintenance plan → artifact report.
94
- - `recipes/pipeline-media-library.json`: Playlist build → media-library artifact report.
95
- - `recipes/pipeline-room-swarm.json`: Room participants join `room:<run>`, coordinate over repeated room-visible rounds, leave cleanly, and synthesize the room transcript into a caller-provided artifact path. Supported coordinator modes are `consensus`, `pipeline`, `fanout`, and `pool`; unknown modes fail closed instead of silently running consensus. Keep model/thinking/mission policy caller-owned. Custom roles can be supplied with `roles_path` as a JSON array of `{ "name", "persona" }` objects; `name` stays ASCII-safe for `branch:<run>/<name>` addresses and debugger output remains plain and name-driven. The packaged swarm uses contacts for peer awareness but does not rely on direct branch delivery unless a caller-specific worker protocol consumes branch envelopes. Set `subagent_ttl_ms` to a positive millisecond budget when participant `pi -p` processes must be killed instead of awaited indefinitely. Set `locker=true` to compose a local `coordinator-locker` cell under `{state_dir}/locker` for artifact ownership, resource lease locks, and a decision journal without merging locker policy into the room-participant script.
96
- - `recipes/pipeline-artifact-report.json`: Normalize → artifact-shaped output → actor-message-shaped record. This pipeline prepares a candidate artifact and emits `artifact.prepared`/`artifact.blocked`; the `artifact_path` is a target path, not a guarantee that the file was written.
97
- - `recipes/pipeline-artifact-write.json`: Normalize → artifact-shaped output → deterministic artifact write → actor-message-shaped record. Use only when the caller explicitly wants filesystem writes; `write_mode` is `create`, `overwrite`, or `append`.
98
- - `recipes/pipeline-artifact-bundle.json`: Optional validation → deterministic artifact write → machine-readable manifest generation → deterministic manifest write → actor-message-shaped record. Use when the caller explicitly wants a filesystem handoff bundle with both artifact and manifest paths.
99
-
100
- These are examples of library composition, not a workflow DSL. Pipeline recipes declare mailbox metadata for their high-level completion, artifact, and control message surface. The recipe layer owns imports and saved defaults; command templates own execution shape; async runs own lifecycle.
101
-
102
- ## Utility Recipes
103
-
104
- Utility recipes cover local operator workflows that do not need subagents:
105
-
106
- - `recipes/utility-markdown-index.json`: List Markdown files in a directory as input for README/docs index maintenance.
107
- - `recipes/utility-jsonl-tail.json`: Tail a JSONL message/log file with a configurable line count.
108
- - `recipes/utility-validation-wrapper.json`: Run a caller-supplied validation command in a scoped directory with a bounded timeout. This intentionally crosses a trusted shell boundary; discovery surfaces it as a diagnostic, and callers should pass explicit validation commands only.
109
- - `recipes/utility-git-status.json`: Read concise branch/worktree state for a repo.
110
- - `recipes/utility-git-log.json`: Read recent decorated commit history for a repo.
111
- - `recipes/utility-run-state-files.json`: List run-state files such as `run.json` under an async run state root.
112
- - `recipes/utility-coordinator-lock-snapshot.json`: Summarize a coordinator-locker actor state directory with queue depth, locks, and recent journal entries.
113
- - `recipes/utility-changelog-head.json`: Read the top slice of a changelog for release summary prep.
114
- - `recipes/utility-playlist-scan.json`: List local media files as playlist-building input.
115
- - `recipes/utility-run-summary.json`: Use `scripts/recipe-utils.mjs` to summarize async run state files as JSON.
116
- - `recipes/utility-run-ops-snapshot.json`: Combine async run summaries, recent actor messages for a selected `run_id`, and stale/terminal recommendations into one structured operations snapshot.
117
- - `recipes/utility-playlist-build.json`: Use `scripts/recipe-utils.mjs` to build a filtered playlist listing as newline paths, M3U, or inline `|`-separated source.
118
- - `recipes/utility-changelog-section.json`: Use `scripts/recipe-utils.mjs` to extract one changelog release section.
119
- - `recipes/utility-artifact-manifest.json`: Use `scripts/recipe-utils.mjs` to emit a machine-readable JSON manifest for an artifact path.
120
- - `recipes/utility-artifact-write.json`: Deterministically write prepared artifact content from stdin to `artifact_path` with explicit `create`, `overwrite`, or `append` mode.
121
- - `recipes/utility-actor-message.json`: Deterministically wrap stdin as a validated addressed actor-message envelope with the same public names as the envelope: `to`, `from`, `type`, `summary`, `body`, optional `correlation_id`/`reply_to`, and `metadata`.
122
- - `recipes/utility-package-summary.json`: Use `scripts/recipe-utils.mjs` to emit bounded package metadata such as name, version, files, scripts, and dependency counts.
123
- - `recipes/utility-skill-summary.json`: Use `scripts/recipe-utils.mjs` to summarize packaged skill frontmatter, body shape, formatter-safe scalar lines, and package-version alignment.
124
- - `recipes/utility-validate-recipe.json`: Use `scripts/validate-recipe.mjs` to validate one template recipe file, or all packaged recipes in a directory with `all: true`.
125
-
126
- Packaged QA is available through the `recipes:qa` npm script. It reports description warnings and fails exact diagnostics for async mailbox contracts, termination vocabulary, artifact paths, platform scope, helper script paths, and missing helper scripts.
127
-
128
- These recipes are intentionally small. Register them only for trusted local commands and prefer narrow scopes. Discovery diagnostics flag obvious trust-boundary shapes such as shell/eval/destructive commands; those warnings are operator review aids, not a sandbox. The helper-backed utilities share `scripts/recipe-utils.mjs` so repeated parsing/listing logic stays out of recipe strings.
129
-
130
- ## Actor OS Smoke Matrix
131
-
132
- The repeatable smoke surface is the normal validation suite:
133
-
134
- ```text
135
- npm test
136
- ```
25
+ ### Artifacts
137
26
 
138
- The scenario coverage is intentionally local-first and bounded: shared room coordination and roster snapshots (`rooms` / `tools` tests), direct branch delivery and claim/handle transitions (`tools` and coordinator tests), inspector navigation (`inspector` tests), recipe context injection (`recipes-context` / async-runs tests), compact terminal follow-up delivery (`observability` tests), and opt-in retirement candidate/execution smoke (`observability` / async-runs tests). These scenarios exercise public `spawn` / `message` / `inspect` behavior or the packaged script surfaces rather than relying on manual swarm demos.
27
+ - `pipeline-artifact-report.json` — prepare one artifact body.
28
+ - `pipeline-artifact-write.json` — prepare and deterministically write an artifact.
29
+ - `pipeline-artifact-bundle.json` — optional validation, artifact write, manifest generation, and manifest write.
30
+ - `utility-artifact-write.json` — deterministic create/overwrite/append helper.
31
+ - `utility-artifact-manifest.json` — artifact manifest generation.
139
32
 
140
- ## Music Player
33
+ Artifact pipelines terminate in files/manifests and result evidence; they do not fabricate communication events.
141
34
 
142
- Files:
35
+ ### Controlled services
143
36
 
144
- - `recipes/music-player.json`
145
- - `scripts/music-player.mjs`
37
+ - `music-player.json` — playback service with declared playback actions, `controls.jsonl`, generation-fenced endpoint readiness, state artifact, and playback Trace. Player selection is `player:enum(auto,mpv,afplay,ffplay,cvlc,play,wmp)=auto`.
38
+ - `resource-locker.json` — optional queue/lease-lock service with explicit owner/resource input and lock Trace.
146
39
 
147
- Purpose: start a local or URL audio source as an async run so the agent can continue working while playback runs in the background. The running script exposes a run-local mailbox, so addressed `message` calls can control playback without a second recipe.
40
+ These are the packaged Recipes that declare actor-local Control. Ordinary one-shot Recipes omit it.
148
41
 
149
- Requirements: Node.js and one playback backend. Supported backends are `mpv`, macOS `afplay`, `ffplay`, `cvlc`, SoX `play`, or `wmp` on native Windows through the legacy Windows Media Player COM control exposed by `powershell.exe`. The `wmp` backend validates `wmplayer.exe` under `Program Files/Windows Media Player` or `Program Files (x86)/Windows Media Player`; it does not target the newer UWP/Store Media Player. Playback format support depends on the selected player; the actor control path itself uses the portable mailbox/wake runtime layer.
42
+ ## Component Recipes
150
43
 
151
- The required `source` arg accepts:
44
+ Subagent components provide reusable command-template cells for normalization, planning, evidence mapping, contradiction analysis, criticism, review, verification, merging, judging, quorum work, task cards, checkpoint prompts, and artifact generation.
152
45
 
153
- - A single local file or URL.
154
- - A directory containing audio files; the wrapper scans `.aac`, `.aif`, `.aiff`, `.flac`, `.m4a`, `.mp3`, `.ogg`, and `.wav` files.
155
- - An `.m3u`, `.m3u8`, or `.txt` playlist file.
156
- - A `|`-separated inline list of local files or URLs.
46
+ Imports compose these definitions inside one parent Run. They are not independently addressable peers. Parent template flags control sequencing, parallelism, retries, failure scope, recovery, and repeated execution.
157
47
 
158
- Install locally:
159
-
160
- ```bash
161
- mkdir -p ~/.pi/agent/recipes
162
- cp <repo>/recipes/music-player.json ~/.pi/agent/recipes/music-player.json
163
- ```
48
+ ## Utility Recipes
164
49
 
165
- Register playback:
50
+ Utilities wrap deterministic local capabilities such as:
166
51
 
167
- ```text
168
- register_tool name=music_player \
169
- description="Start async music player playback through the Node.js wrapper" \
170
- template="music-player.json" \
171
- args="source:string,loop:bool=true,volume:int=70,player:enum(auto,mpv,afplay,ffplay,cvlc,play,wmp)=auto"
172
- ```
52
+ - package and skill summaries;
53
+ - artifact writes/manifests;
54
+ - validation commands;
55
+ - Run operations snapshots;
56
+ - Recipe validation.
173
57
 
174
- Start playback:
58
+ Use utilities as imported cells or registered tools where their contract fits.
175
59
 
176
- ```text
177
- music_player source="~/Music" volume=55 run_id=music
178
- ```
60
+ ## Selection Guidance
179
61
 
180
- Control it through addressed actor messages. This is the canonical reactive pattern for long-lived recipes: the run emits actor messages upward, and the coordinator sends explicit commands downward instead of polling on a timer.
62
+ 1. Prefer the highest-level maintained pipeline matching the task.
63
+ 2. Use component Recipes when building a new stable pipeline.
64
+ 3. Use inline templates for genuinely one-off trusted work.
65
+ 4. Declare artifacts for outputs that callers must retain.
66
+ 5. Declare Control only when a service process actually consumes it.
67
+ 6. Keep large semantic evidence in artifacts or execution captures, not Trace summaries.
181
68
 
182
- ```text
183
- message to=run:music type=player.pause body=pause
184
- message to=run:music type=player.play body=play
185
- message to=run:music type=player.next body=next
186
- message to=run:music type=player.previous body=previous
187
- message to=run:music type=player.stop body=stop
188
- ```
69
+ ## Installation Safety
189
70
 
190
- Use `inspect target=run:music view=status` only when an actor message or operator decision requires inspection.
71
+ Do not bulk-copy `recipes/*.json` into the user Recipe root. Internal `draft-review.json` and `tool-review.json` support fenced automatic review and must not become user-installed callable tools. Register or wrap only the specific public capability you intend to use.
191
72
 
192
- The wrapper also accepts control commands directly when a caller already has the run state dir:
73
+ ## Validation
193
74
 
194
- ```text
195
- scripts/music-player.mjs next ~/.pi/agent/tmp/pi-actors/runs/music
75
+ ```bash
76
+ npm run recipes:qa
196
77
  ```
197
78
 
198
- Message body is queued in the recipe's run-local mailbox and reconciled by the player loop. The loop treats `wake.jsonl` and `fs.watch` as advisory signals, then verifies the durable inbox signature before taking the inbox lock so unchanged mailboxes are not reread on every tick. Backend players stay inside the async run process group so `control.kill` terminates active playback with the run instead of leaving detached player children alive; player-local pause/resume/next/stop controls still signal the current backend pid or process group when available. The script writes `status.txt`, `player.json`, and track-change actor messages in the same state dir. Track-change messages stay diagnostic by default; interactive recipes should define a small command vocabulary for addressed messages, emit semantic actor messages for decision points, and let the coordinator react to messages rather than sleep-polling state.
199
-
200
- Cross-platform smoke checklist:
201
-
202
- - Linux: install one backend such as `mpv` or `ffplay`; start `music_player source="~/Music" run_id=music`, send `pause`, `play`, `next`, and `stop`, then inspect `run:music` status/mailbox.
203
- - macOS: verify `player=auto` selects `afplay` when no preferred CLI backend is installed, then run the same addressed message controls.
204
- - Native Windows: verify `player=wmp` detects `wmplayer.exe`, starts playback through Windows Media Player COM, handles `pause`/`play`/`next`/`previous`/`stop`, and leaves handled mailbox records visible through `inspect target=run:music view=mailbox`.
205
- - All hosts: confirm missed wake resilience by checking that queued mailbox commands are eventually claimed without relying on a transport-specific endpoint.
79
+ Recipe QA validates syntax, imports, Control declarations, artifact paths, helper references, and platform documentation. Removed mailbox declarations fail with the migration diagnostic rather than receiving automatic conversion.
206
80
 
207
- ## Safety Notes
81
+ ## Related
208
82
 
209
- - Only play trusted local files or URLs.
210
- - Volume is clamped to `0..100` by the wrapper.
211
- - Prefer a stable `run_id` such as `music` when the operator expects to control the run by name.
212
- - Use `message type=control.kill` for runtime termination; `control.stop` is a player-domain pause/stop command, not a generic run-kill alias.
83
+ - [Template Recipes](./template-recipes.md)
84
+ - [Command templates](./command-templates.md)
85
+ - [Runs](./async-runs.md)
86
+ - [Component Recipes](./component-recipes.md)
87
+ - [Task-first design](./task-first-recipes.md)
@@ -13,7 +13,7 @@ For each high-level recipe candidate:
13
13
  3. Sketch the recipe pipeline at the highest useful abstraction.
14
14
  4. Identify missing component cells.
15
15
  5. Decide which cells are subagent components, local utilities, or helper-backed transforms.
16
- 6. Keep domain policy knobs public: models, tools, paths, evidence/risk policy, output shape, mailbox contract, and validation gates.
16
+ 6. Keep domain policy knobs public: models, tools, paths, evidence/risk policy, output shape, actual Control actions, and validation gates.
17
17
  7. Add only the next smallest recipe/helper slice that validates the design.
18
18
 
19
19
  ## High-Level Recipe Cells
@@ -88,27 +88,26 @@ Purpose: inspect, summarize, and decide actions for local async runs.
88
88
  Pipeline:
89
89
 
90
90
  ```text
91
- run-state summary → actor-message tail → stale/active classification → recommended action → optional stop/control message
91
+ Run summary → Trace tail → stale/active classification → recommended Inspect or Control action
92
92
  ```
93
93
 
94
94
  Likely needed cells:
95
95
 
96
96
  - Run summary helper
97
- - JSONL actor-message tailer
97
+ - bounded Trace tail reader
98
98
  - Stale-run classifier
99
- - Control-message recommender
99
+ - Inspect/Control action recommender
100
100
  - Run report artifact
101
101
 
102
102
  Existing seeds:
103
103
 
104
104
  - `utility-run-summary`
105
105
  - `utility-jsonl-tail`
106
- - `subagent-message`
107
106
  - `pipeline-artifact-report`
108
107
 
109
108
  Implemented seed:
110
109
 
111
- - `pipeline-async-run-ops`: structured run operations snapshot → normalized operations report → artifact report. The snapshot combines run summary, actor-message tail, and recommended inspect/control messages before the LLM normalization step.
110
+ - `pipeline-async-run-ops`: structured run operations snapshot → normalized operations report → artifact report. The snapshot combines Run summary, Trace tail, and recommended Inspect/Control actions before the LLM normalization step.
112
111
 
113
112
  ### Research Brief Cell
114
113
 
@@ -147,19 +146,18 @@ Pipeline:
147
146
  mission → lens proposers in room → consensus transcript → named implementer writes artifact → QA reviewer checks artifact + transcript → finalizer applies fixes → artifact assertions
148
147
  ```
149
148
 
150
- Use this for creative demos, single-file artifacts, specs, docs, prompt packs, and product/UX deliverables where broad input matters but one owner should shape the final file. Proposers should have message/inspect tools only. The implementer should be the first role with write tools. QA should inspect/read but not mutate. The finalizer may write only after reading QA evidence.
149
+ Use this for creative demos, single-file artifacts, specs, docs, prompt packs, and product/UX deliverables where broad input matters but one owner should shape the final file. Proposers remain read-only. The implementer becomes the first stage with write tools. QA inspects without mutation, and the finalizer writes only after reading immutable QA evidence.
151
150
 
152
151
  Required gates:
153
152
 
154
153
  - Artifact path, report path, and minimum acceptance checks are explicit inputs.
155
154
  - The workflow fails if the requested artifact is missing, too small, or not self-contained enough for the task.
156
- - `run.done` is emitted only after QA/finalizer passes, not merely after room discussion.
155
+ - The Run completes only after QA/finalizer acceptance, not merely after proposal generation.
157
156
 
158
157
  Existing seeds:
159
158
 
160
- - `pipeline-room-swarm` for room-visible discussion and rosters.
161
- - `subagent-message` for explicit room handoffs.
162
- - `subagent-review` / `subagent-verify` for QA roles.
159
+ - `subagent-review` / `subagent-verify` for QA stages.
160
+ - `pipeline-quorum-review` for independent proposals and synthesis.
163
161
  - `pipeline-artifact-write` or a small helper script for deterministic artifact assertion.
164
162
 
165
163
  Next recipe direction:
@@ -257,7 +255,7 @@ Good next candidates for the standard library after the first task-first wave:
257
255
 
258
256
  1. Package/release metadata enrichment: implemented in `pipeline-release-readiness` by adding `utility-package-summary` and `utility-skill-summary` between changelog extraction and validation, making release-readiness reports more evidence-rich without adding publish automation.
259
257
  2. Evidence-only release summary: implemented as `pipeline-release-summary`, which composes changelog/package/skill/validation evidence into a release summary, risk checklist, and PR body draft artifact while leaving commit, PR, merge, tag, and publish actions to explicit release gates.
260
- 3. Artifact packaging and manifesting: implemented as `pipeline-artifact-bundle`, which composes optional validation, `pipeline-artifact-write`, `utility-artifact-manifest`, deterministic manifest writing, and an actor-message handoff when the caller explicitly requests filesystem writes.
258
+ 3. Artifact packaging and manifesting: implemented as `pipeline-artifact-bundle`, which composes optional validation, `pipeline-artifact-write`, `utility-artifact-manifest`, deterministic manifest writing, and final artifact evidence when the caller explicitly requests filesystem writes.
261
259
  4. Async run cleanup planning: extend async-run operations with stale-run classification and recommended `message`, `cancel`, or `kill` controls, keeping actual control execution operator-gated.
262
260
 
263
261
  Each candidate should land with the minimum missing cells rather than a broad one-shot framework. Already implemented task-first seeds include `pipeline-release-readiness`, `pipeline-release-summary`, `pipeline-repo-health`, `pipeline-async-run-ops`, `pipeline-docs-maintenance`, `pipeline-media-library`, and `pipeline-artifact-bundle`.