@zeyue0329/xiaoma-cli 1.0.42 → 1.0.44

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.
Files changed (37) hide show
  1. package/.idea/workspace.xml +2 -7
  2. package/JAVA-BACKEND-COMMANDS-REFERENCE.md +2 -2
  3. package/JAVA-BACKEND-ITERATION-GUIDE.md +31 -31
  4. package/dist/agents/analyst.txt +1514 -0
  5. package/dist/agents/architect.txt +1 -1
  6. package/dist/agents/pm.txt +20 -20
  7. package/dist/agents/po.txt +1 -1
  8. package/dist/agents/sm.txt +1 -1
  9. package/dist/agents/workflow-executor.txt +22 -22
  10. package/dist/agents/xiaoma-master.txt +20 -20
  11. package/dist/teams/team-all.txt +1640 -331
  12. package/dist/teams/team-fullstack-with-database.txt +1616 -307
  13. package/dist/teams/team-fullstack.txt +1618 -309
  14. package/dist/teams/team-ide-minimal.txt +2 -2
  15. package/dist/teams/team-no-ui.txt +1618 -309
  16. package/docs/architecture-sharding-modification.md +4 -4
  17. package/docs/automated-requirements-analysis-outputs.md +29 -29
  18. package/docs/prd/workflow-coordinator-prd.md +2 -2
  19. package/package.json +1 -1
  20. package/xiaoma-core/agents/analyst.md +8 -0
  21. package/xiaoma-core/agents/pm.md +1 -1
  22. package/xiaoma-core/agents/po.md +1 -1
  23. package/xiaoma-core/agents/requirements-coverage-auditor.yaml +1 -1
  24. package/xiaoma-core/agents/sm.md +1 -1
  25. package/xiaoma-core/agents/workflow-executor.md +22 -22
  26. package/xiaoma-core/tasks/batch-story-generation.md +1 -1
  27. package/xiaoma-core/tasks/requirement-analysis-with-rag.md +352 -0
  28. package/xiaoma-core/tasks/requirements-coverage-audit.md +5 -5
  29. package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +1 -1
  30. package/xiaoma-core/templates/prd-tmpl.yaml +19 -19
  31. package/xiaoma-core/templates/rag-knowledge-tmpl.yaml +569 -0
  32. package/xiaoma-core/templates/rag-questions-tmpl.yaml +371 -0
  33. package/xiaoma-core/templates/requirements-coverage-audit.yaml +6 -6
  34. package/xiaoma-core/workflows/automated-requirements-analysis.yaml +90 -90
  35. package/xiaoma-core/workflows/automated-requirements-development.yaml +10 -10
  36. package/xiaoma-core/workflows/enhanced-fullstack-with-qa-loop.yaml +1 -1
  37. package/xiaoma-core/workflows/full-requirement-automation.yaml +1 -1
