Agent Orchestration Protocol
How agents collaborate to complete roadmap tasks with comprehensive multi-dimensional verification.
Last Updated: February 2, 2026
Overview
This protocol defines how agents work together to complete tasks from the product roadmap. It ensures quality, consistency, and comprehensive verification across all dimensions (functionality, design, accessibility, security, performance, etc.) before any code is committed.
Key Principle: Multi-Dimensional Verification
Not all tasks need the same verification. The orchestrator assigns verifiers based on task type:
- API tasks →
@verifier-api+@security-audit+@reviewer - Frontend tasks →
@verifier-frontend+@design-audit+@a11y-audit+@responsive-audit+@perf-audit+@reviewer - Full features → All verifiers +
@verifier-e2e+@ship-check - Design system →
@verifier-design+@design-audit+@qa-coverage+@storybook-audit
Agent Roles
1. Orchestrator Agent (@orchestrator)
Responsibilities:
- Pick up tasks from
BACKLOG.md - Assign tasks to appropriate worker agents
- Track task status
- Coordinate multi-agent tasks
- Review verification reports
- Commit code when satisfied
- Update documentation
- Move tasks to
COMPLETED.md
2. Worker Agents
Examples: @api-wirer, @endpoint-builder, @component-builder, @auth-implementer
Responsibilities:
- Accept assigned tasks
- Implement the work
- Follow acceptance criteria
- Create verification report
- Request verification
3. Verifier Agents (@verifier-*)
Examples: @verifier-api, @verifier-frontend, @verifier-e2e
Responsibilities:
- Verify worker agent's implementation
- Run tests
- Check acceptance criteria
- Generate verification report
- Approve or request changes
4. Reviewer Agent (@reviewer)
Responsibilities:
- Review code quality
- Check best practices
- Verify consistency
- Approve or request changes
Task Lifecycle
BACKLOG → ASSIGNED → IN_PROGRESS → VERIFICATION → REVIEW → APPROVED → COMMITTED → COMPLETED
States
- BACKLOG - Task in
BACKLOG.md, ready to be picked up - ASSIGNED - Orchestrator assigned task to worker agent(s)
- IN_PROGRESS - Worker agent(s) actively working
- VERIFICATION - Verifier agent checking work
- REVIEW - Reviewer agent reviewing code
- APPROVED - All checks passed, ready to commit
- COMMITTED - Code committed to git
- COMPLETED - Task moved to
COMPLETED.md, documentation updated
Workflow
Step 1: Orchestrator Picks Up Task
Orchestrator Agent:
- Read
BACKLOG.md - Select highest priority task
- Create task file in
active/directory:TASK-XXX.md - Move task from
BACKLOG.mdtoACTIVE.md - Assign to appropriate worker agent(s)
Task File Format:
# TASK-XXX: [Task Name]
**Status:** ASSIGNED
**Assigned To:** @agent-name
**Priority:** P0
**Estimated Effort:** 2 days
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
## Implementation Notes
[Worker agent adds notes here]
## Verification Report
[Verifier agent adds report here]
## Review Notes
[Reviewer agent adds notes here]
Step 2: Worker Agent Implements
Worker Agent:
- Read task file
- Understand acceptance criteria
- Implement the work
- Update task file with implementation notes
- Mark acceptance criteria as complete
- Change status to
VERIFICATION - Request verification from appropriate verifier agent
Implementation Notes Format:
## Implementation Notes
**Files Changed:**
- `src/api/endpoints.ts`
- `src/types/api.ts`
**Key Changes:**
- Added feature flag check
- Implemented endpoint logic
- Added error handling
**Testing:**
- Manual testing completed
- Unit tests added
Step 3: Multi-Dimensional Verification
Orchestrator assigns appropriate verifiers based on task type:
Verification Matrix
| Task Type | Required Verifiers | Optional Auditors |
|---|---|---|
| API Endpoints | @verifier-api, @reviewer | @security-audit |
| Frontend Components | @verifier-frontend, @reviewer | @design-audit, @a11y-audit, @responsive-audit, @perf-audit |
| Full Features (E2E) | @verifier-e2e, @verifier-api, @verifier-frontend, @reviewer | @ship-check (runs all audits) |
| Design System | @verifier-design, @design-audit, @reviewer | @qa-coverage, @storybook-audit, @a11y-audit |
| Infrastructure | @verifier-infra, @reviewer | @security-audit |
| Documentation | @verifier-docs, @docs-audit | - |
Verification Process
Primary Verifier (e.g., @verifier-api):
- Read task file and implementation notes
- Check each acceptance criterion
- Run tests (unit, integration)
- Test manually if needed
- Verify build succeeds
- Generate verification report
- Mark status as
VERIFIEDorNEEDS_CHANGES
Specialized Auditors (if applicable):
@design-audit- Design system compliance, component usage@a11y-audit- Accessibility (WCAG 2.1 AA)@responsive-audit- Mobile/tablet/desktop testing@perf-audit- Performance (Core Web Vitals, bundle size)@security-audit- Security vulnerabilities, data protection@seo-audit- SEO optimization (for public pages)@qa-coverage- Test coverage, story coverage@storybook-audit- Storybook quality
Ship Check (for release-critical tasks):
@ship-checkruns comprehensive quality gates:- All verifiers pass
- All audits pass
- E2E tests pass
- Performance targets met
- Security checks pass
- Documentation updated
Verification Report Format:
## Verification Report
**Status:** ✅ VERIFIED / ⚠️ NEEDS_CHANGES
**Primary Verification (@verifier-api):**
- [x] Acceptance criteria met
- [x] Unit tests: ✅ All pass
- [x] Integration tests: ✅ All pass
- [x] Manual testing: ✅ Works as expected
- [x] Build: ✅ Success
**Specialized Audits:**
- [x] @design-audit: ✅ Pass (if applicable)
- [x] @a11y-audit: ✅ Pass (if applicable)
- [x] @security-audit: ✅ Pass (if applicable)
- [x] @perf-audit: ✅ Pass (if applicable)
**Issues Found:**
- [List any issues]
**Recommendations:**
- [Any recommendations]
Step 4: Reviewer Agent Reviews
Reviewer Agent:
- Read task file, implementation notes, and verification report
- Review code quality
- Check best practices
- Verify consistency with codebase
- Generate review notes
- Mark status as
APPROVEDorNEEDS_CHANGES
Review Notes Format:
## Review Notes
**Status:** ✅ APPROVED / ⚠️ NEEDS_CHANGES
**Code Quality:**
- ✅ Follows TypeScript best practices
- ✅ Error handling is appropriate
- ⚠️ Missing JSDoc comments
**Consistency:**
- ✅ Matches existing patterns
- ✅ Uses design system components
**Issues:**
- [List any issues]
**Recommendations:**
- [Any recommendations]
Step 5: Orchestrator Commits
Orchestrator Agent:
- Check task status is
APPROVED - Review all reports
- Commit code with descriptive message
- Push to repository
- Update task status to
COMMITTED - Update documentation (if needed)
- Move task to
COMPLETED.md - Update
product-status.mdorproduct-roadmap-matrix.md(if needed)
Commit Message Format:
feat: [feature name] - TASK-XXX
- [Brief description]
- [Key changes]
Verified by: @verifier-agent
Reviewed by: @reviewer-agent
Multi-Agent Tasks
Some tasks require multiple agents. The orchestrator coordinates:
Example: TASK-012 (Booking Creation Flow)
@api-wirer- Wire API calls (worker)@verifier-api- Verify API endpoints@verifier-frontend- Verify frontend UI@verifier-e2e- Verify end-to-end flow@design-audit- Verify design system compliance@a11y-audit- Verify accessibility@security-audit- Verify payment security@reviewer- Code quality review
Coordination:
- Orchestrator assigns to primary worker agent (
@api-wirer) - Primary agent coordinates with other worker agents if needed
- All worker agents update task file
- Orchestrator assigns verifiers based on task type
- All verifiers verify their parts in parallel
- Orchestrator ensures all quality gates pass before committing
Task Dependencies
Tasks may depend on other tasks. Orchestrator ensures:
- Dependency Check: Before assigning, check if dependencies are completed
- Sequential Execution: Don't start dependent task until dependency is completed
- Documentation: Update task file with dependency status
Example:
- TASK-003 (API Client Library) must complete before TASK-004 (Supabase Auth)
- TASK-001 (Feature Flags) must complete before any feature-flagged tasks
Quality Gates
Before a task can be committed:
- ✅ All acceptance criteria met
- ✅ Primary verifier report shows VERIFIED
- ✅ All applicable specialized audits pass (design, a11y, security, perf, etc.)
- ✅ Review notes show APPROVED
- ✅ All tests pass (unit, integration, E2E if applicable)
- ✅ Build succeeds
- ✅ No blocking issues
- ✅ Documentation updated (if needed)
Quality Gate Matrix
| Dimension | Verifier/Auditor | When Required |
|---|---|---|
| Functionality | @verifier-* | Always |
| Code Quality | @reviewer | Always |
| Design System | @design-audit | Frontend/Design tasks |
| Accessibility | @a11y-audit | User-facing features |
| Security | @security-audit | API/auth/payment tasks |
| Performance | @perf-audit | Frontend/public pages |
| Responsive | @responsive-audit | Frontend components |
| SEO | @seo-audit | Public pages |
| E2E | @verifier-e2e | Full user flows |
| Ship Ready | @ship-check | Release-critical tasks |
Error Handling
If Verification Fails:
- Verifier marks status as
NEEDS_CHANGES - Orchestrator reassigns to worker agent
- Worker agent fixes issues
- Process repeats from Step 2
If Review Fails:
- Reviewer marks status as
NEEDS_CHANGES - Orchestrator reassigns to worker agent
- Worker agent fixes issues
- Process repeats from Step 2
If Tests Fail:
- Verifier marks status as
NEEDS_CHANGES - Worker agent fixes tests
- Process repeats from Step 2
Communication Protocol
Task File Updates
- All agents update the task file with their work
- Use clear sections for each agent's contribution
- Timestamp important updates
Status Updates
- Always update task status when moving to next step
- Use consistent status values
- Update
ACTIVE.mdwhen status changes
Blockers
- If a blocker is found, mark task as
BLOCKEDin task file - Document the blocker
- Notify orchestrator
- Orchestrator decides: fix blocker, skip task, or reassign
Integration with Linear
Linear Issue Tracking
Option 1: Manual Sync (Recommended for now)
- Create Linear issue for each task
- Reference Linear issue in task file:
Linear: JUN-XXX - Update Linear issue status when task status changes
- Orchestrator updates Linear manually
Option 2: API Integration (Future)
- Orchestrator creates Linear issue automatically
- Updates Linear status automatically
- Links task file to Linear issue
Example Workflow
TASK-001: Feature Flags Infrastructure
- Orchestrator: Picks up TASK-001, creates
active/TASK-001.md, assigns to@endpoint-builder - @endpoint-builder: Implements feature flags, updates task file, requests verification
- Verification Phase:
@verifier-api: Verifies endpoints work, tests pass, generates report@security-audit: Verifies admin-only access, data protection@reviewer: Reviews code quality, patterns, consistency
- All verifiers mark VERIFIED/APPROVED
- Orchestrator: Commits code, updates docs, moves to COMPLETED
Total Time: 2 days (as estimated)
TASK-012: Booking Creation Flow (Full Feature Example)
- Orchestrator: Assigns to
@api-wirer(primary worker) - @api-wirer: Implements booking flow with payment flag support
- Verification Phase (Parallel):
@verifier-api: API endpoints work correctly@verifier-frontend: UI renders, forms work@verifier-e2e: Full booking flow works end-to-end@design-audit: Uses design system components correctly@a11y-audit: Accessible forms and buttons@security-audit: Payment data handling secure@perf-audit: Page load performance acceptable@reviewer: Code quality review
- All verifiers mark VERIFIED/APPROVED
- @ship-check: Final quality gate (optional, for release-critical)
- Orchestrator: Commits code, updates docs, moves to COMPLETED
Best Practices
- One Task at a Time: Orchestrator focuses on one task until completion
- Clear Communication: All agents document their work clearly
- Quality First: Don't skip verification or review
- Documentation: Always update docs when features are added
- Testing: Always include tests for new features
- Feature Flags: Always use feature flags for new features
Next Steps
- Review and approve this protocol
- Set up task management structure (
BACKLOG.md,ACTIVE.md,active/directory) - Create orchestrator agent definition
- Begin with Phase 1, Task 1.1
This protocol ensures:
- ✅ Quality code through verification and review
- ✅ Consistent process across all tasks
- ✅ Clear accountability for each step
- ✅ Proper documentation updates
- ✅ Sequential task completion
- ✅ Integration with existing tools (Linear, git)