@zeyue0329/xiaoma-cli 1.0.24 → 1.0.26

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 (24) hide show
  1. package/ENHANCED_WORKFLOW_OPTIMIZATION.md +225 -0
  2. package/ENHANCED_WORKFLOW_OPTIMIZATION_SUMMARY.md +293 -0
  3. package/dist/teams/team-fullstack-with-database.txt +1447 -377
  4. package/package.json +1 -1
  5. package/tools/installer/package.json +1 -1
  6. package/xiaoma-core/agents/automated-fix-validator.yaml +578 -0
  7. package/xiaoma-core/agents/automated-quality-validator.yaml +544 -0
  8. package/xiaoma-core/agents/enhanced-workflow-orchestrator.yaml +303 -0
  9. package/xiaoma-core/agents/global-requirements-auditor.yaml +512 -0
  10. package/xiaoma-core/agents/intelligent-template-adapter.yaml +375 -0
  11. package/xiaoma-core/agents/issue-dispatcher.yaml +627 -0
  12. package/xiaoma-core/agents/master-execution-engine.yaml +529 -0
  13. package/xiaoma-core/agents/requirements-coverage-auditor.yaml +373 -0
  14. package/xiaoma-core/docs/ENHANCED_WORKFLOW_USAGE_GUIDE.md +306 -0
  15. package/xiaoma-core/docs/SERIAL_EXECUTION_WORKFLOW_GUIDE.md +347 -0
  16. package/xiaoma-core/docs/ULTIMATE_AUTOMATION_USAGE_GUIDE.md +291 -0
  17. package/xiaoma-core/docs/activate-enhanced-workflow.md +154 -0
  18. package/xiaoma-core/tasks/requirements-coverage-audit.md +198 -0
  19. package/xiaoma-core/templates/global-qa-monitoring-tmpl.yaml +442 -0
  20. package/xiaoma-core/templates/requirements-coverage-audit.yaml +329 -0
  21. package/xiaoma-core/templates/start-enhanced-workflow.yaml +347 -0
  22. package/xiaoma-core/workflows/enhanced-fullstack-with-database.yaml +177 -14
  23. package/xiaoma-core/workflows/enhanced-fullstack-with-qa-loop.yaml +766 -0
  24. package/xiaoma-core/workflows/full-requirement-automation.yaml +1267 -360
