Agent Personas & Context
Relevant source files
The following files were used as context for generating this wiki page:
- internal/agents/README.md
- internal/agents/project-manager-context.md
- internal/agents/documentation-agent-context.md
- internal/agents/infrastructure-agent-context.md
- internal/agents/review-agent-context.md
- internal/agents/docs-agent-context.md
- internal/agents/test-agent-complete-1762065705556-context.md
The Agent Personas & Context system provides a specialized, hierarchical architecture for autonomous agents operating within the eng-platform. By transitioning from a monolithic configuration to a split model involving Core and Specialized contexts, the system achieves a significant reduction in token usage (approximately 60-71%) and faster agent initialization. This modularity ensures that each agent operates with a precise understanding of its role, responsibilities, and technical domain.
Sources: internal/agents/README.md:1-20
Hierarchical Context Architecture
The architecture is built on the principle of loading only what is necessary for a specific task. Agents load a base "Core" context containing universal standards and then append a "Specialized" context tailored to their specific function.
Context Components
- Core Context (CLAUDE.md): Contains universal information required by all agents, including mandatory execution gates, project identity, and quick references.
- Specialized Contexts: Domain-specific files (e.g.,
database-agent-context.md,infrastructure-agent-context.md) that detail agent-specific workflows, patterns, and performance targets.
Sources: internal/agents/README.md:22-44
Context Loading Flow
The following diagram illustrates the two-phase loading strategy where the Project Manager spawns an agent and the Progressive Context Loader injects relevant domain knowledge.
The diagram shows how universal, specialized, and pattern-based knowledge is combined during agent initialization.
Sources: internal/agents/README.md:58-95
Specialized Agent Personas
The system defines several distinct personas, each with unique responsibilities and technical expertise.
| Agent Persona | Primary Responsibilities | Key Expertise |
|---|---|---|
| Project Manager | Sprint parsing, task scheduling, conflict resolution | Orchestration & IPC Coordination |
| Infrastructure | VS Code middleware, service orchestration, CI/CD | TypeScript Architecture & Node.js |
| Documentation | Chain of Thought validation, API docs, README maintenance | Technical Writing & Doc Generators |
| Review | Code quality, security scanning, performance validation | Security & Best Practices |
Sources: internal/agents/project-manager-context.md:3-12, internal/agents/infrastructure-agent-context.md:10-21, internal/agents/documentation-agent-context.md:14-25, internal/agents/review-agent-context.md:10-16
The Project Manager (Orchestrator)
The Project Manager acts as the central coordinator for the autonomous sprint. It parses sprint documentation into a Directed Acyclic Graph (DAG) to manage task dependencies and maximize parallelization.
The sequence shows the lifecycle of a task from parsing to agent completion under PM supervision.
Sources: internal/agents/project-manager-context.md:14-38, internal/agents/project-manager-context.md:113-134
The Infrastructure Agent
Focused on VS Code extension middleware and service orchestration, the Infrastructure persona follows a mandatory Pre-Task Analysis Protocol (Pattern-TASK-ANALYSIS-001) to identify integration points and performance requirements before implementation.
Sources: internal/agents/infrastructure-agent-context.md:10-39
Operational Protocols
Sprint Task Lifecycle (Pattern-TRACKING-001)
All agents must adhere to the automated lifecycle protocol for task tracking within the ACTIVE_SPRINT.toml.
- Start Task: Update status to
in_progress. - Complete Task: Update status to
completedand add acompleted_date. - Blocked/Deferred: Update status to
deferredwith a reason.
Sources: internal/agents/docs-agent-context.md:21-74, internal/agents/review-agent-context.md:33-82
Chain of Thought Standard
The Documentation Agent enforces the Chain of Thought (CoT) standard across the codebase. Every significant logic block must include:
- DESIGN DECISION: The chosen approach.
- WHY: The reasoning behind the decision.
- REASONING CHAIN: A numbered, step-by-step thought process.
- PATTERN: Reference to applicable patterns.
Sources: internal/agents/documentation-agent-context.md:28-40
/**
* DESIGN DECISION: Use embeddings for semantic pattern matching
* WHY: Keyword matching achieves only 60% accuracy; semantic achieves 87%
* REASONING CHAIN: 1. Capture semantic meaning... 2. Cosine similarity...
*/
Sources: internal/agents/documentation-agent-context.md:43-57
Performance and Quality Targets
Each agent operates under specific performance metrics to ensure platform stability.
| Persona | Metric | Target |
|---|---|---|
| Infrastructure | Service Response Time | <500ms |
| Review | Cyclomatic Complexity | <10 per function |
| Review | Lint Warnings | 0 warnings |
| Documentation | Chain of Thought | 100% compliance |
| Project Manager | Dependency Graph Generation | <1s for 100 tasks |
Sources: internal/agents/review-agent-context.md:86-97, internal/agents/infrastructure-agent-context.md:101-104, internal/agents/project-manager-context.md:79-81
Conclusion
The Agent Personas & Context system enables high-velocity, autonomous development by providing specialized environments for AI agents. By utilizing a hierarchical context structure and standardized operational protocols like Pattern-TRACKING-001 and the Chain of Thought standard, the platform ensures that agent actions are efficient, documented, and aligned with project-wide engineering standards.