Docs orchestrator
Documentation workflow orchestrator. Reads the step list from .agent_workspace/docs-workflow.yaml (or the plugin default). Runs steps sequentially, manages progress state, handles iteration and confirmation gates. Claude is the orchestrator — the YAML is a step list, not a workflow engine.From its SKILL.md
npx -y skills add opendatahub-io/docs-skills --skill docs-orchestratorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.5 KB, as published. Nobody here has run it
Docs Orchestrator
When the user invokes /docs-orchestrator, run THIS skill directly. Do NOT redirect to docs-workflow-start or any other skill.
The Python state machine driver owns all orchestrator logic. Claude calls the driver, parses JSON actions, and executes them.
Pre-flight
Install the workflow completion Stop hook (safe to re-run):
bash ${CLAUDE_SKILL_DIR}/scripts/setup-hooks.sh
Do not source .env files or check for tokens/CLIs — downstream scripts handle their own prerequisites.
Initialize
If the ticket argument is missing, STOP and ask the user.
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/docs_orchestrator.py init <TICKET> \
[--workflow <name>] \
[--pr <url>...] \
[--source-code-repo <url-or-path>...] \
[--no-source-repo] \
[--auto-discover-repos] \
[--max-secondary-repos <N>] \
[--mkdocs] \
[--draft] \
[--docs-repo-path <path>] \
[--create-merge-request] \
[--create-jira <PROJECT>] \
[--plugin-root ${CLAUDE_PLUGIN_ROOT}]
The script handles argument parsing, source resolution, workflow YAML loading, progress file creation or resume, and step classification. It emits a single JSON action to stdout. Parse it and enter the action loop.
Action loop
Read the JSON action field and act:
run_skill
The response contains skill, args, step, message, and optional warnings and messages arrays.
- Display
message. Display anywarnings(prefix with WARNING) andmessages. - Invoke:
Skill: <skill>, args: "<args>" - After the skill completes, report the result:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/docs_orchestrator.py step-done <TICKET> <step>
If the skill failed (threw an error, produced no output), add --failed:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/docs_orchestrator.py step-done <TICKET> <step> --failed
- Parse the new JSON response and loop back to the action check.
dispatch
The response contains step, message, prepare (a shell command), and optional warnings and messages. This step is dispatched by the main loop via subagents instead of the Skill tool — subagents cannot dispatch other subagents, so only the main conversation can do this.
- Display
message. Display anywarnings(prefix with WARNING) andmessages. - Run the
preparecommand with Bash and parse the JSON response. It containsagents,post_commands,finalize,verify, andnext_phase. - Repeat while the current response has a non-empty
agentsarray: a. Dispatch each agent with the Agent tool:subagent_type= agenttype,prompt,description,run_in_background= agentbackground. Passmodelandschemaonly when they are non-null. If the array has more than one agent, dispatch them all in a single message so they run in parallel. b. Run each command in the response'spost_commandsarray (if any) with Bash. c. Ifnext_phaseis not null, run it with Bash, parse the new JSON as the current response, and go back to step 3a. Otherwise leave the loop. - Using the most recent response: if
verifyis set, check that file exists. If it is missing, plan to add--failedto the step-done call. - Run each command in the most recent response's
finalizearray with Bash. - Report the result:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/docs_orchestrator.py step-done <TICKET> <step>
Add --failed if verification failed in step 4, or if a dispatched primary agent errored or produced no output.
- Parse the new JSON response and loop back to the action check.
complete
Display message and the summary object (completed steps, MR/PR URL, JIRA URL, module/file counts). Display any warnings. The workflow is done.
fail
Display message and reason. Display any warnings. Stop.
Querying status
To check workflow status without advancing it:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/docs_orchestrator.py status <TICKET>
To get the next action without recording a step-done:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/docs_orchestrator.py next <TICKET>
Recovery
If a step is marked failed (halting the workflow) but the underlying cause has been fixed — or a step is stuck in a non-runnable state — reset and retry it without hand-editing the progress JSON:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/docs_orchestrator.py retry-step <TICKET> <step>
This resets the step to in_progress, un-fails the workflow, restores the active marker, and emits that step's action so the loop re-runs it. Handle the emitted action exactly as in the action loop above.
Guardrails
Rules the script cannot enforce — Claude must follow these during execution:
-
Synchronous primary agents. When a step skill instructs you to dispatch an Agent, pass
run_in_background: falsefor the step's primary agent (the one whose output file the step verifies). Fan-out agents within a step may remain background. -
No stub results. If you cannot invoke a step's skill (e.g., context compaction removed its instructions), dispatch the step via an Agent subagent in a fresh context or mark it failed. Never write a placeholder
step-result.jsonor mark a stepcompletedwith generic text. -
Pipeline diagnostics via Agent. The
pipeline-diagnosticsstep runs last after 10+ skill invocations. Context compaction will have removed its skill instructions. Always dispatch it via the Agent tool in a fresh context. -
Commit confirmation gate. Before the
create-merge-requeststep, ask the user to confirm. Show: branch name, target repo, file count. If declined, callstep-done <TICKET> create-merge-request --failed.
Output conventions
Every step writes to .agent_workspace/<ticket>/<step-name>/. See output and state reference for the folder structure and step-result schema for sidecar format.