@zeyue0329/xiaoma-cli 1.0.22 → 1.0.24

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.
@@ -0,0 +1,477 @@
1
+ # Parallel Development Orchestration - 并行开发编排
2
+
3
+ ## Task Overview
4
+
5
+ **任务名称**: 并行开发编排
6
+ **任务ID**: parallel-development-orchestration
7
+ **分类**: 开发流程编排
8
+ **复杂度**: ⭐⭐⭐⭐⭐
9
+
10
+ ## Task Description
11
+
12
+ 基于用户故事依赖关系图,智能编排多条并行开发流水线,最大化开发效率,同时确保依赖关系的正确处理和质量标准的一致性维护。
13
+
14
+ ## Input Requirements
15
+
16
+ ### 必需输入
17
+
18
+ 1. **项目故事积压清单** (project_story_backlog.md)
19
+ - 完整的用户故事清单
20
+ - 优先级排序和分组
21
+
22
+ 2. **故事依赖关系图** (story_dependency_graph.yaml)
23
+ - 故事间依赖关系
24
+ - 关键路径识别
25
+
26
+ 3. **开发资源配置** (development_resources.yaml)
27
+ - 虚拟开发团队配置
28
+ - 并行处理能力
29
+
30
+ ## Processing Steps
31
+
32
+ ### 第1步: 依赖关系分析
33
+
34
+ ```yaml
35
+ dependency_analysis:
36
+ graph_processing:
37
+ - topological_sorting: 拓扑排序确定执行顺序
38
+ - critical_path_identification: 关键路径识别
39
+ - parallel_group_detection: 并行组检测
40
+ - bottleneck_analysis: 瓶颈分析
41
+
42
+ execution_stages:
43
+ stage_definition:
44
+ - stage_1_foundation: 基础依赖故事(无前置依赖)
45
+ - stage_2_core: 核心业务故事(依赖基础)
46
+ - stage_3_features: 特性功能故事(依赖核心)
47
+ - stage_4_optimization: 优化增强故事(依赖特性)
48
+ ```
49
+
50
+ ### 第2步: 并行流水线设计
51
+
52
+ ```yaml
53
+ pipeline_design:
54
+ pipeline_architecture:
55
+ pipeline_count: 4 # 可配置
56
+
57
+ pipeline_1_foundation:
58
+ focus: '基础设施和核心依赖'
59
+ capacity: high_priority_stories
60
+ stories: ['用户认证', '权限管理', '基础数据模型']
61
+
62
+ pipeline_2_core_business:
63
+ focus: '核心业务功能'
64
+ capacity: medium_priority_stories
65
+ stories: ['主要业务流程', '核心数据操作']
66
+
67
+ pipeline_3_features:
68
+ focus: '特性功能开发'
69
+ capacity: feature_stories
70
+ stories: ['扩展功能', '用户体验优化']
71
+
72
+ pipeline_4_support:
73
+ focus: '支撑功能开发'
74
+ capacity: support_stories
75
+ stories: ['监控', '配置', '工具功能']
76
+
77
+ load_balancing:
78
+ balancing_strategy: 'even_distribution_with_priority'
79
+ factors:
80
+ - story_complexity: 故事复杂度权重
81
+ - estimated_effort: 预估工作量
82
+ - priority_level: 优先级级别
83
+ - dependency_impact: 依赖影响度
84
+ ```
85
+
86
+ ### 第3步: 同步点设计
87
+
88
+ ```yaml
89
+ synchronization_design:
90
+ sync_points:
91
+ foundation_sync:
92
+ trigger: '所有基础故事完成'
93
+ validation: '基础API和数据模型就绪'
94
+ next_stage: '核心业务开发启动'
95
+
96
+ core_business_sync:
97
+ trigger: '核心业务故事完成'
98
+ validation: '主要业务流程就绪'
99
+ next_stage: '特性功能开发启动'
100
+
101
+ feature_sync:
102
+ trigger: '特性功能故事完成'
103
+ validation: '所有功能集成就绪'
104
+ next_stage: '系统集成测试启动'
105
+
106
+ cross_pipeline_coordination:
107
+ shared_resources:
108
+ - database_schema: 数据库结构协调
109
+ - api_contracts: API契约同步
110
+ - common_components: 公共组件协调
111
+
112
+ conflict_resolution:
113
+ - naming_conflicts: 命名冲突解决
114
+ - schema_conflicts: 数据库冲突解决
115
+ - interface_conflicts: 接口冲突解决
116
+ ```
117
+
118
+ ### 第4步: 质量门控并行化
119
+
120
+ ```yaml
121
+ parallel_quality_gates:
122
+ per_pipeline_gates:
123
+ pipeline_level_validation:
124
+ - story_completion_validation: 故事完成度验证
125
+ - intra_pipeline_integration: 流水线内集成测试
126
+ - code_quality_consistency: 代码质量一致性
127
+
128
+ pipeline_output_validation:
129
+ - api_contract_compliance: API契约合规性
130
+ - database_schema_consistency: 数据库一致性
131
+ - integration_readiness: 集成就绪状态
132
+
133
+ cross_pipeline_gates:
134
+ integration_validation:
135
+ - cross_pipeline_api_testing: 跨流水线API测试
136
+ - data_flow_validation: 数据流验证
137
+ - business_process_integration: 业务流程集成
138
+
139
+ system_level_validation:
140
+ - end_to_end_testing: 端到端测试
141
+ - performance_validation: 性能验证
142
+ - security_validation: 安全验证
143
+ ```
144
+
145
+ ### 第5步: 进度监控和协调
146
+
147
+ ```yaml
148
+ progress_monitoring:
149
+ real_time_tracking:
150
+ pipeline_metrics:
151
+ - completion_percentage: 完成百分比
152
+ - velocity_tracking: 开发速度跟踪
153
+ - quality_metrics: 质量指标
154
+ - bottleneck_detection: 瓶颈检测
155
+
156
+ cross_pipeline_metrics:
157
+ - dependency_satisfaction: 依赖满足率
158
+ - sync_point_readiness: 同步点就绪度
159
+ - integration_health: 集成健康度
160
+
161
+ dynamic_adjustment:
162
+ load_rebalancing:
163
+ - slow_pipeline_detection: 慢速流水线检测
164
+ - story_redistribution: 故事重新分配
165
+ - resource_reallocation: 资源重新分配
166
+
167
+ priority_adjustment:
168
+ - critical_path_updates: 关键路径更新
169
+ - emergency_priority_boost: 紧急优先级提升
170
+ - dependency_change_handling: 依赖变更处理
171
+ ```
172
+
173
+ ## Orchestration Algorithm
174
+
175
+ ### 智能调度算法
176
+
177
+ ```yaml
178
+ scheduling_algorithm:
179
+ algorithm_type: 'dependency_aware_parallel_scheduling'
180
+
181
+ scheduling_phases:
182
+ phase_1_analysis:
183
+ - dependency_graph_analysis: 依赖图分析
184
+ - critical_path_computation: 关键路径计算
185
+ - resource_capacity_assessment: 资源容量评估
186
+
187
+ phase_2_assignment:
188
+ - story_to_pipeline_mapping: 故事到流水线映射
189
+ - load_distribution_optimization: 负载分配优化
190
+ - conflict_avoidance: 冲突规避
191
+
192
+ phase_3_execution:
193
+ - parallel_execution_launch: 并行执行启动
194
+ - real_time_coordination: 实时协调
195
+ - dynamic_adjustment: 动态调整
196
+
197
+ optimization_objectives:
198
+ primary: 'minimize_total_completion_time'
199
+ secondary: 'maximize_pipeline_utilization'
200
+ tertiary: 'minimize_integration_conflicts'
201
+ ```
202
+
203
+ ### 冲突检测与解决
204
+
205
+ ```yaml
206
+ conflict_management:
207
+ conflict_types:
208
+ resource_conflicts:
209
+ - shared_database_access: 共享数据库访问冲突
210
+ - common_api_endpoints: 公共API端点冲突
211
+ - shared_component_modification: 共享组件修改冲突
212
+
213
+ logic_conflicts:
214
+ - business_rule_conflicts: 业务规则冲突
215
+ - data_model_conflicts: 数据模型冲突
216
+ - workflow_conflicts: 工作流冲突
217
+
218
+ resolution_strategies:
219
+ temporal_separation:
220
+ - sequential_execution: 顺序执行
221
+ - time_slot_allocation: 时间槽分配
222
+ - batch_processing: 批量处理
223
+
224
+ logical_separation:
225
+ - namespace_isolation: 命名空间隔离
226
+ - interface_versioning: 接口版本控制
227
+ - component_abstraction: 组件抽象化
228
+ ```
229
+
230
+ ## Pipeline Coordination Protocols
231
+
232
+ ### 流水线间通信协议
233
+
234
+ ```yaml
235
+ inter_pipeline_communication:
236
+ communication_channels:
237
+ shared_state_store:
238
+ - completed_stories_registry: 已完成故事注册表
239
+ - api_contract_registry: API契约注册表
240
+ - schema_change_log: 数据库变更日志
241
+
242
+ event_bus:
243
+ - story_completion_events: 故事完成事件
244
+ - dependency_satisfaction_events: 依赖满足事件
245
+ - quality_gate_events: 质量门控事件
246
+
247
+ coordination_protocols:
248
+ handshake_protocol:
249
+ - dependency_readiness_check: 依赖就绪检查
250
+ - interface_compatibility_verification: 接口兼容性验证
251
+ - data_consistency_validation: 数据一致性验证
252
+
253
+ synchronization_protocol:
254
+ - barrier_synchronization: 栅栏同步
255
+ - checkpoint_coordination: 检查点协调
256
+ - rollback_coordination: 回滚协调
257
+ ```
258
+
259
+ ### 错误传播控制
260
+
261
+ ```yaml
262
+ error_propagation_control:
263
+ isolation_mechanisms:
264
+ pipeline_isolation:
265
+ - error_containment: 错误包含
266
+ - failure_isolation: 故障隔离
267
+ - impact_limitation: 影响限制
268
+
269
+ dependency_buffering:
270
+ - graceful_degradation: 优雅降级
271
+ - fallback_mechanisms: 降级机制
272
+ - partial_functionality: 部分功能维持
273
+
274
+ recovery_strategies:
275
+ automatic_recovery:
276
+ - retry_mechanisms: 重试机制
277
+ - alternative_path_execution: 替代路径执行
278
+ - state_reconstruction: 状态重构
279
+
280
+ manual_intervention:
281
+ - error_escalation: 错误升级
282
+ - human_decision_points: 人工决策点
283
+ - recovery_assistance: 恢复协助
284
+ ```
285
+
286
+ ## Output Generation
287
+
288
+ ### 并行开发计划
289
+
290
+ ```yaml
291
+ # parallel_development_plan.yaml
292
+ development_plan:
293
+ overview:
294
+ total_stories: 45
295
+ pipeline_count: 4
296
+ estimated_duration: '8-10 weeks'
297
+ parallel_efficiency: '75%'
298
+
299
+ pipeline_configurations:
300
+ pipeline_1_foundation:
301
+ id: 'foundation'
302
+ stories: ['US001', 'US002', 'US003']
303
+ estimated_duration: '3 weeks'
304
+ dependencies: []
305
+
306
+ pipeline_2_core:
307
+ id: 'core_business'
308
+ stories: ['US010', 'US011', 'US012']
309
+ estimated_duration: '4 weeks'
310
+ dependencies: ['foundation']
311
+
312
+ pipeline_3_features:
313
+ id: 'features'
314
+ stories: ['US020', 'US021', 'US022']
315
+ estimated_duration: '3 weeks'
316
+ dependencies: ['core_business']
317
+
318
+ pipeline_4_support:
319
+ id: 'support'
320
+ stories: ['US030', 'US031', 'US032']
321
+ estimated_duration: '2 weeks'
322
+ dependencies: ['features']
323
+
324
+ synchronization_schedule:
325
+ sync_point_1:
326
+ milestone: '基础设施就绪'
327
+ date: 'Week 3'
328
+ validation: '基础API和认证系统完成'
329
+
330
+ sync_point_2:
331
+ milestone: '核心业务就绪'
332
+ date: 'Week 7'
333
+ validation: '主要业务流程完成'
334
+
335
+ sync_point_3:
336
+ milestone: '功能集成就绪'
337
+ date: 'Week 10'
338
+ validation: '所有功能完成集成测试'
339
+ ```
340
+
341
+ ### 监控仪表板配置
342
+
343
+ ```yaml
344
+ # monitoring_dashboard.yaml
345
+ dashboard_config:
346
+ pipeline_status_panel:
347
+ metrics:
348
+ - completion_percentage: 完成百分比
349
+ - active_stories: 活跃故事数
350
+ - blocked_stories: 阻塞故事数
351
+ - quality_score: 质量分数
352
+
353
+ dependency_tracking_panel:
354
+ visualizations:
355
+ - dependency_satisfaction_graph: 依赖满足图
356
+ - critical_path_progress: 关键路径进度
357
+ - bottleneck_alerts: 瓶颈预警
358
+
359
+ quality_monitoring_panel:
360
+ indicators:
361
+ - test_coverage_by_pipeline: 各流水线测试覆盖率
362
+ - code_quality_trends: 代码质量趋势
363
+ - integration_test_results: 集成测试结果
364
+ ```
365
+
366
+ ## Integration Points
367
+
368
+ ### 与全需求编排器集成
369
+
370
+ ```yaml
371
+ orchestrator_integration:
372
+ command_binding:
373
+ trigger: '*orchestrate-parallel-development'
374
+
375
+ input_validation:
376
+ required_files:
377
+ - project_story_backlog.md: 故事积压清单
378
+ - story_dependency_graph.yaml: 依赖关系图
379
+ - development_resources.yaml: 开发资源配置
380
+
381
+ output_delivery:
382
+ generated_files:
383
+ - parallel_development_plan.yaml: 并行开发计划
384
+ - pipeline_execution_schedule.md: 流水线执行计划
385
+ - monitoring_dashboard.yaml: 监控仪表板配置
386
+ ```
387
+
388
+ ### 与单故事编排器协作
389
+
390
+ ```yaml
391
+ story_orchestrator_collaboration:
392
+ pipeline_to_story_mapping:
393
+ pipeline_1:
394
+ orchestrator_instances: 3
395
+ story_assignment: 'foundation_stories'
396
+
397
+ pipeline_2:
398
+ orchestrator_instances: 4
399
+ story_assignment: 'core_business_stories'
400
+
401
+ coordination_mechanism:
402
+ shared_context:
403
+ - database_schema_state: 数据库状态共享
404
+ - api_contract_registry: API契约注册表
405
+ - completed_story_artifacts: 已完成故事产物
406
+
407
+ synchronization_events:
408
+ - dependency_satisfied: 依赖满足事件
409
+ - story_completed: 故事完成事件
410
+ - quality_gate_passed: 质量门控通过事件
411
+ ```
412
+
413
+ ## Advanced Features
414
+
415
+ ### 自适应调度
416
+
417
+ ```yaml
418
+ adaptive_scheduling:
419
+ performance_monitoring:
420
+ - pipeline_velocity_tracking: 流水线速度跟踪
421
+ - bottleneck_prediction: 瓶颈预测
422
+ - resource_utilization_analysis: 资源利用率分析
423
+
424
+ dynamic_optimization:
425
+ - story_migration: 故事迁移
426
+ - resource_reallocation: 资源重分配
427
+ - priority_rebalancing: 优先级重平衡
428
+
429
+ machine_learning_integration:
430
+ - completion_time_prediction: 完成时间预测
431
+ - risk_assessment: 风险评估
432
+ - optimization_recommendations: 优化建议
433
+ ```
434
+
435
+ ### 智能依赖管理
436
+
437
+ ```yaml
438
+ intelligent_dependency_management:
439
+ dependency_prediction:
440
+ - implicit_dependency_detection: 隐式依赖检测
441
+ - future_dependency_projection: 未来依赖预测
442
+ - dependency_impact_simulation: 依赖影响模拟
443
+
444
+ dependency_optimization:
445
+ - dependency_minimization: 依赖最小化
446
+ - parallel_opportunity_maximization: 并行机会最大化
447
+ - critical_path_shortening: 关键路径缩短
448
+ ```
449
+
450
+ ## Usage Examples
451
+
452
+ ### 启动并行开发编排
453
+
454
+ ```bash
455
+ # 在全需求编排器中执行
456
+ *agent full-requirement-orchestrator
457
+ *orchestrate-parallel-development
458
+
459
+ # 查看并行开发计划
460
+ *monitor-project-progress
461
+
462
+ # 动态调整并行配置
463
+ *handle-cross-story-conflicts
464
+ ```
465
+
466
+ ### 监控和调整
467
+
468
+ ```bash
469
+ # 检查流水线状态
470
+ *check-pipeline-status
471
+
472
+ # 重新平衡负载
473
+ *rebalance-pipeline-load
474
+
475
+ # 处理依赖冲突
476
+ *resolve-dependency-conflicts
477
+ ```