In the discussion phase before requirements analysis, clarify the project positioning, target users, feature modules, priorities, and technical boundaries.
How to use
/cx:cx-scope # 项目级蓝图探讨
/cx:cx-scope {功能名} # 功能级方案探讨
Core steps
Step 0: Initialize the local environment
PROJECT_ROOT=$(git rev-parse --show-toplevel)
FEATURE_TITLE="{功能标题}"
FEATURE_DIR="$PROJECT_ROOT/开发文档/CX工作流/功能/${FEATURE_TITLE}"
mkdir -p "$FEATURE_DIR"
Step 1: Determine the discussion mode
- Project level: overall project planning, output the project blueprint (modules, priorities, tech stack)
- Feature level: proposal discussion for a certain feature (goals, flow, boundaries, technical approach)
Step 2: Environment scan
Use the Explore subagent (via the Task tool) to scan the project structure, tech stack, and existing related code. Output a context summary for the user's reference.
Step 3: Multi-turn conversation collection
Free-form conversation, with no limit on the number of turns, until the user says "confirmed". Question directions:
Project level:
- Project positioning and target users
- List of core feature modules
- Feature priority breakdown (MVP vs Phase 2/3)
- Technical boundaries and constraints
- Reference products
Feature level:
- Feature goals and outcomes
- User flow and key steps
- Relationship with existing features (dependencies, impact, reuse)
- Edge cases and exception handling
- Technical approach preferences
After every 2-3 turns, summarize the current consensus, mark points of disagreement, and let the user choose.
Step 4: Confirm convergence
{
"questions": [
{
"question": "探讨内容是否可以定稿?",
"header": "确认",
"multiSelect": false,
"options": [
{"label": "确认定稿", "description": "保存到本地并可选上云"},
{"label": "继续探讨", "description": "还有内容需要补充"},
{"label": "部分确认", "description": "先记录已确认的部分"}
]
}
]
}
Step 5: Save locally
Generate a structured 范围.md document, save it to 开发文档/CX工作流/功能/{功能标题}/范围.md。
Project-level template:
# 项目蓝图: {项目名}
## 项目定位
...
## 目标用户与场景
...
## 功能模块总览
| 序号 | 模块 | 优先级 | 状态 | 说明 |
|------|------|--------|------|------|
| 1 | {模块} | P0/P1/P2 | 待开发 | {说明} |
## 技术架构(概要)
...
## 开发路线
Phase 1 (MVP): ...
Phase 2: ...
## 探讨记录
{关键决策点和分歧解决方式}
Feature-level template:
# 功能探讨: {功能名}
## 功能目标
{达到什么效果}
## 用户流程
{关键步骤}
## 方案概要
{最终确认的方案}
## 与现有功能的关系
- 依赖: ...
- 影响: ...
- 复用: ...
## 边界和约束
- 技术限制
- 业务规则
## 开放问题
{尚未确定的细节,留给 PRD 阶段}
Step 6: GitHub sync (optional)
According to 配置.json.github_sync:
- off: save locally only, do not create an Issue
- local/collab/full: create a GitHub Issue (label
doc:scope), and in开发文档/CX工作流/功能/{功能标题}/范围.jsonrecord the Issue number
Step 7: Next-step guidance
{
"questions": [
{
"question": "下一步?",
"header": "下一步",
"multiSelect": false,
"options": [
{"label": "开始 PRD", "description": "运行 /cx:cx-prd {功能名}"},
{"label": "继续探讨", "description": "再开一轮"},
{"label": "保存稍后", "description": "先 review 范围.md"}
]
}
]
}
If you choose to start the PRD, automatically execute /cx:cx-prd {功能名}(it will automatically read the local 范围.md as context).
Local file structure
开发文档/CX工作流/功能/
└── {功能标题}/
├── 范围.md ← Scope 文档
├── 范围.json ← Issue 编号(仅 collab/full 模式)
├── 需求.md ← PRD(后续)
├── 设计.md ← Design Doc(后续)
├── 任务/ ← 任务文件(后续)
└── 状态.json ← 整体进度(后续)
Using the Explore Subagent
cx-scope calls the Explore subagent in Step 2 to scan the code structure.
Task tool 参数:
subagent_type: "Explore"
description: "扫描项目结构和技术栈"
prompt: "列出项目目录树、检测技术栈、找出已有相关模块"
The returned information is used to enhance the context awareness of the conversation.
Progress tracking
Use the local 状态.json to record the Scope status:
{
"scope_status": "in_progress|completed",
"created_at": "2024-01-15T10:00:00Z",
"last_updated": "2024-01-15T10:30:00Z",
"mode": "project|feature",
"github_issue": null
}
Closed loop with cx:plan
When all features are complete,cx:exec will automatically detect the module status in the Scope and update the status to completed. When all modules are complete, close the Scope Issue.