feature-council

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Feature Council: Multi-Agent Feature Implementation

Feature Council:多Agent功能实现

Spawns multiple agents to implement the same feature independently, then synthesizes the best parts from each. Unlike code-council (majority voting for bugs), this skill merges strengths because features have multiple valid approaches.
Use this for complex features where you want diverse implementations and comprehensive coverage.
生成多个Agent独立实现同一功能,然后整合各实现中的最优部分。与code-council(针对Bug的多数投票机制)不同,该技能会融合各Agent的优势,因为功能实现存在多种有效方案。
适用于需要多样化实现方案和全面覆盖的复杂功能场景。

Step 0: Ask User How Many Agents

步骤0:询问用户使用的Agent数量

Before doing anything else, ask the user how many solver agents to use:
How many solver agents would you like me to use? (3-10)

Recommendations:
- 3 agents: Faster, good for straightforward features
- 5 agents: Good balance of diversity and speed
- 7 agents: Comprehensive coverage
- 10 agents: Maximum diversity (complex features)

Note: Each agent will independently implement the entire feature.
More agents = more diverse approaches and edge case coverage.
Wait for the user's response. If they specified a number (e.g., "feature council of 5"), use that.
Minimum: 3 agents | Maximum: 10 agents

在执行任何操作前,询问用户需要使用的求解Agent数量
How many solver agents would you like me to use? (3-10)

Recommendations:
- 3 agents: Faster, good for straightforward features
- 5 agents: Good balance of diversity and speed
- 7 agents: Comprehensive coverage
- 10 agents: Maximum diversity (complex features)

Note: Each agent will independently implement the entire feature.
More agents = more diverse approaches and edge case coverage.
等待用户回复。如果用户指定了数量(例如“feature council of 5”),则使用该数量。
最低:3个Agent | 最高:10个Agent

CRITICAL: Pure Independence

核心要求:完全独立

What This Means

具体含义

  1. NO orchestrator exploration - Do NOT read files or gather context before spawning agents
  2. Raw user prompt to all agents - Each agent gets the user's original request, unchanged
  3. Each agent explores independently - Agents discover the codebase themselves
  4. Each agent implements fully - Complete, working implementations
  1. 禁止编排器预探索 - 在生成Agent前,不要读取文件或收集上下文信息
  2. 原始用户请求直接发给所有Agent - 每个Agent收到的都是未修改的原始用户请求
  3. 每个Agent独立探索 - Agent自行探索代码库
  4. 每个Agent完整实现功能 - 产出可运行的完整实现方案

Why This Matters

重要性

Independent implementations mean:
  • Different architectural choices to compare
  • Different edge cases discovered
  • Different error handling approaches
  • More comprehensive final solution

独立实现意味着:
  • 可对比不同的架构选择
  • 能发现不同的边缘场景
  • 可采用不同的错误处理方案
  • 最终方案更全面

Workflow

工作流程

Step 1: Capture the Raw User Prompt

步骤1:捕获原始用户请求

Take the user's request exactly as stated. Do NOT:
  • ❌ Read files first
  • ❌ Explore the codebase
  • ❌ Add context
  • ❌ Rephrase or enhance the prompt
Just capture what the user said.
原样记录用户的请求。禁止:
  • ❌ 先读取文件
  • ❌ 探索代码库
  • ❌ 添加上下文
  • ❌ 改写或优化请求
只需记录用户的原始表述。

Step 2: Spawn Agents IN PARALLEL with RAW PROMPT

步骤2:并行生成Agent并下发原始请求

Spawn ALL agents simultaneously. Each gets the exact same raw prompt:
Task(agent: "feature-solver-1", prompt: "[USER'S EXACT WORDS]")
Task(agent: "feature-solver-2", prompt: "[USER'S EXACT WORDS]")
Task(agent: "feature-solver-3", prompt: "[USER'S EXACT WORDS]")
... (all in the SAME batch - parallel execution)
DO NOT modify the prompt. DO NOT add context. Raw user words only.
同时生成所有Agent。每个Agent收到完全相同的原始请求
Task(agent: "feature-solver-1", prompt: "[USER'S EXACT WORDS]")
Task(agent: "feature-solver-2", prompt: "[USER'S EXACT WORDS]")
Task(agent: "feature-solver-3", prompt: "[USER'S EXACT WORDS]")
... (all in the SAME batch - parallel execution)
禁止修改请求,禁止添加上下文,仅下发用户原始表述。

Step 3: Agents Work Independently

步骤3:Agent独立工作

Each agent will:
  1. Read and understand the user's feature request
  2. Explore the codebase to understand existing patterns
  3. Design their approach
  4. Implement the complete feature
  5. Handle edge cases they identify
  6. Verify their implementation
