clarify

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Clarify

需求澄清

Resolve ambiguity before planning so implementation starts from explicit decisions, not assumptions.
在规划前解决歧义,确保实现工作基于明确的决策而非假设。

Quick Start

快速开始

text
cwf:clarify <requirement>          # Research-first (default)
cwf:clarify <requirement> --light  # Direct Q&A, no sub-agents

text
cwf:clarify <requirement>          # 调研优先模式(默认)
cwf:clarify <requirement> --light  # 直接问答模式,不使用子Agent

Mode Selection

模式选择

Before entering Default or --light mode, assess clarify depth based on input specificity:
  1. If
    next-session.md
    exists in the active session directory or current workspace, read it as optional prior-session context.
  2. Always parse the user's task description (required input).
  3. Check if the combined input provides: target file paths, expected changes per file, and BDD-style success criteria.
  4. Apply this heuristic:
Input specificityClarify depthRationale
All 3 present (files + changes + criteria)AskUserQuestion only — ask 2-3 binary/choice questions for remaining ambiguities, skip Phases 2-2.5Prior session retro effectively served as clarify
1-2 present--light mode — iterative Q&A without sub-agentsPartial clarity, direct questions suffice
None present (vague requirement)Default mode — full research + expert analysisScope is open, exploration needed
This heuristic can be overridden by explicit
--light
flag or user instruction.

进入默认模式或--light模式前,需根据输入的明确程度评估澄清深度
  1. 如果当前会话目录或工作区中存在
    next-session.md
    ,将其作为可选的历史会话上下文读取。
  2. 始终解析用户的任务描述(必填输入)。
  3. 检查合并后的输入是否包含:目标文件路径每个文件的预期变更,以及BDD风格的成功标准
  4. 应用以下启发式规则:
输入明确程度澄清深度理由
三者均具备(文件+变更+标准)仅向用户提问 —— 针对剩余歧义提出2-3个二元/选择类问题,跳过第2至2.5阶段历史会话的回顾已有效完成了澄清工作
具备1-2项--light模式 —— 无需子Agent的迭代式问答已有部分明确信息,直接提问即可满足需求
均不具备(需求模糊)默认模式 —— 完整调研+专家分析范围不明确,需要进行探索
该启发式规则可通过显式的
--light
标志或用户指令覆盖。

Default Mode

默认模式

Phase 0: Update Live State

第0阶段:更新实时状态

Use the live-state helper for scalar fields, then edit list fields in the resolved live-state file:
bash
bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . \
  phase="clarify" \
  task="{requirement summary}"
live_state_file=$(bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh resolve)
Set
live.key_files
in
{live_state_file}
to files relevant to the requirement.
使用实时状态助手处理标量字段,然后在已解析的实时状态文件中编辑列表字段:
bash
bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . \
  phase="clarify" \
  task="{requirement summary}"
live_state_file=$(bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh resolve)
{live_state_file}
中设置
live.key_files
为与需求相关的文件。

Phase 0.5: Resolve Session Directory

第0.5阶段:解析会话目录

Resolve the effective live-state file, then read
live.dir
before any
{session_dir}
placeholder use:
bash
live_state_file=$(bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh resolve)
session_dir=$(bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh get . dir)
yaml
session_dir: "{live.dir value from resolved live-state file}"
解析有效的实时状态文件,然后在使用任何
{session_dir}
占位符前读取
live.dir
bash
live_state_file=$(bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh resolve)
session_dir=$(bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh get . dir)
yaml
session_dir: "{live.dir value from resolved live-state file}"

Phase 1: Capture & Decompose

第1阶段:捕获与分解

  1. Record the original requirement verbatim
  2. Decompose into concrete decision points — specific questions that need answers before implementation can begin
    • Frame as questions, not categories ("Which auth library?" not "Authentication")
    • Focus on decisions that affect implementation
  3. Present the decision points to the user before proceeding
markdown
undefined
  1. 逐字记录原始需求
  2. 将需求分解为具体的决策点 —— 即实现开始前需要明确答案的具体问题
    • 以问题形式表述,而非类别(例如:“使用哪个认证库?”而非“认证”)
    • 聚焦于会影响实现的决策
  3. 在继续下一步前向用户展示决策点
markdown
undefined

Original Requirement

原始需求

"{user's original request verbatim}"
"{user's original request verbatim}"

Decision Points

决策点

  1. {specific question}
  2. {specific question} ...
