Skip to content

feat(DST-1524): add the /triage-feedback skill - #5781

Open
sarahgm wants to merge 4 commits into
mainfrom
feat/DST-1524-triage-feedback-skill
Open

feat(DST-1524): add the /triage-feedback skill#5781
sarahgm wants to merge 4 commits into
mainfrom
feat/DST-1524-triage-feedback-skill

Conversation

@sarahgm

@sarahgm sarahgm commented Sep 3, 2026

Copy link
Copy Markdown
Member

Description

Adds /triage-feedback, a committed skill that makes one pass over all feedback on a PR from both places it arrives: GitHub review threads and Vercel preview toolbar comments. It triages every item on Validity, Severity and Action, renders the table as the approval gate, then replies and resolves in whichever system each item came from.

Two things shape the skill beyond the ticket's outline:

  • Two gates, not one. The triage table approves every reply and resolve. The push carries its own separate confirmation, because pushing is governed by a standing rule of its own. Steps 1 to 3 are read-only, nothing before step 5 changes a file, and nothing before step 7 leaves the machine.
  • Two modes. On your own PR you are the author and the feedback is work incoming. On someone else's you are the reviewer, so there is nothing to fix and the skill skips the apply and push steps entirely. Without that distinction the skill tries to commit fixes to a branch it does not own.

Visual and design comments route straight to needs-human instead of being judged from a screenshot, which is the v1 limit the ticket asks for.

Also adds the gh body-file convention to CLAUDE.md, per the ticket's scope. The trap worth recording is that gh api -f body=@reply.md posts the literal string @reply.md and exits 0, so a nonsense comment lands publicly with no error to catch. -F is the flag that reads the file.

Exercised against #5776, the popover clip-box fix, as a real respond-only run rather than only against the checks below. That PR has resolved and outdated threads on it, so it covers the isOutdated and already-resolved paths.

No changeset and no visual regression run: this touches no UI files and no published package. The sibling skill PRs #5778 and #5780 carry no changeset either.

Closes DST-1524

Merge order

Two known conflicts with PRs already in flight, both in files this branch deliberately leaves alone:

  1. .claude/README.md currently requires confirmation to be step 1 of a skill's workflow. This skill gates at steps 4 and 6, which is exactly what feat(DST-1522): add the /create-ticket skill and correct CLAUDE.md's Jira section #5778 and feat(DST-1523): add the /pick-up skill #5780 each amend that rule to permit, in different wordings. Adding a third edit to the same line would turn one conflict into three, so land feat(DST-1522): add the /create-ticket skill and correct CLAUDE.md's Jira section #5778 or feat(DST-1523): add the /pick-up skill #5780 first and then rebase. Step 4's reference to .claude/README.md depends on the same ordering.
  2. CLAUDE.md gains a ## GitHub CLI section at the same location ci(DST-1526): lint docs prose with Vale in pre-commit and CI #5779 edits. Expect a conflict with whichever of the two merges second.

Test Instructions

Every acting step sits behind an approval gate, so it is safe to run as far as the table and stop.

  1. Run /triage-feedback 5776 against someone else's PR. Confirm the mode line reads respond-only, the table lists every unresolved thread, and nothing is offered to apply or push.
  2. Run /triage-feedback on a branch of your own that has an open PR. Confirm the mode reads author and that the plan below the table names how many fixes and which files.
  3. Choose Stop at the table both times. Confirm nothing was replied to, resolved, committed or pushed.
  4. Spot-check the two API calls the skill leans on:
    • the step 2 GraphQL query returns isResolved, isOutdated and pageInfo.hasNextPage
    • gh api -H "Accept: application/vnd.github.raw" "repos/marigold-ui/marigold/contents/<path>?ref=<sha>" returns plain source rather than base64

Breaking Changes

No

Checklist

  • Storybook preview and Marigold docs preview are available
  • Stories added/updated (with component-test tag where applicable)
  • Unit tests added/updated
  • Component documentation added/updated (if it exists)
  • Accessibility reviewed against ARIA APG (for new/changed interactive components)
  • Visual regression tests updated (for UI changes)
  • Changeset added (pnpm changeset)

Make one triage pass over PR feedback from both GitHub review threads
and Vercel preview toolbar comments, then reply and resolve in whichever
system each item came from.

Two gates: the triage table approves every reply and resolve, and the
push is confirmed separately because it is governed by a rule of its own.

Also adds a GitHub CLI section to CLAUDE.md. Bodies go in a file, never
an inline shell string, and 'gh api -f body=@file' posts the literal
path and exits 0 where '-F' reads the file.
…feedback

Four defects found by running the skill against PR 5776, a PR reviewed
but not authored by the runner.

- Add an author/respond-only mode, set in step 1 from the PR author.
  Respond-only skips the apply and push steps, which assumed the runner
  owned the branch and would otherwise try to commit fixes to someone
  else's PR.
- Add 'unassessed' to Validity. Every item must carry all axes, but
  visual items must not be judged, so Validity had no legal value and
  the two rules contradicted each other.
- Read items against the PR head via gh pr diff and a ref-pinned
  contents call, not the worktree, which is a different branch in
  respond-only mode.
- Add a Turn column for who spoke last, so a thread already answered and
  waiting on the runner is distinguishable from unaddressed feedback.

Also records that gh api URLs containing '?' must be quoted, since zsh
globs them and fails before gh runs.
- Declare the five Vercel MCP tools in allowed-tools. The list named the
  GitHub half of the skill only, so the one structural guardrail
  described half of what the skill actually calls.
- Implement --github and --vercel. They were documented in Usage and
  handled nowhere, so both were silently no-ops.
- Give the mode table a no-PR row. Mode keys off who owns the branch,
  not off who opened a PR, so a branch whose previews already carry
  feedback is author mode with the GitHub source absent. This also
  removes the contradiction with the matching edge case.
- Stop calling your own un-checked-out PR respond-only. It is author
  mode without apply: replies do not need the code, fixes do.
- Head the triage table 'Column' rather than 'Axis', since Turn is
  thread state rather than a judgement.
…athers

The contents call returned a JSON envelope with the source base64-encoded in
`.content`, so the one step whose job is reading code at the PR head could not
read it. Send the raw Accept header instead.

Every gather call was capped and none was paged, so a pass could silently drop
feedback and still present a complete-looking table. The query now asks for
`hasNextPage` and `comments.totalCount`, the Vercel call passes `limit`
explicitly, and step 4 reports a partial gather on the mode line.

Smaller corrections in the same pass: step 1 no longer offers a checkout it has
no tool for and that would break the read-only invariant of steps 1 to 3, a
fixed row now earns a reply whichever way Turn points, the reply-only path stops
citing a SHA that only exists locally, the changeset condition covers `docs/`,
and two unused `allowed-tools` entries are gone.
@changeset-bot

changeset-bot Bot commented Sep 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7e0975b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
marigold-docs Ready Ready Preview Sep 3, 2026 11:42am UTC
marigold-storybook Ready Ready Preview Sep 3, 2026 11:42am UTC
1 Skipped Deployment
Project Deployment Actions Updated
marigold-production Ignored Ignored Sep 3, 2026 11:42am UTC

Request Review

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