Repository navigation
Description
Summary
At task execution time, Trinity should inject a brief description of all agents the current agent has MCP access to — name, role, and capability summary from template.yaml — into the Trinity system prompt. This lets each agent know who it can delegate to without requiring manual updates to CLAUDE.md.
Context
Trinity already injects a small system-level prompt at task execution time (visible in admin settings → System Prompt). Currently this does not include peer agent awareness. Agents learn about available peers only if manually documented in their own CLAUDE.md.
The correct fix — discussed in the 2026-05-07 Flex your Agent call — is runtime injection: when a task fires, pull the list of agents accessible to this agent (via agent_permissions or agent-scoped MCP key), read their template.yaml descriptions, and append a compact peer-awareness block to the Trinity system prompt.
This is a prerequisite for reliable agent-to-agent delegation without agent-specific CLAUDE.md maintenance.
Acceptance Criteria
- On each task execution, Trinity assembles a list of agents the executing agent has MCP access to
- For each peer agent, Trinity reads its
template.yaml(specifically thedescriptionandcapabilitiesfields) - A compact peer-awareness block is appended to the Trinity system prompt injected at runtime
- The block is capped at a reasonable size (e.g. 500 tokens) and truncated gracefully for large fleets
- Agents with no peers receive no peer block (no injection overhead)
- Admin settings show the combined system prompt with peer block (existing preview feature)
Technical Notes
- Trinity system prompt is injected in
task_execution_service.py/agent_client.py— extend the prompt assembly there - Peer list: query
agent_permissionsfor the agent's permissions, or derive from agent-scoped MCP key context template.yamlis available in the agent container at/home/developer/template.yaml— readable viadocker execor cached from last agent start- Consider caching template.yaml descriptions in Redis or the DB to avoid per-execution Docker reads
- Aligns with Target Architecture Coordination Model: agents need peer awareness for proper delegation
Activity
vybe commentedon Jun 13, 2026
/claim
github-actions commentedon Jun 13, 2026
Claimed by @vybe. Label
status-in-progressadded.Next steps:
feature/701-<short-slug>Fixes #701fix(rooms): a reply outlives its waker, and a collaborator reads no i…
chore(enterprise): bump the enterprise submodule to ent#1129 (spare R…