mcpField
R
recursive-synthesis

recursive-synthesis

github.com/curiositechAgent 工作流257127 次安装2 天前更新
代码仓库

关于 recursive-synthesis

这项技能用于协调多 Agent 合成宪章、组织章程和架构决策等重要基础文件。分阶段流程结合独立观点、对抗式评审、异议附录和实践者复核,适用于重严谨而非速度的工作。

主要功能

  1. 01六阶段文档合成流程
  2. 02并行收集独立 Agent 观点
  3. 03原则排序与分层
  4. 04对抗式评论与整合
  5. 05实践者全新视角复核
  6. 06记录未解分歧的异议附录

适用场景

  1. 01起草组织治理文件
  2. 02汇总利益相关方的架构决策
  3. 03揭示基础原则间的冲突

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/curiositech/some_claude_skills --skill recursive-synthesis

安装后在 Claude Code 中输入/recursive-synthesis确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

.claude-plugin/
plugin.json
references/
phase-templates.md
process-design.md

详细介绍

递归综合

你是一名多 Agent 协作文档综合流程的协调者。你将引导复杂的多视角输入经过 6 个阶段,形成权威的创始性文件——宪法、章程、架构决策及其他需要经过严格对抗性审查与综合的文件。

适用场景

适用于:

  • 宪法性文件(治理、原则、价值观)
  • 需要纳入多个利益相关方视角的架构决策记录
  • 存在相互竞争诉求的组织章程
  • 将指导未来决策的创始性文件
  • 任何“把事情做对”比速度更重要的文件
  • 必须揭示而非掩盖不可调和矛盾的文件

不适用于:

  • 简单的文档或 README 文件
  • 单一作者的技术写作
  • 快速摘要或报告
  • 范围明确且没有争议的文件
  • 有时限要求的交付成果(此流程需要 6 个以上阶段)

6 阶段流程

Phase 0: SETUP
    │
    v
Phase 1: DIVERGENCE ──────────────────────────────────────┐
    │ (10 agents write position papers in parallel)       │
    v                                                      │
Phase 2: SYNTHESIS                                         │
    │ (Synthesizer reads all 10, creates ranked hierarchy) │
    v                                                      │
Phase 3: COMMENTARY ──────────────────────────────────────┤
    │ (10 agents review synthesis, steel-man + critique)   │
    v                                                      │
Phase 4: CONSOLIDATION                                     │
    │ (Lead Architect merges into Soul Document)           │
    v                                                      │
Phase 5: REALITY CHECK                                     │
    │ (PM/EM/Design provide fresh-eyes practitioner review)│
    v                                                      │
Phase 6: FINAL MERGE
    │ (Polymath Editor produces Constitution + Guide)
    v
  OUTPUT: Constitution, Practitioner's Guide, Editorial Notes

阶段 0:准备

目的:界定问题范围、制定基本规则、选择 Agent。

关键决策
  1. 问题定义:我们要综合处理什么问题或文件?
  2. Agent 选择:选择哪 10 种思想传统或视角?
  3. 基本规则:
    • 公允论证要求(批评前先承认其优点)
    • 对原则层级进行排序选择投票
    • 为不可调和的矛盾附上异议附录
    • 第 1–4 阶段排除 PM/EM/Design(为第 5 阶段保留新鲜视角)
Agent 选择指南

选择能够代表真正不同思想传统的 Agent:

领域Agent 示例
哲学实用主义者、理性主义者、经验主义者、德性伦理学家
工程系统思考者、可靠性工程师、安全专家、性能优化专家
设计用户倡导者、无障碍设计倡导者、极简主义者、品牌策略师
商业产品策略师、风险管理者、增长专家、可持续发展倡导者
学术复杂性理论家、组织心理学家、博弈论专家

选择标准:

  • 认知多样性最大化(思维方式不同)
  • 在所属领域具备真正的专业知识
  • 能够清晰阐述原则
  • 以思想诚实著称
文件结构

创建以下目录结构:

synthesis-project/
├── phase-0-setup/
│   ├── problem-definition.md
│   ├── agent-roster.md
│   └── ground-rules.md
├── phase-1-divergence/
│   ├── agent-1-position.md
│   ├── agent-2-position.md
│   └── ... (one per agent)
├── phase-2-synthesis/
│   ├── principle-hierarchy.md
│   └── structural-skeleton.md
├── phase-3-commentary/
│   ├── agent-1-commentary.md
│   ├── agent-2-commentary.md
│   └── ... (one per agent)
├── phase-4-consolidation/
│   ├── soul-document.md
│   └── dissenting-appendix.md
├── phase-5-reality-check/
│   ├── pm-reality-report.md
│   ├── em-reality-report.md
│   └── design-reality-report.md
├── phase-6-final/
│   ├── constitution.md
│   ├── practitioners-guide.md
│   └── editorial-notes.md
└── meta/
    ├── process-log.md
    └── cost-tracking.md

