openmatrix 0.1.83 → 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.
|
@@ -56,14 +56,15 @@ export declare class GitCommitManager {
|
|
|
56
56
|
* 生成提交信息
|
|
57
57
|
*
|
|
58
58
|
* 格式规范:
|
|
59
|
-
* <type>:
|
|
59
|
+
* <type>: 简短描述
|
|
60
60
|
*
|
|
61
|
-
*
|
|
61
|
+
* 改动点1
|
|
62
|
+
* 改动点2
|
|
62
63
|
*
|
|
63
64
|
* 影响范围: 模块/功能
|
|
65
|
+
* 文件改动: 文件1, 文件2
|
|
64
66
|
*
|
|
65
|
-
*
|
|
66
|
-
* Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>
|
|
67
|
+
* Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
67
68
|
*/
|
|
68
69
|
generateCommitMessage(info: CommitInfo): string;
|
|
69
70
|
/**
|
|
@@ -155,14 +155,15 @@ class GitCommitManager {
|
|
|
155
155
|
* 生成提交信息
|
|
156
156
|
*
|
|
157
157
|
* 格式规范:
|
|
158
|
-
* <type>:
|
|
158
|
+
* <type>: 简短描述
|
|
159
159
|
*
|
|
160
|
-
*
|
|
160
|
+
* 改动点1
|
|
161
|
+
* 改动点2
|
|
161
162
|
*
|
|
162
163
|
* 影响范围: 模块/功能
|
|
164
|
+
* 文件改动: 文件1, 文件2
|
|
163
165
|
*
|
|
164
|
-
*
|
|
165
|
-
* Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>
|
|
166
|
+
* Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
166
167
|
*/
|
|
167
168
|
generateCommitMessage(info) {
|
|
168
169
|
const lines = [];
|
|
@@ -182,7 +183,7 @@ class GitCommitManager {
|
|
|
182
183
|
// 格式: feat(TASK-001): 简短描述
|
|
183
184
|
lines.push(`${commitType}(${info.taskId}): ${title}`);
|
|
184
185
|
lines.push('');
|
|
185
|
-
// Phase
|
|
186
|
+
// Phase 描述作为改动点
|
|
186
187
|
const phaseDescriptions = {
|
|
187
188
|
tdd: '编写测试用例',
|
|
188
189
|
develop: '实现功能代码',
|
|
@@ -195,13 +196,19 @@ class GitCommitManager {
|
|
|
195
196
|
lines.push('');
|
|
196
197
|
lines.push(`影响范围: ${info.impactScope.join('、')}`);
|
|
197
198
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
// 文件改动
|
|
200
|
+
const changedFiles = info.changes.slice(0, 5).map(f => {
|
|
201
|
+
const parts = f.split('/');
|
|
202
|
+
return parts.length > 2 ? parts.slice(-2).join('/') : f;
|
|
203
|
+
});
|
|
204
|
+
if (changedFiles.length > 0) {
|
|
205
|
+
const fileSummary = changedFiles.join(', ');
|
|
206
|
+
const suffix = info.changes.length > 5 ? ` 等 ${info.changes.length} 个文件` : '';
|
|
207
|
+
lines.push(`文件改动: ${fileSummary}${suffix}`);
|
|
202
208
|
}
|
|
209
|
+
lines.push('');
|
|
203
210
|
// Co-Author
|
|
204
|
-
lines.push(`Co-Authored-By: OpenMatrix
|
|
211
|
+
lines.push(`Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix`);
|
|
205
212
|
return lines.join('\n');
|
|
206
213
|
}
|
|
207
214
|
/**
|
|
@@ -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',
|
package/package.json
CHANGED
package/skills/auto.md
CHANGED
|
@@ -227,12 +227,15 @@ Agent-1 完成 → 写入 context.md → Agent-2 读取 Agent-1 的上下文 →
|
|
|
227
227
|
```
|
|
228
228
|
```bash
|
|
229
229
|
git add -A && git commit -m "$(cat <<'EOF'
|
|
230
|
-
feat
|
|
230
|
+
feat: 任务标题
|
|
231
|
+
|
|
232
|
+
改动点1
|
|
233
|
+
改动点2
|
|
231
234
|
|
|
232
235
|
影响范围: 模块名
|
|
236
|
+
文件改动: 文件1, 文件2
|
|
233
237
|
|
|
234
|
-
|
|
235
|
-
Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>
|
|
238
|
+
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
236
239
|
EOF
|
|
237
240
|
)"
|
|
238
241
|
```
|
|
@@ -244,14 +247,16 @@ EOF
|
|
|
244
247
|
```
|
|
245
248
|
<type>(TASK-XXX): 简短描述
|
|
246
249
|
|
|
250
|
+
改动点1
|
|
251
|
+
改动点2
|
|
252
|
+
|
|
247
253
|
影响范围: 模块名
|
|
254
|
+
文件改动: 文件1, 文件2
|
|
248
255
|
|
|
249
|
-
|
|
250
|
-
Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>
|
|
256
|
+
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
251
257
|
```
|
|
252
258
|
|
|
253
259
|
**type 映射:** feat(新功能) / fix(修复) / test(测试) / refactor(重构) / docs(文档)
|
|
254
|
-
**禁止使用:** `Co-Authored-By: Claude` 格式,必须使用 `Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>`
|
|
255
260
|
**禁止使用 emoji**,使用纯文本格式
|
|
256
261
|
|
|
257
262
|
</process>
|
package/skills/start.md
CHANGED
|
@@ -422,10 +422,13 @@ openmatrix meeting --list
|
|
|
422
422
|
git add -A && git commit -m "$(cat <<'EOF'
|
|
423
423
|
feat: 完成所有任务 - 任务总标题
|
|
424
424
|
|
|
425
|
+
改动点1
|
|
426
|
+
改动点2
|
|
427
|
+
|
|
425
428
|
影响范围: 全部模块
|
|
429
|
+
文件改动: src/xxx.ts, src/yyy.ts
|
|
426
430
|
|
|
427
|
-
|
|
428
|
-
Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>
|
|
431
|
+
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
429
432
|
EOF
|
|
430
433
|
)"
|
|
431
434
|
```
|
|
@@ -435,16 +438,16 @@ EOF
|
|
|
435
438
|
```
|
|
436
439
|
<type>(TASK-XXX): 简短描述
|
|
437
440
|
|
|
438
|
-
|
|
441
|
+
改动点1
|
|
442
|
+
改动点2
|
|
439
443
|
|
|
440
444
|
影响范围: 模块名
|
|
445
|
+
文件改动: 文件1, 文件2
|
|
441
446
|
|
|
442
|
-
|
|
443
|
-
Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>
|
|
447
|
+
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
444
448
|
```
|
|
445
449
|
|
|
446
450
|
**type 映射:** feat(新功能) / fix(修复) / test(测试) / refactor(重构) / docs(文档)
|
|
447
|
-
**禁止使用:** `Co-Authored-By: Claude` 格式,必须使用 `Co-Authored-By: OpenMatrix <https://github.com/bigfish1913/openmatrix>`
|
|
448
451
|
**禁止使用 emoji**,使用纯文本格式
|
|
449
452
|
|
|
450
453
|
</process>
|