openmatrix 0.1.84 → 0.1.85
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.
|
@@ -33,6 +33,14 @@ class TaskPlanner {
|
|
|
33
33
|
const breakdowns = [];
|
|
34
34
|
const seenTitles = new Set();
|
|
35
35
|
const userContext = this.extractUserContext(answers);
|
|
36
|
+
// qualityConfig 中的 e2eTests 优先级高于 answers 中的推断
|
|
37
|
+
if (qualityConfig?.e2eTests) {
|
|
38
|
+
userContext.e2eTests = true;
|
|
39
|
+
// 如果 e2eType 未指定,从质量配置推断
|
|
40
|
+
if (!userContext.e2eType) {
|
|
41
|
+
userContext.e2eType = 'web';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
36
44
|
// 确定测试覆盖率
|
|
37
45
|
const coverageTarget = this.getCoverageTarget(qualityConfig, userContext);
|
|
38
46
|
// 构建全局上下文块(注入到每个子任务描述中,供 agent 参考)
|
|
@@ -112,8 +120,50 @@ ${globalContext}
|
|
|
112
120
|
// 关联测试任务 ID
|
|
113
121
|
breakdowns[breakdowns.length - 2].testTaskId = testTaskId;
|
|
114
122
|
}
|
|
115
|
-
// 2.
|
|
123
|
+
// 2. 系统集成任务 (将所有模块组装到入口文件)
|
|
124
|
+
let integrationTaskId;
|
|
125
|
+
if (devTaskIds.length > 1) {
|
|
126
|
+
integrationTaskId = this.generateTaskId();
|
|
127
|
+
breakdowns.push({
|
|
128
|
+
taskId: integrationTaskId,
|
|
129
|
+
title: '系统集成: 将所有模块组装到主入口,确保可运行',
|
|
130
|
+
description: `将前面所有模块连接到主入口文件(main.ts/index.ts),使应用可以完整运行
|
|
131
|
+
|
|
132
|
+
${globalContext}
|
|
133
|
+
|
|
134
|
+
## 集成要求
|
|
135
|
+
- 在主入口文件中实例化所有核心模块
|
|
136
|
+
- 将子系统连接到主循环(Game/App/Main)
|
|
137
|
+
- 确保模块间事件/数据流通
|
|
138
|
+
- 确保应用可以启动并正常运行(无运行时错误)
|
|
139
|
+
|
|
140
|
+
## 已完成的模块
|
|
141
|
+
${devTaskIds.map(id => `- ${id}: ${breakdowns.find(b => b.taskId === id)?.title || ''}`).join('\n')}
|
|
142
|
+
|
|
143
|
+
## 输出
|
|
144
|
+
- 更新后的主入口文件
|
|
145
|
+
- 模块连接正确,应用可运行
|
|
146
|
+
- 启动后无运行时错误`,
|
|
147
|
+
priority: 'P0',
|
|
148
|
+
dependencies: devTaskIds, // 依赖所有开发任务完成
|
|
149
|
+
estimatedComplexity: 'high',
|
|
150
|
+
assignedAgent: 'coder',
|
|
151
|
+
phase: 'develop',
|
|
152
|
+
acceptanceCriteria: [
|
|
153
|
+
'主入口文件已更新',
|
|
154
|
+
'所有核心模块已实例化并连接',
|
|
155
|
+
'应用可以正常启动',
|
|
156
|
+
'无运行时错误',
|
|
157
|
+
'模块间通信正常'
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
// 3. 代码审查任务 (仅在有开发任务时创建)
|
|
116
162
|
if (devTaskIds.length > 0) {
|
|
163
|
+
// 审查依赖所有开发任务 + 系统集成任务(如果有)
|
|
164
|
+
const reviewDeps = integrationTaskId
|
|
165
|
+
? [...devTaskIds, integrationTaskId]
|
|
166
|
+
: [...devTaskIds];
|
|
117
167
|
breakdowns.push({
|
|
118
168
|
taskId: this.generateTaskId(),
|
|
119
169
|
title: '代码审查',
|
|
@@ -130,7 +180,7 @@ ${devTaskIds.map(id => `- ${id}`).join('\n')}
|
|
|
130
180
|
- 性能
|
|
131
181
|
- 最佳实践`,
|
|
132
182
|
priority: 'P1',
|
|
133
|
-
dependencies:
|
|
183
|
+
dependencies: reviewDeps,
|
|
134
184
|
estimatedComplexity: 'medium',
|
|
135
185
|
assignedAgent: 'reviewer',
|
|
136
186
|
phase: 'verify',
|
|
@@ -144,6 +194,9 @@ ${devTaskIds.map(id => `- ${id}`).join('\n')}
|
|
|
144
194
|
}
|
|
145
195
|
// 3. 集成测试任务 (如果有多个交付物)
|
|
146
196
|
if (parsedTask.deliverables.length > 1) {
|
|
197
|
+
const integrationTestDeps = integrationTaskId
|
|
198
|
+
? [...devTaskIds, integrationTaskId]
|
|
199
|
+
: [...devTaskIds];
|
|
147
200
|
breakdowns.push({
|
|
148
201
|
taskId: this.generateTaskId(),
|
|
149
202
|
title: '集成测试',
|
|
@@ -156,7 +209,7 @@ ${globalContext}
|
|
|
156
209
|
- 端到端流程
|
|
157
210
|
- 数据流验证`,
|
|
158
211
|
priority: 'P1',
|
|
159
|
-
dependencies:
|
|
212
|
+
dependencies: integrationTestDeps,
|
|
160
213
|
estimatedComplexity: 'medium',
|
|
161
214
|
assignedAgent: 'tester',
|
|
162
215
|
phase: 'verify',
|