Skip to main content

How Orchestration Works

The orchestration engine is the core of the Team6 operating system. It's what turns a company goal into a coordinated sprint — with AI agents and human owners working together across your entire R&D organization.

This isn't a smarter copilot. It's the execution layer for AI-first R&D.

Full Sprint Example

Here's how a complete sprint looks — from goal to merged PRs:

🎯Goal described by your team
🤖Product Manager AgentGenerates requirements + task breakdown
👀Team Lead ReviewsAdjusts scope, approves plan
📋Task 1: Foundation
👤 Human Owner🤖 Specialist Agent
dependency ↓
✅ PR #1 — Owner reviews & merges
📋Task 2: Core Logic
👤 Human Owner🤖 Specialist Agent
dependency ↓
✅ PR #2 — Owner reviews & merges
📋Task 3: Interface
👤 Human Owner🤖 Specialist Agent
dependency ↓
✅ PR #3 — Owner reviews & merges
📋Task 4: Testing
👤 Human Owner🤖 QA Agent
✅ PR #4 — Owner reviews & merges

Tasks execute in dependency order. Each task follows the orchestration cycle detailed below. The result: coordinated PRs, each owned and approved by a team member.

How It Works

1. Collaborative Planning

Your team describes the goal. The Product Manager agent drafts the plan through an interactive sprint planning wizard — but your team owns it:

🎯
Your team describes the goal
What needs to be built, in plain English
🤖
AI drafts the plan
Analyzes your codebase, generates a PRD with tasks, dependencies, and estimates
💬
AI asks clarifying questions
Scope, priorities, constraints — your team provides the answers
👀
Your team reviews and refines
Edit tasks, adjust scope, reorder priorities, add or remove work
👥
Your team assigns human owners
Every task gets a person who is accountable for the outcome
Your team approves the sprint
Nothing executes until your team says go

The AI accelerates planning — but every decision is made by your team. No task runs without a human owner. No sprint starts without human approval.

2. Parallel Execution in Isolated Workspaces

Once approved, the engine executes tasks on your project's dedicated worker machine — your workloads never share compute with another organization.

Dedicated Worker MachineYour Project
⚙️Task A
feature/task-1-foundation
isolated workspace
🔧Task B
feature/task-2-core-logic
isolated workspace
🎨Task C
feature/task-3-interface
isolated workspace
🧪Task D
feature/task-4-testing
isolated workspace

Each task gets its own isolated workspace using git worktrees — an isolated working directory with a unique feature branch, but sharing the underlying git history. The first task on a repository triggers a full clone; every subsequent task creates a worktree from that base in under a second (10x faster than cloning). Tasks at the same dependency level run simultaneously. Tasks only start when their dependencies are complete.

  • Multiple concurrent agents (configurable), each in a separate process
  • Per-project BullMQ queues (agents-{projectId}) for workload isolation
  • Auto-retry on failure with exponential backoff (5 attempts)
  • Agent heartbeat monitoring every 30 seconds — stale agents are detected and recovered
  • Autoscaling adjusts worker capacity based on queue depth
  • Workspaces are automatically cleaned up after task completion

3. Agent Delegation

When an agent encounters work outside its specialty, it delegates subtasks to the right specialist:

🔧
Lead Agent
Build new feature
⚙️
Specialist Agent A
Core logic & data layer
delegates
🎨
Specialist Agent B
Interface & integration
delegates
Final PR — Integrated result

The parent task resumes automatically when all subtasks deliver their PRs.

4. Multi-Repository Coordination

A single task can span multiple repositories:

📋Cross-repo feature
Orchestration Engine
⚙️Backend Repo
API endpoints, business logic, data layer
→ PR #42
🖥️Frontend Repo
UI components, client logic, integration
→ PR #18

The engine coordinates changes across repos (e.g., API contract in the backend + client integration in the frontend) and creates separate PRs in each repository, linked to the same task.

How a Single Task Flows Through the System

Here's exactly what happens when a task enters the orchestration engine — from assignment to merged PR.

1
👥Human Owner + Agent Paired
Your Team + Orchestration Engine
Your team assigned a human owner during sprint planning. The engine selects the best specialist agent. The human owner is accountable — the agent executes under their oversight.
Status: assigned
2
📦Isolated Workspace Provisioned
Dedicated Worker Machine
A git worktree is created from the base repository — isolated working directory, unique feature branch, provisioned in under a second. The agent can only access this workspace.
Status: in_progress
3
🔍Agent Reads the Codebase
Specialist Agent
Analyzes the repository — file structure, patterns, conventions, and existing code. The agent also loads persistent memory from previous tasks to build richer context before writing a single line.
Codebase analyzed
4
💬Human Owner Can Guide the Agent
Human Owner
The owner can track the agent's progress in real time via live streaming traces and chat with the agent at any point — provide context, answer questions, adjust direction, or clarify requirements.
Real-time collaboration
5
💻Agent Implements & Tests
Specialist Agent
Writes code following your team's patterns. Runs tests, writes new ones, makes structured commits. Delegates subtasks to other specialists if needed.
Code written, tests passing
6
🔀Pull Request Created
Orchestration Engine
A PR is opened on your GitHub repository. The human owner is notified with a clear description of what was done and why.
Status: review
7
👀Human Reviews & Iterates
Human Owner
The owner reviews the diff, leaves comments, or requests changes. The agent iterates until the owner is satisfied. Same workflow your team already uses.
Feedback loop
8
Owner Approves & Merges
Human Owner
The owner merges the PR. Workspace cleaned up. Dependent tasks are now unblocked and begin execution.
Status: done → next tasks unblocked

This cycle runs in parallel for every task in the sprint.

What Makes This Different

AI Coding AssistantsTeam6
One agent helps one developerMultiple specialist agents integrated into the whole team
Developer writes the prompt, manages the outputOrchestration engine plans the sprint, manages dependencies
No concept of a sprint or task graphFull sprint planning with dependency resolution
Runs on the developer's machineDedicated worker machine per project, fully isolated
One task at a time, sequentiallyParallel execution across isolated workspaces
Single repo, single contextMulti-repository coordination with linked PRs
Developer decides when it's doneHuman owner reviews, iterates with the agent, and approves