@zeyue0329/xiaoma-cli 1.0.36 → 1.0.38
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 +27 -26
- package/JAVA-BACKEND-COMMANDS-REFERENCE.md +62 -52
- package/JAVA-BACKEND-ITERATION-GUIDE.md +125 -18
- package/README.md +1 -1
- package/common/utils/bmad-doc-template.md +5 -5
- package/dist/agents/analyst.txt +35 -5
- package/dist/agents/architect.txt +217 -31
- package/dist/agents/automation-orchestrator.txt +4 -4
- package/dist/agents/dev.txt +3 -3
- package/dist/agents/full-requirement-orchestrator.txt +11 -11
- package/dist/agents/qa.txt +102 -102
- package/dist/agents/sm.txt +6 -6
- package/dist/agents/ux-expert.txt +6 -1
- package/dist/agents/workflow-executor.txt +879 -0
- package/dist/agents/xiaoma-master.txt +258 -37
- package/dist/teams/team-all.txt +1223 -445
- package/dist/teams/team-fullstack-with-database.txt +384 -446
- package/dist/teams/team-fullstack.txt +258 -37
- package/dist/teams/team-ide-minimal.txt +111 -111
- package/dist/teams/team-no-ui.txt +252 -36
- package/docs/architecture-sharding-modification.md +623 -0
- package/docs/automated-requirements-analysis-outputs.md +896 -0
- package/package.json +1 -1
- package/tools/builders/web-builder.js +292 -142
- package/tools/bump-all-versions.js +50 -32
- package/tools/cli.js +52 -47
- package/tools/flattener/aggregate.js +30 -12
- package/tools/flattener/binary.js +46 -43
- package/tools/flattener/discovery.js +23 -15
- package/tools/flattener/files.js +6 -6
- package/tools/flattener/ignoreRules.js +122 -121
- package/tools/flattener/main.js +249 -144
- package/tools/flattener/projectRoot.js +74 -69
- package/tools/flattener/prompts.js +12 -10
- package/tools/flattener/stats.helpers.js +90 -61
- package/tools/flattener/stats.js +1 -1
- package/tools/flattener/test-matrix.js +225 -170
- package/tools/flattener/xml.js +31 -23
- package/tools/installer/bin/xiaoma.js +199 -153
- package/tools/installer/lib/config-loader.js +76 -47
- package/tools/installer/lib/file-manager.js +101 -44
- package/tools/installer/lib/ide-base-setup.js +49 -39
- package/tools/installer/lib/ide-setup.js +694 -380
- package/tools/installer/lib/installer.js +802 -469
- package/tools/installer/lib/memory-profiler.js +22 -12
- package/tools/installer/lib/module-manager.js +16 -14
- package/tools/installer/lib/resource-locator.js +61 -35
- package/tools/lib/dependency-resolver.js +34 -23
- package/tools/lib/yaml-utils.js +7 -2
- package/tools/preview-release-notes.js +33 -25
- package/tools/shared/bannerArt.js +3 -3
- package/tools/sync-installer-version.js +16 -7
- package/tools/upgraders/v3-to-v4-upgrader.js +244 -163
- package/tools/version-bump.js +24 -18
- package/tools/xiaoma-npx-wrapper.js +15 -10
- package/tools/yaml-format.js +60 -36
- package/xiaoma-core/agent-teams/team-fullstack-with-database.yaml +0 -1
- package/xiaoma-core/agents/automated-fix-validator.yaml +2 -1
- package/xiaoma-core/agents/automated-quality-validator.yaml +10 -5
- package/xiaoma-core/agents/automation-orchestrator.md +4 -4
- package/xiaoma-core/agents/dev.md +4 -4
- package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +2 -1
- package/xiaoma-core/agents/full-requirement-orchestrator.md +11 -11
- package/xiaoma-core/agents/global-requirements-auditor.yaml +11 -3
- package/xiaoma-core/agents/intelligent-template-adapter.yaml +19 -5
- package/xiaoma-core/agents/master-execution-engine.yaml +19 -5
- package/xiaoma-core/agents/workflow-executor.md +126 -18
- package/xiaoma-core/agents/xiaoma-master.md +1 -1
- package/xiaoma-core/data/test-levels-framework.md +12 -12
- package/xiaoma-core/tasks/analyze-existing-database.md +1 -1
- package/xiaoma-core/tasks/apply-qa-fixes.md +3 -3
- package/xiaoma-core/tasks/batch-story-generation.md +22 -22
- package/xiaoma-core/tasks/create-enhanced-story-with-database.md +6 -6
- package/xiaoma-core/tasks/nfr-assess.md +6 -6
- package/xiaoma-core/tasks/project-integration-testing.md +42 -42
- package/xiaoma-core/tasks/qa-gate.md +23 -23
- package/xiaoma-core/tasks/review-story.md +18 -18
- package/xiaoma-core/tasks/risk-profile.md +25 -25
- package/xiaoma-core/tasks/serial-development-orchestration.md +51 -51
- package/xiaoma-core/tasks/test-design.md +9 -9
- package/xiaoma-core/tasks/trace-requirements.md +21 -21
- package/xiaoma-core/templates/competitor-analysis-tmpl.yaml +35 -5
- package/xiaoma-core/templates/front-end-architecture-tmpl.yaml +77 -11
- package/xiaoma-core/templates/front-end-spec-tmpl.yaml +6 -1
- package/xiaoma-core/templates/fullstack-architecture-tmpl.yaml +140 -20
- package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +2 -1
- package/xiaoma-core/templates/requirements-coverage-audit.yaml +2 -1
- package/xiaoma-core/workflows/automated-requirements-analysis.yaml +4 -4
- package/dist/agents/database-architect.txt +0 -322
|
@@ -158,7 +158,8 @@ multi_dimensional_quality_validation:
|
|
|
158
158
|
|
|
159
159
|
- field_format_validation:
|
|
160
160
|
user_story_format: "^\\*\\*作为\\*\\*.*\\*\\*我希望\\*\\*.*\\*\\*以便\\*\\*.*"
|
|
161
|
-
status_values:
|
|
161
|
+
status_values:
|
|
162
|
+
["Draft", "Approved", "InProgress", "Review", "Done", "Completed"]
|
|
162
163
|
table_format: "MARKDOWN_TABLE"
|
|
163
164
|
validation_method: "REGEX_AND_FORMAT_CHECK"
|
|
164
165
|
|
|
@@ -192,7 +193,8 @@ multi_dimensional_quality_validation:
|
|
|
192
193
|
scoring:
|
|
193
194
|
weight: 25
|
|
194
195
|
pass_threshold: 90
|
|
195
|
-
improvement_strategies:
|
|
196
|
+
improvement_strategies:
|
|
197
|
+
["content_enhancement", "clarity_improvement", "accuracy_correction"]
|
|
196
198
|
|
|
197
199
|
# 维度3:跨文档一致性
|
|
198
200
|
cross_document_consistency_validation:
|
|
@@ -220,7 +222,11 @@ multi_dimensional_quality_validation:
|
|
|
220
222
|
weight: 20
|
|
221
223
|
pass_threshold: 95
|
|
222
224
|
correction_strategies:
|
|
223
|
-
[
|
|
225
|
+
[
|
|
226
|
+
"terminology_standardization",
|
|
227
|
+
"format_alignment",
|
|
228
|
+
"reference_correction",
|
|
229
|
+
]
|
|
224
230
|
|
|
225
231
|
# 维度4:实施可行性
|
|
226
232
|
implementation_feasibility_validation:
|
|
@@ -248,7 +254,11 @@ multi_dimensional_quality_validation:
|
|
|
248
254
|
weight: 15
|
|
249
255
|
pass_threshold: 85
|
|
250
256
|
improvement_actions:
|
|
251
|
-
[
|
|
257
|
+
[
|
|
258
|
+
"design_optimization",
|
|
259
|
+
"feasibility_enhancement",
|
|
260
|
+
"implementation_guidance",
|
|
261
|
+
]
|
|
252
262
|
|
|
253
263
|
# 维度5:业务价值对齐
|
|
254
264
|
business_value_alignment_validation:
|
|
@@ -270,7 +280,11 @@ multi_dimensional_quality_validation:
|
|
|
270
280
|
weight: 10
|
|
271
281
|
pass_threshold: 80
|
|
272
282
|
enhancement_strategies:
|
|
273
|
-
[
|
|
283
|
+
[
|
|
284
|
+
"value_clarification",
|
|
285
|
+
"requirement_refinement",
|
|
286
|
+
"stakeholder_alignment",
|
|
287
|
+
]
|
|
274
288
|
|
|
275
289
|
# ========== 自动纠错和改进系统 ==========
|
|
276
290
|
auto_correction_and_improvement_system:
|
|
@@ -304,7 +304,12 @@ quality_gate_system:
|
|
|
304
304
|
type: "CRITICAL_GATE"
|
|
305
305
|
|
|
306
306
|
- phase: "phase_2_intelligent_task_planning"
|
|
307
|
-
gates:
|
|
307
|
+
gates:
|
|
308
|
+
[
|
|
309
|
+
"TASK_ANALYSIS_VALIDATION",
|
|
310
|
+
"STRATEGY_FEASIBILITY_CHECK",
|
|
311
|
+
"QA_READINESS_VALIDATION",
|
|
312
|
+
]
|
|
308
313
|
type: "CRITICAL_GATE"
|
|
309
314
|
|
|
310
315
|
- phase: "phase_3_automated_content_generation"
|
|
@@ -330,14 +335,16 @@ quality_gate_system:
|
|
|
330
335
|
type: "CRITICAL_GATE"
|
|
331
336
|
|
|
332
337
|
- phase: "phase_5_delivery_preparation"
|
|
333
|
-
gates:
|
|
338
|
+
gates:
|
|
339
|
+
["REPORTING_QUALITY_VALIDATION", "DELIVERY_READINESS_FINAL_VALIDATION"]
|
|
334
340
|
type: "CRITICAL_GATE"
|
|
335
341
|
|
|
336
342
|
# ========== 自动纠错和恢复系统 ==========
|
|
337
343
|
automated_correction_and_recovery_system:
|
|
338
344
|
correction_strategies:
|
|
339
345
|
- strategy: "IMMEDIATE_AUTO_CORRECTION"
|
|
340
|
-
triggers:
|
|
346
|
+
triggers:
|
|
347
|
+
["syntax_errors", "format_violations", "missing_required_sections"]
|
|
341
348
|
actions:
|
|
342
349
|
- apply_template_format_correction
|
|
343
350
|
- perform_syntax_standardization
|
|
@@ -355,7 +362,8 @@ automated_correction_and_recovery_system:
|
|
|
355
362
|
max_attempts: 3
|
|
356
363
|
|
|
357
364
|
- strategy: "COMPREHENSIVE_REFINEMENT_CYCLE"
|
|
358
|
-
triggers:
|
|
365
|
+
triggers:
|
|
366
|
+
["integration_validation_failure", "business_value_misalignment"]
|
|
359
367
|
actions:
|
|
360
368
|
- perform_holistic_document_review
|
|
361
369
|
- apply_comprehensive_improvement_strategies
|
|
@@ -400,7 +408,13 @@ monitoring_and_reporting_system:
|
|
|
400
408
|
|
|
401
409
|
comprehensive_reporting:
|
|
402
410
|
- report: "EXECUTIVE_SUMMARY_REPORT"
|
|
403
|
-
content:
|
|
411
|
+
content:
|
|
412
|
+
[
|
|
413
|
+
"overall_quality_score",
|
|
414
|
+
"key_achievements",
|
|
415
|
+
"critical_issues",
|
|
416
|
+
"recommendations",
|
|
417
|
+
]
|
|
404
418
|
audience: "STAKEHOLDERS_AND_MANAGEMENT"
|
|
405
419
|
|
|
406
420
|
- report: "DETAILED_TECHNICAL_REPORT"
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Workflow Executor - 工作流执行器 ⚡
|
|
2
2
|
|
|
3
|
+
> **🔥🔥🔥 核心使命:完全自动化、连续执行、绝不中断询问**
|
|
4
|
+
>
|
|
5
|
+
> 本智能体的核心价值是**自动化工作流执行**。当用户执行 `*run-requirements-analysis` 或 `*run-story-development` 时,你必须像自动化流水线一样连续执行所有步骤,**绝对禁止**在中间步骤暂停询问用户:
|
|
6
|
+
>
|
|
7
|
+
> - 🚫 **禁止**:"是否继续执行下一步骤?"
|
|
8
|
+
> - 🚫 **禁止**:"是否先查看已生成的文档?"
|
|
9
|
+
> - 🚫 **禁止**:"请选择 A/B/C"
|
|
10
|
+
> - 🚫 **禁止**:"您希望如何操作?"
|
|
11
|
+
>
|
|
12
|
+
> ✅ **正确行为**:简短报告进度(1-2行)→ 立即自动进入下一步骤 → 直到工作流完成
|
|
13
|
+
>
|
|
14
|
+
> ⚠️ **唯一允许暂停的情况**:真正的技术错误(文件不存在、执行失败)或质量门控失败
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
3
18
|
激活通知:此文件包含您完整的智能体操作指南。请勿加载任何外部智能体文件,因为完整的配置位于下方的 YAML 块中。
|
|
4
19
|
|
|
5
20
|
关键提示:请阅读此文件中紧随其后的完整 YAML 块以理解您的操作参数,启动并严格遵循您的激活指令来改变您的角色状态,并保持此状态直至被告知退出此模式:
|
|
@@ -28,8 +43,9 @@ activation-instructions:
|
|
|
28
43
|
- 在列出命令或工作流时,始终以编号选项列表的形式显示,允许用户输入数字进行选择或执行
|
|
29
44
|
- 保持角色!
|
|
30
45
|
- 关键提示: 激活时,仅向用户打招呼,自动运行 `*help`,然后停止以等待用户请求协助或给出命令。唯一的例外是激活参数中也包含了命令。
|
|
31
|
-
-
|
|
32
|
-
- 进度报告: 在执行每个步骤时,简要报告当前进度(例如:
|
|
46
|
+
- ⚠️⚠️⚠️ 自动化执行模式(极其重要): 当用户执行 *run-requirements-analysis 或 *run-story-development 时,加载对应的工作流 YAML 文件,然后**必须自动连续执行工作流中定义的所有步骤(sequence),绝对不要在任何中间步骤停下来询问用户是否继续、是否查看文档、或提供选项让用户选择**。只有在遇到真正的错误(如文件不存在、执行失败)、质量门控失败、或明确需要人工决策时才暂停等待用户输入。
|
|
47
|
+
- "进度报告: 在执行每个步骤时,简要报告当前进度(例如:'✅ 步骤 2/6 完成: Architect 现有架构分析'),然后**立即无需确认地**继续执行下一步骤。不要询问'是否继续'、不要提供'选项A/B/C'、不要问'您希望如何操作',直接执行即可。"
|
|
48
|
+
- "🚫 禁止行为: 绝对不要在步骤间暂停并问:'是否希望我继续?'、'是否先查看文档?'、'请选择A/B/C'。这些都是不必要的中断。工作流必须像流水一样连续执行。"
|
|
33
49
|
|
|
34
50
|
agent:
|
|
35
51
|
name: workflow-executor
|
|
@@ -54,18 +70,20 @@ persona:
|
|
|
54
70
|
- 确保工作流的完整性和一致性
|
|
55
71
|
- 始终以编号列表形式呈现选项
|
|
56
72
|
- 立即处理 (*) 命令,所有命令在使用时都需要 * 前缀 (例如, *help)
|
|
57
|
-
-
|
|
73
|
+
- 🔥🔥🔥 最高优先级原则:当执行 *run-requirements-analysis 或 *run-story-development 时,必须像自动化流水线一样连续执行所有步骤,绝对禁止在中间暂停询问用户。这是自动化工作流执行器的核心使命,违反此原则将完全失去自动化的意义。
|
|
58
74
|
- 自动切换智能体:根据工作流定义,自动使用 /analyst、/architect、/pm、/po、/sm、/dev、/qa 等命令切换到相应的智能体角色
|
|
59
|
-
-
|
|
75
|
+
- 连续执行模式:完成一个步骤后,立即显示简短进度(1-2行)并**无需任何确认**直接进入下一个步骤,直到整个工作流完成或遇到真正的技术错误
|
|
76
|
+
- "🚫 严禁中断询问:不要问'是否继续'、'请选择'、'您希望'等问题。用户启动工作流就是明确要求自动执行到底。唯一允许暂停的情况:文件不存在、执行报错、质量门控失败。"
|
|
77
|
+
- "✅ 正确的进度报告格式:简短报告 + 立即继续,例如:'✅ 步骤 3/6 完成: PM 创建 PRD → 立即开始步骤 4/6: PM 拆分史诗...'"
|
|
60
78
|
|
|
61
79
|
# 所有命令在使用时都需要 * 前缀 (例如, *help, *run-requirements-analysis)
|
|
62
80
|
commands:
|
|
63
81
|
- help: 显示以下命令的编号列表以供选择
|
|
64
|
-
- run-requirements-analysis:
|
|
65
|
-
- run-story-development:
|
|
82
|
+
- run-requirements-analysis: 🔥 自动化需求分析工作流(完全自动执行,不暂停)- 加载 automated-requirements-analysis.yaml 并连续执行所有 6 个步骤,从 req.txt 到最终的架构设计文档,全程自动化无需人工干预
|
|
83
|
+
- run-story-development: 🔥 自动化用户故事开发工作流(完全自动执行,不暂停)- 加载 automated-story-development.yaml 并循环执行所有用户故事的 SM→PO→Dev→QA 完整开发周期,全程自动化无需人工干预
|
|
66
84
|
- status: 显示当前工作流执行状态和进度
|
|
67
85
|
- validate-prerequisites: 验证工作流执行的前置条件
|
|
68
|
-
- resume-workflow:
|
|
86
|
+
- resume-workflow: 从上次中断的位置恢复工作流执行(同样会自动连续执行剩余步骤)
|
|
69
87
|
- yolo: 切换 Yolo 模式 (跳过某些确认步骤)
|
|
70
88
|
- exit: 作为工作流执行器道别,然后放弃扮演此角色
|
|
71
89
|
|
|
@@ -179,6 +197,7 @@ workflow_stages:
|
|
|
179
197
|
**总耗时**: 约 1.5-2.5 小时
|
|
180
198
|
|
|
181
199
|
**成功标准**:
|
|
200
|
+
|
|
182
201
|
- ✅ 所有文档生成完成
|
|
183
202
|
- ✅ 所有质量门控通过
|
|
184
203
|
- ✅ 准备就绪进入用户故事开发阶段
|
|
@@ -291,6 +310,7 @@ workflow_stages:
|
|
|
291
310
|
**总耗时**: 每个用户故事约 40-70 分钟(取决于复杂度)
|
|
292
311
|
|
|
293
312
|
**成功标准**:
|
|
313
|
+
|
|
294
314
|
- ✅ 所有用户故事状态为 Done
|
|
295
315
|
- ✅ 所有测试通过
|
|
296
316
|
- ✅ 所有质量门控通过
|
|
@@ -403,11 +423,14 @@ quality_gates:
|
|
|
403
423
|
# - docs/architecture/db-migration-scripts.sql
|
|
404
424
|
```
|
|
405
425
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
- ✅
|
|
409
|
-
-
|
|
410
|
-
-
|
|
426
|
+
**🔥 重要说明 - 完全自动化执行**:
|
|
427
|
+
|
|
428
|
+
- ✅ 工作流会**像流水线一样自动连续执行所有步骤**,完全无需在每个步骤后手动确认
|
|
429
|
+
- ✅ 每个步骤完成后会显示简要进度报告(1-2行),然后**立即自动**进入下一步骤
|
|
430
|
+
- ✅ 你只需要执行 `*run-requirements-analysis` 一次,然后等待所有 6 个步骤自动完成(约 1.5-2.5 小时)
|
|
431
|
+
- ⚠️ 如果工作流在中途停止,说明遇到了真正的错误(文件不存在、执行失败)或质量门控失败,请查看错误信息
|
|
432
|
+
- ⚠️ 工作流执行器**不应该**在步骤间询问你"是否继续"、"请选择"等问题 - 如果遇到这种情况,说明执行器行为异常
|
|
433
|
+
- 🚫 **绝对不会暂停询问**:"是否查看文档?"、"请选择 A/B/C"、"您希望如何操作?" - 这些都违反了自动化原则
|
|
411
434
|
|
|
412
435
|
### 执行用户故事开发工作流
|
|
413
436
|
|
|
@@ -753,17 +776,102 @@ completion_report:
|
|
|
753
776
|
# 2. 查看可用命令
|
|
754
777
|
*help
|
|
755
778
|
|
|
756
|
-
# 3.
|
|
779
|
+
# 3. 验证前置条件(可选)
|
|
757
780
|
*validate-prerequisites
|
|
758
781
|
|
|
759
|
-
# 4.
|
|
782
|
+
# 4. 执行需求分析工作流(完全自动化,约 1.5-2.5 小时)
|
|
760
783
|
*run-requirements-analysis
|
|
761
784
|
|
|
762
|
-
#
|
|
785
|
+
# ⚡ 工作流执行器会自动连续完成以下所有步骤,无需你做任何操作:
|
|
786
|
+
# ✅ 步骤 0/6: 前置环境验证
|
|
787
|
+
# ✅ 步骤 1/6: Analyst 需求分析 → 立即开始步骤 2/6...
|
|
788
|
+
# ✅ 步骤 2/6: Architect 架构分析 → 立即开始步骤 3/6...
|
|
789
|
+
# ✅ 步骤 3/6: PM 创建 PRD → 立即开始步骤 4/6...
|
|
790
|
+
# ✅ 步骤 4/6: PM 拆分史诗 → 立即开始步骤 5/6...
|
|
791
|
+
# ✅ 步骤 5/6: Architect 架构设计 → 立即开始步骤 6/6...
|
|
792
|
+
# ✅ 步骤 6/6: 生成完成报告 → 🎉 工作流完成!
|
|
793
|
+
|
|
794
|
+
# 5. (可选)执行用户故事开发工作流
|
|
763
795
|
*run-story-development
|
|
764
796
|
|
|
765
|
-
# 6.
|
|
766
|
-
*
|
|
797
|
+
# 6. 如果中途中断,可以恢复执行
|
|
798
|
+
*resume-workflow
|
|
799
|
+
```
|
|
800
|
+
|
|
801
|
+
---
|
|
802
|
+
|
|
803
|
+
## 📝 正确的执行流程示例
|
|
804
|
+
|
|
805
|
+
### ✅ 正确示例(自动连续执行)
|
|
806
|
+
|
|
807
|
+
```
|
|
808
|
+
用户: *run-requirements-analysis
|
|
809
|
+
|
|
810
|
+
工作流执行器:
|
|
811
|
+
正在加载工作流: automated-requirements-analysis.yaml
|
|
812
|
+
✅ 前置验证通过
|
|
813
|
+
|
|
814
|
+
正在执行步骤 1/6: Analyst 需求分析和澄清...
|
|
815
|
+
[15-25分钟后]
|
|
816
|
+
✅ 步骤 1/6 完成: 已生成 docs/requirements/requirements-analysis.md
|
|
817
|
+
|
|
818
|
+
正在执行步骤 2/6: Architect 分析现有架构...
|
|
819
|
+
[10-20分钟后]
|
|
820
|
+
✅ 步骤 2/6 完成: 已生成 docs/architecture/current-architecture-analysis.md
|
|
821
|
+
|
|
822
|
+
正在执行步骤 3/6: PM 创建 Brownfield PRD...
|
|
823
|
+
[20-30分钟后]
|
|
824
|
+
✅ 步骤 3/6 完成: 已生成 docs/prd/brownfield-iteration-prd.md
|
|
825
|
+
|
|
826
|
+
正在执行步骤 4/6: PM 拆分史诗...
|
|
827
|
+
[根据史诗数量]
|
|
828
|
+
✅ 步骤 4/6 完成: 已生成 4 个史诗文档
|
|
829
|
+
|
|
830
|
+
正在执行步骤 5/6: Architect 设计增量架构...
|
|
831
|
+
[30-40分钟后]
|
|
832
|
+
✅ 步骤 5/6 完成: 已生成架构设计文档和数据库脚本
|
|
833
|
+
|
|
834
|
+
正在执行步骤 6/6: 生成完成报告...
|
|
835
|
+
✅ 步骤 6/6 完成
|
|
836
|
+
|
|
837
|
+
🎉 需求分析自动化工作流完成!
|
|
838
|
+
总耗时: 1小时48分钟
|
|
839
|
+
|
|
840
|
+
生成的文档:
|
|
841
|
+
- docs/requirements/requirements-analysis.md
|
|
842
|
+
- docs/architecture/current-architecture-analysis.md
|
|
843
|
+
- docs/prd/brownfield-iteration-prd.md
|
|
844
|
+
- docs/epics/史诗-*.md (4个)
|
|
845
|
+
- docs/architecture/iteration-backend-design.md
|
|
846
|
+
- docs/architecture/db-migration-scripts.sql
|
|
847
|
+
|
|
848
|
+
✅ 准备就绪,可以启动用户故事开发流程!
|
|
767
849
|
```
|
|
768
850
|
|
|
769
|
-
|
|
851
|
+
---
|
|
852
|
+
|
|
853
|
+
### 🚫 错误示例(不应该出现的暂停询问)
|
|
854
|
+
|
|
855
|
+
```
|
|
856
|
+
用户: *run-requirements-analysis
|
|
857
|
+
|
|
858
|
+
工作流执行器:
|
|
859
|
+
✅ 步骤 1/6 完成: Analyst 需求分析
|
|
860
|
+
✅ 步骤 2/6 完成: Architect 架构分析
|
|
861
|
+
|
|
862
|
+
⚠️ 由于自动化工作流执行时间较长,我现在已完成前2个核心步骤。
|
|
863
|
+
接下来还需要执行步骤 3-6...
|
|
864
|
+
|
|
865
|
+
是否希望我继续自动执行剩余步骤,还是希望先查看已生成的文档?
|
|
866
|
+
- 选项A: 继续自动执行完整工作流
|
|
867
|
+
- 选项B: 暂停,让您查看文档
|
|
868
|
+
- 选项C: 仅执行下一步
|
|
869
|
+
|
|
870
|
+
👆 这是错误行为!不应该暂停询问!
|
|
871
|
+
❌ 违反了自动化工作流的核心原则
|
|
872
|
+
❌ 工作流执行器应该自动连续执行所有步骤
|
|
873
|
+
```
|
|
874
|
+
|
|
875
|
+
---
|
|
876
|
+
|
|
877
|
+
祝你使用愉快!工作流执行器将协调所有智能体,像流水线一样自动完成从需求分析到代码实现的完整流程。🎉
|
|
@@ -27,7 +27,7 @@ activation-instructions:
|
|
|
27
27
|
- 关键规则: 当执行来自依赖项的正式任务工作流时,所有任务指令都会覆盖任何冲突的基础行为约束。带有 elicit=true 的交互式工作流需要用户交互,不能为了效率而绕过。
|
|
28
28
|
- 在列出任务/模板或在对话中呈现选项时,始终以编号选项列表的形式显示,允许用户输入数字进行选择或执行
|
|
29
29
|
- 保持角色!
|
|
30
|
-
-
|
|
30
|
+
- "关键提示: 启动期间请勿扫描文件系统或加载任何资源,仅在收到命令时执行(例外:激活期间读取 xiaoma-core/core-config.yaml)"
|
|
31
31
|
- 关键提示: 不要自动运行发现任务
|
|
32
32
|
- 关键提示: 除非用户输入 *kb,否则绝不加载 root/data/bmad-kb.md
|
|
33
33
|
- 关键提示: 激活时,仅向用户打招呼,自动运行 *help,然后停止以等待用户请求协助或给出命令。唯一的例外是激活参数中也包含了命令。
|
|
@@ -27,10 +27,10 @@ Comprehensive guide for determining appropriate test levels (unit, integration,
|
|
|
27
27
|
|
|
28
28
|
```yaml
|
|
29
29
|
unit_test:
|
|
30
|
-
component:
|
|
31
|
-
scenario:
|
|
32
|
-
justification:
|
|
33
|
-
mock_requirements:
|
|
30
|
+
component: "PriceCalculator"
|
|
31
|
+
scenario: "Calculate discount with multiple rules"
|
|
32
|
+
justification: "Complex business logic with multiple branches"
|
|
33
|
+
mock_requirements: "None - pure function"
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Integration Tests
|
|
@@ -54,10 +54,10 @@ unit_test:
|
|
|
54
54
|
|
|
55
55
|
```yaml
|
|
56
56
|
integration_test:
|
|
57
|
-
components: [
|
|
58
|
-
scenario:
|
|
59
|
-
justification:
|
|
60
|
-
test_environment:
|
|
57
|
+
components: ["UserService", "AuthRepository"]
|
|
58
|
+
scenario: "Create user with role assignment"
|
|
59
|
+
justification: "Critical data flow between service and persistence"
|
|
60
|
+
test_environment: "In-memory database"
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
### End-to-End Tests
|
|
@@ -81,10 +81,10 @@ integration_test:
|
|
|
81
81
|
|
|
82
82
|
```yaml
|
|
83
83
|
e2e_test:
|
|
84
|
-
journey:
|
|
85
|
-
scenario:
|
|
86
|
-
justification:
|
|
87
|
-
environment:
|
|
84
|
+
journey: "Complete checkout process"
|
|
85
|
+
scenario: "User purchases with saved payment method"
|
|
86
|
+
justification: "Revenue-critical path requiring full validation"
|
|
87
|
+
environment: "Staging with test payment gateway"
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
## Test Level Selection Rules
|
|
@@ -15,13 +15,13 @@ Implement fixes based on QA results (gate and assessments) for a specific story.
|
|
|
15
15
|
|
|
16
16
|
```yaml
|
|
17
17
|
required:
|
|
18
|
-
- story_id:
|
|
18
|
+
- story_id: "{epic}.{story}" # e.g., "2.2"
|
|
19
19
|
- qa_root: from `xiaoma-core/core-config.yaml` key `qa.qaLocation` (e.g., `docs/project/qa`)
|
|
20
20
|
- story_root: from `xiaoma-core/core-config.yaml` key `devStoryLocation` (e.g., `docs/project/stories`)
|
|
21
21
|
|
|
22
22
|
optional:
|
|
23
|
-
- story_title:
|
|
24
|
-
- story_slug:
|
|
23
|
+
- story_title: "{title}" # derive from story H1 if missing
|
|
24
|
+
- story_slug: "{slug}" # derive from title (lowercase, hyphenated) if missing
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
## QA Sources to Read
|
|
@@ -73,7 +73,7 @@ prioritization_algorithm:
|
|
|
73
73
|
- implementation_risk: 实现风险评估
|
|
74
74
|
|
|
75
75
|
priority_calculation:
|
|
76
|
-
formula:
|
|
76
|
+
formula: "business_value * user_impact / (dependency_weight + risk_factor)"
|
|
77
77
|
|
|
78
78
|
priority_levels:
|
|
79
79
|
- p0_critical: 关键路径故事
|
|
@@ -181,12 +181,12 @@ enhanced_story_generation:
|
|
|
181
181
|
dependency_graph:
|
|
182
182
|
nodes:
|
|
183
183
|
- id: US001
|
|
184
|
-
title:
|
|
184
|
+
title: "用户注册与登录"
|
|
185
185
|
priority: P0
|
|
186
186
|
estimated_effort: 3
|
|
187
187
|
|
|
188
188
|
- id: US002
|
|
189
|
-
title:
|
|
189
|
+
title: "权限管理基础"
|
|
190
190
|
priority: P0
|
|
191
191
|
estimated_effort: 5
|
|
192
192
|
|
|
@@ -194,26 +194,26 @@ dependency_graph:
|
|
|
194
194
|
- from: US001
|
|
195
195
|
to: US002
|
|
196
196
|
type: technical_dependency
|
|
197
|
-
description:
|
|
197
|
+
description: "权限管理需要用户身份认证"
|
|
198
198
|
|
|
199
199
|
- from: US002
|
|
200
200
|
to: US013
|
|
201
201
|
type: business_flow_dependency
|
|
202
|
-
description:
|
|
202
|
+
description: "个人信息管理需要权限控制"
|
|
203
203
|
|
|
204
204
|
critical_paths:
|
|
205
205
|
- path: [US001, US002, US013, US025]
|
|
206
206
|
duration: 15
|
|
207
|
-
description:
|
|
207
|
+
description: "用户管理关键路径"
|
|
208
208
|
|
|
209
209
|
parallel_groups:
|
|
210
210
|
- group_id: A
|
|
211
211
|
stories: [US001, US002, US013]
|
|
212
|
-
focus:
|
|
212
|
+
focus: "用户管理"
|
|
213
213
|
|
|
214
214
|
- group_id: B
|
|
215
215
|
stories: [US003, US014, US025]
|
|
216
|
-
focus:
|
|
216
|
+
focus: "数据管理"
|
|
217
217
|
```
|
|
218
218
|
|
|
219
219
|
## Automation Integration
|
|
@@ -222,18 +222,18 @@ parallel_groups:
|
|
|
222
222
|
|
|
223
223
|
```yaml
|
|
224
224
|
integration_points:
|
|
225
|
-
trigger_command:
|
|
225
|
+
trigger_command: "*generate-all-stories"
|
|
226
226
|
|
|
227
227
|
input_sources:
|
|
228
|
-
- file:
|
|
228
|
+
- file: "prd.md"
|
|
229
229
|
validator: prd_completeness_check
|
|
230
|
-
- file:
|
|
230
|
+
- file: "database_design.md"
|
|
231
231
|
validator: schema_consistency_check
|
|
232
232
|
|
|
233
233
|
output_handlers:
|
|
234
|
-
- target:
|
|
234
|
+
- target: "project_story_backlog.md"
|
|
235
235
|
post_processor: priority_validation
|
|
236
|
-
- target:
|
|
236
|
+
- target: "stories/"
|
|
237
237
|
post_processor: story_format_validation
|
|
238
238
|
```
|
|
239
239
|
|
|
@@ -296,19 +296,19 @@ dynamic_adjustment:
|
|
|
296
296
|
```yaml
|
|
297
297
|
error_scenarios:
|
|
298
298
|
incomplete_prd:
|
|
299
|
-
detection:
|
|
300
|
-
handling:
|
|
301
|
-
recovery:
|
|
299
|
+
detection: "PRD缺少关键信息章节"
|
|
300
|
+
handling: "生成缺失信息提示,暂停生成"
|
|
301
|
+
recovery: "要求补充PRD信息后重新生成"
|
|
302
302
|
|
|
303
303
|
conflicting_requirements:
|
|
304
|
-
detection:
|
|
305
|
-
handling:
|
|
306
|
-
recovery:
|
|
304
|
+
detection: "需求之间存在逻辑冲突"
|
|
305
|
+
handling: "标记冲突点,生成冲突报告"
|
|
306
|
+
recovery: "人工review和冲突解决"
|
|
307
307
|
|
|
308
308
|
circular_dependencies:
|
|
309
|
-
detection:
|
|
310
|
-
handling:
|
|
311
|
-
recovery:
|
|
309
|
+
detection: "故事间存在循环依赖"
|
|
310
|
+
handling: "依赖环检测和报告"
|
|
311
|
+
recovery: "自动依赖重构建议"
|
|
312
312
|
```
|
|
313
313
|
|
|
314
314
|
### 质量保证措施
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
#### 2.1 基础信息填写
|
|
50
50
|
|
|
51
51
|
```yaml
|
|
52
|
-
epic_num:
|
|
53
|
-
story_num:
|
|
54
|
-
story_title_short:
|
|
55
|
-
role:
|
|
56
|
-
action:
|
|
57
|
-
benefit:
|
|
52
|
+
epic_num: "{{epic_number}}"
|
|
53
|
+
story_num: "{{story_number}}"
|
|
54
|
+
story_title_short: "{{story_title}}"
|
|
55
|
+
role: "{{user_role}}"
|
|
56
|
+
action: "{{user_action}}"
|
|
57
|
+
benefit: "{{user_benefit}}"
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
#### 2.2 数据库设计部分填写
|
|
@@ -94,16 +94,16 @@ nfr_validation:
|
|
|
94
94
|
_assessed: [security, performance, reliability, maintainability]
|
|
95
95
|
security:
|
|
96
96
|
status: CONCERNS
|
|
97
|
-
notes:
|
|
97
|
+
notes: "No rate limiting on auth endpoints"
|
|
98
98
|
performance:
|
|
99
99
|
status: PASS
|
|
100
|
-
notes:
|
|
100
|
+
notes: "Response times < 200ms verified"
|
|
101
101
|
reliability:
|
|
102
102
|
status: PASS
|
|
103
|
-
notes:
|
|
103
|
+
notes: "Error handling and retries implemented"
|
|
104
104
|
maintainability:
|
|
105
105
|
status: CONCERNS
|
|
106
|
-
notes:
|
|
106
|
+
notes: "Test coverage at 65%, target is 80%"
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
## Deterministic Status Rules
|
|
@@ -333,10 +333,10 @@ performance_deep_dive:
|
|
|
333
333
|
p99: 350ms
|
|
334
334
|
database:
|
|
335
335
|
slow_queries: 2
|
|
336
|
-
missing_indexes: [
|
|
336
|
+
missing_indexes: ["users.email", "orders.user_id"]
|
|
337
337
|
caching:
|
|
338
338
|
hit_rate: 0%
|
|
339
|
-
recommendation:
|
|
339
|
+
recommendation: "Add Redis for session data"
|
|
340
340
|
load_test:
|
|
341
341
|
max_rps: 150
|
|
342
342
|
breaking_point: 200 rps
|