# Team Agent Orchestration

> Run real multi-agent team orchestration for engineering tasks using Antigravity as Lead Supervisor and separate external DeepSeek Harness agent runs (DSH_PLANNER, DSH_ARCHITECT, DSH_IMPLEMENTER, DSH_REVIEWER, DSH_FIXER, DSH_VERIFIER) with unique Orchestration Run IDs, bounded handoffs, and self-correction loops.

- Skill: `blackpearl-ai/team-agent-orchestration` (Agent Skill)
- Install (CLI): `npx skillmds@latest add blackpearl-ai/team-agent-orchestration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/blackpearl-ai/team-agent-orchestration/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: BlackPearl-AI (https://skillmd.com/u/blackpearl-ai)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/blackpearl-ai/team-agent-orchestration

---


# Real Team Agent Orchestration (Antigravity Lead + DeepSeek Harness Multi-Agent Layer)

Use this skill when a task requires an engineering team workflow. Antigravity acts as the Lead Supervisor & Architect, delegating specialist subagent roles to **real separate DeepSeek Harness agent processes** via `node "C:\Users\victo\.config\opencode\scripts\dsh-delegate.js"`.

---

## 1. Multi-Agent Architecture & Role Delegation

```
USER GOAL
   ↓
ANTIGRAVITY LEAD SUPERVISOR
   ↓
TASK CLASSIFICATION
   ├── TRIVIAL ➔ Antigravity inline
   ├── STANDARD ➔ Antigravity + ECC inline (Optional 1 DSH Reviewer)
   ├── COMPLEX ➔ DSH_PLANNER ➔ DSH_IMPLEMENTER ➔ DSH_CODE_REVIEWER ➔ (DSH_FIXER) ➔ Antigravity Verify
   ├── HIGH-RISK ➔ DSH_PLANNER ➔ DSH_ARCHITECT ➔ DSH_IMPLEMENTER ➔ DSH_SECURITY_REVIEWER ➔ (DSH_FIXER) ➔ DSH_VERIFIER ➔ Antigravity Gate
   └── HEAVY ➔ DSH_PLANNER ➔ DSH_IMPLEMENTER (worktree) ➔ DSH_CODE_REVIEWER ➔ DSH_VERIFIER ➔ Antigravity Gate
```

### Real DeepSeek Harness Specialist Roles

| Role | Execution Layer | Mutability / Mode | Purpose |
|---|---|---|---|
| **DSH_PLANNER** | Real DSH Process | **SOFT READ-ONLY (Prompt Enforced)** | Architecture inspection and step-by-step plan. |
| **DSH_ARCHITECT** | Real DSH Process | **SOFT READ-ONLY (Prompt Enforced)** | API, DB, and system contract validation. |
| **DSH_IMPLEMENTER** | Real DSH Process | **WRITE / ISOLATED WORKTREE** | Implementation writer in isolated worktree snapshot (`.worktrees/dsh-*`). |
| **DSH_TESTER** | Real DSH Process | **WRITE / ISOLATED WORKTREE** | Test generation & test execution in isolated worktree. |
| **DSH_CODE_REVIEWER** | Real DSH Process | **SOFT READ-ONLY (Prompt Enforced)** | Independent diff & code quality review. |
| **DSH_SECURITY_REVIEWER** | Real DSH Process | **SOFT READ-ONLY (Prompt Enforced)** | Independent OWASP, auth, secrets, SQLi, and XSS audit. |
| **DSH_DATABASE_REVIEWER** | Real DSH Process | **SOFT READ-ONLY (Prompt Enforced)** | Independent SQL, indexing, lock, and migration audit. |
| **DSH_FIXER** | Real DSH Process | **WRITE / SAME WORKTREE** | Surgical defect fixes in existing worktree. |
| **DSH_VERIFIER** | Real DSH Process | **SOFT READ-ONLY / TEST RUNNER** | Independent diff, test, build, and linter verification. |

---

## 2. Invocation Scripts

1. **Individual Role Execution**:
   ```powershell
   node "C:\Users\victo\.config\opencode\scripts\dsh-delegate.js" --role DSH_PLANNER --objective "<GOAL>" --targetPath "<DIR>"
   ```
2. **Automated Team Pipeline**:
   ```powershell
   node "C:\Users\victo\.config\opencode\scripts\dsh-team.js" --pipeline <COMPLEX|HIGH_RISK|HEAVY|AUDIT> --objective "<GOAL>" --targetPath "<DIR>"
   ```

---

## 3. Session Tracking & Bounded Handoff

Every real agent run produces a structured record:
- **Role**: `DSH_PLANNER`, `DSH_IMPLEMENTER`, `DSH_CODE_REVIEWER`, etc.
- **Orchestration Run ID**: Unique identifier generated by the runner (e.g. `orch-run-planner-mtetu1jd-tu47`)
- **Mode**: `SOFT READ-ONLY (Prompt Enforced)` vs `WRITE / ISOLATED WORKTREE`
- **Workspace**: Directory path / worktree path
- **Status**: `SUCCESS` / `BLOCKED` with exit code
- **Short Result**: Concrete findings or diff summary

---

## 4. Real Iterative Self-Correction Loop

```
[DSH_IMPLEMENTER Run] ➔ [DSH_REVIEWER Run]
            ▲                          │
            │                          ▼
            │                    [ISSUE FOUND?]
            │                   /              \
            └── (YES: Fixer) ◄─                 ─► (NO) ➔ [DSH_VERIFIER] ➔ [ANTIGRAVITY GATE]
```
- **Loop Ceiling**: Maximum **3 correction cycles**.
- **Real Fixer**: Fixer runs as a separate DSH process (`--role DSH_FIXER`) in the existing worktree, passing only verified reviewer findings.
- **Failure Stop**: If defects remain after 3 cycles, execution halts and reports the blocking technical rationale with full evidence to the user.

---

## 5. Execution Visibility & Reporting

Display a compact real execution trace:
`Antigravity Lead ➔ DSH_PLANNER [run ...] ➔ DSH_IMPLEMENTER [run ...] ➔ DSH_REVIEWER [run ...] ➔ DSH_FIXER [run ...] ➔ Antigravity / ECC Final Gate`

At completion, summarize:
1. **Agents Used**: Real participating DSH roles and Orchestration Run IDs
2. **Contributions**: Deliverables per role
3. **Correction Loops**: Cycle count (e.g. `0` or `1 of 3`)
4. **Final Verification Status**: Independent verification evidence (tests, diff, security)