Each agent works in complete isolation.
每个Agent会:
  1. 读取并理解用户的功能需求
  2. 探索代码库以理解现有模式
  3. 设计实现方案
  4. 完成功能的完整实现
  5. 处理其识别到的边缘场景
  6. 验证实现方案
每个Agent完全独立工作。

Step 4: Track Progress & Collect Solutions

步骤4:跟踪进度并收集实现方案

As agents complete, show progress to the user:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                     AGENT PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ Agent 1 - Complete
☑ Agent 2 - Complete  
☑ Agent 3 - Complete
☐ Agent 4 - Working...
☐ Agent 5 - Working...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Collect all outputs when complete.
当Agent完成任务时,向用户展示进度
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                     AGENT PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ Agent 1 - Complete
☑ Agent 2 - Complete  
☑ Agent 3 - Complete
☐ Agent 4 - Working...
☐ Agent 5 - Working...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
所有Agent完成后,收集全部产出。

Step 5: Analyze & Compare Implementations

步骤5:分析与对比实现方案

DO NOT use majority voting. Instead, analyze each implementation for:
CategoryWhat to Look For
ArchitectureDesign patterns, code organization, modularity
Edge CasesWhat edge cases did each agent handle?
Error HandlingHow robust is the error handling?
Type SafetyType definitions, null checks, validation
PerformanceEfficiency, caching, optimization
MaintainabilityReadability, documentation, testability
Codebase FitHow well does it match existing patterns?
Create a comparison matrix:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                  IMPLEMENTATION COMPARISON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

| Aspect          | Agent 1 | Agent 2 | Agent 3 | Agent 4 | Agent 5 |
|-----------------|---------|---------|---------|---------|---------|
| Architecture    | MVC     | Service | MVC     | MVC     | Modular |
| Edge Cases      | 3       | 5       | 4       | 3       | 6       |
| Error Handling  | Basic   | Robust  | Good    | Basic   | Robust  |
| Type Safety     | ✓       | ✓✓      | ✓       | ✓       | ✓✓      |
| Codebase Match  | 90%     | 75%     | 95%     | 85%     | 80%     |

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
禁止使用多数投票机制。应从以下维度分析每个实现方案:
维度评估要点
架构设计设计模式、代码组织、模块化程度
边缘场景每个Agent处理了哪些边缘场景?
错误处理错误处理的健壮性如何?
类型安全类型定义、空值检查、验证逻辑
性能表现效率、缓存机制、优化措施
可维护性可读性、文档、可测试性
代码库适配度与现有代码模式的匹配程度?
创建对比矩阵:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                  IMPLEMENTATION COMPARISON
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

| Aspect          | Agent 1 | Agent 2 | Agent 3 | Agent 4 | Agent 5 |
|-----------------|---------|---------|---------|---------|---------|
| Architecture    | MVC     | Service | MVC     | MVC     | Modular |
| Edge Cases      | 3       | 5       | 4       | 3       | 6       |
| Error Handling  | Basic   | Robust  | Good    | Basic   | Robust  |
| Type Safety     | ✓       | ✓✓      | ✓       | ✓       | ✓✓      |
| Codebase Match  | 90%     | 75%     | 95%     | 85%     | 80%     |

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Step 6: Synthesize Best Solution

步骤6:合成最优方案

Combine the best elements from each agent:
  1. Select base implementation - Choose the one that best matches codebase patterns
  2. Incorporate edge cases - Add edge cases from other agents the base missed
  3. Enhance error handling - Use the most robust error handling approach
  4. Improve type safety - Merge type definitions and validations
  5. Document sources - Track which elements came from which agent
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                     SYNTHESIS DECISION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Base: Agent 3 (best codebase pattern match)

Incorporating from other agents:
├─ Agent 2: Robust error handling pattern
├─ Agent 5: Edge cases for [empty input, concurrent access]
├─ Agent 2: Type definitions for [UserInput, ValidationResult]
└─ Agent 4: Caching optimization

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
整合每个Agent实现中的最优元素
  1. 选择基础实现方案 - 选择与代码库模式匹配度最高的实现作为基础
  2. 补充边缘场景处理 - 添加基础方案遗漏的、其他Agent覆盖的边缘场景
  3. 增强错误处理 - 采用最健壮的错误处理方案
  4. 提升类型安全 - 合并各Agent的类型定义与验证逻辑
  5. 记录来源 - 跟踪每个元素来自哪个Agent
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                     SYNTHESIS DECISION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Base: Agent 3 (best codebase pattern match)

Incorporating from other agents:
├─ Agent 2: Robust error handling pattern
├─ Agent 5: Edge cases for [empty input, concurrent access]
├─ Agent 2: Type definitions for [UserInput, ValidationResult]
└─ Agent 4: Caching optimization

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Step 7: Create Finalized Implementation Plan

步骤7:制定最终实现计划

