design-reviewer: dispatch on area:design-review label, not just designer-authored PRs #82
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#82
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
User story
As the operator, I want the
design-revieweragent to pick uparea:design-reviewtickets (or labelled issues) automatically, sothat a Penpot handoff from
designergets reviewed without memanually invoking the agent.
What happens today
design-revieweronly fires on one trigger: a PR authored bydesignerwithreview_requested(routed viasrc/webhook-routing.ts:44). For the common case — designerproduces a Penpot handoff as a comment on an
area:designissue,not a code PR — there is no trigger at all. The designer skill
itself says so:
So the operator has to reset / manually kick the agent, or the
handoff sits unreviewed. Observed today on #62 in a full end-to-end
smoke — designer landed a clean handoff comment, design-reviewer
never fired.
Why this matters
area:designrouting todesigneris already in place (#56); thesymmetric path for
design-revieweris missing. Without it, thedesign flow is half-automated.
Proposed design — label-based
Add
area:design-reviewto the label scheme (pink#be185dorsimilar — pair it with
area:design). Route it inwebhook-routing.ts:The
designerskill's handoff step adds the label to the issueon completion (right after posting the handoff comment). The
existing
issues.labeledhandler(
src/webhook-handlers.ts:handleIssueLabeled) picks it up anddispatches to
design-reviewer.Pros:
issues.labeledrouting.whether a handoff has been reviewed (label still present ⇒ no).
issue to force a review pass.
Cons:
design-reviewermust clear the label on completion, elsere-adding any other label re-fires. That's the same
"route on the newly-added label only" rule we already have in
handleIssueLabeled, so it's safe by construction.Acceptance criteria
Label & routing
area:design-reviewlabel tolabels/scheme (hexdistinct from
area:designbut in the same pink family forgrouping — e.g.
#be185d).webhook-routing.ts:LABEL_AGENT_MAPmaps it todesign-reviewer.design-revieweragent'sreviewskill knows how to startfrom a Penpot deep-link (pulled from the latest
designerhandoff comment on the issue) instead of from a PR.
Designer skill — handoff marker
skills/design-implement.mdworkflow: after posting thehandoff comment, call
mcp__forgejo__add_issue_labels(..., labels=[ID for area:design-review]).The skill already knows how to resolve label IDs via
list_repo_labels.Design-reviewer skill — cleanup
skills/design-review.mdworkflow: on completion, callmcp__forgejo__remove_issue_labels(..., labels=[ID for area:design-review]).Prevents re-firing when the operator edits other labels
later.
Tests
webhook-routing.test.ts— assertarea:design-reviewroutes to
design-reviewer.webhook-handlers.test.ts— assert dispatch fires only onthe newly-added label, same rule as
area:design.Smoke
area:design-reviewto #62 manually →
design-reviewerpicks it up → posts avisual-defect review comment → removes the label.
Out of scope
up" chain. The intermediate label step keeps the operator in
the loop (they can see the handoff, decide whether review is
warranted). Auto-chaining is a follow-up if manual label flip
feels friction-y in practice.
design-reviewerfeedback →designer re-iterates). Today's scope is first-pass review only.
References
#issuecomment-5604.
src/webhook-routing.ts:24— existing label map (area:designonly).
src/webhook-handlers.ts:handleIssueLabeled— handler to extend.Dependencies
main./cancelendpoint: accept anagentparam instead of cancelling the first busy worker #87