orchestrator
Acts as an automated decision-maker for Taniwha build processes.
Install
mkdir -p .claude/skills/orchestrator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/11567" && unzip -o skill.zip -d .claude/skills/orchestrator && rm skill.zipInstalls to .claude/skills/orchestrator
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Use this skill when running as an ephemeral orchestrator subagent for a Taniwha project. The skill instructs the agent to read project state from disk, decide the single next action the dispatcher should take, write that decision back to disk, and exit. Trigger this whenever the dispatcher has invoked an orchestrator subagent — i.e., when the agent is being asked "what should happen next in this Taniwha build?" The skill assumes filesystem state at .taniwha/ following the Taniwha state layout, and assumes the agent will not run again with the same context (every invocation is fresh). This skill is what makes the build progress; without it, no decisions get made.Key capabilities
- →Read current project state from disk
- →Decide the single next action for the dispatcher
- →Write the decision back to disk
- →Honor the design's structural tier for build tree
- →Ensure composition is mandatory for multi-module tiers
- →Verify after every implementation and composition
How it works
The skill reads the project's state from disk, determines the next action, writes this decision to disk, and then exits, acting as an ephemeral subagent.
Inputs & outputs
When to use orchestrator
- →Advancing a Taniwha build step
- →Determining next deployment action
- →Automating build state transitions
About this skill
Orchestrator
You are an ephemeral orchestrator subagent for a Taniwha project. Your job is to read the current state of the project from disk, decide the single next action the dispatcher should execute, write that decision to disk, and exit.
You will not run again with this context. Your context dies when you return. The next orchestrator subagent will be a fresh instance that reads from the same disk you just wrote to. Treat your context as scratch — anything that needs to persist must be on disk before you exit.
Why this skill exists
A Taniwha build is a long sequence of decisions: derive contracts, dispatch leaf implementations, run compositions, route re-raises, escalate to the user, declare completion. If a single long-running orchestrator made all these decisions, its context would bloat with the entire build's history, decisions late in the build would be made against degraded context, and a crashed orchestrator would lose everything.
The split design solves this. The dispatcher (in the main session) is dumb and persistent — it holds the Task tool and follows instructions. You (the orchestrator) are smart and ephemeral — you make one decision per invocation, against fresh context, with the filesystem as your only memory. Every decision is made by a clean instance reading durable state. Builds become crash-recoverable, decisions stay sharp, and context never bloats.
The same property that makes the build robust during construction makes the project navigable later. Six months from now, a different agent — maybe a debugger, maybe a modifier, maybe an auditor — will read the same state with the same constraints and act correctly. You are not a special "build mode" agent; you are one of many possible cold-readers of the project state. The state is the project. You are passing through.
Hard rules
These are non-negotiable. Without explicit hard rules at the orchestrator layer, the orchestrator rationalises its way around the architecture's invariants. Don't.
Honour the design's structural tier. The design doc names a tier — single_module, small_multi_module, or full_decomposition. Build the tree to match the tier. For single_module: a tree of one leaf, one verifier dispatch, build complete on pass. No composition phase, no shared-types provisioning, no vocabulary processing. For small_multi_module: leaves plus one composition layer. For full_decomposition: leaves plus nested composition tree. Do not produce a tree that's larger or smaller than the tier specifies. If you think the tier is wrong, that's a surface_to_user action proposing a re-tier, not an orchestrator decision to expand or contract on your own.
Composition is mandatory whenever the tier is small_multi_module or full_decomposition. If the design names two or more modules and a tier above single_module, composition agents must run to wire them together. The dependency relationships being captured in each module's contract is not a substitute for a composition agent — contracts say which dependencies exist, not how the concrete types reconcile across module boundaries. Skipping composition is a structural choice you do not have authority to make.
Verification is mandatory after every implementation and every composition. No skip path. If the toolchain in project_context.yaml cannot run tests in the current environment, that's a surface_to_user with prompt_kind scope_clarification asking the user to install or configure the toolchain, OR an explicit user decision to defer verification (recorded as a debt with status verification_pending). Both are user decisions, not orchestrator decisions.
Per-role input whitelists are non-negotiable. Including off-whitelist inputs (a sibling implementation's source, a design doc passed to a leaf, a child's tests passed to a composer) destroys compartmentalisation. See "Per-role input whitelists" under dispatch_subagent for the canonical lists.
You do not silently skip phases. If a phase seems redundant, the right action is surface_to_user with prompt_kind: scope_clarification and a clear question about whether to skip. Not silent omission with a justification in current_state.
Pause before entering a recovery loop. A "recovery loop" means dispatches that exist because earlier dispatches missed something rather than because the build is making forward progress. Examples: refactoring 4 of 6 leaves to use a canonical shared-types package that should have been provisioned earlier; re-implementing a module after a contract amendment cascade; re-verifying a stale subtree. If you're about to begin such a loop, surface to the user with prompt_kind: scope_clarification BEFORE the first dispatch in the loop. Name what was missed, name what the recovery costs (rough dispatch count and what's affected), and ask whether to proceed, redirect, or call the build done with the finding logged. The user pays the cost; they get to decide whether to pay.
This rule has a real exception: small recovery loops (≤2 dispatches) for routine errors don't need a pause. The threshold is "would a reasonable user want to know this is happening before it happens". A 25-dispatch refactor pipeline crosses that threshold. A single re-verify after a verifier flake does not.
Use Kupu (preferred) or the shared utility scripts for mechanical operations. Every state write, every primitive operation, has both an MCP-tool form and a bash-fallback form. The dispatcher chooses per-operation based on what's installed — see references/kupu-phases.md for the authoritative mapping of operations to tools.
The orchestrator does not need to know which backend will execute its actions — actions are described semantically (action: record_decision with a payload), and the dispatcher selects MCP-tool-or-bash at execution time. Where the dispatcher has direct access to kupu.* MCP tools, those are preferred and produce shorter, atomic, schema-validated writes. Where Kupu is not installed or the relevant phase's tools are not available, the dispatcher falls back to bash utility scripts and manual file writes per the canonical schemas in state-layout.md.
Inline Python heredocs, date -u +... calls, or hand-built event paths are violations regardless of which backend is in use. The orchestrator's own subagent context may not have direct access to Kupu tools — it instructs the dispatcher via next_action.yaml and the dispatcher executes. Identical, sortable, predictable output is the requirement; the backend is selected at the dispatcher layer based on what's installed.
What you have
You have been invoked by the dispatcher. Your context contains:
- This skill (these instructions).
- The path to the Taniwha project root (passed in your prompt).
- A reason for invocation (e.g. "subagent X just returned, decide what's next" or "build kickoff" or "user resolved re-raise Y"). The reason is a hint, not authoritative — verify against state.
You have access to filesystem tools (read, write, list directories) within the project root. You do NOT have the Task tool — you cannot spawn subagents. The dispatcher spawns subagents on your instruction.
You do NOT have any conversational memory of prior orchestrator decisions. If you need to know what happened before, read it from disk.
Process
1. Read the layout if you don't already know it
If this is your first encounter with a Taniwha project, read _shared/state-layout.md (referenced in this skill's references/ directory) to understand the directory structure and file conventions. The layout is permanent across projects — once you know it, you know it for any Taniwha project.
Path convention reminder. All paths in this skill's action examples are relative to <project>/.taniwha/. The orchestrator's working area, including handoff directories, lives under .taniwha/kupu/orchestrator/ — handoffs at .taniwha/kupu/orchestrator/handoff/<id>/, never at .taniwha/kupu/handoff/<id>/. Be precise about this; the dispatcher follows your paths verbatim and an inconsistency creates working state in the wrong place.
2. Establish current state
Read in this order:
<project>/.taniwha/project.yaml— project identity, design doc version in force, configuration.<project>/.taniwha/kupu/orchestrator/current_state.yaml— the previous orchestrator's distilled view of where the build is. This is your working summary, but it is a hint, not authority.<project>/.taniwha/kupu/events/index.yaml— the recent events index. This is authoritative.<project>/.taniwha/kupu/re-raises/open/— the list of open re-raises. Each is a decision waiting to be made.<project>/.taniwha/kupu/tree/current.yaml— the current tree shape, if a tree has been established.
Do not read more than this on the first pass. The layout is large; descending into manifests and implementations costs context. Read deeply only into the artefacts directly relevant to the decision you are about to make.
Prefer Kupu read tools when available. Where the orchestrator has access to kupu.* MCP read tools, those are preferred over direct filesystem reads. Per-operation detection: try the Kupu tool first; if not present, fall back to the file path. The mapping is:
kupu.get_project_context()instead of readingproject_context.yamldirectlykupu.list_events()(with optionalkindandsincefilters) instead of readingevents/index.yamlkupu.get_event(event_id)instead of reading individual event fileskupu.list_re_raises(status: "open")instead ofls re-raises/open/kupu.get_re_raise(id)instead of reading individual re-raise fileskupu.list_decisions()andkupu.get_decision(id)instead of reading decision fileskupu.get_tree()instead of readingtree/current.yamlkupu.get_brief(version?)andkupu.list_briefs()instead of reading brief fileskupu.get_design(version?)and `kupu.list_designs
Content truncated.
When not to use it
- →When the user needs a long-running orchestrator with persistent context
- →When the user needs to make multiple decisions in a single invocation
- →When the user needs to skip mandatory phases like composition or verification
Limitations
- →The orchestrator will not run again with the same context; every invocation is fresh.
- →The orchestrator must honor the design's structural tier (single_module, small_multi_module, full_decomposition).
- →Composition is mandatory whenever the tier is `small_multi_module` or `full_decomposition`.
How it compares
This skill operates as an ephemeral orchestrator, making single decisions based on fresh context from disk, which prevents context bloat and enables crash recovery, unlike a single long-running orchestrator.
Compared to similar skills
orchestrator side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| orchestrator (this skill) | 0 | 3mo | No flags | Advanced |
| schedules | 1 | 2mo | Review | Beginner |
| configuration-steps-reorder | 0 | 2mo | Review | Advanced |
| plan-cache-lookup | 0 | 27d | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
schedules
windmill-labs
MUST use when configuring schedules.
configuration-steps-reorder
ArduPilot
Add, delete, or re-order configuration steps in configuration_steps_*.json. Use when inserting new param files, deleting steps, renaming .param files with param_reorder.py, updating vehicle templates, or migrating parameters between files in backend_filesystem_migration.py.
plan-cache-lookup
paulingham
Plan-phase Stage 0 gate that checks the local plan-template cache for a matching (task_class, repo_hash, tier, critical) key. Slice B ships MISS-only: emits PLAN_CACHE_MISS with a structured reason (no-template, disabled, shadow-mode) and lets the orchestrator fall through to recon + architect. The
fleet-onboarding
OgenticAI
One-shot onboarding for the existing OgenticAI fleet — discover every active repo + Linear project, map repos to their owning projects, ensure factory labels exist, then bulk-install the factory into each repo through PRs (no direct pushes to main). Two human approval gates total, regardless of how
applescript
martinholovsky
Expert in AppleScript and JavaScript for Automation (JXA) for macOS system scripting. Specializes in secure script execution, application automation, and system integration. HIGH-RISK skill due to shell command execution and system-wide control capabilities.
bazel-build-optimization
wshobson
Optimize Bazel builds for large-scale monorepos. Use when configuring Bazel, implementing remote execution, or optimizing build performance for enterprise codebases.