clarify
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseClarify
需求澄清
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-agentstext
cwf:clarify <requirement> # 调研优先模式(默认)
cwf:clarify <requirement> --light # 直接问答模式,不使用子AgentMode Selection
模式选择
Before entering Default or --light mode, assess clarify depth based on input specificity:
- If exists in the active session directory or current workspace, read it as optional prior-session context.
next-session.md - Always parse the user's task description (required input).
- Check if the combined input provides: target file paths, expected changes per file, and BDD-style success criteria.
- Apply this heuristic:
| Input specificity | Clarify depth | Rationale |
|---|---|---|
| All 3 present (files + changes + criteria) | AskUserQuestion only — ask 2-3 binary/choice questions for remaining ambiguities, skip Phases 2-2.5 | Prior session retro effectively served as clarify |
| 1-2 present | --light mode — iterative Q&A without sub-agents | Partial clarity, direct questions suffice |
| None present (vague requirement) | Default mode — full research + expert analysis | Scope is open, exploration needed |
This heuristic can be overridden by explicit flag or user instruction.
--light进入默认模式或--light模式前,需根据输入的明确程度评估澄清深度:
- 如果当前会话目录或工作区中存在,将其作为可选的历史会话上下文读取。
next-session.md - 始终解析用户的任务描述(必填输入)。
- 检查合并后的输入是否包含:目标文件路径、每个文件的预期变更,以及BDD风格的成功标准。
- 应用以下启发式规则:
| 输入明确程度 | 澄清深度 | 理由 |
|---|---|---|
| 三者均具备(文件+变更+标准) | 仅向用户提问 —— 针对剩余歧义提出2-3个二元/选择类问题,跳过第2至2.5阶段 | 历史会话的回顾已有效完成了澄清工作 |
| 具备1-2项 | --light模式 —— 无需子Agent的迭代式问答 | 已有部分明确信息,直接提问即可满足需求 |
| 均不具备(需求模糊) | 默认模式 —— 完整调研+专家分析 | 范围不明确,需要进行探索 |
该启发式规则可通过显式的标志或用户指令覆盖。
--lightDefault 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 in to files relevant to the requirement.
live.key_files{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)在中设置为与需求相关的文件。
{live_state_file}live.key_filesPhase 0.5: Resolve Session Directory
第0.5阶段:解析会话目录
Resolve the effective live-state file, then read before any placeholder use:
live.dir{session_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}"解析有效的实时状态文件,然后在使用任何占位符前读取:
{session_dir}live.dirbash
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阶段:捕获与分解
- Record the original requirement verbatim
- 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
- Present the decision points to the user before proceeding
markdown
undefined- 逐字记录原始需求
- 将需求分解为具体的决策点 —— 即实现开始前需要明确答案的具体问题
- 以问题形式表述,而非类别(例如:“使用哪个认证库?”而非“认证”)
- 聚焦于会影响实现的决策
- 在继续下一步前向用户展示决策点
markdown
undefinedOriginal Requirement
原始需求
"{user's original request verbatim}"
"{user's original request verbatim}"
Decision Points
决策点
- {specific question}
- {specific question} ...
undefined- {specific question}
- {specific question} ...
undefinedPhase 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:
- Read from
expert_rostercwf-state.yaml - Analyze decision points for domain keywords; match against each roster entry's field
domain - Select 2 experts with contrasting frameworks — different analytical lenses on the same problem
- 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(仅当结果缺失或无效时)。
专家选择:
- 从读取
cwf-state.yamlexpert_roster - 分析决策点中的领域关键词;与每个名册条目的字段匹配
domain - 选择2位具有对立框架的专家 —— 对同一问题采用不同的分析视角
- 如果名册中匹配的领域专家不足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 for full classification rules.
{SKILL_DIR}/references/aggregation-guide.mdFor 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
undefinedAgent Decisions (T1 & T2)
Agent决策(T1 & T2)
| # | Decision Point | Tier | Decision | Evidence |
|---|---|---|---|---|
| 1 | ... | T1 | ... | file paths |
| 2 | ... | T2 | ... | sources |
| # | 决策点 | 层级 | 决策 | 证据 |
|---|---|---|---|---|
| 1 | ... | T1 | ... | 文件路径 |
| 2 | ... | T2 | ... | 参考来源 |
Requires Human Decision (T3)
需要人工决策(T3)
| # | Decision Point | Reason |
|---|---|---|
| 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 for full methodology.
{SKILL_DIR}/references/questioning-guide.mdFor each T3 item, use with:
AskUserQuestion- Research context: What codebase and web research found
- Advisor α's position: Their argument (brief)
- Advisor β's position: Their argument (brief)
- 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- 调研上下文:代码库和网络调研的发现
- 咨询顾问α的立场:其核心论点(简要)
- 咨询顾问β的立场:其核心论点(简要)
- 问题:从咨询视角给出2-4个具体选项
每次得到答案后:
- 对表面答案进行2-3次深度追问(参考questioning-guide.md)
- 检测该答案与之前答案之间的冲突
- 检查答案是否暴露了新的歧义 → 重新分类 → 如果是T3则重复该流程
Phase 5: Output
第5阶段:输出
markdown
undefinedmarkdown
undefinedRequirement 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)
| Expert | Framework | Key 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 Point | Decision | Decided By | Evidence |
|---|---|---|---|---|
| 1 | ... | ... | Agent (T1) | file paths |
| 2 | ... | ... | Agent (T2) | sources |
| 3 | ... | ... | Human | advisory 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阶段:捕获
- Record the requirement verbatim
- Identify ambiguities using the categories in questioning-guide.md
- 逐字记录需求
- 使用questioning-guide.md中的类别识别歧义
Phase 2: Iterative Q&A
第2阶段:迭代式问答
Read for methodology.
{SKILL_DIR}/references/questioning-guide.mdLoop using :
AskUserQuestiontext
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使用工具循环执行:
AskUserQuestiontext
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 ambiguitiesPhase 3: Output
第3阶段:输出
markdown
undefinedmarkdown
undefinedRequirement 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
已做出的决策
| Question | Decision |
|---|---|
| ... | ... |
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
规则
- Research first, ask later (default mode): Exhaust research before asking
- Cite evidence: Every autonomous decision must include specific evidence
- Respect the tiers: Do not ask about T1/T2; do not auto-decide T3
- Constructive tension: Conflicts between sources are signals, not problems
- Persistent but not annoying: Why-dig on vague answers, accept clear ones
- Preserve intent: Refine the requirement, don't redirect it
- Grounded experts: Best practice research must cite real published work
- Honest advisors: Advisory opinions argue in good faith, not strawman
- Expert evidence is supplementary: Expert analysis enriches classification but does not override direct codebase or best-practice evidence
- 先调研,后提问(默认模式):在提问前完成所有调研
- 引用证据:每个自主决策必须包含具体证据
- 尊重层级规则:不询问T1/T2相关问题;不自动决策T3项
- 建设性冲突:来源之间的冲突是信号,而非问题
- 持续追问但不过度:对模糊答案进行深度追问,接受清晰的答案
- 保留原始意图:优化需求,而非改变方向
- 专家需有依据:最佳实践调研必须引用真实的已发表成果
- 咨询顾问需真诚:咨询意见需基于善意论证,而非稻草人谬误
- 专家证据仅作补充:专家分析可丰富分类,但不能覆盖代码库或最佳实践的直接证据
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身份、依据和分析格式