@@ -0,0 +1,371 @@
1
+ template:
2
+ id: rag-questions-template-v1
3
+ name: 知识库问题生成模板
4
+ version: 1.0
5
+ description: 基于需求文档(req.txt)生成知识库MCP查询问题
6
+ output:
7
+ format: markdown
8
+ filename: docs/rag-questions.md
9
+ title: "知识库查询问题清单"
10
+
11
+ workflow:
12
+ mode: interactive
13
+ phases:
14
+ - 需求解析
15
+ - 问题生成
16
+ - 问题确认
17
+ - 知识库查询
18
+ - 知识落地
19
+
20
+ sections:
21
+ - id: requirement-parsing
22
+ title: 第一阶段:需求文档解析
23
+ instruction: |
24
+ 读取并深度分析 req.txt 文档,提取以下要素:
25
+
26
+ 1. **业务领域识别**
27
+ - 这个需求属于什么业务领域?(如:订单管理、用户管理、支付系统等)
28
+ - 涉及哪些子领域或模块?
29
+
30
+ 2. **功能点提取**
31
+ - 需求描述了哪些具体功能?
32
+ - 每个功能的输入、处理、输出是什么?
33
+
34
+ 3. **用户角色识别**
35
+ - 涉及哪些用户角色?(如:管理员、普通用户、访客)
36
+ - 每个角色在此需求中的操作是什么?
37
+
38
+ 4. **数据实体识别**
39
+ - 涉及哪些数据对象?(如:订单、商品、用户)
40
+ - 数据之间的关系是什么?
41
+
42
+ 5. **业务流程识别**
43
+ - 描述了什么业务流程?
44
+ - 流程的起点、终点、关键步骤是什么?
45
+
46
+ 6. **模糊点标记**
47
+ - 哪些描述不够清晰?
48
+ - 哪些内容有多种理解方式?
49
+ output:
50
+ format: yaml
51
+ template: |
52
+ 需求解析结果:
53
+ 业务领域: {{domain}}
54
+ 子领域: [{{sub_domains}}]
55
+
56
+ 功能点:
57
+ {{#each features}}
58
+ - 名称: {{name}}
59
+ 描述: {{description}}
60
+ 输入: {{input}}
61
+ 输出: {{output}}
62
+ {{/each}}
63
+
64
+ 用户角色:
65
+ {{#each roles}}
66
+ - 角色: {{name}}
67
+ 操作: [{{actions}}]
68
+ {{/each}}
69
+
70
+ 数据实体:
71
+ {{#each entities}}
72
+ - 实体: {{name}}
73
+ 属性: [{{attributes}}]
74
+ 关系: {{relationships}}
75
+ {{/each}}
76
+
77
+ 业务流程:
78
+ {{#each processes}}
79
+ - 流程: {{name}}
80
+ 步骤: [{{steps}}]
81
+ {{/each}}
82
+
83
+ 模糊点:
84
+ {{#each ambiguities}}
85
+ - 位置: {{location}}
86
+ 内容: {{content}}
87
+ 可能理解: [{{interpretations}}]
88
+ {{/each}}
89
+
90
+ - id: question-generation
91
+ title: 第二阶段:问题生成
92
+ instruction: |
93
+ 基于解析结果,为每个要素生成具体的知识库查询问题。
94
+
95
+ **问题生成原则**:
96
+ 1. 每个问题必须具体、可回答
97
+ 2. 优先生成阻塞性问题(缺失会导致无法继续)
98
+ 3. 问题应覆盖:业务、技术、历史、约束 四个维度
99
+ 4. 避免开放性过强的问题
100
+ sections:
101
+ - id: business-questions
102
+ title: A. 业务知识问题
103
+ instruction: |
104
+ 针对业务领域和流程生成问题,重点关注:
105
+ - 业务规则和约束
106
+ - 业务流程细节
107
+ - 边界情况处理
108
+ - 用户权限和角色
109
+ question_templates:
110
+ - category: A1-业务规则
111
+ templates:
112
+ - "[{entity}]有哪些业务规则?如:状态流转、必填约束、取值范围"
113
+ - "[{process}]流程中,[{step}]步骤的具体业务规则是什么?"
114
+ - "[{role}]角色在[{operation}]操作上有什么权限限制?"
115
+ - "[{entity}]和[{related_entity}]之间的业务关联规则是什么?"
116
+
117
+ - category: A2-业务流程
118
+ templates:
119
+ - "[{process}]的完整流程是什么?包括正常流程和异常流程"
120
+ - "触发[{process}]的条件有哪些?"
121
+ - "[{process}]流程中有哪些人工审批或确认节点?"
122
+ - "[{process}]失败后的补偿或回退机制是什么?"
123
+
124
+ - category: A3-边界情况
125
+ templates:
126
+ - "[{operation}]操作在什么情况下会失败?失败后如何处理?"
127
+ - "[{entity}]存在并发操作时,系统如何处理冲突?"
128
+ - "[{data}]数据量很大时,有什么限制或分页规则?"
129
+ - "[{scenario}]场景下的异常处理逻辑是什么?"
130
+
131
+ - id: technical-questions
132
+ title: B. 技术知识问题
133
+ instruction: |
134
+ 针对技术实现生成问题,重点关注:
135
+ - 现有系统架构
136
+ - 数据模型设计
137
+ - 接口规范
138
+ - 代码实现模式
139
+ question_templates:
140
+ - category: B1-系统架构
141
+ templates:
142
+ - "[{module}]模块的技术架构是什么?与其他模块如何交互?"
143
+ - "系统中有哪些公共服务或组件可以复用于[{feature}]?"
144
+ - "[{functionality}]功能应该放在哪个服务/模块中实现?"
145
+ - "系统的缓存策略是什么?[{data}]数据需要缓存吗?"
146
+
147
+ - category: B2-数据模型
148
+ templates:
149
+ - "[{entity}]在数据库中的表结构是什么?包含哪些字段?"
150
+ - "[{entity_a}]和[{entity_b}]的数据库关系是怎样的?外键设计?"
151
+ - "与[{domain}]相关的枚举值或字典表有哪些?"
152
+ - "[{entity}]的历史记录/审计日志如何存储?"
153
+
154
+ - category: B3-接口规范
155
+ templates:
156
+ - "现有的[{module}]模块提供了哪些API接口?"
157
+ - "[{operation}]操作的接口入参和出参规范是什么?"
158
+ - "系统的统一错误码和响应格式是什么?"
159
+ - "[{external_system}]的集成接口协议和数据格式是什么?"
160
+
161
+ - category: B4-代码实现
162
+ templates:
163
+ - "类似[{feature}]的功能在现有代码中是如何实现的?"
164
+ - "系统中处理[{technical_concern}]的通用模式是什么?"
165
+ - "[{framework}]框架在项目中的使用规范和最佳实践是什么?"
166
+ - "现有代码中有哪些工具类或辅助方法可以用于[{task}]?"
167
+
168
+ - id: history-questions
169
+ title: C. 历史追溯问题
170
+ instruction: |
171
+ 针对历史需求和决策生成问题,重点关注:
172
+ - 相关历史需求
173
+ - 技术决策记录
174
+ - 已知问题和债务
175
+ question_templates:
176
+ - category: C1-历史需求
177
+ templates:
178
+ - "之前有没有类似[{feature}]的需求?实现情况如何?"
179
+ - "[{module}]模块最近有什么变更?变更原因是什么?"
180
+ - "[{feature}]功能的历史版本迭代情况是什么?"
181
+
182
+ - category: C2-决策记录
183
+ templates:
184
+ - "[{technical_choice}]为什么选择当前的实现方式?"
185
+ - "[{architecture_decision}]的架构决策背景是什么?"
186
+ - "有没有被否决的[{alternative}]方案?为什么被否决?"
187
+
188
+ - category: C3-已知问题
189
+ templates:
190
+ - "[{module}]模块有哪些已知的问题或技术债务?"
191
+ - "[{feature}]功能有没有用户反馈的问题或改进建议?"
192
+ - "与[{domain}]相关的性能或稳定性问题有哪些?"
193
+
194
+ - id: constraint-questions
195
+ title: D. 约束条件问题
196
+ instruction: |
197
+ 针对项目和技术约束生成问题,重点关注:
198
+ - 技术栈限制
199
+ - 安全合规要求
200
+ - 性能要求
201
+ - 团队规范
202
+ question_templates:
203
+ - category: D1-技术约束
204
+ templates:
205
+ - "项目的技术栈限制有哪些?必须使用什么框架/库?"
206
+ - "[{technical_approach}]方案在当前技术栈下是否可行?"
207
+ - "项目对[{resource}]资源的使用有什么限制?"
208
+
209
+ - category: D2-安全合规
210
+ templates:
211
+ - "[{data_type}]数据的安全存储和传输要求是什么?"
212
+ - "[{operation}]操作需要哪些权限验证?"
213
+ - "项目需要满足哪些合规要求?(如GDPR、等保)"
214
+
215
+ - category: D3-性能要求
216
+ templates:
217
+ - "[{interface}]接口的响应时间要求是什么?"
218
+ - "[{process}]流程的并发处理能力要求是多少?"
219
+ - "系统的可用性SLA要求是什么?"
220
+
221
+ - category: D4-团队规范
222
+ templates:
223
+ - "团队的代码规范和风格指南是什么?"
224
+ - "代码审查的标准和流程是什么?"
225
+ - "测试覆盖率和测试类型的要求是什么?"
226
+
227
+ - id: question-prioritization
228
+ title: 第三阶段:问题优先级排序
229
+ instruction: |
230
+ 对生成的问题进行优先级排序:
231
+
232
+ **P0 - 阻塞级**(必须回答)
233
+ - 缺失会导致完全无法理解需求
234
+ - 涉及核心业务规则
235
+ - 影响架构决策
236
+
237
+ **P1 - 重要级**(强烈建议回答)
238
+ - 影响需求完整性
239
+ - 涉及边界情况处理
240
+ - 影响实现方案选择
241
+
242
+ **P2 - 补充级**(可选回答)
243
+ - 有助于优化实现
244
+ - 提供额外上下文
245
+ - 历史参考信息
246
+ output:
247
+ format: markdown
248
+ template: |
249
+ # 知识库查询问题清单
250
+
251
+ ## 元信息
252
+ - 源文档: req.txt
253
+ - 生成时间: {{timestamp}}
254
+ - 总问题数: {{total_count}}
255
+ - P0问题: {{p0_count}} | P1问题: {{p1_count}} | P2问题: {{p2_count}}
256
+
257
+ ---
258
+
259
+ ## P0 阻塞级问题(必须回答)
260
+
261
+ ### 业务知识
262
+ {{#each p0_business}}
263
+ {{index}}. [{{id}}] {{question}}
264
+ - 关联需求: "{{related_requirement}}"
265
+ - 预期答案: {{expected_answer_type}}
266
+ {{/each}}
267
+
268
+ ### 技术知识
269
+ {{#each p0_technical}}
270
+ {{index}}. [{{id}}] {{question}}
271
+ - 关联需求: "{{related_requirement}}"
272
+ - 预期答案: {{expected_answer_type}}
273
+ {{/each}}
274
+
275
+ ---
276
+
277
+ ## P1 重要级问题(强烈建议回答)
278
+
279
+ ### 业务知识
280
+ {{#each p1_business}}
281
+ {{index}}. [{{id}}] {{question}}
282
+ - 关联需求: "{{related_requirement}}"
283
+ {{/each}}
284
+
285
+ ### 技术知识
286
+ {{#each p1_technical}}
287
+ {{index}}. [{{id}}] {{question}}
288
+ - 关联需求: "{{related_requirement}}"
289
+ {{/each}}
290
+
291
+ ### 历史追溯
292
+ {{#each p1_history}}
293
+ {{index}}. [{{id}}] {{question}}
294
+ - 关联需求: "{{related_requirement}}"
295
+ {{/each}}
296
+
297
+ ---
298
+
299
+ ## P2 补充级问题(可选回答)
300
+
301
+ {{#each p2_questions}}
302
+ {{index}}. [{{id}}] {{question}}
303
+ {{/each}}
304
+
305
+ - id: knowledge-landing
306
+ title: 第四阶段:知识落地规范
307
+ instruction: |
308
+ 知识库返回的内容应按以下结构存储到 docs/rag/ 目录:
309
+ output:
310
+ structure: |
311
+ docs/rag/
312
+ ├── _index.md # 知识索引(自动生成)
313
+ ├── _questions.md # 问题清单(本模板输出)
314
+
315
+ ├── business/ # 业务知识
316
+ │ ├── domain-{{domain}}.md # 领域知识
317
+ │ ├── rules-{{topic}}.md # 业务规则
318
+ │ ├── process-{{name}}.md # 业务流程
319
+ │ └── roles.md # 角色权限
320
+
321
+ ├── technical/ # 技术知识
322
+ │ ├── architecture.md # 系统架构
323
+ │ ├── data-model.md # 数据模型
324
+ │ ├── api-{{module}}.md # 接口规范
325
+ │ └── patterns.md # 代码模式
326
+
327
+ ├── history/ # 历史信息
328
+ │ ├── related-features.md # 相关功能
329
+ │ └── decisions.md # 决策记录
330
+
331
+ └── constraints/ # 约束条件
332
+ ├── technical.md # 技术约束
333
+ ├── security.md # 安全要求
334
+ └── performance.md # 性能要求
335
+
336
+ file_template: |
337
+ # {{title}}
338
+
339
+ ## 元信息
340
+ - 查询问题: {{question}}
341
+ - 问题ID: {{question_id}}
342
+ - 查询时间: {{timestamp}}
343
+ - 数据来源: 知识库MCP
344
+
345
+ ## 内容摘要
346
+ {{summary}}
347
+
348
+ ## 详细内容
349
+ {{content}}
350
+
351
+ ## 需求关联
352
+ - 关联需求点: {{related_requirement}}
353
+ - 影响分析: {{impact_analysis}}
354
+
355
+ ## 衍生问题
356
+ {{#if follow_up_questions}}
357
+ {{#each follow_up_questions}}
358
+ - {{this}}
359
+ {{/each}}
360
+ {{else}}
361
+
362
+ {{/if}}
363
+
364
+ elicitation:
365
+ after_each_phase: true
366
+ options:
367
+ - "调整问题优先级"
368
+ - "添加更多问题"
369
+ - "删除不相关问题"
370
+ - "修改问题措辞"
371
+ - "进入下一阶段"
@@ -25,7 +25,7 @@ description: |
25
25
 
26
26
  📋 **需求转化检查**:
27
27
  - PRD文档需求是否完全转化为用户故事
28
- - 史诗级需求的用户故事覆盖度
28
+ - 模块级需求的用户故事覆盖度
29
29
  - 需求优先级和实施状态匹配度
30
30
 
31
31
  ✅ **用户故事完整性检查**:
@@ -51,7 +51,7 @@ execution:
51
51
  description: "加载PRD文档"
52
52
  actions:
53
53
  - "读取主PRD文档"
54
- - "扫描docs/prd/目录下的史诗文件"
54
+ - "扫描docs/prd/目录下的模块文件"
55
55
  - "提取所有需求和用户故事定义"
56
56
  - "构建需求层次结构"
57
57
  output: "requirements_inventory.json"
@@ -59,7 +59,7 @@ execution:
59
59
  - step: "extract_requirements_matrix"
60
60
  description: "提取需求矩阵"
61
61
  actions:
62
- - "识别所有史诗和用户故事"
62
+ - "识别所有模块和用户故事"
63
63
  - "提取验收标准和功能点"
64
64
  - "分析需求优先级"
65
65
  - "构建需求依赖关系"
@@ -204,7 +204,7 @@ report_structure:
204
204
  sections:
205
205
  - requirements_coverage_matrix:
206
206
  title: "需求覆盖度矩阵"
207
- content: "史诗-用户故事映射表"
207
+ content: "模块-用户故事映射表"
208
208
  - story_completeness_analysis:
209
209
  title: "用户故事完整性分析"
210
210
  content: "每个故事的完整性评分"
@@ -322,8 +322,8 @@ usage_examples:
322
322
  *requirements-coverage-audit
323
323
 
324
324
  focused_audit: |
325
- # 专注于特定史诗的审计
326
- *coverage-audit --epic=史诗-1基础设施与核心文档展示
325
+ # 专注于特定模块的审计
326
+ *coverage-audit --epic=模块-1基础设施与核心文档展示
327
327
 
328
328
  status_verification: |
329
329
  # 验证用户故事状态准确性