openmatrix 0.2.3 → 0.2.5
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/cli/commands/complete.js +4 -2
- package/dist/orchestrator/executor.js +15 -3
- package/dist/orchestrator/git-commit-manager.js +24 -8
- package/dist/orchestrator/meeting-manager.d.ts +1 -27
- package/dist/orchestrator/meeting-manager.js +1 -0
- package/dist/orchestrator/retry-manager.d.ts +20 -1
- package/dist/orchestrator/retry-manager.js +52 -3
- package/dist/orchestrator/scheduler.d.ts +19 -0
- package/dist/orchestrator/scheduler.js +51 -1
- package/dist/orchestrator/task-planner.d.ts +20 -0
- package/dist/orchestrator/task-planner.js +195 -7
- package/dist/storage/file-store.d.ts +13 -0
- package/dist/storage/file-store.js +41 -4
- package/dist/storage/state-manager.d.ts +4 -4
- package/dist/storage/state-manager.js +8 -5
- package/dist/types/index.d.ts +20 -0
- package/dist/utils/error-handler.d.ts +46 -0
- package/dist/utils/error-handler.js +123 -0
- package/dist/utils/logger.d.ts +33 -0
- package/dist/utils/logger.js +110 -2
- package/package.json +6 -1
- package/skills/approve.md +1 -1
- package/skills/auto.md +20 -13
- package/skills/brainstorm.md +3 -1
- package/skills/meeting.md +19 -30
- package/skills/om.md +20 -29
- package/skills/openmatrix.md +17 -0
- package/skills/report.md +1 -1
- package/skills/research.md +3 -1
- package/skills/resume.md +1 -1
- package/skills/retry.md +1 -1
- package/skills/start.md +51 -12
- package/skills/status.md +1 -1
package/dist/utils/logger.js
CHANGED
|
@@ -37,9 +37,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.logger = void 0;
|
|
40
|
+
exports.persistLog = persistLog;
|
|
40
41
|
exports.createLogger = createLogger;
|
|
41
42
|
exports.getLogger = getLogger;
|
|
42
43
|
exports.setLogger = setLogger;
|
|
44
|
+
exports.initLoggerWithRunId = initLoggerWithRunId;
|
|
43
45
|
// src/utils/logger.ts
|
|
44
46
|
const winston_1 = __importDefault(require("winston"));
|
|
45
47
|
const path = __importStar(require("path"));
|
|
@@ -54,11 +56,28 @@ const fs = __importStar(require("fs"));
|
|
|
54
56
|
* 4. 结构化 JSON 日志
|
|
55
57
|
*/
|
|
56
58
|
let defaultLogger = null;
|
|
59
|
+
/**
|
|
60
|
+
* 持久化日志到文件(追加模式)
|
|
61
|
+
* 用于关键操作的审计追踪
|
|
62
|
+
*/
|
|
63
|
+
function persistLog(log, omPath) {
|
|
64
|
+
try {
|
|
65
|
+
const logsDir = path.join(omPath, 'logs');
|
|
66
|
+
if (!fs.existsSync(logsDir)) {
|
|
67
|
+
fs.mkdirSync(logsDir, { recursive: true });
|
|
68
|
+
}
|
|
69
|
+
const logFile = path.join(logsDir, `${log.runId || 'default'}.log`);
|
|
70
|
+
fs.appendFileSync(logFile, JSON.stringify(log) + '\n', 'utf-8');
|
|
71
|
+
}
|
|
72
|
+
catch {
|
|
73
|
+
// 持久化失败不应影响主流程
|
|
74
|
+
}
|
|
75
|
+
}
|
|
57
76
|
/**
|
|
58
77
|
* 创建或获取默认 Logger
|
|
59
78
|
*/
|
|
60
79
|
function createLogger(options = {}) {
|
|
61
|
-
const { level = process.env.OPENMATRIX_LOG_LEVEL || 'info', logDir = '.openmatrix/logs', console: enableConsole = true } = options;
|
|
80
|
+
const { level = process.env.OPENMATRIX_LOG_LEVEL || 'info', logDir = '.openmatrix/logs', console: enableConsole = true, runId } = options;
|
|
62
81
|
// 确保日志目录存在
|
|
63
82
|
const absoluteLogDir = path.resolve(process.cwd(), logDir);
|
|
64
83
|
if (!fs.existsSync(absoluteLogDir)) {
|
|
@@ -102,7 +121,7 @@ function createLogger(options = {}) {
|
|
|
102
121
|
// 创建 logger
|
|
103
122
|
const logger = winston_1.default.createLogger({
|
|
104
123
|
level,
|
|
105
|
-
defaultMeta: { service: 'openmatrix' },
|
|
124
|
+
defaultMeta: { service: 'openmatrix', runId },
|
|
106
125
|
transports
|
|
107
126
|
});
|
|
108
127
|
return logger;
|
|
@@ -122,6 +141,22 @@ function getLogger() {
|
|
|
122
141
|
function setLogger(logger) {
|
|
123
142
|
defaultLogger = logger;
|
|
124
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* 使用 runId 初始化 logger
|
|
146
|
+
*/
|
|
147
|
+
function initLoggerWithRunId(runId, omPath) {
|
|
148
|
+
defaultLogger = createLogger({ runId });
|
|
149
|
+
if (omPath) {
|
|
150
|
+
// 记录初始化日志
|
|
151
|
+
persistLog({
|
|
152
|
+
level: 'info',
|
|
153
|
+
runId,
|
|
154
|
+
operation: 'init',
|
|
155
|
+
message: 'Logger initialized',
|
|
156
|
+
timestamp: new Date().toISOString()
|
|
157
|
+
}, omPath);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
125
160
|
/**
|
|
126
161
|
* 便捷方法: 直接记录日志
|
|
127
162
|
*/
|
|
@@ -130,6 +165,45 @@ exports.logger = {
|
|
|
130
165
|
error: (message, meta) => getLogger().error(message, meta),
|
|
131
166
|
warn: (message, meta) => getLogger().warn(message, meta),
|
|
132
167
|
debug: (message, meta) => getLogger().debug(message, meta),
|
|
168
|
+
// 结构化日志(带持久化)
|
|
169
|
+
structured: {
|
|
170
|
+
info: (operation, message, meta, omPath) => {
|
|
171
|
+
const log = {
|
|
172
|
+
level: 'info',
|
|
173
|
+
operation,
|
|
174
|
+
message,
|
|
175
|
+
metadata: meta,
|
|
176
|
+
timestamp: new Date().toISOString()
|
|
177
|
+
};
|
|
178
|
+
getLogger().info(message, { operation, ...meta });
|
|
179
|
+
if (omPath)
|
|
180
|
+
persistLog(log, omPath);
|
|
181
|
+
},
|
|
182
|
+
error: (operation, message, meta, omPath) => {
|
|
183
|
+
const log = {
|
|
184
|
+
level: 'error',
|
|
185
|
+
operation,
|
|
186
|
+
message,
|
|
187
|
+
metadata: meta,
|
|
188
|
+
timestamp: new Date().toISOString()
|
|
189
|
+
};
|
|
190
|
+
getLogger().error(message, { operation, ...meta });
|
|
191
|
+
if (omPath)
|
|
192
|
+
persistLog(log, omPath);
|
|
193
|
+
},
|
|
194
|
+
warn: (operation, message, meta, omPath) => {
|
|
195
|
+
const log = {
|
|
196
|
+
level: 'warn',
|
|
197
|
+
operation,
|
|
198
|
+
message,
|
|
199
|
+
metadata: meta,
|
|
200
|
+
timestamp: new Date().toISOString()
|
|
201
|
+
};
|
|
202
|
+
getLogger().warn(message, { operation, ...meta });
|
|
203
|
+
if (omPath)
|
|
204
|
+
persistLog(log, omPath);
|
|
205
|
+
}
|
|
206
|
+
},
|
|
133
207
|
// 任务相关日志
|
|
134
208
|
task: {
|
|
135
209
|
start: (taskId, title) => {
|
|
@@ -143,6 +217,19 @@ exports.logger = {
|
|
|
143
217
|
},
|
|
144
218
|
retry: (taskId, attempt) => {
|
|
145
219
|
getLogger().warn(`Task retry: ${taskId}`, { taskId, attempt });
|
|
220
|
+
},
|
|
221
|
+
timeout: (taskId, timeout, phase, omPath) => {
|
|
222
|
+
const log = {
|
|
223
|
+
level: 'error',
|
|
224
|
+
taskId,
|
|
225
|
+
operation: 'taskTimeout',
|
|
226
|
+
message: `Task timed out after ${timeout}s`,
|
|
227
|
+
metadata: { timeout, phase },
|
|
228
|
+
timestamp: new Date().toISOString()
|
|
229
|
+
};
|
|
230
|
+
getLogger().error(`Task timed out: ${taskId}`, { taskId, timeout, phase });
|
|
231
|
+
if (omPath)
|
|
232
|
+
persistLog(log, omPath);
|
|
146
233
|
}
|
|
147
234
|
},
|
|
148
235
|
// Agent 相关日志
|
|
@@ -162,5 +249,26 @@ exports.logger = {
|
|
|
162
249
|
decision: (approvalId, decision) => {
|
|
163
250
|
getLogger().info(`Approval decision: ${approvalId}`, { approvalId, decision });
|
|
164
251
|
}
|
|
252
|
+
},
|
|
253
|
+
// 任务编排日志
|
|
254
|
+
orchestration: {
|
|
255
|
+
breakdown: (moduleCount, moduleNames, omPath) => {
|
|
256
|
+
const log = {
|
|
257
|
+
level: 'info',
|
|
258
|
+
operation: 'breakdown',
|
|
259
|
+
message: `Parsed ${moduleCount} modules from plan`,
|
|
260
|
+
metadata: { moduleNames },
|
|
261
|
+
timestamp: new Date().toISOString()
|
|
262
|
+
};
|
|
263
|
+
getLogger().info(`Breakdown: ${moduleCount} modules`, { moduleNames });
|
|
264
|
+
if (omPath)
|
|
265
|
+
persistLog(log, omPath);
|
|
266
|
+
},
|
|
267
|
+
schedule: (taskId, dependencies) => {
|
|
268
|
+
getLogger().info(`Task scheduled: ${taskId}`, { taskId, dependencies });
|
|
269
|
+
},
|
|
270
|
+
dependencyResolved: (taskId) => {
|
|
271
|
+
getLogger().debug(`Dependencies resolved: ${taskId}`, { taskId });
|
|
272
|
+
}
|
|
165
273
|
}
|
|
166
274
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openmatrix",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
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",
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"build": "tsc",
|
|
18
18
|
"dev": "tsx src/cli/index.ts",
|
|
19
19
|
"test": "vitest",
|
|
20
|
+
"lint": "eslint src --ext .ts",
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
20
22
|
"postinstall": "node scripts/install-skills.js"
|
|
21
23
|
},
|
|
22
24
|
"keywords": [
|
|
@@ -47,6 +49,9 @@
|
|
|
47
49
|
"winston": "^3.19.0"
|
|
48
50
|
},
|
|
49
51
|
"devDependencies": {
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^8.58.1",
|
|
53
|
+
"@typescript-eslint/parser": "^8.58.1",
|
|
54
|
+
"eslint": "^10.2.0",
|
|
50
55
|
"vitest": "^1.6.0"
|
|
51
56
|
},
|
|
52
57
|
"engines": {
|
package/skills/approve.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:approve
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when handling pending approvals including plan review, merge confirmation, deploy approval, and blocked task decisions during OpenMatrix execution. Triggers on: 审批, approve, 批准, plan review, merge conflict resolution, deploy confirmation, 阻塞处理, technical decision, pending approval, waiting for approval, 待确认."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|
package/skills/auto.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:auto
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when the user wants fully automated task execution with zero manual approvals. Triggers on: 全自动, 无人值守, hands-free, non-stop, don't ask me, 直接执行, skip all confirmations, batch refactor, large migration, bulk changes. Use for multi-task execution where the user doesn't want to be interrupted at any approval point (plan/merge/deploy)."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NOTE>
|
|
@@ -9,7 +9,9 @@ description: 全自动执行任务指令 - AI 拆分,无阻塞,bypass permis
|
|
|
9
9
|
- **`/om:auto`** 是一个 **Skill 指令**,为 Agent 无障碍执行准备
|
|
10
10
|
- **「全自动执行」**是 `/om:start` 中用户选择的 **执行模式选项**
|
|
11
11
|
|
|
12
|
-
**关键区别**:`/om
|
|
12
|
+
**关键区别**:`/om:auto` 不创建 Meeting 记录,直接跳过阻塞任务。
|
|
13
|
+
|
|
14
|
+
**相关技能**: `/om:start` (交互式) | `/om:status` (状态查看) | `/om:report` (报告)
|
|
13
15
|
</NOTE>
|
|
14
16
|
|
|
15
17
|
<NO-OTHER-SKILLS>
|
|
@@ -283,16 +285,21 @@ $ARGUMENTS
|
|
|
283
285
|
## 执行流程
|
|
284
286
|
|
|
285
287
|
```
|
|
286
|
-
Step 1: 初始化 .openmatrix
|
|
287
|
-
|
|
288
|
-
Step
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
↓
|
|
294
|
-
Step 5: 读取 subagentTasks
|
|
295
|
-
↓
|
|
296
|
-
Step 6: Agent 逐个执行 ← 只有这里写代码
|
|
288
|
+
Step 1: 初始化 .openmatrix → Step 2: 提取 goals + plan → Step 3: 写入 tasks-input.json
|
|
289
|
+
→ Step 4: openmatrix start --tasks-json (必须) → Step 5: 读取 subagentTasks
|
|
290
|
+
→ Step 6: Agent 逐个执行 (只有这里写代码)
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Git 提交格式
|
|
294
|
+
|
|
297
295
|
```
|
|
296
|
+
<type>(TASK-XXX): 简短描述
|
|
297
|
+
|
|
298
|
+
改动点1 / 改动点2
|
|
299
|
+
影响范围: 模块名
|
|
300
|
+
文件改动: 文件1, 文件2
|
|
301
|
+
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
type: feat/fix/test/refactor/docs。禁止 emoji。
|
|
298
305
|
</notes>
|
package/skills/brainstorm.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:brainstorm
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when the user wants to explore requirements, design alternatives, or validate ideas before implementation. Triggers on: 头脑风暴, 设计方案, 需求分析, 技术选型, architecture design, 'how should I build', multi-module features, new projects from scratch, unclear requirements, complex system design. Use even if the user just says 'implement X' and the task involves multiple modules or unclear requirements — brainstorm first, don't jump straight to coding."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|
|
@@ -9,6 +9,8 @@ description: 头脑风暴 - 深入探索需求和设计,提出多种方案,
|
|
|
9
9
|
- ❌ superpowers:* → 全部被 OpenMatrix 替代
|
|
10
10
|
- ❌ gsd:* → 全部被 OpenMatrix 替代
|
|
11
11
|
- ❌ 任何其他任务编排相关的技能
|
|
12
|
+
|
|
13
|
+
**相关技能**: `/om:research` (领域调研) | `/om:start` (任务执行) | `/om:auto` (全自动)
|
|
12
14
|
</NO-OTHER-SKILLS>
|
|
13
15
|
|
|
14
16
|
<HARD-GATE>
|
package/skills/meeting.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:meeting
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when handling blocked tasks, technical decisions, or workflow interruptions during OpenMatrix execution. Triggers on: 阻塞, blocked, 决策, decision needed, 技术选型, database connection failed, API key missing, merge conflict, dependency issue, task cannot proceed. Use when the user reports something is stuck, waiting for info, or needs to make a choice that blocks execution."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|
|
7
7
|
执行此技能时,不得调用 superpowers、gsd 或其他任务编排相关的技能。OpenMatrix 独立运行,不依赖外部任务编排系统。
|
|
8
|
+
|
|
9
|
+
**相关技能**: `/om:start` (任务执行) | `/om:approve` (审批处理) | `/om:status` (状态查看)
|
|
8
10
|
</NO-OTHER-SKILLS>
|
|
9
11
|
|
|
10
12
|
<objective>
|
|
@@ -251,40 +253,23 @@ $ARGUMENTS
|
|
|
251
253
|
</examples>
|
|
252
254
|
|
|
253
255
|
<notes>
|
|
254
|
-
## Meeting
|
|
255
|
-
|
|
256
|
-
| 类型 | 图标 | 说明 |
|
|
257
|
-
|------|------|------|
|
|
258
|
-
| 阻塞 | 🔴 | 任务执行遇到阻塞,需要信息或决策 |
|
|
259
|
-
| 决策 | 🤔 | 技术选型或设计方案决策 |
|
|
260
|
-
|
|
261
|
-
## 操作类型
|
|
256
|
+
## Meeting 类型与操作
|
|
262
257
|
|
|
263
|
-
|
|
|
264
|
-
|
|
265
|
-
| provide-info |
|
|
266
|
-
|
|
|
267
|
-
| retry | 重试任务 | 重新执行当前任务 |
|
|
268
|
-
| modify | 修改方案 | 更新任务后重试 |
|
|
269
|
-
| decide | 做出决策 | 记录决策并继续 |
|
|
270
|
-
| cancel | 取消任务 | 停止相关下游任务 |
|
|
258
|
+
| 类型 | 图标 | 操作 | 后续 |
|
|
259
|
+
|------|------|------|------|
|
|
260
|
+
| 阻塞 | 🔴 | provide-info/skip/retry/modify | 提供信息后恢复执行 |
|
|
261
|
+
| 决策 | 🤔 | decide/cancel | 记录决策并继续 |
|
|
271
262
|
|
|
272
263
|
## CLI 命令
|
|
273
264
|
|
|
274
265
|
```bash
|
|
275
|
-
# 列出所有 Meeting
|
|
276
|
-
openmatrix meeting --
|
|
277
|
-
|
|
278
|
-
#
|
|
279
|
-
openmatrix meeting APPR-001 --action
|
|
280
|
-
openmatrix meeting APPR-001 --action
|
|
281
|
-
openmatrix meeting
|
|
282
|
-
openmatrix meeting APPR-001 --action modify --new-plan "..."
|
|
283
|
-
openmatrix meeting APPR-001 --action decide --reason "选择方案A,因为..."
|
|
284
|
-
openmatrix meeting APPR-001 --action cancel --message "取消执行"
|
|
285
|
-
|
|
286
|
-
# 批量操作
|
|
287
|
-
openmatrix meeting --skip-all --message "批量跳过"
|
|
266
|
+
openmatrix meeting --list # 列出所有 Meeting
|
|
267
|
+
openmatrix meeting APPR-001 --action provide-info --info "..." # 提供信息
|
|
268
|
+
openmatrix meeting APPR-001 --action skip --message "..." # 跳过
|
|
269
|
+
openmatrix meeting APPR-001 --action retry # 重试
|
|
270
|
+
openmatrix meeting APPR-001 --action modify --new-plan "..." # 修改方案
|
|
271
|
+
openmatrix meeting APPR-001 --action decide --reason "..." # 决策
|
|
272
|
+
openmatrix meeting --skip-all --message "批量跳过" # 批量操作
|
|
288
273
|
```
|
|
289
274
|
|
|
290
275
|
## 与执行循环的关系
|
|
@@ -321,4 +306,8 @@ openmatrix meeting --skip-all --message "批量跳过"
|
|
|
321
306
|
↓
|
|
322
307
|
所有非阻塞任务完成 → 提示 Meeting → /om:meeting → 用户处理 → 完成
|
|
323
308
|
```
|
|
309
|
+
|
|
310
|
+
## 与 /om:approve 的区别
|
|
311
|
+
|
|
312
|
+
`/om:approve` 处理所有审批(plan/merge/deploy/meeting),`/om:meeting` 专注交互式处理阻塞和决策。
|
|
324
313
|
</notes>
|
package/skills/om.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om
|
|
3
|
-
description: "
|
|
3
|
+
description: "Default entry point for all development tasks. Routes to /om:start or /om:brainstorm automatically. Triggers on: implement, build, fix, create, refactor, 修复, 实现, 开发, 添加功能, new feature. Use for ANY task that produces code changes — don't answer directly, route to OpenMatrix workflow."
|
|
4
4
|
priority: critical
|
|
5
5
|
always_load: true
|
|
6
6
|
---
|
|
@@ -16,28 +16,18 @@ always_load: true
|
|
|
16
16
|
- "修复X" / "fix X" → Development task → This skill
|
|
17
17
|
- "怎么实现?" / "how to?" → Question → NOT this skill (just answer)
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
- ❌ Deliberate between this and other brainstorming/planning skills
|
|
21
|
-
- ❌ Read files before invoking this skill
|
|
22
|
-
- ❌ Check if other skills might apply
|
|
23
|
-
- ❌ Spend time thinking about skill priority
|
|
19
|
+
Complex tasks route to `/om:brainstorm`, simple tasks route to `/om:start`.
|
|
24
20
|
</EXTREMELY-IMPORTANT>
|
|
25
21
|
|
|
26
22
|
<NO-OTHER-SKILLS>
|
|
27
23
|
**绝对禁止**调用以下技能(OpenMatrix 完全替代它们):
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
- ❌ superpowers:* → 全部被 OpenMatrix 替代
|
|
32
|
-
- ❌ gsd:* → 全部被 OpenMatrix 替代
|
|
33
|
-
- ❌ 任何其他任务编排相关的技能
|
|
34
|
-
|
|
35
|
-
**重要**: 当 OpenMatrix 技能可用时,`superpowers:brainstorming` 不再适用。
|
|
36
|
-
OpenMatrix 有自己的 brainstorm 流程 (`/om:brainstorm`),不需要 superpowers。
|
|
24
|
+
- superpowers:brainstorming → 用 /om:brainstorm 代替
|
|
25
|
+
- superpowers:write-plan / execute-plan → OpenMatrix 有自己的流程
|
|
26
|
+
- superpowers:* / gsd:* → 全部被 OpenMatrix 替代
|
|
37
27
|
</NO-OTHER-SKILLS>
|
|
38
28
|
|
|
39
29
|
<objective>
|
|
40
|
-
OpenMatrix 默认入口
|
|
30
|
+
OpenMatrix 默认入口 — 用户无需记忆命令,直接描述任务即可。
|
|
41
31
|
</objective>
|
|
42
32
|
|
|
43
33
|
<process>
|
|
@@ -51,15 +41,16 @@ OpenMatrix 默认入口 - 用户无需记忆命令,直接描述任务即可。
|
|
|
51
41
|
2. **Route input**
|
|
52
42
|
|
|
53
43
|
**Task description or file path**:
|
|
54
|
-
→
|
|
44
|
+
→ Assess complexity: complex → `/om:brainstorm`, simple → `/om:start`
|
|
55
45
|
|
|
56
46
|
**Empty input**:
|
|
57
47
|
→ Show help
|
|
58
48
|
|
|
59
|
-
3. **Auto-route
|
|
49
|
+
3. **Auto-route**
|
|
60
50
|
|
|
61
51
|
```
|
|
62
52
|
"实现用户登录" → /om:start 实现用户登录
|
|
53
|
+
"从零搭建系统" → /om:brainstorm 从零搭建系统
|
|
63
54
|
"docs/task.md" → /om:start docs/task.md
|
|
64
55
|
(empty) → Show help
|
|
65
56
|
```
|
|
@@ -71,10 +62,10 @@ OpenMatrix 默认入口 - 用户无需记忆命令,直接描述任务即可。
|
|
|
71
62
|
OpenMatrix - AI task orchestration
|
|
72
63
|
|
|
73
64
|
Usage:
|
|
74
|
-
/om <task>
|
|
75
|
-
/om:brainstorm <task>
|
|
76
|
-
/om:start <task>
|
|
77
|
-
/om:auto <task>
|
|
65
|
+
/om <task> Start task
|
|
66
|
+
/om:brainstorm <task> Brainstorm first
|
|
67
|
+
/om:start <task> Interactive start
|
|
68
|
+
/om:auto <task> Full auto
|
|
78
69
|
|
|
79
70
|
Examples:
|
|
80
71
|
/om 实现用户登录功能
|
|
@@ -99,14 +90,14 @@ $ARGUMENTS
|
|
|
99
90
|
</arguments>
|
|
100
91
|
|
|
101
92
|
<examples>
|
|
102
|
-
/om 实现用户登录功能
|
|
103
|
-
/om
|
|
104
|
-
/om
|
|
105
|
-
/om
|
|
93
|
+
/om 实现用户登录功能 → /om:start (简单)
|
|
94
|
+
/om 从零搭建后台系统 → /om:brainstorm (复杂)
|
|
95
|
+
/om 修复登录页面的样式问题 → /om:start (简单)
|
|
96
|
+
/om docs/task.md → /om:start (从文件)
|
|
97
|
+
/om → Show help
|
|
106
98
|
</examples>
|
|
107
99
|
|
|
108
100
|
<notes>
|
|
109
|
-
`/om` is
|
|
110
|
-
|
|
111
|
-
- Same functionality, simpler UX
|
|
101
|
+
`/om` is shorthand for the OpenMatrix workflow. Same skill set as `openmatrix`, shorter invocation.
|
|
102
|
+
Available commands: `/om:brainstorm`, `/om:start`, `/om:auto`, `/om:status`, `/om:meeting`, `/om:report`, `/om:resume`, `/om:retry`, `/om:research`, `/om:approve`, `/om:check`
|
|
112
103
|
</notes>
|
package/skills/openmatrix.md
CHANGED
|
@@ -48,6 +48,13 @@ Is the user asking me to PRODUCE code changes?
|
|
|
48
48
|
**IMPORTANT:** OpenMatrix includes its own brainstorm mode (`/om:brainstorm`).
|
|
49
49
|
When a development task is complex (new feature, multi-module, from-scratch), use `/om:brainstorm`.
|
|
50
50
|
When a development task is simple (bug fix, small change, clear requirement), use `/om:start`.
|
|
51
|
+
|
|
52
|
+
**Related skills:**
|
|
53
|
+
- `/om:auto` — 全自动执行,无需审批
|
|
54
|
+
- `/om:status` — 查看执行进度
|
|
55
|
+
- `/om:meeting` — 处理阻塞问题
|
|
56
|
+
- `/om:report` — 生成执行报告
|
|
57
|
+
- `/om:resume` / `/om:retry` — 恢复/重试
|
|
51
58
|
</EXTREMELY-IMPORTANT>
|
|
52
59
|
|
|
53
60
|
<NO-OTHER-SKILLS>
|
|
@@ -110,3 +117,13 @@ Detect development task intent and route to OpenMatrix's internal workflow.
|
|
|
110
117
|
| `从零搭建后台管理` | Build | Complex | → `/om:brainstorm` |
|
|
111
118
|
| `怎么实现登录?` | Ask | - | ❌ Direct answer |
|
|
112
119
|
| `这个函数有什么问题?` | Ask | - | ❌ Direct answer |
|
|
120
|
+
|
|
121
|
+
## Common Mistakes
|
|
122
|
+
|
|
123
|
+
| Mistake | Why it's wrong | Fix |
|
|
124
|
+
|---------|---------------|-----|
|
|
125
|
+
| Answering "如何实现 X" directly when user clearly wants to build it | "How to" can be a question OR a build request — check context | If paired with a file or project context → route to OpenMatrix |
|
|
126
|
+
| Deliberating between multiple skills before acting | Wastes tokens, delays execution | First match wins — if it looks like dev work, invoke immediately |
|
|
127
|
+
| Reading files before deciding which skill to use | Files lack conversation context | Decision is based on user intent, not file contents |
|
|
128
|
+
| Using superpowers:brainstorming when om:brainstorm is available | Duplicate workflow, inconsistent state | om:brainstorm integrates with OpenMatrix task lifecycle |
|
|
129
|
+
| Skipping `/om:brainstorm` for complex tasks | Leads to poor planning and rework | Multi-module or unclear requirements → brainstorm first |
|
package/skills/report.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:report
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when generating a task execution report with statistics, task details, approval history, and agent performance. Triggers on: 报告, report, summary, 总结, execution stats, 统计, sprint report, weekly summary, 产出物, deliverables overview."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|
package/skills/research.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:research
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when conducting domain research before implementing vertical-domain tasks. Triggers on: 领域调研, research, game development, payment system, blockchain, AI application, 行业标准, tech stack exploration, domain analysis, unfamiliar vertical, need to understand the domain before building."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|
|
7
7
|
执行此技能时,不得调用其他任务编排相关的技能。OpenMatrix 独立运行,不依赖外部任务编排系统。
|
|
8
|
+
|
|
9
|
+
**相关技能**: `/om:brainstorm` (需求探索) | `/om:start` (任务执行)
|
|
8
10
|
</NO-OTHER-SKILLS>
|
|
9
11
|
|
|
10
12
|
<objective>
|
package/skills/resume.md
CHANGED
package/skills/retry.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:retry
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when retrying failed tasks after execution errors, test failures, or timeouts. Triggers on: 重试, retry, failed task, 失败任务, rerun, 重新执行, test failure, timeout, 超时, error recovery."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|
package/skills/start.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:start
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when starting a new development task cycle with interactive questions. Triggers on: 实现, implement, build, fix, refactor, 添加功能, add feature, bug fix, 修复, new module, code changes, feature request. Use when the user describes what they want to build or fix, even briefly — don't answer the question directly, start the task workflow."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|
|
@@ -12,6 +12,8 @@ description: 启动新的任务执行周期
|
|
|
12
12
|
**Step 10 只能使用 Agent 工具** — 直接调用 Agent,不通过任何中间层。
|
|
13
13
|
|
|
14
14
|
违规调用将导致执行失败。
|
|
15
|
+
|
|
16
|
+
**相关技能**: `/om:brainstorm` (需求探索) | `/om:auto` (全自动) | `/om:meeting` (阻塞处理) | `/om:status` (状态查看) | `/om:report` (报告)
|
|
15
17
|
</NO-OTHER-SKILLS>
|
|
16
18
|
|
|
17
19
|
<MANDATORY-EXECUTION-ORDER>
|
|
@@ -224,6 +226,38 @@ AskUserQuestion: `header: "执行模式"`, `multiSelect: false`
|
|
|
224
226
|
|
|
225
227
|
**研究上下文集成**: 如果已加载研究领域,AI 应基于 `RESEARCH.md` 中的领域知识确认/补充 goals,而非从零提取。`plan` 字段应包含领域技术栈、架构模式等知识。
|
|
226
228
|
|
|
229
|
+
**plan 字段格式要求(供系统解析模块):**
|
|
230
|
+
|
|
231
|
+
plan 中必须包含以下结构之一,系统将据此拆分为模块级任务:
|
|
232
|
+
|
|
233
|
+
**中文格式(推荐):**
|
|
234
|
+
```
|
|
235
|
+
## 架构设计
|
|
236
|
+
1. 用户域:用户注册登录模块
|
|
237
|
+
2. 订单域:订单处理模块
|
|
238
|
+
3. 商品域:商品管理模块
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
或简洁格式:
|
|
242
|
+
```
|
|
243
|
+
3领域模块: 用户、订单、商品
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
**英文格式:**
|
|
247
|
+
```
|
|
248
|
+
## Modules
|
|
249
|
+
- User module: authentication and profile
|
|
250
|
+
- Order module: order processing
|
|
251
|
+
- Product module: catalog management
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
或:
|
|
255
|
+
```
|
|
256
|
+
3 modules: User, Order, Product
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
> **重要**: 如果 plan 不包含可解析的模块结构,系统将从 goals 中推断模块(仅 `development` 类型 goal),或 fallback 到按 goal 拆分。包含模块结构可获得更精细的依赖分析和并行执行优化。
|
|
260
|
+
|
|
227
261
|
**goalTypes 标注示例:**
|
|
228
262
|
|
|
229
263
|
| Goal | Type | 理由 |
|
|
@@ -474,16 +508,21 @@ $ARGUMENTS
|
|
|
474
508
|
## 执行流程
|
|
475
509
|
|
|
476
510
|
```
|
|
477
|
-
Step 1-5: 初始化 + 问答 + 确认
|
|
478
|
-
|
|
479
|
-
Step
|
|
480
|
-
↓
|
|
481
|
-
Step 7: 写入 tasks-input.json
|
|
482
|
-
↓
|
|
483
|
-
Step 8: openmatrix start --tasks-json ← 必须执行
|
|
484
|
-
↓
|
|
485
|
-
Step 9: 读取 subagentTasks
|
|
486
|
-
↓
|
|
487
|
-
Step 10: Agent 逐个执行 ← 只有这里写代码
|
|
511
|
+
Step 1-5: 初始化 + 问答 + 确认 → Step 6: 提取 goals + plan → Step 7: 写入 tasks-input.json
|
|
512
|
+
→ Step 8: openmatrix start --tasks-json (必须) → Step 9: 读取 subagentTasks
|
|
513
|
+
→ Step 10: Agent 逐个执行 (只有这里写代码)
|
|
488
514
|
```
|
|
515
|
+
|
|
516
|
+
## Git 提交格式
|
|
517
|
+
|
|
518
|
+
```
|
|
519
|
+
<type>(TASK-XXX): 简短描述
|
|
520
|
+
|
|
521
|
+
改动点1 / 改动点2
|
|
522
|
+
影响范围: 模块名
|
|
523
|
+
文件改动: 文件1, 文件2
|
|
524
|
+
Co-Authored-By: OpenMatrix https://github.com/bigfish1913/openmatrix
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
type: feat/fix/test/refactor/docs。禁止 emoji。
|
|
489
528
|
</notes>
|
package/skills/status.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: om:status
|
|
3
|
-
description:
|
|
3
|
+
description: "Use when checking task execution progress, run status, completion statistics, or pending approvals. Triggers on: 进度, progress, status, 状态, 完成情况, statistics, how many tasks, run status, 还剩多少, task overview."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<NO-OTHER-SKILLS>
|