@llblab/pi-actors 0.45.1 → 0.46.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 (212) hide show
  1. package/AGENTS.md +9 -7
  2. package/CHANGELOG.md +8 -1
  3. package/README.md +26 -12
  4. package/dist/fixtures/protocol/recipe-summary.json +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lib/async-runs.d.ts +4 -1
  7. package/dist/lib/async-runs.js +22 -23
  8. package/dist/lib/automatic-review-runtime.d.ts +2 -0
  9. package/dist/lib/automatic-review-runtime.js +12 -5
  10. package/dist/lib/draft-sleep.js +0 -1
  11. package/dist/lib/extension-runtime.d.ts +1 -1
  12. package/dist/lib/extension-runtime.js +8 -2
  13. package/dist/lib/inspector.js +45 -7
  14. package/dist/lib/paths.d.ts +0 -1
  15. package/dist/lib/paths.js +0 -7
  16. package/dist/lib/prompts.d.ts +1 -1
  17. package/dist/lib/prompts.js +2 -2
  18. package/dist/lib/recipes-context.js +2 -2
  19. package/dist/lib/recipes-references.d.ts +24 -9
  20. package/dist/lib/recipes-references.js +152 -126
  21. package/dist/lib/runtime.d.ts +0 -1
  22. package/dist/lib/runtime.js +1 -3
  23. package/dist/lib/tools-inspect.d.ts +0 -1
  24. package/dist/lib/tools-inspect.js +35 -8
  25. package/dist/lib/tools-local.d.ts +2 -0
  26. package/dist/lib/tools-local.js +1 -1
  27. package/dist/lib/tools-spawn.d.ts +2 -0
  28. package/dist/lib/tools-spawn.js +24 -52
  29. package/dist/scripts/build-dist.mjs +13 -4
  30. package/dist/skills/actors/SKILL.md +6 -6
  31. package/dist/skills/actors/recipes/recipe-validate.json +11 -0
  32. package/{recipes/utility-coordinator-lock-snapshot.json → dist/skills/actors/recipes/resource-locker-snapshot.json} +1 -3
  33. package/dist/{recipes → skills/actors/recipes}/resource-locker.json +1 -3
  34. package/dist/{recipes/utility-run-ops-snapshot.json → skills/actors/recipes/run-ops-snapshot.json} +1 -3
  35. package/dist/skills/actors/recipes/run-summary.json +9 -0
  36. package/dist/{scripts/locker.mjs → skills/actors/scripts/resource-locker.mjs} +2 -2
  37. package/dist/skills/actors/scripts/run-utils.mjs +164 -0
  38. package/{scripts → dist/skills/actors/scripts}/validate-recipe.mjs +134 -17
  39. package/dist/skills/artifacts/SKILL.md +16 -0
  40. package/{recipes/pipeline-artifact-bundle.json → dist/skills/artifacts/recipes/bundle.json} +4 -4
  41. package/dist/{recipes/utility-artifact-write.json → skills/artifacts/recipes/file-write.json} +1 -3
  42. package/dist/{recipes/utility-artifact-manifest.json → skills/artifacts/recipes/manifest.json} +1 -3
  43. package/{recipes/pipeline-artifact-report.json → dist/skills/artifacts/recipes/report.json} +2 -2
  44. package/dist/{recipes/pipeline-artifact-write.json → skills/artifacts/recipes/write.json} +3 -3
  45. package/dist/skills/artifacts/scripts/artifact-utils.mjs +63 -0
  46. package/dist/skills/media/SKILL.md +16 -0
  47. package/dist/{recipes/pipeline-media-library.json → skills/media/recipes/library.json} +2 -2
  48. package/{recipes/music-player.json → dist/skills/media/recipes/player.json} +1 -3
  49. package/dist/{recipes/utility-playlist-build.json → skills/media/recipes/playlist-build.json} +1 -3
  50. package/dist/skills/media/scripts/media-utils.mjs +47 -0
  51. package/dist/{scripts → skills/media/scripts}/music-player.mjs +9 -3
  52. package/dist/skills/project-work/SKILL.md +16 -0
  53. package/dist/skills/project-work/recipes/changelog-section.json +11 -0
  54. package/{recipes/pipeline-docs-maintenance.json → dist/skills/project-work/recipes/docs-maintenance.json} +4 -4
  55. package/dist/skills/project-work/recipes/package-summary.json +9 -0
  56. package/{recipes/pipeline-release-readiness.json → dist/skills/project-work/recipes/release-readiness.json} +6 -6
  57. package/dist/{recipes/pipeline-release-summary.json → skills/project-work/recipes/release-summary.json} +5 -5
  58. package/{recipes/pipeline-repo-health.json → dist/skills/project-work/recipes/repo-health.json} +6 -6
  59. package/{recipes/pipeline-async-run-ops.json → dist/skills/project-work/recipes/run-ops.json} +3 -3
  60. package/dist/skills/project-work/recipes/skill-summary.json +11 -0
  61. package/dist/skills/project-work/scripts/project-utils.mjs +89 -0
  62. package/dist/skills/recipe-memory/SKILL.md +16 -0
  63. package/dist/skills/swarm/SKILL.md +4 -4
  64. package/{recipes/pipeline-architect-coordinator.json → dist/skills/swarm/recipes/architect.json} +5 -5
  65. package/{recipes/pipeline-checkpoint-continuation.json → dist/skills/swarm/recipes/checkpoint-continuation.json} +3 -3
  66. package/dist/{recipes/pipeline-development-tasking.json → skills/swarm/recipes/development-tasking.json} +4 -4
  67. package/dist/{recipes/lens-swarm.json → skills/swarm/recipes/lens-review.json} +1 -1
  68. package/dist/{recipes/pipeline-quorum-review.json → skills/swarm/recipes/quorum-review.json} +4 -4
  69. package/{recipes/pipeline-research-synthesis.json → dist/skills/swarm/recipes/research-synthesis.json} +6 -6
  70. package/{recipes/pipeline-review-readiness.json → dist/skills/swarm/recipes/review-readiness.json} +1 -1
  71. package/{recipes/subagents-prompts.json → dist/skills/swarm/recipes/subagent-prompts.json} +1 -1
  72. package/{recipes → dist/skills/swarm/recipes}/subagent-quorum.json +1 -1
  73. package/dist/{recipes → skills/swarm/recipes}/subagent-review-coordinator.json +6 -6
  74. package/docs/actor-inspector.md +4 -3
  75. package/docs/async-runs.md +2 -2
  76. package/docs/recipe-library.md +23 -23
  77. package/docs/releasing.md +2 -2
  78. package/docs/template-recipes.md +30 -14
  79. package/docs/tool-registry.md +2 -2
  80. package/fixtures/protocol/recipe-summary.json +1 -1
  81. package/index.ts +2 -1
  82. package/lib/async-runs.ts +47 -24
  83. package/lib/automatic-review-runtime.ts +16 -3
  84. package/lib/draft-sleep.ts +0 -1
  85. package/lib/extension-runtime.ts +21 -2
  86. package/lib/inspector.ts +56 -11
  87. package/lib/paths.ts +0 -7
  88. package/lib/prompts.ts +2 -2
  89. package/lib/recipes-context.ts +2 -2
  90. package/lib/recipes-references.ts +223 -134
  91. package/lib/runtime.ts +1 -5
  92. package/lib/tools-inspect.ts +42 -9
  93. package/lib/tools-local.ts +2 -0
  94. package/lib/tools-spawn.ts +37 -74
  95. package/package.json +2 -4
  96. package/scripts/build-dist.mjs +13 -4
  97. package/skills/actors/SKILL.md +6 -6
  98. package/skills/actors/recipes/recipe-validate.json +11 -0
  99. package/{dist/recipes/utility-coordinator-lock-snapshot.json → skills/actors/recipes/resource-locker-snapshot.json} +1 -3
  100. package/{recipes → skills/actors/recipes}/resource-locker.json +1 -3
  101. package/{recipes/utility-run-ops-snapshot.json → skills/actors/recipes/run-ops-snapshot.json} +1 -3
  102. package/skills/actors/recipes/run-summary.json +9 -0
  103. package/{scripts/locker.mjs → skills/actors/scripts/resource-locker.mjs} +2 -2
  104. package/skills/actors/scripts/run-utils.mjs +164 -0
  105. package/{dist → skills/actors}/scripts/validate-recipe.mjs +134 -17
  106. package/skills/artifacts/SKILL.md +16 -0
  107. package/{dist/recipes/pipeline-artifact-bundle.json → skills/artifacts/recipes/bundle.json} +4 -4
  108. package/{recipes/utility-artifact-write.json → skills/artifacts/recipes/file-write.json} +1 -3
  109. package/{recipes/utility-artifact-manifest.json → skills/artifacts/recipes/manifest.json} +1 -3
  110. package/{dist/recipes/pipeline-artifact-report.json → skills/artifacts/recipes/report.json} +2 -2
  111. package/{recipes/pipeline-artifact-write.json → skills/artifacts/recipes/write.json} +3 -3
  112. package/skills/artifacts/scripts/artifact-utils.mjs +63 -0
  113. package/skills/media/SKILL.md +16 -0
  114. package/{recipes/pipeline-media-library.json → skills/media/recipes/library.json} +2 -2
  115. package/{dist/recipes/music-player.json → skills/media/recipes/player.json} +1 -3
  116. package/{recipes/utility-playlist-build.json → skills/media/recipes/playlist-build.json} +1 -3
  117. package/skills/media/scripts/media-utils.mjs +47 -0
  118. package/{scripts → skills/media/scripts}/music-player.mjs +9 -3
  119. package/skills/project-work/SKILL.md +16 -0
  120. package/skills/project-work/recipes/changelog-section.json +11 -0
  121. package/{dist/recipes/pipeline-docs-maintenance.json → skills/project-work/recipes/docs-maintenance.json} +4 -4
  122. package/skills/project-work/recipes/package-summary.json +9 -0
  123. package/{dist/recipes/pipeline-release-readiness.json → skills/project-work/recipes/release-readiness.json} +6 -6
  124. package/{recipes/pipeline-release-summary.json → skills/project-work/recipes/release-summary.json} +5 -5
  125. package/{dist/recipes/pipeline-repo-health.json → skills/project-work/recipes/repo-health.json} +6 -6
  126. package/{dist/recipes/pipeline-async-run-ops.json → skills/project-work/recipes/run-ops.json} +3 -3
  127. package/skills/project-work/recipes/skill-summary.json +11 -0
  128. package/skills/project-work/scripts/project-utils.mjs +89 -0
  129. package/skills/recipe-memory/SKILL.md +16 -0
  130. package/skills/swarm/SKILL.md +4 -4
  131. package/{dist/recipes/pipeline-architect-coordinator.json → skills/swarm/recipes/architect.json} +5 -5
  132. package/{dist/recipes/pipeline-checkpoint-continuation.json → skills/swarm/recipes/checkpoint-continuation.json} +3 -3
  133. package/{recipes/pipeline-development-tasking.json → skills/swarm/recipes/development-tasking.json} +4 -4
  134. package/{recipes/lens-swarm.json → skills/swarm/recipes/lens-review.json} +1 -1
  135. package/{recipes/pipeline-quorum-review.json → skills/swarm/recipes/quorum-review.json} +4 -4
  136. package/{dist/recipes/pipeline-research-synthesis.json → skills/swarm/recipes/research-synthesis.json} +6 -6
  137. package/{dist/recipes/pipeline-review-readiness.json → skills/swarm/recipes/review-readiness.json} +1 -1
  138. package/{dist/recipes/subagents-prompts.json → skills/swarm/recipes/subagent-prompts.json} +1 -1
  139. package/{dist → skills/swarm}/recipes/subagent-quorum.json +1 -1
  140. package/{recipes → skills/swarm/recipes}/subagent-review-coordinator.json +6 -6
  141. package/dist/recipes/utility-changelog-section.json +0 -13
  142. package/dist/recipes/utility-package-summary.json +0 -11
  143. package/dist/recipes/utility-run-summary.json +0 -11
  144. package/dist/recipes/utility-skill-summary.json +0 -13
  145. package/dist/recipes/utility-validate-recipe.json +0 -13
  146. package/dist/scripts/executable-block-style.d.mts +0 -1
  147. package/dist/scripts/executable-block-style.mjs +0 -73
  148. package/dist/scripts/recipe-utils.mjs +0 -404
  149. package/dist/scripts/release-gates.mjs +0 -281
  150. package/recipes/utility-changelog-section.json +0 -13
  151. package/recipes/utility-package-summary.json +0 -11
  152. package/recipes/utility-run-summary.json +0 -11
  153. package/recipes/utility-skill-summary.json +0 -13
  154. package/recipes/utility-validate-recipe.json +0 -13
  155. package/scripts/executable-block-style.d.mts +0 -1
  156. package/scripts/executable-block-style.mjs +0 -73
  157. package/scripts/recipe-utils.mjs +0 -404
  158. package/scripts/release-gates.mjs +0 -281
  159. /package/dist/{recipes/utility-validation-wrapper.json → skills/actors/recipes/command-validate.json} +0 -0
  160. /package/dist/{recipes/utility-jsonl-tail.json → skills/actors/recipes/jsonl-tail.json} +0 -0
  161. /package/dist/{recipes/utility-run-state-files.json → skills/actors/recipes/run-state-files.json} +0 -0
  162. /package/dist/{recipes/utility-playlist-scan.json → skills/media/recipes/playlist-scan.json} +0 -0
  163. /package/dist/{recipes/utility-changelog-head.json → skills/project-work/recipes/changelog-head.json} +0 -0
  164. /package/dist/{recipes/utility-git-log.json → skills/project-work/recipes/git-log.json} +0 -0
  165. /package/dist/{recipes/utility-git-status.json → skills/project-work/recipes/git-status.json} +0 -0
  166. /package/dist/{recipes/utility-markdown-index.json → skills/project-work/recipes/markdown-index.json} +0 -0
  167. /package/dist/{recipes → skills/recipe-memory/recipes}/draft-review.json +0 -0
  168. /package/dist/{recipes → skills/recipe-memory/recipes}/tool-review.json +0 -0
  169. /package/dist/{recipes → skills/swarm/recipes}/subagent-artifact.json +0 -0
  170. /package/dist/{recipes → skills/swarm/recipes}/subagent-checkpoint.json +0 -0
  171. /package/dist/{recipes → skills/swarm/recipes}/subagent-conflict-report.json +0 -0
  172. /package/dist/{recipes → skills/swarm/recipes}/subagent-contradiction-map.json +0 -0
  173. /package/dist/{recipes → skills/swarm/recipes}/subagent-critic.json +0 -0
  174. /package/dist/{recipes → skills/swarm/recipes}/subagent-evidence-map.json +0 -0
  175. /package/dist/{recipes → skills/swarm/recipes}/subagent-followup.json +0 -0
  176. /package/dist/{recipes → skills/swarm/recipes}/subagent-judge.json +0 -0
  177. /package/dist/{recipes → skills/swarm/recipes}/subagent-merge.json +0 -0
  178. /package/dist/{recipes → skills/swarm/recipes}/subagent-normalize.json +0 -0
  179. /package/dist/{recipes → skills/swarm/recipes}/subagent-plan.json +0 -0
  180. /package/dist/{recipes → skills/swarm/recipes}/subagent-preflight.json +0 -0
  181. /package/dist/{recipes → skills/swarm/recipes}/subagent-prompt.json +0 -0
  182. /package/dist/{recipes → skills/swarm/recipes}/subagent-review.json +0 -0
  183. /package/dist/{recipes → skills/swarm/recipes}/subagent-task-card.json +0 -0
  184. /package/dist/{recipes → skills/swarm/recipes}/subagent-tools.json +0 -0
  185. /package/dist/{recipes → skills/swarm/recipes}/subagent-verify.json +0 -0
  186. /package/{recipes/utility-validation-wrapper.json → skills/actors/recipes/command-validate.json} +0 -0
  187. /package/{recipes/utility-jsonl-tail.json → skills/actors/recipes/jsonl-tail.json} +0 -0
  188. /package/{recipes/utility-run-state-files.json → skills/actors/recipes/run-state-files.json} +0 -0
  189. /package/{recipes/utility-playlist-scan.json → skills/media/recipes/playlist-scan.json} +0 -0
  190. /package/{recipes/utility-changelog-head.json → skills/project-work/recipes/changelog-head.json} +0 -0
  191. /package/{recipes/utility-git-log.json → skills/project-work/recipes/git-log.json} +0 -0
  192. /package/{recipes/utility-git-status.json → skills/project-work/recipes/git-status.json} +0 -0
  193. /package/{recipes/utility-markdown-index.json → skills/project-work/recipes/markdown-index.json} +0 -0
  194. /package/{recipes → skills/recipe-memory/recipes}/draft-review.json +0 -0
  195. /package/{recipes → skills/recipe-memory/recipes}/tool-review.json +0 -0
  196. /package/{recipes → skills/swarm/recipes}/subagent-artifact.json +0 -0
  197. /package/{recipes → skills/swarm/recipes}/subagent-checkpoint.json +0 -0
  198. /package/{recipes → skills/swarm/recipes}/subagent-conflict-report.json +0 -0
  199. /package/{recipes → skills/swarm/recipes}/subagent-contradiction-map.json +0 -0
  200. /package/{recipes → skills/swarm/recipes}/subagent-critic.json +0 -0
  201. /package/{recipes → skills/swarm/recipes}/subagent-evidence-map.json +0 -0
  202. /package/{recipes → skills/swarm/recipes}/subagent-followup.json +0 -0
  203. /package/{recipes → skills/swarm/recipes}/subagent-judge.json +0 -0
  204. /package/{recipes → skills/swarm/recipes}/subagent-merge.json +0 -0
  205. /package/{recipes → skills/swarm/recipes}/subagent-normalize.json +0 -0
  206. /package/{recipes → skills/swarm/recipes}/subagent-plan.json +0 -0
  207. /package/{recipes → skills/swarm/recipes}/subagent-preflight.json +0 -0
  208. /package/{recipes → skills/swarm/recipes}/subagent-prompt.json +0 -0
  209. /package/{recipes → skills/swarm/recipes}/subagent-review.json +0 -0
  210. /package/{recipes → skills/swarm/recipes}/subagent-task-card.json +0 -0
  211. /package/{recipes → skills/swarm/recipes}/subagent-tools.json +0 -0
  212. /package/{recipes → skills/swarm/recipes}/subagent-verify.json +0 -0
