Skip to content

feat: add docs-workflow-start interactive launcher skill#95

Merged
aireilly merged 9 commits intomainfrom
feat/docs-workflow-start
Apr 20, 2026
Merged

feat: add docs-workflow-start interactive launcher skill#95
aireilly merged 9 commits intomainfrom
feat/docs-workflow-start

Conversation

@aireilly
Copy link
Copy Markdown
Member

@aireilly aireilly commented Apr 18, 2026

Summary

  • Adds docs-workflow-start skill — interactive entry point for the docs workflow
  • Uses AskUserQuestion to gather configuration when no CLI switches are provided
  • Supports running arbitrary individual steps with automatic prerequisite resolution via resolve_steps.py
  • Full workflow and resume modes delegate to docs-orchestrator unchanged
  • Bumps docs-tools plugin version to 0.0.27

Closes #92

New files

File Purpose
plugins/docs-tools/skills/docs-workflow-start/SKILL.md Skill definition — mode detection, AskUserQuestion flow, flag mapping, step execution
plugins/docs-tools/skills/docs-workflow-start/scripts/resolve_steps.py Dependency resolver — parses workflow YAML, computes transitive deps, checks existing artifacts

How it works

Interactive mode (no switches): 3 rounds of AskUserQuestion

  1. Action selection: full workflow / specific steps / resume
  2. Configuration: format, source code, placement, JIRA
  3. Step-specific config (specific steps only)

Pass-through mode (any -- switch present): forwards directly to docs-orchestrator

Specific steps: resolves transitive dependencies automatically. If user asks for writing, the resolver includes requirements → planning → prepare-branch as prerequisites. Existing artifacts from prior runs trigger a smart confirmation prompt.

Test plan

  • Invoke docs-workflow-start with no args — verify AskUserQuestion flow triggers
  • Invoke docs-workflow-start PROJ-123 --mkdocs — verify pass-through to orchestrator (no AskUserQuestion)
  • Select "Run specific step(s)" → writing — verify resolver includes requirements, planning, prepare-branch as prereqs
  • Select "Resume existing workflow" — verify orchestrator handles resume
  • Run resolve_steps.py --steps bogus-step — verify error with valid step list
  • Run resolve_steps.py --steps writing --base-path <path-with-existing-artifacts> — verify steps_with_artifacts populated
  • Verify multiple PR URLs can be entered in free-text follow-up

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Interactive docs workflow entry point: prompts for ticket, supports pass-through, full workflow, specific steps, or resume; documents CLI flags for common options.
    • Step-resolution tool that computes ordered execution plans, resolves transitive prerequisites, and optionally detects existing artifacts.
  • Documentation

    • Code-evidence behavior updated: missing source no longer prompts; such steps are marked skipped and a single log advises re-running with repo/PR flags.
  • Chores

    • Plugin version bumped to 0.0.27

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 18, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Adds an interactive skill docs-workflow-start that wraps and delegates to docs-orchestrator, a new CLI helper resolve_steps.py to compute step execution plans and artifact presence, and bumps the docs-tools plugin manifest version.

Changes

