mcpField
P
propose-hypotheses

propose-hypotheses

github.com/neolabhqAgent 工作流1.8k1.2k 次安装9 周前更新
代码仓库

关于 propose-hypotheses

一项 Claude Skill,按 First Principles Framework 流程提出并评估多个假设,最终记录决策。它组织逻辑核验、证据验证和可信度审查,并将产物保存于 `.fpf/`。

主要功能

  1. 01生成多个竞争假设
  2. 02核验假设逻辑
  3. 03验证支持证据
  4. 04审查证据可信度
  5. 05创建决策记录

适用场景

  1. 01比较问题的不同解释
  2. 02决策前检查推理与证据
  3. 03整理假设和决策产物

安装

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

$npx skills add https://github.com/neolabhq/context-engineering-kit --skill propose-hypotheses

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

详细介绍

提出假设工作流

执行第一性原理框架(FPF)循环:生成相互竞争的假设、验证逻辑、核验证据、审计可信度,并作出决策。

用户输入

Problem Statement: $ARGUMENTS

工作流执行

步骤 1a:创建目录结构(主 Agent)

如果 .fpf/ 目录结构不存在,则创建该结构:

mkdir -p .fpf/{evidence,decisions,sessions,knowledge/{L0,L1,L2,invalid}}
touch .fpf/{evidence,decisions,sessions,knowledge/{L0,L1,L2,invalid}}/.gitkeep

后置条件:.fpf/ 目录结构已创建。


步骤 1b:初始化上下文(FPF Agent)

使用 sonnet[1m] 模型启动 fpf-agent:

  • 描述:“初始化 FPF 上下文”
  • 提示词:
    Read ${CLAUDE_PLUGIN_ROOT}/tasks/init-context.md and execute.
    
    Problem Statement: $ARGUMENTS
    
    **Write**: Context summary to `.fpf/context.md`**
    

步骤 2:生成假设(FPF Agent)

使用 sonnet[1m] 模型启动 fpf-agent:

  • 描述:“生成 L0 假设”
  • 提示词:
    Read ${CLAUDE_PLUGIN_ROOT}/tasks/generate-hypotheses.md and execute.
    
    Problem Statement: $ARGUMENTS
    Context: <summary from Step 1b>
    
    **Write**: List of hypothesis IDs and titles to `.fpf/knowledge/L0/`
    
    Reply with summary table in markdown format:
    
      | ID | Title | Kind | Scope |
      |----|-------|------|-------|
      | ... | ... | ... | ... |
    

步骤 3:呈现摘要(主 Agent)
  1. 读取 .fpf/knowledge/L0/ 中的所有 L0 假设文件
  2. 呈现 Agent 响应中的摘要表格。
  3. 询问用户:“您想添加自己的假设吗?(是/否)”

步骤 4:添加用户假设(FPF Agent,条件循环)

条件:用户表示要添加假设。

使用 sonnet[1m] 模型启动 fpf-agent:

  • 描述:“添加用户假设”
  • 提示词:
    Read ${CLAUDE_PLUGIN_ROOT}/tasks/add-user-hypothesis.md and execute.
    
    User Hypothesis Description: <get from user>
    
    **Write**: User hypothesis to `.fpf/knowledge/L0/`
    

循环:添加假设后返回步骤 3。

退出:用户表示否或拒绝继续添加时退出。


步骤 5:验证逻辑(并行子 Agent)

条件:用户已完成添加假设。

对于 .fpf/knowledge/L0/ 中的每个 L0 假设文件,使用 sonnet[1m] 模型并行启动 fpf-agent:

  • 描述:“验证假设:”
  • 提示词:
    Read ${CLAUDE_PLUGIN_ROOT}/tasks/verify-logic.md and execute.
    
    Hypothesis ID: <hypothesis-id>
    Hypothesis File: .fpf/knowledge/L0/<hypothesis-id>.md
    
    **Move**: After you complete verification, move the file to `.fpf/knowledge/L1/` or `.fpf/knowledge/invalid/`.
    