@@ -0,0 +1,11 @@
1
+ {
2
+ "args": [
3
+ "skill:path",
4
+ "package_json:path"
5
+ ],
6
+ "defaults": {
7
+ "skill": "skills/actors/SKILL.md",
8
+ "package_json": "package.json"
9
+ },
10
+ "template": "{skill_dir}/scripts/project-utils.mjs skill-summary {skill} {package_json}"
11
+ }
@@ -0,0 +1,89 @@
1
+ #!/usr/bin/env node
2
+
3
+ /** Project-work metadata and changelog helpers. */
4
+
5
+ import { existsSync, readFileSync } from "node:fs";
6
+ import { resolve } from "node:path";
7
+
8
+ function fail(message) {
9
+ console.error(message);
10
+ process.exit(1);
11
+ }
12
+
13
+ function pathOf(value) {
14
+ return resolve(String(value).replace(/^~(?=\/|$)/, process.env.HOME ?? "~"));
15
+ }
16
+
17
+ function readJson(file) {
18
+ if (!existsSync(file)) return undefined;
19
+ try {
20
+ return JSON.parse(readFileSync(file, "utf8"));
21
+ } catch {
22
+ return undefined;
23
+ }
24
+ }
25
+
26
+ function packageSummary(fileValue = "package.json") {
27
+ const pkg = readJson(pathOf(fileValue));
28
+ if (!pkg) fail(`Package JSON not found or invalid: ${fileValue}`);
29
+ const dependencies = Object.keys(pkg.dependencies ?? {}).sort();
30
+ const devDependencies = Object.keys(pkg.devDependencies ?? {}).sort();
31
+ console.log(JSON.stringify({
32
+ name: pkg.name ?? "",
33
+ version: pkg.version ?? "",
34
+ type: pkg.type ?? "",
35
+ private: Boolean(pkg.private),
36
+ packageManager: pkg.packageManager ?? "",
37
+ files: Array.isArray(pkg.files) ? pkg.files : [],
38
+ bin: pkg.bin ?? null,
39
+ main: pkg.main ?? "",
40
+ exports: pkg.exports ?? null,
41
+ scripts: Object.keys(pkg.scripts ?? {}).sort(),
42
+ dependencyCount: dependencies.length,
43
+ devDependencyCount: devDependencies.length,
44
+ dependencies,
45
+ devDependencies,
46
+ }, null, 2));
47
+ }
48
+
49
+ function skillSummary(skillValue, packageValue = "package.json") {
50
+ const content = readFileSync(pathOf(skillValue), "utf8");
51
+ const pkg = readJson(pathOf(packageValue)) ?? {};
52
+ const frontmatter = content.match(/^---\r?\n([\s\S]*?)\r?\n---/)?.[1] ?? "";
53
+ const fields = Object.fromEntries(frontmatter.split(/\r?\n/).flatMap((line) => {
54
+ const match = line.match(/^([A-Za-z_][\w-]*):\s*(.*)$/);
55
+ return match ? [[match[1], match[2].trim()]] : [];
56
+ }));
57
+ const version = fields.version ?? frontmatter.match(/^\s+version:\s*([^\n]+)$/m)?.[1]?.trim() ?? "";
58
+ const body = content.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/, "");
59
+ console.log(JSON.stringify({
60
+ path: skillValue,
61
+ name: fields.name ?? "",
62
+ description: fields.description ?? "",
63
+ version,
64
+ packageVersion: pkg.version ?? "",
65
+ versionMatchesPackage: version === pkg.version,
66
+ frontmatterExtraColonLines: frontmatter.split(/\r?\n/).filter((line) =>
67
+ /^\w+:\s*\S/.test(line) && (line.match(/:/g) ?? []).length > 1),
68
+ bodyLineCount: body.split(/\r?\n/).length,
69
+ headings: body.split(/\r?\n/).filter((line) => /^#{1,6}\s/.test(line)),
70
+ }, null, 2));
71
+ }
72
+
73
+ function changelogSection(fileValue, version) {
74
+ const lines = readFileSync(pathOf(fileValue), "utf8").split(/\r?\n/);
75
+ const start = lines.findIndex((line) => line.startsWith("## ") && line.includes(version));
76
+ if (start < 0) fail(`Version section not found: ${version}`);
77
+ const next = lines.findIndex((line, index) => index > start && line.startsWith("## "));
78
+ console.log(lines.slice(start, next < 0 ? lines.length : next).join("\n").trimEnd());
79
+ }
80
+
81
+ const [command, ...args] = process.argv.slice(2);
82
+ try {
83
+ if (command === "package-summary") packageSummary(args[0]);
84
+ else if (command === "skill-summary") skillSummary(args[0], args[1]);
85
+ else if (command === "changelog-section") changelogSection(args[0] ?? "CHANGELOG.md", args[1] ?? "Unreleased");
86
+ else fail(`Unknown project command: ${command ?? ""}`);
87
+ } catch (error) {
88
+ fail(error instanceof Error ? error.message : String(error));
89
+ }
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: recipe-memory
3
+ description: Package-owned structural review components for safe persistent Recipe capability memory.
4
+ ---
5
+
6
+ # Recipe Memory
7
+
8
+ Own the executable reviewer components used by automatic draft and active-tool Recipe evolution.
9
+
10
+ ## Scope
11
+
12
+ - Review value-free structural projections rather than executable content or machine-local paths.
13
+ - Return bounded decisions for deterministic package-owned executors.
14
+ - Remain package-owned so user Recipes cannot shadow or redirect automatic review.
15
+
16
+ This Skill does not own registry mutation, CAS, journaling, quarantine, lineage, retry, reset, or safe-boundary activation. Those remain Run-kernel and registry responsibilities. Its direct Recipe identities are `recipe-memory/<filename stem>`; Recipe files have no top-level `name`. They are internal components, never automatic user tools.
@@ -9,7 +9,7 @@ Subagent orchestration: delegated review, quorum consensus, scoped locks, clean-
9
9
 
