orchestrate
Agent resolution: before dispatch, read ${CLAUDE_PLUGIN_ROOT}/shared/agent-runtime-map.md
and select the active runtime name for monkey-maestro:linear-reader.
Voice
Read ../../persona.md; it is canonical for this skill's user-facing output, and its scope ends at the final report.
Contract
Read ${CLAUDE_PLUGIN_ROOT}/shared/project-execution-contract.md. Linear alone decides
capacity and readiness. Superset receives selected work but never changes the plan.
Workflow
- Require one exact Linear project id and dispatch
monkey-maestro:linear-reader in
MODE: project. Consume only its exact project identity, complete marker comment set,
minimal status/blocker rows, and scoped unknowns.
- Pass the comments through
scripts/records.mjs resolve-controls. Require one usable
active control for the exact project. Inactive,
absent, or unusable control creates no workspace.
- Require a complete live Linear project issue set. A failed project, page, or issue read
creates no workspace. Classify only from current status types and
blockedBy
identifiers:
- count every known
started issue;
- candidates are known
backlog, triage, and unstarted issues;
- a candidate is ready only when every blocker is present and terminal;
- terminal issues are
completed or canceled.
- Compute
slots = max(0, maxConcurrency - startedCount). Sort ready issues by Linear
identifier and select the first slots. Started issues consume capacity but are never
redispatched. If no slot or no ready issue exists, return idle without Superset.
- Dispatch the reader once in
MODE: selected with exactly the selected issue ids. It
refreshes those candidates plus their direct blockers. Reclassify every selected issue
from this bounded result and require it to remain ready. In parallel, fetch each exact
Superset task. A changed, unknown, terminal, or non-ready issue, or a failed detail/task
read, fails only that selected issue; do not backfill it during this invocation.
- Resolve the invoking workspace's groups using Workspace groups in the shared
contract. If placement is unresolved, report
degraded without creating workspaces.
Render the shared deterministic issue workspace name
linear-<lowercaseIssueId>-<taskDigest>, where taskDigest is the first eight
hexadecimal characters of SHA-256 over the exact task id. Render the complete worker
prompt per valid issue. Attempt exactly one branch-scoped workspace create-or-reuse per
issue, without an embedded agent launch, with sibling attempts settled independently:
superset workspaces create \
--project <supersetProjectId> \
--host <targetHostId> \
--task <taskId> \
--name <workspaceName> \
<tagArgs> \
--json
- Require the response to distinguish
created from reused and return one exact
task-bound workspace id. Launch only after an explicit created result. A reused or
ambiguous result never launches an agent; report already-existing and the confirmed
recovery command monkey-maestro:spawn <issueId>. This makes workspace creation the
atomic duplicate guard across concurrent orchestration invocations. For a newly created
workspace, attempt one launch:
superset agents create \
--workspace <workspaceId> \
--host <targetHostId> \
--agent <defaultAgent> \
--prompt <workerPrompt> \
--json
- Report
dispatched only when the agent command confirms success. An explicit launch
refusal is launch-failed: preserve the workspace, do not retry or backfill, and report
monkey-maestro:spawn <issueId> as recovery. A transport error or malformed response
is launch-unknown and must not recommend immediate relaunch; report
monkey-maestro:reconcile <projectId> <issueId> instead. Never poll a worker or refresh
Linear for another batch.
Worker prompt
Start with linear-devotee:greet <issueId>. Preserve the selected issue's title, branch,
and description verbatim. Extract scope, acceptance criteria, and required checks only
when the description states them; otherwise label each missing section
not specified in Linear and never infer it. Include the ownership and handoff rules from
the shared contract. The worker must not merge, push, change dependencies, or infer
Linear completion.
Report
monkey-maestro:orchestrate report
Project/run: <project id> / <run id>
Linear: started <n> · ready <n> · slots <n>
Selected: <stable issue ids or none>
Groups: <inherited tags or root; reused workspaces keep their groups>
Superset: <per-issue dispatched / already-existing / create-failed / launch-failed / launch-unknown>
Recovery: <per-issue spawn / reconcile command or none>
Exit: idle | dispatched | degraded | stopped
1---2name: orchestrate3description: Use when the user wants Monkey Maestro to run an active Linear project. Counts live started issues, fills remaining slots, and safely creates or reuses one Superset workspace per selected issue.4---56# orchestrate78> Agent resolution: before dispatch, read `${CLAUDE_PLUGIN_ROOT}/shared/agent-runtime-map.md`9> and select the active runtime name for `monkey-maestro:linear-reader`.1011## Voice1213Read `../../persona.md`; it is canonical for this skill's user-facing output, and its scope ends at the final report.1415## Contract1617Read `${CLAUDE_PLUGIN_ROOT}/shared/project-execution-contract.md`. Linear alone decides18capacity and readiness. Superset receives selected work but never changes the plan.1920## Workflow21221. Require one exact Linear project id and dispatch `monkey-maestro:linear-reader` in23 `MODE: project`. Consume only its exact project identity, complete marker comment set,24 minimal status/blocker rows, and scoped unknowns.252. Pass the comments through `scripts/records.mjs resolve-controls`. Require one usable26 active control for the exact project. Inactive,27 absent, or unusable control creates no workspace.283. Require a complete live Linear project issue set. A failed project, page, or issue read29 creates no workspace. Classify only from current status types and `blockedBy`30 identifiers:31 - count every known `started` issue;32 - candidates are known `backlog`, `triage`, and `unstarted` issues;33 - a candidate is ready only when every blocker is present and terminal;34 - terminal issues are `completed` or `canceled`.354. Compute `slots = max(0, maxConcurrency - startedCount)`. Sort ready issues by Linear36 identifier and select the first `slots`. Started issues consume capacity but are never37 redispatched. If no slot or no ready issue exists, return `idle` without Superset.385. Dispatch the reader once in `MODE: selected` with exactly the selected issue ids. It39 refreshes those candidates plus their direct blockers. Reclassify every selected issue40 from this bounded result and require it to remain ready. In parallel, fetch each exact41 Superset task. A changed, unknown, terminal, or non-ready issue, or a failed detail/task42 read, fails only that selected issue; do not backfill it during this invocation.436. Resolve the invoking workspace's groups using **Workspace groups** in the shared44 contract. If placement is unresolved, report `degraded` without creating workspaces.45 Render the shared deterministic issue workspace name46 `linear-<lowercaseIssueId>-<taskDigest>`, where `taskDigest` is the first eight47 hexadecimal characters of SHA-256 over the exact task id. Render the complete worker48 prompt per valid issue. Attempt exactly one branch-scoped workspace create-or-reuse per49 issue, without an embedded agent launch, with sibling attempts settled independently:5051```text52superset workspaces create \53 --project <supersetProjectId> \54 --host <targetHostId> \55 --task <taskId> \56 --name <workspaceName> \57 <tagArgs> \58 --json59```60617. Require the response to distinguish `created` from `reused` and return one exact62 task-bound workspace id. Launch only after an explicit `created` result. A `reused` or63 ambiguous result never launches an agent; report `already-existing` and the confirmed64 recovery command `monkey-maestro:spawn <issueId>`. This makes workspace creation the65 atomic duplicate guard across concurrent orchestration invocations. For a newly created66 workspace, attempt one launch:6768```text69superset agents create \70 --workspace <workspaceId> \71 --host <targetHostId> \72 --agent <defaultAgent> \73 --prompt <workerPrompt> \74 --json75```76778. Report `dispatched` only when the agent command confirms success. An explicit launch78 refusal is `launch-failed`: preserve the workspace, do not retry or backfill, and report79 `monkey-maestro:spawn <issueId>` as recovery. A transport error or malformed response80 is `launch-unknown` and must not recommend immediate relaunch; report81 `monkey-maestro:reconcile <projectId> <issueId>` instead. Never poll a worker or refresh82 Linear for another batch.8384## Worker prompt8586Start with `linear-devotee:greet <issueId>`. Preserve the selected issue's title, branch,87and description verbatim. Extract scope, acceptance criteria, and required checks only88when the description states them; otherwise label each missing section89`not specified in Linear` and never infer it. Include the ownership and handoff rules from90the shared contract. The worker must not merge, push, change dependencies, or infer91Linear completion.9293## Report9495```text96monkey-maestro:orchestrate report97 Project/run: <project id> / <run id>98 Linear: started <n> · ready <n> · slots <n>99 Selected: <stable issue ids or none>100 Groups: <inherited tags or root; reused workspaces keep their groups>101 Superset: <per-issue dispatched / already-existing / create-failed / launch-failed / launch-unknown>102 Recovery: <per-issue spawn / reconcile command or none>103 Exit: idle | dispatched | degraded | stopped104```