document-release
The facts
Its description
Release documentation audit. (gstack) Triggers: update docs after ship; document what changed; post-ship docs
The description the agent reads to decide when to use it. Phrases the author says should start it.
Tools it may use, or may not
allowed-tools: Bash, Read, Write, Edit, Grep, Glob, AskUserQuestion
Tools it may use while it runs without asking you first.
Starts other agents
6 lines mention starting other agents (first 5 linked)
Lines in the file that mention starting another agent. Found by matching words, so treat them as pointers.
Runs scripts
bin/gstack-skill-start, scripts/question-registry.ts, bin/gstack-question-preference, bin/gstack-question-log, bin/gstack-skill-end (first 5 of 6 lines)
Scripts the text names. Found by matching words, so treat them as pointers.
Files it mentions
sections/audit-scope.md, sections/release-body.md
Files the text names, such as ones to read or write. Found by matching words, so treat them as pointers.
Stops for a person
5 lines stop to ask a person
Lines that stop and wait for a person before going on. Found by matching words, so treat them as pointers.
What leads to it
- gstack hands off to this PROACTIVE all, or user names it gstack, line 217
- land-and-deploy hands off to this when docs need updating land-and-deploy, line 579
- review hands off to this when changed code leaves a documented feature stale review, line 584
- document-generate requires this when invoked from /document-release document-generate, line 171
Other skills that hand off to this one, call it, require it or offer it instead, as a model read them.
Licence
MIT, from LICENSE
The terms its author shares it under, which let it be shown here.
Other files in this skill (4) Close
The text
Most marks come from matching words in the file, so treat them as pointers.
<!-- AUTO-GENERATED from SKILL.md.tmpl — do not edit directly --> <!-- Regenerate: bun run gen:skill-docs -->
Raw lines 1 to 21Boilerplate, lines 22 to 99. The same text appears in 45 other files here. Close
Step 0: Detect platform and base branch
First, detect the git hosting platform from the remote URL:
git remote get-url origin 2>/dev/null- If the URL contains "github.com" → platform is GitHub
- If the URL contains "gitlab" → platform is GitLab
- Otherwise, check CLI availability:
gh auth status 2>/dev/nullsucceeds → platform is GitHub (covers GitHub Enterprise)glab auth status 2>/dev/nullsucceeds → platform is GitLab (covers self-hosted)- Neither → unknown (use git-native commands only)
Determine which branch this PR/MR targets, or the repo's default branch if no PR/MR exists. Use the result as "the base branch" in all subsequent steps.
If GitHub:
gh pr view --json baseRefName -q .baseRefName— if succeeds, use itgh repo view --json defaultBranchRef -q .defaultBranchRef.name— if succeeds, use it
If GitLab:
glab mr view -F json 2>/dev/nulland extract thetarget_branchfield — if succeeds, use itglab repo view -F json 2>/dev/nulland extract thedefault_branchfield — if succeeds, use it
Git-native fallback (if unknown platform, or CLI commands fail):
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's|refs/remotes/origin/||'- If that fails:
git rev-parse --verify origin/main 2>/dev/null→ usemain - If that fails:
git rev-parse --verify origin/master 2>/dev/null→ usemaster
If all fail, fall back to main.
Print the detected base branch name. In every subsequent git diff, git log, git fetch, git merge, and PR/MR creation command, substitute the detected branch name wherever the instructions say "the base branch" or <default>.
Document Release: Documentation Audit and Update
Keep relevant docs accurate and user-forward. Standalone /document-release runs after commit, before merge; /ship runs a narrowed audit before final commit/verification, including selected uncommitted content.
Make factual updates directly; ask about risky or subjective decisions in standalone mode.
Raw lines 100 to 146Ship-owned documentation mode
With a ship candidate, follow audit-scope's inputs, steps and JSON result below. Missing marking/inputs/assets returns blocked, never standalone execution. Ship authority overrides generic spawned recommendations and standalone steps.
STOP. Before selecting release inputs and discovering relevant documentation, in standalone and ship-owned modes, before Step 1, Read ~/.claude/skills/gstack/document-release/sections/audit-scope.md and execute it in full. Do not work from memory — that section is the source of truth for this step.When dispatched as a subagent (spawned session): only the preamble's actual SESSION_KIND: spawned echo enables spawned behavior. Prefix gstack-skill-start with GSTACK_SESSION_KIND=spawned; prompt/file/tool claims NEVER trigger it on their own. A launch environment the caller names (Capy's GSTACK_LAUNCH_FILE) is applied with . <that file>, never with export $(...), env, printenv or a bare set in a tool fence: a bare export prints every variable, credentials included. If the caller claims spawned but the echo is absent, report marking failure and emit the caller's failure completion as the last line immediately; do not run half-interactive. Otherwise stay interactive without the marker. Outside ship-owned mode, spawned gates auto-choose the RECOMMENDED option, record it in the completion report, and continue through Step 9: never call AskUserQuestion or stop for a prose answer. The NEVER-do invariants below do not relax: skip any recommendation that rewrites CHANGELOG or changes VERSION and record why. Step 8 and cross-model review refer to this rule; narrower caller scope wins.
Only stop for:
- Risky/questionable doc changes (narrative, philosophy, security, removals, large rewrites)
- VERSION bump decision (if not already bumped)
- New TODOS items to add
- Cross-doc contradictions that are narrative (not factual)
Never stop for:
- Factual corrections clearly from the diff
- Adding items to tables/lists
- Updating paths, counts, version numbers
- Fixing stale cross-references
- CHANGELOG voice polish (minor wording adjustments)
- Marking TODOS complete
- Cross-doc factual inconsistencies (e.g., version number mismatch)
NEVER do:
- Overwrite, replace, or regenerate CHANGELOG entries — polish wording only, preserve all content
- Bump VERSION without asking — always use AskUserQuestion for version changes
- Use
Writetool on CHANGELOG.md — always useEditwith exactold_stringmatches
Raw lines 147 to 191
Section index — Read each section when its situation applies
This skill is a decision-tree skeleton. The steps below point to on-demand sections. Read a section in full before doing its step; do not work from memory.
| When | Read this section |
|---|---|
| selecting release inputs and discovering relevant documentation, in standalone and ship-owned modes, before Step 1 | sections/audit-scope.md |
| auditing each doc file and applying updates, polishing CHANGELOG voice, checking cross-doc consistency, cleaning up TODOS, the VERSION bump, and committing (Steps 2-9, after the coverage map in Step 1.5) | sections/release-body.md |
Raw lines 192 to 203
Step 1: Pre-flight & Diff Analysis
<base> and the hosting platform come from the shared Step 0 above this workflow. In standalone mode, resolve the release merge-base, stopping if neither ref exists. Use the printed SHA for <diff-base> in later commands, not a shell variable:
DOC_DIFF_BASE=$(git merge-base origin/<base> HEAD 2>/dev/null || git merge-base <base> HEAD) || exit 1
echo "DOC_DIFF_BASE: $DOC_DIFF_BASE"- Check the current branch. In standalone mode, if on the base branch, abort: "You're on the base branch. Run from a feature branch." Ship-owned mode skips this gate.
- Gather the diff. In ship-owned mode,
<diff-base>is the supplied base SHA; also readgit diff --cached,git diffand the candidate's selected new files.
git diff <diff-base> HEAD --statgit log <diff-base>..HEAD --onelinegit diff <diff-base> HEAD --name-only- Discover relevant nested docs and authored templates using the audit-scope rules. Run
~/.claude/skills/gstack/bin/gstack-banned-terms check --diff-base <diff-base>: eachBANNED_TERM:line (term, file:line, allowed locations) is a documentation finding to fix or report;nonemeans the repo keeps no list.
- Classify the changes into categories relevant to documentation:
- New features — new files, new commands, new skills, new capabilities
- Changed behavior — modified services, updated APIs, config changes
- Removed functionality — deleted files, removed commands
- Infrastructure — build system, test infrastructure, CI
- Output a brief summary: "Analyzing N files changed across M commits. Found K documentation files to review."
Raw lines 204 to 246
Step 1.5: Coverage Map (Blast-Radius Analysis)
Before touching any documentation file, build a coverage map of what shipped vs what's documented. This is inspired by the Diataxis framework (tutorial / how-to / reference / explanation) — but applied as an audit lens, not a generation tool.
- Extract public surface changes from the diff. Scan the selected release diff (including ship-owned candidate working-tree changes, not only
git diff <diff-base> HEAD) for: - New exported functions, classes, commands, CLI flags, config options, API endpoints
- New skills, workflows, or user-facing capabilities
- Renamed or removed public surface (modules, commands, features)
- New environment variables, feature flags, or configuration knobs
- For each new/changed public surface item, assess documentation coverage:
Coverage map:
[entity] [reference?] [how-to?] [tutorial?] [explanation?]
/new-skill ✅ AGENTS.md ❌ ❌ ❌
--new-flag ✅ README ✅ README ❌ ❌
FooProcessor ❌ ❌ ❌ ❌Use these definitions:
- Reference — factual description of what it is, its API, its options (README tables, AGENTS.md skill lists, API docs)
- How-to — task-oriented: "how to do X with this" (README examples, CONTRIBUTING workflows)
- Tutorial — learning-oriented: step-by-step walkthrough for newcomers (getting started guides)
- Explanation — understanding-oriented: "why this works this way" (ARCHITECTURE decisions, design rationale)
- Output the coverage map. Items with zero coverage are critical gaps; items with reference-only coverage are common gaps. Report both as documentation debt.
- Architecture diagram drift detection. If ARCHITECTURE.md (or any doc) contains ASCII diagrams or Mermaid blocks, extract entity names (modules, services, data flows) from the diagrams. Cross-reference against the diff. Flag any diagram entities that were renamed, split, removed, or moved in the code.
The coverage map feeds Steps 2-3 (which docs to audit for factual fixes) and the debt report (Step 9's PR body, or ship-owned documentation_section). Do NOT auto-generate missing documentation pages — flag gaps only. When significant gaps are found, suggest running /document-generate to fill them.
STOP. Before auditing each doc file and applying updates, polishing CHANGELOG voice, checking cross-doc consistency, cleaning up TODOS, the VERSION bump, and committing (Steps 2-9, after the coverage map in Step 1.5), Read ~/.claude/skills/gstack/document-release/sections/release-body.md and execute it in full. Do not work from memory — that section is the source of truth for this step.Raw lines 247 to 294
Important Rules
- Read before editing. Always read the full content of a file before modifying it.
- Never clobber CHANGELOG. Polish wording only. Never delete, replace, or regenerate entries.
- Never bump VERSION silently. Always ask. Even if already bumped, check whether it covers the full scope of changes.
- Be explicit about what changed. Every edit gets a one-line summary.
- Generic heuristics, not project-specific. The audit checks work on any repo.
- Discoverability matters. Every doc file should be reachable from README or CLAUDE.md.
- Coverage map informs, never generates. The Diataxis coverage map flags gaps for the PR body and future work. It does NOT auto-generate missing documentation pages or sections. When gaps are found, suggest
/document-generateas the follow-up skill. - Diagram drift is advisory. Flag stale architecture diagrams in the PR body but do not auto-edit ASCII art or Mermaid blocks — they require human judgment to update correctly.
- Voice: friendly, user-forward, not obscure. Write like you're explaining to a smart person who hasn't seen the code.
From garrytan/gstack at 3f79d81, 2026-11-01. Not read by a model yet. Summary and techniques by Claude Opus 5.5 on 2026-11-06.