10
10
  ## Purpose
11
11
 
12
- Run subagents safely and predictably through reusable orchestration contracts.
12
+ Run subagents safely and predictably through reusable orchestration contracts. Skill Recipe identity is `<active Skill name>/<Recipe filename stem>`; Recipe files have no top-level `name`. Components are direct files under `recipes/` and use exact `swarm/<recipe>` identities, including `swarm/lens-review`, `swarm/quorum-review`, `swarm/research-synthesis`, and `swarm/development-tasking`; they remain components rather than automatic tools.
13
13
 
14
14
  Activation rule: load this skill before launching multiple independent actors or subagents, even when the work is creative artifact generation rather than code review. The coordinator owns decomposition, disjoint scopes, launch correctness, result integration, and final validation; participants may choose local content or implementation details independently inside their assigned boundaries.
15
15
 
@@ -31,7 +31,7 @@ Maintain this skill as a living orchestration standard. When real swarm work exp
31
31
  - `Lens`: A deliberately narrow cognitive role assigned to one subagent, such as security, tests, architecture, economics, or operator UX.
32
32
  - `Task Card`: A bounded implementation assignment with goal, allowed files, avoided files, expected output, and validation gates.
33
33
  - `Component Capability`: An abstract adapter operation such as launcher, reviewer, verifier, merger, quorum, checkpoint, follow-up, judge, or normalizer. Swarm may target these capabilities, but local adapters bind them to concrete tools, recipes, draft recipes, command templates, async runs, or services.
