openmatrix 0.1.86 → 0.1.87
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.
|
@@ -161,6 +161,7 @@ async function handleTasksJson(options, stateManager, state, omPath, basePath) {
|
|
|
161
161
|
title: tasksInput.title,
|
|
162
162
|
description: tasksInput.description || '',
|
|
163
163
|
goals: tasksInput.goals,
|
|
164
|
+
goalTypes: tasksInput.goalTypes,
|
|
164
165
|
constraints: tasksInput.constraints || [],
|
|
165
166
|
deliverables: tasksInput.deliverables || [],
|
|
166
167
|
rawContent: ''
|
|
@@ -82,7 +82,8 @@ ${globalContext}
|
|
|
82
82
|
continue;
|
|
83
83
|
}
|
|
84
84
|
seenTitles.add(goal);
|
|
85
|
-
|
|
85
|
+
// 优先使用 AI 标注的类型,fallback 到关键词检测
|
|
86
|
+
const goalType = parsedTask.goalTypes?.[i] ?? this.classifyGoal(goal);
|
|
86
87
|
const deps = designTaskId ? [designTaskId] : [];
|
|
87
88
|
if (goalType === 'development') {
|
|
88
89
|
// 开发类目标: 拆分为实现 + 测试 对
|
package/dist/types/index.d.ts
CHANGED
|
@@ -204,10 +204,14 @@ export interface ParsedTask {
|
|
|
204
204
|
title: string;
|
|
205
205
|
description: string;
|
|
206
206
|
goals: string[];
|
|
207
|
+
/** 每个 goal 的类型标注 (由 AI 在提取时标注),与 goals 数组一一对应 */
|
|
208
|
+
goalTypes?: GoalType[];
|
|
207
209
|
constraints: string[];
|
|
208
210
|
deliverables: string[];
|
|
209
211
|
rawContent: string;
|
|
210
212
|
}
|
|
213
|
+
/** 目标类型 */
|
|
214
|
+
export type GoalType = 'development' | 'testing' | 'documentation' | 'other';
|
|
211
215
|
export interface ResearchAgentConfig {
|
|
212
216
|
role: string;
|
|
213
217
|
focus: string;
|
package/package.json
CHANGED
package/skills/start.md
CHANGED
|
@@ -230,10 +230,25 @@ AskUserQuestion({
|
|
|
230
230
|
|
|
231
231
|
从任务描述中提取:
|
|
232
232
|
- **goals**: 至少 3-8 个明确功能目标,每个是独立可交付模块
|
|
233
|
+
- **goalTypes**: 为每个 goal 标注类型,影响任务拆分策略:
|
|
234
|
+
- `development` — 需要编写代码的功能/模块实现 → 拆分为"实现+测试"任务对
|
|
235
|
+
- `testing` — 明确的测试任务(如"编写 E2E 测试"、"所有模块的单元测试")→ 单个测试任务
|
|
236
|
+
- `documentation` — 文档编写(如"编写 API 文档"、"更新 README")→ 单个文档任务
|
|
237
|
+
- `other` — 配置、部署、优化等非编码任务 → 单个任务
|
|
233
238
|
- **constraints**: 技术栈、兼容性等约束
|
|
234
239
|
- **deliverables**: 交付物列表
|
|
235
240
|
- **plan**: 技术方案、模块划分、接口设计、关键决策
|
|
236
241
|
|
|
242
|
+
**goalTypes 标注示例:**
|
|
243
|
+
|
|
244
|
+
| Goal | Type | 理由 |
|
|
245
|
+
|------|------|------|
|
|
246
|
+
| "项目脚手架: Vite+TS 配置" | development | 需要写代码搭建 |
|
|
247
|
+
| "GameLoop 60fps 游戏循环" | development | 功能实现 |
|
|
248
|
+
| "所有核心模块的单元测试" | testing | 已是测试任务 |
|
|
249
|
+
| "API 文档编写" | documentation | 文档类 |
|
|
250
|
+
| "CI/CD 流水线配置" | other | 配置类 |
|
|
251
|
+
|
|
237
252
|
### Step 7: 写入 tasks-input.json
|
|
238
253
|
|
|
239
254
|
用 Write 工具写入 `.openmatrix/tasks-input.json`:
|
|
@@ -243,6 +258,7 @@ AskUserQuestion({
|
|
|
243
258
|
"title": "任务标题",
|
|
244
259
|
"description": "整体描述",
|
|
245
260
|
"goals": ["目标1", "目标2", "目标3"],
|
|
261
|
+
"goalTypes": ["development", "testing", "documentation"],
|
|
246
262
|
"constraints": ["约束1"],
|
|
247
263
|
"deliverables": ["src/xxx.ts"],
|
|
248
264
|
"plan": "## 技术方案\n1. ...\n2. ..."
|
|
@@ -250,6 +266,7 @@ AskUserQuestion({
|
|
|
250
266
|
```
|
|
251
267
|
|
|
252
268
|
> **注意**: `quality`、`mode`、`e2eTests` 不写入文件,由 Step 8 的 CLI 参数传递。
|
|
269
|
+
> **goalTypes** 必须与 goals 数组长度一致,一一对应。
|
|
253
270
|
|
|
254
271
|
### Step 8: 调用 CLI 创建任务 ⚠️ 不可跳过
|
|
255
272
|
|