openmatrix 0.2.10 → 0.2.12
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.
- package/dist/orchestrator/phase-executor.js +59 -15
- package/package.json +1 -1
- package/skills/auto.md +22 -6
- package/skills/feature.md +10 -2
- package/skills/start.md +53 -6
|
@@ -251,11 +251,21 @@ ${task.acceptanceCriteria?.map((c, i) => `${i + 1}. ${c}`).join('\n') || '根据
|
|
|
251
251
|
## 验证
|
|
252
252
|
运行 \`npm test\` 确认测试失败 (这是正确的!)
|
|
253
253
|
|
|
254
|
-
## ⚠️ Git
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
254
|
+
## ⚠️ Git 操作禁止
|
|
255
|
+
|
|
256
|
+
**禁止执行以下 Git 命令**:
|
|
257
|
+
- ❌ \`git commit\` — 所有提交统一通过 \`openmatrix complete\` 执行
|
|
258
|
+
- ❌ \`git checkout\` — 不要切换分支
|
|
259
|
+
- ❌ \`git merge\` — 不要合并其他分支
|
|
260
|
+
- ❌ \`git pull\` — 不要拉取远程更新
|
|
261
|
+
- ❌ \`git push\` — 不要推送代码
|
|
262
|
+
- ❌ \`git rebase\` — 不要变基
|
|
263
|
+
- ❌ \`git branch\` — 不要创建/删除分支
|
|
264
|
+
|
|
265
|
+
**允许的 Git 命令**:
|
|
266
|
+
- ✅ \`git status\` — 查看状态
|
|
267
|
+
- ✅ \`git diff\` — 查看差异
|
|
268
|
+
- ✅ \`git log\` — 查看历史
|
|
259
269
|
|
|
260
270
|
## 输出格式
|
|
261
271
|
\`\`\`
|
|
@@ -386,16 +396,23 @@ ${task.acceptanceCriteria.map((c, i) => `${i + 1}. [ ] ${c}`).join('\n')}`);
|
|
|
386
396
|
- [ ] 验收标准全部满足
|
|
387
397
|
${isTDDMode ? '- [ ] 所有测试通过 (GREEN)' : ''}
|
|
388
398
|
|
|
389
|
-
## ⚠️ Git
|
|
399
|
+
## ⚠️ Git 操作禁止
|
|
390
400
|
|
|
391
|
-
|
|
401
|
+
**禁止执行以下 Git 命令**:
|
|
402
|
+
- ❌ \`git commit\` — 所有提交统一通过 \`openmatrix complete\` 执行
|
|
403
|
+
- ❌ \`git checkout\` — 不要切换分支
|
|
404
|
+
- ❌ \`git merge\` — 不要合并其他分支
|
|
405
|
+
- ❌ \`git pull\` — 不要拉取远程更新
|
|
406
|
+
- ❌ \`git push\` — 不要推送代码
|
|
407
|
+
- ❌ \`git rebase\` — 不要变基
|
|
408
|
+
- ❌ \`git branch\` — 不要创建/删除分支
|
|
392
409
|
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
410
|
+
**允许的 Git 命令**:
|
|
411
|
+
- ✅ \`git status\` — 查看状态
|
|
412
|
+
- ✅ \`git diff\` — 查看差异
|
|
413
|
+
- ✅ \`git log\` — 查看历史
|
|
397
414
|
|
|
398
|
-
|
|
415
|
+
如果代码变更已完成,只需返回结果摘要。
|
|
399
416
|
`);
|
|
400
417
|
return parts.join('\n');
|
|
401
418
|
}
|
|
@@ -676,7 +693,21 @@ Fix Required:
|
|
|
676
693
|
- **不要伪造通过结果**
|
|
677
694
|
- 如果项目没有某个脚本,标记为 "⏭️ Skipped" 而非 "❌ Failed"
|
|
678
695
|
- 所有检查结果必须基于实际命令输出
|
|
679
|
-
|
|
696
|
+
## ⚠️ Git 操作禁止
|
|
697
|
+
|
|
698
|
+
**禁止执行以下 Git 命令**:
|
|
699
|
+
- ❌ \`git commit\` — 所有提交统一通过 \`openmatrix complete\` 执行
|
|
700
|
+
- ❌ \`git checkout\` — 不要切换分支
|
|
701
|
+
- ❌ \`git merge\` — 不要合并其他分支
|
|
702
|
+
- ❌ \`git pull\` — 不要拉取远程更新
|
|
703
|
+
- ❌ \`git push\` — 不要推送代码
|
|
704
|
+
- ❌ \`git rebase\` — 不要变基
|
|
705
|
+
- ❌ \`git branch\` — 不要创建/删除分支
|
|
706
|
+
|
|
707
|
+
**允许的 Git 命令**:
|
|
708
|
+
- ✅ \`git status\` — 查看状态
|
|
709
|
+
- ✅ \`git diff\` — 查看差异
|
|
710
|
+
- ✅ \`git log\` — 查看历史
|
|
680
711
|
|
|
681
712
|
## 🔧 配置检查 (可选但推荐)
|
|
682
713
|
检查以下常见配置问题:
|
|
@@ -811,8 +842,21 @@ ACCEPT_FAILED
|
|
|
811
842
|
1. [原因]
|
|
812
843
|
\`\`\`
|
|
813
844
|
|
|
814
|
-
## ⚠️ Git
|
|
815
|
-
|
|
845
|
+
## ⚠️ Git 操作禁止
|
|
846
|
+
|
|
847
|
+
**禁止执行以下 Git 命令**:
|
|
848
|
+
- ❌ \`git commit\` — 所有提交统一通过 \`openmatrix complete\` 执行
|
|
849
|
+
- ❌ \`git checkout\` — 不要切换分支
|
|
850
|
+
- ❌ \`git merge\` — 不要合并其他分支
|
|
851
|
+
- ❌ \`git pull\` — 不要拉取远程更新
|
|
852
|
+
- ❌ \`git push\` — 不要推送代码
|
|
853
|
+
- ❌ \`git rebase\` — 不要变基
|
|
854
|
+
- ❌ \`git branch\` — 不要创建/删除分支
|
|
855
|
+
|
|
856
|
+
**允许的 Git 命令**:
|
|
857
|
+
- ✅ \`git status\` — 查看状态
|
|
858
|
+
- ✅ \`git diff\` — 查看差异
|
|
859
|
+
- ✅ \`git log\` — 查看历史
|
|
816
860
|
`);
|
|
817
861
|
return parts.join('\n');
|
|
818
862
|
}
|
package/package.json
CHANGED
package/skills/auto.md
CHANGED
|
@@ -173,7 +173,7 @@ openmatrix step --json # 获取下一个任务 + 检查是
|
|
|
173
173
|
Agent({
|
|
174
174
|
subagent_type: task.subagent_type,
|
|
175
175
|
description: task.description,
|
|
176
|
-
prompt: task.prompt + "\n\n⚠️ 完成后请输出简短摘要(不超过3行):\n1. 关键决策\n2. 创建/修改的文件\n3. 对后续任务的建议\n\n🚫
|
|
176
|
+
prompt: task.prompt + "\n\n⚠️ 完成后请输出简短摘要(不超过3行):\n1. 关键决策\n2. 创建/修改的文件\n3. 对后续任务的建议\n\n🚫 **禁止执行以下 Git 命令**:\n- ❌ git commit — 所有提交统一通过 openmatrix complete 执行\n- ❌ git checkout — 不要切换分支\n- ❌ git merge — 不要合并其他分支\n- ❌ git pull — 不要拉取远程更新\n- ❌ git push — 不要推送代码\n- ❌ git rebase — 不要变基\n- ❌ git branch — 不要创建/删除分支\n\n✅ 允许:git status, git diff, git log",
|
|
177
177
|
isolation: task.isolation,
|
|
178
178
|
run_in_background: true
|
|
179
179
|
})
|
|
@@ -183,7 +183,7 @@ Agent({
|
|
|
183
183
|
>
|
|
184
184
|
> **上下文节省**: 使用 `run_in_background: true` 后台执行,Agent 完成后仅返回简短摘要,大幅节省主会话上下文。
|
|
185
185
|
>
|
|
186
|
-
> 🚫 **Agent 内部禁止 git commit
|
|
186
|
+
> 🚫 **Agent 内部禁止 Git 操作** — 禁止执行:git commit, git checkout, git merge, git pull, git push, git rebase, git branch。所有提交必须通过 `openmatrix complete` 执行。
|
|
187
187
|
|
|
188
188
|
每个 Agent 完成后:
|
|
189
189
|
1. **保存 Agent 上下文** — 将执行结果摘要写入 `.openmatrix/tasks/TASK-XXX/context.md`,格式如下:
|
|
@@ -209,13 +209,29 @@ Agent({
|
|
|
209
209
|
```bash
|
|
210
210
|
openmatrix complete TASK-XXX --success
|
|
211
211
|
```
|
|
212
|
-
|
|
212
|
+
|
|
213
|
+
3. **获取下一个任务(必须执行,防止上下文压缩丢失):**
|
|
213
214
|
```bash
|
|
214
215
|
openmatrix step --json
|
|
215
216
|
```
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
|
|
218
|
+
**返回值解析:**
|
|
219
|
+
|
|
220
|
+
| status | 含义 | 后续操作 |
|
|
221
|
+
|--------|------|---------|
|
|
222
|
+
| `next` | 有下一个任务 | 继续执行返回的 `subagent` 配置 |
|
|
223
|
+
| `done` | 所有任务完成 | 进入最终提交 |
|
|
224
|
+
| `blocked` | 无可执行任务 | `/om:auto` 直接跳过,继续执行其他任务 |
|
|
225
|
+
|
|
226
|
+
**`next` 返回结构:**
|
|
227
|
+
```json
|
|
228
|
+
{
|
|
229
|
+
"status": "next",
|
|
230
|
+
"task": { "id": "TASK-XXX", "title": "...", "status": "in_progress" },
|
|
231
|
+
"subagent": { "subagent_type": "...", "description": "...", "prompt": "...", "timeout": 120000 },
|
|
232
|
+
"statistics": { "total": 5, "completed": 2, "remaining": 3, "failed": 0 }
|
|
233
|
+
}
|
|
234
|
+
```
|
|
219
235
|
|
|
220
236
|
**Meeting 处理机制:**
|
|
221
237
|
`/om:auto` 不创建 Meeting 记录,直接跳过阻塞任务,无障碍执行。
|
package/skills/feature.md
CHANGED
|
@@ -249,8 +249,16 @@ ${quality === 'strict' ? `
|
|
|
249
249
|
|
|
250
250
|
## 禁止行为
|
|
251
251
|
❌ 执行 git commit(由主流程处理)
|
|
252
|
+
❌ 执行 git checkout — 不要切换分支
|
|
253
|
+
❌ 执行 git merge — 不要合并其他分支
|
|
254
|
+
❌ 执行 git pull — 不要拉取远程更新
|
|
255
|
+
❌ 执行 git push — 不要推送代码
|
|
256
|
+
❌ 执行 git rebase — 不要变基
|
|
257
|
+
❌ 执行 git branch — 不要创建/删除分支
|
|
252
258
|
❌ 修改与当前任务无关的文件
|
|
253
|
-
❌
|
|
259
|
+
❌ 进行额外的重构
|
|
260
|
+
|
|
261
|
+
✅ 允许:git status, git diff, git log`,
|
|
254
262
|
run_in_background: true
|
|
255
263
|
})
|
|
256
264
|
```
|
|
@@ -375,7 +383,7 @@ $ARGUMENTS
|
|
|
375
383
|
- 验证失败不得继续执行,必须停止等待修复
|
|
376
384
|
- 不得跳过质量等级确认
|
|
377
385
|
- 不得跳过任务边界确认
|
|
378
|
-
- 不得在 Agent
|
|
386
|
+
- 不得在 Agent 内部执行任何 Git 操作(commit/checkout/merge/pull/push/rebase/branch)
|
|
379
387
|
|
|
380
388
|
## 红旗警告 - 停止并回归流程
|
|
381
389
|
|
package/skills/start.md
CHANGED
|
@@ -395,7 +395,7 @@ openmatrix step --json # 获取下一个任务 + 检查是
|
|
|
395
395
|
Agent({
|
|
396
396
|
subagent_type: task.subagent_type,
|
|
397
397
|
description: task.description,
|
|
398
|
-
prompt: task.prompt + "\n\n⚠️ 完成后请输出简短摘要(不超过3行):\n1. 关键决策\n2. 创建/修改的文件\n3. 对后续任务的建议\n\n🚫
|
|
398
|
+
prompt: task.prompt + "\n\n⚠️ 完成后请输出简短摘要(不超过3行):\n1. 关键决策\n2. 创建/修改的文件\n3. 对后续任务的建议\n\n🚫 **禁止执行以下 Git 命令**:\n- ❌ git commit — 所有提交统一通过 openmatrix complete 执行\n- ❌ git checkout — 不要切换分支\n- ❌ git merge — 不要合并其他分支\n- ❌ git pull — 不要拉取远程更新\n- ❌ git push — 不要推送代码\n- ❌ git rebase — 不要变基\n- ❌ git branch — 不要创建/删除分支\n\n✅ 允许:git status, git diff, git log",
|
|
399
399
|
isolation: task.isolation,
|
|
400
400
|
run_in_background: true
|
|
401
401
|
})
|
|
@@ -405,7 +405,7 @@ Agent({
|
|
|
405
405
|
>
|
|
406
406
|
> **上下文节省**: 使用 `run_in_background: true` 后台执行,Agent 完成后仅返回简短摘要,不返回完整输出,大幅节省主会话上下文。
|
|
407
407
|
>
|
|
408
|
-
> 🚫 **Agent 内部禁止 git commit
|
|
408
|
+
> 🚫 **Agent 内部禁止 Git 操作** — 禁止执行:git commit, git checkout, git merge, git pull, git push, git rebase, git branch。所有提交必须通过 `openmatrix complete` 执行。
|
|
409
409
|
|
|
410
410
|
每个 Agent 完成后(收到后台完成通知时):
|
|
411
411
|
1. **标记完成并更新统计(必须执行):**
|
|
@@ -419,13 +419,60 @@ openmatrix complete TASK-XXX --success --summary "关键决策: xxx; 创建文
|
|
|
419
419
|
- 后续 Agent 可读取此文件了解前序任务的决策和发现
|
|
420
420
|
|
|
421
421
|
3. Git 自动提交(必须使用下方统一提交格式)
|
|
422
|
-
|
|
422
|
+
|
|
423
|
+
4. **获取下一个任务(必须执行,防止上下文压缩丢失):**
|
|
423
424
|
```bash
|
|
424
425
|
openmatrix step --json
|
|
425
426
|
```
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
427
|
+
|
|
428
|
+
**返回值解析:**
|
|
429
|
+
|
|
430
|
+
| status | 含义 | 后续操作 |
|
|
431
|
+
|--------|------|---------|
|
|
432
|
+
| `next` | 有下一个任务 | 继续执行返回的 `subagent` 配置 |
|
|
433
|
+
| `done` | 所有任务完成 | 进入最终提交(Step 11) |
|
|
434
|
+
| `blocked` | 无可执行任务 | 检查是否有 Meeting,用 `/om:meeting` 处理 |
|
|
435
|
+
|
|
436
|
+
**`next` 返回结构:**
|
|
437
|
+
```json
|
|
438
|
+
{
|
|
439
|
+
"status": "next",
|
|
440
|
+
"task": {
|
|
441
|
+
"id": "TASK-XXX",
|
|
442
|
+
"title": "任务标题",
|
|
443
|
+
"status": "in_progress"
|
|
444
|
+
},
|
|
445
|
+
"subagent": {
|
|
446
|
+
"subagent_type": "general-purpose",
|
|
447
|
+
"description": "任务描述",
|
|
448
|
+
"prompt": "完整 prompt",
|
|
449
|
+
"isolation": "worktree",
|
|
450
|
+
"timeout": 120000
|
|
451
|
+
},
|
|
452
|
+
"statistics": {
|
|
453
|
+
"total": 5,
|
|
454
|
+
"completed": 2,
|
|
455
|
+
"remaining": 3,
|
|
456
|
+
"failed": 0
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
**使用返回值执行下一个 Agent:**
|
|
462
|
+
```typescript
|
|
463
|
+
// 从 step 返回的 subagent 对象直接用于 Agent 工具
|
|
464
|
+
const stepResult = JSON.parse(/* openmatrix step --json 输出 */);
|
|
465
|
+
if (stepResult.status === 'next') {
|
|
466
|
+
Agent({
|
|
467
|
+
subagent_type: stepResult.subagent.subagent_type,
|
|
468
|
+
description: stepResult.subagent.description,
|
|
469
|
+
prompt: stepResult.subagent.prompt + "\n\n⚠️ ...",
|
|
470
|
+
isolation: stepResult.subagent.isolation,
|
|
471
|
+
run_in_background: true
|
|
472
|
+
})
|
|
473
|
+
}
|
|
474
|
+
```
|
|
475
|
+
|
|
429
476
|
5. 检查审批点(auto 模式自动批准,其他模式按配置暂停)
|
|
430
477
|
|
|
431
478
|
6. **审批点处理(根据执行模式):**
|