34
- - `Draft Recipe`: A reusable but non-registered recipe captured from a successful inline actor spawn under `~/.pi/agent/recipes/drafts`. It can be replayed by explicit file path and later promoted into the active tool recipe root after enough dogfood.
34
+ - `Draft Recipe`: A reusable but non-registered recipe captured from a successful inline actor spawn under `~/.pi/agent/recipes/drafts`. It can be replayed by an explicit `.json` / `.md` path (relative entry paths use invocation `cwd`) and later promoted into the active tool Recipe root after enough dogfood.
35
35
  - `Coordinator Checkpoint`: A deliberate subagent pause where the subagent preserves its working context, sends a bounded question or status to the orchestrator, receives a coordinator reply, and continues in the same subagent context.
36
36
  - `Evidence Checkpoint`: A deliberate stop where a subagent records sources, assumptions, confidence, contradictions, or blocking evidence gaps before synthesis.
37
37
  - `Integrator`: The human or agent that merges isolated branches/worktrees into the shared target and owns conflict resolution.
@@ -162,7 +162,7 @@ Use [`references/development-swarm.md`](./references/development-swarm.md) for c
162
162
 
163
163
  Purpose: turn one result into many risk lenses and a decision-grade verdict.
164
164
 
165
- Use lens swarm for broad coverage, quorum for confidence on one critical judgement, or both for high-stakes releases. In adapters that expose current session model/thinking policy, default ordinary same-policy review swarms to that current policy and require explicit args only when intentionally varying models or thinking levels. Run a cheap model/tool preflight before launching expensive reviewer fanout; if it fails, use the `ACTOR_PREFLIGHT_FAILED` stage/model/error-class/prompt-file diagnostic to choose explicit override args instead of rerunning blindly. For packaged review swarms, tune `min_successful_reviewers`, `reviewer_concurrency`, `subagent_ttl_ms`, and `merge_policy` instead of manual reruns; preserve partial reports and label the outcome `complete`, `degraded`, or `insufficient_data`. The final report should separate consensus findings, minority findings, merger findings, risks, and recommended next actions.
165
+ Use lens swarm for broad coverage, quorum for confidence on one critical judgement, or both for high-stakes releases. In adapters that expose current session model/thinking policy, default ordinary same-policy review swarms to that current policy and require explicit args only when intentionally varying models or thinking levels. Run a cheap model/tool preflight before launching expensive reviewer fanout; if it fails, use the `ACTOR_PREFLIGHT_FAILED` stage/model/error-class/prompt-file diagnostic to choose explicit override args instead of rerunning blindly. For Skill-owned review swarms, tune `min_successful_reviewers`, `reviewer_concurrency`, `subagent_ttl_ms`, and `merge_policy` instead of manual reruns; preserve partial reports and label the outcome `complete`, `degraded`, or `insufficient_data`. The final report should separate consensus findings, minority findings, merger findings, risks, and recommended next actions.
166
166
 