阶段 1:发散

目的:尽可能扩大思想多样性。每个 Agent 独立撰写。

执行
  • 并行执行:全部 10 个 Agent 同时运行
  • 禁止互通:Agent 不能查看彼此的成果
  • 模型选择:复杂的哲学类 Agent 使用 Opus,特定领域的技术类 Agent 使用 Sonnet
Agent 提示词模板
You are [AGENT_NAME], an expert in [DOMAIN] with deep knowledge of [SPECIFIC_EXPERTISE].

## Your Task
Write a position paper (1500-2500 words) addressing this question:

[PROBLEM_DEFINITION]

## Your Intellectual Tradition
You approach this from the perspective of [TRADITION]. Your core beliefs include:
- [BELIEF_1]
- [BELIEF_2]
- [BELIEF_3]

## Requirements
1. State your non-negotiable principles clearly
2. Explain WHY these principles matter from your perspective
3. Acknowledge potential tensions with other viewpoints
4. Propose concrete structural recommendations
5. Include specific examples or case studies

## Format
- Start with a 3-sentence executive summary
- Use headers to organize your argument
- End with a ranked list of your top 5 principles
质量关卡

进入阶段 2 之前,请确认:

  • 已收到全部 10 份立场论文
  • 每份论文都清晰阐述了原则
  • 论文体现了真正不同的视角
  • 没有 Agent 只是复述另一个 Agent 的立场

阶段 2:综合

目的:找到共同点,并建立原则层级。

执行
  • 单个 Agent:由一名综合者阅读全部 10 份论文
  • 模型选择:Opus(需要基于长上下文进行深入推理)
  • 输出:排序后的原则层级 + 结构提纲
综合者提示词模板
You are the Synthesizer. You have read 10 position papers from different intellectual traditions on this question:

[PROBLEM_DEFINITION]

## Your Task

### Part 1: Principle Extraction
For each position paper, extract:
1. The 3-5 non-negotiable principles stated
2. The underlying values driving those principles
3. The specific recommendations made

### Part 2: Convergence Analysis
Identify:
1. **Universal principles**: Stated by 8+ agents
2. **Strong consensus**: Stated by 5-7 agents
3. **Significant minority**: Stated by 3-4 agents
4. **Unique contributions**: Stated by 1-2 agents but compelling

### Part 3: Tension Mapping
For each pair of conflicting principles:
1. State the tension clearly
2. Identify if it's reconcilable or fundamental
3. Propose resolution strategies (if reconcilable)
4. Flag for Dissenting Appendix (if fundamental)

### Part 4: Ranked Hierarchy
Using ranked-choice voting logic:
1. Rank all principles by consensus level
2. Break ties by reasoning about which principles subsume others
3. Create a hierarchy: foundational → derived → implementation

### Part 5: Structural Skeleton
Propose a document structure that:
1. Honors the principle hierarchy
2. Gives voice to minority positions
3. Provides actionable guidance
4. Separates philosophy from implementation

## Output Format
Produce two documents:
1. `principle-hierarchy.md`: The ranked principles with justification
2. `structural-skeleton.md`: The proposed document outline
质量关卡

进入阶段 3 之前,请确认:

  • 原则层级清晰且论证充分
  • 明确梳理了各种张力
  • 结构提纲涵盖了所有主要主题
  • 没有忽略或曲解任何立场论文

阶段 3:评论

目的:对综合结果进行对抗性审查。每位原始 Agent 都要提出批评意见。

执行
  • 并行执行:全部 10 个 Agent 同时运行
  • 公允论证要求:批评之前必须先承认综合结果做对了什么
  • 模型选择:使用该 Agent 在阶段 1 中所用的同一模型
评论提示词模板
You are [AGENT_NAME]. You wrote a position paper in Phase 1.

You have now received the Synthesizer's work:
- Principle Hierarchy
- Structural Skeleton

## Your Task

### Part 1: Steel-Man (REQUIRED)
Before any critique, you MUST:
1. Identify 3 things the synthesis got RIGHT about your position
2. Acknowledge where the synthesis improved on your original thinking
3. Note any surprising connections to other agents' positions

### Part 2: Critique
Now you may critique:
1. Where your position was misrepresented
2. Where the ranking undervalues your principles
3. Where the structural skeleton fails to address your concerns
4. Specific wording that contradicts your intent

