[FEATURE] Support expertise-aware delegation as a first-class agent behaviour
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Custom agents in .claude/agents/ have no structured way to declare their area of expertise or their knowledge of other available agents. When an agent receives a task outside its domain, delegation to a more appropriate agent relies entirely on natural language rules in the agent MD. These rules are not reliably honoured — the model's instinct to complete the immediate task overrides system-prompt-level behavioural constraints, regardless of how strongly they are worded.
Proposed Solution
Add structured frontmatter fields to agent MD files:
---
name: Erlich Bachman
description: Visionary pitch man and incubator impresario
expertise:
- brand strategy
- pitch craft
- naming
- investor relations
team:
- bertram-gilfoyle # systems, infrastructure, security
- richard-hendricks # algorithms, compression, architecture
- jared-dunn # operations, process, execution
- dinesh-chugtai # full-stack engineering
---
The harness would:
Classify the incoming task against the agent's declared expertise
If outside expertise, scan team members' MDs to find the best match
Route to that agent before the invoking agent's LLM turn begins
If no team member matches, fall back to the agent handling it directly with an explicit acknowledgement
Alternative Solutions
Natural language rules in agent MD: Already attempted. Not reliably honoured — the human turn overrides system prompt behavioural constraints.
tools: [Agent] restriction: Strips all execution tools from the agent, forcing delegation for everything. Too blunt — agents like Erlich legitimately need execution tools for in-expertise tasks (brand, narrative, naming work). This would break their in-domain capabilities.
UserPromptSubmit hook: Intercepts the prompt before the agent sees it and injects a routing decision. Produces correct routing but invisible routing — the agent never makes the decision itself, losing the relationship texture and character voice in the handoff. A workaround, not a solution.
Priority
Medium - Would be very helpful
Feature Category
Other
Use Case Example
Dinesh Chugtai is a full-stack engineer. A user asks him to review Terraform infrastructure code. Dinesh's expertise is application development, not infrastructure. With expertise-aware delegation:
The harness classifies "review Terraform infrastructure code" against Dinesh's declared expertise — no match
The harness scans Dinesh's team, finds Gilfoyle's expertise covers infrastructure
Gilfoyle receives the task and performs the review
Gilfoyle's response carries his relationship context with Dinesh — he notes who sent it, with appropriate commentary
Without this feature, Dinesh either does the review himself (wrong agent, weaker output) or ignores the delegation rule in his MD (unreliable).
Additional Context
This feature unlocks the relationship layer already defined in agent MDs. Relationship descriptions are reliable for shaping the texture of a response once the right agent is doing the work — but delegation needs to be solved first for that texture to land correctly. Expertise-aware delegation and relationship context are designed to work together: delegation gets the task to the right agent, relationship context shapes how that agent responds.
Multi agent setup where the requested feature would be useful: https://github.com/cliffano/tech-team-agents
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