feat(routing): hoist webhook-routing hardcoded maps to agents.json #450
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#450
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 an operator, I want label/author/skill routing rules driven by
agents.jsonper agent type, so that I can rename roles, add new agent types, or change which labels dispatch to which agent without editingapps/server/src/http/webhook-routing.ts.Why: today
LABEL_TO_ROUTE,AUTHOR_TO_REVIEWER,LABEL_TO_REVIEWER,REVIEWER_AGENTS,DESIGN_AGENTS,CODE_FLOW_AGENTS,NON_DISPATCHABLE_TYPES,DEFAULT_REVIEWER_AGENT,SKILL_OVERRIDE_BY_AGENTare allconsts inwebhook-routing.ts:38-168. Adding "qa" or "translator" requires a code edit + redeploy.Acceptance criteria
Schema
agents.json::types.<TYPE>gains:dispatchable: booleanrole: "code" | "review" | "design" | "design-review" | "host"routes_labels: string[]— labels that dispatch issues to this typereviews_authors: string[]— PR authors whose PRs this type reviewsreviews_labels: string[]— labels that route review to this typeskill_overrides: Record<string, string>—event_kind→ skill namedefault_reviewer_type: stringadded at top level ofagents.jsonshared/config/webhook-config.tsupdated; defaults preserve current behaviourCode
LABEL_TO_ROUTE,AUTHOR_TO_REVIEWER,LABEL_TO_REVIEWER,DEFAULT_REVIEWER_AGENT,REVIEWER_AGENTS,DESIGN_AGENTS,CODE_FLOW_AGENTS,NON_DISPATCHABLE_TYPES,SKILL_OVERRIDE_BY_AGENTderived at config-load time from the resolvedagents.json(not in source asconsts)routeIssueLabel,routeReviewerForAuthor,routeReviewerForLabeletc. take config as parameter (or read from a singleton populated at load); behaviour identical to current hardcoded mapsTests
agents.json(mock) re-routes a label to a different agent type without touching sourceOut of scope
boss/dev/reviewer/designer/design-reviewer/foremanas default valuesReferences
apps/server/src/http/webhook-routing.ts:38-168config/agents.jsondocs/label-routing.md