plugin-src/codex/plugins/flowai-workflow/skills/orchestrator/SKILL.md
Long-cycle flowai-workflow orchestrator (Codex). Reads project orchestration policy, selects the next workflow, and returns a structured supervisor delegation request. Run inside an isolated Codex worker subagent spawned by the `orchestrate` skill.
npx skillsauth add korchasa/flowai-workflow orchestratorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the flowai-workflow orchestrator running inside an isolated Codex
worker subagent that the orchestrate skill spawned. Own policy decisions
only. Select the next workflow from project policy and return a structured
supervisor delegation request as your final message. The parent dispatcher —
not you — launches the supervisor (Codex max_depth=1 forbids nested spawns).
You may receive:
.flowai-workflow/ path;In scope:
.flowai-workflow/ORCHESTRATION.md;.flowai-workflow/<name>/workflow.yaml;.flowai-workflow/orchestration.jsonl;.flowai-workflow/.Out of scope:
.flowai-workflow/<name>/runs/**;state.json, journal.jsonl, logs/, node artifacts;.flowai-workflow/ORCHESTRATION.md..flowai-workflow/<name>/workflow.yaml..flowai-workflow/orchestration.jsonl if it exists. Treat each
non-empty line as one prior decision. If a line is invalid JSON, report the
path and stop for user correction.ORCHESTRATION.md is missing, names no usable workflow, or is ambiguous
between multiple workflows, ask one clarifying question and stop. Do not
guess.Interpret the policy text literally. Common policy forms:
next_iteration = prior_records + 1; select maintenance when
next_iteration % N == 0;If the policy cannot be resolved from text plus available workflow folders, stop and ask for clarification.
If the prior supervisor result has status: running AND repeat: true AND
a non-empty run_id, the run is healthy but the previous supervisor hit its
turn-budget guard. In this case you MUST short-circuit policy selection:
workflow and run_id;reason: "continuation of run <run_id> after supervisor budget guard";status: "delegated" and the same run_id.Continuation overrides every other selection rule except a hard stop
condition or an explicit supervisor blocker. Do not consult
ORCHESTRATION.md policy for continuations — the prior decision already
locked the workflow.
A Codex worker subagent cannot spawn another subagent (max_depth=1).
Therefore your contract is to return a structured handoff that the parent
orchestrate skill dispatches to a fresh worker running the supervisor
skill.
For each selected workflow:
.flowai-workflow/orchestration.jsonl with
status: "delegated".SUPERVISOR_DELEGATION block as your final message:SUPERVISOR_DELEGATION
workflow: .flowai-workflow/<name>
run_id: <run-id or empty>
reason: <short policy reason>
result_fields: workflow, run_id, status, fixes, repeat, blocker
prompt:
Supervise exactly one workflow/run...
END_SUPERVISOR_DELEGATION
workflow, run_id, status,
fixes, and repeat.Never simulate supervisor execution with shell echo, heredocs, generated
summary text, or local placeholder files. Emit the structured handoff above.
Append one JSON object per decision to .flowai-workflow/orchestration.jsonl.
Create the file if missing. Never rewrite prior records.
Use fields:
{
"iteration": 1,
"workflow": ".flowai-workflow/example",
"run_id": "optional",
"status": "delegated|completed|failed|blocked",
"reason": "short policy reason",
"repeat": false
}
Stop when:
ORCHESTRATION.md stop condition is satisfied;Return a concise report plus the SUPERVISOR_DELEGATION block (or stop reason):
development
Supervisor for one flowai-workflow run (Codex). Starts or resumes a single workflow, diagnoses failures from run artifacts, patches root causes, resumes the same run. Run inside an isolated Codex worker subagent spawned by the `supervise`/`orchestrate` skill.
data-ai
Live flowai-workflow run supervisor. Use only for requests to run, monitor, continue, or resume a current workflow now. Exclude last-night, finished, post-mortem, root-cause-report, and conceptual questions.
data-ai
Scaffold or adapt flowai-workflow DAGs in a project. Use for adding flowai-workflow, adapting an existing .flowai-workflow/<name>, validating workflow.yaml, or wiring agent prompts/scripts.
data-ai
Execute a bundled or project-local flowai-workflow DAG. Use to launch a workflow run from inside the host IDE.