feat(foreman): label/assignee heuristics driven by agents.json #452
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#452
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 foreman's label-suggestion regex rules and assignee-fallback table to live in
agents.json, so that I can teach foreman new labels (e.g.area:db,area:auth) and route them to the right agent type without editingdomain/agent/foreman.ts.Why:
foreman.ts:652-671has hardcoded regexes (design|penpot|ui,secur|auth,dashboard|admin,api|endpoint,test|spec) and priority-ordered assignee picks (design→designer, security→reviewer, default→dev). Each new agent type or area requires a code edit.Acceptance criteria
Schema
agents.json::foreman.label_rules: Array<{ pattern: string; label: string }>— case-insensitive regex matched against issue bodyagents.json::foreman.assignee_rules: Array<{ when_label?: string; when_pattern?: string; assign_to: string }>— first match wins;assign_tois an agent type nameagents.json::foreman.default_assignee: string— fallback when no rule matches (current default:boss)Code
foreman.ts::suggestLabelsandsuggestAssigneeread from resolved config (not const arrays in source)Out of scope
References
apps/server/src/domain/agent/foreman.ts:652-671docs/foreman.md