Loading...
Loading...
Unified requirement clarification to prevent downstream implementation churn by resolving ambiguity early. Default: research-first with autonomous decision-making and persistent questioning. --light: direct iterative Q&A. Triggers: "cwf:clarify", "clarify this", "refine requirements"
npx skill4agent add corca-ai/claude-plugins clarifycwf:clarify <requirement> # Research-first (default)
cwf:clarify <requirement> --light # Direct Q&A, no sub-agentsnext-session.md| 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 |
--lightbash {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.key_files{live_state_file}live.dir{session_dir}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)session_dir: "{live.dir value from resolved live-state file}"## Original Requirement
"{user's original request verbatim}"
## Decision Points
1. {specific question}
2. {specific question}
...{session_dir}/clarify-codebase-research.md{session_dir}/clarify-web-research.mdTask 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.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.{session_dir}/clarify-expert-alpha.md{session_dir}/clarify-expert-beta.mdexpert_rostercwf-state.yamldomainTask 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.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.{SKILL_DIR}/references/aggregation-guide.md## Agent Decisions (T1 & T2)
| # | Decision Point | Tier | Decision | Evidence |
|---|---------------|------|----------|----------|
| 1 | ... | T1 | ... | file paths |
| 2 | ... | T2 | ... | sources |
## Requires Human Decision (T3)
| # | Decision Point | Reason |
|---|---------------|--------|
| 3 | ... | conflict / no evidence / subjective |{session_dir}/clarify-advisor-alpha.md{session_dir}/clarify-advisor-beta.mdTask 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.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.{SKILL_DIR}/references/questioning-guide.mdAskUserQuestion## Requirement Clarification Summary
### Before (Original)
"{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} |
### All Decisions
| # | Decision Point | Decision | Decided By | Evidence |
|---|---------------|----------|------------|----------|
| 1 | ... | ... | Agent (T1) | file paths |
| 2 | ... | ... | Agent (T2) | sources |
| 3 | ... | ... | Human | advisory context |bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_completed_at="{ISO 8601 UTC timestamp}"bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_result_file="{saved summary file path}"cwf:implcwf:review --mode clarifycwf:handoff --phaseplan.md{SKILL_DIR}/references/questioning-guide.mdAskUserQuestionwhile 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## Requirement Clarification Summary
### Before (Original)
"{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 |
|----------|----------|
| ... | ... |bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_completed_at="{ISO 8601 UTC timestamp}"bash {CWF_PLUGIN_DIR}/scripts/cwf-live-state.sh set . clarify_result_file="{saved summary file path}"cwf:impl{CWF_PLUGIN_DIR}/references/expert-advisor-guide.mdcwf:handoff --phase