dispatching-parallel-agents
SKILL.md
Dispatching Parallel Agents
Coordinate multiple AI agents to execute tasks simultaneously, maximizing development velocity while preventing conflicts. This is the core skill for multi-agent collaboration.
When to Use
- 2+ independent tasks can be worked on simultaneously
- No shared state between tasks (different files/modules)
- Total work > 2 hours and parallelization is beneficial
- Overnight execution where multiple agents can run unattended
Agent Capability Matrix
Model Backgrounds & Strengths
| Agent | Model | Background | Best For | Cost | Speed |
|---|---|---|---|---|---|
| Antigravity | Claude Opus 4.5 | Deep reasoning, planning | Architecture, coordination, complex debugging | ๐ฐ๐ฐ๐ฐ | ๐ข |
| Amp | Claude Sonnet 4.5 | Accuracy, low hallucination | Code review, quality assurance | ๐ฐ๐ฐ | ๐ |
| Codex | GPT-5.2 Codex | Patient execution | Detailed refactoring, overnight tasks, React | ๐ฐ๐ฐ | ๐ข |
| GLM | GLM-4.7 | Speed, Chinese, cost | Large code generation, repetitive tasks | ๐ฐ | ๐๐ |
| MiniMax | MiniMax | Type-safe, structured | Theme systems, type definitions | ๐ฐ | ๐ |
| Grok | xAI Grok | Real-time search | Research, API docs, best practices | ๐ฐ๐ฐ | ๐ |
Performance Benchmarks (2025-2026)
GLM-4.7:
- SWE-bench: 73.8%
- LiveCodeBench-v6: 84.9% (open-source #1)
- Cost: ~15% of Claude
Codex (GPT-5.2):
- First-try success: 37%
- With retries: 70.2%
- Development speedup: 2-3x
Claude Sonnet 4.5:
- Accuracy: Highest tier
- Hallucination rate: Lowest
- Large codebase understanding: Excellent
RALPH Loop Integration
The RALPH loop (Read โ Analyze โ Learn โ Plan โ Hypothesize) integrates with multi-agent workflow:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ RALPH LOOP โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโ โโโโโโโโโโโ โโโโโโโโโ โโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ READ โ โ โ ANALYZE โ โ โ LEARN โ โ โ PLAN โ โ โ HYPOTHESIZEโ โ
โ โโโโโโโโ โโโโโโโโโโโ โโโโโโโโโ โโโโโโโโ โโโโโโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโโโโโโโ Feedback Loop โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ MULTI-AGENT DISPATCH PHASE โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ After PLAN: Antigravity decomposes into parallel tasks โ
โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ
โ โ Agent A (Codex)โ โ Agent B (GLM) โ โ Agent C (Mini) โ โ
โ โ Task Guide A โ โ Task Guide B โ โ Task Guide C โ โ
โ โ Files: A/* โ โ Files: B/* โ โ Files: C/* โ โ
โ โโโโโโโโโฌโโโโโโโโโ โโโโโโโโโฌโโโโโโโโโ โโโโโโโโโฌโโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ Antigravity โ โ
โ โ Reviews & Merges โ โ
โ โโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ Back to READ (next iteration) โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Conflict Prevention Strategies
1. File-Level Isolation
Principle: Each agent owns exclusive files/directories.
โ BAD: Both agents edit same file
Agent A: components/Header.tsx (lines 1-50)
Agent B: components/Header.tsx (lines 51-100)
Result: Merge conflicts guaranteed
โ
GOOD: Agents own different files
Agent A: components/Header.tsx, api/stocks.ts
Agent B: themes/*.ts, stores/theme.store.ts
Result: Clean merge
2. Dependency Ordering
Principle: Infrastructure before features, types before implementation.
Phase 1 (Foundation) - Must complete first:
โโโ types/theme.ts [GLM]
โโโ api/client.ts [Codex]
Phase 2 (Implementation) - Can parallelize after Phase 1:
โโโ themes/dark.theme.ts [GLM]
โโโ themes/pixel.theme.ts [GLM]
โโโ api/stocks.ts [Codex]
โโโ api/watchlist.ts [Codex]
Phase 3 (Integration) - After Phase 2:
โโโ components/ThemeSwitcher.tsx [Any]
3. Contract-First Development
Principle: Define interfaces before implementation.
// Define contract FIRST (in shared types file)
interface Theme {
id: string;
name: string;
colors: ThemeColors;
}
// Then agents implement independently
// Agent A: implements getTheme(id) โ Theme
// Agent B: implements <ThemeSwitcher themes={Theme[]} />
4. Task Boundary Markers
Include clear ownership in task guides:
### Task: Theme Store Implementation
**Owner**: MiniMax
**Files OWNED** (exclusive write):
- stores/theme.store.ts
- themes/registry.ts
**Files READ-ONLY** (for reference):
- types/theme.ts
- tokens.css
**Do NOT touch**:
- components/* (Codex owns these)
Real-World Example: DragonFly Parallel Execution
Scenario: Codex + MiniMax Working Simultaneously
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ TIME: 2026-01-20 15:17 โ
โ User: "่ฎฉ Codex ๅนฒ UI ไผๅ๏ผ่ฎฉ MiniMax ๅนฒไธป้ข็ณป็ป" โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ CODEX: UI-POLISH-COMBINED.md โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ Owns: โ โ
โ โ - components/LeftPane.tsx โ โ
โ โ - components/StockChart.tsx โ โ
โ โ - components/RightPane.tsx โ โ
โ โ - styles/tokens.css (shadows) โ โ
โ โ โ โ
โ โ Tasks: โ โ
โ โ โ
BF-001: Name display fix โ โ
โ โ โ
UI-001: Sidebar modernize โ โ
โ โ โ
UI-003: Chart controls โ โ
โ โ โ
UI-005: AI input glow โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ (Running ~2.5h) โ
โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MINIMAX: GLM-P1-THEME-GUIDE.md โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ Owns: โ โ
โ โ - types/theme.ts โ โ
โ โ - themes/*.theme.ts โ โ
โ โ - themes/registry.ts โ โ
โ โ - stores/theme.store.ts โ โ
โ โ - hooks/useTheme.ts โ โ
โ โ โ โ
โ โ Tasks: โ โ
โ โ โ
G-001: Theme types โ โ
โ โ โ
G-002-005: 4 themes โ โ
โ โ โ
G-008: Zustand store โ โ
โ โ โ
G-010: ThemeSwitcher โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ โ
โ (Running ~2.5h) โ
โ โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ TIME: 2026-01-20 19:17 (4 hours later) โ
โ โ
โ RESULT: Both complete, pnpm check passes โ
โ
โ No merge conflicts โ
โ 4 themes working + UI improvements โ
โ โ
โ NEXT: Antigravity reviews โ Creates Round 2 fixes โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Post-Merge Review Findings
After parallel execution, Antigravity reviews and creates new tasks:
## Review Findings โ Round 2 Tasks
| Issue Found | New Task | Assignee |
|-------------|----------|----------|
| Search dropdown behavior | FIX-001: Keyboard navigation | Codex |
| Button position blocks price | FIX-002: Move to left toolbar | Codex |
| Period buttons are mock | FIX-003: Connect to backend | Codex |
| Cyberpunk theme glitch | FIX-005: Border rendering | MiniMax |
| Dark theme input colors | FIX-006: Use CSS variables | Codex |
Task Guide Template for Parallel Execution
# [Task Group Name]
> **Executor**: Codex / GLM / MiniMax
> **Estimated Time**: X hours
> **Parallel Group**: A / B / C โ Indicates parallel execution group
---
## โ ๏ธ Ownership Declaration
### Files I OWN (exclusive write access):
- `path/to/file1.ts`
- `path/to/file2.tsx`
- `path/to/directory/*`
### Files I READ (no modifications):
- `types/*.ts`
- `styles/tokens.css`
### Files FORBIDDEN (another agent owns):
- `themes/*` (MiniMax owns)
- `api/*` (Codex owns)
---
## Tasks
### T-001: First Task
...
---
## Verification
\`\`\`bash
pnpm check # Type safety
pnpm dev # Visual check
\`\`\`
## Problem Log
If blocked, document here immediately:
- [x] Problem: ...
- [x] Workaround: ...
- [ ] Needs human decision: ...
Dispatch Decision Tree
โโโโโโโโโโโโโโโโโโโ
โ New Task Set โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโผโโโโโโโโโ
โ Can parallelize? โ
โโโโโโโโโโฌโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโ
โ โ โ
YES DEPENDS NO
โ โ โ
โโโโโโโโโโโผโโโโโโโโโโ โ โโโโโโโโโโผโโโโโโโโโ
โ Check file overlap โ โ โ Sequential exec โ
โโโโโโโโโโโฌโโโโโโโโโโ โ โ (use best agent)โ
โ โ โโโโโโโโโโโโโโโโโโโ
โโโโโโโโโดโโโโโโโโ โ
โ โ โ
NONE OVERLAP โ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ
โ Dispatch โ โ Split by โ โ Phase intoโ
โ to agents โ โ files/dirsโ โ sequentialโ
โโโโโโโโโโโโโ โโโโโโโโโโโโโ โโโโโโโโโโโโโ
Best Practices
- Always declare file ownership in task guides
- Types/interfaces first to establish contracts
- No shared mutable state between parallel agents
- Batch reviews after parallel work completes
- Quick iteration cycles - don't let issues accumulate
- Visual verification with agent-browser for UI work
- pnpm check gate - mandatory before considering done
- Problem logging - agents must document blockers immediately
Anti-Patterns to Avoid
โ Two agents editing same component
โ Agent A depends on Agent B's in-progress work
โ No ownership declaration in task guides
โ Skipping type definitions before implementation
โ Long parallel runs without checkpoints
โ No verification commands in task guides
Communication Templates
Dispatching to Agent
่ฏท้
่ฏปๅนถๆง่ก tasks/epics/{epic}/codex/TASK-GUIDE.md
่ฟๆฏไธ {other-agent} ๅนถ่กๆง่ก็ไปปๅกใ
ไฝ ่ด่ดฃ็ๆไปถ: {list}
็ฆๆญขไฟฎๆน: {other-agent's files}
Agent Status Report
## Status: [Agent Name]
### Completed
- โ
T-001: Description
- โ
T-002: Description
### In Progress
- ๐ T-003: Description (eta: 30min)
### Blocked
- โ ๏ธ T-004: Need backend API for X
### Files Modified
- `path/to/file1.ts` (new)
- `path/to/file2.tsx` (modified)
### Verification
\`\`\`
pnpm check โ โ
Pass
\`\`\`
Weekly Installs
1
Repository
smithery/aiFirst Seen
9 days ago
Security Audits
Installed on
amp1
opencode1
kimi-cli1
codex1
github-copilot1
claude-code1