/sd0x-dev-flow:runbookfrom sd0x-dev-flow
Generates and updates feature release runbooks from existing docs and codebase. Creates deployment checklists, release handbooks, and operational guides with staleness validation.
Ships in sd0x-dev-flow. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
| Scenario | Alternative |
|---|---|
| Incident response runbook | v2 (not yet implemented) |
| Code review | /codex-review-fast |
| Architecture design | /architecture |
| Tech spec writing | /tech-spec |
| Request tracking | /create-request |
/runbook # Auto-detect feature, create or update
/runbook <feature-keyword> # Specify feature
/runbook --update # Force update mode
/runbook --check # Read-only staleness validation
/runbook --request <path|title> # Specify target request (multi-request features)
sequenceDiagram
participant U as User
participant S as /runbook
participant FR as Feature Resolver
participant CB as Codebase
participant RB as runbook-release.md
U->>S: /runbook [feature] [--update|--check] [--request path]
S->>FR: node scripts/resolve-feature.js
FR-->>S: {key, doc_inventory, source sets}
S->>S: Mode dispatch + Request selection
alt Create Mode
S->>CB: Read current_authority + requests/*.md
S->>CB: Scoped discovery (5-priority cascade)
S->>RB: Write runbook-release.md from template
else Update Mode
S->>RB: Read existing runbook + provenance
S->>CB: Compare current state vs provenance SHAs
S->>RB: Edit changed sections only
else Check Mode
S->>RB: Read existing runbook + provenance
S->>CB: Validate per-section SHAs
S-->>U: Report: Fresh/Stale/Missing/Unknown
end
Resolve feature using the 5-level cascade:
The wrapper, not the CLI directly: resolve-feature.js owns the failure payload, so the full
shape with scan_error: true arrives however the CLI fails — a nonzero exit, a signal, a partial
write, a payload that is not the agreed shape. (It cannot survive node itself being unavailable:
nothing running under node can. What it removes is the CLI's failure domain, not the
interpreter's.) Calling the CLI with || echo '{}' produces a payload the gate below cannot
recognise as a failure.
Decide the branch yourself, then run one command. This skill grants Bash(node:*), which
matches a direct node … invocation and nothing else — a shell if/[ … ]/$(…) compound is not
a node command and cannot run here. Parse $ARGUMENTS first (Step 1 below), then issue exactly
one of:
node scripts/resolve-feature.js --feature <the feature key from $ARGUMENTS>
node scripts/resolve-feature.js
Use the first when $ARGUMENTS carried a positional feature key, the second otherwise. Pass the key
as a separate argv token — never interpolate it into a larger shell expression.
| Source | Mapping |
|---|---|
/runbook auth | Positional key auth → --feature auth (two separate argv tokens) |
/runbook (no arg) | No --feature, resolver uses branch/diff/fallback |
/runbook --check | No --feature, parse flags only |
| Step | Action |
|---|---|
| 1 | Parse $ARGUMENTS for feature key or --check/--update/--request flags |
| 2 | Run feature resolver, get key, doc_inventory, and the four source sets (current_authority, design_records, work_records, history_records) |
| 2b | If scan_error !== false, stop — not === true: a payload missing the field is a failure too. See the gate below |
| 3 | Check for runbook-release.md specifically in feature directory (not any runbook-*.md) |
| 4 | Determine mode: create (runbook-release.md absent) / update (runbook-release.md exists) / check (--check flag) |
scan_errorgate. Gate onscan_error !== false, not onscan_error === true. When it is not exactlyfalsethe four source sets are unknown, not empty — the corpus could not be enumerated (unreadable directory, broken taxonomy, no repository), or the resolver never ran and a shell fallback supplied a payload with no such field at all.{}is the shape that made the stricter test useless: it has noscan_error, so=== trueis false and the gate passes a payload that contains nothing. Do not proceed as though the feature has no authority documents — report and take the ⚠️ Need Human exit. Akeymay still be present, so a non-nullkeyis not evidence the sets are complete.
Note: Mode dispatch keys off the specific file runbook-release.md, not any runbook-typed doc in doc_inventory. A feature may have runbook-deploy.md (a different topic) without triggering update mode for the release runbook.
| Condition | Behavior |
|---|---|
--request specified | Use specified request |
| Single active request | Auto-select |
| Multiple active requests | AskUserQuestion: list requests, let user choose |
| No active requests | Use most recent request (warn) |
Use scoped discovery cascade — narrow to wide, with confidence degradation:
| Priority | Scope | Confidence |
|---|---|---|
| 1 | Request Related Files paths | High |
| 2 | current_authority — code, rules/, and the docs that claim to be current | High |
| 3 | design_records (tech spec, architecture) | Medium — intent only, mark steps unverified |
| 4 | Feature-local paths (docs/features/{feature}/) | Medium |
| 5 | Repo-wide grep | Low (tag results) |
A P1 path is classified before it is used. Related Files is High confidence because the
request author named those paths deliberately — not because a path in that table is exempt from the
role split. Resolve each one first: a path landing in design_records (a tech spec, an architecture
doc) is treated as P3 — Medium, marked unverified — even though it arrived via P1. Otherwise the
row the split removed comes straight back through the front door, since a request's Related Files
table routinely names 2-tech-spec.md.
Priorities 2 and 3 used to be one row reading "canonical docs (tech-spec, architecture) — High", which is the confusion this feature exists to remove: a tech spec is a design record, and a runbook built from one describes a procedure that may never have been built.
See references/discovery-heuristics.md for per-section mapping.
When mining configs/workflows/logs into committed markdown:
| Prohibited | Replacement |
|---|---|
| API keys, tokens, secrets | ${ENV_VAR_NAME} placeholder |
| Webhook URLs with credentials | <webhook-url> symbolic reference |
| Internal-only endpoints | <internal-endpoint> placeholder |
| Database connection strings | ${DATABASE_URL} placeholder |
current_authority first — a runbook describes what operators will actually run, so the
sources are code, rules/, and the docs that claim to be current. Fall back to
design_records (tech spec, architecture) only for the intent behind a step, and mark any
step sourced that way as unverified in the provenance manifest: a design record may describe a
procedure that was never builtdocs/features/{feature}/requests/*.md — not by
filtering work_records. That set answers "is this document a work record", and a ticket that
resolves to some other role — authority Yes, or a Doc role naming one of the other three —
leaves it while staying an open ticket; selecting from the set would drop exactly that ticket's
AC, scope and related filesreferences/template.md<!-- runbook-provenance --> manifest with source SHAsdocs/features/{feature}/runbook-release.mdrunbook-release.md and parse <!-- runbook-provenance --> blocksources[].sha against git hash-object <file>--check)Read-only validation — does not modify the runbook file.
runbook-release.md and parse provenance manifestsources[].sha against current git hash-objectreferences/check-output.md)| Mode | Output | Location |
|---|---|---|
| Create | New runbook | docs/features/{feature}/runbook-release.md |
| Update | Updated sections | Same file, incremental edit |
| Check | Console report | stdout only (no file modification) |
node scripts/resolve-feature.js, and scan_error was exactly falsedoc_inventory (ancillary/runbook type)references/template.md)--check mode is read-only (no file writes)This skill produces .md output. Per @rules/auto-loop.md:
| Event | Action |
|---|---|
Create/Update writes .md | /codex-review-doc auto-triggered |
| Check mode (no writes) | No review needed |
| File | Purpose |
|---|---|
references/template.md | 9-section runbook template with provenance block |
references/discovery-heuristics.md | Scoped discovery cascade and per-section mapping |
references/check-output.md | --check mode output template and verdict logic |
Input: /runbook
Action: Auto-detect feature → create runbook-release.md → /codex-review-doc
Input: /runbook auth --check
Action: Read auth/runbook-release.md → validate provenance SHAs → output report
Input: /runbook --update --request docs/features/auth/requests/2026-04-01-login-fix.md
Action: Read existing runbook → diff stale sections → update → /codex-review-doc
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub sd0xdev/sd0x-harness --plugin sd0x-dev-flow102 skills in this plugin
/adrWrite an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature>/adr-<NNN>-<title>.md with a 3-digit zero-padded number. Handles the Superseded case: bidirectional linking when a new ADR replaces an old one. Use when: recording why an architectural approach was chosen, documenting a decision so it doesn't get re-litigated, marking a prior decision as superseded. Not for: feature-level technical design (use /tech-spec), task progress tracking (use /create-request), bulk backfill of historical decisions (a separate request — this skill writes one ADR at a time)./agentctl-setupInstall and set up the optional agentctl mod (task scope, refusal before execution, evidence that goes stale, model-free hand-over) — checks the environment, installs after approval, builds the first task line, optional deny rules, uninstall/architectureArchitecture design and documentation. Produces 3-architecture.md with component diagrams, data flow, integration points, and architecture decisions. Reads existing tech-spec as input. Use when: designing system architecture, documenting component interactions, creating architecture docs, producing 3-architecture.md. Not for: tech spec writing (use tech-spec), code implementation (use feature-dev), architecture consulting only (use codex-architect)./askContext-aware Q&A with auto context gathering. Use when: user has a quick question about codebase, git history, rules, docs, or skills during development. Not for: code changes (use feature-dev), code review (use codex-review-fast), deep research (use deep-research), full code trace (use code-explore). Output: structured answer with source attribution./best-practicesIndustry best practices conformance audit with mandatory adversarial debate. Produces audit artifact: verdict (OK/WARN/FAIL) + gap roadmap + debate proof. Use when: auditing current implementation against industry standards, checking compliance with best practices, benchmarking implementation quality, verifying a codebase meets a standard. Not for: broad research/discovery without audit target (use /deep-research), code review (use /codex-review), architecture design (use /codex-architect)./bug-fixBug fix workflow. Use when: fixing bugs, resolving issues, regression fixes. Not for: new features (use feature-dev), understanding code (use code-explore). Output: fix + regression test + review gate.Other plugins' skills for the same job