Project 2: Planning Board with Delegation
Build a task board that decomposes work into dependencies and delegates to agents with explicit ownership.
Quick Reference
| Attribute | Value |
|---|---|
| Difficulty | Level 3 |
| Time Estimate | 10-16 hours |
| Language | Python (Alternatives: TypeScript, Go) |
| Prerequisites | Task decomposition, basic workflow modeling |
| Key Topics | Task allocation, dependency graphs, reconciliation |
1. Learning Objectives
By completing this project, you will:
- Represent agent tasks with dependencies and priorities.
- Implement a delegation policy for assigning tasks.
- Add a review stage to reconcile outputs.
- Produce a board view that shows state transitions.
2. Theoretical Foundation
2.1 Core Concepts
- Task Decomposition: Breaking a goal into smaller tasks with dependencies.
- Delegation Policy: Rules for who handles which task.
- Reconciliation: Merging outputs before marking tasks done.
2.2 Why This Matters
Coordination failures are the most common cause of multi-agent breakdown. A visible, explicit board prevents hidden dependencies and makes failures observable.
2.3 Historical Context / Background
Kanban-style boards and DAG schedulers inspired many agent orchestration tools. The board makes work states explicit and debuggable.
2.4 Common Misconceptions
- “Parallelism always speeds things up.” Dependencies often require sequencing.
- “Review is optional.” It is essential for correctness.
3. Project Specification
3.1 What You Will Build
A planning board that splits a goal into tasks, assigns them to agents, and moves them through states (To Do → In Progress → Review → Done).
3.2 Functional Requirements
- Task Model: Each task has dependencies and owner.
- Delegation Policy: Assign tasks to roles based on capability.
- State Transitions: Tasks move through board stages.
- Review Stage: Tasks cannot complete without review.
3.3 Non-Functional Requirements
- Clarity: Board state should be readable.
- Consistency: Tasks respect dependencies.
- Auditability: Changes are logged.
3.4 Example Usage / Output
$ run-board --goal "Market research summary"
[Board] 6 tasks created
[Board] 2 tasks in progress (Planner, Researcher)
[Board] 1 task in review (Critic)
3.5 Real World Outcome
A visible board where each task shows its owner, dependencies, and status. You can trace why any task is blocked.
4. Solution Architecture
4.1 High-Level Design
Goal -> Task Generator -> Board State -> Agent Delegation -> Review -> Done
4.2 Key Components
| Component | Responsibility | Key Decisions |
|---|---|---|
| Task Generator | Create tasks | Dependency modeling |
| Board State | Track statuses | Simple state machine |
| Delegator | Assign owners | Policy-based mapping |
| Reviewer | Validate outputs | Evidence checks |
4.3 Data Structures
Pseudo-structures:
STRUCT Task:
id
description
dependencies
owner_role
status
4.4 Algorithm Overview
Delegation Algorithm
- Generate tasks from goal.
- Assign based on role capabilities.
- Enforce dependency completion.
- Move to review.
Complexity Analysis:
- Time: O(T + D)
- Space: O(T)
5. Implementation Guide
5.1 Development Environment Setup
Use a simple CLI and in-memory board representation for fast iteration.
5.2 Project Structure
project-root/
├── board/
├── tasks/
├── delegation/
├── review/
└── logs/
5.3 The Core Question You’re Answering
“How do I coordinate multiple agents without them stepping on each other’s work?”
5.4 Concepts You Must Understand First
- Dependency graphs
- What task must finish before others?
- Book Reference: “Designing Data-Intensive Applications” - Ch. 5
- Coordination policies
- What rules define delegation?
- Book Reference: “Fundamentals of Software Architecture” - Ch. 8
5.5 Questions to Guide Your Design
- Task priority
- How do you decide which task is most urgent?
- Review ownership
- Who validates completed tasks?
5.6 Thinking Exercise
Design a dependency chain for a research summary task and identify which tasks can run in parallel.
5.7 The Interview Questions They’ll Ask
- “How do you model dependencies between tasks?”
- “What is the purpose of a review stage?”
- “How do you avoid blocking the pipeline?”
- “What is the risk of central delegation?”
- “How do you audit task completion?”
5.8 Hints in Layers
Hint 1: Start with a simple board Use four columns and move tasks manually.
Hint 2: Add dependency checks Prevent tasks from starting early.
Hint 3: Add delegation rules Map tasks to roles explicitly.
Hint 4: Add review gates Require a critic to mark done.
5.9 Books That Will Help
| Topic | Book | Chapter |
|---|---|---|
| Coordination trade-offs | “Fundamentals of Software Architecture” | Ch. 8 |
5.10 Implementation Phases
Phase 1: Foundation (3-4 hours)
Goals:
- Create task model
- Build board state
Tasks:
- Define task fields
- Implement board transitions
Checkpoint: Tasks can move across columns.
Phase 2: Core Functionality (4-6 hours)
Goals:
- Add delegation policy
- Enforce dependencies
Tasks:
- Map tasks to roles
- Block tasks with unmet dependencies
Checkpoint: Dependency enforcement works.
Phase 3: Polish & Edge Cases (3-4 hours)
Goals:
- Add review stage
- Add logging
Tasks:
- Add reviewer role
- Log all transitions
Checkpoint: Audit log shows task history.
5.11 Key Implementation Decisions
| Decision | Options | Recommendation | Rationale |
|---|---|---|---|
| State model | Free text vs state machine | State machine | Easier validation |
| Delegation | Manual vs rule-based | Rule-based | Consistency |
6. Testing Strategy
6.1 Test Categories
| Category | Purpose | Examples |
|---|---|---|
| Unit Tests | Task transitions | Move task between states |
| Integration Tests | Dependency flow | Blocked task cannot start |
| Edge Case Tests | Circular dependencies | Detect and reject |
6.2 Critical Test Cases
- Task with unmet dependencies cannot start.
- Task in review cannot be marked done without reviewer.
- Circular dependencies are detected.
6.3 Test Data
Task A -> Task B dependency
Expected: B blocked until A done
7. Common Pitfalls & Debugging
7.1 Frequent Mistakes
| Pitfall | Symptom | Solution |
|---|---|---|
| Hidden dependencies | Tasks start too early | Enforce explicit dependency list |
| No review stage | Bad outputs accepted | Add review gate |
| Board confusion | Unclear status | Use consistent labels |
7.2 Debugging Strategies
- Trace task lifecycle by task ID.
- Visualize dependency graph to spot cycles.
7.3 Performance Traps
- Overly strict dependencies can slow execution.
8. Extensions & Challenges
8.1 Beginner Extensions
- Add task priority sorting.
- Add a simple CLI board display.
8.2 Intermediate Extensions
- Add role-specific queues.
- Add SLA timers per task.
8.3 Advanced Extensions
- Add decentralized delegation bidding.
- Add workload balancing metrics.
9. Real-World Connections
9.1 Industry Applications
- Multi-agent project management systems.
- Automated research pipelines.
9.2 Related Open Source Projects
- Airflow (task orchestration concepts)
- LangGraph (agent workflows)
9.3 Interview Relevance
- Task orchestration and coordination are common system design topics.
10. Resources
10.1 Essential Reading
- “Fundamentals of Software Architecture” - coordination and trade-offs
- “Designing Data-Intensive Applications” - dependency management
10.2 Tools & Documentation
- FIPA ACL Specification: http://www.fipa.org/specs/fipa00061/
10.3 Related Projects in This Series
- Previous Project: Role-Defined Orchestrator (P01)
- Next Project: Message Bus + Shared Memory (P03)
11. Self-Assessment Checklist
11.1 Understanding
- I can model dependencies and delegation policies
11.2 Implementation
- Tasks respect dependencies
- Review stage works
11.3 Growth
- I can explain trade-offs between centralized vs decentralized delegation
12. Submission / Completion Criteria
Minimum Viable Completion:
- Task model, board, and delegation policy implemented
Full Completion:
- Review and audit logs added
Excellence (Going Above & Beyond):
- Decentralized bidding or optimization added
This guide was generated from LEARN_COMPLEX_MULTI_AGENT_SYSTEMS_DEEP_DIVE.md. For the complete learning path, see the README.