[COORD-010] Build orchestration loop #150

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

Objective

Build the main orchestration loop that coordinates issue queue processing, agent assignment, and quality verification.

Implementation Details

Implement orchestration flow from Part 3:

Orchestration loop:

  1. Read issue queue (priority sorted)
  2. Estimate context for next issue
  3. Assign cheapest capable agent (50% rule)
  4. Monitor agent context during execution
  5. On completion claim, delegate to Quality Layer
  6. Handle rejection (inject continuation) or approval (move to next issue)

This is the core coordinator that ties all components together.

Context Estimate

  • Files to modify: 2 (coordinator.py, main.py)
  • Implementation complexity: high (30,000 tokens)
  • Test requirements: high (15,000 tokens)
  • Documentation: heavy (5,000 tokens)
  • Total estimated: 71,500 tokens
  • Recommended agent: opus

Difficulty

high

Dependencies

  • Blocked by: #155 (COORD-009)
  • Blocks: #157 (COORD-011)

Acceptance Criteria

  • Main orchestration loop implemented
  • Issue queue processing with priority sorting
  • Integration with context estimator
  • Integration with agent assignment
  • Integration with Quality Layer API
  • Completion handling (rejection and approval)
  • Unit and integration tests (85% coverage minimum)

Testing Requirements

  • Mock issue queue with priority-sorted issues
  • Test full orchestration flow
  • Test quality gate integration
  • Test rejection and continuation flow
  • Test approval and next-issue flow
  • Coverage: 85% minimum
## Objective Build the main orchestration loop that coordinates issue queue processing, agent assignment, and quality verification. ## Implementation Details Implement orchestration flow from Part 3: Orchestration loop: 1. Read issue queue (priority sorted) 2. Estimate context for next issue 3. Assign cheapest capable agent (50% rule) 4. Monitor agent context during execution 5. On completion claim, delegate to Quality Layer 6. Handle rejection (inject continuation) or approval (move to next issue) This is the core coordinator that ties all components together. ## Context Estimate - Files to modify: 2 (coordinator.py, main.py) - Implementation complexity: high (30,000 tokens) - Test requirements: high (15,000 tokens) - Documentation: heavy (5,000 tokens) - **Total estimated: 71,500 tokens** - **Recommended agent: opus** ## Difficulty high ## Dependencies - Blocked by: #155 (COORD-009) - Blocks: #157 (COORD-011) ## Acceptance Criteria - [ ] Main orchestration loop implemented - [ ] Issue queue processing with priority sorting - [ ] Integration with context estimator - [ ] Integration with agent assignment - [ ] Integration with Quality Layer API - [ ] Completion handling (rejection and approval) - [ ] Unit and integration tests (85% coverage minimum) ## Testing Requirements - Mock issue queue with priority-sorted issues - Test full orchestration flow - Test quality gate integration - Test rejection and continuation flow - Test approval and next-issue flow - Coverage: 85% minimum
jason.woltje added the apiapip0phase-4 labels 2026-01-31 21:04:52 +00:00
jason.woltje added this to the M4.1-Coordinator (0.0.4) milestone 2026-01-31 21:10:03 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#150