ironweave 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/skills/requirement-qa/SKILL.md +144 -190
- package/skills-en/requirement-qa/SKILL.md +158 -204
package/package.json
CHANGED
|
@@ -1,27 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requirement-qa
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
4
|
+
通过"方向定调 → 增量产出 → 用户 Review → 确认修正"的循环,帮助用户从模糊想法走向完整需求。不同于纯问答模式,本 skill 每轮都产出可 Review 的文档片段到 docs/01-requirement/,用户只需判断"对不对"而非从零表达需求。
|
|
5
5
|
务必在以下场景使用本 skill:用户的需求描述模糊或不完整(如"我想做一个 XX 系统")、用户不确定技术方案该怎么选、用户要求进行需求分析、需求调研、需求访谈、需求梳理、需求沟通、技术方案讨论、架构讨论,或者用户说"帮我想想还缺什么"、"帮我理一下需求"、"我们聊聊这个项目"。当输入信息不足以直接输出完整文档时,应先进入本 skill 的 QA 流程,而不是凭猜测交付半成品。
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 需求引导对话(Requirement QA)
|
|
9
9
|
|
|
10
|
-
本 Skill
|
|
10
|
+
本 Skill 通过**增量产出 + 用户 Review** 的循环,帮助用户从模糊想法走向明确、完整、可落地的需求描述。
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**核心理念**:用户不需要"说清楚需求",只需要判断"Agent 产出的内容对不对"。把信息质量的压力从用户转移到 Agent,用户的角色从"回答者"变成"审核者"。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## 产出目标
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
- "还有哪些用户角色会用到这个功能?"
|
|
18
|
-
- "如果不做这个限制,会发生什么?"
|
|
19
|
-
- "有没有类似的产品可以参考?"
|
|
16
|
+
每轮 QA 循环直接产出或更新 `docs/01-requirement/` 下的模块化文件:
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
```
|
|
19
|
+
docs/01-requirement/
|
|
20
|
+
├── project-profile.md ← 项目画像(定位、用户、目标)
|
|
21
|
+
├── feature-scope.md ← 功能范围(功能列表 + MoSCoW 优先级)
|
|
22
|
+
├── business-rules.md ← 业务规则(核心规则 + 边界条件)
|
|
23
|
+
├── non-functional.md ← 非功能要求(性能、安全、合规)
|
|
24
|
+
└── tech-constraints.md ← 技术约束(技术栈、部署、集成)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
这些文件是 `spec-writing` 等后续 skill 的输入。requirement-qa 解决 **What**(做什么),spec-writing 解决 **How**(怎么做到)。
|
|
28
|
+
|
|
29
|
+
## 核心循环:产出 → Review → 修正
|
|
30
|
+
|
|
31
|
+
每个模块的处理都遵循同一个三步循环:
|
|
32
|
+
|
|
33
|
+
### Step 1:用户定方向
|
|
34
|
+
|
|
35
|
+
用户给出高层级方向或已有信息,可以很简短:
|
|
36
|
+
- "我想做一个在线教育平台"
|
|
37
|
+
- "给内部团队用的项目管理工具"
|
|
38
|
+
- 甚至只是"帮我想想这个系统还缺什么"
|
|
39
|
+
|
|
40
|
+
Agent 基于已有信息(用户输入 + 仓库工程事实),推断尽可能多的细节。
|
|
41
|
+
|
|
42
|
+
### Step 2:Agent 产出 + 推荐选项
|
|
43
|
+
|
|
44
|
+
Agent 做两件事:
|
|
45
|
+
|
|
46
|
+
1. **直接产出文档片段**:把能推断的内容写成结构化文档,创建或更新到 `docs/01-requirement/` 对应文件
|
|
47
|
+
2. **对不确定的点给出推荐选项**:遵循选项规则(2-5 个选项,标记一个推荐项,最后一个为自由输入)
|
|
48
|
+
|
|
49
|
+
关键:**先产出再提问**。不要空手来问"你想做什么"——先基于已知信息写一版草稿,再针对草稿中不确定的点提问。
|
|
50
|
+
|
|
51
|
+
### Step 3:用户 Review + 确认
|
|
52
|
+
|
|
53
|
+
用户看到的是一个**可 Review 的文档**,不是一堆问题。用户可以:
|
|
54
|
+
- 确认:"对,就是这样"→ Agent 进入下一个模块
|
|
55
|
+
- 标注修正:"角色描述不对,应该是 XX"→ Agent 更新文件
|
|
56
|
+
- 补充信息:"还有一个场景你漏了"→ Agent 补充到文件
|
|
57
|
+
|
|
58
|
+
Agent 确认用户 Review 结果后,**原地更新**文件(不删除重建),然后进入下一个模块或更深层的追问。
|
|
25
59
|
|
|
26
60
|
## 交互方式:优先使用结构化选项
|
|
27
61
|
|
|
@@ -33,10 +67,15 @@ description: >-
|
|
|
33
67
|
|
|
34
68
|
详细的选项设计规则、推荐项标记规则、宿主适配方式见 [references/option-rules.md](references/option-rules.md)。
|
|
35
69
|
|
|
36
|
-
每轮对话结束时做一次**小结确认**,确保双方理解一致后再进入下一个话题。
|
|
37
|
-
|
|
38
70
|
## 提问节奏控制
|
|
39
71
|
|
|
72
|
+
### 先产出再提问
|
|
73
|
+
|
|
74
|
+
每轮的核心产出是**文档片段**,问题只是文档中不确定点的澄清。比起"问 5 个问题等回答",更好的做法是:
|
|
75
|
+
- 写一版草稿(80% 推断 + 20% 待确认)
|
|
76
|
+
- 在草稿中用 `<!-- 待确认 -->` 或 **加粗标注** 标记不确定点
|
|
77
|
+
- 针对最关键的 1-3 个不确定点提问
|
|
78
|
+
|
|
40
79
|
### 按需产生问题
|
|
41
80
|
|
|
42
81
|
每轮问多少个问题取决于当前实际需要澄清的未知项:
|
|
@@ -58,230 +97,145 @@ description: >-
|
|
|
58
97
|
|
|
59
98
|
### 从工程事实出发
|
|
60
99
|
|
|
61
|
-
如果当前仓库已经是 Vue 3 项目,不要问"你想用 React 还是 Vue?"
|
|
62
|
-
|
|
63
|
-
## 状态跟踪
|
|
100
|
+
如果当前仓库已经是 Vue 3 项目,不要问"你想用 React 还是 Vue?"——先读事实,直接写入 tech-constraints.md,再问真正未知的东西。
|
|
64
101
|
|
|
65
|
-
|
|
102
|
+
## 模块推进流程
|
|
66
103
|
|
|
67
|
-
|
|
68
|
-
- **草稿产出**(draft output):如果此刻就要产出,能交付什么雏形
|
|
104
|
+
### 模块 1:项目画像(project-profile.md)
|
|
69
105
|
|
|
70
|
-
|
|
106
|
+
**产出内容**:项目定位、目标用户角色及核心诉求、核心痛点、成功标准、时间约束。
|
|
71
107
|
|
|
72
|
-
|
|
108
|
+
**Agent 的做法**:
|
|
109
|
+
1. 读取用户输入 + 扫描仓库(README、package.json、已有文档等)
|
|
110
|
+
2. 基于已知信息,**直接写出** `project-profile.md` 草稿
|
|
111
|
+
3. 对不确定的点提问(如目标用户角色、成功标准)
|
|
112
|
+
4. 用户 Review → 更新文件 → 确认后进入下一模块
|
|
73
113
|
|
|
74
|
-
|
|
114
|
+
**产出模板**:
|
|
75
115
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
**需求方向的核心问题:**
|
|
79
|
-
- 这个产品/功能是给谁用的?(目标用户角色)
|
|
80
|
-
- 它要解决什么问题?(核心痛点)
|
|
81
|
-
- 用户目前是怎么解决这个问题的?(现状与替代方案)
|
|
82
|
-
- 成功的标准是什么?(可量化的业务目标)
|
|
83
|
-
- 项目的时间约束?(MVP 期限、里程碑)
|
|
84
|
-
|
|
85
|
-
**技术方向的核心问题:**
|
|
86
|
-
- 团队技术栈现状?(已有项目用了什么、团队熟悉什么)
|
|
87
|
-
- 有没有已定的技术约束?(如必须用内网部署、必须兼容 IE)
|
|
88
|
-
- 预期用户规模?(影响架构选择和性能设计)
|
|
89
|
-
- 部署环境?(云 / 私有化 / 混合)
|
|
90
|
-
- 预算和人力限制?
|
|
116
|
+
```markdown
|
|
117
|
+
# 项目画像:{项目名称}
|
|
91
118
|
|
|
92
|
-
|
|
119
|
+
## 项目定位
|
|
120
|
+
{一两句话描述这个产品解决什么问题}
|
|
93
121
|
|
|
94
|
-
|
|
122
|
+
## 目标用户
|
|
123
|
+
| 角色 | 核心诉求 | 使用频率 |
|
|
124
|
+
|------|----------|----------|
|
|
125
|
+
| ... | ... | ... |
|
|
95
126
|
|
|
96
|
-
|
|
127
|
+
## 核心痛点
|
|
128
|
+
- 用户目前怎么解决这个问题
|
|
129
|
+
- 现有方案的主要不满
|
|
97
130
|
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
- **场景维度**:正常流程之外,异常情况怎么处理?批量操作?并发场景?
|
|
101
|
-
- **数据维度**:需要哪些数据输入输出?数据量级?数据生命周期?
|
|
102
|
-
- **集成维度**:需要与哪些外部系统对接?认证方式?数据格式?
|
|
103
|
-
- **非功能维度**:性能要求?安全合规要求?可用性要求?
|
|
131
|
+
## 成功标准
|
|
132
|
+
- {可量化的业务目标}
|
|
104
133
|
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
|
|
134
|
+
## 时间约束
|
|
135
|
+
- MVP 期限:
|
|
136
|
+
- 关键里程碑:
|
|
137
|
+
```
|
|
109
138
|
|
|
110
|
-
###
|
|
139
|
+
### 模块 2:功能范围(feature-scope.md)
|
|
111
140
|
|
|
112
|
-
|
|
141
|
+
**产出内容**:功能列表(按 MoSCoW 分类),每个功能附简要验收标准。
|
|
113
142
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
143
|
+
**Agent 的做法**:
|
|
144
|
+
1. 基于项目画像,**主动推断**可能的功能列表
|
|
145
|
+
2. 写出 `feature-scope.md` 草稿,按 MoSCoW 分类
|
|
146
|
+
3. 提问:"以下功能列表是否完整?优先级是否正确?"
|
|
147
|
+
4. 用户 Review → 增删改 → 更新文件
|
|
119
148
|
|
|
120
|
-
|
|
149
|
+
**产出模板**:
|
|
121
150
|
|
|
122
|
-
|
|
151
|
+
```markdown
|
|
152
|
+
# 功能范围:{项目名称}
|
|
123
153
|
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
- 让用户做选择,记录选择理由
|
|
128
|
-
- 标注"待验证"的技术风险点
|
|
154
|
+
## Must(MVP 必做)
|
|
155
|
+
- [ ] {功能点} — 验收标准:{简述}
|
|
156
|
+
- [ ] ...
|
|
129
157
|
|
|
130
|
-
|
|
158
|
+
## Should(重要但可延后)
|
|
159
|
+
- [ ] ...
|
|
131
160
|
|
|
132
|
-
|
|
161
|
+
## Could(锦上添花)
|
|
162
|
+
- [ ] ...
|
|
133
163
|
|
|
134
|
-
|
|
135
|
-
- [ ]
|
|
136
|
-
- [ ] 核心业务流程已明确
|
|
137
|
-
- [ ] 异常和边界场景已讨论
|
|
138
|
-
- [ ] 优先级已排定(MoSCoW)
|
|
139
|
-
- [ ] 验收标准已定义(至少 Must 项)
|
|
140
|
-
- [ ] 技术约束已记录(如有)
|
|
141
|
-
- [ ] 明确"本期不做"的边界
|
|
142
|
-
- [ ] 与外部系统的集成点已识别
|
|
164
|
+
## Won't(明确不做)
|
|
165
|
+
- [ ] ...
|
|
143
166
|
|
|
144
|
-
##
|
|
167
|
+
## 功能依赖关系
|
|
168
|
+
- {功能 A} 依赖 {功能 B}
|
|
169
|
+
```
|
|
145
170
|
|
|
146
|
-
###
|
|
171
|
+
### 模块 3:业务规则(business-rules.md)
|
|
147
172
|
|
|
148
|
-
|
|
149
|
-
- **话少的用户**:提供具体选项而非开放式问题,"你需要的是 A 还是 B?";用是/否问题确认
|
|
150
|
-
- **犹豫不决的用户**:给出推荐方案 + 理由,"根据你描述的场景,我建议先做 X,原因是……"
|
|
151
|
-
- **过于发散的用户**:温和拉回,"这个想法很好,我先记下来。我们先把核心流程确认完?"
|
|
173
|
+
**产出内容**:核心业务规则、边界条件、异常处理策略。
|
|
152
174
|
|
|
153
|
-
|
|
175
|
+
**Agent 的做法**:
|
|
176
|
+
1. 从功能范围中提取隐含的业务规则
|
|
177
|
+
2. **主动推断**常见的边界条件和异常场景
|
|
178
|
+
3. 写出 `business-rules.md`,标注哪些是推断的
|
|
179
|
+
4. 用户 Review → 修正/补充 → 更新文件
|
|
154
180
|
|
|
155
|
-
|
|
181
|
+
### 模块 4:非功能要求(non-functional.md)
|
|
156
182
|
|
|
157
|
-
|
|
158
|
-
【小结确认】
|
|
159
|
-
话题:用户登录
|
|
160
|
-
已确认:
|
|
161
|
-
- 支持手机号+验证码、邮箱+密码两种方式
|
|
162
|
-
- 暂不做第三方登录(微信、GitHub)
|
|
163
|
-
- 登录失败 5 次锁定 30 分钟
|
|
164
|
-
待确认:
|
|
165
|
-
- 验证码有效期(建议 5 分钟,待确认)
|
|
166
|
-
- 是否需要"记住我"功能
|
|
167
|
-
```
|
|
183
|
+
**产出内容**:性能、安全、可用性、合规等要求。
|
|
168
184
|
|
|
169
|
-
|
|
185
|
+
**Agent 的做法**:
|
|
186
|
+
1. 根据项目类型和用户规模,**主动推断**合理的非功能指标
|
|
187
|
+
2. 写出 `non-functional.md`,给出推荐值
|
|
188
|
+
3. 提问:重点确认性能指标和安全合规要求
|
|
189
|
+
4. 用户 Review → 更新文件
|
|
170
190
|
|
|
171
|
-
|
|
191
|
+
### 模块 5:技术约束(tech-constraints.md)(如涉及技术选型)
|
|
172
192
|
|
|
173
|
-
|
|
193
|
+
**产出内容**:技术栈、部署环境、集成点、团队约束。
|
|
174
194
|
|
|
175
|
-
|
|
176
|
-
|
|
195
|
+
**Agent 的做法**:
|
|
196
|
+
1. 扫描仓库获取已有技术栈信息
|
|
197
|
+
2. **直接写入**已确定的事实(不问已经能从代码里看到的东西)
|
|
198
|
+
3. 对需要决策的点给出对比表 + 推荐
|
|
199
|
+
4. 用户 Review → 更新文件
|
|
177
200
|
|
|
178
|
-
##
|
|
179
|
-
[一两句话描述]
|
|
201
|
+
## 对话技巧
|
|
180
202
|
|
|
181
|
-
|
|
182
|
-
| 角色 | 核心诉求 |
|
|
183
|
-
|------|----------|
|
|
184
|
-
| ... | ... |
|
|
185
|
-
|
|
186
|
-
## 功能范围(MoSCoW)
|
|
187
|
-
### Must(MVP 必做)
|
|
188
|
-
- [ ] 功能点 + 验收标准简述
|
|
189
|
-
### Should(重要但可延后)
|
|
190
|
-
- [ ] ...
|
|
191
|
-
### Could(锦上添花)
|
|
192
|
-
- [ ] ...
|
|
193
|
-
### Won't(明确不做)
|
|
194
|
-
- [ ] ...
|
|
203
|
+
### 应对不同类型的用户
|
|
195
204
|
|
|
196
|
-
|
|
197
|
-
-
|
|
198
|
-
-
|
|
205
|
+
- **话多的用户**:适时做文档更新,让用户看到信息被结构化了;避免信息在聊天中散落
|
|
206
|
+
- **话少的用户**:多产出、少提问;写出更完整的草稿,让用户只需确认"对/不对"
|
|
207
|
+
- **犹豫不决的用户**:给出推荐方案 + 理由,"根据你描述的场景,我建议先做 X,原因是……"
|
|
208
|
+
- **过于发散的用户**:先记录到文档的 Could/Won't 区域,温和拉回核心流程
|
|
199
209
|
|
|
200
|
-
|
|
201
|
-
- 性能:...
|
|
202
|
-
- 安全:...
|
|
210
|
+
### Review 确认模板
|
|
203
211
|
|
|
204
|
-
|
|
205
|
-
- [ ] ...
|
|
212
|
+
每完成一个模块的文档更新后:
|
|
206
213
|
|
|
207
|
-
## 技术约束(如有)
|
|
208
|
-
- ...
|
|
209
214
|
```
|
|
215
|
+
已更新 docs/01-requirement/project-profile.md
|
|
210
216
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
# 技术决策摘要:[项目名称]
|
|
215
|
-
|
|
216
|
-
## 项目约束
|
|
217
|
-
- 团队规模:...
|
|
218
|
-
- 时间线:...
|
|
219
|
-
- 部署环境:...
|
|
220
|
-
|
|
221
|
-
## 已定决策
|
|
222
|
-
| 决策点 | 选择 | 理由 |
|
|
223
|
-
|--------|------|------|
|
|
224
|
-
| ... | ... | ... |
|
|
225
|
-
|
|
226
|
-
## 待验证风险
|
|
227
|
-
- [ ] ...
|
|
217
|
+
待确认点:
|
|
218
|
+
1. 目标用户是否只有"学生"和"教师"两个角色?
|
|
219
|
+
2. 成功标准中"日活 1000"是否合理?
|
|
228
220
|
|
|
229
|
-
|
|
230
|
-
- Node.js: ...
|
|
231
|
-
- pnpm: ...
|
|
221
|
+
请 Review 文件内容,告诉我哪里需要修正。确认后我进入下一模块(功能范围)。
|
|
232
222
|
```
|
|
233
223
|
|
|
234
224
|
## 执行方式
|
|
235
225
|
|
|
236
226
|
1. **判断进入条件**:用户的输入信息不足以直接输出完整文档时,进入 QA 流程
|
|
237
|
-
2.
|
|
238
|
-
3.
|
|
239
|
-
4.
|
|
240
|
-
5.
|
|
227
|
+
2. **从项目画像开始**:无论信息多少,先产出 project-profile.md 草稿
|
|
228
|
+
3. **按模块推进**:每个模块走"产出 → Review → 修正"循环;信息够了就跳过某些模块
|
|
229
|
+
4. **原地更新**:每次修正都更新同一个文件,不创建新文件
|
|
230
|
+
5. **适时退出**:当所有 Must 模块完成 Review,用户表示满意时,输出完成总结
|
|
231
|
+
6. **衔接后续**:提示用户可以用 `docs/01-requirement/` 的产出进入 spec-writing 生成详细需求文档
|
|
241
232
|
|
|
242
233
|
## 完成信号
|
|
243
234
|
|
|
244
|
-
默认只有以下情况可以结束 QA
|
|
235
|
+
默认只有以下情况可以结束 QA:
|
|
245
236
|
- 用户明确说"开始产出""可以写文档了""按这个做"等
|
|
246
|
-
-
|
|
237
|
+
- project-profile.md 和 feature-scope.md 至少已完成 Review
|
|
247
238
|
|
|
248
|
-
如果用户说"继续问""先别开始"
|
|
239
|
+
如果用户说"继续问""先别开始",优先视为继续澄清。即使用户要求立即结束但信息不完整,在文档中**显式列出假设**,标注为"未经用户确认,基于推断"。
|
|
249
240
|
|
|
250
241
|
完整的信号列表和最低结束标准见 [references/completion-signals.md](references/completion-signals.md)。
|
|
251
|
-
|
|
252
|
-
## 文档持久化
|
|
253
|
-
|
|
254
|
-
每轮问答应落盘到 Markdown 文件,不依赖模型记忆。使用 `scripts/qa_session.py` 管理会话文档:
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
# 开始新会话
|
|
258
|
-
python3 skills/requirement-qa/scripts/qa_session.py start \
|
|
259
|
-
--topic "用户登录功能" \
|
|
260
|
-
--initial-request "我要做一个登录功能"
|
|
261
|
-
|
|
262
|
-
# 记录每轮问答
|
|
263
|
-
python3 skills/requirement-qa/scripts/qa_session.py append-turn \
|
|
264
|
-
--doc-path "<doc_path>" \
|
|
265
|
-
--question "支持哪些登录方式?" \
|
|
266
|
-
--answer "手机号+验证码、邮箱+密码" \
|
|
267
|
-
--confirmed "支持手机号+验证码" \
|
|
268
|
-
--confirmed "支持邮箱+密码" \
|
|
269
|
-
--open-item "是否需要第三方登录" \
|
|
270
|
-
--current-understanding "核心登录方式已确认"
|
|
271
|
-
|
|
272
|
-
# 结束会话
|
|
273
|
-
python3 skills/requirement-qa/scripts/qa_session.py finalize \
|
|
274
|
-
--doc-path "<doc_path>" \
|
|
275
|
-
--final-summary "登录功能需求已收敛" \
|
|
276
|
-
--deliverable "需求摘要文档"
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
文档存放在 `docs/qa/` 目录下,每个会话一个文件。
|
|
280
|
-
|
|
281
|
-
## 资源
|
|
282
|
-
|
|
283
|
-
| 路径 | 说明 |
|
|
284
|
-
|------|------|
|
|
285
|
-
| `references/option-rules.md` | 选项设计规则、推荐项标记规则、宿主适配方式 |
|
|
286
|
-
| `references/completion-signals.md` | 完成信号列表、继续意图保护、最低结束标准 |
|
|
287
|
-
| `scripts/qa_session.py` | QA 会话文档的创建、追加、结束 |
|
|
@@ -1,287 +1,241 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: requirement-qa
|
|
3
3
|
description: >-
|
|
4
|
-
|
|
5
|
-
Use this skill when:
|
|
4
|
+
Guides users from vague ideas to complete requirements through a "Set Direction → Incremental Output → User Review → Confirm/Correct" loop. Unlike pure Q&A mode, this skill produces reviewable document fragments to docs/01-requirement/ each round — users only need to judge "is this right?" rather than articulate requirements from scratch.
|
|
5
|
+
Use this skill when: user's requirements are vague or incomplete (e.g., "I want to build a XX system"), user is unsure about technical choices, user requests requirement analysis/review/interview/brainstorming/architecture discussion, or says "help me think about what's missing", "help me sort out the requirements", "let's talk about this project". When input is insufficient for a complete document, enter this skill's QA flow rather than delivering guesswork.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Requirement QA
|
|
8
|
+
# Requirement QA
|
|
9
9
|
|
|
10
|
-
This
|
|
10
|
+
This skill guides users from vague ideas to clear, complete, actionable requirements through **incremental output + user review** loops.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
**Core principle**: Users don't need to "articulate requirements clearly" — they just need to judge "is what the Agent produced correct?" This shifts the information quality burden from user to Agent, changing the user's role from "answerer" to "reviewer."
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Output Target
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
- "What other user roles will use this feature?"
|
|
18
|
-
- "What happens if we don't impose this restriction?"
|
|
19
|
-
- "Are there similar products we can reference?"
|
|
16
|
+
Each QA loop directly creates or updates modular files under `docs/01-requirement/`:
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Core rules:
|
|
31
|
-
- Each question has **2-5 options**, **must mark exactly one recommended option** (with reasoning), **last option is always free-form input**
|
|
32
|
-
- Recommendation basis: Engineering facts > contextual inference > industry conventions > safety-side preference
|
|
33
|
-
|
|
34
|
-
For detailed option design rules, recommended option marking rules, and host adaptation methods, see [references/option-rules.md](references/option-rules.md).
|
|
18
|
+
```
|
|
19
|
+
docs/01-requirement/
|
|
20
|
+
├── project-profile.md ← Project profile (positioning, users, goals)
|
|
21
|
+
├── feature-scope.md ← Feature scope (feature list + MoSCoW priorities)
|
|
22
|
+
├── business-rules.md ← Business rules (core rules + edge cases)
|
|
23
|
+
├── non-functional.md ← Non-functional requirements (performance, security, compliance)
|
|
24
|
+
└── tech-constraints.md ← Technical constraints (tech stack, deployment, integrations)
|
|
25
|
+
```
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
These files serve as input for subsequent skills like `spec-writing`. requirement-qa addresses **What** (what to build), spec-writing addresses **How** (how to achieve it).
|
|
37
28
|
|
|
38
|
-
##
|
|
29
|
+
## Core Loop: Output → Review → Correct
|
|
39
30
|
|
|
40
|
-
|
|
31
|
+
Every module follows the same three-step loop:
|
|
41
32
|
|
|
42
|
-
|
|
33
|
+
### Step 1: User Sets Direction
|
|
43
34
|
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
35
|
+
User provides high-level direction or existing information — can be very brief:
|
|
36
|
+
- "I want to build an online education platform"
|
|
37
|
+
- "An internal project management tool for the team"
|
|
38
|
+
- Or even just "help me think about what this system is missing"
|
|
47
39
|
|
|
48
|
-
|
|
40
|
+
The Agent infers as many details as possible based on available information (user input + repository engineering facts).
|
|
49
41
|
|
|
50
|
-
|
|
42
|
+
### Step 2: Agent Outputs + Recommends Options
|
|
51
43
|
|
|
52
|
-
|
|
44
|
+
The Agent does two things:
|
|
53
45
|
|
|
54
|
-
|
|
46
|
+
1. **Directly produces document fragments**: Writes inferrable content as structured documents, creates or updates the corresponding file in `docs/01-requirement/`
|
|
47
|
+
2. **Provides recommended options for uncertain points**: Following option rules (2-5 options, one marked as recommended, last one is free input)
|
|
55
48
|
|
|
56
|
-
|
|
57
|
-
- **Ask later**: What technology, what style, what UI preferences
|
|
49
|
+
Key: **Output first, then ask**. Don't come empty-handed asking "what do you want to build?" — first write a draft based on known information, then ask about uncertain points in the draft.
|
|
58
50
|
|
|
59
|
-
###
|
|
51
|
+
### Step 3: User Review + Confirmation
|
|
60
52
|
|
|
61
|
-
|
|
53
|
+
What the user sees is a **reviewable document**, not a pile of questions. Users can:
|
|
54
|
+
- Confirm: "Yes, that's right" → Agent moves to next module
|
|
55
|
+
- Mark corrections: "The role description is wrong, it should be XX" → Agent updates the file
|
|
56
|
+
- Add information: "There's a scenario you missed" → Agent adds to the file
|
|
62
57
|
|
|
63
|
-
|
|
58
|
+
After confirming user review results, the Agent **updates the file in place** (no delete-and-recreate), then moves to the next module or deeper follow-ups.
|
|
64
59
|
|
|
65
|
-
|
|
60
|
+
## Interaction: Prefer Structured Options
|
|
66
61
|
|
|
67
|
-
-
|
|
68
|
-
- **Draft output**: What deliverable draft could be produced if we had to output right now
|
|
62
|
+
Prefer the structured questioning capability provided by the current Agent host editor, not system-level popups. Only fall back to plain chat messages if the host completely lacks structured questioning support. There is only one clarification logic — different hosts only differ in UI presentation, no logic forking allowed.
|
|
69
63
|
|
|
70
|
-
|
|
64
|
+
Core rules:
|
|
65
|
+
- Each question has **2-5 options**, **must mark exactly one as recommended** (with rationale), **last option is always free input**
|
|
66
|
+
- Recommendation basis: Engineering facts > Context inference > Industry conventions > Safety-side preference
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
For detailed option design rules, recommendation marking rules, and host adaptation, see [references/option-rules.md](references/option-rules.md).
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+
## Question Pacing
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
### Output First, Then Ask
|
|
77
73
|
|
|
78
|
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
- What does success look like? (quantifiable business goals)
|
|
83
|
-
- Project timeline constraints? (MVP deadline, milestones)
|
|
74
|
+
The core output of each round is a **document fragment** — questions only clarify uncertain points in the document. Instead of "ask 5 questions and wait for answers", the better approach is:
|
|
75
|
+
- Write a draft (80% inferred + 20% to be confirmed)
|
|
76
|
+
- Mark uncertain points in the draft with `<!-- to be confirmed -->` or **bold annotations**
|
|
77
|
+
- Ask about the 1-3 most critical uncertain points
|
|
84
78
|
|
|
85
|
-
|
|
86
|
-
- Current team tech stack? (existing projects, team expertise)
|
|
87
|
-
- Any predetermined technical constraints? (e.g., must deploy on-premise, must support IE)
|
|
88
|
-
- Expected user scale? (impacts architecture and performance design)
|
|
89
|
-
- Deployment environment? (cloud / private / hybrid)
|
|
90
|
-
- Budget and staffing limitations?
|
|
79
|
+
### Generate Questions as Needed
|
|
91
80
|
|
|
92
|
-
|
|
81
|
+
How many questions per round depends on actual unknowns that need clarification:
|
|
93
82
|
|
|
94
|
-
|
|
83
|
+
- Only one key unknown → ask only one question
|
|
84
|
+
- Multiple **independent** unknowns can be asked together in one round to reduce round-trips
|
|
85
|
+
- Multiple **dependent** unknowns must be split across rounds — later questions depend on earlier answers
|
|
95
86
|
|
|
96
|
-
|
|
87
|
+
**Anti-pattern**: Forcing dependent questions into one round — "Are you building for web or desktop? Which browsers to support?" (browsers depend on "web" as a prerequisite)
|
|
97
88
|
|
|
98
|
-
**
|
|
99
|
-
- **Role dimension**: Beyond primary users, are there admins, auditors, third-party systems?
|
|
100
|
-
- **Scenario dimension**: Beyond normal flow, how to handle exceptions? Batch operations? Concurrent scenarios?
|
|
101
|
-
- **Data dimension**: What data inputs/outputs? Data volume? Data lifecycle?
|
|
102
|
-
- **Integration dimension**: Which external systems to connect with? Auth methods? Data formats?
|
|
103
|
-
- **Non-functional dimension**: Performance requirements? Security/compliance requirements? Availability requirements?
|
|
89
|
+
**Correct approach**: First ask "what's the final product form", then ask specific constraints based on the answer.
|
|
104
90
|
|
|
105
|
-
|
|
106
|
-
- Don't start discussing implementation details in this round
|
|
107
|
-
- Don't steer users away from features just because they're "hard to implement" — record first, discuss priority later
|
|
108
|
-
- Don't dump all questions at once — dynamically select next questions based on previous answers
|
|
91
|
+
### High-Value Questions First
|
|
109
92
|
|
|
110
|
-
|
|
93
|
+
Prioritize questions that change the execution path:
|
|
111
94
|
|
|
112
|
-
|
|
95
|
+
- **Ask first**: What to build, for whom, to what extent, scope boundaries
|
|
96
|
+
- **Ask later**: Which technology, what style, what UI preferences
|
|
113
97
|
|
|
114
|
-
|
|
115
|
-
- Classify by **MoSCoW** (Must / Should / Could / Won't)
|
|
116
|
-
- For each Must feature, follow up with acceptance criteria: "What level of completion counts as OK?"
|
|
117
|
-
- For Won't features, confirm: "Definitely not this phase? Possibly later?"
|
|
118
|
-
- Mark dependencies: "Feature A depends on Feature B, so B must also be Must"
|
|
98
|
+
### Start from Engineering Facts
|
|
119
99
|
|
|
120
|
-
|
|
100
|
+
If the current repository is already a Vue 3 project, don't ask "Do you want React or Vue?" — read facts first, write them directly into tech-constraints.md, then ask about genuinely unknown things.
|
|
121
101
|
|
|
122
|
-
|
|
102
|
+
## Module Progression
|
|
123
103
|
|
|
124
|
-
|
|
125
|
-
- Aggregate collected constraints into comparison tables
|
|
126
|
-
- For each decision point, present 2-3 options + pros/cons analysis
|
|
127
|
-
- Let user choose, record the reasoning
|
|
128
|
-
- Mark "to-be-validated" technical risks
|
|
104
|
+
### Module 1: Project Profile (project-profile.md)
|
|
129
105
|
|
|
130
|
-
|
|
106
|
+
**Output content**: Project positioning, target user roles and core needs, core pain points, success criteria, time constraints.
|
|
131
107
|
|
|
132
|
-
|
|
108
|
+
**Agent's approach**:
|
|
109
|
+
1. Read user input + scan repository (README, package.json, existing docs, etc.)
|
|
110
|
+
2. Based on known information, **directly write** a `project-profile.md` draft
|
|
111
|
+
3. Ask about uncertain points (e.g., target user roles, success criteria)
|
|
112
|
+
4. User reviews → update file → confirm and move to next module
|
|
133
113
|
|
|
134
|
-
**
|
|
135
|
-
- [ ] All user roles identified
|
|
136
|
-
- [ ] Core business flows clarified
|
|
137
|
-
- [ ] Exception and boundary scenarios discussed
|
|
138
|
-
- [ ] Priorities ranked (MoSCoW)
|
|
139
|
-
- [ ] Acceptance criteria defined (at least for Must items)
|
|
140
|
-
- [ ] Technical constraints documented (if any)
|
|
141
|
-
- [ ] "Not doing this phase" boundaries explicit
|
|
142
|
-
- [ ] Integration points with external systems identified
|
|
114
|
+
**Output template**:
|
|
143
115
|
|
|
144
|
-
|
|
116
|
+
```markdown
|
|
117
|
+
# Project Profile: {Project Name}
|
|
145
118
|
|
|
146
|
-
|
|
119
|
+
## Positioning
|
|
120
|
+
{One or two sentences describing what problem this product solves}
|
|
147
121
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
122
|
+
## Target Users
|
|
123
|
+
| Role | Core Need | Usage Frequency |
|
|
124
|
+
|------|-----------|-----------------|
|
|
125
|
+
| ... | ... | ... |
|
|
152
126
|
|
|
153
|
-
|
|
127
|
+
## Core Pain Points
|
|
128
|
+
- How users currently solve this problem
|
|
129
|
+
- Main dissatisfaction with existing solutions
|
|
154
130
|
|
|
155
|
-
|
|
131
|
+
## Success Criteria
|
|
132
|
+
- {Quantifiable business objectives}
|
|
156
133
|
|
|
134
|
+
## Time Constraints
|
|
135
|
+
- MVP deadline:
|
|
136
|
+
- Key milestones:
|
|
157
137
|
```
|
|
158
|
-
[Summary Confirmation]
|
|
159
|
-
Topic: User Login
|
|
160
|
-
Confirmed:
|
|
161
|
-
- Support phone number+SMS code and email+password methods
|
|
162
|
-
- No third-party login for now (WeChat, GitHub)
|
|
163
|
-
- Lock account for 30 minutes after 5 failed attempts
|
|
164
|
-
Pending:
|
|
165
|
-
- SMS code validity period (suggest 5 minutes, TBC)
|
|
166
|
-
- Whether "remember me" feature is needed
|
|
167
|
-
```
|
|
168
138
|
|
|
169
|
-
|
|
139
|
+
### Module 2: Feature Scope (feature-scope.md)
|
|
140
|
+
|
|
141
|
+
**Output content**: Feature list (categorized by MoSCoW), each with brief acceptance criteria.
|
|
170
142
|
|
|
171
|
-
|
|
143
|
+
**Agent's approach**:
|
|
144
|
+
1. Based on project profile, **proactively infer** likely feature list
|
|
145
|
+
2. Write `feature-scope.md` draft, categorized by MoSCoW
|
|
146
|
+
3. Ask: "Is this feature list complete? Are priorities correct?"
|
|
147
|
+
4. User reviews → add/remove/modify → update file
|
|
172
148
|
|
|
173
|
-
|
|
149
|
+
**Output template**:
|
|
174
150
|
|
|
175
151
|
```markdown
|
|
176
|
-
#
|
|
152
|
+
# Feature Scope: {Project Name}
|
|
177
153
|
|
|
178
|
-
##
|
|
179
|
-
[
|
|
154
|
+
## Must (MVP Essential)
|
|
155
|
+
- [ ] {Feature} — Acceptance criteria: {brief description}
|
|
156
|
+
- [ ] ...
|
|
180
157
|
|
|
181
|
-
##
|
|
182
|
-
| Role | Core Need |
|
|
183
|
-
|------|----------|
|
|
184
|
-
| ... | ... |
|
|
185
|
-
|
|
186
|
-
## Feature Scope (MoSCoW)
|
|
187
|
-
### Must (MVP Essentials)
|
|
188
|
-
- [ ] Feature + brief acceptance criteria
|
|
189
|
-
### Should (Important but Deferrable)
|
|
158
|
+
## Should (Important but Deferrable)
|
|
190
159
|
- [ ] ...
|
|
191
|
-
|
|
160
|
+
|
|
161
|
+
## Could (Nice to Have)
|
|
192
162
|
- [ ] ...
|
|
193
|
-
|
|
163
|
+
|
|
164
|
+
## Won't (Explicitly Excluded)
|
|
194
165
|
- [ ] ...
|
|
195
166
|
|
|
196
|
-
##
|
|
197
|
-
-
|
|
198
|
-
|
|
167
|
+
## Feature Dependencies
|
|
168
|
+
- {Feature A} depends on {Feature B}
|
|
169
|
+
```
|
|
199
170
|
|
|
200
|
-
|
|
201
|
-
- Performance: ...
|
|
202
|
-
- Security: ...
|
|
171
|
+
### Module 3: Business Rules (business-rules.md)
|
|
203
172
|
|
|
204
|
-
|
|
205
|
-
- [ ] ...
|
|
173
|
+
**Output content**: Core business rules, edge cases, exception handling strategies.
|
|
206
174
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
175
|
+
**Agent's approach**:
|
|
176
|
+
1. Extract implicit business rules from feature scope
|
|
177
|
+
2. **Proactively infer** common edge cases and exception scenarios
|
|
178
|
+
3. Write `business-rules.md`, annotating which items are inferred
|
|
179
|
+
4. User reviews → correct/supplement → update file
|
|
210
180
|
|
|
211
|
-
###
|
|
181
|
+
### Module 4: Non-Functional Requirements (non-functional.md)
|
|
212
182
|
|
|
213
|
-
|
|
214
|
-
# Technical Decision Summary: [Project Name]
|
|
183
|
+
**Output content**: Performance, security, availability, compliance requirements.
|
|
215
184
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
-
|
|
219
|
-
|
|
185
|
+
**Agent's approach**:
|
|
186
|
+
1. Based on project type and user scale, **proactively infer** reasonable non-functional metrics
|
|
187
|
+
2. Write `non-functional.md` with recommended values
|
|
188
|
+
3. Ask: Focus on confirming performance metrics and security/compliance requirements
|
|
189
|
+
4. User reviews → update file
|
|
220
190
|
|
|
221
|
-
|
|
222
|
-
| Decision Point | Choice | Reasoning |
|
|
223
|
-
|--------|------|------|
|
|
224
|
-
| ... | ... | ... |
|
|
191
|
+
### Module 5: Technical Constraints (tech-constraints.md) (if applicable)
|
|
225
192
|
|
|
226
|
-
|
|
227
|
-
- [ ] ...
|
|
193
|
+
**Output content**: Tech stack, deployment environment, integration points, team constraints.
|
|
228
194
|
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
195
|
+
**Agent's approach**:
|
|
196
|
+
1. Scan repository for existing tech stack information
|
|
197
|
+
2. **Directly write** confirmed facts (don't ask about things already visible in code)
|
|
198
|
+
3. For decision points, provide comparison tables + recommendations
|
|
199
|
+
4. User reviews → update file
|
|
233
200
|
|
|
234
|
-
##
|
|
201
|
+
## Conversation Techniques
|
|
235
202
|
|
|
236
|
-
|
|
237
|
-
2. **Progress by rounds**: No need to strictly follow five rounds — adjust flexibly based on actual needs; end early when enough info is gathered
|
|
238
|
-
3. **Summarize each round**: Ensure mutual understanding before continuing
|
|
239
|
-
4. **Exit when ready**: When most checklist items are checked or user says "that's about it", output structured summary
|
|
240
|
-
5. **Output summary**: After summary output, prompt user that they can use it to generate formal documents
|
|
203
|
+
### Adapting to Different User Types
|
|
241
204
|
|
|
242
|
-
|
|
205
|
+
- **Talkative users**: Promptly update documents so users see information being structured; avoid information scattering in chat
|
|
206
|
+
- **Quiet users**: More output, fewer questions; write more complete drafts so users only need to confirm "right/wrong"
|
|
207
|
+
- **Indecisive users**: Provide recommended solution + rationale: "Based on your scenario, I suggest doing X first because..."
|
|
208
|
+
- **Divergent users**: Record ideas to the Could/Won't section of documents, gently guide back to core flow
|
|
243
209
|
|
|
244
|
-
|
|
245
|
-
- User explicitly says "start producing", "you can write the doc now", "go ahead with this", etc.
|
|
246
|
-
- All Must items in the checklist are confirmed
|
|
210
|
+
### Review Confirmation Template
|
|
247
211
|
|
|
248
|
-
|
|
212
|
+
After completing a module's document update:
|
|
249
213
|
|
|
250
|
-
|
|
214
|
+
```
|
|
215
|
+
Updated docs/01-requirement/project-profile.md
|
|
216
|
+
|
|
217
|
+
Points to confirm:
|
|
218
|
+
1. Are the target users limited to "students" and "teachers"?
|
|
219
|
+
2. Is "1000 DAU" a reasonable success criterion?
|
|
251
220
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
Each Q&A round should be persisted to a Markdown file, not relying on model memory. Use `scripts/qa_session.py` to manage session documents:
|
|
255
|
-
|
|
256
|
-
```bash
|
|
257
|
-
# Start new session
|
|
258
|
-
python3 skills/requirement-qa/scripts/qa_session.py start \
|
|
259
|
-
--topic "User Login Feature" \
|
|
260
|
-
--initial-request "I need a login feature"
|
|
261
|
-
|
|
262
|
-
# Record each round
|
|
263
|
-
python3 skills/requirement-qa/scripts/qa_session.py append-turn \
|
|
264
|
-
--doc-path "<doc_path>" \
|
|
265
|
-
--question "Which login methods to support?" \
|
|
266
|
-
--answer "Phone+SMS code, email+password" \
|
|
267
|
-
--confirmed "Support phone+SMS code" \
|
|
268
|
-
--confirmed "Support email+password" \
|
|
269
|
-
--open-item "Whether third-party login is needed" \
|
|
270
|
-
--current-understanding "Core login methods confirmed"
|
|
271
|
-
|
|
272
|
-
# Finalize session
|
|
273
|
-
python3 skills/requirement-qa/scripts/qa_session.py finalize \
|
|
274
|
-
--doc-path "<doc_path>" \
|
|
275
|
-
--final-summary "Login feature requirements converged" \
|
|
276
|
-
--deliverable "Requirement summary document"
|
|
221
|
+
Please review the file content and let me know what needs correction. After confirmation, I'll move to the next module (feature scope).
|
|
277
222
|
```
|
|
278
223
|
|
|
279
|
-
|
|
224
|
+
## Execution
|
|
280
225
|
|
|
281
|
-
|
|
226
|
+
1. **Entry condition**: When user input is insufficient for a complete document, enter QA flow
|
|
227
|
+
2. **Start with project profile**: Regardless of information volume, first produce a project-profile.md draft
|
|
228
|
+
3. **Progress by module**: Each module goes through "output → review → correct" loop; skip modules if information is sufficient
|
|
229
|
+
4. **Update in place**: Each correction updates the same file, no new files created
|
|
230
|
+
5. **Exit when ready**: When all Must modules are reviewed and user is satisfied, output completion summary
|
|
231
|
+
6. **Handoff**: Prompt user that `docs/01-requirement/` output can feed into spec-writing for detailed requirement documents
|
|
282
232
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
233
|
+
## Completion Signals
|
|
234
|
+
|
|
235
|
+
QA can only end in these situations by default:
|
|
236
|
+
- User explicitly says "start output", "ready to write docs", "go with this", etc.
|
|
237
|
+
- project-profile.md and feature-scope.md have at least completed review
|
|
238
|
+
|
|
239
|
+
If user says "keep asking" or "don't start yet", treat as continue clarification. Even if user insists on ending immediately but information is incomplete, **explicitly list assumptions** in documents, annotated as "Not confirmed by user, based on inference."
|
|
240
|
+
|
|
241
|
+
For the complete signal list and minimum exit criteria, see [references/completion-signals.md](references/completion-signals.md).
|