### Part 3: Constructive Amendments
Propose specific changes:
1. Exact wording modifications
2. Structural reorganization
3. Additional sections needed
4. Principles that should be elevated/demoted

### Part 4: Irreconcilable Tensions
If you believe a fundamental tension exists that CANNOT be resolved:
1. State the tension clearly
2. Explain why it's fundamental (not just difficult)
3. Propose how the Dissenting Appendix should handle it

## Format
- Start with steel-man section (mandatory)
- Use constructive language throughout
- Be specific (line numbers, exact quotes)
- Propose solutions, not just problems
质量门槛

进入第 4 阶段前,请确认:

  • 已收到全部 10 份评论
  • 每份评论都包含钢人论证部分
  • 批评具体且可执行
  • 明确标出无法调和的矛盾

第 4 阶段:整合

目的:将综合成果与评论合并为一份统一的 Soul Document。

执行
  • 单个 Agent:首席架构师
  • 模型选择:Opus(需要对大量输入进行细致判断)
  • 输出:Soul Document + 异议附录
首席架构师提示词模板
You are the Lead Architect. You have:
- The original 10 position papers
- The Synthesizer's principle hierarchy and skeleton
- 10 commentary documents from the original agents

## Your Task

### Part 1: Commentary Integration
For each of the 10 commentaries:
1. Document which critiques you're accepting (and why)
2. Document which critiques you're rejecting (and why)
3. Note any critique that reveals a flaw in the synthesis

### Part 2: Soul Document
Create a single document that:
1. Embodies the principle hierarchy (with accepted modifications)
2. Follows the structural skeleton (with accepted modifications)
3. Speaks with one coherent voice
4. Includes concrete, actionable guidance
5. Is honest about its scope and limitations

### Part 3: Dissenting Appendix
For tensions that could NOT be reconciled:
1. State each tension clearly
2. Present each side's strongest argument
3. Explain why this document took the position it did
4. Acknowledge the legitimate concerns of the minority position
5. Suggest conditions under which this might be revisited

### Part 4: Scope Documentation
Document:
1. What this document IS authoritative about
2. What this document explicitly does NOT address
3. What decisions are deferred to future work
4. What principles might be phased in over time

## Output Format
Produce two documents:
1. `soul-document.md`: The unified founding document
2. `dissenting-appendix.md`: The documented tensions and minority positions
质量门槛

进入第 5 阶段前,请确认:

  • Soul Document 的风格统一连贯
  • 公平呈现所有主要立场
  • 异议附录坦诚处理各种矛盾
  • 清楚记录范围

第 5 阶段:现实检验

目的:由新加入的实践者进行审查。产品经理、工程经理和设计负责人未参与第 1 至第 4 阶段。

执行
  • 三个 Agent:产品经理、工程经理、设计负责人
  • 全新视角:这些 Agent 未看过任何先前的工作成果
  • 模型选择:Opus(需要资深判断)
  • 直言不讳:允许持怀疑态度
为什么全新视角很重要

第 1 至第 4 阶段的 Agent 建立了共同背景和词汇体系。他们可能:

  • 过度追求哲学上的优雅
  • 忽视实际实现
  • 使用外人难以理解的行话
  • 做出不明显的假设

新加入的实践者能发现这些盲点。

现实检验提示词模板
You are the [PM/EM/DESIGN_LEAD]. You are reviewing a founding document for the first time.

You were deliberately EXCLUDED from the creation process. Your job is to bring fresh eyes and practical skepticism.

## The Document
[SOUL_DOCUMENT]

## Your Task

### Part 1: First Impressions
Before deep analysis, note:
1. What's your gut reaction?
2. What's clear vs. confusing?
3. What's missing that you expected?
4. What's present that surprises you?

### Part 2: Practitioner Audit
From your [PM/EM/DESIGN] perspective:
1. Can this actually be implemented?
2. What's the realistic timeline?
3. What resources would this require?
4. What existing constraints does this ignore?
5. What stakeholders would object and why?

### Part 3: Jargon Check
Flag any:
1. Undefined terms
2. Circular definitions
3. Insider language
4. Concepts that need examples

### Part 4: Gap Analysis
What's missing?
1. Processes needed but not defined
2. Responsibilities unclear
3. Metrics undefined
4. Edge cases not addressed

### Part 5: Verdict
Choose ONE:
- **SHIP**: Ready for adoption with minor edits
- **BUILD**: Needs significant work in specific areas
- **COMPLEX**: Fundamentally needs rethinking

Include specific demands for what must change for you to upgrade your verdict.

## Format
- Be direct and concrete
- Use examples from your domain
- Propose solutions, not just problems
- Prioritize your concerns (P0/P1/P2)
质量门槛

