parallel-builder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseParallel Builder: Divide-and-Conquer Implementation
Parallel Builder:分治法实现
Decomposes a plan/spec into independent tasks, spawns builder agents to implement each piece in parallel, and integrates the results. Unlike feature-council (same task, diverse approaches), this skill gives each agent a different piece of the work for maximum speed.
Use this when you have a spec, PRD, or plan and want fast parallel implementation.
将计划/规格说明分解为独立任务,生成builder agent并行实现每个模块,最后整合结果。与feature-council(同一任务,多种实现方式)不同,该技能为每个agent分配不同的工作模块,以实现最大速度提升。
当你拥有规格说明、PRD或计划,希望快速并行实现时使用本技能。
When to Use
使用场景
✅ Use parallel-builder for:
- Implementing a PRD or spec document
- Large features that can be decomposed into parts
- When speed matters more than approach diversity
- Building from a reference file or detailed plan
- Multi-file implementations with clear boundaries
❌ Don't use for:
- Bugs (use debug-council)
- Features where you want diverse approaches (use feature-council)
- Tasks that can't be parallelized
- Simple single-file changes
✅ 适合使用parallel-builder的场景:
- 实现PRD或规格说明文档
- 可分解为多个模块的大型功能
- 对速度的需求高于实现方式多样性的场景
- 基于参考文件或详细计划进行开发
- 具有清晰边界的多文件实现
❌ 不适合使用的场景:
- 修复Bug(使用debug-council)
- 需要多种实现方式的功能(使用feature-council)
- 无法并行化的任务
- 简单的单文件修改
Where Parallel-Builder Shines
Parallel Builder的优势场景
🚀 Maximum Speedup: Multi-File Specs
🚀 最大提速:多文件规格说明
Parallel-builder is fastest when your spec produces multiple independent files:
┌─────────────────────────────────────────────────────────────┐
│ IDEAL: Each agent owns different files │
├─────────────────────────────────────────────────────────────┤
│ │
│ Wave 2: TRUE PARALLEL EXECUTION │
│ ┌─────────────────┐ ┌─────────────────┐ ┌────────────────┐│
│ │ Agent 1 │ │ Agent 2 │ │ Agent 3 ││
│ │ userService.ts │ │ authService.ts │ │ apiClient.ts ││
│ └─────────────────┘ └─────────────────┘ └────────────────┘│
│ ↓ ↓ ↓ │
│ [PARALLEL - All 3 run simultaneously] │
│ │
│ Speedup: ~3× faster than sequential │
└─────────────────────────────────────────────────────────────┘Great use cases:
- Full-stack features (types + services + routes + UI components)
- Microservice implementations (multiple independent services)
- CRUD APIs (each resource in its own files)
- Plugin/module systems (each module independent)
- Test suites (test files for different modules)
当你的规格说明需要生成多个独立文件时,Parallel Builder的速度最快:
┌─────────────────────────────────────────────────────────────┐
│ IDEAL: Each agent owns different files │
├─────────────────────────────────────────────────────────────┤
│ │
│ Wave 2: TRUE PARALLEL EXECUTION │
│ ┌─────────────────┐ ┌─────────────────┐ ┌────────────────┐│
│ │ Agent 1 │ │ Agent 2 │ │ Agent 3 ││
│ │ userService.ts │ │ authService.ts │ │ apiClient.ts ││
│ └─────────────────┘ └─────────────────┘ └────────────────┘│
│ ↓ ↓ ↓ │
│ [PARALLEL - All 3 run simultaneously] │
│ │
│ Speedup: ~3× faster than sequential │
└─────────────────────────────────────────────────────────────┘典型适用场景:
- 全栈功能(类型定义 + 服务 + 路由 + UI组件)
- 微服务实现(多个独立服务)
- CRUD API(每个资源对应独立文件)
- 插件/模块系统(每个模块相互独立)
- 测试套件(不同模块对应独立测试文件)
⚠️ Falls Back to Sequential: Single-File Specs
⚠️ 退化为串行执行:单文件规格说明
When multiple tasks modify the same file, parallel execution would cause conflicts. The skill automatically falls back to sequential:
┌─────────────────────────────────────────────────────────────┐
│ LIMITED: All agents modify same file │
├─────────────────────────────────────────────────────────────┤
│ │
│ Wave 3: SEQUENTIAL (conflict avoidance) │
│ ┌─────────────────┐ │
│ │ Agent 1 │ → modifies BG600L.cpp │
│ └────────┬────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ Agent 2 │ → modifies BG600L.cpp │
│ └────────┬────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ Agent 3 │ → modifies BG600L.cpp │
│ └─────────────────┘ │
│ │
│ No speedup, but still provides organized task breakdown │
└─────────────────────────────────────────────────────────────┘Still useful for:
- Organized task breakdown and tracking
- Clear separation of concerns
- Systematic implementation of complex single-file changes
当多个任务需要修改同一文件时,并行执行会导致冲突。该技能会自动退化为串行执行:
┌─────────────────────────────────────────────────────────────┐
│ LIMITED: All agents modify same file │
├─────────────────────────────────────────────────────────────┤
│ │
│ Wave 3: SEQUENTIAL (conflict avoidance) │
│ ┌─────────────────┐ │
│ │ Agent 1 │ → modifies BG600L.cpp │
│ └────────┬────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ Agent 2 │ → modifies BG600L.cpp │
│ └────────┬────────┘ │
│ ↓ │
│ ┌─────────────────┐ │
│ │ Agent 3 │ → modifies BG600L.cpp │
│ └─────────────────┘ │
│ │
│ No speedup, but still provides organized task breakdown │
└─────────────────────────────────────────────────────────────┘仍可发挥的作用:
- 清晰的任务分解与跟踪
- 关注点分离
- 系统化实现复杂的单文件修改
Speedup Estimate
提速预估
| Spec Type | Parallel Potential | Expected Speedup |
|---|---|---|
| Multi-file, independent modules | High | 50-80% faster |
| Multi-file, some shared | Medium | 30-50% faster |
| Few files, many functions | Low | 10-20% faster |
| Single file, many changes | Minimal | ~0% (sequential) |
The skill will show you the estimated speedup in the execution plan before you confirm.
| 规格说明类型 | 并行潜力 | 预估提速 |
|---|---|---|
| 多文件、独立模块 | 高 | 快50-80% |
| 多文件、部分共享依赖 | 中 | 快30-50% |
| 少量文件、多函数 | 低 | 快10-20% |
| 单文件、多修改点 | 极小 | ~0%(串行执行) |
在你确认执行前,该技能会在执行计划中显示预估提速。
Step 0: Accept Plan Input
步骤0:接收计划输入
First, get the plan from the user. Accept one of:
- File path: User provides path to a spec, PRD, or plan file
- Inline description: User describes what to build
- Reference file: User points to existing code to replicate/extend
What would you like me to build? You can provide:
- A file path to a spec/PRD/plan
- A description of the feature
- A reference file to work from
I'll decompose it into parallel tasks for fast implementation.首先,获取用户提供的计划。支持以下三种输入方式:
- 文件路径:用户提供规格说明、PRD或计划文件的路径
- 内联描述:用户描述需要开发的内容
- 参考文件:用户指向现有代码以进行复制/扩展
What would you like me to build? You can provide:
- A file path to a spec/PRD/plan
- A description of the feature
- A reference file to work from
I'll decompose it into parallel tasks for fast implementation.Step 1: Analyze & Decompose
步骤1:分析与分解
Read the plan and identify work units. For each unit, determine:
- Independence: Can it be built without waiting for others?
- Dependencies: What must exist before this can be built?
- Outputs: What files/interfaces does this create?
- Complexity: Rough estimate (small/medium/large)
读取计划并识别工作单元。针对每个单元,确定:
- 独立性:是否无需等待其他单元即可开发?
- 依赖关系:开发该单元前必须完成哪些工作?
- 输出:该单元会生成哪些文件/接口?
- 复杂度:大致预估(小/中/大)
Decomposition Rules
分解规则
| Rule | Description |
|---|---|
| File boundaries | One agent per file or closely related file group |
| Feature boundaries | One agent per distinct feature/capability |
| Layer boundaries | Separate by layer (types, services, API, UI) |
| Minimize coupling | Tasks should have minimal interface dependencies |
| 规则 | 描述 |
|---|---|
| 文件边界 | 每个agent负责一个文件或一组紧密关联的文件 |
| 功能边界 | 每个agent负责一个独立的功能/能力模块 |
| 层级边界 | 按层级分离(类型定义、服务、API、UI) |
| 最小化耦合 | 任务间的接口依赖应尽可能少 |
Create Dependency Graph
创建依赖关系图
Identify three categories:
WAVE 1 (Foundation - No Dependencies):
- Shared types/interfaces
- Configuration
- Constants
- Base utilities
WAVE 2 (Core - Depends on Wave 1):
- Services
- Business logic
- Data access
- Core components
WAVE 3+ (Integration - Depends on Previous):
- API routes that use services
- UI that uses components
- Integration code
- Tests将任务分为三类:
Wave 1(基础层 - 无依赖):
- 共享类型/接口
- 配置
- 常量
- 基础工具类
Wave 2(核心层 - 依赖Wave 1):
- 服务
- 业务逻辑
- 数据访问
- 核心组件
Wave 3+(集成层 - 依赖前序批次):
- 调用服务的API路由
- 使用组件的UI
- 集成代码
- 测试用例Step 2: Define Shared Contracts
步骤2:定义共享契约
CRITICAL: Before spawning agents, define the contracts they share.
Create a shared context that ALL agents receive:
markdown
undefined关键:在生成agent前,定义它们需要遵循的共享契约。
创建所有agent都会接收的共享上下文:
markdown
undefinedShared Contracts
共享契约
Interfaces
接口
[Define all shared types/interfaces that multiple agents need]
[定义所有多个agent需要用到的共享类型/接口]
File Ownership
文件归属
[Map which agent owns which files - no overlaps]
[映射每个agent负责的文件 - 无重叠]
Naming Conventions
命名规范
[Consistent naming across all agents' work]
[所有agent工作需遵循的统一命名规则]
Import Paths
导入路径
[How agents should import from each other's domains]
This prevents conflicts and ensures pieces fit together.
---[agent应如何导入其他模块的内容]
这可以避免冲突,确保各模块能够无缝整合。
---Step 3: Present Execution Plan to User
步骤3:向用户展示执行计划
Show the decomposition and get confirmation:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PARALLEL BUILD PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Source: [file path or "inline description"]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TASK BREAKDOWN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━展示分解后的任务并获取用户确认:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PARALLEL BUILD PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 来源: [文件路径或"内联描述"]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
任务分解
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Wave 1: Foundation (3 agents in parallel)
Wave 1:基础层(3个agent并行执行)
| Task | Agent | Files | Complexity |
|---|---|---|---|
| Create shared types | builder-solver-1 | types/*.ts | Small |
| Database schema | builder-solver-2 | schema.prisma | Medium |
| Config & constants | builder-solver-3 | config/*.ts | Small |
| 任务 | Agent | 文件 | 复杂度 |
|---|---|---|---|
| 创建共享类型 | builder-solver-1 | types/*.ts | 小 |
| 数据库 schema | builder-solver-2 | schema.prisma | 中 |
| 配置与常量 | builder-solver-3 | config/*.ts | 小 |
Wave 2: Core (2 agents in parallel, after Wave 1)
Wave 2:核心层(2个agent并行执行,依赖Wave 1)
| Task | Agent | Files | Depends On |
|---|---|---|---|
| User service | builder-solver-4 | services/user.ts | Wave 1 types |
| Auth service | builder-solver-5 | services/auth.ts | Wave 1 types |
| 任务 | Agent | 文件 | 依赖 |
|---|---|---|---|
| 用户服务 | builder-solver-4 | services/user.ts | Wave 1的类型定义 |
| 认证服务 | builder-solver-5 | services/auth.ts | Wave 1的类型定义 |
Wave 3: Integration (1 agent, after Wave 2)
Wave 3:集成层(1个agent,依赖Wave 2)
| Task | Agent | Files | Depends On |
|---|---|---|---|
| API routes + wiring | builder-solver-6 | routes/*.ts, index.ts | Wave 1, 2 |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Total Tasks: 6
Total Waves: 3
Parallel Agents: Up to 3 concurrent
Estimated Speedup: ~50-60% faster than sequential
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Proceed with this plan? (y/n/modify)
If user says "modify", let them adjust task boundaries or wave assignments.
---| 任务 | Agent | 文件 | 依赖 |
|---|---|---|---|
| API路由与连接 | builder-solver-6 | routes/*.ts, index.ts | Wave 1、Wave 2 |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
摘要
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
总任务数: 6
总批次数: 3
最大并行Agent数: 3
预估提速: 比串行执行快约50-60%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
是否按此计划执行?(y/n/修改)
如果用户选择“修改”,允许用户调整任务边界或批次分配。
---Step 4: Execute Wave by Wave
步骤4:分批次执行
For Each Wave
每个批次的执行流程
-
Prepare agent prompts with:
- Their specific task
- Shared contracts (from Step 2)
- Outputs from previous waves (if any)
- Files they own (and must NOT touch others)
-
Spawn agents IN PARALLEL:
Task(agent: "builder-solver-1", prompt: "[TASK 1 PROMPT]")
Task(agent: "builder-solver-2", prompt: "[TASK 2 PROMPT]")
Task(agent: "builder-solver-3", prompt: "[TASK 3 PROMPT]")
... (all in the SAME batch - parallel execution)- Track progress:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WAVE 1 PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ builder-solver-1 - Complete (types/*.ts)
☑ builder-solver-2 - Complete (schema.prisma)
☐ builder-solver-3 - Working... (config/*.ts)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-
Collect outputs when wave completes
-
Pass context to next wave - Include relevant outputs from completed waves
-
准备agent提示词,包含:
- 具体任务
- 共享契约(来自步骤2)
- 前序批次的输出(如有)
- 该agent负责的文件(以及禁止修改的其他文件)
-
并行生成agent:
Task(agent: "builder-solver-1", prompt: "[任务1提示词]")
Task(agent: "builder-solver-2", prompt: "[任务2提示词]")
Task(agent: "builder-solver-3", prompt: "[任务3提示词]")
...(所有任务在同一批次中 - 并行执行)- 跟踪进度:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Wave 1 进度
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ builder-solver-1 - 完成 (types/*.ts)
☑ builder-solver-2 - 完成 (schema.prisma)
☐ builder-solver-3 - 执行中... (config/*.ts)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-
批次完成后收集输出
-
将上下文传递给下一批次 - 包含已完成批次的相关输出
Step 5: Agent Prompt Template
步骤5:Agent提示词模板
Each builder-solver agent receives a structured prompt:
markdown
undefined每个builder-solver agent都会收到结构化的提示词:
markdown
undefinedBuilder Task: [TASK NAME]
构建任务: [任务名称]
Your Assignment
你的分配
[SPECIFIC DESCRIPTION OF WHAT TO BUILD]
[需要开发内容的具体描述]
Files You Own
你负责的文件
You are responsible for creating/modifying ONLY these files:
- [file1.ts]
- [file2.ts]
⚠️ DO NOT modify any other files.
你仅负责创建/修改以下文件:
- [file1.ts]
- [file2.ts]
⚠️ 请勿修改任何其他文件。
Shared Contracts
共享契约
[PASTE SHARED INTERFACES/TYPES FROM STEP 2]
[粘贴步骤2中的共享接口/类型]
Context from Previous Waves
前序批次的上下文
[PASTE RELEVANT OUTPUTS FROM EARLIER WAVES, IF ANY]
[粘贴前序批次的相关输出(如有)]
Requirements
要求
- [Requirement 1]
- [Requirement 2]
- [Requirement 3]
- [要求1]
- [要求2]
- [要求3]
Expected Output
预期输出
Create the files listed above with complete, production-ready implementations.
Follow the shared contracts exactly.
---创建上述列表中的文件,实现完整的生产级代码。
严格遵循共享契约。
---Step 6: Integration & Verification
步骤6:整合与验证
After all waves complete:
所有批次完成后:
6.1 Apply All Changes
6.1 应用所有修改
Agents propose changes - orchestrator applies them to the codebase.
Agent会提出修改建议 - 协调器将这些修改应用到代码库中。
6.2 Check for Conflicts
6.2 冲突检查
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CONFLICT CHECK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ No file conflicts (agents stayed in their lanes)
✅ Interface contracts honored
✅ Import paths valid
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━If conflicts exist, resolve them:
- Prefer later wave's version for integration files
- Merge compatible changes
- Flag incompatible changes for user decision
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
冲突检查
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ 无文件冲突(agent均在负责范围内操作)
✅ 遵循接口契约
✅ 导入路径有效
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━如果存在冲突,进行解决:
- 集成文件优先使用后续批次的版本
- 合并兼容的修改
- 将不兼容的修改标记出来供用户决策
6.3 Run Verification
6.3 执行验证
bash
undefinedbash
undefinedType check
类型检查
npm run typecheck # or equivalent
npm run typecheck # 或等效命令
Lint
代码检查
npm run lint
npm run lint
Tests (if any)
测试(如有)
npm run test
Fix any issues found.
---npm run test
修复发现的所有问题。
---Step 7: Report Results
步骤7:报告结果
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
PARALLEL BUILD COMPLETE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
并行构建完成
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━📊 Execution Summary
📊 执行摘要
| Wave | Agents | Tasks | Status |
|---|---|---|---|
| 1 | 3 | Foundation | ✅ Complete |
| 2 | 2 | Core Services | ✅ Complete |
| 3 | 1 | Integration | ✅ Complete |
Total Time: [X seconds]
Sequential Estimate: [Y seconds]
Speedup: [Z%]
Speedup: [Z%]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
| 批次 | Agent数 | 任务 | 状态 |
|---|---|---|---|
| 1 | 3 | 基础层 | ✅ 完成 |
| 2 | 2 | 核心服务 | ✅ 完成 |
| 3 | 1 | 集成层 | ✅ 完成 |
总耗时: [X秒]
串行执行预估耗时: [Y秒]
提速比例: [Z%]
提速比例: [Z%]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📁 Files Created/Modified
📁 创建/修改的文件
Wave 1 Output
Wave 1 输出
| Agent | Files Created |
|---|---|
| builder-solver-1 | types/user.ts, types/auth.ts |
| builder-solver-2 | prisma/schema.prisma |
| builder-solver-3 | config/index.ts, config/constants.ts |
| Agent | 创建的文件 |
|---|---|
| builder-solver-1 | types/user.ts, types/auth.ts |
| builder-solver-2 | prisma/schema.prisma |
| builder-solver-3 | config/index.ts, config/constants.ts |
Wave 2 Output
Wave 2 输出
| Agent | Files Created |
|---|---|
| builder-solver-4 | services/user.ts |
| builder-solver-5 | services/auth.ts |
| Agent | 创建的文件 |
|---|---|
| builder-solver-4 | services/user.ts |
| builder-solver-5 | services/auth.ts |
Wave 3 Output
Wave 3 输出
| Agent | Files Created |
|---|---|
| builder-solver-6 | routes/user.ts, routes/auth.ts, index.ts |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
| Agent | 创建的文件 |
|---|---|
| builder-solver-6 | routes/user.ts, routes/auth.ts, index.ts |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✅ Verification
✅ 验证结果
- Type Check: ✅ Passed
- Lint: ✅ Passed
- Tests: ✅ Passed (or N/A)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- 类型检查: ✅ 通过
- 代码检查: ✅ 通过
- 测试: ✅ 通过(或不适用)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 What Each Agent Built
🔍 每个Agent的工作内容
builder-solver-1: Shared Types
builder-solver-1: 共享类型
- Created User, AuthToken, Session interfaces
- Defined validation schemas
- 创建User、AuthToken、Session接口
- 定义验证Schema
builder-solver-2: Database Schema
builder-solver-2: 数据库Schema
- Created User, Session, Token models
- Set up relations and indexes
... (for each agent)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
- 创建User、Session、Token模型
- 设置关联关系与索引
...(每个Agent的工作内容)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Implementation from Spec
📋 规格说明实现情况
| Spec Requirement | Status | Implemented By |
|---|---|---|
| User registration | ✅ | builder-solver-4, 6 |
| Authentication | ✅ | builder-solver-5, 6 |
| Session management | ✅ | builder-solver-5 |
| API endpoints | ✅ | builder-solver-6 |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
---| 规格说明要求 | 状态 | 实现Agent |
|---|---|---|
| 用户注册 | ✅ | builder-solver-4, 6 |
| 认证 | ✅ | builder-solver-5, 6 |
| 会话管理 | ✅ | builder-solver-5 |
| API端点 | ✅ | builder-solver-6 |
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
---Error Handling
错误处理
Agent Failure
Agent执行失败
If an agent fails:
- Retry once with the same prompt
- If still fails, report to user with error details
- Ask if user wants to:
- Skip this task and continue
- Provide guidance and retry
- Abort the build
如果某个Agent执行失败:
- 使用相同提示词重试一次
- 如果仍然失败,向用户报告错误详情
- 询问用户是否希望:
- 跳过该任务继续执行
- 提供指导后重试
- 终止构建
Dependency Failure
依赖失败
If Wave N fails and Wave N+1 depends on it:
- Block dependent waves
- Report the blocker
- Offer options: fix and continue, or abort
如果Wave N执行失败,且Wave N+1依赖于它:
- 阻塞依赖的批次
- 报告阻塞问题
- 提供选项:修复后继续,或终止
Configuration Options
配置选项
| Option | Default | Description |
|---|---|---|
| Max parallel agents | 5 | Maximum agents running simultaneously |
| Agent timeout | 5 min | Max time per agent |
| Auto-verify | true | Run type check/lint after completion |
| Show progress | true | Display progress updates |
User can specify:
parallel-builder with 3 max agents| 选项 | 默认值 | 描述 |
|---|---|---|
| 最大并行Agent数 | 5 | 同时运行的最大Agent数量 |
| Agent超时时间 | 5分钟 | 每个Agent的最长执行时间 |
| 自动验证 | true | 完成后自动运行类型检查/代码检查 |
| 显示进度 | true | 显示进度更新 |
用户可以指定:
parallel-builder with 3 max agentsAgents
Agent
10 builder solver agents in directory:
agents/- through
builder-solver-1builder-solver-10
All agents:
- Same instructions (focused on implementing their assigned piece)
- Lower temperature (0.4) for consistency
- Full tool access (Read, Write, Grep, Glob, LS, Shell)
- Respect file ownership boundaries
- Follow shared contracts exactly
agents/- 至
builder-solver-1builder-solver-10
所有Agent的特性:
- 相同的指令(专注于实现分配的模块)
- 较低的温度值(0.4)以保证一致性
- 完整的工具权限(读取、写入、Grep、Glob、LS、Shell)
- 遵守文件归属边界
- 严格遵循共享契约
Difference from Other Skills
与其他技能的区别
| Aspect | debug-council | feature-council | parallel-builder |
|---|---|---|---|
| Input | Bug to fix | Feature to build | Spec/plan to implement |
| Agent task | Same problem | Same feature | Different pieces |
| Goal | Find correct fix | Diverse approaches | Fast parallel execution |
| Selection | Majority vote | Synthesis/merge | Integration |
| Speed | N agents, 1 problem | N agents, 1 feature | N pieces, ~N× speedup |
| 维度 | debug-council | feature-council | parallel-builder |
|---|---|---|---|
| 输入 | 需要修复的Bug | 需要开发的功能 | 需要实现的规格/计划 |
| Agent任务 | 解决同一个问题 | 实现同一个功能 | 实现不同的模块 |
| 目标 | 找到正确的修复方案 | 提供多种实现方式 | 快速并行执行 |
| 结果处理 | 多数投票选择方案 | 合并/综合多种实现 | 整合模块 |
| 速度 | N个Agent解决1个问题 | N个Agent实现1个功能 | N个模块,约N倍提速 |
Examples
示例
Example 1: From PRD File
示例1:基于PRD文件
User: parallel-builder from docs/auth-prd.md
Orchestrator:
1. Reads docs/auth-prd.md
2. Decomposes into: types, user-service, auth-service, middleware, routes
3. Creates 3 waves
4. Executes in parallel
5. Integrates and verifies用户: parallel-builder from docs/auth-prd.md
协调器:
1. 读取docs/auth-prd.md
2. 分解为:类型定义、用户服务、认证服务、中间件、路由
3. 创建3个批次
4. 并行执行
5. 整合并验证Example 2: From Description
示例2:基于内联描述
User: parallel-builder a full CRUD API for a blog with posts, comments, and users
Orchestrator:
1. Decomposes: types, 3 services, 3 route files, integration
2. Wave 1: types (1 agent)
3. Wave 2: 3 services in parallel (3 agents)
4. Wave 3: 3 route files in parallel (3 agents)
5. Wave 4: integration (1 agent)用户: parallel-builder 一个包含文章、评论和用户的完整CRUD API
协调器:
1. 分解为:类型定义、3个服务、3个路由文件、集成代码
2. Wave 1:类型定义(1个Agent)
3. Wave 2:3个服务并行执行(3个Agent)
4. Wave 3:3个路由文件并行执行(3个Agent)
5. Wave 4:集成代码(1个Agent)Example 3: From Reference
示例3:基于参考文件
User: parallel-builder something like src/features/users but for products
Orchestrator:
1. Reads src/features/users to understand pattern
2. Creates parallel tasks to replicate for products
3. Executes maintaining same architecture用户: parallel-builder 类似src/features/users的模块,但针对产品
协调器:
1. 读取src/features/users以理解架构模式
2. 创建并行任务以复制该模式实现产品模块
3. 执行时保持相同的架构