167
167
  A review swarm synthesis must not fabricate claims. Every final finding should trace to a reviewer note, checked artifact, command output, source, or explicit merger rationale. Devil's Advocate critical findings must be preserved or explicitly disproved with evidence.
168
168
 
@@ -345,7 +345,7 @@ Locks prevent subagents from interfering with shared scopes. Locks are optional
345
345
 
346
346
  ## Validation
347
347
 
348
- After changing Swarm adapter contracts or packaged documentation, validate the local distribution with whatever checks the host project provides. At minimum, review the text for boundary drift:
348
+ After changing Swarm adapter contracts or Skill documentation, validate the local distribution with whatever checks the host project provides. At minimum, review the text for boundary drift:
349
349
 
350
350
  - no dependency on a specific extension, actor runtime, registry, recipe store, or CLI runner;
351
351
  - no bundled broad coordinator or lock runtime as portable Swarm core;
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "reviewer": "subagent-review.json",
5
- "critic": "subagent-critic.json",
6
- "verifier": "subagent-verify.json",
7
- "merger": "subagent-merge.json",
8
- "normalizer": "subagent-normalize.json"
4
+ "reviewer": "swarm/subagent-review",
5
+ "critic": "swarm/subagent-critic",
6
+ "verifier": "swarm/subagent-verify",
7
+ "merger": "swarm/subagent-merge",
8
+ "normalizer": "swarm/subagent-normalize"
9
9
  },
