openmatrix 0.1.49 → 0.1.50
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 +4 -8
- package/dist/cli/commands/analyze.js +3 -4
- package/dist/cli/commands/brainstorm.js +52 -74
- package/dist/cli/commands/start.js +31 -163
- package/dist/cli/index.js +0 -4
- package/dist/orchestrator/smart-question-analyzer.d.ts +0 -38
- package/dist/orchestrator/smart-question-analyzer.js +7 -257
- package/dist/orchestrator/task-parser.d.ts +0 -8
- package/dist/orchestrator/task-parser.js +9 -22
- package/dist/orchestrator/task-planner.d.ts +45 -10
- package/dist/orchestrator/task-planner.js +282 -188
- package/dist/storage/state-manager.d.ts +0 -1
- package/dist/storage/state-manager.js +1 -1
- package/package.json +55 -56
- package/skills/brainstorm.md +238 -105
- package/skills/check.md +199 -199
- package/skills/openmatrix.md +190 -175
- package/skills/start.md +626 -171
package/skills/openmatrix.md
CHANGED
|
@@ -1,175 +1,190 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: openmatrix
|
|
3
|
-
description: "TRIGGER for ANY task. User wants to
|
|
4
|
-
priority: critical
|
|
5
|
-
always_load: true
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<EXTREMELY-IMPORTANT>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
1
|
+
---
|
|
2
|
+
name: openmatrix
|
|
3
|
+
description: "TRIGGER for ANY implementation task. User wants to build/create/add/fix/implement/refactor something? This is the DEFAULT. Examples: 'add feature', 'fix bug', 'implement login', 'refactor code', 'create command'. ALWAYS prefer this over direct coding."
|
|
4
|
+
priority: critical
|
|
5
|
+
always_load: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<EXTREMELY-IMPORTANT>
|
|
9
|
+
This skill MUST be invoked when the user describes ANY work to be done.
|
|
10
|
+
|
|
11
|
+
**If you're unsure whether to invoke → INVOKE IT.**
|
|
12
|
+
|
|
13
|
+
**If user mentions: add/create/implement/fix/build/make/write/develop/refactor/optimize/update/modify/change → INVOKE THIS SKILL.**
|
|
14
|
+
|
|
15
|
+
**Direct coding without OpenMatrix is ONLY allowed for:**
|
|
16
|
+
- Simple one-line fixes (typos, variable names)
|
|
17
|
+
- Answering questions (no code changes needed)
|
|
18
|
+
- Information retrieval (reading files, explaining code)
|
|
19
|
+
|
|
20
|
+
Everything else → smart selection between `/om:brainstorm` and `/om:start`.
|
|
21
|
+
</EXTREMELY-IMPORTANT>
|
|
22
|
+
|
|
23
|
+
<objective>
|
|
24
|
+
Automatically detect when user wants to accomplish a development task and intelligently choose between brainstorm (for complex tasks) or start (for simple tasks).
|
|
25
|
+
</objective>
|
|
26
|
+
|
|
27
|
+
<process>
|
|
28
|
+
1. **询问是否启用智能选择**
|
|
29
|
+
|
|
30
|
+
使用 AskUserQuestion 询问用户:
|
|
31
|
+
```
|
|
32
|
+
问题: 是否启用智能模式?
|
|
33
|
+
选项:
|
|
34
|
+
- 🧠 智能选择 (推荐) - 自动判断任务复杂度,选择 brainstorm 或 start
|
|
35
|
+
- 🚀 直接执行 - 跳过头脑风暴,直接开始任务
|
|
36
|
+
- 🧐 先探索需求 - 强制使用头脑风暴模式
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. **根据选择执行不同流程**
|
|
40
|
+
|
|
41
|
+
**选择"智能选择"**:
|
|
42
|
+
- 分析任务复杂度
|
|
43
|
+
- 展示推断结果,让用户确认或修改
|
|
44
|
+
- 执行选择的命令
|
|
45
|
+
|
|
46
|
+
**选择"直接执行"**:
|
|
47
|
+
- 直接调用 /om:start
|
|
48
|
+
|
|
49
|
+
**选择"先探索需求"**:
|
|
50
|
+
- 直接调用 /om:brainstorm
|
|
51
|
+
|
|
52
|
+
3. **智能分析(如果启用)**
|
|
53
|
+
|
|
54
|
+
**复杂任务** (满足任一条件):
|
|
55
|
+
- 新功能开发: "实现用户登录" / "添加支付功能"
|
|
56
|
+
- 多模块改动: "重构用户系统" / "优化整体性能"
|
|
57
|
+
- 架构相关: "搭建框架" / "从零开始"
|
|
58
|
+
- 关键词: "系统" / "架构" / "模块" / "集成" / "完整"
|
|
59
|
+
|
|
60
|
+
**简单任务** (满足任一条件):
|
|
61
|
+
- Bug 修复: "修复登录bug" / "解决样式问题"
|
|
62
|
+
- 小改动: "修改文案" / "改变量名"
|
|
63
|
+
- 单一功能: "添加一个按钮" / "写个工具函数"
|
|
64
|
+
- 关键词: "修复" / "解决" / "改" / "调整" / "简单"
|
|
65
|
+
|
|
66
|
+
4. **展示推断结果并确认**
|
|
67
|
+
|
|
68
|
+
使用 AskUserQuestion 展示推断结果:
|
|
69
|
+
```
|
|
70
|
+
问题: 检测到这是一个【复杂/简单】任务,将使用【brainstorm/start】模式
|
|
71
|
+
选项:
|
|
72
|
+
- ✅ 确认执行 - 使用推荐的模式
|
|
73
|
+
- 🧠 改用头脑风暴 - 先探索需求再执行
|
|
74
|
+
- 🚀 改用直接执行 - 跳过探索直接开始
|
|
75
|
+
- ✏️ 自定义输入 - 输入其他指令
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
5. **执行选择的命令**
|
|
79
|
+
</process>
|
|
80
|
+
|
|
81
|
+
<trigger-conditions>
|
|
82
|
+
## AUTO-INVOKE RULES (Mandatory)
|
|
83
|
+
|
|
84
|
+
**Invoke IMMEDIATELY when user input contains ANY of these patterns:**
|
|
85
|
+
|
|
86
|
+
### Action Verbs (触发词)
|
|
87
|
+
| Chinese | English | Action |
|
|
88
|
+
|---------|---------|--------|
|
|
89
|
+
| 实现/开发/做/写 | implement/build/create/make/write | → Smart Select |
|
|
90
|
+
| 添加/增加/加 | add/append | → Smart Select |
|
|
91
|
+
| 修复/解决/改 | fix/resolve/repair | → Smart Select |
|
|
92
|
+
| 重构/优化/改进 | refactor/optimize/improve | → Smart Select |
|
|
93
|
+
| 更新/修改/改 | update/modify/change | → Smart Select |
|
|
94
|
+
|
|
95
|
+
### Context Patterns (触发场景)
|
|
96
|
+
- **Feature requests**: "用户登录" / "支付功能" / "API接口"
|
|
97
|
+
- **Bug reports**: "报错" / "不工作" / "有问题" / "崩溃"
|
|
98
|
+
- **Code changes**: "这段代码" / "这个文件" / "那个模块"
|
|
99
|
+
- **Multi-step tasks**: "先做A" / "然后B" / "最后C"
|
|
100
|
+
- **System building**: "做一个系统" / "搭建框架" / "从零开始"
|
|
101
|
+
|
|
102
|
+
### The 3-Second Test
|
|
103
|
+
```
|
|
104
|
+
用户输入 → 能在3秒内判断是"要做事情"吗?
|
|
105
|
+
↓ Yes ↓ No
|
|
106
|
+
Smart Select 直接回答
|
|
107
|
+
```
|
|
108
|
+
</trigger-conditions>
|
|
109
|
+
|
|
110
|
+
<smart-selection>
|
|
111
|
+
## 智能选择:Brainstorm vs Start
|
|
112
|
+
|
|
113
|
+
**根据任务复杂度自动选择执行路径:**
|
|
114
|
+
|
|
115
|
+
### 🧠 复杂任务 → `/om:brainstorm`
|
|
116
|
+
**触发条件 (满足任一):**
|
|
117
|
+
- 新功能开发: "实现用户登录" / "添加支付功能" / "开发 API"
|
|
118
|
+
- 多模块改动: "重构用户系统" / "优化整体性能"
|
|
119
|
+
- 架构相关: "搭建框架" / "从零开始" / "设计架构"
|
|
120
|
+
- 不确定因素: 需要技术选型、涉及多种方案选择
|
|
121
|
+
- 关键词: "系统" / "架构" / "模块" / "集成" / "完整" / "从零"
|
|
122
|
+
|
|
123
|
+
### 🚀 简单任务 → `/om:start`
|
|
124
|
+
**触发条件 (满足任一):**
|
|
125
|
+
- Bug 修复: "修复登录bug" / "解决样式问题" / "改个报错"
|
|
126
|
+
- 小改动: "修改文案" / "改变量名" / "调整配置"
|
|
127
|
+
- 单一功能: "添加一个按钮" / "写个工具函数"
|
|
128
|
+
- 明确需求: 需求清晰,无需额外探索
|
|
129
|
+
- 关键词: "修复" / "解决" / "改" / "调整" / "小" / "简单"
|
|
130
|
+
|
|
131
|
+
### 选择流程
|
|
132
|
+
```
|
|
133
|
+
用户输入任务描述
|
|
134
|
+
│
|
|
135
|
+
▼
|
|
136
|
+
┌─────────────────────┐
|
|
137
|
+
│ 分析任务复杂度 │
|
|
138
|
+
└──────────┬──────────┘
|
|
139
|
+
│
|
|
140
|
+
┌─────┴─────┐
|
|
141
|
+
│ │
|
|
142
|
+
复杂任务 简单任务
|
|
143
|
+
│ │
|
|
144
|
+
▼ ▼
|
|
145
|
+
/om:brainstorm /om:start
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### 判断示例
|
|
149
|
+
| 用户输入 | 复杂度 | 执行路径 |
|
|
150
|
+
|---------|--------|---------|
|
|
151
|
+
| "实现用户登录功能" | 复杂 | `/om:brainstorm` |
|
|
152
|
+
| "做一个完整的支付系统" | 复杂 | `/om:brainstorm` |
|
|
153
|
+
| "从零搭建后台管理" | 复杂 | `/om:brainstorm` |
|
|
154
|
+
| "修复登录页面的样式问题" | 简单 | `/om:start` |
|
|
155
|
+
| "改一下这个变量名" | 简单 | `/om:start` |
|
|
156
|
+
| "添加一个测试用例" | 简单 | `/om:start` |
|
|
157
|
+
| "重构这个模块" | 中等 | `/om:brainstorm` (保守选择) |
|
|
158
|
+
| "优化性能" | 中等 | `/om:brainstorm` (保守选择) |
|
|
159
|
+
|
|
160
|
+
**不确定时的默认选择: `/om:brainstorm`** (宁可多问,不可漏问)
|
|
161
|
+
</smart-selection>
|
|
162
|
+
|
|
163
|
+
<exclusions>
|
|
164
|
+
## When NOT to Invoke (Rare Cases)
|
|
165
|
+
|
|
166
|
+
**Do NOT invoke ONLY when:**
|
|
167
|
+
- Pure question: "怎么实现?" / "如何配置?" / "what is..." / "为什么"
|
|
168
|
+
- Information request: "显示配置" / "列出文件" / "show me..." / "看一下"
|
|
169
|
+
- Status check: "状态" / "进度" / "status"
|
|
170
|
+
- Casual chat: "你好" / "谢谢" / "hello"
|
|
171
|
+
|
|
172
|
+
**Key Test:**
|
|
173
|
+
```
|
|
174
|
+
用户要我写代码/改代码/做东西吗?
|
|
175
|
+
↓ Yes → Smart Select (brainstorm/start)
|
|
176
|
+
↓ No → 直接回答
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**When in doubt → INVOKE. It handles both simple and complex tasks.**
|
|
180
|
+
</exclusions>
|
|
181
|
+
|
|
182
|
+
<examples>
|
|
183
|
+
| User Input | Complexity | Action |
|
|
184
|
+
|------------|------------|--------|
|
|
185
|
+
| `实现用户登录功能` | 复杂 | → `/om:brainstorm` |
|
|
186
|
+
| `做一个完整的订单系统` | 复杂 | → `/om:brainstorm` |
|
|
187
|
+
| `修复登录页面的样式问题` | 简单 | → `/om:start` |
|
|
188
|
+
| `改一下这个变量名` | 简单 | → `/om:start` |
|
|
189
|
+
| `重构用户模块` | 中等 | → `/om:brainstorm` |
|
|
190
|
+
| `怎么实现登录?` | - | ❌ Question, not task |
|