Commit b3b2ab5
Revamp PR body/comments + record per-skill turns and cost (#782)
* Record per-skill turns/cost and surface in PR body + summary
Adds two capture steps that parse claude-code-action's execution
log (`/home/runner/work/_temp/claude-execution-output.json`) right
after each skill invocation, BEFORE the next one overwrites the
shared file. Exposes `turns`, `cost_usd`, and `permission_denials`
as step outputs for downstream use.
Surfaces the data in two places:
1. PR body: new "Run cost" subsection inside the upstream-release-
docs marker block. Per-session rows plus a Total row when both
sessions reported. Applies to both pull_request and
workflow_dispatch runs.
2. workflow_dispatch summary comment: adds Turns and Cost columns
to the existing step table, plus a Total row summing both
sessions.
Useful for tracking per-release spend ($6 baseline) and catching
regressions -- e.g. a release that suddenly takes 10x the turns is
visible at a glance rather than requiring a drill-down into the
Actions Step Summary.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Reorganise PR body and comments for scannability
Ground-up redesign of everything the workflow posts on a PR.
Previous output read as three authors writing on the same page
(log formatter + release notes + systems docs), with no visual
hierarchy and a lot of process lore competing with actionable
info. Feedback after PRs #779 and #780.
Key structural shift: the PR body is the single source of truth
for state. Comments are point-in-time events only. Process lore
goes behind <details>.
Changes:
**PR body** (rewritten end-to-end)
- New H2: "Docs update for <project> <tag>" replaces the
process-descriptive "Content additions by upstream-release-docs".
- New "At a glance" table with 6 rows: Upstream (linked compare),
Hand-written changes, Reference assets, Gaps, Release
contributors, Action required. Answers the 5 questions a
reviewer actually asks in < 5 seconds.
- Single top-of-section alert (at most one), ordered by severity:
CAUTION for autogen-path drift, NOTE for NO_CHANGES.md, NOTE
for silent run. Never stacked.
- Autogen drift promoted from inline [!WARNING] paragraph to
[!CAUTION] at the top with a bulleted revert list -- it's a
merge-blocker, should look like one.
- "Review guidance" paragraph deleted. The one operational claim
("reference files are auto-synced") is in the At-a-glance
"Reference assets" row.
- "Release contributors" section dropped when everyone got
auto-assigned (GitHub's sidebar already shows them). Only
rendered as "Additional release contributors" when overflow
@-mentions need a target.
- "Run cost" table kept visible, not buried in <details>, per
request.
- Process narrative ("Two Claude Opus sessions...", auto-synced
paths, Helper-prompt convention) collapsed into a single
<details> block at the bottom.
- Compare-failure warning moved from a top-of-section [!WARNING]
block into the At-a-glance "Release contributors" cell.
**Bootstrap PR body**
- Collapsed from two paragraphs to one line ("Manually dispatched
by @x. Workflow run: ..."). Mechanism narration deleted.
**Pre-skill placeholder comment** (workflow_dispatch only)
- From a two-paragraph explanation + parenthetical meta-note
("this comment exists because track_progress isn't supported
on workflow_dispatch") to a single line: "Generating docs for
<project> <tag>... (run)".
**Post-skill summary comment** (workflow_dispatch only)
- Table replaced with a one-line status: "Done · 93 turns · $6.04
· run · see PR body for details". On failure, identifies which
step died. Duplicative detail (conclusions, commit counts) was
already in the PR body.
- Dropped "Skill commits produced" row -- the at-a-glance
"Hand-written changes" cell covers it.
**Augmentation failure comment**
- Wrapped in [!CAUTION] alert, compressed to two lines with the
exact retry gh command inline (not a hand-wavy "retry via the
workflow" pointer).
**Autogen-touch step (`detect-autogen`)**
- Now emits `touched` output (comma-separated paths) directly
instead of pre-formatting a warning block. The Augment step
composes the alert itself. Cleaner separation of concerns.
Unchanged: reviewer assignment logic, skill prompts, autofix
step, concurrency config.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 74b532c commit b3b2ab5
1 file changed
Lines changed: 301 additions & 102 deletions
0 commit comments