@llblab/pi-actors 0.45.1 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +9 -7
- package/BACKLOG.md +582 -0
- package/CHANGELOG.md +17 -1
- package/README.md +27 -13
- package/dist/fixtures/protocol/recipe-summary.json +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/async-runs.d.ts +5 -1
- package/dist/lib/async-runs.js +26 -24
- package/dist/lib/automatic-review-runtime.d.ts +2 -0
- package/dist/lib/automatic-review-runtime.js +12 -5
- package/dist/lib/draft-sleep.js +0 -1
- package/dist/lib/execution.d.ts +1 -0
- package/dist/lib/execution.js +1 -0
- package/dist/lib/extension-runtime.d.ts +1 -1
- package/dist/lib/extension-runtime.js +26 -4
- package/dist/lib/inspector.js +46 -7
- package/dist/lib/paths.d.ts +0 -1
- package/dist/lib/paths.js +0 -7
- package/dist/lib/prompts.d.ts +1 -1
- package/dist/lib/prompts.js +4 -4
- package/dist/lib/recipes-context.d.ts +12 -3
- package/dist/lib/recipes-context.js +30 -6
- package/dist/lib/recipes-discovery.d.ts +18 -0
- package/dist/lib/recipes-discovery.js +95 -22
- package/dist/lib/recipes-references.d.ts +42 -9
- package/dist/lib/recipes-references.js +248 -135
- package/dist/lib/registry.d.ts +14 -1
- package/dist/lib/registry.js +110 -87
- package/dist/lib/runtime.d.ts +30 -4
- package/dist/lib/runtime.js +74 -12
- package/dist/lib/tools-inspect.d.ts +3 -1
- package/dist/lib/tools-inspect.js +56 -9
- package/dist/lib/tools-local.d.ts +2 -0
- package/dist/lib/tools-local.js +5 -2
- package/dist/lib/tools-response.js +2 -0
- package/dist/lib/tools-spawn.d.ts +2 -0
- package/dist/lib/tools-spawn.js +24 -52
- package/dist/lib/tools.d.ts +4 -1
- package/dist/lib/tools.js +2 -0
- package/dist/scripts/build-dist.mjs +13 -4
- package/dist/skills/actors/SKILL.md +8 -8
- package/dist/skills/actors/recipes/recipe-validate.json +11 -0
- package/{recipes/utility-coordinator-lock-snapshot.json → dist/skills/actors/recipes/resource-locker-snapshot.json} +1 -3
- package/dist/{recipes → skills/actors/recipes}/resource-locker.json +1 -3
- package/dist/{recipes/utility-run-ops-snapshot.json → skills/actors/recipes/run-ops-snapshot.json} +1 -3
- package/dist/skills/actors/recipes/run-summary.json +9 -0
- package/dist/{scripts/locker.mjs → skills/actors/scripts/resource-locker.mjs} +2 -2
- package/dist/skills/actors/scripts/run-utils.mjs +164 -0
- package/{scripts → dist/skills/actors/scripts}/validate-recipe.mjs +134 -17
- package/dist/skills/artifacts/SKILL.md +16 -0
- package/{recipes/pipeline-artifact-bundle.json → dist/skills/artifacts/recipes/bundle.json} +4 -4
- package/dist/{recipes/utility-artifact-write.json → skills/artifacts/recipes/file-write.json} +1 -3
- package/dist/{recipes/utility-artifact-manifest.json → skills/artifacts/recipes/manifest.json} +1 -3
- package/{recipes/pipeline-artifact-report.json → dist/skills/artifacts/recipes/report.json} +2 -2
- package/dist/{recipes/pipeline-artifact-write.json → skills/artifacts/recipes/write.json} +3 -3
- package/dist/skills/artifacts/scripts/artifact-utils.mjs +63 -0
- package/dist/skills/media/SKILL.md +16 -0
- package/dist/{recipes/pipeline-media-library.json → skills/media/recipes/library.json} +2 -2
- package/{recipes/music-player.json → dist/skills/media/recipes/player.json} +1 -3
- package/dist/{recipes/utility-playlist-build.json → skills/media/recipes/playlist-build.json} +1 -3
- package/dist/skills/media/scripts/media-utils.mjs +47 -0
- package/dist/{scripts → skills/media/scripts}/music-player.mjs +9 -3
- package/dist/skills/project-work/SKILL.md +16 -0
- package/dist/skills/project-work/recipes/changelog-section.json +11 -0
- package/{recipes/pipeline-docs-maintenance.json → dist/skills/project-work/recipes/docs-maintenance.json} +4 -4
- package/dist/skills/project-work/recipes/package-summary.json +9 -0
- package/{recipes/pipeline-release-readiness.json → dist/skills/project-work/recipes/release-readiness.json} +6 -6
- package/dist/{recipes/pipeline-release-summary.json → skills/project-work/recipes/release-summary.json} +5 -5
- package/{recipes/pipeline-repo-health.json → dist/skills/project-work/recipes/repo-health.json} +6 -6
- package/{recipes/pipeline-async-run-ops.json → dist/skills/project-work/recipes/run-ops.json} +3 -3
- package/dist/skills/project-work/recipes/skill-summary.json +11 -0
- package/dist/skills/project-work/scripts/project-utils.mjs +89 -0
- package/dist/skills/recipe-memory/SKILL.md +16 -0
- package/dist/skills/swarm/SKILL.md +4 -4
- package/{recipes/pipeline-architect-coordinator.json → dist/skills/swarm/recipes/architect.json} +5 -5
- package/{recipes/pipeline-checkpoint-continuation.json → dist/skills/swarm/recipes/checkpoint-continuation.json} +3 -3
- package/dist/{recipes/pipeline-development-tasking.json → skills/swarm/recipes/development-tasking.json} +4 -4
- package/dist/{recipes/lens-swarm.json → skills/swarm/recipes/lens-review.json} +1 -1
- package/dist/{recipes/pipeline-quorum-review.json → skills/swarm/recipes/quorum-review.json} +4 -4
- package/{recipes/pipeline-research-synthesis.json → dist/skills/swarm/recipes/research-synthesis.json} +6 -6
- package/{recipes/pipeline-review-readiness.json → dist/skills/swarm/recipes/review-readiness.json} +1 -1
- package/{recipes/subagents-prompts.json → dist/skills/swarm/recipes/subagent-prompts.json} +1 -1
- package/{recipes → dist/skills/swarm/recipes}/subagent-quorum.json +1 -1
- package/dist/{recipes → skills/swarm/recipes}/subagent-review-coordinator.json +6 -6
- package/docs/actor-inspector.md +4 -3
- package/docs/async-runs.md +2 -2
- package/docs/recipe-library.md +23 -23
- package/docs/releasing.md +2 -2
- package/docs/template-recipes.md +32 -14
- package/docs/tool-registry.md +10 -4
- package/fixtures/protocol/recipe-summary.json +1 -1
- package/index.ts +2 -1
- package/lib/async-runs.ts +52 -25
- package/lib/automatic-review-runtime.ts +16 -3
- package/lib/draft-sleep.ts +0 -1
- package/lib/execution.ts +2 -0
- package/lib/extension-runtime.ts +42 -4
- package/lib/inspector.ts +57 -11
- package/lib/paths.ts +0 -7
- package/lib/prompts.ts +4 -4
- package/lib/recipes-context.ts +51 -6
- package/lib/recipes-discovery.ts +164 -24
- package/lib/recipes-references.ts +359 -146
- package/lib/registry.ts +185 -94
- package/lib/runtime.ts +109 -17
- package/lib/tools-inspect.ts +77 -10
- package/lib/tools-local.ts +9 -1
- package/lib/tools-response.ts +2 -0
- package/lib/tools-spawn.ts +38 -74
- package/lib/tools.ts +4 -1
- package/package.json +2 -4
- package/scripts/build-dist.mjs +13 -4
- package/skills/actors/SKILL.md +8 -8
- package/skills/actors/recipes/recipe-validate.json +11 -0
- package/{dist/recipes/utility-coordinator-lock-snapshot.json → skills/actors/recipes/resource-locker-snapshot.json} +1 -3
- package/{recipes → skills/actors/recipes}/resource-locker.json +1 -3
- package/{recipes/utility-run-ops-snapshot.json → skills/actors/recipes/run-ops-snapshot.json} +1 -3
- package/skills/actors/recipes/run-summary.json +9 -0
- package/{scripts/locker.mjs → skills/actors/scripts/resource-locker.mjs} +2 -2
- package/skills/actors/scripts/run-utils.mjs +164 -0
- package/{dist → skills/actors}/scripts/validate-recipe.mjs +134 -17
- package/skills/artifacts/SKILL.md +16 -0
- package/{dist/recipes/pipeline-artifact-bundle.json → skills/artifacts/recipes/bundle.json} +4 -4
- package/{recipes/utility-artifact-write.json → skills/artifacts/recipes/file-write.json} +1 -3
- package/{recipes/utility-artifact-manifest.json → skills/artifacts/recipes/manifest.json} +1 -3
- package/{dist/recipes/pipeline-artifact-report.json → skills/artifacts/recipes/report.json} +2 -2
- package/{recipes/pipeline-artifact-write.json → skills/artifacts/recipes/write.json} +3 -3
- package/skills/artifacts/scripts/artifact-utils.mjs +63 -0
- package/skills/media/SKILL.md +16 -0
- package/{recipes/pipeline-media-library.json → skills/media/recipes/library.json} +2 -2
- package/{dist/recipes/music-player.json → skills/media/recipes/player.json} +1 -3
- package/{recipes/utility-playlist-build.json → skills/media/recipes/playlist-build.json} +1 -3
- package/skills/media/scripts/media-utils.mjs +47 -0
- package/{scripts → skills/media/scripts}/music-player.mjs +9 -3
- package/skills/project-work/SKILL.md +16 -0
- package/skills/project-work/recipes/changelog-section.json +11 -0
- package/{dist/recipes/pipeline-docs-maintenance.json → skills/project-work/recipes/docs-maintenance.json} +4 -4
- package/skills/project-work/recipes/package-summary.json +9 -0
- package/{dist/recipes/pipeline-release-readiness.json → skills/project-work/recipes/release-readiness.json} +6 -6
- package/{recipes/pipeline-release-summary.json → skills/project-work/recipes/release-summary.json} +5 -5
- package/{dist/recipes/pipeline-repo-health.json → skills/project-work/recipes/repo-health.json} +6 -6
- package/{dist/recipes/pipeline-async-run-ops.json → skills/project-work/recipes/run-ops.json} +3 -3
- package/skills/project-work/recipes/skill-summary.json +11 -0
- package/skills/project-work/scripts/project-utils.mjs +89 -0
- package/skills/recipe-memory/SKILL.md +16 -0
- package/skills/swarm/SKILL.md +4 -4
- package/{dist/recipes/pipeline-architect-coordinator.json → skills/swarm/recipes/architect.json} +5 -5
- package/{dist/recipes/pipeline-checkpoint-continuation.json → skills/swarm/recipes/checkpoint-continuation.json} +3 -3
- package/{recipes/pipeline-development-tasking.json → skills/swarm/recipes/development-tasking.json} +4 -4
- package/{recipes/lens-swarm.json → skills/swarm/recipes/lens-review.json} +1 -1
- package/{recipes/pipeline-quorum-review.json → skills/swarm/recipes/quorum-review.json} +4 -4
- package/{dist/recipes/pipeline-research-synthesis.json → skills/swarm/recipes/research-synthesis.json} +6 -6
- package/{dist/recipes/pipeline-review-readiness.json → skills/swarm/recipes/review-readiness.json} +1 -1
- package/{dist/recipes/subagents-prompts.json → skills/swarm/recipes/subagent-prompts.json} +1 -1
- package/{dist → skills/swarm}/recipes/subagent-quorum.json +1 -1
- package/{recipes → skills/swarm/recipes}/subagent-review-coordinator.json +6 -6
- package/dist/recipes/utility-changelog-section.json +0 -13
- package/dist/recipes/utility-package-summary.json +0 -11
- package/dist/recipes/utility-run-summary.json +0 -11
- package/dist/recipes/utility-skill-summary.json +0 -13
- package/dist/recipes/utility-validate-recipe.json +0 -13
- package/dist/scripts/executable-block-style.d.mts +0 -1
- package/dist/scripts/executable-block-style.mjs +0 -73
- package/dist/scripts/recipe-utils.mjs +0 -404
- package/dist/scripts/release-gates.mjs +0 -281
- package/recipes/utility-changelog-section.json +0 -13
- package/recipes/utility-package-summary.json +0 -11
- package/recipes/utility-run-summary.json +0 -11
- package/recipes/utility-skill-summary.json +0 -13
- package/recipes/utility-validate-recipe.json +0 -13
- package/scripts/executable-block-style.d.mts +0 -1
- package/scripts/executable-block-style.mjs +0 -73
- package/scripts/recipe-utils.mjs +0 -404
- package/scripts/release-gates.mjs +0 -281
- /package/dist/{recipes/utility-validation-wrapper.json → skills/actors/recipes/command-validate.json} +0 -0
- /package/dist/{recipes/utility-jsonl-tail.json → skills/actors/recipes/jsonl-tail.json} +0 -0
- /package/dist/{recipes/utility-run-state-files.json → skills/actors/recipes/run-state-files.json} +0 -0
- /package/dist/{recipes/utility-playlist-scan.json → skills/media/recipes/playlist-scan.json} +0 -0
- /package/dist/{recipes/utility-changelog-head.json → skills/project-work/recipes/changelog-head.json} +0 -0
- /package/dist/{recipes/utility-git-log.json → skills/project-work/recipes/git-log.json} +0 -0
- /package/dist/{recipes/utility-git-status.json → skills/project-work/recipes/git-status.json} +0 -0
- /package/dist/{recipes/utility-markdown-index.json → skills/project-work/recipes/markdown-index.json} +0 -0
- /package/dist/{recipes → skills/recipe-memory/recipes}/draft-review.json +0 -0
- /package/dist/{recipes → skills/recipe-memory/recipes}/tool-review.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-artifact.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-checkpoint.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-conflict-report.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-contradiction-map.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-critic.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-evidence-map.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-followup.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-judge.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-merge.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-normalize.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-plan.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-preflight.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-prompt.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-review.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-task-card.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-tools.json +0 -0
- /package/dist/{recipes → skills/swarm/recipes}/subagent-verify.json +0 -0
- /package/{recipes/utility-validation-wrapper.json → skills/actors/recipes/command-validate.json} +0 -0
- /package/{recipes/utility-jsonl-tail.json → skills/actors/recipes/jsonl-tail.json} +0 -0
- /package/{recipes/utility-run-state-files.json → skills/actors/recipes/run-state-files.json} +0 -0
- /package/{recipes/utility-playlist-scan.json → skills/media/recipes/playlist-scan.json} +0 -0
- /package/{recipes/utility-changelog-head.json → skills/project-work/recipes/changelog-head.json} +0 -0
- /package/{recipes/utility-git-log.json → skills/project-work/recipes/git-log.json} +0 -0
- /package/{recipes/utility-git-status.json → skills/project-work/recipes/git-status.json} +0 -0
- /package/{recipes/utility-markdown-index.json → skills/project-work/recipes/markdown-index.json} +0 -0
- /package/{recipes → skills/recipe-memory/recipes}/draft-review.json +0 -0
- /package/{recipes → skills/recipe-memory/recipes}/tool-review.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-artifact.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-checkpoint.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-conflict-report.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-contradiction-map.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-critic.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-evidence-map.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-followup.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-judge.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-merge.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-normalize.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-plan.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-preflight.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-prompt.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-review.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-task-card.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-tools.json +0 -0
- /package/{recipes → skills/swarm/recipes}/subagent-verify.json +0 -0
|
@@ -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
|
|
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
|
|
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
|
|
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;
|
package/{recipes/pipeline-architect-coordinator.json → dist/skills/swarm/recipes/architect.json}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"async": true,
|
|
3
3
|
"imports": {
|
|
4
|
-
"reviewer": "subagent-review
|
|
5
|
-
"critic": "subagent-critic
|
|
6
|
-
"verifier": "subagent-verify
|
|
7
|
-
"merger": "subagent-merge
|
|
8
|
-
"normalizer": "subagent-normalize
|
|
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
|
|
5
|
-
"followup": "subagent-followup
|
|
6
|
-
"normalizer": "subagent-normalize
|
|
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
|
|
5
|
-
"task_card": "subagent-task-card
|
|
6
|
-
"critic": "subagent-critic
|
|
7
|
-
"normalizer": "subagent-normalize
|
|
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
|
|
5
|
+
"coordinator": "swarm/subagent-review-coordinator"
|
|
6
6
|
},
|
|
7
7
|
"args": [
|
|
8
8
|
"scope:string",
|
package/dist/{recipes/pipeline-quorum-review.json → skills/swarm/recipes/quorum-review.json}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"async": true,
|
|
3
3
|
"imports": {
|
|
4
|
-
"subagent": "subagent-prompt
|
|
5
|
-
"merger": "subagent-merge
|
|
6
|
-
"judge": "subagent-judge
|
|
7
|
-
"normalizer": "subagent-normalize
|
|
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
|
|
5
|
-
"evidence": "subagent-evidence-map
|
|
6
|
-
"contradictions": "subagent-contradiction-map
|
|
7
|
-
"verifier": "subagent-verify
|
|
8
|
-
"merger": "subagent-merge
|
|
9
|
-
"normalizer": "subagent-normalize
|
|
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,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"async": true,
|
|
3
3
|
"imports": {
|
|
4
|
-
"preflight": "subagent-preflight
|
|
5
|
-
"reviewer": "subagent-review
|
|
6
|
-
"verifier": "subagent-verify
|
|
7
|
-
"merger": "subagent-merge
|
|
8
|
-
"judge": "subagent-judge
|
|
9
|
-
"normalizer": "subagent-normalize
|
|
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",
|
package/docs/actor-inspector.md
CHANGED
|
@@ -12,13 +12,14 @@ The Inspector follows the kernel directly. It shows Runs owned by the current Pi
|
|
|
12
12
|
|
|
13
13
|
Shows captured execution provenance:
|
|
14
14
|
|
|
15
|
-
- Recipe
|
|
15
|
+
- file-derived Recipe stem and logical reference;
|
|
16
|
+
- source kind (`user_registry_capability`, `active_skill_component`, or `explicit_file_recipe`) and Skill identity when owned;
|
|
16
17
|
- resolved template and values;
|
|
17
|
-
-
|
|
18
|
+
- root/import roles plus alias ancestry;
|
|
18
19
|
- declared artifacts and actor-local actions;
|
|
19
20
|
- model/thinking policy and launch source.
|
|
20
21
|
|
|
21
|
-
Captured Recipe evidence belongs to the Run generation and does not change when an active Recipe file later changes. Non-empty object values render as indented brace-delimited property lists rather than flattened inline strings.
|
|
22
|
+
Captured Recipe evidence belongs to the Run generation and does not change when an active Recipe file later changes. Skill components display logical identities such as `artifacts/report`; private physical `source_file`, `skill_dir`, and `recipe_dir` stay out of Inspector and model-facing views. Non-empty object values render as indented brace-delimited property lists rather than flattened inline strings.
|
|
22
23
|
|
|
23
24
|
## Trace
|
|
24
25
|
|
package/docs/async-runs.md
CHANGED
|
@@ -123,8 +123,8 @@ Archive and prune apply only to terminal Runs and enforce path containment. Rete
|
|
|
123
123
|
|
|
124
124
|
Packaged controlled services demonstrate the endpoint protocol:
|
|
125
125
|
|
|
126
|
-
- `
|
|
127
|
-
- `resource-locker` consumes queue/lease actions, emits lock Trace, and atomically retains at most 512 valid journal records within 1 MiB.
|
|
126
|
+
- `media/player` consumes playback Controls and emits playback Trace;
|
|
127
|
+
- `actors/resource-locker` consumes queue/lease actions, emits lock Trace, and atomically retains at most 512 valid journal records within 1 MiB.
|
|
128
128
|
|
|
129
129
|
Shared archive/prune evidence similarly retains at most 256 valid records within 1 MiB under its canonical lock. The obsolete advisory `wake.jsonl` notifier was removed; filesystem watchers and bounded reconciliation observe authoritative state directly.
|
|
130
130
|
|
package/docs/recipe-library.md
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Skill-Owned Recipe Components
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Active Skills provide maintained execution graphs and service definitions. Skill Recipe identity is `<active Skill name>/<Recipe filename stem>`. Recipe files have no top-level `name`; `SKILL.md` `name` remains Pi host metadata matching the Skill directory, and pi-actors introduces no additional Skill identity field. Skill components are outside user Recipe discovery and never become tools merely because a Skill is active.
|
|
4
4
|
|
|
5
5
|
## Recommended Entry Points
|
|
6
6
|
|
|
7
7
|
### Repository and delivery
|
|
8
8
|
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
9
|
+
- `project-work/repo-health` — repository inspection and bounded health artifact.
|
|
10
|
+
- `project-work/docs-maintenance` — documentation analysis and artifact preparation.
|
|
11
|
+
- `project-work/release-readiness` — release checks and readiness artifact.
|
|
12
|
+
- `project-work/release-summary` — release-summary artifact.
|
|
13
|
+
- `swarm/development-tasking` — task-card and implementation planning pipeline.
|
|
14
14
|
|
|
15
15
|
### Review and synthesis
|
|
16
16
|
|
|
17
|
-
- `
|
|
18
|
-
- `
|
|
19
|
-
- `
|
|
20
|
-
- `lens-
|
|
21
|
-
- `subagent-review-coordinator
|
|
17
|
+
- `swarm/quorum-review` — parallel reviewers with quorum-oriented synthesis.
|
|
18
|
+
- `swarm/review-readiness` — review plus readiness stages.
|
|
19
|
+
- `swarm/research-synthesis` — evidence-oriented research synthesis.
|
|
20
|
+
- `swarm/lens-review` — configurable repeated review lenses.
|
|
21
|
+
- `swarm/subagent-review-coordinator` — lower-level review/verify/merge/judge composition.
|
|
22
22
|
|
|
23
23
|
Callers should own model, thinking, concurrency, quorum, and mission policy. Review pipelines preflight provider/model availability before expensive fanout.
|
|
24
24
|
|
|
25
25
|
### Artifacts
|
|
26
26
|
|
|
27
|
-
- `
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
27
|
+
- `artifacts/report` — prepare one artifact body.
|
|
28
|
+
- `artifacts/write` — prepare and deterministically write an artifact.
|
|
29
|
+
- `artifacts/bundle` — optional validation, artifact write, manifest generation, and manifest write.
|
|
30
|
+
- `artifacts/file-write` — deterministic create/overwrite/append helper.
|
|
31
|
+
- `artifacts/manifest` — artifact manifest generation.
|
|
32
32
|
|
|
33
33
|
Artifact pipelines terminate in files/manifests and result evidence; they do not fabricate communication events.
|
|
34
34
|
|
|
35
35
|
### Controlled services
|
|
36
36
|
|
|
37
|
-
- `
|
|
38
|
-
- `resource-locker
|
|
37
|
+
- `media/player` — 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
|
+
- `actors/resource-locker` — optional queue/lease-lock service with explicit owner/resource input, lock Trace, and a 512-record/1 MiB atomically retained journal.
|
|
39
39
|
|
|
40
|
-
These
|
|
40
|
+
These Recipes declare actor-local Control. Ordinary one-shot Recipes omit it. Helper-backed Skill Recipes self-locate through runtime-owned `{skill_dir}`; callers do not pass package installation roots.
|
|
41
41
|
|
|
42
42
|
## Component Recipes
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ Subagent components provide reusable command-template cells for normalization, p
|
|
|
45
45
|
|
|
46
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.
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Recipes bundled under a Pi-active Skill are selected as `<skill-name>/<recipe-stem>` and receive runtime-owned `{skill_dir}` plus `{recipe_dir}`. Explicit `.json` / `.md` paths select exact files: entry paths are based at invocation `cwd`, while relative imports are based at the importing Recipe's directory. Active Skill components are library entries, never automatic tools; expose one intentionally through a user Recipe wrapper when a direct tool is desired.
|
|
49
49
|
|
|
50
50
|
## Utility Recipes
|
|
51
51
|
|
|
@@ -70,7 +70,7 @@ Use utilities as imported cells or registered tools where their contract fits.
|
|
|
70
70
|
|
|
71
71
|
## Installation Safety
|
|
72
72
|
|
|
73
|
-
Do not bulk-copy
|
|
73
|
+
Do not bulk-copy bundled Recipes into the user Recipe root. Internal `recipe-memory/draft-review` and `recipe-memory/tool-review` components support fenced automatic review and must not become user-installed callable tools. Register or wrap only the specific public capability you intend to use.
|
|
74
74
|
|
|
75
75
|
## Validation
|
|
76
76
|
|
|
@@ -78,7 +78,7 @@ Do not bulk-copy `recipes/*.json` into the user Recipe root. Internal `draft-rev
|
|
|
78
78
|
npm run recipes:qa
|
|
79
79
|
```
|
|
80
80
|
|
|
81
|
-
Recipe QA validates syntax, imports, Control declarations,
|
|
81
|
+
Recipe QA recursively inventories direct Skill components and validates filesystem identity, syntax, imports, Control declarations, origin ownership, portable artifact paths, and `{skill_dir}` helper references. Nested files and JSON/Markdown stem collisions fail precisely. Recipe descriptions remain optional; QA requires zero capability diagnostics and zero warnings without enforcing style, documentation quotas, or architecture policy. Removed mailbox declarations fail with the migration diagnostic rather than receiving automatic conversion.
|
|
82
82
|
|
|
83
83
|
## Related
|
|
84
84
|
|
package/docs/releasing.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Release Operations
|
|
2
2
|
|
|
3
|
-
Stable releases use one immutable tag workflow. The workflow runs
|
|
3
|
+
Stable releases use one immutable tag workflow. The workflow runs normal product validation on Ubuntu, macOS, and Windows plus the dependency audit before any publication, publishes and verifies the exact npm package through Trusted Publisher, then creates or converges the GitHub Release from the matching changelog section. Architecture review uses the project-local Domain DAG Skill during architecture-affecting development; release automation does not run policy, line-count, source-style, or Domain DAG gates.
|
|
4
4
|
|
|
5
5
|
## One-time npm Trusted Publisher setup
|
|
6
6
|
|
|
@@ -19,7 +19,7 @@ Do not create `NPM_TOKEN`, `NODE_AUTH_TOKEN`, or another long-lived npm publish
|
|
|
19
19
|
|
|
20
20
|
1. Merge the validated release tree through the repository's guarded `dev` to `main` flow.
|
|
21
21
|
2. Create one immutable `v<package.version>` tag on the verified `main` commit.
|
|
22
|
-
3. Let `.github/workflows/release.yml` invoke the
|
|
22
|
+
3. Let `.github/workflows/release.yml` invoke the reusable `npm run validate` and dependency-audit workflow.
|
|
23
23
|
4. Let the publication job verify the tag commit, package manifests, and non-empty changelog section.
|
|
24
24
|
5. Publish the exact public npm package through OIDC when the version does not exist.
|
|
25
25
|
6. Verify npm version, `gitHead`, Pi extension/skill metadata, and packed runtime manifests.
|
package/docs/template-recipes.md
CHANGED
|
@@ -10,7 +10,7 @@ A Recipe stores a reusable command-template definition as JSON or Markdown.
|
|
|
10
10
|
"description": "Create a repository health artifact",
|
|
11
11
|
"args": ["repo:path", "artifact_path:path", "model:string"],
|
|
12
12
|
"defaults": { "artifact_path": "{state_dir}/health.md" },
|
|
13
|
-
"imports": { "review": "
|
|
13
|
+
"imports": { "review": "swarm/quorum-review" },
|
|
14
14
|
"artifacts": { "report": "{artifact_path}" },
|
|
15
15
|
"template": {
|
|
16
16
|
"name": "review",
|
|
@@ -39,11 +39,13 @@ summarize {file}
|
|
|
39
39
|
|
|
40
40
|
Fences marked `template`, `command-template`, `json`, or `recipe` can define execution. Frontmatter supports Recipe metadata and command-template flags.
|
|
41
41
|
|
|
42
|
+
Skill Recipe identity is `<active Skill name>/<Recipe filename stem>`. Recipe files have no top-level `name`; both JSON and Markdown fail with migration guidance when that removed field is present. `SKILL.md` `name` remains Pi host metadata and matches the Skill directory; pi-actors introduces no additional Skill identity field. The `name` field on a command-template node still selects an imported alias and is not Recipe self-identity.
|
|
43
|
+
|
|
42
44
|
## Fields
|
|
43
45
|
|
|
44
46
|
Common Recipe fields:
|
|
45
47
|
|
|
46
|
-
- `
|
|
48
|
+
- `description`, `disabled`;
|
|
47
49
|
- `args`, typed arg declarations, inline defaults, `defaults`, and composition `values`;
|
|
48
50
|
- `imports` with optional binding defaults/values;
|
|
49
51
|
- `template`;
|
|
@@ -58,25 +60,39 @@ Common Recipe fields:
|
|
|
58
60
|
```json
|
|
59
61
|
{
|
|
60
62
|
"imports": {
|
|
61
|
-
"review": "
|
|
62
|
-
"
|
|
63
|
-
"from": "
|
|
63
|
+
"review": "swarm/quorum-review",
|
|
64
|
+
"report": {
|
|
65
|
+
"from": "../shared/report.md",
|
|
64
66
|
"defaults": { "thinking": "medium" }
|
|
65
67
|
}
|
|
66
68
|
},
|
|
67
69
|
"template": [
|
|
68
70
|
{ "name": "review", "values": { "input": "{input}" } },
|
|
69
|
-
{ "name": "
|
|
71
|
+
{ "name": "report", "values": { "input": "Use prior output" } }
|
|
70
72
|
]
|
|
71
73
|
}
|
|
72
74
|
```
|
|
73
75
|
|
|
74
76
|
Imports are local definitions. Named nodes call imported templates inside the same execution graph and Run. Effective values follow `caller > node/import/Recipe values > defaults > inline arg default > missing-value error`, then the selected value is checked against its declared type or enum.
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
Imports accept exactly `<skill>/<recipe>` or an explicit `.json` / `.md` file path. A Skill reference selects one direct filename stem under the exact Skill currently active through Pi resource discovery; duplicate active Skill identities and JSON/Markdown stem collisions fail closed. Explicit paths may be relative (`./local-review.json`, `../shared/report.md`) or absolute (`/absolute/path/to/recipe.json`). An entry file path resolves from invocation `cwd`; a relative import resolves from the importing Recipe's directory. No bare or ambient lookup remains.
|
|
77
79
|
|
|
78
80
|
Direct delegation can use another Recipe as the entire template. The delegated Recipe remains the source of truth while the wrapper may narrow args/defaults or override selected lifecycle metadata.
|
|
79
81
|
|
|
82
|
+
A launched Run captures each entry/import role, filename-derived stem, logical reference, Skill identity when owned, and import alias ancestry. Private physical source paths remain execution provenance; Inspector and child-agent context expose logical identities rather than machine-local Skill locations.
|
|
83
|
+
|
|
84
|
+
## Migration from pre-0.46 references
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
std:foo -> owning-skill/foo
|
|
88
|
+
skill:foo/bar -> foo/bar
|
|
89
|
+
root packaged foo -> owning-skill/new-file-stem
|
|
90
|
+
Recipe name field -> delete; filename is identity
|
|
91
|
+
nested skill path -> flatten filename or use explicit file path
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Removed `std:` and `skill:` forms fail with migration guidance; they are not aliases. Root packaged Recipes no longer exist. Flatten a maintained Skill component to a direct filename, or reference a nested/local file explicitly when it is intentionally outside the Skill component namespace.
|
|
95
|
+
|
|
80
96
|
## Control
|
|
81
97
|
|
|
82
98
|
Only a process that consumes actor-local input declares actions:
|
|
@@ -85,7 +101,7 @@ Only a process that consumes actor-local input declares actions:
|
|
|
85
101
|
{
|
|
86
102
|
"async": true,
|
|
87
103
|
"control": ["pause", "resume", "stop"],
|
|
88
|
-
"template": "{
|
|
104
|
+
"template": "{skill_dir}/scripts/service.mjs --state-dir {state_dir}"
|
|
89
105
|
}
|
|
90
106
|
```
|
|
91
107
|
|
|
@@ -110,7 +126,7 @@ Every file-backed Recipe receives immutable `{recipe_dir}`. A Recipe under an ac
|
|
|
110
126
|
|
|
111
127
|
## Context and Provenance
|
|
112
128
|
|
|
113
|
-
File-backed Runs capture Recipe context records for the entry and imports
|
|
129
|
+
File-backed Runs capture Recipe context records for the entry and imports. File identity is the filename stem; a direct Recipe under an active Skill has the logical identity `<skill>/<stem>`. The captured bundle explains composition identity and remains generation-local evidence. Runtime origin paths remain in local Run provenance but are omitted from model-facing launch values. It does not override the authored task prompt.
|
|
114
130
|
|
|
115
131
|
Recipes that need a minimal child prompt may opt out of injected Recipe context through the documented `actor_context` launch option.
|
|
116
132
|
|
|
@@ -129,18 +145,20 @@ Defaults can inherit current Pi policy:
|
|
|
129
145
|
|
|
130
146
|
Resolution fails before launch when required current policy is unavailable. The Run persists whether values were inherited or explicit.
|
|
131
147
|
|
|
132
|
-
## Resolution
|
|
148
|
+
## Resolution Context
|
|
149
|
+
|
|
150
|
+
User Recipes under `~/.pi/agent/recipes` remain intentionally registered tools, not an ambient import namespace. Each session receives one immutable resolution context from Pi's loaded Skill metadata; spawn, user-Recipe admission, registration, schema derivation, live inspection, and watcher reconciliation consume that same context rather than scanning ambient Skill roots or keeping a process-global mutable namespace. A launch captures its resolved graph, so later Skill changes affect only future launches. An invalid or missing exact target fails without fallback. Disabled Recipes cannot launch. Registry watchers converge after atomic changes without executing partial definitions.
|
|
133
151
|
|
|
134
|
-
|
|
152
|
+
Active-Skill catalog inventory is fail-soft diagnostic state, not exact-resolution authority. Invalid components are reported individually and make the catalog partial while unrelated valid `<skill>/<recipe>` references remain exactly resolvable.
|
|
135
153
|
|
|
136
154
|
## Validation
|
|
137
155
|
|
|
138
156
|
```bash
|
|
139
|
-
node scripts/validate-recipe.mjs
|
|
140
|
-
node scripts/validate-recipe.mjs
|
|
157
|
+
node skills/actors/scripts/validate-recipe.mjs path/to/recipe.json --qa
|
|
158
|
+
node skills/actors/scripts/validate-recipe.mjs skills --skills --qa --summary
|
|
141
159
|
```
|
|
142
160
|
|
|
143
|
-
|
|
161
|
+
Skill validation recursively inventories every direct `<skill>/recipes/*.json|*.md` component, rejects nested files and duplicate stems, and checks filename identity, JSON/Markdown compilation, origins, imports, Control, artifacts, portable paths, helper targets, and platform notes. Files exceeding 1 MiB or import depth 32 fail closed.
|
|
144
162
|
|
|
145
163
|
## Related
|
|
146
164
|
|
package/docs/tool-registry.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
~/.pi/agent/recipes/*.json
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Each
|
|
9
|
+
Each valid Recipe admitted against the current session context can become an agent-callable tool. `register_tool` creates, updates, promotes, or deletes these files through fenced mutation paths and reports the resulting activation state.
|
|
10
10
|
|
|
11
11
|
## Registration
|
|
12
12
|
|
|
@@ -20,9 +20,13 @@ Register a typed/defaulted template or Recipe-backed definition when reuse justi
|
|
|
20
20
|
|
|
21
21
|
Promote an immutable captured draft only with its draft path and explicit target name. Name collisions require `update=true`. Invalid content fails before active mutation.
|
|
22
22
|
|
|
23
|
+
Registration resolves the effective delegated contract before persistence, then reports distinct `persisted`, `registry_active`, `host_registered`, `active_tool`, and `callable_now` states. Treat the tool as callable in the current session only when `callable_now` is true; persistence alone is not activation proof.
|
|
24
|
+
|
|
23
25
|
## Resolution
|
|
24
26
|
|
|
25
|
-
User Recipes
|
|
27
|
+
User Recipes are the only file-discovered tool source. Invalid or disabled user entries fail closed. Active Skill Recipes remain exact components outside tool discovery. Spawn, registration, registry admission, schema derivation, and live inspection resolve against one immutable session context containing the current working directory and active Skills. Runtime reload watches the user Recipe root using that current context and converges after atomic changes; stale watcher generations cannot replace current registration state.
|
|
28
|
+
|
|
29
|
+
Skill component inventory is diagnostic and fail-soft: valid components remain listed and exactly resolvable when an unrelated component is rejected. Recipe inspection reports rejected components and marks the catalog partial instead of treating one bad component as an empty catalog.
|
|
26
30
|
|
|
27
31
|
Inspect registry state with:
|
|
28
32
|
|
|
@@ -31,7 +35,9 @@ inspect target=recipes view=status
|
|
|
31
35
|
inspect target=tool:<name> view=status
|
|
32
36
|
```
|
|
33
37
|
|
|
34
|
-
Recipe inspection reports active, shadowed, invalid, disabled, diagnostic, risk, usage, and review evidence. Tool
|
|
38
|
+
Recipe inspection reports generation, scan/watch state, active, shadowed, invalid, disabled, component rejection, diagnostic, risk, usage, and review evidence. Tool status reports current activation plus separate `tool_calls` and `spawn_calls`; tool schema reports the caller-owned capability contract. A registered tool is not a running actor.
|
|
39
|
+
|
|
40
|
+
`spawn recipe=<name>` executes a Recipe and reports `launch_kind: "spawn"`; it does not prove that a registered tool was exposed or invoked. Registered-tool execution reports `launch_kind: "tool"`.
|
|
35
41
|
|
|
36
42
|
## Automatic Review
|
|
37
43
|
|
|
@@ -61,7 +67,7 @@ Usage and lineage live in locked metadata ledgers rather than authored Recipe fi
|
|
|
61
67
|
|
|
62
68
|
## Wrapping Existing Recipes
|
|
63
69
|
|
|
64
|
-
Prefer a small user-root wrapper that imports a maintained Recipe by exact
|
|
70
|
+
Prefer a small user-root wrapper that imports a maintained Recipe by exact `<skill>/<recipe>` identity and delegates by alias. Skill Recipes remain components and are never exposed merely because their Skill is active. Do not duplicate executable templates, defaults, Control declarations, artifacts, or runtime-owned `{recipe_dir}`/`{skill_dir}`. Install only specific capabilities; internal automatic-review Recipes must not become user-callable tools.
|
|
65
71
|
|
|
66
72
|
## Safety
|
|
67
73
|
|