Cohort / File(s) Summary
Plugin metadata
plugins/docs-tools/.claude-plugin/plugin.json
Bumped plugin version from 0.0.260.0.27.
Interactive workflow skill
plugins/docs-tools/skills/docs-workflow-start/SKILL.md, .claude/skills/docs-workflow-start
Added docs-workflow-start skill: detects pass-through vs interactive mode, validates/requests a JIRA ticket, gathers configuration via AskUserQuestion, maps answers to docs-orchestrator flags, supports full runs, step-specific runs (with prerequisite resolution, artifact checks, when evaluation), resume behavior, and documents CLI interface.
Step resolution utility
plugins/docs-tools/skills/docs-workflow-start/scripts/resolve_steps.py
New executable that line-parses a constrained workflow YAML, validates step inputs, computes transitive prerequisite closure ordered by YAML, optionally checks <base-path>/<step> artifact dirs, and emits JSON success or error payloads with appropriate exit codes.
Docs tweak
plugins/docs-tools/skills/docs-orchestrator/SKILL.md
Removed interactive re-prompt on resolve_source exit code 2; now code-evidence is unconditionally skipped and users are advised to re-run with --repo/--pr via a consolidated message.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Skill as "docs-workflow-start"
    participant Ask as "AskUserQuestion"
    participant Resolver as "resolve_steps.py"
    participant Orchestrator as "docs-orchestrator"

    User->>Skill: Invoke (ticket only) or with flags
    Skill->>Skill: Detect pass-through vs interactive
    alt Pass-through (flags present)
        Skill->>Orchestrator: Forward original args
    else Interactive (no flags)
        Skill->>Ask: Round 1 (format, source, placement, JIRA)
        Ask-->>Skill: Answers
        Skill->>Ask: Round 2 conditional follow-ups
        Ask-->>Skill: Additional inputs
        Skill->>Skill: Map answers → orchestrator flags
        alt Full workflow
            Skill->>Orchestrator: Execute with mapped flags
        else Specific step(s)
            Skill->>Resolver: Request execution plan (workflow YAML, steps)
            Resolver-->>Skill: JSON plan (execution_plan, prereq, artifacts)
            Skill->>Skill: Evaluate `when` conditions & select steps
            loop For each selected step
                Skill->>Skill: Invoke step skill
                Skill->>Skill: Verify expected output dir exists
            end
        else Resume run
            Skill->>Orchestrator: Execute with ticket ID only
        end
    end
    Skill-->>User: Report completed and skipped steps
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs


Important

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

❌ Failed checks (2 errors, 1 warning)

Check name Status Explanation Resolution
Skill And Script Conventions ❌ Error The new SKILL.md file uses qualified skill names with 'plugin:' prefix in four locations instead of bare names as per conventions. Remove the 'docs-tools:' prefix from all four instances of 'Skill: docs-tools:docs-orchestrator' and change to 'Skill: docs-orchestrator'.
Plugin Registry Consistency ❌ Error The PR modified plugin.json version from 0.0.26 to 0.0.27 but did not update marketplace.json to synchronize the version field. Update .claude-plugin/marketplace.json to reflect the docs-tools version change to 0.0.27 to ensure consistency with plugin.json.
Docstring Coverage ⚠️ Warning Docstring coverage is 57.14% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title clearly describes the main change: adding a new interactive launcher skill called docs-workflow-start.
Linked Issues check ✅ Passed The PR implements all core requirements from issue #92: interactive AskUserQuestion flow (rounds 1-3), conditional prompting, pass-through mode for CLI flags, step-specific execution with dependency resolution, and maintains backward compatibility with existing CLI workflows.
Out of Scope Changes check ✅ Passed All changes are scoped to issue #92: new skill SKILL.md, dependency resolver script, plugin version bump, skill symlink, and docs-orchestrator documentation update for no_source handling—all directly supporting the interactive launcher objective.
No Real People Names In Style References ✅ Passed No real people names found in style references, plugin commands, or skill documentation across the PR changes.
Git Safety Rules ✅ Passed The pull request fully complies with Git Safety Rules by safely discovering repository root and delegating all git operations to existing step skills without adding unsafe operations.
No Untrusted Mcp Servers ✅ Passed No MCP server installations detected in any changed files; only standard library imports and YAML parsing utilities present.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/docs-workflow-start

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 18, 2026

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
plugins/docs-tools/skills/docs-workflow-start/SKILL.md (1)

25-301: Consider moving most branching/validation flow into a helper script.

This file currently carries substantial procedural orchestration logic inline. A script-backed planner/executor (JSON out, errors to stderr) would make this skill easier to test and maintain while keeping SKILL.md focused on invocation and user-facing behavior.