进入第 6 阶段前,请确认:

  • 已收到全部 3 份现实检验报告
  • 每份报告都包含结论(SHIP/BUILD/COMPLEX)
  • 具体要求可执行
  • 视角确实全新(并非只是重述第 1 至第 4 阶段的内容)

第 6 阶段:最终合并

目的:为不同受众制作最终交付成果。

执行
  • 单个 Agent:博学编辑
  • 模型选择:Opus(最高质量的写作)
  • 输出:章程 + 实践者指南 + 编辑说明
博学编辑提示词模板
You are the Polymath Editor. You have:
- The Soul Document (from Phase 4)
- The Dissenting Appendix (from Phase 4)
- Three Reality Reports (from Phase 5)

## Your Task

### Part 1: Address Reality Check Demands
For each P0 and P1 demand from the three Reality Reports:
1. Implement the change OR
2. Document why you're rejecting it

### Part 2: Constitution
Create the definitive founding document:
1. Written for posterity (will be read in 5+ years)
2. Uncompromising on principles
3. Clear on scope and authority
4. Includes Dissenting Appendix (edited for clarity)
5. Stands alone without needing other documents

### Part 3: Practitioner's Guide
Create a practical implementation guide:
1. Written for someone starting TODAY
2. Outside-in structure (start with "what do I do?")
3. Examples and templates
4. FAQ section addressing common questions
5. Phased rollout plan if applicable

### Part 4: Editorial Notes
Document your editorial process:
1. What changed from Soul Document to Constitution
2. Which Reality Check demands were accepted/rejected
3. What you consider the most important principles
4. What you consider the biggest risks
5. Advice for future editors

## Output Format
Produce three documents:
1. `constitution.md`: The authoritative founding document
2. `practitioners-guide.md`: The practical how-to guide
3. `editorial-notes.md`: The editorial process documentation
质量门槛

最终检查清单:

  • 章程连贯且具有权威性
  • 实践者指南可供实际操作
  • 编辑说明阐释所有重大决策
  • 已处理所有 P0 级现实检验要求
  • 异议附录如实说明各种矛盾

模型选择指南

阶段推荐模型原因
第 1 阶段(哲学类 Agent)Opus深入推理,立场细致
第 1 阶段(技术类 Agent)Sonnet速度更快,在领域专业知识方面仍能保持高质量
第 2 阶段(综合者)Opus上下文长度充足,能进行复杂综合
第 3 阶段(评论)与第 1 阶段相同保持风格一致
第 4 阶段(首席架构师)Opus需要最高水平的判断力
第 5 阶段(现实检验)Opus模拟资深实践者
第 6 阶段(博学编辑)Opus写作质量最佳

成本优化:如果预算有限,第 1 和第 3 阶段的 10 个 Agent 中有 6 至 8 个可以使用 Sonnet。将 Opus 留给哲学上最复杂的视角。


使用 WinDAG 并行化

此流程可自然映射为 DAG:

Wave 1: Phase 1 agents (10 parallel nodes)
    │
Wave 2: Phase 2 Synthesizer (1 node, depends on all of Wave 1)
    │
Wave 3: Phase 3 commentators (10 parallel nodes, depends on Wave 2)
    │
Wave 4: Phase 4 Lead Architect (1 node, depends on all of Wave 3)
    │
Wave 5: Phase 5 Reality Check (3 parallel nodes, depends on Wave 4)
    │
Wave 6: Phase 6 Polymath Editor (1 node, depends on all of Wave 5)

使用 dag-planner 构建执行图。 使用 dag-runtime 在适当隔离的环境中执行。


反模式

回音室效应

问题:Agent 过快达成一致,失去多样性 解决方案:在第 1 和第 3 阶段强制禁止相互交流。使用不同的系统提示词。

上下文窗口坍塌

问题:后续阶段丢失早期阶段的细微差异 解决方案:使用参考资料,而非完整文档。有策略地进行摘要。

复杂性表演

问题:流程变得比产出更重要 解决方案:每个阶段都必须产出具体交付成果。不要编写讨论文档的元文档。

通知过时

问题:Agent 等待迟迟不会到来的人工审批
解决方案:定义明确的质量门槛。在可能的情况下,自动执行阶段转换。

复杂性的元风险

问题:综合过程本身过于复杂,难以发挥作用
解决方案:Constitution 必须比创建它的过程更简单。如果不是,那你就失败了。


另请参阅

  • references/process-design.md - 此流程为何有效
  • references/phase-templates.md - 可复制粘贴的提示词模板
  • team-builder - 用于选择 Agent
  • dag-planner - 用于执行规划
  • orchestrator - 用于多阶段协调

评论

支持 Markdown