undefined
  1. {specific question}
  2. {specific question} ...
undefined

Phase 2: Research

第2阶段:调研

Context recovery (before launching)

上下文恢复(启动前)

Apply the context recovery protocol to these files:
  • {session_dir}/clarify-codebase-research.md
  • {session_dir}/clarify-web-research.md
Launch sub-agents simultaneously using the Task tool (only for missing or invalid results).
  • Shared output persistence contract: agent-patterns.md § Sub-agent Output Persistence Contract.
对以下文件应用上下文恢复协议
  • {session_dir}/clarify-codebase-research.md
  • {session_dir}/clarify-web-research.md
使用Task工具同时启动子Agent(仅当结果缺失或无效时)。
  • 共享输出持久化约定:agent-patterns.md § Sub-agent Output Persistence Contract

Sub-agent A: Codebase Researcher

子Agent A:代码库研究员

yaml
Task tool:
  subagent_type: Explore
  max_turns: 20
  prompt: |
    Read `{SKILL_DIR}/references/research-guide.md` and follow
    **Section 1: Codebase Research** exactly.
    Report evidence only — do not make decisions.

    Decision points:
    {list from Phase 1}

    Write your complete findings to: {session_dir}/clarify-codebase-research.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
yaml
Task tool:
  subagent_type: Explore
  max_turns: 20
  prompt: |
    Read `{SKILL_DIR}/references/research-guide.md` and follow
    **Section 1: Codebase Research** exactly.
    Report evidence only — do not make decisions.

    Decision points:
    {list from Phase 1}

    Write your complete findings to: {session_dir}/clarify-codebase-research.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.

Sub-agent B: Web Researcher

子Agent B:网络研究员

yaml
Task tool:
  subagent_type: general-purpose
  max_turns: 20
  prompt: |
    Read `{SKILL_DIR}/references/research-guide.md` and follow
    **Section 2: Web / Best Practice Research** exactly.
    Also follow the "Web Research Protocol" section in
    `{CWF_PLUGIN_DIR}/references/agent-patterns.md` for tool order
    and fallback behavior.
    Report findings only — do not make decisions.

    Decision points:
    {list from Phase 1}

    Write your complete findings to: {session_dir}/clarify-web-research.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
Both sub-agents run in parallel. Wait for both to complete. Read the output files from session dir (not the in-memory Task return values).
yaml
Task tool:
  subagent_type: general-purpose
  max_turns: 20
  prompt: |
    Read `{SKILL_DIR}/references/research-guide.md` and follow
    **Section 2: Web / Best Practice Research** exactly.
    Also follow the "Web Research Protocol" section in
    `{CWF_PLUGIN_DIR}/references/agent-patterns.md` for tool order
    and fallback behavior.
    Report findings only — do not make decisions.

    Decision points:
    {list from Phase 1}

    Write your complete findings to: {session_dir}/clarify-web-research.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
两个子Agent并行运行。等待两者完成后,从会话目录读取输出文件(而非内存中的Task返回值)。

Phase 2.5: Expert Analysis

第2.5阶段:专家分析

Context recovery (before launching)

上下文恢复(启动前)

Apply the context recovery protocol to these files:
  • {session_dir}/clarify-expert-alpha.md
  • {session_dir}/clarify-expert-beta.md
Launch two domain expert sub-agents simultaneously using the Task tool (only for missing or invalid results).
Expert selection:
  1. Read
    expert_roster
    from
    cwf-state.yaml
  2. Analyze decision points for domain keywords; match against each roster entry's
    domain
    field
  3. Select 2 experts with contrasting frameworks — different analytical lenses on the same problem
  4. If roster has < 2 domain matches, fill remaining slots via independent selection (prioritize well-known figures with contrasting methodological approaches)
对以下文件应用上下文恢复协议
  • {session_dir}/clarify-expert-alpha.md
  • {session_dir}/clarify-expert-beta.md
使用Task工具同时启动两个领域专家子Agent(仅当结果缺失或无效时)。
专家选择
  1. cwf-state.yaml
    读取
    expert_roster
  2. 分析决策点中的领域关键词;与每个名册条目的
    domain
    字段匹配
  3. 选择2位具有对立框架的专家 —— 对同一问题采用不同的分析视角
  4. 如果名册中匹配的领域专家不足2位,通过独立选择填补剩余名额(优先选择具有对立方法论的知名人物)

Expert α

专家α

