[COORD-004] Implement basic orchestration loop #160

Closed
opened 2026-01-31 21:28:16 +00:00 by jason.woltje · 0 comments
Owner

Objective

Create the main orchestration loop that processes the queue and spawns agents.

Implementation Details

  1. Create Coordinator class
  2. Implement process_queue() method:
    • Get next ready issue
    • Spawn agent (stub for now)
    • Mark complete (stub for now)
  3. Add error handling
  4. Add logging
  5. Make it run as async loop
  6. Graceful shutdown handling

Context Estimate

  • Files to modify: 5 (coordinator.py, main.py, config.py, models.py, tests/)
  • Implementation complexity: high (30000 tokens)
  • Test requirements: high (15000 tokens)
  • Documentation: heavy (5000 tokens)
  • Total estimated: 71500 tokens
  • Recommended agent: opus

Difficulty

high

Dependencies

  • Blocked by: #159 (COORD-003 - needs queue manager)
  • Blocks: COORD-005 (integration test needs loop working)

Acceptance Criteria

  • Orchestrator runs as async loop
  • Gets next ready issue from queue
  • Spawns agent (stub implementation OK for Phase 0)
  • Handles errors gracefully
  • Logs all actions
  • Can be started/stopped cleanly
  • 85% test coverage
  • Integration test: Processes mock queue

Testing Requirements

  • Unit tests for core loop logic
  • Test error handling
  • Test graceful shutdown
  • Integration test: End-to-end with mock queue
  • Manual test: Run coordinator, assign issue, verify processing
## Objective Create the main orchestration loop that processes the queue and spawns agents. ## Implementation Details 1. Create Coordinator class 2. Implement process_queue() method: - Get next ready issue - Spawn agent (stub for now) - Mark complete (stub for now) 3. Add error handling 4. Add logging 5. Make it run as async loop 6. Graceful shutdown handling ## Context Estimate - Files to modify: 5 (coordinator.py, main.py, config.py, models.py, tests/) - Implementation complexity: high (30000 tokens) - Test requirements: high (15000 tokens) - Documentation: heavy (5000 tokens) - **Total estimated: 71500 tokens** - **Recommended agent: opus** ## Difficulty high ## Dependencies - Blocked by: #159 (COORD-003 - needs queue manager) - Blocks: COORD-005 (integration test needs loop working) ## Acceptance Criteria - [ ] Orchestrator runs as async loop - [ ] Gets next ready issue from queue - [ ] Spawns agent (stub implementation OK for Phase 0) - [ ] Handles errors gracefully - [ ] Logs all actions - [ ] Can be started/stopped cleanly - [ ] 85% test coverage - [ ] Integration test: Processes mock queue ## Testing Requirements - Unit tests for core loop logic - Test error handling - Test graceful shutdown - Integration test: End-to-end with mock queue - Manual test: Run coordinator, assign issue, verify processing
jason.woltje added the p0apiapi labels 2026-01-31 21:28:16 +00:00
jason.woltje added this to the M4.1-Coordinator (0.0.4) milestone 2026-01-31 21:28:43 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#160