From dso
Invoke the doc-writer agent to update project documentation based on recent changes. Scoped to a commit range (default main...HEAD). Use after an epic completes or when documentation is out of sync.
npx claudepluginhub navapbc/digital-service-orchestra --plugin dso-devThis skill is limited to using the following tools:
<SUB-AGENT-GUARD>
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
"ERROR: /dso:update-docs cannot run in sub-agent context — it requires the Agent tool to dispatch its own sub-agents. Invoke this skill directly from the orchestrator instead."
Do NOT proceed with any skill logic if the Agent tool is unavailable.
Invoke the dso:doc-writer agent to review and update project documentation based on recent changes. Accepts an optional commit range to scope the git diff.
/dso:update-docs # Diff scoped to main...HEAD (default)
/dso:update-docs <commit-range> # Diff scoped to the specified commit range
Examples:
/dso:update-docs — updates docs for all commits since main/dso:update-docs HEAD~5..HEAD — updates docs for the last 5 commits/dso:update-docs abc123..def456 — updates docs for a specific rangeDetermine the commit range to use:
<commit-range> argument was provided, use it as-is.main...HEAD.REPO_ROOT=$(git rev-parse --show-toplevel)
COMMIT_RANGE="${1:-main...HEAD}"
Collect the inputs the doc-writer agent requires:
# Git diff scoped to the commit range
git diff "$COMMIT_RANGE"
# Recent git log for the range (context for the agent)
git log --oneline "$COMMIT_RANGE"
# Project context
cat "$REPO_ROOT/CLAUDE.md" 2>/dev/null | head -200
If git diff "$COMMIT_RANGE" returns empty output, inform the user:
"No changes found in commit range
<commit-range>. Nothing to document."
And stop — do not dispatch the agent.
Inline dispatch is required — dso:doc-writer is an agent file identifier, NOT a valid subagent_type value. The Agent tool only accepts built-in types (general-purpose, Explore, Plan, etc.).
Read agents/doc-writer.md inline and dispatch as subagent_type: "general-purpose" with model: "sonnet". Pass the agent file content verbatim as the prompt, appending the context below.
Agent tool:
subagent_type: "general-purpose"
model: "sonnet"
prompt: |
{verbatim content of ${CLAUDE_PLUGIN_ROOT}/agents/doc-writer.md}
--- PER-RUN CONTEXT ---
context:
epic_context: |
## Commit Range
<commit-range>
## Recent Commits
<output of git log --oneline for the range>
## Project Context (from CLAUDE.md)
<first 200 lines of CLAUDE.md, or "Not available">
git_diff: |
<full output of git diff for the commit range>
If the git diff is very large (>10,000 lines), warn before dispatching:
"Warning: git diff is large ( lines). The doc-writer agent may truncate context. Consider narrowing the commit range."
After the doc-writer agent returns, parse its output and report results to the user.
Documentation update: No changes needed
Reason: <reason from agent>
Gates evaluated:
No-Op Gate: PASS (fired — no behavioral change)
User Impact: FAIL
Architectural: FAIL
Constraint: FAIL
Documentation updated
Files modified:
- <file path> — <brief description of change>
- ...
Gates that fired:
User Impact: <PASS/FAIL>
Architectural: <PASS/FAIL>
Constraint: <PASS/FAIL>
If the agent reported any CLAUDE.md suggested changes, display them to the user:
CLAUDE.md Suggested Changes (requires manual review):
Section: <section>
Current: <current text>
Proposed: <proposed change>
Present the breakout notification to the user and ask for confirmation before treating the run as complete.
Report the error and suggest narrowing the commit range or running again.
git diff errors out, report the error and stop.