<< All versions

Skill v1.0.0

currentAutomated scan100/100
erik-kroon/primestack/prime-delegate
──Details
PublishedSeptember 27, 2026 at 07:40 AM
Content Hashsha256:f5a3a02cc82a4087...
Git SHA
──Files
Files (1 file, 6.1 KB)
SKILL.md6.1 KBactive
SKILL.md · 105 lines · 6.1 KB

version: "1.0.0" name: prime-delegate description: Provide the Prime RLM orchestration mechanism for fan-out, arena candidates, independent reviewers, or staged children. Pair it with the method-owning skill such as contract-review or verticalize-work; use when isolation or parallelism adds information. license: MIT compatibility: Prime Agent with the persistent IPython kernel and RLM, agent_message, and agent_observe APIs.


Prime Delegate

Delegate only when isolation or parallelism improves the result. A child is not a function call: await rlm(...) admits a task and returns a handle immediately. The result arrives later through an explicit message or a file.

Choose a mode

ModeUse whenShape
fan-outIndependent surfaces can be inspected in parallelDistinct questions → one synthesis
arenaSeveral plausible solutions should competeSame contract → independent candidates → judge/graft
review-panelA change needs independent standards, spec, safety, or proof reviewRead-only reviewers with non-overlapping lenses
pipelineLater work truly depends on earlier outputOne bounded stage at a time; pass artifacts, not transcript dumps
single-childOne context-heavy investigation would pollute the coordinatorOne specialist → concise evidence report

Do not delegate a trivial lookup, tightly coupled edits, or work the coordinator can finish faster than specifying and reviewing it.

Contract

  1. Define the deliverable. State the exact question, acceptance check, and expected reply.
  2. Separate ownership. Parallel children are instructed read-only by default, but prompt policy is not a sandbox. If they edit, give disjoint files/worktrees and one owner per artifact; snapshot or diff shared state afterward.
  3. Bound authority. State working directory, allowed side effects, forbidden destructive/publish/deploy actions, and whether follow-up questions are allowed. Forbid child subdelegation by default; if granted, set a child budget, relay schema, and cleanup duty.
  4. Require a reply. Every task whose answer matters must end with:
python
await agent_message.send(
"<concise result, evidence, file paths, and blockers>",
receiver_role="parent",
)
  1. Name stable roles. Use unique names such as api-investigator or spec-reviewer, not generated anonymous workers.

Spawn

Keep admission handles in the persistent IPython kernel. An RLMSpawnHandle has name and rlm_child_id; it is not the later RLMSubagent lifecycle record:

python
api_admission = await rlm(
"Inspect the API boundary read-only. Do not spawn children. Reply explicitly to parent with evidence.",
name="api-investigator",
)
test_admission = await rlm(
"Inspect the test surface read-only. Do not spawn children. Reply explicitly to parent with gaps.",
name="test-investigator",
)
admissions = [api_admission, test_admission]

Spawn independent children in separate calls. Once admitted, end the turn and let replies arrive. Do not busy-poll or pretend the spawn returned an answer.

Request a different model only after await rlm.find_models(...) returns an exact available selector. Otherwise inherit the current model.

Fan in

  • Treat child claims as evidence to verify, not authority.
  • Synthesize agreements, contradictions, and missing coverage.
  • For a follow-up, use the admission's stable name: agent_message.send(..., receiver_role="child", receiver_name=api_admission.name). Keep the child until the follow-up finishes.
  • Recover lifecycle records after compaction/restart with children = await rlm.list_subagents(); these are RLMSubagent objects with session_name and lifecycle status.
  • Use agent_observe only for bounded status/stall diagnosis. Ask the user before steering a child based on observed transcript content.
  • For cleanup, resolve the matching RLMSubagent by session_name == api_admission.name, then call await rlm.delete_subagent(child_record) only after replies/follow-ups are complete, it is idle, and its context is no longer needed.

Mode rules

Fan-out

Partition by evidence source, subsystem, or review lens—not arbitrary equal chunks. Cap the first wave at three children unless broader coverage clearly pays for itself. Give each child a distinct question and request a short result.

Arena

Give every candidate the same goal, constraints, and verification target. Keep candidates isolated. The coordinator or a fresh judge selects a base using named criteria, then grafts only independently valuable parts. Never merge all candidates by default.

Review panel

Use independent contexts for:

  • standards and maintainability;
  • spec and acceptance criteria;
  • safety, permissions, data, and concurrency;
  • verification and blast radius.

Reviewers are read-only. Findings need file/line or command evidence, severity, and a concrete failure mode. The coordinator decides which findings are accepted.

Pipeline

Use only for real dependencies. Each stage writes a compact artifact with a defined schema. The next stage receives that artifact and the original goal, not the entire prior transcript.

Safety

  • Never allow parallel writes to the same file, branch, key, or state object.
  • Children do not merge, deploy, publish, delete, or spend money unless the user explicitly granted that authority.
  • Do not delegate merely to look busy; every child needs a unique information gain.
  • For a missing report: inspect bounded status, send one compact reply request, then mark the lens blocked/dropped and proceed serially or disclose incomplete coverage. A result file is fallback payload, not the normal completion signal.
  • Never use deletion as a claimed cancel/timeout operation. Clean up only when lifecycle state makes it safe.
  • Child subdelegation is forbidden unless the brief explicitly grants a budget and makes that child responsible for relay and grandchild cleanup. Family messaging and observation reach only parent, siblings, and direct children.

Read the Prime RLM contract before the first orchestration run.

All versions