@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,569 @@
1
+ template:
2
+ id: rag-knowledge-template-v1
3
+ name: RAG知识落地模板
4
+ version: 1.0
5
+ description: 将知识库MCP返回的知识内容结构化存储到docs/rag目录
6
+ output:
7
+ format: markdown
8
+ base_path: docs/rag/
9
+
10
+ sections:
11
+ - id: index-template
12
+ title: 知识索引模板
13
+ filename: _index.md
14
+ template: |
15
+ # RAG知识库索引
16
+
17
+ ## 概览
18
+ - 需求文档: {{requirement_file}}
19
+ - 创建时间: {{created_at}}
20
+ - 最后更新: {{updated_at}}
21
+ - 知识条目数: {{total_entries}}
22
+
23
+ ## 知识分类统计
24
+
25
+ | 分类 | 条目数 | 覆盖率 |
26
+ |------|--------|--------|
27
+ | 业务知识 | {{business_count}} | {{business_coverage}}% |
28
+ | 技术知识 | {{technical_count}} | {{technical_coverage}}% |
29
+ | 历史信息 | {{history_count}} | {{history_coverage}}% |
30
+ | 约束条件 | {{constraints_count}} | {{constraints_coverage}}% |
31
+
32
+ ## 知识目录
33
+
34
+ ### 业务知识 (business/)
35
+ {{#each business_files}}
36
+ - [{{title}}](business/{{filename}}) - {{summary}}
37
+ {{/each}}
38
+
39
+ ### 技术知识 (technical/)
40
+ {{#each technical_files}}
41
+ - [{{title}}](technical/{{filename}}) - {{summary}}
42
+ {{/each}}
43
+
44
+ ### 历史信息 (history/)
45
+ {{#each history_files}}
46
+ - [{{title}}](history/{{filename}}) - {{summary}}
47
+ {{/each}}
48
+
49
+ ### 约束条件 (constraints/)
50
+ {{#each constraints_files}}
51
+ - [{{title}}](constraints/{{filename}}) - {{summary}}
52
+ {{/each}}
53
+
54
+ ## 未回答问题
55
+ {{#if unanswered_questions}}
56
+ 以下问题未能从知识库获得答案:
57
+ {{#each unanswered_questions}}
58
+ - [{{id}}] {{question}}
59
+ {{/each}}
60
+ {{else}}
61
+ 所有问题均已获得回答。
62
+ {{/if}}
63
+
64
+ ## 后续行动
65
+ {{#each follow_up_actions}}
66
+ - [ ] {{action}}
67
+ {{/each}}
68
+
69
+ - id: business-knowledge
70
+ title: 业务知识模板
71
+ path: business/
72
+ variants:
73
+ - id: domain-knowledge
74
+ filename_pattern: "domain-{{domain_name}}.md"
75
+ template: |
76
+ # {{domain_name}} 领域知识
77
+
78
+ ## 元信息
79
+ - 查询问题ID: {{question_ids}}
80
+ - 来源: 知识库MCP
81
+ - 更新时间: {{timestamp}}
82
+
83
+ ## 领域概述
84
+ {{domain_overview}}
85
+
86
+ ## 核心概念
87
+
88
+ {{#each concepts}}
89
+ ### {{name}}
90
+ - **定义**: {{definition}}
91
+ - **业务含义**: {{business_meaning}}
92
+ - **相关实体**: {{related_entities}}
93
+ {{/each}}
94
+
95
+ ## 业务规则
96
+
97
+ {{#each rules}}
98
+ ### 规则{{index}}: {{name}}
99
+ - **描述**: {{description}}
100
+ - **触发条件**: {{trigger}}
101
+ - **执行逻辑**: {{logic}}
102
+ - **异常处理**: {{exception}}
103
+ {{/each}}
104
+
105
+ ## 与需求的关联
106
+ {{requirement_mapping}}
107
+
108
+ - id: process-knowledge
109
+ filename_pattern: "process-{{process_name}}.md"
110
+ template: |
111
+ # {{process_name}} 业务流程
112
+
113
+ ## 元信息
114
+ - 查询问题ID: {{question_ids}}
115
+ - 来源: 知识库MCP
116
+ - 更新时间: {{timestamp}}
117
+
118
+ ## 流程概述
119
+ {{process_overview}}
120
+
121
+ ## 流程步骤
122
+
123
+ ```mermaid
124
+ {{mermaid_diagram}}
125
+ ```
126
+
127
+ ### 详细步骤
128
+
129
+ {{#each steps}}
130
+ #### 步骤{{index}}: {{name}}
131
+ - **执行者**: {{actor}}
132
+ - **输入**: {{input}}
133
+ - **处理**: {{processing}}
134
+ - **输出**: {{output}}
135
+ - **后置条件**: {{postcondition}}
136
+ {{/each}}
137
+
138
+ ## 异常流程
139
+
140
+ {{#each exceptions}}
141
+ ### {{name}}
142
+ - **触发条件**: {{trigger}}
143
+ - **处理方式**: {{handling}}
144
+ - **恢复机制**: {{recovery}}
145
+ {{/each}}
146
+
147
+ ## 与需求的关联
148
+ {{requirement_mapping}}
149
+
150
+ - id: roles-knowledge
151
+ filename_pattern: "roles.md"
152
+ template: |
153
+ # 用户角色与权限
154
+
155
+ ## 元信息
156
+ - 查询问题ID: {{question_ids}}
157
+ - 来源: 知识库MCP
158
+ - 更新时间: {{timestamp}}
159
+
160
+ ## 角色定义
161
+
162
+ {{#each roles}}
163
+ ### {{name}}
164
+ - **描述**: {{description}}
165
+ - **职责**: {{responsibilities}}
166
+ - **权限范围**: {{permissions}}
167
+
168
+ #### 可执行操作
169
+ {{#each operations}}
170
+ - {{name}}: {{description}} ({{permission_level}})
171
+ {{/each}}
172
+ {{/each}}
173
+
174
+ ## 权限矩阵
175
+
176
+ | 操作 | {{#each roles}}{{name}} | {{/each}}
177
+ |------|{{#each roles}}--------|{{/each}}
178
+ {{#each operations}}
179
+ | {{name}} | {{#each role_permissions}}{{this}} | {{/each}}
180
+ {{/each}}
181
+
182
+ ## 与需求的关联
183
+ {{requirement_mapping}}
184
+
185
+ - id: technical-knowledge
186
+ title: 技术知识模板
187
+ path: technical/
188
+ variants:
189
+ - id: architecture
190
+ filename_pattern: "architecture.md"
191
+ template: |
192
+ # 系统架构
193
+
194
+ ## 元信息
195
+ - 查询问题ID: {{question_ids}}
196
+ - 来源: 知识库MCP
197
+ - 更新时间: {{timestamp}}
198
+
199
+ ## 架构概览
200
+ {{architecture_overview}}
201
+
202
+ ## 技术栈
203
+ | 层级 | 技术 | 版本 | 说明 |
204
+ |------|------|------|------|
205
+ {{#each tech_stack}}
206
+ | {{layer}} | {{technology}} | {{version}} | {{description}} |
207
+ {{/each}}
208
+
209
+ ## 模块结构
210
+
211
+ ```
212
+ {{module_structure}}
213
+ ```
214
+
215
+ ## 模块说明
216
+
217
+ {{#each modules}}
218
+ ### {{name}}
219
+ - **职责**: {{responsibility}}
220
+ - **依赖**: {{dependencies}}
221
+ - **对外接口**: {{interfaces}}
222
+ {{/each}}
223
+
224
+ ## 与需求的关联
225
+ - **建议实现位置**: {{suggested_location}}
226
+ - **需要修改的模块**: {{affected_modules}}
227
+ - **需要新增的模块**: {{new_modules}}
228
+
229
+ - id: data-model
230
+ filename_pattern: "data-model.md"
231
+ template: |
232
+ # 数据模型
233
+
234
+ ## 元信息
235
+ - 查询问题ID: {{question_ids}}
236
+ - 来源: 知识库MCP
237
+ - 更新时间: {{timestamp}}
238
+
239
+ ## 数据库概览
240
+ - **数据库类型**: {{database_type}}
241
+ - **数据库版本**: {{database_version}}
242
+ - **ORM框架**: {{orm_framework}}
243
+
244
+ ## 相关数据表
245
+
246
+ {{#each tables}}
247
+ ### {{table_name}}
248
+
249
+ **说明**: {{description}}
250
+
251
+ | 字段名 | 类型 | 约束 | 说明 |
252
+ |--------|------|------|------|
253
+ {{#each columns}}
254
+ | {{name}} | {{type}} | {{constraints}} | {{description}} |
255
+ {{/each}}
256
+
257
+ **索引**:
258
+ {{#each indexes}}
259
+ - {{name}}: {{columns}} ({{type}})
260
+ {{/each}}
261
+
262
+ {{/each}}
263
+
264
+ ## 表关系
265
+
266
+ ```mermaid
267
+ erDiagram
268
+ {{er_diagram}}
269
+ ```
270
+
271
+ ## 与需求的关联
272
+ - **需要新增的表**: {{new_tables}}
273
+ - **需要修改的表**: {{modified_tables}}
274
+ - **数据迁移需求**: {{migration_needs}}
275
+
276
+ - id: api-spec
277
+ filename_pattern: "api-{{module}}.md"
278
+ template: |
279
+ # {{module}} 接口规范
280
+
281
+ ## 元信息
282
+ - 查询问题ID: {{question_ids}}
283
+ - 来源: 知识库MCP
284
+ - 更新时间: {{timestamp}}
285
+
286
+ ## 接口概览
287
+ - **基础路径**: {{base_path}}
288
+ - **认证方式**: {{auth_method}}
289
+ - **响应格式**: {{response_format}}
290
+
291
+ ## 接口列表
292
+
293
+ {{#each apis}}
294
+ ### {{method}} {{path}}
295
+
296
+ **说明**: {{description}}
297
+
298
+ **请求参数**:
299
+ | 参数名 | 位置 | 类型 | 必填 | 说明 |
300
+ |--------|------|------|------|------|
301
+ {{#each parameters}}
302
+ | {{name}} | {{in}} | {{type}} | {{required}} | {{description}} |
303
+ {{/each}}
304
+
305
+ **请求体**:
306
+ ```json
307
+ {{request_body}}
308
+ ```
309
+
310
+ **响应**:
311
+ ```json
312
+ {{response_body}}
313
+ ```
314
+
315
+ **错误码**:
316
+ | 错误码 | 说明 |
317
+ |--------|------|
318
+ {{#each error_codes}}
319
+ | {{code}} | {{message}} |
320
+ {{/each}}
321
+
322
+ ---
323
+ {{/each}}
324
+
325
+ ## 与需求的关联
326
+ - **可复用的接口**: {{reusable_apis}}
327
+ - **需要新增的接口**: {{new_apis}}
328
+ - **需要修改的接口**: {{modified_apis}}
329
+
330
+ - id: code-patterns
331
+ filename_pattern: "patterns.md"
332
+ template: |
333
+ # 代码模式与最佳实践
334
+
335
+ ## 元信息
336
+ - 查询问题ID: {{question_ids}}
337
+ - 来源: 知识库MCP
338
+ - 更新时间: {{timestamp}}
339
+
340
+ ## 项目结构规范
341
+ ```
342
+ {{project_structure}}
343
+ ```
344
+
345
+ ## 代码规范
346
+ {{#each coding_standards}}
347
+ ### {{category}}
348
+ {{description}}
349
+
350
+ **示例**:
351
+ ```{{language}}
352
+ {{example}}
353
+ ```
354
+ {{/each}}
355
+
356
+ ## 常用模式
357
+
358
+ {{#each patterns}}
359
+ ### {{name}}
360
+ - **使用场景**: {{use_case}}
361
+ - **实现示例**: {{example_location}}
362
+ - **注意事项**: {{notes}}
363
+ {{/each}}
364
+
365
+ ## 可复用组件
366
+
367
+ {{#each reusable_components}}
368
+ ### {{name}}
369
+ - **位置**: {{location}}
370
+ - **功能**: {{functionality}}
371
+ - **使用方法**: {{usage}}
372
+ {{/each}}
373
+
374
+ ## 与需求的关联
375
+ {{requirement_mapping}}
376
+
377
+ - id: history-knowledge
378
+ title: 历史信息模板
379
+ path: history/
380
+ variants:
381
+ - id: related-features
382
+ filename_pattern: "related-features.md"
383
+ template: |
384
+ # 相关历史功能
385
+
386
+ ## 元信息
387
+ - 查询问题ID: {{question_ids}}
388
+ - 来源: 知识库MCP
389
+ - 更新时间: {{timestamp}}
390
+
391
+ ## 相关功能列表
392
+
393
+ {{#each features}}
394
+ ### {{name}}
395
+ - **实现时间**: {{implemented_at}}
396
+ - **当前状态**: {{status}}
397
+ - **功能描述**: {{description}}
398
+ - **实现位置**: {{location}}
399
+
400
+ **与当前需求的关系**:
401
+ {{relation_to_current}}
402
+
403
+ **可借鉴点**:
404
+ {{lessons_learned}}
405
+
406
+ ---
407
+ {{/each}}
408
+
409
+ ## 建议
410
+ {{recommendations}}
411
+
412
+ - id: decisions
413
+ filename_pattern: "decisions.md"
414
+ template: |
415
+ # 架构决策记录
416
+
417
+ ## 元信息
418
+ - 查询问题ID: {{question_ids}}
419
+ - 来源: 知识库MCP
420
+ - 更新时间: {{timestamp}}
421
+
422
+ ## 相关决策
423
+
424
+ {{#each decisions}}
425
+ ### ADR-{{id}}: {{title}}
426
+
427
+ **状态**: {{status}}
428
+ **日期**: {{date}}
429
+
430
+ **背景**:
431
+ {{context}}
432
+
433
+ **决策**:
434
+ {{decision}}
435
+
436
+ **理由**:
437
+ {{rationale}}
438
+
439
+ **影响**:
440
+ {{consequences}}
441
+
442
+ **与当前需求的关联**:
443
+ {{relation_to_current}}
444
+
445
+ ---
446
+ {{/each}}
447
+
448
+ - id: constraints-knowledge
449
+ title: 约束条件模板
450
+ path: constraints/
451
+ variants:
452
+ - id: technical-constraints
453
+ filename_pattern: "technical.md"
454
+ template: |
455
+ # 技术约束
456
+
457
+ ## 元信息
458
+ - 查询问题ID: {{question_ids}}
459
+ - 来源: 知识库MCP
460
+ - 更新时间: {{timestamp}}
461
+
462
+ ## 技术栈约束
463
+
464
+ {{#each tech_constraints}}
465
+ ### {{category}}
466
+ - **约束**: {{constraint}}
467
+ - **原因**: {{reason}}
468
+ - **影响**: {{impact}}
469
+ {{/each}}
470
+
471
+ ## 依赖约束
472
+
473
+ {{#each dependency_constraints}}
474
+ - **{{name}}**: {{constraint}}
475
+ {{/each}}
476
+
477
+ ## 与需求的关联
478
+ {{requirement_mapping}}
479
+
480
+ - id: security-constraints
481
+ filename_pattern: "security.md"
482
+ template: |
483
+ # 安全合规要求
484
+
485
+ ## 元信息
486
+ - 查询问题ID: {{question_ids}}
487
+ - 来源: 知识库MCP
488
+ - 更新时间: {{timestamp}}
489
+
490
+ ## 安全要求
491
+
492
+ {{#each security_requirements}}
493
+ ### {{name}}
494
+ - **描述**: {{description}}
495
+ - **适用范围**: {{scope}}
496
+ - **实现方式**: {{implementation}}
497
+ {{/each}}
498
+
499
+ ## 合规要求
500
+
501
+ {{#each compliance_requirements}}
502
+ ### {{standard}}
503
+ - **要求**: {{requirement}}
504
+ - **检查点**: {{checkpoints}}
505
+ {{/each}}
506
+
507
+ ## 与需求的关联
508
+ {{requirement_mapping}}
509
+
510
+ - id: performance-constraints
511
+ filename_pattern: "performance.md"
512
+ template: |
513
+ # 性能要求
514
+
515
+ ## 元信息
516
+ - 查询问题ID: {{question_ids}}
517
+ - 来源: 知识库MCP
518
+ - 更新时间: {{timestamp}}
519
+
520
+ ## 性能指标
521
+
522
+ | 指标 | 目标值 | 当前值 | 说明 |
523
+ |------|--------|--------|------|
524
+ {{#each metrics}}
525
+ | {{name}} | {{target}} | {{current}} | {{description}} |
526
+ {{/each}}
527
+
528
+ ## SLA要求
529
+ {{#each sla_requirements}}
530
+ - **{{name}}**: {{value}}
531
+ {{/each}}
532
+
533
+ ## 与需求的关联
534
+ {{requirement_mapping}}
535
+
536
+ workflow:
537
+ knowledge_landing_process:
538
+ step1:
539
+ name: "创建目录结构"
540
+ action: |
541
+ 确保 docs/rag/ 目录结构存在:
542
+ - docs/rag/business/
543
+ - docs/rag/technical/
544
+ - docs/rag/history/
545
+ - docs/rag/constraints/
546
+
547
+ step2:
548
+ name: "分类知识内容"
549
+ action: |
550
+ 根据问题类别(A/B/C/D)将知识库返回内容分类:
551
+ - A类 → business/
552
+ - B类 → technical/
553
+ - C类 → history/
554
+ - D类 → constraints/
555
+
556
+ step3:
557
+ name: "应用模板生成文件"
558
+ action: |
559
+ 为每条知识选择合适的模板变体,填充内容并生成markdown文件
560
+
561
+ step4:
562
+ name: "生成索引文件"
563
+ action: |
564
+ 更新 docs/rag/_index.md 索引文件,统计所有知识条目
565
+
566
+ step5:
567
+ name: "标记未答问题"
568
+ action: |
569
+ 将无法从知识库获得答案的问题记录到索引文件的"未回答问题"部分