Before implementing, create a detailed execution plan from the synthesized solution:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                 📋 IMPLEMENTATION PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
在执行实现前,基于合成方案创建详细的执行计划
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                 📋 IMPLEMENTATION PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Files to Create

Files to Create

#File PathPurposeSource
1path/to/NewService.tsMain service classAgent 3 base
2path/to/types.tsType definitionsAgent 2
3path/to/utils.tsHelper functionsAgent 5
#File PathPurposeSource
1path/to/NewService.tsMain service classAgent 3 base
2path/to/types.tsType definitionsAgent 2
3path/to/utils.tsHelper functionsAgent 5

Files to Modify

Files to Modify

#File PathChangesSource
1path/to/index.tsAdd exportAgent 3
2path/to/config.tsAdd config entryAgent 4
3path/to/app.tsRegister serviceAgent 3
#File PathChangesSource
1path/to/index.tsAdd exportAgent 3
2path/to/config.tsAdd config entryAgent 4
3path/to/app.tsRegister serviceAgent 3

Implementation Order

Implementation Order

  1. Create types.ts (no dependencies)
    • Define interfaces and types
    • From: Agent 2
  2. Create utils.ts (depends on types)
    • Add helper functions
    • From: Agent 5
  3. Create NewService.ts (depends on types, utils)
    • Main implementation
    • From: Agent 3 + Agent 2 error handling
  4. Modify config.ts (no dependencies)
    • Add configuration
    • From: Agent 4
  5. Modify index.ts (depends on NewService)
    • Export new service
    • From: Agent 3
  6. Modify app.ts (depends on all above)
    • Register and initialize
    • From: Agent 3
  1. Create types.ts (no dependencies)
    • Define interfaces and types
    • From: Agent 2
  2. Create utils.ts (depends on types)
    • Add helper functions
    • From: Agent 5
  3. Create NewService.ts (depends on types, utils)
    • Main implementation
    • From: Agent 3 + Agent 2 error handling
  4. Modify config.ts (no dependencies)
    • Add configuration
    • From: Agent 4
  5. Modify index.ts (depends on NewService)
    • Export new service
    • From: Agent 3
  6. Modify app.ts (depends on all above)
    • Register and initialize
    • From: Agent 3

Edge Cases to Handle

Edge Cases to Handle

Edge CaseHow HandledSource
Empty inputReturn early with defaultAgent 5
Null valuesNull coalescing + validationAgent 2
Concurrent accessMutex lockAgent 5
Network timeoutRetry with backoffAgent 4
Edge CaseHow HandledSource
Empty inputReturn early with defaultAgent 5
Null valuesNull coalescing + validationAgent 2
Concurrent accessMutex lockAgent 5
Network timeoutRetry with backoffAgent 4

Error Handling Strategy

Error Handling Strategy

  • Pattern: [from Agent 2]
  • Logging: [approach]
  • Recovery: [approach]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

This plan ensures:
- Correct dependency order
- All edge cases addressed
- Clear traceability to source agents
  • Pattern: [from Agent 2]
  • Logging: [approach]
  • Recovery: [approach]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

该计划确保:
- 依赖顺序正确
- 所有边缘场景都被覆盖
- 可清晰追溯元素来源Agent

Step 8: Execute Implementation Plan

步骤8:执行实现计划

Follow the plan step-by-step. For each step:
  1. Create/modify the file as specified
  2. Verify it matches the synthesized approach
  3. Move to next step
逐步执行计划。每一步:
  1. 按要求创建/修改文件
  2. 验证是否符合合成方案
  3. 进入下一步

Step 9: Report Results

步骤9:汇报结果

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                    FEATURE COUNCIL RESULTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                    FEATURE COUNCIL RESULTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Implementation Comparison

📊 Implementation Comparison

AgentArchitectureEdge CasesError HandlingCodebase Fit
1[approach][count][quality][%]
2[approach][count][quality][%]
...............
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
AgentArchitectureEdge CasesError HandlingCodebase Fit
1[approach][count][quality][%]
2[approach][count][quality][%]
...............
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🔍 What Each Agent Contributed

🔍 What Each Agent Contributed

Agent 1

Agent 1

  • Approach: [brief description]
  • Unique strength: [what this agent did best]
  • Used in final: [what was incorporated]
  • Approach: [brief description]
  • Unique strength: [what this agent did best]
  • Used in final: [what was incorporated]

Agent 2

Agent 2

  • Approach: [brief description]
  • Unique strength: [what this agent did best]
  • Used in final: [what was incorporated]
... (for each agent)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  • Approach: [brief description]
  • Unique strength: [what this agent did best]
  • Used in final: [what was incorporated]
... (for each agent)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📋 Implementation Plan Executed

📋 Implementation Plan Executed

