openmatrix 0.1.71 → 0.1.73

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.
@@ -58,6 +58,7 @@ exports.startCommand = new commander_1.Command('start')
58
58
  .option('-t, --tech-stack <stack>', '技术栈 (逗号分隔,如 "TypeScript,Vue.js,PostgreSQL")')
59
59
  .option('--docs <level>', '文档级别 (full|basic|minimal|none)')
60
60
  .option('--tasks-json <json>', 'AI 已拆分的任务 JSON (跳过自动解析)')
61
+ .option('--e2e-tests', '启用 E2E 测试')
61
62
  .action(async (input, options) => {
62
63
  const basePath = process.cwd();
63
64
  const omPath = path.join(basePath, '.openmatrix');
@@ -168,7 +169,7 @@ async function handleTasksJson(options, stateManager, state, omPath, basePath) {
168
169
  const qualityLevel = tasksInput.quality || options.quality || 'balanced';
169
170
  const qualityConfig = { ...(index_js_1.QUALITY_PRESETS[qualityLevel.toLowerCase()] || index_js_1.QUALITY_PRESETS.balanced) };
170
171
  // E2E 测试覆盖(用户在 Skill 问答中选择启用)
171
- if (tasksInput.e2eTests) {
172
+ if (tasksInput.e2eTests || options.e2eTests) {
172
173
  qualityConfig.e2eTests = true;
173
174
  }
174
175
  if (!options.json) {
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "openmatrix",
3
- "version": "0.1.71",
4
- "description": "AI Agent task orchestration system with Claude Code Skills integration",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "bin": {
8
- "openmatrix": "dist/cli/index.js"
9
- },
10
- "files": [
11
- "dist",
12
- "skills",
13
- "scripts",
14
- "README.md"
15
- ],
16
- "scripts": {
17
- "build": "tsc",
18
- "dev": "tsx src/cli/index.ts",
19
- "test": "vitest",
20
- "postinstall": "node scripts/install-skills.js"
21
- },
22
- "keywords": [
23
- "claude",
24
- "claude-code",
25
- "ai-agent",
26
- "task-orchestration",
27
- "automation",
28
- "multi-agent"
29
- ],
30
- "author": "",
31
- "license": "MIT",
32
- "type": "commonjs",
33
- "repository": {
34
- "type": "git",
35
- "url": "git+https://github.com/bigfish1913/openmatrix.git"
36
- },
37
- "homepage": "https://github.com/bigfish1913/openmatrix#readme",
38
- "bugs": {
39
- "url": "https://github.com/bigfish1913/openmatrix/issues"
40
- },
41
- "dependencies": {
42
- "@types/node": "^22.0.0",
43
- "chalk": "^5.6.2",
44
- "chokidar": "^5.0.0",
45
- "commander": "^14.0.3",
46
- "typescript": "^5.3.3",
47
- "winston": "^3.19.0"
48
- },
49
- "devDependencies": {
50
- "vitest": "^1.6.0"
51
- },
52
- "engines": {
53
- "node": ">=18.0.0"
54
- }
55
- }
1
+ {
2
+ "name": "openmatrix",
3
+ "version": "0.1.73",
4
+ "description": "AI Agent task orchestration system with Claude Code Skills integration",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "bin": {
8
+ "openmatrix": "dist/cli/index.js"
9
+ },
10
+ "files": [
11
+ "dist",
12
+ "skills",
13
+ "scripts",
14
+ "README.md"
15
+ ],
16
+ "scripts": {
17
+ "build": "tsc",
18
+ "dev": "tsx src/cli/index.ts",
19
+ "test": "vitest",
20
+ "postinstall": "node scripts/install-skills.js"
21
+ },
22
+ "keywords": [
23
+ "claude",
24
+ "claude-code",
25
+ "ai-agent",
26
+ "task-orchestration",
27
+ "automation",
28
+ "multi-agent"
29
+ ],
30
+ "author": "",
31
+ "license": "MIT",
32
+ "type": "commonjs",
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "git+https://github.com/bigfish1913/openmatrix.git"
36
+ },
37
+ "homepage": "https://github.com/bigfish1913/openmatrix#readme",
38
+ "bugs": {
39
+ "url": "https://github.com/bigfish1913/openmatrix/issues"
40
+ },
41
+ "dependencies": {
42
+ "@types/node": "^22.0.0",
43
+ "chalk": "^5.6.2",
44
+ "chokidar": "^5.0.0",
45
+ "commander": "^14.0.3",
46
+ "typescript": "^5.3.3",
47
+ "winston": "^3.19.0"
48
+ },
49
+ "devDependencies": {
50
+ "vitest": "^1.6.0"
51
+ },
52
+ "engines": {
53
+ "node": ">=18.0.0"
54
+ }
55
+ }
@@ -35,7 +35,7 @@ OpenMatrix 独立运行,不依赖外部任务编排系统。
35
35
  "questions": [...],
36
36
  "suggestResearch": "游戏开发",
37
37
  "researchHint": "检测到垂直领域「游戏开发」,建议先进行领域调研",
38
- "hint": "请逐一回答问题,完成后再调用 --complete"
38
+ "hint": "请逐一回答问题,完成后写入 tasks-input.json 并调用 /om:start"
39
39
  }
40
40
  ```
41
41
 
package/skills/start.md CHANGED
@@ -76,8 +76,15 @@ ls -la .git 2>/dev/null
76
76
 
77
77
  ### Step 2: 解析任务输入
78
78
 
79
- - `.openmatrix/tasks-input.json` 已存在(来自 `/om:brainstorm`)→ 读取该文件,跳到 Step 4
80
- - `$ARGUMENTS` 为文件路径 → 读取文件内容
79
+ **检查 `.openmatrix/tasks-input.json` 是否已存在:**
80
+
81
+ | 情况 | 处理方式 |
82
+ |------|---------|
83
+ | 已存在(来自 `/om:brainstorm`) | 读取文件内容 → **立即执行 Step 4 必选问题**(质量等级、E2E、执行模式) |
84
+ | 不存在 | 根据用户输入解析 |
85
+
86
+ > ⚠️ **注意**: 即使 `tasks-input.json` 已存在,Step 4 必选问题仍然必须执行!
87
+ > 文件中的 `plan` 只供 Agent 参考,`quality`、`mode`、`e2eTests` 必须由用户在 Step 4 选择。
81
88
  - `$ARGUMENTS` 为任务描述 → 直接使用
82
89
  - 无参数 → AskUserQuestion 询问任务内容
83
90
 
@@ -206,25 +213,23 @@ AskUserQuestion({
206
213
  "goals": ["目标1", "目标2", "目标3"],
207
214
  "constraints": ["约束1"],
208
215
  "deliverables": ["src/xxx.ts"],
209
- "answers": { "技术栈": "..." },
210
- "quality": "strict|balanced|fast",
211
- "mode": "confirm-all|confirm-key|auto",
212
216
  "plan": "## 技术方案\n1. ...\n2. ..."
213
217
  }
214
218
  ```
215
219
 
216
- **E2E 测试:** 如果用户在 Step 4 选择了"启用 E2E",在 quality 后面加上:
217
- ```
218
- "e2eTests": true
219
- ```
220
- 这会让 CLI 的 TaskPlanner 在任务拆分时生成额外的 E2E 测试任务。
220
+ > **注意**: `quality`、`mode`、`e2eTests` 不写入文件,由 Step 8 CLI 参数传递。
221
221
 
222
222
  ### Step 8: 调用 CLI 创建任务 ⚠️ 不可跳过
223
223
 
224
- **必须执行此命令,禁止跳过:**
224
+ **必须执行此命令,传递 Step 4 用户选择的参数:**
225
+
226
+ ```bash
227
+ openmatrix start --tasks-json @.openmatrix/tasks-input.json --quality <用户选择的质量等级> --mode <用户选择的执行模式> --json
228
+ ```
225
229
 
230
+ 如果用户在 Step 4.2 选择了"启用 E2E 测试",加上 `--e2e-tests` 参数:
226
231
  ```bash
227
- openmatrix start --tasks-json @.openmatrix/tasks-input.json --json
232
+ openmatrix start --tasks-json @.openmatrix/tasks-input.json --quality balanced --mode auto --e2e-tests --json
228
233
  ```
229
234
 
230
235
  此命令返回 JSON 包含 `subagentTasks` 列表。
@@ -307,11 +312,11 @@ openmatrix step --json
307
312
 
308
313
  **交互式审批流程(非全自动模式):**
309
314
 
310
- 当到达审批点时,使用 `openmatrix approve --list` 查看待审批项,然后通过 AskUserQuestion 请求用户确认:
315
+ 当到达审批点时,使用 `openmatrix approve --json`(不带 ID)查看待审批项,然后通过 AskUserQuestion 请求用户确认:
311
316
 
312
317
  ```typescript
313
318
  // 检查是否有待审批项
314
- // 通过 CLI: openmatrix approve --list --json
319
+ // 通过 CLI: openmatrix approve --json (不带 approvalId 时返回列表)
315
320
 
316
321
  AskUserQuestion({
317
322
  questions: [
@@ -334,8 +339,9 @@ AskUserQuestion({
334
339
  ```
335
340
 
336
341
  用户选择后,执行对应命令:
337
- - 批准: `openmatrix approve <approval-id> --approve`
338
- - 拒绝: `openmatrix approve <approval-id> --reject`
342
+ - 批准: `openmatrix approve <approval-id> -d approve --json`
343
+ - 拒绝: `openmatrix approve <approval-id> -d reject --json`
344
+ - 修改: `openmatrix approve <approval-id> -d modify -c "修改建议" --json`
339
345
  - 查看详情: 读取 `.openmatrix/approvals/<approval-id>.json` 并展示完整内容
340
346
 
341
347