oma-coordination
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMulti-Agent Workflow Guide
多Agent工作流指南
When to use
适用场景
- Complex feature spanning multiple domains (full-stack, mobile)
- Coordination needed between frontend, backend, mobile, and QA
- User wants step-by-step guidance for multi-agent coordination
- 跨多个领域(全栈、移动端)的复杂功能
- 需要前端、后端、移动端和QA之间协调的场景
- 用户需要多Agent协调的分步指导的场景
When NOT to use
不适用场景
- Simple single-domain task -> use the specific agent directly
- User wants automated execution -> use orchestrator
- Quick bug fixes or minor changes
- 简单的单领域任务 -> 直接使用对应Agent即可
- 用户需要自动化执行 -> 使用orchestrator
- 快速Bug修复或小型改动
Core Rules
核心规则
- Always start with PM Agent for task decomposition
- Spawn independent tasks in parallel (same priority tier)
- Define API contracts before frontend/mobile tasks
- QA review is always the final step
- Assign separate workspaces to avoid file conflicts
- Always use Serena MCP tools as the primary method for code exploration and modification
- Never skip steps in the workflow — follow each step sequentially without omission
- 始终首先调用PM Agent进行任务拆解
- 同优先级的独立任务并行创建
- 在启动前端/移动端任务前先定义API契约
- QA评审始终是最后一步
- 分配独立的工作区避免文件冲突
- 始终优先使用Serena MCP工具作为代码探索和修改的主要方式
- 绝对不要跳过工作流中的步骤——按顺序依次执行每一步,不得遗漏
Workflow
工作流
Step 1: Plan with PM Agent
步骤1:与PM Agent共同制定计划
PM Agent analyzes requirements, selects tech stack, creates task breakdown with priorities.
PM Agent分析需求,选择技术栈,生成带优先级的任务拆解方案。
Step 2: Spawn Agents by Priority
步骤2:按优先级创建Agent
Spawn agents via CLI:
- Use spawn-agent.sh for each task
- CLI selection follows agent_cli_mapping in user-preferences.yaml
- Spawn all same-priority tasks in parallel using background processes
bash
undefined通过CLI创建Agent:
- 每个任务使用spawn-agent.sh创建
- CLI选择遵循user-preferences.yaml中的agent_cli_mapping配置
- 所有同优先级任务使用后台进程并行创建
bash
undefinedExample: spawn backend and frontend in parallel
Example: spawn backend and frontend in parallel
oh-my-ag agent:spawn backend "task description" session-id -w ./backend &
oh-my-ag agent:spawn frontend "task description" session-id -w ./frontend &
wait
undefinedoh-my-ag agent:spawn backend "task description" session-id -w ./backend &
oh-my-ag agent:spawn frontend "task description" session-id -w ./frontend &
wait
undefinedStep 3: Monitor & Coordinate
步骤3:监控与协调
- Use memory read tool to poll files
progress-{agent}.md - Verify API contracts align between agents
- Ensure shared data models are consistent
- 使用内存读取工具轮询文件
progress-{agent}.md - 验证各Agent之间的API契约是否对齐
- 确保共享数据模型保持一致
Step 4: QA Review
步骤4:QA评审
Spawn QA Agent last to review all deliverables. Address CRITICAL issues by re-spawning agents.
最后创建QA Agent评审所有交付物。若存在严重问题,重新创建对应Agent处理。
Automated Alternative
自动化替代方案
For fully automated execution without manual spawning, use the orchestrator skill instead.
如需无需手动创建Agent的全自动化执行,请使用orchestrator skill。
References
参考资料
- Workflow examples:
resources/examples.md
- 工作流示例:
resources/examples.md