Based on learnings, “Do NOT embed procedural logic (conditionals, path construction, validation) inline in SKILL.md. If a skill needs to make decisions before dispatching an agent, defer that logic to a script that emits structured output.”

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/docs-workflow-start/SKILL.md` around lines 25 -
301, The SKILL.md currently embeds procedural orchestration (sections like
"Determine mode", "Compute execution plan", "Resolve base path", "Evaluate
`when` conditions", and "Run steps sequentially"); factor that logic into a
helper script (e.g., a new CLI script like docs_workflow_planner.py or a shell
script) that: accepts the raw args/ticket, performs branching/validation (mode
detection, base-path/YAML resolution, dependency resolution, `when` evaluation,
artifact checks), and emits a structured JSON plan to stdout and errors to
stderr (matching the existing contract used by resolve_steps.py); then simplify
SKILL.md to describe user-facing behavior and show invoking the helper script
(Skill: docs-tools:docs-orchestrator, args: "PROJ-123 <flags>") plus how to
interpret the planner's JSON output. Ensure references to the existing resolver
(resolve_steps.py) are preserved or called from the new helper where
appropriate.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@plugins/docs-tools/skills/docs-workflow-start/scripts/resolve_steps.py`:
- Around line 101-120: The resolver currently silently ignores unknown
dependency names (in resolve_transitive_deps), which hides typos and produces
invalid plans; update the walker so that when a dependency/step name referenced
in step_map[name]["inputs"] is missing from step_map it immediately raises a
JSON-serializable error (include the missing dependency name and the step that
referenced it) instead of returning early; apply the identical check & error
behavior to the other dependency resolver block referenced in the review (the
similar logic at lines ~142-159) so all invalid inputs fail fast with a clear
JSON error payload.

In `@plugins/docs-tools/skills/docs-workflow-start/SKILL.md`:
- Around line 270-277: The Step flag matrix in SKILL.md is missing the --repo
flag for the requirements and writing steps; update the table rows for the
"requirements" and "writing" steps to include `--repo <repo_path>` (e.g., make
requirements show `[--pr <url>]... --repo <repo_path>` and writing show
`--format <adoc|mkdocs> --repo <repo_path> [--draft]`) so the per-step contract
matches the orchestrator's documented contract for those steps and preserves
source-repo context.
- Line 29: Update the fenced code blocks in SKILL.md to include language
identifiers so Markdown linter MD040 passes; specifically annotate the example
blocks containing the "Skill: ..." pseudo-invocations with ```text (or ```bash
where a shell command is shown) — update the occurrences that show examples like
"Skill: docs-tools:docs-orchestrator, args: \"<all original args>\"", "Skill:
docs-tools:docs-orchestrator, args: \"<ticket>\"", "Skill:
docs-tools:docs-orchestrator, args: \"<ticket> <constructed flags>\"", "Skill:
docs-tools:docs-orchestrator, args: \"PROJ-123 --mkdocs --pr
https://github.com/org/repo/pull/42 --draft\"" and "Skill: <step.skill>, args:
\"<ticket> --base-path <BASE_PATH> <step-specific-flags>\"" by adding the
appropriate language tag after the opening backticks.

---

Nitpick comments:
In `@plugins/docs-tools/skills/docs-workflow-start/SKILL.md`:
- Around line 25-301: The SKILL.md currently embeds procedural orchestration
(sections like "Determine mode", "Compute execution plan", "Resolve base path",
"Evaluate `when` conditions", and "Run steps sequentially"); factor that logic
into a helper script (e.g., a new CLI script like docs_workflow_planner.py or a
shell script) that: accepts the raw args/ticket, performs branching/validation
(mode detection, base-path/YAML resolution, dependency resolution, `when`
evaluation, artifact checks), and emits a structured JSON plan to stdout and
errors to stderr (matching the existing contract used by resolve_steps.py); then
simplify SKILL.md to describe user-facing behavior and show invoking the helper
script (Skill: docs-tools:docs-orchestrator, args: "PROJ-123 <flags>") plus how
to interpret the planner's JSON output. Ensure references to the existing
resolver (resolve_steps.py) are preserved or called from the new helper where
appropriate.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e518ad8e-1db1-473f-80ec-824dcebb5777

📥 Commits

Reviewing files that changed from the base of the PR and between b51a490 and 66abe38.

📒 Files selected for processing (3)
  • plugins/docs-tools/.claude-plugin/plugin.json
  • plugins/docs-tools/skills/docs-workflow-start/SKILL.md
  • plugins/docs-tools/skills/docs-workflow-start/scripts/resolve_steps.py

