Skip to content

Add size-gated PR visual recap workflow - #1178

Draft
busbyk wants to merge 6 commits into
mainfrom
busbyk/visual-recap-pr-workflow
Draft

Add size-gated PR visual recap workflow#1178
busbyk wants to merge 6 commits into
mainfrom
busbyk/visual-recap-pr-workflow

Conversation

@busbyk

@busbyk busbyk commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Note

Draft — holding for upstream. The recap job still authenticates with the usage-billed ANTHROPIC_API_KEY because BuilderIO's reusable workflow doesn't accept a Claude subscription token yet. Once a PR for BuilderIO/agent-native#2741 lands, we'll switch that job to CLAUDE_CODE_OAUTH_TOKEN (tracked in #1179) and mark this ready for review.

Description

Adds a GitHub Actions workflow that generates an interactive visual recap for sufficiently large PRs, posted as a sticky PR comment linking to the Plan app (plan.agent-native.com, NWAC org). A gate job decides whether a PR justifies a recap — tiny diffs skip, huge diffs pass, and borderline diffs are judged by Claude Sonnet against the skill's "when to use it" criteria — and the recap itself runs on Claude Opus via BuilderIO's reusable workflow.

Related Issues

Key Changes

  • New .github/workflows/pr-visual-recap.yml with three jobs: size-gate (numeric fast paths + Sonnet judgment via the Claude Code CLI, billed to our Claude subscription through CLAUDE_CODE_OAUTH_TOKEN, with a visual-recap label to force a recap on any PR), visual-recap (calls BuilderIO/agent-native's reusable workflow with model: claude-opus-5), and publicize-recap (flips the published plan to public visibility so anonymous visitors to this public repo can view recap links — the recap CLI publishes org-only with no override).
  • On merged PRs the gate passes the close event through only when a recap already exists, so the plan gets marked merged without generating recaps for previously-skipped PRs.

How to test

Repo secrets PLAN_RECAP_TOKEN (org-scoped service token), CLAUDE_CODE_OAUTH_TOKEN (subscription, same token as #1180), and ANTHROPIC_API_KEY (recap job only, until upstream lands) are required. Open or update a PR: small diffs should skip with a notice in the Actions log, large or schema/RBAC-touching diffs should produce a recap comment, and adding the visual-recap label should force one. The recap link should open for a logged-out browser session.

Screenshots / Demo video

N/A

Migration Explanation

N/A — no schema or data changes.

Future enhancements / Questions

🤖 Generated with Claude Code

Generates an interactive visual recap for sufficiently large PRs via
BuilderIO's reusable pr-visual-recap workflow. A Sonnet-powered gate
decides whether a PR justifies a recap (with numeric fast paths and a
visual-recap force label), the recap itself runs on Claude Opus, and a
final job flips the published plan to public visibility so anonymous
visitors can view it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The recap job in BuilderIO's reusable workflow declares actions: write
and pull-requests: write; a caller granting less fails at startup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

The gate now judges borderline PRs by invoking Sonnet through the
Claude Code CLI with CLAUDE_CODE_OAUTH_TOKEN instead of calling the
Messages API with a usage-billed key, matching the subscription auth
adopted for @claude mentions in #1180. The recap job stays on
ANTHROPIC_API_KEY until BuilderIO/agent-native#2741 lets the reusable
workflow accept a subscription token.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@busbyk
busbyk marked this pull request as draft August 7, 2026 20:20
The reusable recap workflow declares the same pr-visual-recap-<PR>
concurrency group internally, so holding it from the caller made the
workflow call fail with "Canceling since a deadlock". The called
workflow's own group still cancels superseded recap runs per PR.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@busbyk busbyk added the visual-recap Force a visual recap on this PR label Aug 7, 2026
Exercises busbyk/agent-native@recap-claude-oauth-token with only
CLAUDE_CODE_OAUTH_TOKEN passed, to validate BuilderIO/agent-native#2741
end to end. Revert before merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@busbyk
busbyk marked this pull request as ready for review August 7, 2026 22:46
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Here's a visual recap of what changed:

Visual recap

Open the full interactive recap

@busbyk
busbyk marked this pull request as draft August 7, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

visual-recap Force a visual recap on this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant