openmatrix 0.2.12 → 0.2.13

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.
@@ -43,6 +43,7 @@ const approval_manager_js_1 = require("../../orchestrator/approval-manager.js");
43
43
  const executor_js_1 = require("../../orchestrator/executor.js");
44
44
  const gitignore_js_1 = require("../../utils/gitignore.js");
45
45
  const index_js_1 = require("../../types/index.js");
46
+ const logger_js_1 = require("../../utils/logger.js");
46
47
  const fs = __importStar(require("fs/promises"));
47
48
  const path = __importStar(require("path"));
48
49
  exports.autoCommand = new commander_1.Command('auto')
@@ -65,16 +66,16 @@ exports.autoCommand = new commander_1.Command('auto')
65
66
  // 检查是否已有运行中的任务
66
67
  if (state.status === 'running') {
67
68
  if (options.json) {
68
- console.log(JSON.stringify({
69
+ logger_js_1.logger.info(JSON.stringify({
69
70
  status: 'error',
70
71
  message: '已有任务在执行中',
71
72
  hint: '使用 /om:status 查看状态,或 /om:resume 恢复执行'
72
73
  }));
73
74
  }
74
75
  else {
75
- console.log('⚠️ 已有任务在执行中');
76
- console.log(' 使用 /om:status 查看状态');
77
- console.log(' 使用 /om:resume 恢复执行');
76
+ logger_js_1.logger.info('已有任务在执行中');
77
+ logger_js_1.logger.info(' 使用 /om:status 查看状态');
78
+ logger_js_1.logger.info(' 使用 /om:resume 恢复执行');
78
79
  }
79
80
  return;
80
81
  }
@@ -82,15 +83,15 @@ exports.autoCommand = new commander_1.Command('auto')
82
83
  const qualityLevel = options.quality;
83
84
  if (!['strict', 'balanced', 'fast'].includes(qualityLevel)) {
84
85
  if (options.json) {
85
- console.log(JSON.stringify({
86
+ logger_js_1.logger.info(JSON.stringify({
86
87
  status: 'error',
87
88
  message: `无效的质量级别: ${qualityLevel}`,
88
89
  hint: '可选值: strict, balanced, fast'
89
90
  }));
90
91
  }
91
92
  else {
92
- console.log(`❌ 无效的质量级别: ${qualityLevel}`);
93
- console.log(' 可选值: strict, balanced, fast');
93
+ logger_js_1.logger.info(`无效的质量级别: ${qualityLevel}`);
94
+ logger_js_1.logger.info(' 可选值: strict, balanced, fast');
94
95
  }
95
96
  return;
96
97
  }
@@ -102,20 +103,20 @@ exports.autoCommand = new commander_1.Command('auto')
102
103
  try {
103
104
  taskContent = await fs.readFile(defaultPath, 'utf-8');
104
105
  if (!options.json) {
105
- console.log(`📄 读取任务文件: ${defaultPath}`);
106
+ logger_js_1.logger.info(`读取任务文件: ${defaultPath}`);
106
107
  }
107
108
  }
108
109
  catch {
109
110
  if (options.json) {
110
- console.log(JSON.stringify({
111
+ logger_js_1.logger.info(JSON.stringify({
111
112
  status: 'error',
112
113
  message: '请提供任务文件路径或描述'
113
114
  }));
114
115
  }
115
116
  else {
116
- console.log('请提供任务文件路径或描述');
117
- console.log(' 用法: openmatrix auto <task.md>');
118
- console.log(' 或创建 TASK.md 文件');
117
+ logger_js_1.logger.info('请提供任务文件路径或描述');
118
+ logger_js_1.logger.info(' 用法: openmatrix auto <task.md>');
119
+ logger_js_1.logger.info(' 或创建 TASK.md 文件');
119
120
  }
120
121
  return;
121
122
  }
@@ -125,37 +126,37 @@ exports.autoCommand = new commander_1.Command('auto')
125
126
  try {
126
127
  taskContent = await fs.readFile(taskContent, 'utf-8');
127
128
  if (!options.json) {
128
- console.log(`📄 读取任务文件: ${input}`);
129
+ logger_js_1.logger.info(`读取任务文件: ${input}`);
129
130
  }
130
131
  }
131
132
  catch {
132
133
  if (options.json) {
133
- console.log(JSON.stringify({
134
+ logger_js_1.logger.info(JSON.stringify({
134
135
  status: 'error',
135
136
  message: `无法读取文件: ${input}`
136
137
  }));
137
138
  }
138
139
  else {
139
- console.log(`❌ 无法读取文件: ${input}`);
140
+ logger_js_1.logger.info(`无法读取文件: ${input}`);
140
141
  }
141
142
  return;
142
143
  }
143
144
  }
144
145
  // 解析任务
145
146
  if (!options.json) {
146
- console.log('\n🔍 解析任务...');
147
+ logger_js_1.logger.info('解析任务...');
147
148
  }
148
149
  const parser = new task_parser_js_1.TaskParser();
149
150
  const parsedTask = parser.parse(taskContent);
150
151
  if (!options.json) {
151
- console.log(`\n📋 任务: ${parsedTask.title}`);
152
- console.log(` 目标: ${parsedTask.goals.join(', ')}`);
152
+ logger_js_1.logger.info(`任务: ${parsedTask.title}`);
153
+ logger_js_1.logger.info(` 目标: ${parsedTask.goals.join(', ')}`);
153
154
  }
154
155
  // 获取质量配置(在 breakdown 之前,因为需要传入)
155
156
  const qualityConfig = index_js_1.QUALITY_PRESETS[qualityLevel];
156
157
  // 拆解任务
157
158
  if (!options.json) {
158
- console.log('\n🔧 拆解任务...');
159
+ logger_js_1.logger.info('拆解任务...');
159
160
  }
160
161
  const planner = new task_planner_js_1.TaskPlanner();
161
162
  const subTasks = planner.breakdown(parsedTask, {}, qualityConfig);
@@ -212,7 +213,7 @@ exports.autoCommand = new commander_1.Command('auto')
212
213
  const result = await executor.step();
213
214
  if (options.json) {
214
215
  // JSON 输出供 Skill 解析
215
- console.log(JSON.stringify({
216
+ logger_js_1.logger.info(JSON.stringify({
216
217
  status: result.status,
217
218
  message: result.message,
218
219
  mode: 'auto',
@@ -231,14 +232,14 @@ exports.autoCommand = new commander_1.Command('auto')
231
232
  }));
232
233
  }
233
234
  else {
234
- console.log(`\n📋 生成 ${subTasks.length} 个子任务:\n`);
235
+ logger_js_1.logger.info(`生成 ${subTasks.length} 个子任务:`);
235
236
  subTasks.forEach((task, i) => {
236
- console.log(` ${i + 1}. ${task.title} (${task.priority})`);
237
+ logger_js_1.logger.info(` ${i + 1}. ${task.title} (${task.priority})`);
237
238
  });
238
- console.log(`\n🚀 全自动执行模式`);
239
- console.log(` 质量级别: ${qualityLevel}`);
240
- console.log(` 审批点: 无 (bypass permissions)`);
241
- console.log('\n⏳ 开始执行...');
242
- console.log(' 使用 /om:status 查看进度');
239
+ logger_js_1.logger.info(`全自动执行模式`);
240
+ logger_js_1.logger.info(` 质量级别: ${qualityLevel}`);
241
+ logger_js_1.logger.info(` 审批点: 无 (bypass permissions)`);
242
+ logger_js_1.logger.info('开始执行...');
243
+ logger_js_1.logger.info(' 使用 /om:status 查看进度');
243
244
  }
244
245
  });
@@ -56,6 +56,7 @@ const smart_question_analyzer_js_1 = require("../../orchestrator/smart-question-
56
56
  const interactive_question_generator_js_1 = require("../../orchestrator/interactive-question-generator.js");
57
57
  const task_parser_js_1 = require("../../orchestrator/task-parser.js");
58
58
  const answer_mapper_js_1 = require("../../orchestrator/answer-mapper.js");
59
+ const logger_js_1 = require("../../utils/logger.js");
59
60
  const fs = __importStar(require("fs/promises"));
60
61
  const path = __importStar(require("path"));
61
62
  exports.brainstormCommand = new commander_1.Command('brainstorm')
@@ -125,7 +126,7 @@ function mergeSessionResults(session, resultsJson) {
125
126
  */
126
127
  function outputCompleteResult(session, jsonMode) {
127
128
  if (jsonMode) {
128
- console.log(JSON.stringify({
129
+ logger_js_1.logger.info(JSON.stringify({
129
130
  status: 'ready_to_start',
130
131
  message: '头脑风暴完成,准备执行任务',
131
132
  taskInput: session.taskInput,
@@ -137,17 +138,17 @@ function outputCompleteResult(session, jsonMode) {
137
138
  }));
138
139
  }
139
140
  else {
140
- console.log('头脑风暴完成!');
141
- console.log(` 任务: ${session.taskTitle}`);
142
- console.log('\n📋 收集的洞察:');
141
+ logger_js_1.logger.info('头脑风暴完成!');
142
+ logger_js_1.logger.info(` 任务: ${session.taskTitle}`);
143
+ logger_js_1.logger.info('收集的洞察:');
143
144
  session.insights.forEach((insight, i) => {
144
- console.log(` ${i + 1}. ${insight}`);
145
+ logger_js_1.logger.info(` ${i + 1}. ${insight}`);
145
146
  });
146
- console.log('\n📝 设计要点:');
147
+ logger_js_1.logger.info('设计要点:');
147
148
  session.designNotes.forEach((note, i) => {
148
- console.log(` ${i + 1}. ${note}`);
149
+ logger_js_1.logger.info(` ${i + 1}. ${note}`);
149
150
  });
150
- console.log('\n🚀 使用 /om:start 开始执行任务');
151
+ logger_js_1.logger.info('使用 /om:start 开始执行任务');
151
152
  }
152
153
  }
153
154
  /**
@@ -155,14 +156,14 @@ function outputCompleteResult(session, jsonMode) {
155
156
  */
156
157
  function outputSessionNotFound(jsonMode) {
157
158
  if (jsonMode) {
158
- console.log(JSON.stringify({
159
+ logger_js_1.logger.info(JSON.stringify({
159
160
  status: 'error',
160
161
  message: '没有进行中的头脑风暴会话'
161
162
  }));
162
163
  }
163
164
  else {
164
- console.log('没有进行中的头脑风暴会话');
165
- console.log(' 使用 openmatrix brainstorm <task> 开始新的头脑风暴');
165
+ logger_js_1.logger.info('没有进行中的头脑风暴会话');
166
+ logger_js_1.logger.info(' 使用 openmatrix brainstorm <task> 开始新的头脑风暴');
166
167
  }
167
168
  }
168
169
  /**
@@ -186,18 +187,18 @@ async function loadTaskFromDefaultFile(basePath, jsonMode) {
186
187
  try {
187
188
  const content = await fs.readFile(defaultPath, 'utf-8');
188
189
  if (!jsonMode) {
189
- console.log(`📄 读取任务文件: ${defaultPath}`);
190
+ logger_js_1.logger.info(`读取任务文件: ${defaultPath}`);
190
191
  }
191
192
  return content;
192
193
  }
193
194
  catch {
194
195
  if (jsonMode) {
195
- console.log(JSON.stringify({ status: 'error', message: '请提供任务文件路径或描述' }));
196
+ logger_js_1.logger.info(JSON.stringify({ status: 'error', message: '请提供任务文件路径或描述' }));
196
197
  }
197
198
  else {
198
- console.log('请提供任务文件路径或描述');
199
- console.log(' 用法: openmatrix brainstorm <task.md>');
200
- console.log(' 或创建 TASK.md 文件');
199
+ logger_js_1.logger.info('请提供任务文件路径或描述');
200
+ logger_js_1.logger.info(' 用法: openmatrix brainstorm <task.md>');
201
+ logger_js_1.logger.info(' 或创建 TASK.md 文件');
201
202
  }
202
203
  return null;
203
204
  }
@@ -209,16 +210,16 @@ async function loadTaskFromSpecifiedFile(filePath, displayName, jsonMode) {
209
210
  try {
210
211
  const content = await fs.readFile(filePath, 'utf-8');
211
212
  if (!jsonMode) {
212
- console.log(`📄 读取任务文件: ${displayName}`);
213
+ logger_js_1.logger.info(`读取任务文件: ${displayName}`);
213
214
  }
214
215
  return content;
215
216
  }
216
217
  catch {
217
218
  if (jsonMode) {
218
- console.log(JSON.stringify({ status: 'error', message: `无法读取文件: ${displayName}` }));
219
+ logger_js_1.logger.info(JSON.stringify({ status: 'error', message: `无法读取文件: ${displayName}` }));
219
220
  }
220
221
  else {
221
- console.log(`❌ 无法读取文件: ${displayName}`);
222
+ logger_js_1.logger.info(`无法读取文件: ${displayName}`);
222
223
  }
223
224
  return null;
224
225
  }
@@ -288,23 +289,23 @@ function outputNewSessionJson(taskTitle, questions, domainDetection) {
288
289
  output.suggestResearch = domainDetection.domain;
289
290
  output.researchHint = `检测到垂直领域「${domainDetection.domain}」,建议先进行领域调研`;
290
291
  }
291
- console.log(JSON.stringify(output));
292
+ logger_js_1.logger.info(JSON.stringify(output));
292
293
  }
293
294
  /**
294
295
  * 文本模式输出新会话信息
295
296
  */
296
297
  function outputNewSessionText(taskTitle, questions, domainDetection) {
297
- console.log('\n🧠 开始头脑风暴...\n');
298
- console.log(`📋 任务: ${taskTitle}\n`);
298
+ logger_js_1.logger.info('开始头脑风暴...');
299
+ logger_js_1.logger.info(`任务: ${taskTitle}`);
299
300
  if (domainDetection.isVertical) {
300
- console.log(`🔍 检测到垂直领域: ${domainDetection.domain}`);
301
- console.log(' 建议使用 /om:research 进行领域调研\n');
301
+ logger_js_1.logger.info(`检测到垂直领域: ${domainDetection.domain}`);
302
+ logger_js_1.logger.info(' 建议使用 /om:research 进行领域调研');
302
303
  }
303
- console.log('需要探索以下问题:');
304
+ logger_js_1.logger.info('需要探索以下问题:');
304
305
  questions.forEach((q, i) => {
305
- console.log(` ${i + 1}. ${q.question}`);
306
+ logger_js_1.logger.info(` ${i + 1}. ${q.question}`);
306
307
  });
307
- console.log('\n💡 使用 /om:brainstorm 技能进行交互式问答');
308
+ logger_js_1.logger.info('使用 /om:brainstorm 技能进行交互式问答');
308
309
  }
309
310
  /**
310
311
  * 检测是否可能需要领域调研
@@ -516,7 +517,7 @@ async function generateSmartQuestions(taskContent, basePath) {
516
517
  return questions;
517
518
  }
518
519
  catch (error) {
519
- console.error(`⚠️ 智能问题生成失败,使用静态问题: ${error instanceof Error ? error.message : error}`);
520
+ logger_js_1.logger.warn(`智能问题生成失败,使用静态问题: ${error instanceof Error ? error.message : error}`);
520
521
  return generateBrainstormQuestions(taskContent, '');
521
522
  }
522
523
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmatrix",
3
- "version": "0.2.12",
3
+ "version": "0.2.13",
4
4
  "description": "AI Agent task orchestration system with Claude Code Skills integration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/skills/start.md CHANGED
@@ -9,7 +9,7 @@ description: "Use when starting a new development task cycle with interactive qu
9
9
  - ❌ superpowers:* 等 superpowers 相关技能
10
10
  - ❌ 任何其他任务编排相关的 Agent 或工具
11
11
 
12
- **Step 10 只能使用 Agent 工具** — 直接调用 Agent,不通过任何中间层。
12
+ **Step 11 只能使用 Agent 工具** — 直接调用 Agent,不通过任何中间层。
13
13
 
14
14
  违规调用将导致执行失败。
15
15
 
@@ -23,30 +23,30 @@ description: "Use when starting a new development task cycle with interactive qu
23
23
  Step 1: 初始化 .openmatrix 目录
24
24
  Step 2: 解析任务输入(文件或描述)
25
25
  Step 3: 智能分析任务类型(开发/非开发)
26
- Step 3.5: 提交文档(git add docs/ + 所有 .md 文件, commit)
27
- Step 4: 必选问题(开发任务:质量+E2E+模式; 非开发:仅模式)← 不可跳过
28
- Step 5: 可选问题(仅复杂开发任务)+ 展示执行计划
29
- Step 6: AI 提取 goals,生成 plan
30
- Step 7: 写入 .openmatrix/tasks-input.json ← 必须完成
31
- Step 8: 调用 openmatrix start --tasks-json ← 必须完成,不可跳过
32
- Step 9: 从 CLI 返回结果中读取 subagentTasks 列表 ← 必须完成
33
- Step 10: 逐个执行 subagentTasks(调用 Agent 工具) ← 只有这步才能写代码
26
+ Step 4: 提交文档(git add docs/ + 所有 .md 文件, commit)
27
+ Step 5: 必选问题(开发任务:质量+E2E+模式; 非开发:仅模式)← 不可跳过
28
+ Step 6: 可选问题(仅复杂开发任务)+ 展示执行计划
29
+ Step 7: AI 提取 goals,生成 plan
30
+ Step 8: 写入 .openmatrix/tasks-input.json ← 必须完成
31
+ Step 9: 调用 openmatrix start --tasks-json ← 必须完成,不可跳过
32
+ Step 10: 从 CLI 返回结果中读取 subagentTasks 列表 ← 必须完成
33
+ Step 11: 逐个执行 subagentTasks(调用 Agent 工具) ← 只有这步才能写代码
34
34
  ```
35
35
 
36
36
  **违反以下任一规则将导致任务执行失败:**
37
37
 
38
- ❌ **禁止在 Step 8 之前写任何业务代码** — 所有代码必须在 Step 10 通过 Agent 执行
39
- ❌ **禁止跳过 Step 4 必选问题** — 开发任务必须选质量/E2E/模式,非开发任务必须选模式
40
- ❌ **禁止跳过 Step 8** — 必须调用 CLI,不能用其他方式代替
38
+ ❌ **禁止在 Step 9 之前写任何业务代码** — 所有代码必须在 Step 11 通过 Agent 执行
39
+ ❌ **禁止跳过 Step 5 必选问题** — 开发任务必须选质量/E2E/模式,非开发任务必须选模式
40
+ ❌ **禁止跳过 Step 9** — 必须调用 CLI,不能用其他方式代替
41
41
  ❌ **禁止自行规划 Phase** — 任务由 CLI 的 TaskPlanner 拆分,AI 只提取 goals
42
- ❌ **禁止用 Bash/npm/write 直接写业务代码** — 业务代码只能通过 Step 10 的 Agent 执行
42
+ ❌ **禁止用 Bash/npm/write 直接写业务代码** — 业务代码只能通过 Step 11 的 Agent 执行
43
43
  ❌ **禁止调用 gsd-executor 或其他编排技能** — 必须用原生 Agent 工具
44
44
  </MANDATORY-EXECUTION-ORDER>
45
45
 
46
46
  <objective>
47
47
  解析任务文档,通过必选问答确定执行模式(开发任务还需确定质量等级、E2E测试),确认后通过 CLI 拆分任务并执行。
48
48
 
49
- ⚠️ **Step 4 必选问题不可跳过** — 开发任务必须选择:
49
+ ⚠️ **Step 5 必选问题不可跳过** — 开发任务必须选择:
50
50
  1. 质量等级 (strict/balanced/fast)
51
51
  2. E2E 测试 (当选择 strict/balanced 时)
52
52
  3. 执行模式 (全自动/关键节点确认/每阶段确认)
@@ -103,11 +103,11 @@ git init
103
103
 
104
104
  | 情况 | 处理方式 |
105
105
  |------|---------|
106
- | 已存在(来自 `/om:brainstorm`) | 读取文件内容 → **立即执行 Step 4 必选问题**(质量等级、E2E、执行模式) |
107
- | 不存在,但 `.openmatrix/research/context.json` 存在 | 读取研究上下文 → 提取 goals/constraints/deliverables → **执行 Step 4 必选问题** |
106
+ | 已存在(来自 `/om:brainstorm`) | 读取文件内容 → **立即执行 Step 5 必选问题**(质量等级、E2E、执行模式) |
107
+ | 不存在,但 `.openmatrix/research/context.json` 存在 | 读取研究上下文 → 提取 goals/constraints/deliverables → **执行 Step 5 必选问题** |
108
108
  | 均不存在 | 根据用户输入解析 |
109
109
 
110
- > ⚠️ **注意**: 即使 `tasks-input.json` 已存在,Step 4 必选问题仍然必须执行!
110
+ > ⚠️ **注意**: 即使 `tasks-input.json` 已存在,Step 5 必选问题仍然必须执行!
111
111
  > - 开发任务:质量等级、E2E、执行模式必须由用户选择
112
112
  > - 非开发任务:执行模式必须由用户选择
113
113
  - `$ARGUMENTS` 为任务描述 → 直接使用
@@ -123,15 +123,15 @@ cat .openmatrix/research/context.json 2>/dev/null || echo "NO_RESEARCH"
123
123
  1. 读取 `.openmatrix/research/context.json`,提取 `topic`、`domain`、`goals`、`constraints`、`deliverables`、`reportPath`
124
124
  2. 读取 `RESEARCH.md` 内容作为领域知识
125
125
  3. 告知用户:"🔬 检测到「${domain}」领域研究结果,将作为任务基础"
126
- 4. 在 Step 6 中,AI 只需**确认/补充** goals,而非从头提取
127
- 5. Step 7 写入 `tasks-input.json` 时,将研究 goals 与 AI 补充的 goals 合并
128
- 6. Step 8 的 CLI 调用必须增加 `--research-context @.openmatrix/research/context.json` 参数
126
+ 4. 在 Step 7 中,AI 只需**确认/补充** goals,而非从头提取
127
+ 5. Step 8 写入 `tasks-input.json` 时,将研究 goals 与 AI 补充的 goals 合并
128
+ 6. Step 9 的 CLI 调用必须增加 `--research-context @.openmatrix/research/context.json` 参数
129
129
 
130
130
  ### Step 3: 智能分析任务类型
131
131
 
132
- 判断是开发任务还是非开发任务,这决定 Step 4 需要问哪些问题。
132
+ 判断是开发任务还是非开发任务,这决定 Step 5 需要问哪些问题。
133
133
 
134
- | 任务类型 | 定义 | Step 4 问题 |
134
+ | 任务类型 | 定义 | Step 5 问题 |
135
135
  |---------|------|------------|
136
136
  | **开发任务** | 涉及代码编写、测试、Lint、构建等 | 质量等级 + E2E + 执行模式 |
137
137
  | **非开发任务** | 纯文档、配置、阅读、分析等 | 仅执行模式 |
@@ -142,7 +142,7 @@ cat .openmatrix/research/context.json 2>/dev/null || echo "NO_RESEARCH"
142
142
 
143
143
  ---
144
144
 
145
- ### Step 3.5: 提交文档(必须执行,不可跳过)
145
+ ### Step 4: 提交文档(必须执行,不可跳过)
146
146
 
147
147
  在开始任何新任务之前,先提交所有已变更的文档文件,确保文档和代码同步提交。
148
148
 
@@ -177,7 +177,7 @@ EOF
177
177
 
178
178
  ---
179
179
 
180
- ### Step 4: 必选问题(不可跳过,不可使用默认值,必须通过 AskUserQuestion 让用户选择)
180
+ ### Step 5: 必选问题(不可跳过,不可使用默认值,必须通过 AskUserQuestion 让用户选择)
181
181
 
182
182
  根据 `goalTypes` 字段判断需要询问哪些问题:
183
183
 
@@ -226,7 +226,7 @@ AskUserQuestion: `header: "执行模式"`, `multiSelect: false`
226
226
  | `关键节点确认` | plan/merge/deploy 时暂停确认 |
227
227
  | `每阶段确认` | 每个阶段(develop/verify/accept)完成后暂停 |
228
228
 
229
- ### Step 5: 可选问题(仅复杂任务)
229
+ ### Step 6: 可选问题(仅复杂任务)
230
230
 
231
231
  根据任务类型,可能需要额外询问:
232
232
 
@@ -247,7 +247,7 @@ AskUserQuestion: `header: "执行模式"`, `multiSelect: false`
247
247
  E2E 测试: 功能测试 / 视觉验证 / 不启用
248
248
  ```
249
249
 
250
- ### Step 6: AI 提取 goals + 生成 plan
250
+ ### Step 7: AI 提取 goals + 生成 plan
251
251
 
252
252
  从任务描述中提取:
253
253
  - **goals**: 至少 3-8 个明确功能目标,每个是独立可交付模块
@@ -304,7 +304,7 @@ plan 中必须包含以下结构之一,系统将据此拆分为模块级任务
304
304
  | "API 文档编写" | documentation | 文档类 |
305
305
  | "CI/CD 流水线配置" | other | 配置类 |
306
306
 
307
- ### Step 7: 写入 tasks-input.json
307
+ ### Step 8: 写入 tasks-input.json
308
308
 
309
309
  用 Write 工具写入 `.openmatrix/tasks-input.json`:
310
310
 
@@ -326,7 +326,7 @@ plan 中必须包含以下结构之一,系统将据此拆分为模块级任务
326
326
  > **goalTypes** 必须与 goals 数组长度一致,一一对应。
327
327
  > **研究上下文集成**: 如果检测到 `.openmatrix/research/context.json`,将研究的 goals/constraints/deliverables 作为基础,与 AI 提取的内容合并(去重后)。
328
328
 
329
- ### Step 8: 调用 CLI 创建任务 ⚠️ 不可跳过
329
+ ### Step 9: 调用 CLI 创建任务 ⚠️ 不可跳过
330
330
 
331
331
  **根据任务类型选择正确的 CLI 调用:**
332
332
 
@@ -357,13 +357,13 @@ openmatrix start --tasks-json @.openmatrix/tasks-input.json --mode <执行模式
357
357
 
358
358
  此命令返回 JSON 包含 `subagentTasks` 列表。
359
359
 
360
- ### Step 9: 读取 subagentTasks
360
+ ### Step 10: 读取 subagentTasks
361
361
 
362
362
  CLI 返回 JSON 中 `subagentTasks` 数组包含待执行任务。
363
363
 
364
364
  ## === 执行阶段(只有此阶段才能写业务代码)===
365
365
 
366
- ### Step 10: 逐个执行 subagentTasks(禁止中断)
366
+ ### Step 11: 逐个执行 subagentTasks(禁止中断)
367
367
 
368
368
  <LOOP-ENFORCEMENT>
369
369
  **此步骤是执行循环,必须执行完所有任务后才能停止。**
@@ -430,7 +430,7 @@ openmatrix step --json
430
430
  | status | 含义 | 后续操作 |
431
431
  |--------|------|---------|
432
432
  | `next` | 有下一个任务 | 继续执行返回的 `subagent` 配置 |
433
- | `done` | 所有任务完成 | 进入最终提交(Step 11) |
433
+ | `done` | 所有任务完成 | 进入最终提交(Step 12) |
434
434
  | `blocked` | 无可执行任务 | 检查是否有 Meeting,用 `/om:meeting` 处理 |
435
435
 
436
436
  **`next` 返回结构:**
@@ -593,9 +593,9 @@ $ARGUMENTS
593
593
  ## 执行流程
594
594
 
595
595
  ```
596
- Step 1-3: 初始化 + 解析输入 + 分析类型 → Step 3.5: 提交文档 → Step 4-5: 问答 + 确认 → Step 6: 提取 goals + plan → Step 7: 写入 tasks-input.json
597
- → Step 8: openmatrix start --tasks-json (必须) → Step 9: 读取 subagentTasks
598
- → Step 10: Agent 逐个执行 (只有这里写代码)
596
+ Step 1-3: 初始化 + 解析输入 + 分析类型 → Step 4: 提交文档 → Step 5-6: 问答 + 确认 → Step 7: 提取 goals + plan → Step 8: 写入 tasks-input.json
597
+ → Step 9: openmatrix start --tasks-json (必须) → Step 10: 读取 subagentTasks
598
+ → Step 11: Agent 逐个执行 (只有这里写代码)
599
599
  ```
600
600
 
601
601
  ## Git 提交格式