@@ -0,0 +1,512 @@
1
+ # Global Requirements Auditor Agent
2
+ # 全局需求实现审计智能体
3
+
4
+ meta:
5
+ name: "Global Requirements Auditor"
6
+ version: "2.0"
7
+ description: "全自动化的全局项目需求实现与质量保证审计智能体,负责终检阶段的深度验证"
8
+ created_date: "2025-09-10"
9
+ specialization: "global_requirements_validation_and_quality_assurance"
10
+ priority: "CRITICAL"
11
+
12
+ # ========== 智能体核心能力 ==========
13
+ agent_capabilities:
14
+ core_competencies:
15
+ - "PRD全覆盖性验证"
16
+ - "用户故事完整性深度检查"
17
+ - "开发任务质量全面审计"
18
+ - "代码实现与需求一致性验证"
19
+ - "测试覆盖度与质量评估"
20
+ - "跨层次依赖关系验证"
21
+ - "自动化问题识别与分类"
22
+ - "智能修复建议生成"
23
+
24
+ verification_dimensions:
25
+ - dimension: "requirements_coverage"
26
+ description: "需求覆盖度验证"
27
+ focus_areas:
28
+ - "功能需求完整性"
29
+ - "非功能需求实现"
30
+ - "业务规则遵循"
31
+ - "边界条件处理"
32
+ - "异常场景覆盖"
33
+
34
+ - dimension: "story_quality"
35
+ description: "用户故事质量评估"
36
+ focus_areas:
37
+ - "INVEST原则符合度"
38
+ - "验收标准可测试性"
39
+ - "技术实现可行性"
40
+ - "业务价值对齐"
41
+
42
+ - dimension: "implementation_quality"
43
+ description: "实现质量审计"
44
+ focus_areas:
45
+ - "代码质量指标"
46
+ - "架构设计遵循"
47
+ - "性能基准达标"
48
+ - "安全标准符合"
49
+ - "可维护性评估"
50
+
51
+ # ========== 全局审计执行引擎 ==========
52
+ global_audit_engine:
53
+ # 阶段1:全局数据收集与解析
54
+ phase_1_global_data_collection:
55
+ name: "全局数据收集与智能解析"
56
+ execution_mode: "PARALLEL"
57
+ timeout: 600 # 10分钟
58
+
59
+ collectors:
60
+ - collector: "prd_requirements_collector"
61
+ description: "PRD需求全量收集器"
62
+ sources:
63
+ - "docs/prd.md"
64
+ - "docs/prd/*.md"
65
+ - "docs/requirements/*.md"
66
+ extraction_rules:
67
+ - extract_all_functional_requirements
68
+ - extract_all_non_functional_requirements
69
+ - extract_business_rules_and_constraints
70
+ - extract_acceptance_criteria
71
+ - extract_priority_and_dependencies
72
+ output: "requirements_inventory.json"
73
+
74
+ - collector: "user_stories_collector"
75
+ description: "用户故事全量收集器"
76
+ sources:
77
+ - "docs/stories/*.md"
78
+ - "docs/epics/*.md"
79
+ - "story-implementations/*.md"
80
+ extraction_rules:
81
+ - extract_story_metadata
82
+ - extract_acceptance_criteria
83
+ - extract_task_breakdown
84
+ - extract_implementation_status
85
+ - extract_test_results
86
+ output: "stories_inventory.json"
87
+
88
+ - collector: "implementation_collector"
89
+ description: "实现产物收集器"
90
+ sources:
91
+ - "src/**/*"
92
+ - "tests/**/*"
93
+ - "docs/api/*.md"
94
+ - "database/scripts/*.sql"
95
+ analysis_rules:
96
+ - analyze_code_structure
97
+ - extract_api_endpoints
98
+ - analyze_database_schema
99
+ - extract_test_coverage
100
+ - analyze_documentation
101
+ output: "implementation_inventory.json"
102
+
103
+ # 阶段2:深度映射与覆盖度分析
104
+ phase_2_deep_mapping_analysis:
105
+ name: "深度映射与覆盖度分析"
106
+ execution_mode: "SEQUENTIAL"
107
+
108
+ mapping_engines:
109
+ - engine: "requirement_to_story_mapper"
110
+ description: "需求到故事映射引擎"
111
+ algorithms:
112
+ - semantic_similarity_matching
113
+ - keyword_based_mapping
114
+ - context_aware_association
115
+ - dependency_chain_analysis
116
+ mapping_rules:
117
+ - one_to_many_mapping_allowed
118
+ - bidirectional_traceability_required
119
+ - orphan_detection_enabled
120
+ output: "requirement_story_mapping.json"
121
+
122
+ - engine: "story_to_implementation_mapper"
123
+ description: "故事到实现映射引擎"
124
+ algorithms:
125
+ - code_reference_analysis
126
+ - api_endpoint_matching
127
+ - database_table_association
128
+ - test_case_correlation
129
+ verification_methods:
130
+ - implementation_completeness_check
131
+ - functionality_alignment_verification
132
+ - integration_point_validation
133
+ output: "story_implementation_mapping.json"
134
+
135
+ - engine: "coverage_calculator"
136
+ description: "覆盖度计算引擎"
137
+ metrics:
138
+ - requirement_coverage_percentage
139
+ - story_implementation_percentage
140
+ - test_coverage_percentage
141
+ - documentation_coverage_percentage
142
+ weighted_scoring:
143
+ critical_requirements: 40
144
+ high_priority_requirements: 30
145
+ medium_priority_requirements: 20
146
+ low_priority_requirements: 10
147
+ output: "coverage_metrics.json"
148
+
149
+ # 阶段3:质量深度评估
150
+ phase_3_quality_deep_assessment:
151
+ name: "质量深度评估"
152
+ execution_mode: "PARALLEL"
153
+
154
+ quality_validators:
155
+ - validator: "story_quality_validator"
156
+ description: "用户故事质量验证器"
157
+ validation_criteria:
158
+ invest_compliance:
159
+ independent: 90
160
+ negotiable: 85
161
+ valuable: 95
162
+ estimable: 90
163
+ small: 85
164
+ testable: 95
165
+ content_quality:
166
+ clarity: 90
167
+ completeness: 95
168
+ consistency: 90
169
+ technical_accuracy: 95
170
+ severity_classification:
171
+ critical: "blocks_deployment"
172
+ high: "requires_immediate_fix"
173
+ medium: "should_fix_soon"
174
+ low: "nice_to_have"
175
+ output: "story_quality_report.json"
176
+
177
+ - validator: "implementation_quality_validator"
178
+ description: "实现质量验证器"
179
+ quality_dimensions:
180
+ code_quality:
181
+ - complexity_analysis
182
+ - duplication_detection
183
+ - security_vulnerability_scan
184
+ - performance_profiling
185
+ - maintainability_index
186
+ architecture_compliance:
187
+ - design_pattern_adherence
188
+ - layer_separation_validation
189
+ - dependency_rule_check
190
+ - naming_convention_compliance
191
+ testing_quality:
192
+ - unit_test_coverage
193
+ - integration_test_coverage
194
+ - e2e_test_coverage
195
+ - test_case_quality
196
+ thresholds:
197
+ code_coverage: 80
198
+ complexity_score: 10
199
+ duplication_ratio: 5
200
+ security_score: 90
201
+ output: "implementation_quality_report.json"
202
+
203
+ - validator: "integration_validator"
204
+ description: "集成验证器"
205
+ validation_areas:
206
+ api_integration:
207
+ - endpoint_availability
208
+ - response_format_correctness
209
+ - error_handling_adequacy
210
+ - performance_benchmarks
211
+ database_integration:
212
+ - schema_consistency
213
+ - query_performance
214
+ - transaction_integrity
215
+ - data_validation_rules
216
+ frontend_backend_integration:
217
+ - data_flow_correctness
218
+ - state_management_validation
219
+ - error_propagation_handling
220
+ - user_experience_consistency
221
+ output: "integration_validation_report.json"
222
+
223
+ # 阶段4:问题识别与分类
224
+ phase_4_issue_identification:
225
+ name: "智能问题识别与分类"
226
+
227
+ issue_detectors:
228
+ - detector: "coverage_gap_detector"
229
+ description: "覆盖度差距检测器"
230
+ detection_rules:
231
+ - unmapped_requirements
232
+ - incomplete_stories
233
+ - missing_implementations
234
+ - insufficient_testing
235
+ gap_analysis:
236
+ quantitative_gaps:
237
+ - coverage_percentage_shortfall
238
+ - missing_component_count
239
+ - incomplete_task_count
240
+ qualitative_gaps:
241
+ - quality_standard_deviation
242
+ - consistency_violations
243
+ - best_practice_non_compliance
244
+ output: "coverage_gaps.json"
245
+
246
+ - detector: "quality_issue_detector"
247
+ description: "质量问题检测器"
248
+ issue_categories:
249
+ functional_issues:
250
+ - incorrect_implementation
251
+ - missing_functionality
252
+ - broken_features
253
+ non_functional_issues:
254
+ - performance_degradation
255
+ - security_vulnerabilities
256
+ - usability_problems
257
+ technical_debt:
258
+ - code_smell_detection
259
+ - architecture_violations
260
+ - documentation_gaps
261
+ severity_scoring:
262
+ formula: "impact * likelihood * detectability"
263
+ thresholds:
264
+ critical: 80
265
+ high: 60
266
+ medium: 40
267
+ low: 20
268
+ output: "quality_issues.json"
269
+
270
+ issue_classifier:
271
+ classification_dimensions:
272
+ - by_severity: ["critical", "high", "medium", "low"]
273
+ - by_type: ["functional", "non_functional", "technical_debt", "documentation"]
274
+ - by_component: ["frontend", "backend", "database", "api", "infrastructure"]
275
+ - by_effort: ["quick_fix", "moderate_effort", "significant_effort", "major_rework"]
276
+ priority_matrix:
277
+ high_impact_low_effort: "IMMEDIATE"
278
+ high_impact_high_effort: "HIGH"
279
+ low_impact_low_effort: "MEDIUM"
280
+ low_impact_high_effort: "LOW"
281
+ output: "classified_issues.json"
282
+
283
+ # ========== 智能反馈与修复建议生成 ==========
284
+ intelligent_feedback_generator:
285
+ feedback_strategies:
286
+ - strategy: "root_cause_analysis"
287
+ description: "根因分析策略"
288
+ techniques:
289
+ - "5_why_analysis"
290
+ - "fishbone_diagram"
291
+ - "fault_tree_analysis"
292
+ - "pareto_analysis"
293
+ output_format: "structured_root_cause_report"
294
+
295
+ - strategy: "solution_recommendation"
296
+ description: "解决方案推荐策略"
297
+ recommendation_types:
298
+ quick_wins:
299
+ - "immediate_fixes"
300
+ - "configuration_changes"
301
+ - "documentation_updates"
302
+ systematic_improvements:
303
+ - "refactoring_suggestions"
304
+ - "architecture_enhancements"
305
+ - "process_optimizations"
306
+ strategic_changes:
307
+ - "technology_upgrades"
308
+ - "methodology_changes"
309
+ - "team_skill_development"
310
+ confidence_scoring:
311
+ high_confidence: "proven_solution_with_examples"
312
+ medium_confidence: "recommended_best_practice"
313
+ low_confidence: "experimental_suggestion"
314
+
315
+ - strategy: "action_plan_generation"
316
+ description: "行动计划生成策略"
317
+ plan_components:
318
+ immediate_actions:
319
+ timeframe: "0-24_hours"
320
+ focus: "critical_blockers"
321
+ resources: "existing_team"
322
+ short_term_plan:
323
+ timeframe: "1-2_weeks"
324
+ focus: "high_priority_issues"
325
+ resources: "current_sprint_capacity"
326
+ long_term_roadmap:
327
+ timeframe: "1-3_months"
328
+ focus: "systematic_improvements"
329
+ resources: "planned_allocation"
330
+ task_specification:
331
+ - clear_description
332
+ - specific_acceptance_criteria
333
+ - estimated_effort
334
+ - required_skills
335
+ - dependency_identification
336
+
337
+ # ========== 自动化修复触发机制 ==========
338
+ automated_fix_triggers:
339
+ trigger_conditions:
340
+ immediate_trigger:
341
+ - "critical_functionality_missing"
342
+ - "security_vulnerability_detected"
343
+ - "data_integrity_issue"
344
+ - "deployment_blocker"
345
+
346
+ batch_trigger:
347
+ - "multiple_related_issues"
348
+ - "systematic_problems"
349
+ - "technical_debt_threshold_exceeded"
350
+
351
+ scheduled_trigger:
352
+ - "regular_quality_improvement"
353
+ - "periodic_optimization"
354
+ - "preventive_maintenance"
355
+
356
+ fix_routing_rules:
357
+ - rule: "requirement_coverage_gap"
358
+ target_agent: "sm"
359
+ action: "create_missing_stories"
360
+ priority: "HIGH"
361
+ validation_required: true
362
+
363
+ - rule: "story_quality_issue"
364
+ target_agent: "sm"
365
+ action: "refine_user_story"
366
+ priority: "MEDIUM"
367
+ validation_required: true
368
+
369
+ - rule: "implementation_defect"
370
+ target_agent: "dev"
371
+ action: "fix_implementation"
372
+ priority: "HIGH"
373
+ validation_required: true
374
+
375
+ - rule: "test_coverage_gap"
376
+ target_agent: "qa"
377
+ action: "create_missing_tests"
378
+ priority: "MEDIUM"
379
+ validation_required: false
380
+
381
+ - rule: "documentation_gap"
382
+ target_agent: "doc"
383
+ action: "update_documentation"
384
+ priority: "LOW"
385
+ validation_required: false
386
+
387
+ # ========== 报告生成配置 ==========
388
+ report_generation:
389
+ report_types:
390
+ executive_dashboard:
391
+ format: "markdown"
392
+ sections:
393
+ - overall_health_score
394
+ - critical_findings
395
+ - coverage_summary
396
+ - quality_metrics
397
+ - recommended_actions
398
+ visualization:
399
+ - coverage_heatmap
400
+ - quality_radar_chart
401
+ - issue_distribution_pie
402
+ - trend_analysis_graph
403
+
404
+ detailed_audit_report:
405
+ format: "markdown"
406
+ sections:
407
+ - comprehensive_coverage_analysis
408
+ - requirement_traceability_matrix
409
+ - story_quality_assessment
410
+ - implementation_verification_results
411
+ - identified_gaps_and_issues
412
+ - root_cause_analysis
413
+ - detailed_recommendations
414
+ appendices:
415
+ - raw_data_dumps
416
+ - calculation_methodology
417
+ - reference_documentation
418
+
419
+ action_tracking_report:
420
+ format: "json"
421
+ tracking_elements:
422
+ - issue_id
423
+ - description
424
+ - severity
425
+ - assigned_agent
426
+ - proposed_action
427
+ - estimated_effort
428
+ - target_completion
429
+ - validation_criteria
430
+ - current_status
431
+
432
+ # ========== 质量门控配置 ==========
433
+ quality_gates:
434
+ mandatory_gates:
435
+ - gate: "critical_requirements_coverage"
436
+ threshold: 100
437
+ failure_action: "BLOCK_PROGRESSION"
438
+
439
+ - gate: "high_priority_story_completeness"
440
+ threshold: 95
441
+ failure_action: "REQUIRE_APPROVAL"
442
+
443
+ - gate: "security_vulnerability_count"
444
+ threshold: 0
445
+ failure_action: "BLOCK_PROGRESSION"
446
+
447
+ - gate: "integration_test_pass_rate"
448
+ threshold: 98
449
+ failure_action: "REQUIRE_FIX"
450
+
451
+ recommended_gates:
452
+ - gate: "overall_coverage"
453
+ threshold: 90
454
+ failure_action: "WARNING"
455
+
456
+ - gate: "code_quality_score"
457
+ threshold: 85
458
+ failure_action: "RECOMMENDATION"
459
+
460
+ - gate: "documentation_completeness"
461
+ threshold: 80
462
+ failure_action: "NOTIFICATION"
463
+
464
+ # ========== 执行配置 ==========
465
+ execution_configuration:
466
+ execution_modes:
467
+ comprehensive_audit:
468
+ description: "全面深度审计"
469
+ scope: "entire_project"
470
+ depth: "maximum"
471
+ duration: "30-45_minutes"
472
+ parallelization: true
473
+
474
+ incremental_audit:
475
+ description: "增量审计"
476
+ scope: "changed_components"
477
+ depth: "focused"
478
+ duration: "10-15_minutes"
479
+ parallelization: true
480
+
481
+ continuous_monitoring:
482
+ description: "持续监控模式"
483
+ scope: "real_time_changes"
484
+ depth: "adaptive"
485
+ duration: "ongoing"
486
+ parallelization: false
487
+
488
+ performance_optimization:
489
+ caching_strategy: "aggressive"
490
+ parallel_workers: 8
491
+ memory_limit: "4GB"
492
+ timeout_handling: "graceful_degradation"
493
+
494
+ # ========== 成功标准 ==========
495
+ success_criteria:
496
+ audit_effectiveness:
497
+ - "100%需求识别准确率"
498
+ - "零误报率"
499
+ - "全面问题检测覆盖"
500
+ - "可操作建议生成率>95%"
501
+
502
+ automation_efficiency:
503
+ - "自动问题分类准确率>90%"
504
+ - "智能路由成功率>95%"
505
+ - "修复建议采纳率>80%"
506
+ - "端到端执行时间<45分钟"
507
+
508
+ business_value:
509
+ - "关键需求100%验证"
510
+ - "质量问题早期发现率>90%"
511
+ - "修复成本降低>50%"
512
+ - "交付信心度提升>95%"