Skip to content

feat(plugin): Gate PR visuals and source PR prompts from skills - #122

Merged
4ndreello merged 2 commits into
mainfrom
feat/pr-visual-evidence
Sep 25, 2026
Merged

4ndreello merged 2 commits into
mainfrom
feat/pr-visual-evidence

Conversation

@4ndreello

@4ndreello 4ndreello commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Adds a Visual Evidence section to the pr-writer skill, and makes skills/commit and skills/pr-writer the single source for the commit and PR sections of the general agent.

Until now the PR prompt said nothing about visuals. The worry with adding one is overuse, so the section defaults to none and only allows a visual when a reviewer would otherwise need to check out the branch to see the change. A table maps change types to evidence: screenshots for UI, a short GIF for interaction, real fenced output for CLI/TUI, Mermaid for a new multi-component flow, and nothing for refactors, config, deps, internal fixes or tests. Captures must come from the running app.

gh cannot upload attachments, so the section includes a recipe that pushes images to an orphan pr-assets branch through a temporary worktree and links them with blob/...?raw=true, which also renders on private repos. The recipe was run twice against a local bare remote: the first run created the orphan branch, the second appended to it, and the working branch stayed untouched. It has not been exercised against GitHub yet. Video stays out of reach for the agent: it hands back the file path and says the user has to drag it in.

The commit and pr-writer partials were hand-vendored copies of the global skills, so this change would have had to land twice. They now live in skills/, and scripts/copy-plugin.mjs renders the two sections from them through SKILL_PARTIALS, applying the adaptations that swap sentry-skills:commit, create-branch and the Claude co-author line. The partial is still needed because non-claude harnesses get the role prompt prepended and cannot load skills. The build fails if an adaptation stops matching or a skill reference survives, checked by editing the skill and watching the build throw. Apart from the source header, the Visual Evidence section and the gh api examples merging into one code block (as they already were in the skill), the generated general.md is unchanged.

general.md is now 15.5KB of its 16KB budget, which leaves little room for growth in that role.

PR descriptions had no guidance on screenshots, GIFs or diagrams, so
agents either skipped them where a reviewer needed one or could add
them everywhere. Add a Visual Evidence section to the pr-writer partial
that defaults to none, maps change types to the evidence that fits, and
gives a recipe for hosting images on an orphan pr-assets branch, since
gh cannot upload attachments.

Co-Authored-By: Claude <noreply@anthropic.com>
@4ndreello
4ndreello marked this pull request as ready for review September 25, 2026 01:43
The commit and pr-writer partials were hand-vendored copies of the
global skills, so every edit had to land twice. Move the skills into
skills/ as the single source and have copy-plugin.mjs render the two
general-agent sections from them, applying the adaptations that swap
references to skills the prompt cannot load. The build fails when an
adaptation stops matching, so a skill edit cannot silently ship a stale
or broken prompt.

Co-Authored-By: Claude <noreply@anthropic.com>
@4ndreello 4ndreello changed the title feat(plugin): Gate visual evidence in PR descriptions feat(plugin): Gate PR visuals and source PR prompts from skills Sep 25, 2026
@sonarqubecloud

Copy link
Copy Markdown

@4ndreello
4ndreello merged commit 65b1c1b into main Sep 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant