parallel-builder

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Parallel 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 TypeParallel PotentialExpected Speedup
Multi-file, independent modulesHigh50-80% faster
Multi-file, some sharedMedium30-50% faster
Few files, many functionsLow10-20% faster
Single file, many changesMinimal~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:
  1. File path: User provides path to a spec, PRD, or plan file
  2. Inline description: User describes what to build
  3. 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.

首先,获取用户提供的计划。支持以下三种输入方式:
  1. 文件路径:用户提供规格说明、PRD或计划文件的路径
  2. 内联描述:用户描述需要开发的内容
  3. 参考文件:用户指向现有代码以进行复制/扩展
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:
  1. Independence: Can it be built without waiting for others?
  2. Dependencies: What must exist before this can be built?
  3. Outputs: What files/interfaces does this create?
  4. Complexity: Rough estimate (small/medium/large)
读取计划并识别工作单元。针对每个单元,确定:
  1. 独立性:是否无需等待其他单元即可开发?
  2. 依赖关系:开发该单元前必须完成哪些工作?
  3. 输出:该单元会生成哪些文件/接口?
  4. 复杂度:大致预估(小/中/大)

Decomposition Rules

分解规则

RuleDescription
File boundariesOne agent per file or closely related file group
Feature boundariesOne agent per distinct feature/capability
Layer boundariesSeparate by layer (types, services, API, UI)
Minimize couplingTasks 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
undefined

Shared 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并行执行)

