@zeyue0329/xiaoma-cli 1.0.48 → 1.0.49
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/.idea/workspace.xml +5 -2
- package/dist/agents/architect.txt +1135 -0
- package/dist/agents/dev.txt +606 -2
- package/dist/agents/pm.txt +854 -0
- package/dist/agents/sm.txt +986 -3
- package/dist/teams/team-all.txt +3704 -128
- package/dist/teams/team-fullstack-with-database.txt +3820 -244
- package/dist/teams/team-fullstack.txt +2078 -89
- package/dist/teams/team-ide-minimal.txt +1592 -5
- package/dist/teams/team-no-ui.txt +2079 -90
- package/package.json +1 -1
- package/xiaoma-core/agents/architect.md +3 -0
- package/xiaoma-core/agents/dev.md +67 -2
- package/xiaoma-core/agents/pm.md +3 -0
- package/xiaoma-core/agents/sm.md +61 -3
- package/xiaoma-core/tasks/create-incremental-architecture.md +525 -0
- package/xiaoma-core/tasks/create-prd-from-rag.md +435 -0
- package/xiaoma-core/tasks/create-story-with-rag.md +559 -0
- package/xiaoma-core/tasks/develop-story-with-rag.md +536 -0
- package/xiaoma-core/templates/incremental-architecture-tmpl.yaml +601 -0
- package/xiaoma-core/templates/prd-from-rag-tmpl.yaml +410 -0
- package/xiaoma-core/templates/story-with-rag-tmpl.yaml +360 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
template:
|
|
2
|
+
id: story-with-rag-template-v1
|
|
3
|
+
name: 基于知识库的用户故事文档
|
|
4
|
+
version: 1.0
|
|
5
|
+
description: 融合知识库业务规则、技术规范和架构增量设计的用户故事模板
|
|
6
|
+
output:
|
|
7
|
+
format: markdown
|
|
8
|
+
filename: docs/stories/{{epic_num}}.{{story_num}}.{{story_title_short}}.md
|
|
9
|
+
title: "Story {{epic_num}}.{{story_num}}: {{story_title_short}}"
|
|
10
|
+
|
|
11
|
+
workflow:
|
|
12
|
+
mode: interactive
|
|
13
|
+
elicitation: advanced-elicitation
|
|
14
|
+
upstream:
|
|
15
|
+
agents:
|
|
16
|
+
- analyst # 提供需求分析报告和知识库
|
|
17
|
+
- pm # 提供PRD文档
|
|
18
|
+
- architect # 提供架构增量设计
|
|
19
|
+
required_files:
|
|
20
|
+
- docs/prd.md
|
|
21
|
+
- docs/architecture-increment.md
|
|
22
|
+
optional_files:
|
|
23
|
+
- docs/rag/_analysis-report.md
|
|
24
|
+
- docs/rag/business/*
|
|
25
|
+
- docs/rag/technical/*
|
|
26
|
+
- docs/rag/constraints/*
|
|
27
|
+
|
|
28
|
+
agent_config:
|
|
29
|
+
editable_sections:
|
|
30
|
+
- Status
|
|
31
|
+
- Story
|
|
32
|
+
- Acceptance Criteria
|
|
33
|
+
- Tasks / Subtasks
|
|
34
|
+
- Dev Notes
|
|
35
|
+
- Testing
|
|
36
|
+
- Knowledge References
|
|
37
|
+
- Change Log
|
|
38
|
+
|
|
39
|
+
sections:
|
|
40
|
+
- id: status
|
|
41
|
+
title: 状态
|
|
42
|
+
type: choice
|
|
43
|
+
choices: [Draft, Approved, InProgress, Review, Done]
|
|
44
|
+
instruction: 选择此用户故事的当前状态
|
|
45
|
+
owner: scrum-master
|
|
46
|
+
editors: [scrum-master, po-agent, dev-agent]
|
|
47
|
+
|
|
48
|
+
- id: story
|
|
49
|
+
title: 用户故事
|
|
50
|
+
type: template-text
|
|
51
|
+
template: |
|
|
52
|
+
**作为** {{role}},
|
|
53
|
+
**我希望** {{action}},
|
|
54
|
+
**以便** {{benefit}}
|
|
55
|
+
instruction: |
|
|
56
|
+
使用标准格式定义用户故事。
|
|
57
|
+
- 角色来源: docs/rag/_analysis-report.md#用户分析
|
|
58
|
+
- 功能来源: PRD/Epic 中的 Story 定义
|
|
59
|
+
- 价值来源: 需求分析报告中的业务目标
|
|
60
|
+
elicit: true
|
|
61
|
+
owner: scrum-master
|
|
62
|
+
editors: [scrum-master]
|
|
63
|
+
|
|
64
|
+
- id: acceptance-criteria
|
|
65
|
+
title: 验收标准
|
|
66
|
+
type: numbered-list
|
|
67
|
+
instruction: |
|
|
68
|
+
从 Epic 文件中复制验收标准,并融合知识库内容增强:
|
|
69
|
+
|
|
70
|
+
**增强规则**:
|
|
71
|
+
1. 检查每个AC是否有对应的业务规则 (docs/rag/business/rules-*.md)
|
|
72
|
+
- 如有,将业务规则细节融入AC
|
|
73
|
+
- 标注来源: (来源: business/rules-{name}.md)
|
|
74
|
+
|
|
75
|
+
2. 检查每个AC是否涉及约束条件 (docs/rag/constraints/)
|
|
76
|
+
- 如有安全要求,添加安全约束
|
|
77
|
+
- 如有性能要求,添加性能指标
|
|
78
|
+
- 标注来源: (来源: constraints/{name}.md)
|
|
79
|
+
|
|
80
|
+
**示例**:
|
|
81
|
+
1. 用户可以创建订单
|
|
82
|
+
- 订单状态初始为"待支付" (来源: business/rules-order.md)
|
|
83
|
+
- 订单号格式: ORD{yyyyMMdd}{6位序号} (来源: business/rules-order.md)
|
|
84
|
+
- 接口响应时间 < 500ms (来源: constraints/performance.md)
|
|
85
|
+
elicit: true
|
|
86
|
+
owner: scrum-master
|
|
87
|
+
editors: [scrum-master]
|
|
88
|
+
|
|
89
|
+
- id: tasks-subtasks
|
|
90
|
+
title: 任务 / 子任务
|
|
91
|
+
type: bullet-list
|
|
92
|
+
instruction: |
|
|
93
|
+
基于架构增量设计 (docs/architecture-increment.md) 生成详细任务。
|
|
94
|
+
|
|
95
|
+
**任务生成规则**:
|
|
96
|
+
|
|
97
|
+
1. **数据层任务** (如Story涉及数据模型):
|
|
98
|
+
来源: architecture-increment.md#数据模型增量设计
|
|
99
|
+
```
|
|
100
|
+
- [ ] 创建/修改数据模型 (AC: {相关AC})
|
|
101
|
+
- [ ] 创建实体类 [参考: architecture-increment.md#entity-detail]
|
|
102
|
+
- [ ] 执行DDL脚本 [参考: architecture-increment.md#ddl-script]
|
|
103
|
+
- [ ] 创建Mapper/Repository [遵循: coding-standards/]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
2. **接口层任务** (如Story涉及API):
|
|
107
|
+
来源: architecture-increment.md#接口增量设计
|
|
108
|
+
```
|
|
109
|
+
- [ ] 实现API接口 (AC: {相关AC})
|
|
110
|
+
- [ ] 创建Controller [参考: architecture-increment.md#api-detail]
|
|
111
|
+
- [ ] 实现参数校验 [遵循: coding-standards/]
|
|
112
|
+
- [ ] 实现响应格式 [参考: architecture-increment.md#response-design]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
3. **业务层任务** (如Story涉及业务逻辑):
|
|
116
|
+
来源: architecture-increment.md#模块增量设计
|
|
117
|
+
```
|
|
118
|
+
- [ ] 实现业务逻辑 (AC: {相关AC})
|
|
119
|
+
- [ ] 创建Service类 [参考: architecture-increment.md#class-design]
|
|
120
|
+
- [ ] 实现业务规则 [参考: business/rules-{name}.md]
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
4. **中间件任务** (如Story涉及缓存/消息):
|
|
124
|
+
来源: architecture-increment.md#中间件增量设计
|
|
125
|
+
```
|
|
126
|
+
- [ ] 实现缓存逻辑 (AC: {相关AC})
|
|
127
|
+
- [ ] Redis实现 [参考: architecture-increment.md#redis-design]
|
|
128
|
+
- [ ] 代码示例 [参考: middleware/redis.md]
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
5. **测试任务**:
|
|
132
|
+
```
|
|
133
|
+
- [ ] 编写测试用例 (AC: ALL)
|
|
134
|
+
- [ ] 单元测试 [遵循: coding-standards/testing]
|
|
135
|
+
- [ ] 集成测试(如需要)
|
|
136
|
+
```
|
|
137
|
+
template: |
|
|
138
|
+
- [ ] 任务 1 (AC: #) [参考: {knowledge_ref}]
|
|
139
|
+
- [ ] 子任务 1.1 [遵循: {standard_ref}]
|
|
140
|
+
- [ ] 任务 2 (AC: #) [参考: {knowledge_ref}]
|
|
141
|
+
- [ ] 子任务 2.1 [遵循: {standard_ref}]
|
|
142
|
+
elicit: true
|
|
143
|
+
owner: scrum-master
|
|
144
|
+
editors: [scrum-master, dev-agent]
|
|
145
|
+
|
|
146
|
+
- id: dev-notes
|
|
147
|
+
title: 开发者说明
|
|
148
|
+
instruction: |
|
|
149
|
+
整合知识库内容,为开发者提供完整的技术上下文。
|
|
150
|
+
|
|
151
|
+
**来源整合**:
|
|
152
|
+
- 架构设计: docs/architecture-increment.md
|
|
153
|
+
- 编码规范: docs/rag/technical/coding-standards/
|
|
154
|
+
- 模块结构: docs/rag/technical/module-structure.md
|
|
155
|
+
- 中间件规范: docs/rag/technical/middleware/
|
|
156
|
+
- 业务规则: docs/rag/business/rules-*.md
|
|
157
|
+
- 约束条件: docs/rag/constraints/
|
|
158
|
+
|
|
159
|
+
**填充规则**:
|
|
160
|
+
- 每个技术细节必须标注来源
|
|
161
|
+
- 提供足够上下文使开发者无需阅读原始文档
|
|
162
|
+
- 包含相关代码示例引用
|
|
163
|
+
elicit: true
|
|
164
|
+
owner: scrum-master
|
|
165
|
+
editors: [scrum-master]
|
|
166
|
+
sections:
|
|
167
|
+
- id: previous-story-insights
|
|
168
|
+
title: 上一个Story洞察
|
|
169
|
+
instruction: |
|
|
170
|
+
从上一个Story的Dev Agent Record中提取关键信息:
|
|
171
|
+
- 技术决策和实现方式
|
|
172
|
+
- 遇到的问题和解决方案
|
|
173
|
+
- 对当前Story的建议
|
|
174
|
+
owner: scrum-master
|
|
175
|
+
editors: [scrum-master]
|
|
176
|
+
|
|
177
|
+
- id: architecture-reference
|
|
178
|
+
title: 架构设计参考
|
|
179
|
+
instruction: |
|
|
180
|
+
从 docs/architecture-increment.md 提取与当前Story相关的设计:
|
|
181
|
+
|
|
182
|
+
**模块设计** [参考: architecture-increment.md#module-design]
|
|
183
|
+
- 包结构: {提取的包结构}
|
|
184
|
+
- 核心类: {提取的类列表}
|
|
185
|
+
|
|
186
|
+
**数据模型** [参考: architecture-increment.md#data-model-design]
|
|
187
|
+
- 表名: {table_name}
|
|
188
|
+
- 核心字段: {fields}
|
|
189
|
+
- DDL参考: {ddl_section_ref}
|
|
190
|
+
|
|
191
|
+
**接口设计** [参考: architecture-increment.md#api-design]
|
|
192
|
+
- 路径: {api_path}
|
|
193
|
+
- 方法: {http_method}
|
|
194
|
+
- 请求/响应参考: {api_detail_ref}
|
|
195
|
+
|
|
196
|
+
**中间件设计** [参考: architecture-increment.md#middleware-design]
|
|
197
|
+
- Redis设计: {redis_ref}
|
|
198
|
+
- MQ设计: {mq_ref}
|
|
199
|
+
owner: scrum-master
|
|
200
|
+
editors: [scrum-master]
|
|
201
|
+
|
|
202
|
+
- id: business-rules
|
|
203
|
+
title: 业务规则
|
|
204
|
+
instruction: |
|
|
205
|
+
从 docs/rag/business/rules-*.md 提取与当前Story相关的业务规则:
|
|
206
|
+
|
|
207
|
+
[参考: business/rules-{name}.md]
|
|
208
|
+
- 规则1: {rule_description}
|
|
209
|
+
- 规则2: {rule_description}
|
|
210
|
+
|
|
211
|
+
确保每条规则都标注来源文件。
|
|
212
|
+
owner: scrum-master
|
|
213
|
+
editors: [scrum-master]
|
|
214
|
+
|
|
215
|
+
- id: coding-standards
|
|
216
|
+
title: 编码规范要点
|
|
217
|
+
instruction: |
|
|
218
|
+
从 docs/rag/technical/coding-standards/ 提取关键规范:
|
|
219
|
+
|
|
220
|
+
[参考: coding-standards/]
|
|
221
|
+
- 命名规范: {naming_rules}
|
|
222
|
+
- 分层规范: {layer_rules}
|
|
223
|
+
- 异常处理: {exception_rules}
|
|
224
|
+
- 日志规范: {logging_rules}
|
|
225
|
+
owner: scrum-master
|
|
226
|
+
editors: [scrum-master]
|
|
227
|
+
|
|
228
|
+
- id: middleware-usage
|
|
229
|
+
title: 中间件使用
|
|
230
|
+
condition: Story涉及中间件
|
|
231
|
+
instruction: |
|
|
232
|
+
从 docs/rag/technical/middleware/ 提取使用规范和代码示例:
|
|
233
|
+
|
|
234
|
+
**Redis** [参考: middleware/redis.md]
|
|
235
|
+
- Key命名: {key_pattern}
|
|
236
|
+
- 过期策略: {expiration}
|
|
237
|
+
- 代码示例参考: middleware/redis.md#{section}
|
|
238
|
+
|
|
239
|
+
**MQ** [参考: middleware/mq.md]
|
|
240
|
+
- Topic: {topic_name}
|
|
241
|
+
- 消息格式: {message_format}
|
|
242
|
+
- 代码示例参考: middleware/mq.md#{section}
|
|
243
|
+
owner: scrum-master
|
|
244
|
+
editors: [scrum-master]
|
|
245
|
+
|
|
246
|
+
- id: constraints
|
|
247
|
+
title: 约束条件
|
|
248
|
+
instruction: |
|
|
249
|
+
从 docs/rag/constraints/ 提取相关约束:
|
|
250
|
+
|
|
251
|
+
**安全要求** [参考: constraints/security.md]
|
|
252
|
+
- {security_requirements}
|
|
253
|
+
|
|
254
|
+
**性能要求** [参考: constraints/performance.md]
|
|
255
|
+
- {performance_requirements}
|
|
256
|
+
owner: scrum-master
|
|
257
|
+
editors: [scrum-master]
|
|
258
|
+
|
|
259
|
+
- id: file-locations
|
|
260
|
+
title: 文件位置
|
|
261
|
+
instruction: |
|
|
262
|
+
从 docs/rag/technical/module-structure.md 提取文件位置规范:
|
|
263
|
+
|
|
264
|
+
[参考: module-structure.md]
|
|
265
|
+
- Controller: {path}
|
|
266
|
+
- Service: {path}
|
|
267
|
+
- Mapper/Repository: {path}
|
|
268
|
+
- Entity: {path}
|
|
269
|
+
- Test: {path}
|
|
270
|
+
owner: scrum-master
|
|
271
|
+
editors: [scrum-master]
|
|
272
|
+
|
|
273
|
+
- id: testing-standards
|
|
274
|
+
title: 测试说明
|
|
275
|
+
instruction: |
|
|
276
|
+
从 docs/rag/technical/coding-standards/ 提取测试规范:
|
|
277
|
+
|
|
278
|
+
[参考: coding-standards/testing]
|
|
279
|
+
- 测试框架: {test_framework}
|
|
280
|
+
- 测试文件位置: {test_file_location}
|
|
281
|
+
- 测试场景:
|
|
282
|
+
- 正常流程: {normal_scenarios}
|
|
283
|
+
- 异常流程: {error_scenarios}
|
|
284
|
+
- 边界条件: {edge_cases}
|
|
285
|
+
elicit: true
|
|
286
|
+
owner: scrum-master
|
|
287
|
+
editors: [scrum-master]
|
|
288
|
+
|
|
289
|
+
- id: knowledge-references
|
|
290
|
+
title: 知识引用索引
|
|
291
|
+
instruction: |
|
|
292
|
+
记录Story中引用的所有知识文件,便于追溯和验证。
|
|
293
|
+
|
|
294
|
+
| 知识文件 | 引用章节 | 应用位置 |
|
|
295
|
+
|----------|----------|----------|
|
|
296
|
+
| docs/architecture-increment.md | 模块设计 | 任务列表、Dev Notes |
|
|
297
|
+
| docs/rag/business/rules-*.md | 业务规则 | AC增强、业务逻辑任务 |
|
|
298
|
+
| docs/rag/technical/coding-standards/ | 编码规范 | Dev Notes |
|
|
299
|
+
| docs/rag/technical/middleware/*.md | 中间件示例 | 中间件任务 |
|
|
300
|
+
| docs/rag/constraints/*.md | 约束条件 | AC约束 |
|
|
301
|
+
type: table
|
|
302
|
+
columns: [知识文件, 引用章节, 应用位置]
|
|
303
|
+
owner: scrum-master
|
|
304
|
+
editors: [scrum-master, dev-agent]
|
|
305
|
+
|
|
306
|
+
- id: change-log
|
|
307
|
+
title: 变更日志
|
|
308
|
+
type: table
|
|
309
|
+
columns: [日期, 版本, 描述, 作者]
|
|
310
|
+
instruction: 跟踪此用户故事文档的变更
|
|
311
|
+
owner: scrum-master
|
|
312
|
+
editors: [scrum-master, dev-agent, qa-agent]
|
|
313
|
+
|
|
314
|
+
- id: dev-agent-record
|
|
315
|
+
title: 开发者代理记录
|
|
316
|
+
instruction: 此部分由开发代理在实施过程中填充
|
|
317
|
+
owner: dev-agent
|
|
318
|
+
editors: [dev-agent]
|
|
319
|
+
sections:
|
|
320
|
+
- id: agent-model
|
|
321
|
+
title: 使用的代理模型
|
|
322
|
+
template: "{{agent_model_name_version}}"
|
|
323
|
+
instruction: 记录用于开发的特定 AI 代理模型和版本
|
|
324
|
+
owner: dev-agent
|
|
325
|
+
editors: [dev-agent]
|
|
326
|
+
|
|
327
|
+
- id: debug-log-references
|
|
328
|
+
title: 调试日志参考
|
|
329
|
+
instruction: 引用开发过程中生成的任何调试日志或跟踪信息
|
|
330
|
+
owner: dev-agent
|
|
331
|
+
editors: [dev-agent]
|
|
332
|
+
|
|
333
|
+
- id: completion-notes
|
|
334
|
+
title: 完成说明列表
|
|
335
|
+
instruction: 关于任务完成情况和遇到的任何问题的说明
|
|
336
|
+
owner: dev-agent
|
|
337
|
+
editors: [dev-agent]
|
|
338
|
+
|
|
339
|
+
- id: file-list
|
|
340
|
+
title: 文件列表
|
|
341
|
+
instruction: 列出在用户故事实施过程中创建、修改或影响的所有文件
|
|
342
|
+
owner: dev-agent
|
|
343
|
+
editors: [dev-agent]
|
|
344
|
+
|
|
345
|
+
- id: knowledge-usage-record
|
|
346
|
+
title: 知识使用记录
|
|
347
|
+
instruction: |
|
|
348
|
+
记录实际开发中使用的知识文件和参考内容:
|
|
349
|
+
| 知识文件 | 使用内容 | 应用代码位置 |
|
|
350
|
+
|----------|----------|--------------|
|
|
351
|
+
type: table
|
|
352
|
+
columns: [知识文件, 使用内容, 应用代码位置]
|
|
353
|
+
owner: dev-agent
|
|
354
|
+
editors: [dev-agent]
|
|
355
|
+
|
|
356
|
+
- id: qa-results
|
|
357
|
+
title: QA 结果
|
|
358
|
+
instruction: QA 代理对已完成的用户故事实施进行 QA 审查的结果
|
|
359
|
+
owner: qa-agent
|
|
360
|
+
editors: [qa-agent]
|