10
10
  "args": [
11
11
  "problem:string",
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "checkpoint": "subagent-checkpoint.json",
5
- "followup": "subagent-followup.json",
6
- "normalizer": "subagent-normalize.json"
4
+ "checkpoint": "swarm/subagent-checkpoint",
5
+ "followup": "swarm/subagent-followup",
6
+ "normalizer": "swarm/subagent-normalize"
7
7
  },
8
8
  "args": [
9
9
  "state:string",
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "planner": "subagent-plan.json",
5
- "task_card": "subagent-task-card.json",
6
- "critic": "subagent-critic.json",
7
- "normalizer": "subagent-normalize.json"
4
+ "planner": "swarm/subagent-plan",
5
+ "task_card": "swarm/subagent-task-card",
6
+ "critic": "swarm/subagent-critic",
7
+ "normalizer": "swarm/subagent-normalize"
8
8
  },
9
9
  "args": [
10
10
  "goal:string",
@@ -2,7 +2,7 @@
2
2
  "description": "General-purpose multi-lens review swarm. Launches independent reviewers by lens, then verifies, merges, judges, and normalizes the result.",
3
3
  "async": true,
4
4
  "imports": {
5
- "coordinator": "subagent-review-coordinator.json"
5
+ "coordinator": "swarm/subagent-review-coordinator"
6
6
  },
7
7
  "args": [
8
8
  "scope:string",
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "subagent": "subagent-prompt.json",
5
- "merger": "subagent-merge.json",
6
- "judge": "subagent-judge.json",
7
- "normalizer": "subagent-normalize.json"
4
+ "subagent": "swarm/subagent-prompt",
5
+ "merger": "swarm/subagent-merge",
6
+ "judge": "swarm/subagent-judge",
7
+ "normalizer": "swarm/subagent-normalize"
8
8
  },
9
9
  "args": [
10
10
  "prompt:string",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "planner": "subagent-plan.json",
5
- "evidence": "subagent-evidence-map.json",
6
- "contradictions": "subagent-contradiction-map.json",
7
- "verifier": "subagent-verify.json",
8
- "merger": "subagent-merge.json",
9
- "normalizer": "subagent-normalize.json"
4
+ "planner": "swarm/subagent-plan",
5
+ "evidence": "swarm/subagent-evidence-map",
6
+ "contradictions": "swarm/subagent-contradiction-map",
7
+ "verifier": "swarm/subagent-verify",
8
+ "merger": "swarm/subagent-merge",
9
+ "normalizer": "swarm/subagent-normalize"
10
10
  },
11
11
  "args": [
12
12
  "question:string",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "coordinator": "subagent-review-coordinator.json"
4
+ "coordinator": "swarm/subagent-review-coordinator"
5
5
  },
6
6
  "args": [
7
7
  "scope:string",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "subagent": "subagent-prompt.json"
4
+ "subagent": "swarm/subagent-prompt"
5
5
  },
6
6
  "args": [
7
7
  "prompts:array",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "subagent": "subagent-prompt.json"
4
+ "subagent": "swarm/subagent-prompt"
5
5
  },
6
6
  "args": [
7
7
  "prompt:string",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "async": true,
3
3
  "imports": {
4
- "preflight": "subagent-preflight.json",
5
- "reviewer": "subagent-review.json",
6
- "verifier": "subagent-verify.json",
7
- "merger": "subagent-merge.json",
8
- "judge": "subagent-judge.json",
9
- "normalizer": "subagent-normalize.json"
4
+ "preflight": "swarm/subagent-preflight",
5
+ "reviewer": "swarm/subagent-review",
6
+ "verifier": "swarm/subagent-verify",
7
+ "merger": "swarm/subagent-merge",
8
+ "judge": "swarm/subagent-judge",
9
+ "normalizer": "swarm/subagent-normalize"
10
10
  },
11
11
  "args": [
12
12
  "scope:string",
@@ -1,13 +0,0 @@
1
- {
2
- "args": [
3
- "repo:path",
4
- "file:path",
5
- "version:string"
6
- ],
7
- "defaults": {
8
- "repo": "~/.pi/agent/extensions/pi-actors",
9
- "file": "CHANGELOG.md",
10
- "version": "0.7.1"
11
- },
12
- "template": "{repo}/scripts/recipe-utils.mjs changelog-section {file} {version}"
13
- }
@@ -1,11 +0,0 @@
1
- {
2
- "args": [
3
- "package_json:path",
4
- "repo:path"
5
- ],
6
- "defaults": {
7
- "package_json": "package.json",
8
- "repo": "~/.pi/agent/extensions/pi-actors"
9
- },
10
- "template": "{repo}/scripts/recipe-utils.mjs package-summary {package_json}"
11
- }
@@ -1,11 +0,0 @@
1
- {
2
- "args": [
3
- "repo:path",
4
- "state_root:path"
5
- ],
6
- "defaults": {
7
- "repo": "~/.pi/agent/extensions/pi-actors",
8
- "state_root": "~/.pi/agent/tmp/pi-actors/runs"
9
- },
10
- "template": "{repo}/scripts/recipe-utils.mjs run-summary {state_root}"
11
- }
@@ -1,13 +0,0 @@
1
- {
2
- "args": [
3
- "skill:path",
4
- "package_json:path",
5
- "repo:path"
6
- ],
7
- "defaults": {
8
- "skill": "skills/actors/SKILL.md",
9
- "package_json": "package.json",
10
- "repo": "~/.pi/agent/extensions/pi-actors"
11
- },
12
- "template": "{repo}/scripts/recipe-utils.mjs skill-summary {skill} {package_json}"
13
- }
@@ -1,13 +0,0 @@
1
- {
2
- "args": [
3
- "target:path",
4
- "all:bool",
5
- "repo:path"
6
- ],
7
- "defaults": {
8
- "target": "recipes",
9
- "all": "true",
10
- "repo": "~/.pi/agent/extensions/pi-actors"
11
- },
12
- "template": "{repo}/scripts/validate-recipe.mjs {target} {all?--all:}"
13
- }
@@ -1 +0,0 @@
1
- export function executableBlockBlankLines(source: string): number[];
@@ -1,73 +0,0 @@
1
- /** Detect blank lines inside executable JavaScript and TypeScript blocks. */
2
-
3
- export function executableBlockBlankLines(source) {
4
- const lines = source.split(/\r?\n/u);
5
- const blanks = [];
6
- const stack = [];
7
- let blockComment = false;
8
- let currentExecutableDepth = 0;
9
- let previousCode = "";
10
- let quote;
11
- for (let lineIndex = 0; lineIndex < lines.length; lineIndex += 1) {
12
- const line = lines[lineIndex];
13
- if (
14
- /^\s*$/u.test(line) &&
15
- currentExecutableDepth > 0 &&
16
- quote !== "`"
17
- )
18
- blanks.push(lineIndex + 1);
19
- let code = "";
20
- let regularExpression = false;
21
- for (let index = 0; index < line.length; index += 1) {
22
- const char = line[index];
23
- const next = line[index + 1];
24
- if (blockComment) {
25
- if (char === "*" && next === "/") {
26
- blockComment = false;
27
- index += 1;
28
- }
29
- continue;
30
- }
31
- if (quote) {
32
- if (char === "\\") index += 1;
33
- else if (char === quote) quote = undefined;
34
- continue;
35
- }
36
- if (regularExpression) {
37
- if (char === "\\") index += 1;
38
- else if (char === "/") regularExpression = false;
39
- continue;
40
- }
41
- if (char === "/" && next === "*") {
42
- blockComment = true;
43
- index += 1;
44
- continue;
45
- }
46
- if (char === "/" && next === "/") break;
47
- if (
48
- char === "/" &&
49
- /^(?:|.*(?:[=(,:;!&|?{}]|\b(?:return|case|throw)))\s*$/u.test(code)
50
- ) {
51
- regularExpression = true;
52
- continue;
53
- }
54
- if (char === '"' || char === "'" || char === "`") {
55
- quote = char;
56
- continue;
57
- }
58
- if (char === "{") {
59
- const prefix = code.trimEnd() || previousCode;
60
- const executable =
61
- /\)\s*$|=>\s*$|\b(?:else|try|finally|do)\s*$/u.test(prefix);
62
- stack.push(executable);
63
- if (executable) currentExecutableDepth += 1;
64
- } else if (char === "}") {
65
- if (stack.pop()) currentExecutableDepth -= 1;
66
- }
67
- code += char;
68
- }
69
- if (quote !== "`") quote = undefined;
70
- if (code.trim()) previousCode = code.trim();
71
- }
72
- return blanks;
73
- }