@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,375 @@
1
+ # Intelligent Template Adapter
2
+ # 智能模板适配器 - 自动模板理解和应用系统
3
+
4
+ meta:
5
+ name: "Intelligent Template Adapter"
6
+ version: "2.0"
7
+ description: "智能模板理解、适配和质量保证系统"
8
+ created_date: "2025-09-10"
9
+
10
+ # ========== 模板智能分析系统 ==========
11
+ template_intelligence_system:
12
+ discovery_phase:
13
+ name: "Template Discovery and Analysis"
14
+ steps:
15
+ - step: "locate_templates"
16
+ description: "定位所有模板文件"
17
+ patterns:
18
+ - "**/*template*.yaml"
19
+ - "**/*template*.yml"
20
+ - "**/*tmpl*.yaml"
21
+ - ".xiaoma-core/templates/**"
22
+ validation: "FILE_EXISTS_AND_READABLE"
23
+
24
+ - step: "parse_template_structure"
25
+ description: "解析模板结构"
26
+ actions:
27
+ - yaml_structure_analysis
28
+ - field_hierarchy_mapping
29
+ - section_relationship_analysis
30
+ - validation_rule_extraction
31
+ output: "template_schema.json"
32
+
33
+ - step: "understand_requirements"
34
+ description: "理解模板要求"
35
+ analysis_points:
36
+ - required_vs_optional_fields
37
+ - field_data_types
38
+ - validation_constraints
39
+ - section_dependencies
40
+ - output_format_requirements
41
+ output: "requirements_matrix.json"
42
+
43
+ comprehension_validation:
44
+ name: "Template Comprehension Validation"
45
+ validation_methods:
46
+ - step: "structure_understanding_test"
47
+ description: "测试结构理解"
48
+ test_cases:
49
+ - generate_empty_template
50
+ - validate_field_mappings
51
+ - test_section_hierarchy
52
+ - verify_constraint_understanding
53
+ pass_criteria: "ALL_TESTS_PASS"
54
+
55
+ - step: "example_generation_test"
56
+ description: "样例生成测试"
57
+ actions:
58
+ - generate_sample_document
59
+ - validate_against_template
60
+ - check_completeness
61
+ - verify_format_compliance
62
+ pass_criteria: "SAMPLE_VALIDATES_100"
63
+
64
+ - step: "edge_case_handling"
65
+ description: "边界情况处理测试"
66
+ test_scenarios:
67
+ - missing_optional_fields
68
+ - complex_nested_structures
69
+ - validation_rule_boundaries
70
+ - format_variations
71
+ pass_criteria: "ROBUST_HANDLING"
72
+
73
+ # ========== 自动化内容生成引擎 ==========
74
+ automated_content_generation_engine:
75
+ content_analysis:
76
+ - step: "source_content_analysis"
77
+ description: "分析源内容"
78
+ actions:
79
+ - extract_key_information
80
+ - identify_content_type
81
+ - map_to_template_sections
82
+ - analyze_content_quality
83
+
84
+ - step: "gap_identification"
85
+ description: "识别内容缺口"
86
+ analysis:
87
+ - missing_required_fields
88
+ - incomplete_sections
89
+ - quality_deficiencies
90
+ - consistency_issues
91
+
92
+ - step: "enhancement_planning"
93
+ description: "制定增强计划"
94
+ strategies:
95
+ - content_expansion_plan
96
+ - quality_improvement_roadmap
97
+ - consistency_correction_plan
98
+ - template_compliance_plan
99
+
100
+ intelligent_content_generation:
101
+ - generator: "database_design_generator"
102
+ description: "数据库设计内容生成器"
103
+ capabilities:
104
+ - entity_relationship_analysis
105
+ - table_structure_generation
106
+ - data_operation_mapping
107
+ - constraint_identification
108
+ quality_check: "SCHEMA_VALIDATION"
109
+
110
+ - generator: "api_specification_generator"
111
+ description: "API规范生成器"
112
+ capabilities:
113
+ - endpoint_definition_generation
114
+ - request_response_mapping
115
+ - error_handling_specification
116
+ - data_mapping_creation
117
+ quality_check: "OPENAPI_COMPLIANCE"
118
+
119
+ - generator: "task_breakdown_generator"
120
+ description: "任务分解生成器"
121
+ capabilities:
122
+ - requirement_decomposition
123
+ - task_dependency_analysis
124
+ - implementation_planning
125
+ - testing_strategy_definition
126
+ quality_check: "COMPLETENESS_VALIDATION"
127
+
128
+ # ========== 多维质量验证系统 ==========
129
+ multi_dimensional_quality_validation:
130
+ # 维度1:模板结构完整性
131
+ structural_integrity_validation:
132
+ name: "Structural Integrity Check"
133
+ checks:
134
+ - section_presence_validation:
135
+ required_sections:
136
+ - "状态"
137
+ - "用户故事"
138
+ - "验收标准"
139
+ - "数据库设计相关"
140
+ - "API接口规范"
141
+ - "任务/子任务"
142
+ - "开发者说明"
143
+ - "变更日志"
144
+ - "开发者代理记录"
145
+ - "QA结果"
146
+ validation_method: "STRICT_MATCHING"
147
+
148
+ - subsection_completeness:
149
+ database_design_subsections:
150
+ - "涉及的数据库实体"
151
+ - "数据操作清单"
152
+ - "业务规则约束"
153
+ api_specification_subsections:
154
+ - "API端点清单"
155
+ - "API详细设计"
156
+ - "数据映射关系"
157
+ validation_method: "HIERARCHICAL_CHECK"
158
+
159
+ - field_format_validation:
160
+ user_story_format: "^\\*\\*作为\\*\\*.*\\*\\*我希望\\*\\*.*\\*\\*以便\\*\\*.*"
161
+ status_values: ["Draft", "Approved", "InProgress", "Review", "Done", "Completed"]
162
+ table_format: "MARKDOWN_TABLE"
163
+ validation_method: "REGEX_AND_FORMAT_CHECK"
164
+
165
+ scoring:
166
+ weight: 30
167
+ pass_threshold: 100 # 结构完整性必须100%
168
+ critical_failures: ["missing_required_section", "invalid_format"]
169
+
170
+ # 维度2:内容质量和完整性
171
+ content_quality_validation:
172
+ name: "Content Quality Assessment"
173
+ assessments:
174
+ - completeness_assessment:
175
+ database_entities_completeness: "ALL_ENTITIES_DOCUMENTED"
176
+ api_endpoints_completeness: "ALL_ENDPOINTS_SPECIFIED"
177
+ task_breakdown_completeness: "FULL_DECOMPOSITION"
178
+ scoring_method: "COVERAGE_PERCENTAGE"
179
+
180
+ - accuracy_assessment:
181
+ technical_accuracy: "EXPERT_LEVEL_REVIEW"
182
+ consistency_accuracy: "CROSS_REFERENCE_VALIDATION"
183
+ implementation_feasibility: "TECHNICAL_FEASIBILITY_CHECK"
184
+ scoring_method: "MULTI_CRITERIA_EVALUATION"
185
+
186
+ - clarity_assessment:
187
+ language_clarity: "READABILITY_ANALYSIS"
188
+ technical_clarity: "CONCEPT_CLARITY_CHECK"
189
+ instruction_clarity: "ACTIONABILITY_ASSESSMENT"
190
+ scoring_method: "CLARITY_METRICS"
191
+
192
+ scoring:
193
+ weight: 25
194
+ pass_threshold: 90
195
+ improvement_strategies: ["content_enhancement", "clarity_improvement", "accuracy_correction"]
196
+
197
+ # 维度3:跨文档一致性
198
+ cross_document_consistency_validation:
199
+ name: "Cross-Document Consistency Check"
200
+ consistency_checks:
201
+ - terminology_consistency:
202
+ entity_names: "EXACT_MATCH_REQUIRED"
203
+ api_naming: "CONVENTION_COMPLIANCE"
204
+ status_values: "STANDARDIZED_VALUES"
205
+ validation_method: "DICTIONARY_BASED"
206
+
207
+ - structural_consistency:
208
+ section_ordering: "TEMPLATE_ORDER_COMPLIANCE"
209
+ format_consistency: "UNIFORM_FORMATTING"
210
+ style_consistency: "STYLE_GUIDE_COMPLIANCE"
211
+ validation_method: "PATTERN_MATCHING"
212
+
213
+ - reference_integrity:
214
+ internal_references: "LINK_VALIDATION"
215
+ cross_story_references: "REFERENCE_EXISTENCE_CHECK"
216
+ version_references: "VERSION_CONSISTENCY"
217
+ validation_method: "GRAPH_ANALYSIS"
218
+
219
+ scoring:
220
+ weight: 20
221
+ pass_threshold: 95
222
+ correction_strategies:
223
+ ["terminology_standardization", "format_alignment", "reference_correction"]
224
+
225
+ # 维度4:实施可行性
226
+ implementation_feasibility_validation:
227
+ name: "Implementation Feasibility Assessment"
228
+ feasibility_checks:
229
+ - database_design_feasibility:
230
+ schema_validity: "SQL_SCHEMA_VALIDATION"
231
+ relationship_integrity: "FOREIGN_KEY_VALIDATION"
232
+ performance_considerations: "INDEX_AND_QUERY_ANALYSIS"
233
+ validation_method: "DATABASE_EXPERT_SYSTEM"
234
+
235
+ - api_design_feasibility:
236
+ rest_compliance: "REST_STANDARD_VALIDATION"
237
+ data_flow_validity: "REQUEST_RESPONSE_VALIDATION"
238
+ error_handling_completeness: "ERROR_SCENARIO_COVERAGE"
239
+ validation_method: "API_DESIGN_EXPERT_SYSTEM"
240
+
241
+ - task_feasibility:
242
+ task_decomposition_adequacy: "GRANULARITY_ASSESSMENT"
243
+ dependency_logic: "DEPENDENCY_GRAPH_VALIDATION"
244
+ estimation_reasonableness: "EFFORT_ESTIMATION_CHECK"
245
+ validation_method: "PROJECT_MANAGEMENT_EXPERT_SYSTEM"
246
+
247
+ scoring:
248
+ weight: 15
249
+ pass_threshold: 85
250
+ improvement_actions:
251
+ ["design_optimization", "feasibility_enhancement", "implementation_guidance"]
252
+
253
+ # 维度5:业务价值对齐
254
+ business_value_alignment_validation:
255
+ name: "Business Value Alignment Check"
256
+ alignment_checks:
257
+ - requirement_coverage:
258
+ acceptance_criteria_coverage: "REQUIREMENT_TRACEABILITY"
259
+ user_story_completeness: "STORY_COVERAGE_ANALYSIS"
260
+ value_proposition_clarity: "BUSINESS_VALUE_ASSESSMENT"
261
+ validation_method: "REQUIREMENT_ENGINEERING_ANALYSIS"
262
+
263
+ - stakeholder_value:
264
+ user_experience_consideration: "UX_IMPACT_ASSESSMENT"
265
+ business_process_alignment: "PROCESS_FIT_ANALYSIS"
266
+ roi_considerations: "VALUE_DELIVERY_ASSESSMENT"
267
+ validation_method: "BUSINESS_ANALYSIS_FRAMEWORK"
268
+
269
+ scoring:
270
+ weight: 10
271
+ pass_threshold: 80
272
+ enhancement_strategies:
273
+ ["value_clarification", "requirement_refinement", "stakeholder_alignment"]
274
+
275
+ # ========== 自动纠错和改进系统 ==========
276
+ auto_correction_and_improvement_system:
277
+ immediate_corrections:
278
+ - correction_type: "format_standardization"
279
+ triggers: ["format_violation", "structure_mismatch"]
280
+ actions:
281
+ - auto_reformat_sections
282
+ - standardize_terminology
283
+ - correct_table_formats
284
+ - fix_reference_formats
285
+ confidence_threshold: 95
286
+
287
+ - correction_type: "content_completion"
288
+ triggers: ["missing_required_content", "incomplete_sections"]
289
+ actions:
290
+ - generate_missing_content
291
+ - complete_partial_sections
292
+ - add_required_subsections
293
+ - fill_mandatory_fields
294
+ confidence_threshold: 90
295
+
296
+ - correction_type: "consistency_alignment"
297
+ triggers: ["terminology_mismatch", "format_inconsistency"]
298
+ actions:
299
+ - align_terminology
300
+ - standardize_formats
301
+ - synchronize_references
302
+ - unify_styling
303
+ confidence_threshold: 85
304
+
305
+ iterative_improvements:
306
+ - improvement_type: "quality_enhancement"
307
+ iterations: 3
308
+ focus_areas:
309
+ - content_depth_improvement
310
+ - clarity_enhancement
311
+ - technical_accuracy_refinement
312
+ - implementation_detail_addition
313
+ success_criteria: "QUALITY_SCORE_IMPROVEMENT"
314
+
315
+ - improvement_type: "completeness_optimization"
316
+ iterations: 2
317
+ focus_areas:
318
+ - gap_filling
319
+ - detail_expansion
320
+ - example_addition
321
+ - context_enhancement
322
+ success_criteria: "COMPLETENESS_SCORE_95_PLUS"
323
+
324
+ # ========== 执行流程配置 ==========
325
+ execution_workflow:
326
+ phase_1_analysis:
327
+ steps:
328
+ - template_discovery_and_parsing
329
+ - comprehension_validation
330
+ - source_content_analysis
331
+ - gap_identification
332
+ duration_estimate: "5-10 minutes"
333
+
334
+ phase_2_generation:
335
+ steps:
336
+ - automated_content_generation
337
+ - template_application
338
+ - initial_quality_validation
339
+ - immediate_corrections
340
+ duration_estimate: "10-15 minutes"
341
+
342
+ phase_3_validation:
343
+ steps:
344
+ - multi_dimensional_quality_validation
345
+ - cross_document_consistency_check
346
+ - implementation_feasibility_assessment
347
+ - business_value_alignment_check
348
+ duration_estimate: "15-20 minutes"
349
+
350
+ phase_4_refinement:
351
+ steps:
352
+ - iterative_improvements
353
+ - final_quality_validation
354
+ - comprehensive_reporting
355
+ - delivery_preparation
356
+ duration_estimate: "10-15 minutes"
357
+
358
+ total_estimated_time: "40-60 minutes per document"
359
+ quality_assurance_time: "60% of total time"
360
+
361
+ # ========== 成功标准 ==========
362
+ success_criteria:
363
+ structural_integrity: 100
364
+ content_quality: 90
365
+ cross_document_consistency: 95
366
+ implementation_feasibility: 85
367
+ business_value_alignment: 80
368
+ overall_quality_score: 90
369
+
370
+ critical_requirements:
371
+ - zero_structural_defects
372
+ - complete_template_compliance
373
+ - high_content_quality
374
+ - cross_document_consistency
375
+ - implementation_readiness