From docs-tools
Orchestrates documentation workflows from YAML step lists, running skills sequentially with progress state, iterations, confirmations, and JIRA/PR integration.
npx claudepluginhub redhat-documentation/redhat-docs-agent-tools --plugin docs-toolsThis skill is limited to using the following tools:
Claude is the orchestrator. The YAML is a step list. The hook is a safety net.
Writes AsciiDoc or MkDocs documentation from a JIRA ticket plan. Dispatches docs-writer agent with update-in-place, draft staging, or fix-from-review modes.
Updates README, .correctless/AGENT_CONTEXT.md, ARCHITECTURE.md, and feature docs after features land. Intensity-aware with Mermaid diagrams at high level and fact-checking subagent at critical. Run before merging.
Orchestrates development pipeline for bugs, features, tasks: classify work, discover ticket/branch, brainstorm design, plan tasks, execute build/test, review, ship PR. Use when starting dev work.
Share bugs, ideas, or general feedback.
Claude is the orchestrator. The YAML is a step list. The hook is a safety net.
This skill teaches you how to run a documentation workflow pipeline. You read the step list from YAML, run each step skill sequentially, manage progress state via a JSON file, and handle iteration loops and confirmation gates.
Before starting, verify the environment:
# Source ~/.env if JIRA_AUTH_TOKEN is not set
if [[ -z "${JIRA_AUTH_TOKEN:-}" ]]; then
set -a && source ~/.env 2>/dev/null && set +a
fi
JIRA_AUTH_TOKEN is still unset → STOP and ask the user to set it in ~/.envGITHUB_TOKEN or GITLAB_TOKEN are unsetbash ${CLAUDE_PLUGIN_ROOT}/skills/docs-orchestrator/scripts/setup-hooks.sh
$1 — JIRA ticket ID (required). If missing, STOP and ask the user.--workflow <name> — Use .claude/docs-<name>.yaml instead of docs-workflow.yaml--pr <url> — PR/MR URLs (repeatable, accumulated into a list)--mkdocs — Use Material for MkDocs format instead of AsciiDoc--draft — Write documentation to a staging area instead of directly into the repo. When set, the writing step uses DRAFT placement mode (no framework detection, no branch creation). Without this flag, UPDATE-IN-PLACE is the default--create-jira <PROJECT> — Create a linked JIRA ticket in the specified project--workflow <name> was specified → .claude/docs-<name>.yaml.claude/docs-workflow.yamlskills/docs-orchestrator/defaults/docs-workflow.yamlRead the YAML file and extract the ordered step list. Each step has: name, skill, description, optional when, and optional inputs.
when conditionswhen: create_jira_project → run this step only if --create-jira was passedwhen always runwhen condition are marked skipped in the progress fileAll of the following must be true. If any check fails, STOP with a clear error:
skill references are fully qualified (plugin:skill format)inputs, every referenced step name must be present in the step list (unless it has a when condition that would skip it)Steps declare their inputs as a list of upstream step names in the YAML:
- name: writing
skill: docs-workflow-writing
inputs: [planning]
- name: create-jira
skill: docs-workflow-create-jira
when: create_jira_project
inputs: [planning]
The orchestrator validates at load time that every step name in inputs exists in the step list. Step skills read their input data from the upstream step's output folder by convention (see below).
Custom workflow validation: If a step's inputs references a step that does not exist in the current YAML step list, fail at load time with an error (e.g., "Step 'writing' requires 'planning', but 'planning' is not in the step list").
Every step writes to a predictable folder based on the ticket ID and step name:
.claude/docs/<ticket>/<step-name>/
The ticket ID is converted to lowercase for directory names (e.g., PROJ-123 → proj-123).
.claude/docs/proj-123/
requirements/
requirements.md
planning/
plan.md
prepare-branch/
branch-info.md
writing/
_index.md
assembly_*.adoc (or docs/*.md for mkdocs)
modules/
technical-review/
review.md
style-review/
review.md
workflow/
docs-workflow_proj-123.json
Each step skill knows its own output folder and writes there. Each step reads input from upstream step folders referenced in its inputs list. The orchestrator passes the base path .claude/docs/<ticket>/ — step skills derive everything else by convention.
Claude writes the progress file directly using the Write tool. Create it after parsing arguments, before step 1. Update it after each step.
Location: .claude/docs/<ticket>/workflow/<workflow-type>_<ticket>.json
The workflow_type field and filename prefix match the YAML's workflow.name. This allows multiple workflow types to run against the same ticket without conflict.
{
"workflow_type": "<workflow.name from YAML>",
"ticket": "<TICKET>",
"base_path": ".claude/docs/<ticket>",
"status": "in_progress",
"created_at": "<ISO 8601>",
"updated_at": "<ISO 8601>",
"options": {
"format": "adoc",
"draft": false,
"create_jira_project": null,
"pr_urls": []
},
"step_order": ["requirements", "planning", "writing", ...],
"steps": {
"<step-name>": {
"status": "pending",
"output": null
}
}
}
The output field records the step's output folder path (e.g., .claude/docs/proj-123/writing/) once completed.
| Value | Meaning |
|---|---|
pending | Not yet started |
in_progress | Currently running |
completed | Finished successfully |
failed | Failed — needs retry |
skipped | Conditional step not applicable |
step_orderA top-level array listing steps in canonical order. This field exists so the Stop hook can determine step ordering without a hardcoded bash array. It must always be written by the orchestrator and kept in sync with the YAML step list.
Before starting, check for a progress file at .claude/docs/<ticket>/workflow/<workflow-type>_<ticket>.json.
If a progress file exists:
"completed" or "skipped""completed" step, verify its output folder still exists on disk. If it has been deleted, reset that step to "pending" and reset all downstream dependent steps to "pending" as well"pending" or "failed"<ticket>. Resuming from <step>."--create-jira), update the progress file options accordinglyIf no progress file exists, start from step 1 and create a new progress file.
Run steps in the order defined by the YAML. For each step:
inputs, the referenced upstream step must have status: "completed" and a non-null output folder in the progress file. If any required input step did not complete, fail the current step immediately with a clear error (e.g., "Step 'writing' requires 'planning', but planning has status 'failed'")"in_progress" in the progress fileBuild the args string for the step skill:
<ticket> --base-path <base_path> — the ticket ID and the base output pathrequirements: [--pr <url>]...prepare-branch: [--draft]writing: --format <adoc|mkdocs> [--draft]style-review: --format <adoc|mkdocs>create-jira: --project <PROJECT>Step skills derive their own output folder and input folders from --base-path and step name conventions. No per-input flag wiring needed.
Skill: <step.skill>, args: "<constructed args>"
failed in the progress file and STOP"completed" with the output folder path in the progress fileupdated_at timestampThe technical review step runs in a loop until confidence is acceptable or three iterations are exhausted:
docs-workflow-tech-review with the standard argsOverall technical confidence: (HIGH|MEDIUM|LOW)
failed and stop iterationHIGH → mark completed, proceed to next stepMEDIUM or LOW and fewer than 3 iterations completed → run the fix skill:
Skill: docs-workflow-writing, args: "<ticket> --base-path <base_path> --fix-from <base_path>/technical-review/review.md"
Then re-run the reviewer (go to step 1)HIGH:
MEDIUM is acceptable — proceed with a warning that manual review is recommendedLOW after max iterations — ask the user whether to proceed or stopAfter all steps complete (or are skipped):
status → "completed"HIGH, etc.)The progress file is already in context. Skip completed steps and continue from the first pending or failed step. The Stop hook ensures Claude doesn't stop prematurely.
User says: "Resume docs workflow for PROJ-123"
pending or failed stepstatus: "completed" and a non-null output folder. If a dependency is failed or pending, re-run that dependency firstpending and re-run it--create-jira) — update the progress file options accordinglySame as new session. The progress file shows which steps completed and which failed. Walk back to the earliest incomplete dependency and resume from there.