Prime Agent Delegation Protocol
Detailed protocol for Prime Agent task delegation including decision trees, delegation matrix, and best practices for orchestrating multi-agent workflows.
The Phenom App uses a multi-agent system to coordinate complex development work. Rather than having a single entity handle all aspects of a task, specialized agents are delegated specific responsibilities, creating an efficient division of labor.
The system is built on these core principles:
Role: Project coordinator and orchestrator Responsibilities:
Key Principle: Prime Agent orchestrates rather than executes directly. Work is delegated to specialists.
Role: Code implementation and feature development Responsibilities:
Skills: Full-stack development, system architecture, problem-solving
Role: Quality assurance and code standards Responsibilities:
Skills: Code analysis, system design, testing methodology
Role: Testing and validation Responsibilities:
Skills: Test design, debugging, system analysis
Role: Documentation and knowledge management Responsibilities:
Skills: Technical writing, documentation tools, clarity
Role: Process and deployment management Responsibilities:
Skills: DevOps, deployment automation, process management
The Prime Agent should delegate work in these scenarios:
| Scenario | Delegate To | Reason |
|---|---|---|
| Code needs investigation | QA Engineer | Specialized debugging skills |
| Feature needs implementation | Feature Developer | Coding expertise required |
| Code quality needs checking | Code Reviewer | Quality assurance role |
| Tests need creation | QA Engineer | Testing methodology expert |
| Deployment needed | Workflow Enforcer | Infrastructure knowledge |
| Documentation required | Technical Writer | Documentation expertise |
| Pre-deployment validation | Workflow Enforcer | Process verification role |
DO NOT DO:
INSTEAD:
When one agent completes work and hands off to another:
Example Handoff:
QA Engineer → Feature Developer
Investigation complete for Issue #26 (Font display issue)
FINDINGS:
- Root cause: Docker cache issue with base image
- Node modules stale in container
- Affects all subsequent rebuilds
RECOMMENDED ACTION:
- Update Dockerfile to clear cache
- Add cache busting mechanism
- Test with fresh Docker build
ARTIFACTS:
- Test report: ./test-results/docker-investigation.log
- Docker commit: a1b2c3d
Agents report status to Prime Agent:
Issues requiring Prime Agent attention:
Escalation Template:
Escalation to Prime Agent
ISSUE: [Clear problem statement]
SEVERITY: [Critical/High/Medium/Low]
IMPACT: [What's blocked or at risk]
ROOT CAUSE: [Why this issue exists]
PROPOSED RESOLUTION: [Recommended fix]
NEEDED FROM PM: [Decision or action required]
Prime Agent
↓
└─ Delegate to QA Engineer: "Investigate Issue #XXX"
├─ QA Engineer investigates and documents root cause
├─ QA Engineer reports findings to Prime Agent
│ ↓
└─ Prime Agent delegates to Feature Developer: "Fix Issue #XXX"
├─ Feature Developer implements fix
├─ Feature Developer tests locally
├─ Feature Developer prepares PR
│ ↓
└─ Prime Agent delegates to Code Reviewer: "Review PR #XXX"
├─ Code Reviewer validates fix
├─ Code Reviewer approves or requests changes
│ ↓
└─ Prime Agent delegates to Workflow Enforcer: "Validate and merge"
├─ Workflow Enforcer runs pre-deployment checks
├─ Workflow Enforcer merges PR
└─ Workflow Enforcer confirms deployment
Prime Agent receives feature request
↓
└─ Prime Agent creates GitHub issue with detailed specification
├─ Specification includes acceptance criteria
├─ Specification includes testing requirements
│ ↓
└─ Prime Agent delegates to Feature Developer: "Implement Feature #XXX"
├─ Feature Developer breaks down work
├─ Feature Developer implements feature
├─ Feature Developer tests locally and in Docker
├─ Feature Developer creates PR
│ ↓
└─ Prime Agent requests stakeholder approval on test server
├─ Stakeholder reviews and approves
│ ↓
└─ Prime Agent delegates to Code Reviewer: "Review PR #XXX"
├─ Code Reviewer validates implementation
├─ Code Reviewer approves changes
│ ↓
└─ Prime Agent delegates to Workflow Enforcer: "Validate and deploy"
├─ Workflow Enforcer runs final validation
├─ Workflow Enforcer merges PR
├─ Workflow Enforcer triggers deployment
│ ↓
└─ Prime Agent delegates to Technical Writer: "Document changes"
├─ Technical Writer creates release notes
├─ Technical Writer updates overview docs
└─ Technical Writer marks issue complete
Production issue detected
↓
└─ Prime Agent coordinates response
├─ Prime Agent delegates to QA Engineer: "Investigate production issue"
│ ├─ QA Engineer investigates impact
│ ├─ QA Engineer identifies root cause
│ └─ QA Engineer reports to Prime Agent
│ ↓
├─ Prime Agent assesses severity
│ ├─ If Critical: Emergency hotfix path
│ └─ If High/Medium: Standard fix path
│ ↓
└─ Prime Agent delegates to Feature Developer: "Create fix"
├─ Feature Developer implements fix
├─ Feature Developer tests thoroughly
├─ Feature Developer creates PR
│ ↓
└─ Prime Agent delegates to Code Reviewer: "Expedited review"
├─ Code Reviewer validates fix
├─ Code Reviewer approves
│ ↓
└─ Prime Agent delegates to Workflow Enforcer: "Deploy immediately"
├─ Workflow Enforcer deploys hotfix
├─ Workflow Enforcer confirms fix in production
│ ↓
└─ Prime Agent delegates to QA Engineer: "Verify fix"
├─ QA Engineer confirms issue resolved
├─ QA Engineer monitors for side effects
└─ QA Engineer reports resolution
Issue/Task Received
│
├─ Is it a bug in production?
│ YES → Production Issue Response Workflow
│ NO → Continue
│
├─ Is it a new feature?
│ YES → Feature Development Workflow
│ NO → Continue
│
├─ Is it a bug in development?
│ YES → Bug Investigation and Fix Workflow
│ NO → Continue
│
└─ Is it maintenance/documentation/other?
YES → Evaluate scope and delegate appropriately
NO → Escalate to Product Management
The agent system should evolve based on experience:
Last Updated: January 16, 2026 Version: 1.0 Status: Published
Detailed protocol for Prime Agent task delegation including decision trees, delegation matrix, and best practices for orchestrating multi-agent workflows.
Standard workflows for common development scenarios showing how multiple agents coordinate to deliver features, fix bugs, and maintain system quality.
Standardized communication formats and protocols for agent-to-agent handoffs, status reporting, and escalation in the multi-agent system.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
© 2026 Phenom Earth