StepFileActionStatus
1path/to/types.tsCreated
2path/to/utils.tsCreated
3path/to/Service.tsCreated
4path/to/config.tsModified
5path/to/index.tsModified
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
StepFileActionStatus
1path/to/types.tsCreated
2path/to/utils.tsCreated
3path/to/Service.tsCreated
4path/to/config.tsModified
5path/to/index.tsModified
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

🧬 Synthesis Breakdown

🧬 Synthesis Breakdown

ElementSource AgentReason
Base architectureAgent 3Best codebase pattern match (95%)
Error handlingAgent 2Most comprehensive try/catch + logging
Edge case: empty inputAgent 5Only agent that handled this
Edge case: concurrentAgent 5Race condition prevention
Type definitionsAgent 2Strictest typing
Caching layerAgent 4Performance optimization
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ElementSource AgentReason
Base architectureAgent 3Best codebase pattern match (95%)
Error handlingAgent 2Most comprehensive try/catch + logging
Edge case: empty inputAgent 5Only agent that handled this
Edge case: concurrentAgent 5Race condition prevention
Type definitionsAgent 2Strictest typing
Caching layerAgent 4Performance optimization
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📈 Final Solution Quality

📈 Final Solution Quality

  • Edge Cases Covered: [total unique from all agents]
  • Error Handling: [description]
  • Codebase Fit: [% and explanation]
  • Type Safety: [description]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  • Edge Cases Covered: [total unique from all agents]
  • Error Handling: [description]
  • Codebase Fit: [% and explanation]
  • Type Safety: [description]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Implemented Solution

✅ Implemented Solution

[The synthesized implementation]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[The synthesized implementation]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

📁 Files Created/Modified

📁 Files Created/Modified

[List of all files with brief descriptions]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

---
[List of all files with brief descriptions]
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

---

Configuration

配置选项

ModeAgentsUse Case
feature council of 3
3Simple features, faster
feature council of 5
5Good balance
feature council of 7
7Complex features
feature council of 10
10Maximum coverage
If user just says
feature council
, ask them to choose.

模式Agent数量适用场景
feature council of 3
3简单功能,速度更快
feature council of 5
5平衡多样性与速度
feature council of 7
7复杂功能
feature council of 10
10最大覆盖范围
如果用户仅输入
feature council
,请让用户选择具体数量。

Difference from Code Council

与Code Council的区别

AspectCode CouncilFeature Council
PurposeBug fixes, algorithmsFeature implementation
SelectionMajority votingSynthesis/merge
OutputSingle winning solutionBest-of-all combined
MetricCorrectness consensusComprehensiveness

维度Code CouncilFeature Council
用途Bug修复、算法实现功能实现
选择机制多数投票合成/整合
输出单一胜出方案整合所有优势的方案
评估指标正确性共识全面性

Agents

Agent说明

10 feature solver agents in
agents/
directory:
  • feature-solver-1
    through
    feature-solver-10
All agents:
  • Same instructions (focused on feature implementation)
  • Same temperature (0.7)
  • Same tools (Read, Grep, Glob, LS)
  • Use ultrathink (extended thinking)
  • Emphasize codebase pattern matching and edge case coverage

agents/
目录下有10个功能求解Agent:
  • feature-solver-1
    feature-solver-10
所有Agent:
  • 遵循相同指令(聚焦功能实现)
  • 相同温度参数(0.7)
  • 相同工具集(Read、Grep、Glob、LS)
  • 使用ultrathink(扩展思考能力)
  • 强调匹配代码库模式与覆盖边缘场景

Why Synthesis > Voting for Features

为何功能实现更适合合成而非投票

With bugs, there's ONE correct answer. With features:
  • Multiple valid architectures exist
  • One agent might catch edge cases others miss
  • Error handling approaches can be combined
  • Type safety can be merged
Synthesis captures the union of good ideas rather than picking one.

Bug修复通常只有一个正确答案,但功能实现:
  • 存在多种有效架构
  • 不同Agent可能发现其他Agent遗漏的边缘场景
  • 错误处理方案可整合
  • 类型安全逻辑可合并
合成机制能捕捉所有优秀想法的集合,而非仅选择某一个方案。

When to Use

适用场景

Use feature-council for:
  • Complex features with many edge cases
  • Features where you're unsure of best approach
  • High-stakes production code
  • When you want comprehensive coverage
Don't use for:
  • Simple CRUD operations
  • Bug fixes (use code-council instead)
  • When speed matters more than coverage
推荐使用Feature Council的场景:
  • 存在大量边缘场景的复杂功能
  • 不确定最优实现方案的功能
  • 高风险生产代码
  • 需要全面覆盖的功能
不推荐使用的场景:
  • 简单CRUD操作
  • Bug修复(请使用Code Council)
  • 优先考虑速度而非覆盖范围的场景