kckylechen1-dispatching-parallel-agents
1
总安装量
1
周安装量
#52676
全站排名
安装命令
npx skills add https://smithery.ai
Agent 安装分布
amp
1
opencode
1
kimi-cli
1
codex
1
claude-code
1
Skill 文档
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
\`\`\`