multi-agent

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

多代理并行协作

Multi-Agent Parallel Collaboration

安装与初始化

Installation and Initialization

  1. 安装技能
    bash
    npx skills add ayflying/ai-skills --skill multi-agent
  2. 初始化 IDE 代理(首次或更新时执行)
    bash
    python .agents/skills/multi-agent/scripts/setup.py
  1. Install Skill:
    bash
    npx skills add ayflying/ai-skills --skill multi-agent
  2. Initialize IDE Agent (Execute for the first time or when updating):
    bash
    python .agents/skills/multi-agent/scripts/setup.py

自定义代理名称

Customize Agent Names

安装后会在项目根目录生成
.env
文件。编辑
_NAME
变量自定义名称,重新运行 setup.py 使配置生效。
After installation, a
.env
file will be generated in the project root directory. Edit the
_NAME
variables to customize names, and re-run setup.py for the configuration to take effect.

核心原则

Core Principles

任务分配权唯一:只有 ${MASTER_NAME} 能分配任务,其他代理不能私自接受或分配任务。
Unique Task Assignment Right: Only ${MASTER_NAME} can assign tasks; other agents cannot accept or assign tasks without permission.

职责分层

Responsibility Hierarchy

角色职责任务来源
${MASTER_NAME}唯一任务分配者用户指令
${PLANNER_NAME}功能设计 + 功能验收接收 ${MASTER_NAME} 分配
${LEAD_PROGRAMMER_NAME}架构设计 + 程序分配(唯一)只能接收 ${MASTER_NAME} 分配
${ARTIST_NAME}UI/UX设计接收 ${MASTER_NAME} 分配
@build代码实现(可多个并发)只能接收 ${LEAD_PROGRAMMER_NAME} 分配
@test-writer功能测试接收 ${MASTER_NAME} 分配
RoleResponsibilityTask Source
${MASTER_NAME}The only task assignerUser instructions
${PLANNER_NAME}Function design + Function acceptanceAssigned by ${MASTER_NAME}
${LEAD_PROGRAMMER_NAME}Architecture design + Program assignment (exclusive)Can only receive assignments from ${MASTER_NAME}
${ARTIST_NAME}UI/UX DesignAssigned by ${MASTER_NAME}
@buildCode implementation (multiple concurrent allowed)Can only receive assignments from ${LEAD_PROGRAMMER_NAME}
@test-writerFunctional testingAssigned by ${MASTER_NAME}

标准工作流程

Standard Workflow

用户需求
[MASTER] 判断需求是否明确
┌─ 需求不明确 → [PLANNER] 功能设计 → 交回 [MASTER] 分配
└─ 需求明确 → [MASTER] 任务分配
        ┌─────────────┼─────────────┐
        ↓             ↓             ↓
   [LEAD-PROGRAMMER] [ARTIST]     ...
   分配给多个@build并发开发
   汇总完成结果
[MASTER] → [PLANNER] 功能验收
        ↓ 不满意
    交回 [MASTER] 重新分配
        ↓ 通过
[MASTER] → [TEST-WRITER] 功能测试
    汇总向用户反馈
User Requirements
[MASTER] Judge whether requirements are clear
┌─ Requirements unclear → [PLANNER] Function design → Return to [MASTER] for assignment
└─ Requirements clear → [MASTER] Task assignment
        ┌─────────────┼─────────────┐
        ↓             ↓             ↓
   [LEAD-PROGRAMMER] [ARTIST]     ...
   Assign to multiple @build for concurrent development
   Summarize completed results
[MASTER] → [PLANNER] Function acceptance
        ↓ Not satisfied
    Return to [MASTER] for re-assignment
        ↓ Passed
[MASTER] → [TEST-WRITER] Functional testing
   Summarize and feedback to user

Bug处理流程

Bug Handling Process

发现Bug → [MASTER]判断问题根源
    ┌─ 设计问题 → [PLANNER] 重新设计
    └─ 程序问题 → [LEAD-PROGRAMMER] 修复
Bug Found → [MASTER] Judge root cause of the problem
    ┌─ Design issue → [PLANNER] Redesign
    └─ Program issue → [LEAD-PROGRAMMER] Fix

禁止行为

Prohibited Behaviors

  • 任何代理不能私自接受或分配任务
  • 程序任务禁止跳过 [LEAD-PROGRAMMER] 直接分配给 @build
  • 禁止跳过 [PLANNER] 验收直接测试
  • [LEAD-PROGRAMMER] 只能有一个
  • No agent can accept or assign tasks without permission
  • Program tasks are prohibited from being directly assigned to @build by skipping [LEAD-PROGRAMMER]
  • Prohibit skipping [PLANNER] acceptance and directly proceeding to testing
  • [LEAD-PROGRAMMER] can only have one

代理列表

Agent List

代理默认名称职责
master总调度唯一任务分配者,不执行具体工作
lead-programmer主程程序任务唯一入口,可分配给多个@build并发
planner策划功能设计+验收,不能分配任务
artist美术UI/UX设计
build构建代码实现(可多个并发)
test-writer测试功能测试
code-reviewer审查代码审查
security-auditor安全安全审计
docs-writer文档编写技术文档
performance-optimizer性能性能优化
AgentDefault NameResponsibility
masterMaster SchedulerThe only task assigner, does not perform specific work
lead-programmerLead ProgrammerThe exclusive entry for program tasks, can assign to multiple @build concurrently
plannerPlannerFunction design + acceptance, cannot assign tasks
artistArtistUI/UX Design
buildBuilderCode implementation (multiple concurrent allowed)
test-writerTesterFunctional testing
code-reviewerCode ReviewerCode review
security-auditorSecurity AuditorSecurity audit
docs-writerDocument WriterWrite technical documents
performance-optimizerPerformance OptimizerPerformance optimization