TaskAgentFilesComplexity
Create shared typesbuilder-solver-1types/*.tsSmall
Database schemabuilder-solver-2schema.prismaMedium
Config & constantsbuilder-solver-3config/*.tsSmall
任务Agent文件复杂度
创建共享类型builder-solver-1types/*.ts
数据库 schemabuilder-solver-2schema.prisma
配置与常量builder-solver-3config/*.ts

Wave 2: Core (2 agents in parallel, after Wave 1)

Wave 2:核心层(2个agent并行执行,依赖Wave 1)

TaskAgentFilesDepends On
User servicebuilder-solver-4services/user.tsWave 1 types
Auth servicebuilder-solver-5services/auth.tsWave 1 types
任务Agent文件依赖
用户服务builder-solver-4services/user.tsWave 1的类型定义
认证服务builder-solver-5services/auth.tsWave 1的类型定义

Wave 3: Integration (1 agent, after Wave 2)

Wave 3:集成层(1个agent,依赖Wave 2)

TaskAgentFilesDepends On
API routes + wiringbuilder-solver-6routes/*.ts, index.tsWave 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-6routes/*.ts, index.tsWave 1、Wave 2
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 摘要 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
总任务数: 6 总批次数: 3 最大并行Agent数: 3 预估提速: 比串行执行快约50-60%
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
是否按此计划执行?(y/n/修改)

如果用户选择“修改”,允许用户调整任务边界或批次分配。

---

Step 4: Execute Wave by Wave

步骤4:分批次执行

For Each Wave

每个批次的执行流程

  1. 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)
  2. 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)
  1. Track progress:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                  WAVE 1 PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ builder-solver-1 - Complete (types/*.ts)
☑ builder-solver-2 - Complete (schema.prisma)
☐ builder-solver-3 - Working... (config/*.ts)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  1. Collect outputs when wave completes
  2. Pass context to next wave - Include relevant outputs from completed waves

  1. 准备agent提示词,包含:
    • 具体任务
    • 共享契约(来自步骤2)
    • 前序批次的输出(如有)
    • 该agent负责的文件(以及禁止修改的其他文件)
  2. 并行生成agent
Task(agent: "builder-solver-1", prompt: "[任务1提示词]")
Task(agent: "builder-solver-2", prompt: "[任务2提示词]")
Task(agent: "builder-solver-3", prompt: "[任务3提示词]")
...(所有任务在同一批次中 - 并行执行)
  1. 跟踪进度
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                  Wave 1 进度
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ builder-solver-1 - 完成 (types/*.ts)
☑ builder-solver-2 - 完成 (schema.prisma)
☐ builder-solver-3 - 执行中... (config/*.ts)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  1. 批次完成后收集输出
  2. 将上下文传递给下一批次 - 包含已完成批次的相关输出

Step 5: Agent Prompt Template

步骤5:Agent提示词模板

Each builder-solver agent receives a structured prompt:
markdown
undefined
每个builder-solver agent都会收到结构化的提示词:
markdown
undefined

Builder 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

要求

  1. [Requirement 1]
  2. [Requirement 2]
  3. [Requirement 3]
  1. [要求1]
  2. [要求2]
  3. [要求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
undefined
bash
undefined

Type 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

📊 执行摘要

WaveAgentsTasksStatus
13Foundation✅ Complete
22Core Services✅ Complete
31Integration✅ Complete
Total Time: [X seconds] Sequential Estimate: [Y seconds]
Speedup: [Z%]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
批次Agent数任务状态
13基础层✅ 完成
22核心服务✅ 完成
31集成层✅ 完成
总耗时: [X秒] 串行执行预估耗时: [Y秒]
提速比例: [Z%]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📁 Files Created/Modified

📁 创建/修改的文件

Wave 1 Output

Wave 1 输出

AgentFiles Created
builder-solver-1types/user.ts, types/auth.ts
builder-solver-2prisma/schema.prisma
builder-solver-3config/index.ts, config/constants.ts
Agent创建的文件
builder-solver-1types/user.ts, types/auth.ts
builder-solver-2prisma/schema.prisma
builder-solver-3config/index.ts, config/constants.ts

Wave 2 Output

Wave 2 输出

AgentFiles Created
builder-solver-4services/user.ts
builder-solver-5services/auth.ts
Agent创建的文件
builder-solver-4services/user.ts
builder-solver-5services/auth.ts

Wave 3 Output

Wave 3 输出

AgentFiles Created
builder-solver-6routes/user.ts, routes/auth.ts, index.ts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Agent创建的文件
builder-solver-6routes/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 RequirementStatusImplemented By
User registrationbuilder-solver-4, 6
Authenticationbuilder-solver-5, 6
Session managementbuilder-solver-5
API endpointsbuilder-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:
  1. Retry once with the same prompt
  2. If still fails, report to user with error details
  3. Ask if user wants to:
    • Skip this task and continue
    • Provide guidance and retry
    • Abort the build
如果某个Agent执行失败:
  1. 使用相同提示词重试一次
  2. 如果仍然失败,向用户报告错误详情
  3. 询问用户是否希望:
    • 跳过该任务继续执行
    • 提供指导后重试
    • 终止构建

Dependency Failure

依赖失败

If Wave N fails and Wave N+1 depends on it:
  1. Block dependent waves
  2. Report the blocker
  3. Offer options: fix and continue, or abort

如果Wave N执行失败,且Wave N+1依赖于它:
  1. 阻塞依赖的批次
  2. 报告阻塞问题
  3. 提供选项:修复后继续,或终止

Configuration Options

配置选项

OptionDefaultDescription
Max parallel agents5Maximum agents running simultaneously
Agent timeout5 minMax time per agent
Auto-verifytrueRun type check/lint after completion
Show progresstrueDisplay progress updates
User can specify:
parallel-builder with 3 max agents

选项默认值描述
最大并行Agent数5同时运行的最大Agent数量
Agent超时时间5分钟每个Agent的最长执行时间
自动验证true完成后自动运行类型检查/代码检查
显示进度true显示进度更新
用户可以指定:
parallel-builder with 3 max agents

Agents

Agent

10 builder solver agents in
agents/
directory:
  • builder-solver-1
    through
    builder-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/
目录下有10个builder solver agent:
  • builder-solver-1
    builder-solver-10
所有Agent的特性:
  • 相同的指令(专注于实现分配的模块)
  • 较低的温度值(0.4)以保证一致性
  • 完整的工具权限(读取、写入、Grep、Glob、LS、Shell)
  • 遵守文件归属边界
  • 严格遵循共享契约

Difference from Other Skills

与其他技能的区别

Aspectdebug-councilfeature-councilparallel-builder
InputBug to fixFeature to buildSpec/plan to implement
Agent taskSame problemSame featureDifferent pieces
GoalFind correct fixDiverse approachesFast parallel execution
SelectionMajority voteSynthesis/mergeIntegration
SpeedN agents, 1 problemN agents, 1 featureN pieces, ~N× speedup

维度debug-councilfeature-councilparallel-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. 执行时保持相同的架构