You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Give skill gh access, auto-fix formatting, tighten GAPS.md contract (#774)
Four concrete hardenings to make upstream-release-docs PRs
land-ready without human pre-merge cleanup:
1. Grant `gh` CLI to both skill invocations via claude_args
`--allowed-tools "Bash(gh:*)"`. GH_TOKEN is already in the job
env. Without this, Claude Code's default Bash allowlist blocks
gh and the skill has to work from commit messages only, missing
most of the "why" narrative that PR authors write at open time.
The skill is already designed (SKILL.md) to use gh release view,
gh pr view, gh api compare — we're just unblocking it.
2. Rewrite the Phase 2 step 4 instruction. Previously: "SKIP
writing the why/consumer narrative and append to GAPS.md" —
which guaranteed a "Gaps needing human context" section on
every substantive release. Now: fetch PR descriptions via gh,
write best-effort narrative directly in the docs, defer to
GAPS.md only when rationale demonstrably cannot be derived
from available sources.
3. Tighten the GAPS.md contract. Explicitly exclude environment
limitations (the skill's v0.23.1 run flagged "npm run build
blocked" as a gap — that's not a content gap, PR CI handles
it) and "not a gap" commentary. Require each entry to include
a paste-ready "Helper prompt for local Claude" block so a
reviewer can resolve the gap by pasting into their local
Claude Code rather than reverse-engineering what to ask.
Require no GAPS.md file at all when nothing is genuinely
deferred.
4. Add an auto-fix step after skill_review that runs
`npx prettier --write` and `npx eslint --fix` against
skill-touched files (scoped by git diff vs a pre-skill SHA,
excluding auto-generated reference paths). The skill sandbox
doesn't include these, so formatting drift was landing on PR
CI — v0.23.1 failed the Lint and format checks job on one
file. This matches the project's pre-commit hook behavior for
human contributions.
Also updated:
- Top-of-file comment block (was "Runs the upstream-release-docs
skill (3 passes)").
- The PR body template text at the previous "each ran twice
(three total passes)" line — stale since PR #764 split the
multi-pass inline design into two separate claude-code-action
invocations. Now describes the two-Opus-session architecture.
- The "fill them in before merging" review-guidance text now
points reviewers to the Helper prompt blocks.
- skill_review prompt now explicitly tells the editorial pass
not to touch GAPS.md / NO_CHANGES.md signal files.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
git commit -m "Apply prettier and eslint fixups to skill output"
679
+
fi
680
+
558
681
- name: Capture skill signal files
559
682
id: signals
560
683
run: |
@@ -684,7 +807,7 @@ jobs:
684
807
echo ""
685
808
echo "## Content additions by upstream-release-docs"
686
809
echo ""
687
-
echo "Source-verified against \`$REPO\` at tag \`$NEW_TAG\` (was \`$PREV_TAG\`). The \`upstream-release-docs\` and \`docs-review\` skills each ran twice (three total passes) before this update."
810
+
echo "Source-verified against \`$REPO\` at tag \`$NEW_TAG\` (was \`$PREV_TAG\`). Two Claude Opus sessions produced this update: a generation pass running the \`upstream-release-docs\` skill over all six phases, then a fresh-context editorial pass running \`docs-review\` over the changed files. Prettier and ESLint auto-fixes were applied afterward."
688
811
echo ""
689
812
if [ "$COMPARE_OK" != "true" ]; then
690
813
echo "> [!WARNING]"
@@ -701,7 +824,7 @@ jobs:
701
824
fi
702
825
echo "### Review guidance"
703
826
echo ""
704
-
echo "Machine-generated reference files under \`docs/toolhive/reference/cli/\`, \`static/api-specs/\`, and \`docs/toolhive/reference/crds/\` are synced or regenerated from upstream release assets (separate commit, titled \"Refresh reference assets\") and should be spot-checked only. The \"Add upstream-release-docs content\" commit contains hand-edited prose; review that one for accuracy, not just style. If the \"Gaps needing human context\" section is populated, the skill deferred those sections to a human; fill them in before merging."
827
+
echo "Machine-generated reference files under \`docs/toolhive/reference/cli/\`, \`static/api-specs/\`, and \`docs/toolhive/reference/crds/\` are synced or regenerated from upstream release assets (separate commit, titled \"Refresh reference assets\") and should be spot-checked only. Commits authored by the skill contain hand-edited prose; review those for accuracy, not just style. If the \"Gaps needing human context\" section below is populated, each entry includes a **Helper prompt for local Claude** that a reviewer can paste verbatim into their local Claude Code session to resolve the gap. Fill those in before merging."
0 commit comments