等待所有 Agent 完成,然后检查文件是否已移至 .fpf/knowledge/L1/ 或 .fpf/knowledge/invalid/。


步骤 6:核验证据(并行子 Agent)

对于 .fpf/knowledge/L1/ 中的每个 L1 假设文件,并行启动 fpf-agent:

  • 描述:“核验假设:”
  • 提示词:
    Read ${CLAUDE_PLUGIN_ROOT}/tasks/validate-evidence.md and execute.
    
    Hypothesis ID: <hypothesis-id>
    Hypothesis File: .fpf/knowledge/L1/<hypothesis-id>.md
    
    **Move**: After you complete validation, move the file to `.fpf/knowledge/L2/` or `.fpf/knowledge/invalid/`.
    

等待所有 Agent 完成,然后检查文件是否已移至 .fpf/knowledge/L2/ 或 .fpf/knowledge/invalid/。


步骤 7:审计可信度(并行子 Agent)

对于 .fpf/knowledge/L2/ 中的每个 L2 假设文件,并行启动 fpf-agent:

  • 描述:“审计可信度:”
  • 提示词:
    Read ${CLAUDE_PLUGIN_ROOT}/tasks/audit-trust.md and execute.
    
    Hypothesis ID: <hypothesis-id>
    Hypothesis File: .fpf/knowledge/L2/<hypothesis-id>.md
    
    **Write**: Audit report to `.fpf/evidence/audit-{hypothesis-id}-{YYYY-MM-DD}.md`
    
    **Reply**: with R_eff score and weakest link
    

等待所有 Agent 完成,然后检查是否已在 .fpf/evidence/ 中创建审计报告。


步骤 8:作出决策(FPF Agent)

使用 sonnet[1m] 模型启动 fpf-agent:

  • 描述:“创建决策记录”
  • 提示词:
    Read ${CLAUDE_PLUGIN_ROOT}/tasks/decide.md and execute.
    
    Problem Statement: $ARGUMENTS
    L2 Hypotheses Directory: .fpf/knowledge/L2/
    Audit Reports: .fpf/evidence/
    
    **Write**: Decision record to `.fpf/decisions/`
    
    **Reply**: with decision record summary in markdown format:
    
    | Hypothesis | R_eff | Weakest Link | Status |
    |------------|-------|--------------|--------|
    | ... | ... | ... | ... |
    
    **Recommended Decision**: <hypothesis title>
    
    **Rationale**: <brief explanation>
    

等待 Agent 完成,然后检查是否已在 .fpf/decisions/ 中创建决策记录。

步骤 9:呈现最终摘要(主 Agent)
  1. 从 .fpf/decisions/ 中读取 DRR
  2. 呈现 Agent 响应中的结果。
  3. 呈现后续步骤:
    • 实施选定的假设
    • 使用 /fpf:status 检查 FPF 状态
    • 如果代码库发生变化,使用 /fpf:actualize
  4. 询问用户是否同意该决策;如果不同意,则在步骤 8 启动 fpf-agent,并指示其按用户要求修改决策。

完成条件

满足以下条件时,工作流即告完成:

  • .fpf/ 目录结构已创建
  • 上下文已记录在 .fpf/context.md 中
  • 假设已生成、验证、核验并审计
  • DRR 已创建在 .fpf/decisions/ 中
  • 已向用户呈现最终摘要

创建的产物:

  • .fpf/context.md - 问题上下文
  • .fpf/knowledge/L0/*.md - 初始假设
  • .fpf/knowledge/L1/*.md - 已验证的假设
  • .fpf/knowledge/L2/*.md - 已核验的假设
  • .fpf/knowledge/invalid/*.md - 已驳回的假设
  • .fpf/evidence/*.md - 证据文件
  • .fpf/decisions/*.md - 设计依据记录

评论

支持 Markdown