Comment thread plugins/docs-tools/skills/docs-workflow-start/SKILL.md
Comment thread plugins/docs-tools/skills/docs-workflow-start/SKILL.md
Parses the workflow YAML without PyYAML, walks the inputs graph to
compute transitive dependencies, checks for existing artifacts, and
emits a JSON execution plan.

Part of #92

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
New skill that uses AskUserQuestion to gather workflow configuration
when invoked without CLI switches. Supports full workflow, individual
steps with automatic dependency resolution, and resume.

Part of #92

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@aireilly aireilly force-pushed the feat/docs-workflow-start branch from 66abe38 to d5eed58 Compare April 19, 2026 09:12
The AskUserQuestion interaction for missing PR/repo broke
scripted/CI/ambient execution modes. Now skips code-evidence
directly with a log message suggesting --repo or --pr flags.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
The table still said "Prompt the user" for the no_source case
after the prompt was removed. Updated to "Skip code-evidence".

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
plugins/docs-tools/skills/docs-workflow-start/SKILL.md (1)

3-3: Consider qualifying the skill name in the description.

The description references "docs-orchestrator" without the docs-tools: prefix. Based on learnings, inline text references to skills should use fully qualified plugin:skill names for consistency and to avoid ambiguity.

📝 Proposed refinement
-description: Interactive entry point for the docs workflow. When invoked with no CLI switches, uses AskUserQuestion to gather configuration. Supports full workflow, individual steps with auto-resolved prerequisites, and resuming previous runs. When switches are provided, passes through directly to docs-orchestrator.
+description: Interactive entry point for the docs workflow. When invoked with no CLI switches, uses AskUserQuestion to gather configuration. Supports full workflow, individual steps with auto-resolved prerequisites, and resuming previous runs. When switches are provided, passes through directly to docs-tools:docs-orchestrator.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@plugins/docs-tools/skills/docs-workflow-start/SKILL.md` at line 3, The
description string should use the fully qualified plugin:skill name for the
referenced skill; update the description in SKILL.md to replace the bare
"docs-orchestrator" reference with "docs-tools:docs-orchestrator" (keep the rest
of the sentence intact) so inline references follow the plugin:skill convention.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@plugins/docs-tools/skills/docs-workflow-start/SKILL.md`:
- Line 3: The description string should use the fully qualified plugin:skill
name for the referenced skill; update the description in SKILL.md to replace the
bare "docs-orchestrator" reference with "docs-tools:docs-orchestrator" (keep the
rest of the sentence intact) so inline references follow the plugin:skill
convention.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5128cb5d-64e1-4a6a-a60e-3c23d38451d5

📥 Commits

Reviewing files that changed from the base of the PR and between 66abe38 and d5eed58.

📒 Files selected for processing (3)
  • plugins/docs-tools/.claude-plugin/plugin.json
  • plugins/docs-tools/skills/docs-workflow-start/SKILL.md
  • plugins/docs-tools/skills/docs-workflow-start/scripts/resolve_steps.py
✅ Files skipped from review due to trivial changes (1)
  • plugins/docs-tools/.claude-plugin/plugin.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • plugins/docs-tools/skills/docs-workflow-start/scripts/resolve_steps.py

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Silent skip of missing input deps could mask typos (e.g. inputs: [planing]).
Now emits an explicit JSON error before resolving steps.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
Remove docs-tools: prefix from Skill references (bare names resolve
within the same plugin). Replace parent-traversal CLAUDE_SKILL_DIR/../
with CLAUDE_PLUGIN_ROOT for cross-skill docs-orchestrator YAML path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Signed-off-by: Aidan Reilly <aireilly@redhat.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@aireilly aireilly force-pushed the feat/docs-workflow-start branch from 5cb31a9 to e3e6418 Compare April 19, 2026 10:38
… steps

The step flag matrix was missing --repo for requirements and writing,
causing the per-step contract to diverge from the orchestrator's
documented contract.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

rh-pre-commit.version: 2.3.2
rh-pre-commit.check-secrets: ENABLED
@aireilly aireilly merged commit 43c388e into main Apr 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs-orchestrator: interactive input gathering via AskUserQuestion

1 participant