openmatrix 0.1.0 → 0.1.1
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/README.md +132 -255
- package/dist/cli/commands/auto.d.ts +2 -0
- package/dist/cli/commands/auto.js +226 -0
- package/dist/cli/commands/install-skills.d.ts +3 -0
- package/dist/cli/commands/install-skills.js +111 -0
- package/dist/cli/index.js +4 -0
- package/package.json +3 -2
- package/skills/auto.md +218 -0
- package/skills/start.md +153 -21
package/README.md
CHANGED
|
@@ -2,23 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**同时实现 TDD + 严格质量门禁 + 全自动执行的 AI 任务编排系统**
|
|
6
6
|
|
|
7
7
|
*自动化 ≠ 牺牲质量 | 高质量 ≠ 手动操作*
|
|
8
8
|
|
|
9
|
-
[](https://
|
|
9
|
+
[](https://www.npmjs.com/package/openmatrix)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
[](https://nodejs.org/)
|
|
12
12
|
[](https://claude.ai/code)
|
|
13
13
|
|
|
14
|
-
**[
|
|
14
|
+
**[中文](README.md)** | **[English](README_EN.md)**
|
|
15
15
|
|
|
16
16
|
</div>
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
# 中文文档
|
|
21
|
-
|
|
22
20
|
## 一句话介绍
|
|
23
21
|
|
|
24
22
|
```bash
|
|
@@ -28,212 +26,24 @@
|
|
|
28
26
|
|
|
29
27
|
---
|
|
30
28
|
|
|
31
|
-
##
|
|
29
|
+
## 执行流程概览
|
|
32
30
|
|
|
33
31
|
```
|
|
34
|
-
|
|
35
|
-
│ OpenMatrix 完整执行流程 │
|
|
36
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
37
|
-
|
|
38
|
-
用户输入: /om:start 实现用户登录功能
|
|
39
|
-
│
|
|
40
|
-
▼
|
|
41
|
-
┌─────────────────────────────────────────────────────────────────────────────────┐
|
|
42
|
-
│ 阶段 0: 交互式问答 │
|
|
43
|
-
├─────────────────────────────────────────────────────────────────────────────────┤
|
|
44
|
-
│ │
|
|
45
|
-
│ Q0: 选择质量级别? ◀─── 最重要,第一个问 │
|
|
46
|
-
│ ├── 🚀 strict → TDD + 80%覆盖率 + 6道门禁 + AI验收 │
|
|
47
|
-
│ ├── ⚖️ balanced → 60%覆盖率 + 4道门禁 + AI验收 │
|
|
48
|
-
│ └── ⚡ fast → 无质量门禁 │
|
|
49
|
-
│ │
|
|
50
|
-
│ Q1: 任务目标? (新功能/Bug修复/重构) │
|
|
51
|
-
│ Q2: 技术栈? (TypeScript/Python/Go...) │
|
|
52
|
-
│ Q3: 文档要求? (完整/基础/最小/无) │
|
|
53
|
-
│ │
|
|
54
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
55
|
-
│
|
|
56
|
-
▼
|
|
57
|
-
┌─────────────────────────────────────────────────────────────────────────────────┐
|
|
58
|
-
│ 阶段 1: 任务规划 (Planner Agent) │
|
|
59
|
-
├─────────────────────────────────────────────────────────────────────────────────┤
|
|
60
|
-
│ │
|
|
61
|
-
│ 输入: 用户回答 + 任务描述 │
|
|
62
|
-
│ 输出: 执行计划 + 子任务列表 + 依赖图 │
|
|
63
|
-
│ │
|
|
64
|
-
│ 📋 执行计划示例: │
|
|
65
|
-
│ ├── TASK-001: 数据模型设计 (Planner, 15min) │
|
|
66
|
-
│ ├── TASK-002: API 接口实现 (Coder, 30min) │
|
|
67
|
-
│ ├── TASK-003: 单元测试 (Tester, 20min) │
|
|
68
|
-
│ └── TASK-004: 代码审查 (Reviewer, 10min) │
|
|
69
|
-
│ │
|
|
70
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
71
|
-
│
|
|
72
|
-
▼
|
|
73
|
-
┌─────────────────────────────────────────────────────────────────────────────────┐
|
|
74
|
-
│ 阶段 2: 任务执行 (根据质量级别) │
|
|
75
|
-
├─────────────────────────────────────────────────────────────────────────────────┤
|
|
76
|
-
│ │
|
|
77
|
-
│ ┌─────────────────────────────────────────────────────────────────────────┐ │
|
|
78
|
-
│ │ strict 模式 (4阶段) │ │
|
|
79
|
-
│ │ │ │
|
|
80
|
-
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
|
|
81
|
-
│ │ │ TDD │────▶│ Develop │────▶│ Verify │────▶│ Accept │ │ │
|
|
82
|
-
│ │ │ 🧪 RED │ │ ✨ GREEN│ │ ✅ 6门禁│ │ 🎉 AI │ │ │
|
|
83
|
-
│ │ └─────────┘ └─────────┘ └─────────┘ └─────────┘ │ │
|
|
84
|
-
│ │ │ │ │ │ │ │
|
|
85
|
-
│ │ ▼ ▼ ▼ ▼ │ │
|
|
86
|
-
│ │ Tester 先写 Coder 写代码 6道质量门禁 Reviewer │ │
|
|
87
|
-
│ │ 测试(必须失败) (测试必须通过) (见下方) 最终验收 │ │
|
|
88
|
-
│ │ │ │
|
|
89
|
-
│ └─────────────────────────────────────────────────────────────────────────┘ │
|
|
90
|
-
│ │
|
|
91
|
-
│ ┌─────────────────────────────────────────────────────────────────────────┐ │
|
|
92
|
-
│ │ balanced 模式 (3阶段) │ │
|
|
93
|
-
│ │ │ │
|
|
94
|
-
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
|
|
95
|
-
│ │ │ Develop │────▶│ Verify │────▶│ Accept │ │ │
|
|
96
|
-
│ │ │ ✨ 编码 │ │ ✅ 4门禁│ │ 🎉 AI │ │ │
|
|
97
|
-
│ │ └─────────┘ └─────────┘ └─────────┘ │ │
|
|
98
|
-
│ │ │ │
|
|
99
|
-
│ └─────────────────────────────────────────────────────────────────────────┘ │
|
|
100
|
-
│ │
|
|
101
|
-
│ ┌─────────────────────────────────────────────────────────────────────────┐ │
|
|
102
|
-
│ │ fast 模式 (1阶段) │ │
|
|
103
|
-
│ │ │ │
|
|
104
|
-
│ │ ┌─────────┐ ┌─────────┐ │ │
|
|
105
|
-
│ │ │ Develop │────▶│ Done │ │ │
|
|
106
|
-
│ │ │ ✨ 编码 │ │ 🏁 完成 │ │ │
|
|
107
|
-
│ │ └─────────┘ └─────────┘ │ │
|
|
108
|
-
│ │ │ │
|
|
109
|
-
│ └─────────────────────────────────────────────────────────────────────────┘ │
|
|
110
|
-
│ │
|
|
111
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
112
|
-
│
|
|
113
|
-
▼
|
|
114
|
-
┌─────────────────────────────────────────────────────────────────────────────────┐
|
|
115
|
-
│ 阶段 3: 质量门禁 (Verify 阶段) │
|
|
116
|
-
├─────────────────────────────────────────────────────────────────────────────────┤
|
|
117
|
-
│ │
|
|
118
|
-
│ ┌──────────────────────────────────────────────────────────────────────────┐ │
|
|
119
|
-
│ │ 6 Quality Gates │ │
|
|
120
|
-
│ │ │ │
|
|
121
|
-
│ │ 🚪 Gate 1: 编译检查 │ │
|
|
122
|
-
│ │ │ $ npm run build │ │
|
|
123
|
-
│ │ └── → ✅ PASS (无编译错误) / ❌ FAIL (阻止继续) │ │
|
|
124
|
-
│ │ │ │
|
|
125
|
-
│ │ 🚪 Gate 2: 测试运行 │ │
|
|
126
|
-
│ │ │ $ npm test │ │
|
|
127
|
-
│ │ └── → ✅ PASS (所有测试通过) / ❌ FAIL (阻止继续) │ │
|
|
128
|
-
│ │ │ │
|
|
129
|
-
│ │ 🚪 Gate 3: 覆盖率检查 (strict: 80%, balanced: 60%) │ │
|
|
130
|
-
│ │ │ $ npm test -- --coverage │ │
|
|
131
|
-
│ │ └── → ✅ PASS (达标) / ⚠️ WARN (不达标但继续) │ │
|
|
132
|
-
│ │ │ │
|
|
133
|
-
│ │ 🚪 Gate 4: Lint 检查 (strict: 无error, balanced: 无严重error) │ │
|
|
134
|
-
│ │ │ $ npm run lint │ │
|
|
135
|
-
│ │ └── → ✅ PASS / ❌ FAIL (strict模式阻止) │ │
|
|
136
|
-
│ │ │ │
|
|
137
|
-
│ │ 🚪 Gate 5: 安全扫描 │ │
|
|
138
|
-
│ │ │ $ npm audit --audit-level=high │ │
|
|
139
|
-
│ │ └── → ✅ PASS (无高危漏洞) / ❌ FAIL (阻止继续) │ │
|
|
140
|
-
│ │ │ │
|
|
141
|
-
│ │ 🚪 Gate 6: 验收标准 │ │
|
|
142
|
-
│ │ │ 逐项检查用户定义的验收标准 │ │
|
|
143
|
-
│ │ └── → ✅ PASS (全部满足) / ❌ FAIL (阻止继续) │ │
|
|
144
|
-
│ │ │ │
|
|
145
|
-
│ └──────────────────────────────────────────────────────────────────────────┘ │
|
|
146
|
-
│ │
|
|
147
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
148
|
-
│
|
|
149
|
-
▼
|
|
150
|
-
┌─────────────────────────────────────────────────────────────────────────────────┐
|
|
151
|
-
│ 阶段 4: AI 验收 (Accept 阶段) │
|
|
152
|
-
├─────────────────────────────────────────────────────────────────────────────────┤
|
|
153
|
-
│ │
|
|
154
|
-
│ Reviewer Agent 执行: │
|
|
155
|
-
│ ├── 📄 读取 verify-report.md │
|
|
156
|
-
│ ├── ✅ 验证所有验收标准已满足 │
|
|
157
|
-
│ ├── 🔍 确认代码可以合并 │
|
|
158
|
-
│ ├── 📊 生成质量报告 (quality-report.json) │
|
|
159
|
-
│ └── 📝 生成验收报告 (accept-report.md) │
|
|
160
|
-
│ │
|
|
161
|
-
│ 输出示例: │
|
|
162
|
-
│ ┌──────────────────────────────────────────────────────────────────────────┐ │
|
|
163
|
-
│ │ ACCEPT_PASSED │ │
|
|
164
|
-
│ │ Quality Score: A │ │
|
|
165
|
-
│ │ ├── Tests: ✅ 15/15 passed, 82% coverage │ │
|
|
166
|
-
│ │ ├── Build: ✅ Success │ │
|
|
167
|
-
│ │ ├── Lint: ✅ No errors (3 warnings) │ │
|
|
168
|
-
│ │ ├── Security: ✅ No vulnerabilities │ │
|
|
169
|
-
│ │ └── Criteria: ✅ 5/5 acceptance criteria met │ │
|
|
170
|
-
│ └──────────────────────────────────────────────────────────────────────────┘ │
|
|
171
|
-
│ │
|
|
172
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
173
|
-
│
|
|
174
|
-
▼
|
|
175
|
-
┌─────────────────────────────────────────────────────────────────────────────────┐
|
|
176
|
-
│ 阶段 5: Meeting 处理 (如有阻塞) │
|
|
177
|
-
├─────────────────────────────────────────────────────────────────────────────────┤
|
|
178
|
-
│ │
|
|
179
|
-
│ 执行过程中遇到阻塞 → 创建 Meeting → 继续执行其他任务 │
|
|
180
|
-
│ │
|
|
181
|
-
│ 执行日志: │
|
|
182
|
-
│ ├── TASK-001: ✅ 完成 │
|
|
183
|
-
│ ├── TASK-002: ⚠️ 阻塞 → 创建 Meeting-001 → 跳过 ↷ │
|
|
184
|
-
│ ├── TASK-003: ✅ 完成 │
|
|
185
|
-
│ ├── TASK-004: ⚠️ 阻塞 → 创建 Meeting-002 → 跳过 ↷ │
|
|
186
|
-
│ └── TASK-005: ✅ 完成 │
|
|
187
|
-
│ │
|
|
188
|
-
│ 执行完成! 📋 有 2 个待处理 Meeting │
|
|
189
|
-
│ │
|
|
190
|
-
│ 用户执行: /om:meeting │
|
|
191
|
-
│ ├── [1] Meeting-001: 数据库连接失败 (TASK-002) │
|
|
192
|
-
│ │ ├── 💡 提供信息 → 重新执行 TASK-002 → ✅ 完成 │
|
|
193
|
-
│ │ ├── ⏭️ 跳过任务 → 标记为 skipped │
|
|
194
|
-
│ │ └── 🔄 重试 → 重新执行 TASK-002 │
|
|
195
|
-
│ └── [2] Meeting-002: API设计决策 (TASK-004) │
|
|
196
|
-
│ ├── 💡 提供信息 → 重新执行 TASK-004 → ✅ 完成 │
|
|
197
|
-
│ ├── ⏭️ 跳过任务 → 标记为 skipped │
|
|
198
|
-
│ └── 🔄 重试 → 重新执行 TASK-004 │
|
|
199
|
-
│ │
|
|
200
|
-
│ Meeting 处理完成后: │
|
|
201
|
-
│ └── 重新执行被阻塞的任务 (TASK-002, TASK-004) │
|
|
202
|
-
│ └── 每个任务仍需经过完整的 Phase 流程 (Develop → Verify → Accept) │
|
|
203
|
-
│ │
|
|
204
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
205
|
-
│
|
|
206
|
-
▼
|
|
207
|
-
┌─────────────────────────────────────────────────────────────────────────────────┐
|
|
208
|
-
│ 阶段 6: 最终报告 │
|
|
209
|
-
├─────────────────────────────────────────────────────────────────────────────────┤
|
|
210
|
-
│ │
|
|
211
|
-
│ /om:report │
|
|
212
|
-
│ │
|
|
213
|
-
│ 📊 执行报告: │
|
|
214
|
-
│ ├── 总任务: 5 │
|
|
215
|
-
│ ├── 完成: 5 (含 2 个 Meeting 处理后完成) │
|
|
216
|
-
│ ├── 跳过: 0 │
|
|
217
|
-
│ ├── 质量评分: A │
|
|
218
|
-
│ ├── 总耗时: 35 分钟 (含 Meeting 处理) │
|
|
219
|
-
│ └── Git 提交: 5 commits │
|
|
220
|
-
│ │
|
|
221
|
-
│ 📁 产出文件: │
|
|
222
|
-
│ ├── .openmatrix/state.json # 全局状态 │
|
|
223
|
-
│ ├── .openmatrix/tasks/TASK-001/ # 任务详情 │
|
|
224
|
-
│ │ ├── task.json # 任务定义 │
|
|
225
|
-
│ │ └── artifacts/ # 产出物 │
|
|
226
|
-
│ │ ├── result.md # 实现说明 │
|
|
227
|
-
│ │ ├── verify-report.md # 验证报告 │
|
|
228
|
-
│ │ ├── quality-report.json # 质量报告 │
|
|
229
|
-
│ │ └── accept-report.md # 验收报告 │
|
|
230
|
-
│ └── .openmatrix/approvals/ # 审批记录 (含 Meeting) │
|
|
231
|
-
│ │
|
|
232
|
-
└─────────────────────────────────────────────────────────────────────────────────┘
|
|
233
|
-
|
|
234
|
-
🎉 完成!
|
|
32
|
+
用户输入 → 质量选择 → 任务规划 → 执行 → 质量门禁 → AI验收 → Meeting处理 → 完成
|
|
235
33
|
```
|
|
236
34
|
|
|
35
|
+
| 阶段 | 说明 | 关键点 |
|
|
36
|
+
|:----:|------|--------|
|
|
37
|
+
| 0 | 交互问答 | **第一个问题选质量级别** |
|
|
38
|
+
| 1 | 任务规划 | Planner Agent 生成计划 |
|
|
39
|
+
| 2 | 任务执行 | strict/balanced/fast 三种模式 |
|
|
40
|
+
| 3 | 质量门禁 | 6 道质量门禁验证 |
|
|
41
|
+
| 4 | AI 验收 | Reviewer Agent 最终确认 |
|
|
42
|
+
| 5 | Meeting | 阻塞不中断,最后处理并**重新执行** |
|
|
43
|
+
| 6 | 最终报告 | 质量评分 + 产出文件 |
|
|
44
|
+
|
|
45
|
+
📖 **详细流程图**: [docs/FLOW.md](docs/FLOW.md) (含 Mermaid 图表)
|
|
46
|
+
|
|
237
47
|
---
|
|
238
48
|
|
|
239
49
|
## 为什么选择 OpenMatrix?
|
|
@@ -257,14 +67,39 @@
|
|
|
257
67
|
|
|
258
68
|
### 安装
|
|
259
69
|
|
|
70
|
+
**方式一: NPM 安装 (推荐)**
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# 全局安装
|
|
74
|
+
npm install -g openmatrix
|
|
75
|
+
|
|
76
|
+
# Skills 会自动安装到 ~/.claude/commands/om/
|
|
77
|
+
# 如果自动安装失败,手动执行:
|
|
78
|
+
openmatrix install-skills
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**方式二: 从源码安装**
|
|
82
|
+
|
|
260
83
|
```bash
|
|
261
84
|
# 克隆并安装
|
|
262
85
|
git clone https://github.com/bigfish1913/openmatrix.git
|
|
263
86
|
cd openmatrix && npm install && npm run build && npm link
|
|
264
87
|
|
|
265
|
-
#
|
|
266
|
-
|
|
267
|
-
|
|
88
|
+
# 安装 Skills (如果 postinstall 未自动执行)
|
|
89
|
+
openmatrix install-skills
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 验证安装
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# 检查 CLI 是否可用
|
|
96
|
+
openmatrix --version
|
|
97
|
+
|
|
98
|
+
# 检查 Skills 是否安装成功
|
|
99
|
+
openmatrix install-skills
|
|
100
|
+
# 或直接查看
|
|
101
|
+
ls ~/.claude/commands/om/
|
|
102
|
+
# 应显示: start.md auto.md status.md approve.md meeting.md resume.md retry.md report.md
|
|
268
103
|
```
|
|
269
104
|
|
|
270
105
|
### 第一次使用
|
|
@@ -290,9 +125,11 @@ cp skills/*.md ~/.claude/commands/om/
|
|
|
290
125
|
|
|
291
126
|
| 级别 | TDD | 覆盖率 | Lint | 安全 | AI验收 | 适用场景 |
|
|
292
127
|
|:----:|:---:|:------:|:----:|:----:|:------:|---------|
|
|
293
|
-
| **strict** | ✅ | 80% | ✅ 严格 | ✅ | ✅ | 🏭 **生产代码** |
|
|
294
|
-
| **balanced** | ❌ | 60% | ✅ | ✅ | ✅ | 📦 日常开发 |
|
|
295
|
-
| **fast** | ❌ |
|
|
128
|
+
| **strict** | ✅ | >80% | ✅ 严格 | ✅ | ✅ | 🏭 **生产代码** |
|
|
129
|
+
| **balanced** | ❌ | >60% | ✅ | ✅ | ✅ | 📦 日常开发 |
|
|
130
|
+
| **fast** | ❌ | >20% | ❌ | ❌ | ❌ | 🏃 快速原型 |
|
|
131
|
+
|
|
132
|
+
> strict 可配置为 100%。默认 >80% 覆盖核心业务逻辑。
|
|
296
133
|
|
|
297
134
|
### 2️⃣ 六道质量门禁 (Verify 阶段)
|
|
298
135
|
|
|
@@ -302,7 +139,7 @@ cp skills/*.md ~/.claude/commands/om/
|
|
|
302
139
|
├─────────────────────────────────────────────────────────────┤
|
|
303
140
|
│ 🚪 Gate 1: 编译检查 npm run build → 必须通过 │
|
|
304
141
|
│ 🚪 Gate 2: 测试运行 npm test → 必须通过 │
|
|
305
|
-
│ 🚪 Gate 3: 覆盖率检查
|
|
142
|
+
│ 🚪 Gate 3: 覆盖率检查 >20%/60%/80% → 可配置 │
|
|
306
143
|
│ 🚪 Gate 4: Lint 检查 无 error → 可配置 │
|
|
307
144
|
│ 🚪 Gate 5: 安全扫描 npm audit → 无高危漏洞 │
|
|
308
145
|
│ 🚪 Gate 6: 验收标准 用户定义 → 必须全部满足 │
|
|
@@ -374,6 +211,7 @@ Accept 阶段由 Reviewer Agent 执行:
|
|
|
374
211
|
| 命令 | 用途 |
|
|
375
212
|
|------|------|
|
|
376
213
|
| `/om:start` | 启动新任务 (第一个问题选质量级别) |
|
|
214
|
+
| `/om:auto` | 🚀 **全自动执行** - 无阻塞、无确认、直接完成 |
|
|
377
215
|
| `/om:status` | 查看状态 |
|
|
378
216
|
| `/om:approve` | 审批决策 |
|
|
379
217
|
| `/om:meeting` | 处理阻塞问题 |
|
|
@@ -381,6 +219,84 @@ Accept 阶段由 Reviewer Agent 执行:
|
|
|
381
219
|
| `/om:retry` | 重试失败 |
|
|
382
220
|
| `/om:report` | 生成报告 |
|
|
383
221
|
|
|
222
|
+
### `/om:start` 执行流程 (含 Meeting 机制)
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
┌──────────────────────────────────────────────────────────────────────────┐
|
|
226
|
+
│ 执行阶段 │
|
|
227
|
+
├──────────────────────────────────────────────────────────────────────────┤
|
|
228
|
+
│ │
|
|
229
|
+
│ TASK-001 ✅ ──→ TASK-002 ⚠️阻塞 ──→ 创建Meeting ──→ 跳过 ↷ │
|
|
230
|
+
│ │ │
|
|
231
|
+
│ ↓ │
|
|
232
|
+
│ TASK-003 ✅ ──→ TASK-004 ✅ ──→ TASK-005 ✅ ──→ 所有任务执行完成 │
|
|
233
|
+
│ │
|
|
234
|
+
└──────────────────────────────────────────────────────────────────────────┘
|
|
235
|
+
│
|
|
236
|
+
▼
|
|
237
|
+
┌──────────────────────────────────────────────────────────────────────────┐
|
|
238
|
+
│ Meeting 自动检测 │
|
|
239
|
+
├──────────────────────────────────────────────────────────────────────────┤
|
|
240
|
+
│ │
|
|
241
|
+
│ ┌─────────────────────┐ │
|
|
242
|
+
│ │ 有 pending Meeting? │ │
|
|
243
|
+
│ └──────────┬──────────┘ │
|
|
244
|
+
│ ╱ \ │
|
|
245
|
+
│ 否 是 │
|
|
246
|
+
│ │ │ │
|
|
247
|
+
│ ▼ ▼ │
|
|
248
|
+
│ ┌───────┐ ┌─────────────────────────────┐ │
|
|
249
|
+
│ │ 完成! │ │ 📋 交互式处理 Meeting │ │
|
|
250
|
+
│ └───────┘ │ ┌─────────────────────────┐│ │
|
|
251
|
+
│ │ │ [1] TASK-002: 数据库连接││ │
|
|
252
|
+
│ │ │ 💡提供信息 / ⏭️跳过 ││ │
|
|
253
|
+
│ │ │ [2] TASK-005: API决策 ││ │
|
|
254
|
+
│ │ │ 🤔选择方案 ││ │
|
|
255
|
+
│ │ └─────────────────────────┘│ │
|
|
256
|
+
│ └──────────────┬──────────────┘ │
|
|
257
|
+
│ │ │
|
|
258
|
+
│ ▼ │
|
|
259
|
+
│ ┌─────────────────────────────┐ │
|
|
260
|
+
│ │ 用户提供信息/选择方案 │ │
|
|
261
|
+
│ │ ↓ │ │
|
|
262
|
+
│ │ 🔄 重新执行阻塞任务 │ │
|
|
263
|
+
│ │ TASK-002 ✅ │ │
|
|
264
|
+
│ └──────────────┬──────────────┘ │
|
|
265
|
+
│ │ │
|
|
266
|
+
└────────────────────────────────────────────┼──────────────────────────────┘
|
|
267
|
+
│
|
|
268
|
+
▼
|
|
269
|
+
┌───────────┐
|
|
270
|
+
│ 完成! 🎉 │
|
|
271
|
+
└───────────┘
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### `/om:auto` 全自动模式
|
|
275
|
+
|
|
276
|
+
**适用场景**: CI/CD、自动化脚本、无需人工干预的任务
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
/om:auto 实现用户登录功能 # 默认 strict 模式
|
|
280
|
+
/om:auto --mode=balanced 添加API接口 # 指定 balanced 模式
|
|
281
|
+
/om:auto --fast 创建CLI工具 # 快速原型模式
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**特点**:
|
|
285
|
+
- ❌ 无审批点确认
|
|
286
|
+
- ❌ 无 Phase 间暂停
|
|
287
|
+
- ❌ Meeting 自动跳过 (记录但不阻塞)
|
|
288
|
+
- ✅ 默认 strict 质量级别
|
|
289
|
+
- ✅ 适合 CI/CD 集成
|
|
290
|
+
|
|
291
|
+
**与 `/om:start` 对比**:
|
|
292
|
+
|
|
293
|
+
| 特性 | `/om:start` | `/om:auto` |
|
|
294
|
+
|------|-------------|------------|
|
|
295
|
+
| 质量级别 | 交互式选择 | 参数指定/默认 strict |
|
|
296
|
+
| 审批确认 | 根据配置 | 全部跳过 |
|
|
297
|
+
| Meeting | 交互式处理 | 自动跳过 |
|
|
298
|
+
| 适用场景 | 日常开发 | CI/CD、自动化 |
|
|
299
|
+
|
|
384
300
|
---
|
|
385
301
|
|
|
386
302
|
## 质量报告
|
|
@@ -456,6 +372,8 @@ cd openmatrix && npm install && npm run build && npm test
|
|
|
456
372
|
- [x] Meeting 机制
|
|
457
373
|
- [x] 质量报告
|
|
458
374
|
- [x] AI 验收
|
|
375
|
+
- [x] `/om:auto` 全自动模式
|
|
376
|
+
- [x] Meeting 自动处理
|
|
459
377
|
- [ ] VSCode 扩展
|
|
460
378
|
- [ ] Python/Go 支持
|
|
461
379
|
- [ ] CI/CD 集成
|
|
@@ -469,44 +387,3 @@ cd openmatrix && npm install && npm run build && npm test
|
|
|
469
387
|
MIT © 2024 | Made by [bigfish1913](https://github.com/bigfish1913)
|
|
470
388
|
|
|
471
389
|
</div>
|
|
472
|
-
|
|
473
|
-
---
|
|
474
|
-
|
|
475
|
-
# English
|
|
476
|
-
|
|
477
|
-
## OpenMatrix: High Quality + Full Automation
|
|
478
|
-
|
|
479
|
-
The **only** AI task orchestration with TDD + Quality Gates + 100% Automation.
|
|
480
|
-
|
|
481
|
-
### Quick Start
|
|
482
|
-
|
|
483
|
-
```bash
|
|
484
|
-
# Install
|
|
485
|
-
git clone https://github.com/bigfish1913/openmatrix.git
|
|
486
|
-
cd openmatrix && npm install && npm run build && npm link
|
|
487
|
-
mkdir -p ~/.claude/commands/om && cp skills/*.md ~/.claude/commands/om/
|
|
488
|
-
|
|
489
|
-
# Use (first question asks quality level)
|
|
490
|
-
/om:start Implement user login
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
### Quality Levels
|
|
494
|
-
|
|
495
|
-
| Level | TDD | Coverage | Gates | Use Case |
|
|
496
|
-
|-------|:---:|:--------:|:-----:|----------|
|
|
497
|
-
| **strict** | ✅ | 80% | 6 | Production code |
|
|
498
|
-
| **balanced** | ❌ | 60% | 4 | Daily development |
|
|
499
|
-
| **fast** | ❌ | 0% | 1 | Prototypes |
|
|
500
|
-
|
|
501
|
-
### Key Features
|
|
502
|
-
|
|
503
|
-
- ✅ **Quality Level Selection** - First question you answer
|
|
504
|
-
- ✅ **TDD Mode** - strict level includes test-first
|
|
505
|
-
- ✅ **6 Quality Gates** - Build, Tests, Coverage, Lint, Security, Acceptance
|
|
506
|
-
- ✅ **AI Acceptance** - Reviewer Agent validates final result
|
|
507
|
-
- ✅ **Meeting Mechanism** - Blockers don't stop execution
|
|
508
|
-
- ✅ **Quality Reports** - JSON format for every task
|
|
509
|
-
|
|
510
|
-
### License
|
|
511
|
-
|
|
512
|
-
MIT
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.autoCommand = void 0;
|
|
37
|
+
// src/cli/commands/auto.ts
|
|
38
|
+
const commander_1 = require("commander");
|
|
39
|
+
const state_manager_js_1 = require("../../storage/state-manager.js");
|
|
40
|
+
const task_parser_js_1 = require("../../orchestrator/task-parser.js");
|
|
41
|
+
const task_planner_js_1 = require("../../orchestrator/task-planner.js");
|
|
42
|
+
const approval_manager_js_1 = require("../../orchestrator/approval-manager.js");
|
|
43
|
+
const executor_js_1 = require("../../orchestrator/executor.js");
|
|
44
|
+
const index_js_1 = require("../../types/index.js");
|
|
45
|
+
const fs = __importStar(require("fs/promises"));
|
|
46
|
+
const path = __importStar(require("path"));
|
|
47
|
+
exports.autoCommand = new commander_1.Command('auto')
|
|
48
|
+
.description('全自动执行任务 - 无阻塞,bypass permissions')
|
|
49
|
+
.argument('[input]', '任务文件路径或描述')
|
|
50
|
+
.option('-q, --quality <level>', '质量级别 (strict|balanced|fast)', 'strict')
|
|
51
|
+
.option('--json', '输出 JSON 格式 (供 Skill 解析)')
|
|
52
|
+
.action(async (input, options) => {
|
|
53
|
+
const basePath = process.cwd();
|
|
54
|
+
const omPath = path.join(basePath, '.openmatrix');
|
|
55
|
+
// 确保目录存在
|
|
56
|
+
await fs.mkdir(omPath, { recursive: true });
|
|
57
|
+
await fs.mkdir(path.join(omPath, 'tasks'), { recursive: true });
|
|
58
|
+
await fs.mkdir(path.join(omPath, 'approvals'), { recursive: true });
|
|
59
|
+
const stateManager = new state_manager_js_1.StateManager(omPath);
|
|
60
|
+
await stateManager.initialize();
|
|
61
|
+
const state = await stateManager.getState();
|
|
62
|
+
// 检查是否已有运行中的任务
|
|
63
|
+
if (state.status === 'running') {
|
|
64
|
+
if (options.json) {
|
|
65
|
+
console.log(JSON.stringify({
|
|
66
|
+
status: 'error',
|
|
67
|
+
message: '已有任务在执行中',
|
|
68
|
+
hint: '使用 /om:status 查看状态,或 /om:resume 恢复执行'
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
console.log('⚠️ 已有任务在执行中');
|
|
73
|
+
console.log(' 使用 /om:status 查看状态');
|
|
74
|
+
console.log(' 使用 /om:resume 恢复执行');
|
|
75
|
+
}
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
// 验证质量级别
|
|
79
|
+
const qualityLevel = options.quality;
|
|
80
|
+
if (!['strict', 'balanced', 'fast'].includes(qualityLevel)) {
|
|
81
|
+
if (options.json) {
|
|
82
|
+
console.log(JSON.stringify({
|
|
83
|
+
status: 'error',
|
|
84
|
+
message: `无效的质量级别: ${qualityLevel}`,
|
|
85
|
+
hint: '可选值: strict, balanced, fast'
|
|
86
|
+
}));
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
console.log(`❌ 无效的质量级别: ${qualityLevel}`);
|
|
90
|
+
console.log(' 可选值: strict, balanced, fast');
|
|
91
|
+
}
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
// 获取任务内容
|
|
95
|
+
let taskContent = input;
|
|
96
|
+
if (!taskContent) {
|
|
97
|
+
// 尝试读取默认任务文件
|
|
98
|
+
const defaultPath = path.join(basePath, 'TASK.md');
|
|
99
|
+
try {
|
|
100
|
+
taskContent = await fs.readFile(defaultPath, 'utf-8');
|
|
101
|
+
if (!options.json) {
|
|
102
|
+
console.log(`📄 读取任务文件: ${defaultPath}`);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
catch {
|
|
106
|
+
if (options.json) {
|
|
107
|
+
console.log(JSON.stringify({
|
|
108
|
+
status: 'error',
|
|
109
|
+
message: '请提供任务文件路径或描述'
|
|
110
|
+
}));
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
console.log('❌ 请提供任务文件路径或描述');
|
|
114
|
+
console.log(' 用法: openmatrix auto <task.md>');
|
|
115
|
+
console.log(' 或创建 TASK.md 文件');
|
|
116
|
+
}
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
else if (taskContent.endsWith('.md')) {
|
|
121
|
+
// 读取文件
|
|
122
|
+
try {
|
|
123
|
+
taskContent = await fs.readFile(taskContent, 'utf-8');
|
|
124
|
+
if (!options.json) {
|
|
125
|
+
console.log(`📄 读取任务文件: ${input}`);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
if (options.json) {
|
|
130
|
+
console.log(JSON.stringify({
|
|
131
|
+
status: 'error',
|
|
132
|
+
message: `无法读取文件: ${input}`
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
console.log(`❌ 无法读取文件: ${input}`);
|
|
137
|
+
}
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
// 解析任务
|
|
142
|
+
if (!options.json) {
|
|
143
|
+
console.log('\n🔍 解析任务...');
|
|
144
|
+
}
|
|
145
|
+
const parser = new task_parser_js_1.TaskParser();
|
|
146
|
+
const parsedTask = parser.parse(taskContent);
|
|
147
|
+
if (!options.json) {
|
|
148
|
+
console.log(`\n📋 任务: ${parsedTask.title}`);
|
|
149
|
+
console.log(` 目标: ${parsedTask.goals.join(', ')}`);
|
|
150
|
+
}
|
|
151
|
+
// 拆解任务
|
|
152
|
+
if (!options.json) {
|
|
153
|
+
console.log('\n🔧 拆解任务...');
|
|
154
|
+
}
|
|
155
|
+
const planner = new task_planner_js_1.TaskPlanner();
|
|
156
|
+
const subTasks = planner.breakdown(parsedTask, {});
|
|
157
|
+
// 创建任务到状态管理器
|
|
158
|
+
for (const subTask of subTasks) {
|
|
159
|
+
await stateManager.createTask({
|
|
160
|
+
title: subTask.title,
|
|
161
|
+
description: subTask.description,
|
|
162
|
+
priority: subTask.priority,
|
|
163
|
+
timeout: subTask.estimatedComplexity === 'high' ? 300000 :
|
|
164
|
+
subTask.estimatedComplexity === 'medium' ? 180000 : 120000,
|
|
165
|
+
dependencies: subTask.dependencies,
|
|
166
|
+
assignedAgent: subTask.assignedAgent
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
// 获取质量配置
|
|
170
|
+
const qualityConfig = index_js_1.QUALITY_PRESETS[qualityLevel];
|
|
171
|
+
// auto 模式: 空审批点数组 = bypass permissions
|
|
172
|
+
const approvalPoints = [];
|
|
173
|
+
// 更新状态
|
|
174
|
+
await stateManager.updateState({
|
|
175
|
+
status: 'running',
|
|
176
|
+
currentPhase: 'execution',
|
|
177
|
+
config: {
|
|
178
|
+
...state.config,
|
|
179
|
+
approvalPoints: approvalPoints,
|
|
180
|
+
quality: qualityConfig
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
// 创建执行器并获取第一批任务
|
|
184
|
+
const approvalManager = new approval_manager_js_1.ApprovalManager(stateManager);
|
|
185
|
+
const executor = new executor_js_1.OrchestratorExecutor(stateManager, approvalManager, {
|
|
186
|
+
maxConcurrent: state.config.maxConcurrentAgents,
|
|
187
|
+
taskTimeout: state.config.timeout * 1000
|
|
188
|
+
});
|
|
189
|
+
// 设置自动模式
|
|
190
|
+
const phaseExecutor = executor.getPhaseExecutor();
|
|
191
|
+
if (phaseExecutor) {
|
|
192
|
+
phaseExecutor.setAutoMode(true);
|
|
193
|
+
}
|
|
194
|
+
const result = await executor.step();
|
|
195
|
+
if (options.json) {
|
|
196
|
+
// JSON 输出供 Skill 解析
|
|
197
|
+
console.log(JSON.stringify({
|
|
198
|
+
status: result.status,
|
|
199
|
+
message: result.message,
|
|
200
|
+
mode: 'auto',
|
|
201
|
+
quality: qualityLevel,
|
|
202
|
+
bypassPermissions: true,
|
|
203
|
+
statistics: result.statistics,
|
|
204
|
+
subagentTasks: result.subagentTasks.map(t => ({
|
|
205
|
+
subagent_type: t.subagent_type,
|
|
206
|
+
description: t.description,
|
|
207
|
+
prompt: t.prompt,
|
|
208
|
+
isolation: t.isolation,
|
|
209
|
+
taskId: t.taskId,
|
|
210
|
+
agentType: t.agentType,
|
|
211
|
+
timeout: t.timeout
|
|
212
|
+
}))
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
else {
|
|
216
|
+
console.log(`\n📋 生成 ${subTasks.length} 个子任务:\n`);
|
|
217
|
+
subTasks.forEach((task, i) => {
|
|
218
|
+
console.log(` ${i + 1}. ${task.title} (${task.priority})`);
|
|
219
|
+
});
|
|
220
|
+
console.log(`\n🚀 全自动执行模式`);
|
|
221
|
+
console.log(` 质量级别: ${qualityLevel}`);
|
|
222
|
+
console.log(` 审批点: 无 (bypass permissions)`);
|
|
223
|
+
console.log('\n⏳ 开始执行...');
|
|
224
|
+
console.log(' 使用 /om:status 查看进度');
|
|
225
|
+
}
|
|
226
|
+
});
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.installSkillsCommand = void 0;
|
|
38
|
+
const commander_1 = require("commander");
|
|
39
|
+
const fs = __importStar(require("fs"));
|
|
40
|
+
const path = __importStar(require("path"));
|
|
41
|
+
const os = __importStar(require("os"));
|
|
42
|
+
exports.installSkillsCommand = new commander_1.Command('install-skills')
|
|
43
|
+
.description('Install OpenMatrix skills to ~/.claude/commands/om/')
|
|
44
|
+
.option('-f, --force', 'Force overwrite existing skills', false)
|
|
45
|
+
.action((options) => {
|
|
46
|
+
const skillsDir = path.join(__dirname, '..', '..', '..', 'skills');
|
|
47
|
+
const claudeDir = path.join(os.homedir(), '.claude');
|
|
48
|
+
const commandsDir = path.join(claudeDir, 'commands', 'om');
|
|
49
|
+
console.log('📦 OpenMatrix Skills Installer\n');
|
|
50
|
+
// Check if skills directory exists
|
|
51
|
+
if (!fs.existsSync(skillsDir)) {
|
|
52
|
+
console.error('❌ Skills directory not found:', skillsDir);
|
|
53
|
+
console.error(' Make sure openmatrix is installed correctly.');
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
// Create commands directory
|
|
57
|
+
try {
|
|
58
|
+
if (!fs.existsSync(commandsDir)) {
|
|
59
|
+
fs.mkdirSync(commandsDir, { recursive: true });
|
|
60
|
+
console.log('📁 Created directory:', commandsDir);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
catch (err) {
|
|
64
|
+
console.error('❌ Cannot create directory:', commandsDir);
|
|
65
|
+
console.error(' Error:', err.message);
|
|
66
|
+
process.exit(1);
|
|
67
|
+
}
|
|
68
|
+
// Get skill files
|
|
69
|
+
const files = fs.readdirSync(skillsDir).filter(f => f.endsWith('.md'));
|
|
70
|
+
if (files.length === 0) {
|
|
71
|
+
console.error('❌ No skill files found in:', skillsDir);
|
|
72
|
+
process.exit(1);
|
|
73
|
+
}
|
|
74
|
+
console.log(`📋 Found ${files.length} skill files\n`);
|
|
75
|
+
let installed = 0;
|
|
76
|
+
let skipped = 0;
|
|
77
|
+
let failed = 0;
|
|
78
|
+
files.forEach(file => {
|
|
79
|
+
const src = path.join(skillsDir, file);
|
|
80
|
+
const dest = path.join(commandsDir, file);
|
|
81
|
+
try {
|
|
82
|
+
// Check if file exists and not forcing
|
|
83
|
+
if (fs.existsSync(dest) && !options.force) {
|
|
84
|
+
console.log(` ⏭️ Skipped: ${file} (already exists)`);
|
|
85
|
+
skipped++;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
fs.copyFileSync(src, dest);
|
|
89
|
+
const skillName = path.basename(file, '.md');
|
|
90
|
+
console.log(` ✅ Installed: /om:${skillName}`);
|
|
91
|
+
installed++;
|
|
92
|
+
}
|
|
93
|
+
catch (err) {
|
|
94
|
+
console.log(` ❌ Failed: ${file} (${err.message})`);
|
|
95
|
+
failed++;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
console.log('\n' + '─'.repeat(50));
|
|
99
|
+
console.log(`📊 Summary:`);
|
|
100
|
+
console.log(` ✅ Installed: ${installed}`);
|
|
101
|
+
console.log(` ⏭️ Skipped: ${skipped}`);
|
|
102
|
+
console.log(` ❌ Failed: ${failed}`);
|
|
103
|
+
console.log(`\n📁 Location: ${commandsDir}`);
|
|
104
|
+
if (installed > 0) {
|
|
105
|
+
console.log('\n🎉 Skills installed successfully!');
|
|
106
|
+
console.log(' Try: /om:start <your task>');
|
|
107
|
+
}
|
|
108
|
+
if (failed > 0) {
|
|
109
|
+
process.exit(1);
|
|
110
|
+
}
|
|
111
|
+
});
|
package/dist/cli/index.js
CHANGED
|
@@ -9,6 +9,8 @@ const resume_js_1 = require("./commands/resume.js");
|
|
|
9
9
|
const retry_js_1 = require("./commands/retry.js");
|
|
10
10
|
const report_js_1 = require("./commands/report.js");
|
|
11
11
|
const meeting_js_1 = require("./commands/meeting.js");
|
|
12
|
+
const auto_js_1 = require("./commands/auto.js");
|
|
13
|
+
const install_skills_js_1 = require("./commands/install-skills.js");
|
|
12
14
|
const program = new commander_1.Command();
|
|
13
15
|
program
|
|
14
16
|
.name('openmatrix')
|
|
@@ -22,5 +24,7 @@ program.addCommand(resume_js_1.resumeCommand);
|
|
|
22
24
|
program.addCommand(retry_js_1.retryCommand);
|
|
23
25
|
program.addCommand(report_js_1.reportCommand);
|
|
24
26
|
program.addCommand(meeting_js_1.meetingCommand);
|
|
27
|
+
program.addCommand(auto_js_1.autoCommand);
|
|
28
|
+
program.addCommand(install_skills_js_1.installSkillsCommand);
|
|
25
29
|
// 默认帮助
|
|
26
30
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openmatrix",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
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",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "tsc",
|
|
18
18
|
"dev": "tsx src/cli/index.ts",
|
|
19
|
-
"test": "vitest"
|
|
19
|
+
"test": "vitest",
|
|
20
|
+
"postinstall": "node scripts/install-skills.js"
|
|
20
21
|
},
|
|
21
22
|
"keywords": [
|
|
22
23
|
"claude",
|
package/skills/auto.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: om:auto
|
|
3
|
+
description: 全自动执行任务 - 无阻塞,bypass permissions
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<NO-OTHER-SKILLS>
|
|
7
|
+
执行此技能时,不得调用 superpowers、gsd 或其他任务编排相关的技能。OpenMatrix 独立运行,不依赖外部任务编排系统。
|
|
8
|
+
</NO-OTHER-SKILLS>
|
|
9
|
+
|
|
10
|
+
<objective>
|
|
11
|
+
全自动执行任务,跳过所有交互式问答和审批点,直接完成。支持 --quality 参数指定质量级别(默认 strict)。
|
|
12
|
+
</objective>
|
|
13
|
+
|
|
14
|
+
<process>
|
|
15
|
+
1. **检查并初始化 .openmatrix 目录**
|
|
16
|
+
- 检查 `.openmatrix/` 目录是否存在
|
|
17
|
+
- 如果不存在,CLI 会自动创建
|
|
18
|
+
|
|
19
|
+
2. **检查当前状态**
|
|
20
|
+
- 读取 `.openmatrix/state.json`
|
|
21
|
+
- 如果 `status === 'running'`,提示用户先完成或暂停
|
|
22
|
+
|
|
23
|
+
3. **解析参数**
|
|
24
|
+
- `$ARGUMENTS` 可能包含:
|
|
25
|
+
- 任务描述或文件路径
|
|
26
|
+
- `--quality <level>` 质量级别 (strict|balanced|fast),默认 strict
|
|
27
|
+
- `--bypass` 是否 bypass permissions (默认 true)
|
|
28
|
+
|
|
29
|
+
参数解析示例:
|
|
30
|
+
```
|
|
31
|
+
/om:auto "实现用户登录" --quality fast
|
|
32
|
+
/om:auto task.md
|
|
33
|
+
/om:auto task.md --quality balanced
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
4. **解析任务输入**
|
|
37
|
+
- 如果提供文件路径 → 读取文件内容
|
|
38
|
+
- 如果是任务描述 → 直接使用
|
|
39
|
+
- 如果无参数 → **使用 AskUserQuestion 询问任务**
|
|
40
|
+
|
|
41
|
+
5. **直接执行 (无交互式问答)**
|
|
42
|
+
- 跳过所有澄清问题
|
|
43
|
+
- 使用默认质量配置 (strict 除非指定)
|
|
44
|
+
- 设置 `approvalPoints: []` (bypass permissions)
|
|
45
|
+
|
|
46
|
+
6. **调用 CLI**
|
|
47
|
+
```bash
|
|
48
|
+
openmatrix auto --quality <level> --json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
7. **执行循环 (全自动)**
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
while (有待执行任务) {
|
|
55
|
+
1. 读取状态文件获取 SubagentTask
|
|
56
|
+
2. 调用 Agent 工具执行 Subagent
|
|
57
|
+
3. Subagent 完成后,更新状态文件:
|
|
58
|
+
```bash
|
|
59
|
+
openmatrix complete <taskId> --success/--failed
|
|
60
|
+
```
|
|
61
|
+
4. **Git 自动提交** (每个子任务完成后):
|
|
62
|
+
```bash
|
|
63
|
+
git add -A
|
|
64
|
+
git commit -m "feat(task-id): 任务标题
|
|
65
|
+
|
|
66
|
+
- 修改内容1
|
|
67
|
+
- 修改内容2
|
|
68
|
+
|
|
69
|
+
任务ID: TASK-XXX
|
|
70
|
+
RunID: run-XXX"
|
|
71
|
+
```
|
|
72
|
+
5. Phase 验收测试
|
|
73
|
+
6. **自动批准所有审批点**:
|
|
74
|
+
- plan/merge/deploy → 自动批准 ✓
|
|
75
|
+
- meeting → 记录并跳过,继续执行
|
|
76
|
+
7. 继续下一个任务
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
8. **执行完成 - 最终 Git 提交**
|
|
81
|
+
|
|
82
|
+
所有任务完成后,执行最终提交:
|
|
83
|
+
```bash
|
|
84
|
+
git add -A
|
|
85
|
+
git commit -m "feat: 完成所有任务 (auto mode)
|
|
86
|
+
|
|
87
|
+
RunID: run-XXX
|
|
88
|
+
任务数: N
|
|
89
|
+
完成时间: YYYY-MM-DD HH:mm:ss"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
9. **展示 Meeting (如果有)**
|
|
93
|
+
如果有 pending 的 Meeting,列出供用户后续处理:
|
|
94
|
+
```
|
|
95
|
+
执行完成!
|
|
96
|
+
📋 有待处理的 Meeting (2个):
|
|
97
|
+
- APPR-001: 数据库连接失败 (TASK-B)
|
|
98
|
+
- APPR-002: API设计决策 (TASK-D)
|
|
99
|
+
|
|
100
|
+
请使用 /om:meeting 查看并处理
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</process>
|
|
104
|
+
|
|
105
|
+
<arguments>
|
|
106
|
+
$ARGUMENTS
|
|
107
|
+
</arguments>
|
|
108
|
+
|
|
109
|
+
<examples>
|
|
110
|
+
/om:auto # 交互式输入任务
|
|
111
|
+
/om:auto "实现用户登录功能" # 直接执行,strict 质量
|
|
112
|
+
/om:auto task.md --quality fast # 快速模式,无质量门禁
|
|
113
|
+
/om:auto task.md --quality balanced # 平衡模式
|
|
114
|
+
/om:auto task.md --quality strict # 严格模式 (默认)
|
|
115
|
+
</examples>
|
|
116
|
+
|
|
117
|
+
<notes>
|
|
118
|
+
## 质量级别
|
|
119
|
+
|
|
120
|
+
| 级别 | TDD | 覆盖率 | Lint | 安全扫描 | 适用场景 |
|
|
121
|
+
|------|:---:|:------:|:----:|:--------:|---------|
|
|
122
|
+
| **strict** | ✅ | >80% | ✅ 严格 | ✅ | 生产代码 (默认) |
|
|
123
|
+
| **balanced** | ❌ | >60% | ✅ | ✅ | 日常开发 |
|
|
124
|
+
| **fast** | ❌ | >20% | ❌ | ❌ | 快速原型 |
|
|
125
|
+
|
|
126
|
+
## 与 /om:start 的区别
|
|
127
|
+
|
|
128
|
+
| 特性 | /om:start | /om:auto |
|
|
129
|
+
|------|-----------|----------|
|
|
130
|
+
| 交互式问答 | ✅ 必须 | ❌ 跳过 |
|
|
131
|
+
| 质量级别选择 | 交互选择 | 参数指定,默认 strict |
|
|
132
|
+
| 执行模式选择 | 交互选择 | 固定 auto |
|
|
133
|
+
| 审批点 | 可配置 | 无 (bypass) |
|
|
134
|
+
| Meeting 处理 | 执行中交互 | 记录并跳过 |
|
|
135
|
+
|
|
136
|
+
## CLI 命令
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# 全自动执行,strict 质量
|
|
140
|
+
openmatrix auto task.md
|
|
141
|
+
|
|
142
|
+
# 全自动执行,fast 质量
|
|
143
|
+
openmatrix auto task.md --quality fast
|
|
144
|
+
|
|
145
|
+
# JSON 输出 (供 Skill 解析)
|
|
146
|
+
openmatrix auto task.md --json
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
## 状态配置
|
|
150
|
+
|
|
151
|
+
auto 模式下的状态配置:
|
|
152
|
+
```json
|
|
153
|
+
{
|
|
154
|
+
"status": "running",
|
|
155
|
+
"config": {
|
|
156
|
+
"approvalPoints": [],
|
|
157
|
+
"quality": {
|
|
158
|
+
"level": "strict",
|
|
159
|
+
"tdd": true,
|
|
160
|
+
"minCoverage": 80,
|
|
161
|
+
"strictLint": true,
|
|
162
|
+
"securityScan": true
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## 执行流程图
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
┌─────────────────┐
|
|
172
|
+
│ /om:auto │
|
|
173
|
+
│ 解析参数 │
|
|
174
|
+
└────────┬────────┘
|
|
175
|
+
│
|
|
176
|
+
▼
|
|
177
|
+
┌─────────────────┐
|
|
178
|
+
│ 读取任务内容 │
|
|
179
|
+
│ (文件或描述) │
|
|
180
|
+
└────────┬────────┘
|
|
181
|
+
│
|
|
182
|
+
▼
|
|
183
|
+
┌─────────────────┐
|
|
184
|
+
│ CLI: auto │
|
|
185
|
+
│ --quality=X │
|
|
186
|
+
│ approvalPoints │
|
|
187
|
+
│ = [] │
|
|
188
|
+
└────────┬────────┘
|
|
189
|
+
│
|
|
190
|
+
▼
|
|
191
|
+
┌─────────────────┐
|
|
192
|
+
│ 执行循环 │◀────────────┐
|
|
193
|
+
│ (无阻塞) │ │
|
|
194
|
+
└────────┬────────┘ │
|
|
195
|
+
│ │
|
|
196
|
+
▼ │
|
|
197
|
+
┌───────────┐ │
|
|
198
|
+
│ Agent执行 │ │
|
|
199
|
+
└─────┬─────┘ │
|
|
200
|
+
│ │
|
|
201
|
+
▼ │
|
|
202
|
+
┌───────────┐ │
|
|
203
|
+
│ 自动批准 │ │
|
|
204
|
+
│ (无阻塞) │ │
|
|
205
|
+
└─────┬─────┘ │
|
|
206
|
+
│ │
|
|
207
|
+
▼ │
|
|
208
|
+
┌───────────┐ 否 │
|
|
209
|
+
│ 还有任务? │────────────────┘
|
|
210
|
+
└─────┬─────┘
|
|
211
|
+
│ 是
|
|
212
|
+
▼
|
|
213
|
+
┌─────────────────┐
|
|
214
|
+
│ 展示 Meeting │
|
|
215
|
+
│ (如果有) │
|
|
216
|
+
└─────────────────┘
|
|
217
|
+
```
|
|
218
|
+
</notes>
|
package/skills/start.md
CHANGED
|
@@ -12,11 +12,19 @@ description: 启动新的任务执行周期
|
|
|
12
12
|
</objective>
|
|
13
13
|
|
|
14
14
|
<process>
|
|
15
|
-
1.
|
|
15
|
+
1. **检查并初始化 .openmatrix 目录**
|
|
16
|
+
- 检查 `.openmatrix/` 目录是否存在
|
|
17
|
+
- 如果不存在,调用 CLI 初始化:
|
|
18
|
+
```bash
|
|
19
|
+
openmatrix start --init-only
|
|
20
|
+
```
|
|
21
|
+
- 这会创建 `.openmatrix/`、`.openmatrix/tasks/`、`.openmatrix/approvals/` 目录
|
|
22
|
+
|
|
23
|
+
2. **检查当前状态**
|
|
16
24
|
- 读取 `.openmatrix/state.json`
|
|
17
25
|
- 如果 `status === 'running'`,提示用户先完成或暂停
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
3. **检查 Git 仓库**
|
|
20
28
|
- 检查当前目录是否存在 `.git` 文件夹
|
|
21
29
|
- 如果没有:
|
|
22
30
|
- 询问用户是否初始化 Git 仓库 (使用 AskUserQuestion)
|
|
@@ -25,12 +33,12 @@ description: 启动新的任务执行周期
|
|
|
25
33
|
- 检查是否有远程仓库配置:
|
|
26
34
|
- 如果没有远程仓库,提示用户添加: `git remote add origin <url>`
|
|
27
35
|
|
|
28
|
-
|
|
36
|
+
4. **解析任务输入**
|
|
29
37
|
- 如果 `$ARGUMENTS` 提供文件路径 → 读取文件内容
|
|
30
38
|
- 如果 `$ARGUMENTS` 是任务描述 → 直接使用
|
|
31
39
|
- 如果无参数 → **使用 AskUserQuestion 询问用户要执行的任务**
|
|
32
40
|
|
|
33
|
-
|
|
41
|
+
5. **⚠️ 交互式问答 (必须执行)**
|
|
34
42
|
|
|
35
43
|
**重要**: 除非用户明确指定 `--skip-questions`,否则必须执行交互式问答。
|
|
36
44
|
|
|
@@ -156,7 +164,7 @@ description: 启动新的任务执行周期
|
|
|
156
164
|
审批点: plan, merge
|
|
157
165
|
```
|
|
158
166
|
|
|
159
|
-
|
|
167
|
+
7. **执行模式确认** (使用 AskUserQuestion)
|
|
160
168
|
|
|
161
169
|
```typescript
|
|
162
170
|
AskUserQuestion({
|
|
@@ -182,7 +190,7 @@ AskUserQuestion({
|
|
|
182
190
|
})
|
|
183
191
|
```
|
|
184
192
|
|
|
185
|
-
|
|
193
|
+
8. **开始执行** (⚠️ 严格模式)
|
|
186
194
|
|
|
187
195
|
**重要**: 从此步骤开始,除非遇到 meeting 审批或失败,否则**不得暂停询问用户**。
|
|
188
196
|
|
|
@@ -201,8 +209,21 @@ c) **执行循环** (由 Skill 驱动):
|
|
|
201
209
|
while (有待执行任务) {
|
|
202
210
|
1. 读取状态文件获取 SubagentTask
|
|
203
211
|
2. 调用 Agent 工具执行 Subagent
|
|
204
|
-
3. Subagent
|
|
205
|
-
|
|
212
|
+
3. Subagent 完成后,更新状态文件:
|
|
213
|
+
```bash
|
|
214
|
+
openmatrix complete <taskId> --success/--failed
|
|
215
|
+
```
|
|
216
|
+
4. **Git 自动提交** (每个子任务完成后):
|
|
217
|
+
```bash
|
|
218
|
+
git add -A
|
|
219
|
+
git commit -m "feat(task-id): 任务标题
|
|
220
|
+
|
|
221
|
+
- 修改内容1
|
|
222
|
+
- 修改内容2
|
|
223
|
+
|
|
224
|
+
任务ID: TASK-XXX
|
|
225
|
+
RunID: run-XXX"
|
|
226
|
+
```
|
|
206
227
|
5. Phase 验收测试 (verify phase)
|
|
207
228
|
6. **检查是否需要审批**:
|
|
208
229
|
- 如果配置了 auto 模式 (`approvalPoints` 为空):
|
|
@@ -219,15 +240,88 @@ while (有待执行任务) {
|
|
|
219
240
|
├── 任务C 完成 ✓
|
|
220
241
|
└── 任务D 阻塞 → 创建Meeting → **跳过任务,继续执行** ↷
|
|
221
242
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
243
|
+
所有任务执行完成!
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
d) **执行完成后自动处理 Meeting**:
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# 检查是否有 pending 的 Meeting
|
|
250
|
+
openmatrix meeting --list --pending
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**如果有 pending 的 Meeting,立即进入交互式处理**:
|
|
254
|
+
|
|
255
|
+
```
|
|
256
|
+
📋 检测到待处理的 Meeting (2个)
|
|
257
|
+
|
|
258
|
+
┌─────────────────────────────────────────┐
|
|
259
|
+
│ [1] 🔴 TASK-001 - 数据库连接失败 │
|
|
260
|
+
│ 阻塞原因: 无法连接到远程数据库 │
|
|
261
|
+
│ │
|
|
262
|
+
│ [2] 🤔 TASK-003 - API设计决策 │
|
|
263
|
+
│ 问题: 选择 REST 还是 GraphQL │
|
|
264
|
+
└─────────────────────────────────────────┘
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**使用 AskUserQuestion 逐个处理**:
|
|
268
|
+
|
|
269
|
+
```typescript
|
|
270
|
+
// 1. 先选择要处理的 Meeting
|
|
271
|
+
AskUserQuestion({
|
|
272
|
+
questions: [{
|
|
273
|
+
question: "请选择要处理的 Meeting:",
|
|
274
|
+
header: "Meeting",
|
|
275
|
+
options: [
|
|
276
|
+
{ label: "[1] TASK-001 - 数据库连接失败", description: "阻塞 - 需要信息" },
|
|
277
|
+
{ label: "[2] TASK-003 - API设计决策", description: "决策 - 技术选型" },
|
|
278
|
+
{ label: "全部跳过", description: "标记所有 Meeting 为跳过" }
|
|
279
|
+
],
|
|
280
|
+
multiSelect: false
|
|
281
|
+
}]
|
|
282
|
+
})
|
|
283
|
+
|
|
284
|
+
// 2. 根据类型展示处理选项
|
|
285
|
+
// 阻塞型:
|
|
286
|
+
AskUserQuestion({
|
|
287
|
+
questions: [{
|
|
288
|
+
question: "如何处理此阻塞?",
|
|
289
|
+
header: "处理方式",
|
|
290
|
+
options: [
|
|
291
|
+
{ label: "💡 提供信息", description: "提供解决问题所需的信息后重试" },
|
|
292
|
+
{ label: "⏭️ 跳过任务", description: "标记为可选,继续执行" },
|
|
293
|
+
{ label: "🔄 重试", description: "直接重试此任务" }
|
|
294
|
+
],
|
|
295
|
+
multiSelect: false
|
|
296
|
+
}]
|
|
297
|
+
})
|
|
298
|
+
|
|
299
|
+
// 决策型:
|
|
300
|
+
AskUserQuestion({
|
|
301
|
+
questions: [{
|
|
302
|
+
question: "请做出决策:",
|
|
303
|
+
header: "决策",
|
|
304
|
+
options: [
|
|
305
|
+
{ label: "方案 A", description: "方案A描述" },
|
|
306
|
+
{ label: "方案 B", description: "方案B描述" }
|
|
307
|
+
],
|
|
308
|
+
multiSelect: false
|
|
309
|
+
}]
|
|
310
|
+
})
|
|
311
|
+
```
|
|
226
312
|
|
|
227
|
-
|
|
313
|
+
**处理完成后,如果用户提供了信息或选择重试,重新执行阻塞任务**:
|
|
314
|
+
```bash
|
|
315
|
+
openmatrix meeting APPR-001 --action provide-info --info "..."
|
|
316
|
+
# 或
|
|
317
|
+
openmatrix meeting APPR-001 --action retry
|
|
318
|
+
|
|
319
|
+
# 然后重新执行阻塞的任务
|
|
320
|
+
openmatrix resume TASK-001
|
|
228
321
|
```
|
|
229
322
|
|
|
230
|
-
|
|
323
|
+
**⚠️ 重要**: Meeting 处理是执行流程的一部分,必须在任务结束前完成。不要让用户手动调用 /om:meeting。
|
|
324
|
+
|
|
231
325
|
7. 继续下一个任务
|
|
232
326
|
}
|
|
233
327
|
```
|
|
@@ -263,11 +357,16 @@ Agent({
|
|
|
263
357
|
- 只有遇到 **meeting** 类型的审批时才暂停
|
|
264
358
|
- 其他情况下,让 Agent 完整执行任务并在完成后自动返回结果
|
|
265
359
|
|
|
266
|
-
|
|
360
|
+
9. **执行完成 - 最终 Git 提交**
|
|
267
361
|
|
|
268
|
-
|
|
362
|
+
所有任务完成后,执行最终提交:
|
|
269
363
|
```bash
|
|
270
|
-
|
|
364
|
+
git add -A
|
|
365
|
+
git commit -m "feat: 完成所有任务
|
|
366
|
+
|
|
367
|
+
RunID: run-XXX
|
|
368
|
+
任务数: N
|
|
369
|
+
完成时间: YYYY-MM-DD HH:mm:ss"
|
|
271
370
|
```
|
|
272
371
|
|
|
273
372
|
</process>
|
|
@@ -287,9 +386,11 @@ $ARGUMENTS
|
|
|
287
386
|
|
|
288
387
|
| 级别 | TDD | 覆盖率 | Lint | 安全扫描 | AI验收 | 适用场景 |
|
|
289
388
|
|------|:---:|:------:|:----:|:--------:|:------:|---------|
|
|
290
|
-
| **strict** | ✅ | 80% | ✅ 严格 | ✅ | ✅ | 生产代码、核心功能 |
|
|
291
|
-
| **balanced** | ❌ | 60% | ✅ | ✅ | ✅ | 日常开发 (默认) |
|
|
292
|
-
| **fast** | ❌ |
|
|
389
|
+
| **strict** | ✅ | >80% | ✅ 严格 | ✅ | ✅ | 生产代码、核心功能 |
|
|
390
|
+
| **balanced** | ❌ | >60% | ✅ | ✅ | ✅ | 日常开发 (默认) |
|
|
391
|
+
| **fast** | ❌ | >20% | ❌ | ❌ | ❌ | 快速原型、POC |
|
|
392
|
+
|
|
393
|
+
> strict 可配置为 100%。80% 覆盖核心业务逻辑,100% 成本高收益低。
|
|
293
394
|
|
|
294
395
|
### strict 模式 (推荐生产代码)
|
|
295
396
|
```
|
|
@@ -367,7 +468,38 @@ $ARGUMENTS
|
|
|
367
468
|
┌─────────────────┐
|
|
368
469
|
│ 开始执行 │
|
|
369
470
|
│ (应用质量配置) │
|
|
370
|
-
|
|
471
|
+
└────────┬────────┘
|
|
472
|
+
│
|
|
473
|
+
▼
|
|
474
|
+
┌─────────────────┐
|
|
475
|
+
│ 所有任务完成? │
|
|
476
|
+
└────────┬────────┘
|
|
477
|
+
│
|
|
478
|
+
┌────┴────┐
|
|
479
|
+
│ │
|
|
480
|
+
否 是
|
|
481
|
+
│ │
|
|
482
|
+
▼ ▼
|
|
483
|
+
┌───────┐ ┌─────────────────┐
|
|
484
|
+
│继续执行│ │有 pending │
|
|
485
|
+
└───────┘ │Meeting? │
|
|
486
|
+
└────────┬────────┘
|
|
487
|
+
│
|
|
488
|
+
┌────┴────┐
|
|
489
|
+
│ │
|
|
490
|
+
否 是
|
|
491
|
+
│ │
|
|
492
|
+
▼ ▼
|
|
493
|
+
┌───────┐ ┌─────────────┐
|
|
494
|
+
│ 完成 │ │ 交互式处理 │
|
|
495
|
+
└───────┘ │ Meeting │
|
|
496
|
+
└──────┬──────┘
|
|
497
|
+
│
|
|
498
|
+
▼
|
|
499
|
+
┌─────────────┐
|
|
500
|
+
│ 重新执行 │
|
|
501
|
+
│ 阻塞任务 │
|
|
502
|
+
└─────────────┘
|
|
371
503
|
```
|
|
372
504
|
|
|
373
505
|
## 执行模式对比
|