Skip to main content

How SPOQ Orchestrates AI Agents

Three integrated innovations for parallel AI agent coordination, deterministic quality validation, and human-AI collaboration.

Wave-Based Topological Dispatch

SPOQ models task dependencies as a directed acyclic graph (DAG) and computes execution waves via topological sorting. Tasks within the same wave execute in parallel, while waves execute sequentially to respect dependencies.

Wave Computation

Comment: Compute execution waves from DAG
Wave 0: Tasks with no dependencies
Wave 1: Tasks depending only on Wave 0
Wave 2: Tasks depending on Wave 1
...
Code shows how tasks are organized into waves based on their dependencies. Wave 0 contains tasks with no dependencies, Wave 1 contains tasks that depend only on Wave 0 tasks, and so on.

Example Parallelism

Wave 0 contains three independent tasks numbered 01, 02, and 03 that execute in parallel. Wave 1 contains two tasks numbered 04 and 05 that depend on Wave 0 and also execute in parallel. Wave 2 contains task 06 which depends on Wave 1 completion.

Speedup Factor

The critical path is the longest path through the dependency graph, weighted by task durations. It provides the theoretical minimum execution time. SPOQ achieved a 5.3x speedup over sequential execution in proof-of-concept evaluation.

Speedup = Tsequential / Tcritical

Speedup equals T sequential divided by T critical, where T sequential is the total time to execute all tasks sequentially and T critical is the time to execute the critical path.

Dual Validation Gates

SPOQ enforces quality through two validation gates: epic validation before execution and agent validation after execution. Each gate applies 10 metrics, scored 0-100, with a 95% aggregate threshold for passing. See benchmark results for real-world validation scores across case studies.

Pre-Execution
Planning Validation
Pass threshold: 95 average, 90 per-metric
Planning validation metrics scored before task execution begins
MetricQuestionThreshold
Vision ClarityDoes the task directly advance the stated epic objective?>=90
Architecture QualityIs the architecture clearly described and complete?>=90
Task DecompositionAre tasks properly broken into logical, atomic units?>=90
Dependency GraphAre dependencies clear, acyclic, and visualized?>=90
Coverage CompletenessDo tasks fully cover the epic goal?>=90
Phase OrderingDoes the phase/wave sequence follow logical progression?>=90
Scope CoherenceDo all tasks contribute to the epic goal?>=90
Success Criteria QualityAre success criteria measurable and complete?>=90
Risk IdentificationAre potential blockers and risks identified?>=90
Integration StrategyIs it clear how tasks merge and integrate?>=90

This table contains 10 metrics. Use arrow keys to navigate between cells, Home and End to jump to row boundaries, Ctrl+Home and Ctrl+End to jump to table boundaries.

Post-Execution
Code Validation
Pass threshold: 95 average, 80 per-metric
Code quality validation metrics scored after task completion
MetricQuestionThreshold
Syntactic CorrectnessDoes the code compile/parse without errors?>=80
Test ExistenceDo tests exist for the implemented functionality?>=80
Test Pass RateDo all existing tests pass?>=80
Requirements FidelityDoes the implementation satisfy all acceptance criteria?>=80
SOLID AdherenceDoes the code follow SOLID design principles?>=80
SecurityAre inputs validated and sensitive data protected?>=80
Error HandlingAre failure cases caught with appropriate responses?>=80
ScalabilityCan the solution handle reasonable growth in load?>=80
Code ClarityIs the code readable and well-organized?>=80
CompletenessIs the implementation feature-complete per the task spec?>=80

This table contains 10 metrics. Use arrow keys to navigate between cells, Home and End to jump to row boundaries, Ctrl+Home and Ctrl+End to jump to table boundaries.

Threshold Rationale

  • Aggregate threshold ensures overall high quality while allowing minor imperfections in individual metrics.
  • Per-metric for planning reflects that planning errors propagate downstream and are expensive to fix later.
  • Per-metric for code acknowledges legitimate tradeoffs in implementation decisions.
  • Plans are cheap to fix - re-decomposing costs human time but no agent compute, making early validation valuable. See the glossary for metric definitions.

Human-as-an-Agent (HaaA) Integration

SPOQ treats the human specialist as a high-value agent integrated into the orchestration loop, not an external supervisor. This bidirectional model enables quality amplification. Learn more about Human-as-an-Agent (HaaA) in the glossary or see how it compares to other frameworks.

Human-in-the-Loop, Not Fully Autonomous

Many agent frameworks pursue full autonomy, removing humans from the execution loop entirely. SPOQ takes the opposite approach: human judgment remains central to the process.

Autonomous Frameworks:
  • Agents operate independently end-to-end
  • Human reviews only final output
  • Errors compound before detection
SPOQ's HaaA:
  • Human shapes task decomposition upfront
  • Agents can request guidance mid-execution
  • Quality gates catch issues early

Diagram shows bidirectional collaboration between human specialist and AI agents. The human provides task decomposition and planning flowing toward the agents. The agents can request consultation flowing back toward the human when they encounter ambiguous requirements or need domain expertise.

Human to System

  • Participates in epic planning and task decomposition
  • Validates plans before execution begins
  • Can intervene during execution if needed
  • Ensures tasks are appropriately scoped (1-4 hours)

System to Human

  • Agents can request human assistance when blocked
  • Consultation for ambiguous requirements
  • Escalation for blocked progress
  • Decisions beyond agent scope or authority

Quality Amplification

The human's judgment improves task decomposition quality, reducing downstream rework. Meanwhile, agents' execution scales the human's productivity. This symbiotic relationship amplifies the quality and throughput beyond what either could achieve alone - the hallmark of effective human-AI collaboration. Explore the benchmark data to see quality amplification in practice.