@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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@zeyue0329/xiaoma-cli",
4
- "version": "1.0.24",
4
+ "version": "1.0.26",
5
5
  "description": "XiaoMa Cli: Universal AI Agent Framework",
6
6
  "keywords": [
7
7
  "agile",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaoma-cli",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "XiaoMa-Cli installer - AI-powered Agile development framework",
5
5
  "keywords": [
6
6
  "bmad",
@@ -0,0 +1,578 @@
1
+ # Automated Fix Validator Agent
2
+ # 自动化修复验证智能体
3
+
4
+ meta:
5
+ name: "Automated Fix Validator"
6
+ version: "2.0"
7
+ description: "专门负责自动化修复验证、质量回归测试和闭环确认的智能体"
8
+ created_date: "2025-09-10"
9
+ specialization: "automated_validation_and_regression_testing"
10
+ priority: "CRITICAL"
11
+
12
+ # ========== 智能体核心能力 ==========
13
+ agent_capabilities:
14
+ validation_competencies:
15
+ - "多层次修复验证"
16
+ - "自动化回归测试"
17
+ - "集成影响分析"
18
+ - "性能基准验证"
19
+ - "安全漏洞扫描"
20
+ - "代码质量评估"
21
+ - "业务逻辑验证"
22
+ - "端到端场景测试"
23
+
24
+ automation_features:
25
+ - "智能测试用例生成"
26
+ - "自适应验证策略"
27
+ - "并行验证执行"
28
+ - "增量验证优化"
29
+ - "失败模式学习"
30
+ - "自动回滚决策"
31
+
32
+ # ========== 验证策略引擎 ==========
33
+ validation_strategy_engine:
34
+ strategy_selection:
35
+ factors:
36
+ - fix_type
37
+ - component_criticality
38
+ - change_scope
39
+ - risk_assessment
40
+ - time_constraints
41
+ - historical_data
42
+
43
+ strategies:
44
+ comprehensive_validation:
45
+ description: "全面验证策略"
46
+ applicable_when:
47
+ - critical_fix
48
+ - major_refactoring
49
+ - security_patch
50
+ - architecture_change
51
+ validation_depth: "maximum"
52
+ test_coverage_target: 95
53
+
54
+ targeted_validation:
55
+ description: "定向验证策略"
56
+ applicable_when:
57
+ - localized_fix
58
+ - minor_bug_fix
59
+ - documentation_update
60
+ validation_depth: "focused"
61
+ test_coverage_target: 85
62
+
63
+ rapid_validation:
64
+ description: "快速验证策略"
65
+ applicable_when:
66
+ - hotfix_required
67
+ - low_risk_change
68
+ - configuration_update
69
+ validation_depth: "essential"
70
+ test_coverage_target: 70
71
+
72
+ # ========== 多层验证框架 ==========
73
+ multi_layer_validation_framework:
74
+ # 第1层:语法和静态分析
75
+ layer_1_static_validation:
76
+ name: "静态代码验证"
77
+ validators:
78
+ - validator: "syntax_checker"
79
+ languages: ["javascript", "typescript", "python", "java", "go"]
80
+ checks:
81
+ - syntax_correctness
82
+ - import_resolution
83
+ - type_checking
84
+ - unused_variables
85
+
86
+ - validator: "linter"
87
+ tools: ["eslint", "pylint", "golint", "checkstyle"]
88
+ rules:
89
+ - code_style_compliance
90
+ - best_practice_violations
91
+ - complexity_metrics
92
+ - maintainability_index
93
+
94
+ - validator: "security_scanner"
95
+ tools: ["sonarqube", "snyk", "bandit"]
96
+ scans:
97
+ - vulnerability_detection
98
+ - dependency_audit
99
+ - secret_detection
100
+ - injection_risks
101
+
102
+ pass_criteria:
103
+ no_syntax_errors: true
104
+ linting_score: ">85"
105
+ security_issues: 0
106
+ complexity_threshold: 10
107
+
108
+ # 第2层:单元测试验证
109
+ layer_2_unit_validation:
110
+ name: "单元测试验证"
111
+ test_execution:
112
+ runners: ["jest", "pytest", "junit", "go_test"]
113
+ parallel_execution: true
114
+ timeout_per_test: 30
115
+
116
+ coverage_analysis:
117
+ tools: ["istanbul", "coverage.py", "jacoco"]
118
+ metrics:
119
+ - line_coverage
120
+ - branch_coverage
121
+ - function_coverage
122
+ - statement_coverage
123
+ minimum_thresholds:
124
+ critical_code: 95
125
+ standard_code: 85
126
+ utility_code: 70
127
+
128
+ mutation_testing:
129
+ enabled: true
130
+ tools: ["stryker", "pitest", "mutmut"]
131
+ survival_threshold: 10 # 最多10%的变异体存活
132
+
133
+ pass_criteria:
134
+ all_tests_passing: true
135
+ coverage_met: true
136
+ mutation_score: ">90"
137
+
138
+ # 第3层:集成测试验证
139
+ layer_3_integration_validation:
140
+ name: "集成测试验证"
141
+ test_categories:
142
+ api_integration:
143
+ tools: ["postman", "newman", "rest-assured"]
144
+ validations:
145
+ - endpoint_availability
146
+ - request_response_format
147
+ - status_code_correctness
148
+ - response_time_limits
149
+ - error_handling
150
+
151
+ database_integration:
152
+ tools: ["dbunit", "testcontainers"]
153
+ validations:
154
+ - connection_stability
155
+ - query_correctness
156
+ - transaction_integrity
157
+ - data_consistency
158
+ - performance_benchmarks
159
+
160
+ service_integration:
161
+ tools: ["wiremock", "mockserver"]
162
+ validations:
163
+ - service_communication
164
+ - message_queue_operations
165
+ - event_processing
166
+ - timeout_handling
167
+ - retry_mechanisms
168
+
169
+ pass_criteria:
170
+ integration_success_rate: ">98"
171
+ response_time_p95: "<500ms"
172
+ error_rate: "<1%"
173
+
174
+ # 第4层:端到端测试验证
175
+ layer_4_e2e_validation:
176
+ name: "端到端测试验证"
177
+ test_frameworks:
178
+ web_testing:
179
+ tools: ["cypress", "playwright", "selenium"]
180
+ scenarios:
181
+ - user_journey_flows
182
+ - critical_path_testing
183
+ - cross_browser_compatibility
184
+ - responsive_design_validation
185
+
186
+ mobile_testing:
187
+ tools: ["appium", "espresso", "xcuitest"]
188
+ scenarios:
189
+ - app_navigation_flows
190
+ - device_compatibility
191
+ - offline_functionality
192
+ - push_notification_handling
193
+
194
+ api_workflow_testing:
195
+ tools: ["karate", "restassured", "tavern"]
196
+ scenarios:
197
+ - multi_step_workflows
198
+ - data_flow_validation
199
+ - error_recovery_paths
200
+ - concurrent_user_simulation
201
+
202
+ pass_criteria:
203
+ critical_scenarios_passing: 100
204
+ overall_success_rate: ">95"
205
+ performance_degradation: "<5%"
206
+
207
+ # 第5层:业务验证
208
+ layer_5_business_validation:
209
+ name: "业务逻辑验证"
210
+ validation_types:
211
+ requirement_compliance:
212
+ checks:
213
+ - acceptance_criteria_met
214
+ - business_rules_enforced
215
+ - data_validation_rules
216
+ - workflow_correctness
217
+
218
+ user_experience_validation:
219
+ checks:
220
+ - ui_consistency
221
+ - accessibility_standards
222
+ - usability_guidelines
223
+ - performance_perception
224
+
225
+ compliance_validation:
226
+ checks:
227
+ - regulatory_requirements
228
+ - data_privacy_rules
229
+ - audit_trail_completeness
230
+ - security_policies
231
+
232
+ pass_criteria:
233
+ requirement_coverage: 100
234
+ business_rule_compliance: 100
235
+ ux_score: ">85"
236
+
237
+ # ========== 回归测试管理 ==========
238
+ regression_test_management:
239
+ test_selection_strategy:
240
+ approaches:
241
+ - approach: "risk_based_selection"
242
+ description: "基于风险的测试选择"
243
+ factors:
244
+ - code_change_impact
245
+ - component_criticality
246
+ - defect_history
247
+ - customer_usage_patterns
248
+
249
+ - approach: "dependency_analysis"
250
+ description: "依赖分析测试选择"
251
+ techniques:
252
+ - static_dependency_graph
253
+ - dynamic_call_analysis
254
+ - data_flow_tracking
255
+
256
+ - approach: "machine_learning_prediction"
257
+ description: "机器学习预测选择"
258
+ models:
259
+ - failure_prediction_model
260
+ - test_effectiveness_model
261
+ - optimal_subset_selection
262
+
263
+ test_optimization:
264
+ techniques:
265
+ - technique: "test_prioritization"
266
+ criteria: ["failure_probability", "execution_time", "coverage_contribution"]
267
+
268
+ - technique: "parallel_execution"
269
+ strategy: "resource_aware_scheduling"
270
+ max_parallel_jobs: 10
271
+
272
+ - technique: "incremental_testing"
273
+ approach: "change_impact_analysis"
274
+ cache_previous_results: true
275
+
276
+ - technique: "smart_retry"
277
+ flaky_test_detection: true
278
+ max_retries: 3
279
+ retry_on_failure_types: ["timeout", "network_error"]
280
+
281
+ regression_suite_maintenance:
282
+ automatic_updates:
283
+ - add_new_test_cases
284
+ - remove_obsolete_tests
285
+ - update_test_data
286
+ - refactor_duplicate_tests
287
+
288
+ quality_metrics:
289
+ - test_effectiveness
290
+ - fault_detection_rate
291
+ - execution_efficiency
292
+ - maintenance_cost
293
+
294
+ # ========== 性能验证引擎 ==========
295
+ performance_validation_engine:
296
+ performance_tests:
297
+ load_testing:
298
+ tools: ["jmeter", "gatling", "k6"]
299
+ scenarios:
300
+ - normal_load
301
+ - peak_load
302
+ - stress_conditions
303
+ - endurance_run
304
+ metrics:
305
+ - response_time
306
+ - throughput
307
+ - error_rate
308
+ - resource_utilization
309
+
310
+ benchmark_comparison:
311
+ baseline_source: "previous_release"
312
+ comparison_metrics:
313
+ - response_time_percentiles
314
+ - memory_consumption
315
+ - cpu_utilization
316
+ - database_query_time
317
+ acceptance_thresholds:
318
+ regression_tolerance: 5 # 最多5%性能下降
319
+ improvement_target: 10 # 目标10%性能提升
320
+
321
+ scalability_validation:
322
+ tests:
323
+ - horizontal_scaling
324
+ - vertical_scaling
325
+ - database_scaling
326
+ - cache_effectiveness
327
+
328
+ metrics:
329
+ - linear_scalability_factor
330
+ - resource_efficiency
331
+ - bottleneck_identification
332
+
333
+ # ========== 安全验证引擎 ==========
334
+ security_validation_engine:
335
+ security_scans:
336
+ static_analysis:
337
+ tools: ["sonarqube", "checkmarx", "fortify"]
338
+ checks:
339
+ - code_vulnerabilities
340
+ - configuration_issues
341
+ - dependency_vulnerabilities
342
+ - secret_exposure
343
+
344
+ dynamic_analysis:
345
+ tools: ["owasp_zap", "burp_suite", "nikto"]
346
+ tests:
347
+ - injection_attacks
348
+ - authentication_bypass
349
+ - session_management
350
+ - cross_site_scripting
351
+
352
+ compliance_checks:
353
+ standards: ["owasp_top_10", "pci_dss", "gdpr", "hipaa"]
354
+ validations:
355
+ - encryption_requirements
356
+ - access_control
357
+ - audit_logging
358
+ - data_protection
359
+
360
+ vulnerability_management:
361
+ severity_classification:
362
+ critical: "immediate_fix_required"
363
+ high: "fix_within_24_hours"
364
+ medium: "fix_within_sprint"
365
+ low: "backlog_item"
366
+
367
+ remediation_tracking:
368
+ - vulnerability_id
369
+ - discovery_date
370
+ - fix_status
371
+ - verification_status
372
+
373
+ # ========== 验证结果分析器 ==========
374
+ validation_result_analyzer:
375
+ result_aggregation:
376
+ data_sources:
377
+ - static_analysis_results
378
+ - test_execution_results
379
+ - performance_metrics
380
+ - security_scan_results
381
+ - business_validation_results
382
+
383
+ aggregation_methods:
384
+ weighted_scoring:
385
+ weights:
386
+ functionality: 35
387
+ performance: 25
388
+ security: 20
389
+ quality: 10
390
+ usability: 10
391
+
392
+ confidence_calculation:
393
+ factors:
394
+ - test_coverage
395
+ - test_quality
396
+ - historical_accuracy
397
+ - validation_completeness
398
+
399
+ decision_engine:
400
+ decision_criteria:
401
+ approve_fix:
402
+ conditions:
403
+ - all_critical_tests_passing
404
+ - no_security_vulnerabilities
405
+ - performance_acceptable
406
+ - business_requirements_met
407
+ confidence_threshold: 90
408
+
409
+ conditional_approve:
410
+ conditions:
411
+ - minor_issues_only
412
+ - workaround_available
413
+ - risk_acceptable
414
+ requires_approval: true
415
+
416
+ reject_fix:
417
+ conditions:
418
+ - critical_test_failure
419
+ - security_vulnerability_found
420
+ - significant_performance_regression
421
+ - business_logic_violation
422
+ action: "return_for_rework"
423
+
424
+ escalate_decision:
425
+ conditions:
426
+ - ambiguous_results
427
+ - partial_validation_only
428
+ - timeout_occurred
429
+ escalation_to: "architect"
430
+
431
+ insight_generation:
432
+ analyses:
433
+ - failure_pattern_analysis
434
+ - root_cause_identification
435
+ - improvement_suggestions
436
+ - risk_assessment
437
+
438
+ recommendations:
439
+ - additional_test_coverage
440
+ - code_refactoring_areas
441
+ - performance_optimization
442
+ - security_hardening
443
+
444
+ # ========== 自动回滚机制 ==========
445
+ auto_rollback_mechanism:
446
+ rollback_triggers:
447
+ automatic_triggers:
448
+ - critical_validation_failure
449
+ - production_error_spike
450
+ - performance_degradation_severe
451
+ - security_breach_detected
452
+
453
+ threshold_triggers:
454
+ error_rate: ">5%"
455
+ response_time_increase: ">50%"
456
+ availability_drop: "<99%"
457
+ customer_complaints: ">10"
458
+
459
+ rollback_strategy:
460
+ preparation:
461
+ - backup_current_state
462
+ - prepare_rollback_scripts
463
+ - validate_rollback_path
464
+ - notify_stakeholders
465
+
466
+ execution:
467
+ - stop_current_deployment
468
+ - restore_previous_version
469
+ - verify_restoration
470
+ - update_routing_rules
471
+
472
+ verification:
473
+ - health_check_all_services
474
+ - verify_data_integrity
475
+ - confirm_functionality
476
+ - monitor_stability
477
+
478
+ post_rollback:
479
+ actions:
480
+ - incident_report_generation
481
+ - root_cause_analysis
482
+ - fix_plan_creation
483
+ - lessons_learned_documentation
484
+
485
+ # ========== 报告生成器 ==========
486
+ report_generator:
487
+ report_types:
488
+ validation_summary:
489
+ format: "markdown"
490
+ sections:
491
+ - overall_status
492
+ - validation_scores
493
+ - test_results_summary
494
+ - issue_list
495
+ - recommendations
496
+ audience: "development_team"
497
+
498
+ detailed_analysis:
499
+ format: "html"
500
+ sections:
501
+ - layer_by_layer_results
502
+ - coverage_analysis
503
+ - performance_comparison
504
+ - security_findings
505
+ - regression_test_results
506
+ audience: "technical_leads"
507
+
508
+ executive_summary:
509
+ format: "pdf"
510
+ sections:
511
+ - go_no_go_decision
512
+ - risk_assessment
513
+ - quality_metrics
514
+ - business_impact
515
+ audience: "management"
516
+
517
+ visualization:
518
+ charts:
519
+ - validation_progress_timeline
520
+ - layer_success_rates
521
+ - coverage_heatmap
522
+ - performance_comparison_graph
523
+ - issue_distribution_pie
524
+
525
+ dashboards: real_time_validation_status
526
+ historical_trend_analysis
527
+ quality_metrics_dashboard
528
+
529
+ # ========== 持续学习系统 ==========
530
+ continuous_learning_system:
531
+ learning_sources:
532
+ - validation_outcomes
533
+ - false_positive_rates
534
+ - false_negative_rates
535
+ - fix_effectiveness
536
+ - rollback_incidents
537
+
538
+ model_improvements:
539
+ test_selection_model:
540
+ inputs: ["code_changes", "historical_failures", "dependency_graph"]
541
+ algorithm: "random_forest"
542
+ retraining_frequency: "weekly"
543
+
544
+ risk_prediction_model:
545
+ inputs: ["change_complexity", "component_history", "developer_experience"]
546
+ algorithm: "gradient_boosting"
547
+ retraining_frequency: "monthly"
548
+
549
+ validation_optimization_model:
550
+ inputs: ["validation_time", "defect_detection", "resource_usage"]
551
+ algorithm: "reinforcement_learning"
552
+ retraining_frequency: "continuous"
553
+
554
+ knowledge_base_updates:
555
+ - common_failure_patterns
556
+ - effective_test_strategies
557
+ - validation_best_practices
558
+ - optimization_techniques
559
+
560
+ # ========== 成功标准 ==========
561
+ success_criteria:
562
+ validation_accuracy:
563
+ - "缺陷检测率>95%"
564
+ - "误报率<5%"
565
+ - "漏报率<2%"
566
+ - "验证完整性100%"
567
+
568
+ efficiency_metrics:
569
+ - "平均验证时间<30分钟"
570
+ - "并行执行效率>80%"
571
+ - "资源利用率优化>70%"
572
+ - "自动化覆盖率>90%"
573
+
574
+ quality_impact:
575
+ - "生产缺陷减少>80%"
576
+ - "回滚事件减少>90%"
577
+ - "首次部署成功率>95%"
578
+ - "客户满意度提升>20%"