yaml
Task tool:
  subagent_type: general-purpose
  max_turns: 12
  prompt: |
    Read {CWF_PLUGIN_DIR}/references/expert-advisor-guide.md.
    You are Expert α, operating in **clarify mode**.

    Your identity: {selected expert name}
    Your framework: {expert's domain from roster or independent selection}

    Decision points:
    {list from Phase 1}

    Research findings summary:
    {summarized outputs from Phase 2 codebase + web research}

    Analyze which decisions are most critical through your published framework.
    Use web search to verify your expert identity and cite published work.
    Output your analysis in the clarify mode format from the guide.

    Write your complete findings to: {session_dir}/clarify-expert-alpha.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
yaml
Task tool:
  subagent_type: general-purpose
  max_turns: 12
  prompt: |
    Read {CWF_PLUGIN_DIR}/references/expert-advisor-guide.md.
    You are Expert α, operating in **clarify mode**.

    Your identity: {selected expert name}
    Your framework: {expert's domain from roster or independent selection}

    Decision points:
    {list from Phase 1}

    Research findings summary:
    {summarized outputs from Phase 2 codebase + web research}

    Analyze which decisions are most critical through your published framework.
    Use web search to verify your expert identity and cite published work.
    Output your analysis in the clarify mode format from the guide.

    Write your complete findings to: {session_dir}/clarify-expert-alpha.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.

Expert β

专家β

yaml
Task tool:
  subagent_type: general-purpose
  max_turns: 12
  prompt: |
    Read {CWF_PLUGIN_DIR}/references/expert-advisor-guide.md.
    You are Expert β, operating in **clarify mode**.

    Your identity: {selected expert name — contrasting framework from Expert α}
    Your framework: {expert's domain from roster or independent selection}

    Decision points:
    {list from Phase 1}

    Research findings summary:
    {summarized outputs from Phase 2 codebase + web research}

    Analyze which decisions are most critical through your published framework.
    Use web search to verify your expert identity and cite published work.
    Output your analysis in the clarify mode format from the guide.

    Write your complete findings to: {session_dir}/clarify-expert-beta.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
Both expert sub-agents run in parallel. Wait for both to complete. Read the output files from session dir (not the in-memory Task return values).
--light mode: Phase 2.5 is skipped (consistent with --light skipping all sub-agents).
yaml
Task tool:
  subagent_type: general-purpose
  max_turns: 12
  prompt: |
    Read {CWF_PLUGIN_DIR}/references/expert-advisor-guide.md.
    You are Expert β, operating in **clarify mode**.

    Your identity: {selected expert name — contrasting framework from Expert α}
    Your framework: {expert's domain from roster or independent selection}

    Decision points:
    {list from Phase 1}

    Research findings summary:
    {summarized outputs from Phase 2 codebase + web research}

    Analyze which decisions are most critical through your published framework.
    Use web search to verify your expert identity and cite published work.
    Output your analysis in the clarify mode format from the guide.

    Write your complete findings to: {session_dir}/clarify-expert-beta.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
两位专家子Agent并行运行。等待两者完成后,从会话目录读取输出文件(而非内存中的Task返回值)。
--light模式:跳过第2.5阶段(与--light模式跳过所有子Agent的规则一致)。

Phase 3: Classify & Decide

第3阶段:分类与决策

Read
{SKILL_DIR}/references/aggregation-guide.md
for full classification rules.
For each decision point, classify using three evidence sources: codebase research (Phase 2), web research (Phase 2), and expert analysis (Phase 2.5).
  • T1 (Codebase-resolved) — codebase has clear evidence → decide autonomously, cite files
  • T2 (Best-practice-resolved) — best practice consensus → decide autonomously, cite sources
  • T3 (Requires human) — evidence conflicts, all silent, or subjective → queue
Constructive tension: When sources conflict, classify as T3. Expert analysis provides additional signal but does not override direct codebase or best-practice evidence.
Present the classification:
markdown
undefined
阅读
{SKILL_DIR}/references/aggregation-guide.md
获取完整的分类规则。
针对每个决策点,使用三个证据来源进行分类:代码库调研(第2阶段)、网络调研(第2阶段)和专家分析(第2.5阶段)。
  • T1(代码库已明确) —— 代码库中有清晰的证据 → 自主决策,并引用文件
  • T2(最佳实践已明确) —— 存在最佳实践共识 → 自主决策,并引用来源
  • T3(需要人工介入) —— 证据冲突、所有来源均无相关信息,或涉及主观判断 → 列入待处理队列
建设性冲突:当来源之间存在冲突时,分类为T3。专家分析提供额外参考信号,但不能覆盖代码库或最佳实践的直接证据。
展示分类结果:
markdown
undefined

Agent Decisions (T1 & T2)

Agent决策(T1 & T2)

#Decision PointTierDecisionEvidence
1...T1...file paths
2...T2...sources
#决策点层级决策证据
1...T1...文件路径
2...T2...参考来源

Requires Human Decision (T3)

需要人工决策(T3)

#Decision PointReason
3...conflict / no evidence / subjective

**If zero T3 items**: Skip Phases 3.5 and 4 entirely. Go to Phase 5.
#决策点理由
3...证据冲突/无相关证据/主观判断

**如果没有T3项**:完全跳过第3.5和第4阶段,直接进入第5阶段。

Phase 3.5: Advisory (T3 only)

第3.5阶段:咨询(仅T3项)

Context recovery (before launching)

上下文恢复(启动前)

Apply the context recovery protocol to these files:
  • {session_dir}/clarify-advisor-alpha.md
  • {session_dir}/clarify-advisor-beta.md
Launch two advisory sub-agents simultaneously (only for missing or invalid results):
对以下文件应用上下文恢复协议
  • {session_dir}/clarify-advisor-alpha.md
  • {session_dir}/clarify-advisor-beta.md
同时启动两个咨询子Agent(仅当结果缺失或无效时):

Advisor α

咨询顾问α

yaml
Task tool:
  subagent_type: general-purpose
  model: haiku
  max_turns: 12
  prompt: |
    Read `{SKILL_DIR}/references/advisory-guide.md`. You are Advisor α.

    Tier 3 decision points:
    {list of T3 items}

    Research context:
    {codebase findings for these items}
    {web research findings for these items}

    Argue for the first perspective per the guide's side-assignment rules.

    Write your complete findings to: {session_dir}/clarify-advisor-alpha.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
yaml
Task tool:
  subagent_type: general-purpose
  model: haiku
  max_turns: 12
  prompt: |
    Read `{SKILL_DIR}/references/advisory-guide.md`. You are Advisor α.

    Tier 3 decision points:
    {list of T3 items}

    Research context:
    {codebase findings for these items}
    {web research findings for these items}

    Argue for the first perspective per the guide's side-assignment rules.

    Write your complete findings to: {session_dir}/clarify-advisor-alpha.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.

Advisor β

咨询顾问β

yaml
Task tool:
  subagent_type: general-purpose
  model: haiku
  max_turns: 12
  prompt: |
    Read `{SKILL_DIR}/references/advisory-guide.md`. You are Advisor β.

    Tier 3 decision points:
    {list of T3 items}

    Research context:
    {codebase findings for these items}
    {web research findings for these items}

    Argue for the opposing perspective per the guide's side-assignment rules.

    Write your complete findings to: {session_dir}/clarify-advisor-beta.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
Both advisors run in parallel. Wait for both to complete. Read the output files from session dir (not the in-memory Task return values).
yaml
Task tool:
  subagent_type: general-purpose
  model: haiku
  max_turns: 12
  prompt: |
    Read `{SKILL_DIR}/references/advisory-guide.md`. You are Advisor β.

    Tier 3 decision points:
    {list of T3 items}

    Research context:
    {codebase findings for these items}
    {web research findings for these items}

    Argue for the opposing perspective per the guide's side-assignment rules.

    Write your complete findings to: {session_dir}/clarify-advisor-beta.md
    The file MUST exist when you finish. End your output file with the exact
    line `<!-- AGENT_COMPLETE -->` as the last line.
两位咨询顾问并行运行。等待两者完成后,从会话目录读取输出文件(而非内存中的Task返回值)。

Phase 4: Persistent Questioning (T3 only)

第4阶段:持续追问(仅T3项)

Read
{SKILL_DIR}/references/questioning-guide.md
for full methodology.
For each T3 item, use
AskUserQuestion
with:
  1. Research context: What codebase and web research found
  2. Advisor α's position: Their argument (brief)
  3. Advisor β's position: Their argument (brief)
  4. The question: With 2-4 concrete options from advisory perspectives
After each answer:
  • Why-dig 2-3 times on surface-level answers (see questioning-guide.md)
  • Detect tensions between this answer and previous answers
  • Check for new ambiguities revealed by the answer → classify → repeat if T3
阅读
{SKILL_DIR}/references/questioning-guide.md
获取完整方法。
针对每个T3项,使用
AskUserQuestion
工具,包含以下内容:
  1. 调研上下文:代码库和网络调研的发现
  2. 咨询顾问α的立场:其核心论点(简要)
  3. 咨询顾问β的立场:其核心论点(简要)
  4. 问题:从咨询视角给出2-4个具体选项
每次得到答案后:
  • 对表面答案进行2-3次深度追问(参考questioning-guide.md)
  • 检测该答案与之前答案之间的冲突
  • 检查答案是否暴露了新的歧义 → 重新分类 → 如果是T3则重复该流程

Phase 5: Output

第5阶段:输出

markdown
undefined
markdown
undefined

Requirement Clarification Summary

需求澄清摘要

Before (Original)

澄清前(原始需求)

"{original request verbatim}"
"{original request verbatim}"

After (Clarified)

澄清后(明确需求)

Goal: {precise description} Scope: {what is included and excluded} Constraints: {limitations and requirements}
目标:{精准描述} 范围:{包含与排除的内容} 约束条件:{限制与要求}

Expert Analysis

专家分析

(Only in default mode, omitted in --light)
ExpertFrameworkKey Insight
{Expert α name}{framework}{1-line summary of analysis}
{Expert β name}{framework}{1-line summary of analysis}
(仅默认模式,--light模式省略)
专家框架核心洞察
{Expert α name}{framework}{1-line summary of analysis}
{Expert β name}{framework}{1-line summary of analysis}

All Decisions

所有决策

#Decision PointDecisionDecided ByEvidence
1......Agent (T1)file paths
2......Agent (T2)sources
3......Humanadvisory context

Then ask: "Save this clarified requirement to a file?" If yes: save to a project-appropriate location with a descriptive filename.

**Completion tracking** (after saving the summary file):

1. Run:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_completed_at="{ISO 8601 UTC timestamp}"`
2. Run:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_result_file="{saved summary file path}"`

This state is what `cwf:impl` Phase 1.0 checks as a pre-condition.

**Follow-up suggestions** (when CWF plugin is loaded):

1. `cwf:review --mode clarify` — Multi-perspective review of the clarified requirement before implementation
2. `cwf:handoff --phase` — Generate a phase handoff document that captures HOW context (protocols, rules, must-read references, constraints) for the implementation phase. Recommended when context will be cleared before implementation, as `plan.md` carries WHAT but not HOW.

Present both suggestions. If context is getting large or the user is about to clear context, emphasize the phase handoff suggestion.

---
#决策点决策决策者证据
1......Agent(T1)文件路径
2......Agent(T2)参考来源
3......人工咨询上下文

然后询问:“是否将此澄清后的需求保存到文件?”如果用户同意,将其保存到项目中的合适位置,并使用描述性文件名。

**完成跟踪**(保存摘要文件后):

1. 运行:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_completed_at="{ISO 8601 UTC timestamp}"`
2. 运行:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_result_file="{saved summary file path}"`

该状态是`cwf:impl`第1.0阶段检查的前置条件。

**后续建议**(加载CWF插件时):

1. `cwf:review --mode clarify` —— 在实现前从多视角审查澄清后的需求
2. `cwf:handoff --phase` —— 生成阶段交接文档,记录实现阶段的HOW上下文(协议、规则、必读参考资料、约束条件)。当实现前会清除上下文时推荐使用,因为`plan.md`仅记录WHAT而非HOW。

展示这两个建议。如果上下文内容较多或用户即将清除上下文,重点强调阶段交接建议。

---

--light Mode

--light模式

Fast, direct clarification without sub-agents. The original clarify behavior with added persistence.
快速、直接的澄清流程,无需子Agent。保留原始澄清行为并增加持久化功能。

Phase 1: Capture

第1阶段:捕获

  1. Record the requirement verbatim
  2. Identify ambiguities using the categories in questioning-guide.md
  1. 逐字记录需求
  2. 使用questioning-guide.md中的类别识别歧义

Phase 2: Iterative Q&A

第2阶段:迭代式问答

Read
{SKILL_DIR}/references/questioning-guide.md
for methodology.
Loop using
AskUserQuestion
:
text
while ambiguities remain:
    pick most critical ambiguity
    ask with 2-4 concrete options
    why-dig on surface-level answers (2-3 levels)
    detect tensions with prior answers
    check for new ambiguities
阅读
{SKILL_DIR}/references/questioning-guide.md
获取方法。
使用
AskUserQuestion
工具循环执行:
text
while ambiguities remain:
    pick most critical ambiguity
    ask with 2-4 concrete options
    why-dig on surface-level answers (2-3 levels)
    detect tensions with prior answers
    check for new ambiguities

Phase 3: Output

第3阶段:输出

markdown
undefined
markdown
undefined

Requirement Clarification Summary

需求澄清摘要

Before (Original)

澄清前(原始需求)

"{original request verbatim}"
"{original request verbatim}"

After (Clarified)

澄清后(明确需求)

Goal: {precise description} Reason: {the ultimate purpose or jobs-to-be-done} Scope: {what is included and excluded} Constraints: {limitations, requirements, preferences} Success Criteria: {how to verify correctness}
目标:{精准描述} 原因:{最终目的或待完成任务} 范围:{包含与排除的内容} 约束条件:{限制、要求、偏好} 成功标准:{如何验证正确性}

Decisions Made

已做出的决策

QuestionDecision
......

Then offer to save.

**Completion tracking** (after saving the summary file):

1. Run:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_completed_at="{ISO 8601 UTC timestamp}"`
2. Run:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_result_file="{saved summary file path}"`

This state is what `cwf:impl` Phase 1.0 checks as a pre-condition.

**Expert Roster Update** (when experts were used in Phase 2.5): Follow the Roster Maintenance procedure in `{CWF_PLUGIN_DIR}/references/expert-advisor-guide.md`.

**Follow-up** (when CWF plugin is loaded): Suggest `cwf:handoff --phase` if the user plans to clear context before implementation.

---
问题决策
......

然后询问用户是否保存。

**完成跟踪**(保存摘要文件后):

1. 运行:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_completed_at="{ISO 8601 UTC timestamp}"`
2. 运行:
   `bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_result_file="{saved summary file path}"`

该状态是`cwf:impl`第1.0阶段检查的前置条件。

**专家名册更新**(第2.5阶段使用过专家时):遵循`{CWF_PLUGIN_DIR}/references/expert-advisor-guide.md`中的名册维护流程。

**后续建议**(加载CWF插件时):如果用户计划在实现前清除上下文,建议使用`cwf:handoff --phase`。

---

Rules

规则

  1. Research first, ask later (default mode): Exhaust research before asking
  2. Cite evidence: Every autonomous decision must include specific evidence
  3. Respect the tiers: Do not ask about T1/T2; do not auto-decide T3
  4. Constructive tension: Conflicts between sources are signals, not problems
  5. Persistent but not annoying: Why-dig on vague answers, accept clear ones
  6. Preserve intent: Refine the requirement, don't redirect it
  7. Grounded experts: Best practice research must cite real published work
  8. Honest advisors: Advisory opinions argue in good faith, not strawman
  9. Expert evidence is supplementary: Expert analysis enriches classification but does not override direct codebase or best-practice evidence
  1. 先调研,后提问(默认模式):在提问前完成所有调研
  2. 引用证据:每个自主决策必须包含具体证据
  3. 尊重层级规则:不询问T1/T2相关问题;不自动决策T3项
  4. 建设性冲突:来源之间的冲突是信号,而非问题
  5. 持续追问但不过度:对模糊答案进行深度追问,接受清晰的答案
  6. 保留原始意图:优化需求,而非改变方向
  7. 专家需有依据:最佳实践调研必须引用真实的已发表成果
  8. 咨询顾问需真诚:咨询意见需基于善意论证,而非稻草人谬误
  9. 专家证据仅作补充:专家分析可丰富分类,但不能覆盖代码库或最佳实践的直接证据

References

参考资料

  • references/research-guide.md — Default sub-agent research methodology
  • references/aggregation-guide.md — Tier classification rules
  • references/advisory-guide.md — Advisor α/β methodology
  • references/questioning-guide.md — Persistent questioning
  • expert-advisor-guide.md — Expert sub-agent identity, grounding, and analysis format
  • references/research-guide.md —— 默认子Agent调研方法
  • references/aggregation-guide.md —— 层级分类规则
  • references/advisory-guide.md —— 咨询顾问α/β方法
  • references/questioning-guide.md —— 持续追问方法
  • expert-advisor-guide.md —— 专家子Agent身份、依据和分析格式