This document describes reusable patterns for multi-agent orchestration.
Use Case: Alfred delegates task to specialist
Flow:
-
Alfred creates task in Kanban with:
- Goal
- Scope (files, areas affected)
- Acceptance criteria
- Constraints
- Deadline
-
Specialist claims task (heartbeat)
-
Specialist executes bounded work
-
Specialist yields back with:
- Executive summary (1-3 lines)
- Files changed
- Tests run
- Risks
Example:
# Alfred delegates to coder
**Goal:** Implement OAuth2 authentication
**Scope:** src/auth/, tests/auth/
**Acceptance Criteria:**
- Login/logout endpoints functional
- Token refresh mechanism
- All tests passing
**Constraints:**
- No DB schema changes
- Security audit before doneUse Case: Specialists work autonomously
Flow: Every 30 min:
- Check Kanban for tasks assigned to me
- If available:
- Claim task
- Execute bounded work
- Handoff on completion
- If not available:
- Continue previous work
- Report progress
Key Principle: No manual intervention required for task claiming and execution.
Use Case: Alfred needs parallel work from multiple specialists
Flow:
- Alfred spawns parallel specialists via OpenProse
- Each specialist runs bounded task
- Results aggregated by coordinator
- Flow continues with combined results
Example: Investigation that needs:
- Coder: Check code
- Debug: Diagnose issue
- Research: Explore alternatives
Result: All three specialists run in parallel, Alfred aggregates findings.
Use Case: Improving processes based on feedback
Flow:
- Plan: Create design and implementation plan
- Do: Implement with TDD (RED-GREEN-REFACTOR)
- Check: Review and validate (debug/security)
- Act: Improve based on feedback
Key Principle: Every improvement is small, reversible, and measurable.
Use Case: Ensuring quality before task completion
Gate Conditions by Specialist:
| Specialist | Gate Condition |
|---|---|
| Coder | All tests passing, code reviewed |
| Debug | Findings documented, recommendations clear |
| Security | Audit complete, risks identified |
| Research | Investigation thorough, next steps defined |
| QA-Tester | Tests executed, results reported |
Enforcement: Debug and Security agents must approve before task moves to done.
- Architecture - Delegation model and primitives
- README.md - Quick start