workflow-orchestrator
select and stage a workflow from a repository sensemaking brief. use when the user has a diagnostic brief and wants a workflow plan, prompt chain, guided execution plan, or guarded orchestration with
SKILL.mdskills/workflow-orchestrator/SKILL.md
GitHubworkflow-orchestrator
Workflow
- Consume Brief: Review the diagnostic brief from
repo-sensemaker. - Select Workflow: Match the recommended path to an available workflow in the
workflow-registry.yaml. - Plan: Produce a Workflow Orchestration Plan with ordered steps and approval gates.
- Mode Selection: Determine the execution mode (Default:
plan_only). - Execute/Generate:
plan_only: produce the plan and stop.prompt_chain: produce copy/paste prompts and stop.guided_execution: execute one eligible step, validate its output artifact, write/update the run log, then stop for approval.autonomous_execution: execute eligible steps until the next approval gate, failed validation, non-executable skill, or stop condition.yolo_execution: execute only eligible steps with no intermediate approval, but stop immediately on missing artifact, invalid handoff, failed validation, non-executable skill, dirty git state, or run-log failure.
Output Format
Every response must follow the Workflow Orchestration Plan structure. Use Run Log Template only when recording an actual guided or autonomous run.
Execution Modes
Use Execution Modes as the source of truth. The inline behavior summary in the workflow above is only a control-plane shortcut.
Boundary Rules
- Safety First: Default to
plan_onlymode. - Contract Enforcement: If a brief does not contain a valid machine-readable handoff, or the requested execution mode is not allowed by Execution Modes, the orchestrator MUST refuse the request or downgrade to
plan_onlyorguided_execution. - Handoff Compliance: Transitions between skills in a workflow MUST comply with the Artifact Contracts.
- Execution Authority: The orchestrator may execute only registry-approved steps where
availability.executable_by_orchestrator: trueandavailability.typeis eitherlocalorlocal_command.localmeans the skill is bundled in this repository.local_commandmeans the skill is installed in the local working environment and MUST define aninvocationblock withruntime,command,input_artifact, andoutput_artifact.external,external_required, andprompt_onlysteps must be treated as routing targets, not executable steps.
- YOLO Mode Restrictions:
- Requires exact opt-in:
"I choose yolo_execution and accept automated repository changes, feature-branch commits, bypassed gates, and recovery risk." - Requires a feature branch (No direct commits to
main). - Requires a Run Log.
- Requires exact opt-in:
- YOLO Step Completion:
- A YOLO step is not complete when a command is merely named.
- A YOLO step is complete only when the declared
output_artifactexists, satisfiesartifact-contracts.yaml, and is recorded in the run log. - For
local_commandsteps, the orchestrator MUST use the exactinvocation.command; it must not invent command names. - After each step, preserve only the declared output artifact, compact run-log entry, and fields required by the next step.
- Stop immediately if the command output cannot be mapped to the declared
output_artifact.
- Approval Gates: Do not bypass approval gates in
guided_executionorautonomous_executionmode. Onlyyolo_executionbypasses gates for eligible local/command skills.
Local Command Execution
When executing a local_command step, the orchestrator MUST:
- Read the skill's
invocationblock fromskill-registry.yaml. - Pass only the declared
input_artifactplus the minimal necessary context. - Invoke the declared
command; do not invent command names. - Treat the declared
output_artifactas the only valid result of the step. - Append a compact run-log entry before continuing.
- Summarize prior full artifacts once more than one artifact exists in context.
- Stop if the command, input artifact, output artifact, or runtime is missing.
A local_command step is not complete until its declared output_artifact exists and satisfies the next handoff contract.
Hard Stop Conditions
The orchestrator MUST stop and report instead of continuing when any of these occur:
- The skill is
external,external_required, orprompt_only. - The next step is
workflow-orchestratoritself, unless the mode isplan_only. - The expected output artifact is missing, malformed, or does not satisfy
artifact-contracts.yaml. - The selected workflow does not explicitly allow the requested execution mode.
- The run log cannot be created or updated.
- The working tree is dirty before
autonomous_executionoryolo_execution. - The current branch is
mainormasterduring a mode that can mutate files. - More than one retry would be required for the same step.
- The current context contains more than one full artifact from prior steps; summarize earlier artifacts before continuing.