openmatrix 0.1.2 → 0.1.4
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 +15 -0
- package/dist/cli/commands/install-skills.js +27 -3
- package/package.json +6 -2
- package/skills/openmatrix-auto.md +64 -0
package/README.md
CHANGED
|
@@ -29,6 +29,21 @@
|
|
|
29
29
|
|
|
30
30
|
> `/om` 是 `/om:start` 的快捷方式,功能完全相同
|
|
31
31
|
|
|
32
|
+
### 🪄 自动调用 (无需输入命令)
|
|
33
|
+
|
|
34
|
+
安装后,直接输入任务描述即可自动调用:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
用户输入: 实现用户登录功能
|
|
38
|
+
↓
|
|
39
|
+
自动调用: /om:start 实现用户登录功能
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**支持的输入模式:**
|
|
43
|
+
- `实现...功能` / `添加...` / `修复...` / `优化...`
|
|
44
|
+
- `implement...` / `add...` / `fix...` / `build...`
|
|
45
|
+
- 任务文档路径: `docs/task.md`
|
|
46
|
+
|
|
32
47
|
---
|
|
33
48
|
|
|
34
49
|
## 执行流程概览
|
|
@@ -65,8 +65,8 @@ exports.installSkillsCommand = new commander_1.Command('install-skills')
|
|
|
65
65
|
console.error(' Error:', err.message);
|
|
66
66
|
process.exit(1);
|
|
67
67
|
}
|
|
68
|
-
// Get skill files (excluding om.md which
|
|
69
|
-
const files = fs.readdirSync(skillsDir).filter(f => f.endsWith('.md') && f !== 'om.md');
|
|
68
|
+
// Get skill files (excluding om.md and openmatrix-auto.md which are handled separately)
|
|
69
|
+
const files = fs.readdirSync(skillsDir).filter(f => f.endsWith('.md') && f !== 'om.md' && f !== 'openmatrix-auto.md');
|
|
70
70
|
if (files.length === 0) {
|
|
71
71
|
console.error('❌ No skill files found in:', skillsDir);
|
|
72
72
|
process.exit(1);
|
|
@@ -116,17 +116,41 @@ exports.installSkillsCommand = new commander_1.Command('install-skills')
|
|
|
116
116
|
failed++;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
+
// Install auto-detection instructions
|
|
120
|
+
const autoSrc = path.join(skillsDir, 'openmatrix-auto.md');
|
|
121
|
+
const autoDest = path.join(claudeDir, 'commands', 'openmatrix-auto.md');
|
|
122
|
+
if (fs.existsSync(autoSrc)) {
|
|
123
|
+
try {
|
|
124
|
+
if (fs.existsSync(autoDest) && !options.force) {
|
|
125
|
+
console.log(` ⏭️ Skipped: openmatrix-auto.md (already exists)`);
|
|
126
|
+
skipped++;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
fs.copyFileSync(autoSrc, autoDest);
|
|
130
|
+
console.log(` ✅ Installed: auto-detection rules`);
|
|
131
|
+
installed++;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
console.log(` ❌ Failed: openmatrix-auto.md (${err.message})`);
|
|
136
|
+
failed++;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
119
139
|
console.log('\n' + '─'.repeat(50));
|
|
120
140
|
console.log(`📊 Summary:`);
|
|
121
141
|
console.log(` ✅ Installed: ${installed}`);
|
|
122
142
|
console.log(` ⏭️ Skipped: ${skipped}`);
|
|
123
143
|
console.log(` ❌ Failed: ${failed}`);
|
|
124
|
-
console.log(`\n📁
|
|
144
|
+
console.log(`\n📁 Skills: ${commandsDir}`);
|
|
125
145
|
console.log(`📁 Default: ${omDest}`);
|
|
126
146
|
if (installed > 0) {
|
|
127
147
|
console.log('\n🎉 Skills installed successfully!');
|
|
128
148
|
console.log(' Try: /om <your task>');
|
|
129
149
|
console.log(' Or: /om:start <your task>');
|
|
150
|
+
console.log('\n💡 Auto-detection enabled!');
|
|
151
|
+
console.log(' Type task descriptions directly:');
|
|
152
|
+
console.log(' - "实现用户登录功能" → auto invokes /om:start');
|
|
153
|
+
console.log(' - "fix the login bug" → auto invokes /om:start');
|
|
130
154
|
}
|
|
131
155
|
if (failed > 0) {
|
|
132
156
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openmatrix",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
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",
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
"type": "commonjs",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "https://github.com/bigfish1913/openmatrix"
|
|
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"
|
|
36
40
|
},
|
|
37
41
|
"dependencies": {
|
|
38
42
|
"@types/node": "^22.0.0",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openmatrix-auto
|
|
3
|
+
description: Auto-detect task descriptions and invoke OpenMatrix skills
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Automatically detect when user input is a development task and invoke /om:start without requiring explicit command.
|
|
8
|
+
</objective>
|
|
9
|
+
|
|
10
|
+
<rules>
|
|
11
|
+
## When to Auto-Invoke /om:start
|
|
12
|
+
|
|
13
|
+
If the user's message matches ANY of these patterns, automatically invoke `/om:start` with the user's input:
|
|
14
|
+
|
|
15
|
+
### Chinese Task Patterns
|
|
16
|
+
- `实现...功能` / `实现...` (implement)
|
|
17
|
+
- `添加...` / `新增...` (add/create)
|
|
18
|
+
- `修复...` / `修复...bug` (fix)
|
|
19
|
+
- `优化...` / `重构...` (optimize/refactor)
|
|
20
|
+
- `创建...` / `编写...` / `开发...` (create/write/develop)
|
|
21
|
+
- `构建...` / `部署...` (build/deploy)
|
|
22
|
+
- `更新...功能` / `改进...` (update/improve)
|
|
23
|
+
- Any sentence that clearly describes a development task
|
|
24
|
+
|
|
25
|
+
### English Task Patterns
|
|
26
|
+
- `implement...` / `add...` / `create...`
|
|
27
|
+
- `fix...` / `bug...` / `issue...`
|
|
28
|
+
- `build...` / `develop...`
|
|
29
|
+
- `refactor...` / `optimize...`
|
|
30
|
+
- `update...` / `improve...`
|
|
31
|
+
|
|
32
|
+
### File Path Patterns
|
|
33
|
+
- Input is a path to a `.md` file (e.g., `docs/task.md`)
|
|
34
|
+
|
|
35
|
+
## When NOT to Auto-Invoke
|
|
36
|
+
|
|
37
|
+
Do NOT auto-invoke when:
|
|
38
|
+
- User explicitly uses `/om:*` commands
|
|
39
|
+
- User asks questions: "how do I...", "what is...", "why..."
|
|
40
|
+
- User requests info: "show me...", "list...", "read..."
|
|
41
|
+
- User navigates: "open folder", "go to..."
|
|
42
|
+
- User greets or chats: "hello", "thanks"
|
|
43
|
+
|
|
44
|
+
## How It Works
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
User: "实现用户登录功能"
|
|
48
|
+
↓
|
|
49
|
+
Auto-detect: Task pattern matched
|
|
50
|
+
↓
|
|
51
|
+
Action: Invoke /om:start 实现用户登录功能
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Examples
|
|
55
|
+
|
|
56
|
+
| User Input | Action |
|
|
57
|
+
|------------|--------|
|
|
58
|
+
| `实现用户登录功能` | → `/om:start 实现用户登录功能` |
|
|
59
|
+
| `fix the login bug` | → `/om:start fix the login bug` |
|
|
60
|
+
| `添加 API 接口` | → `/om:start 添加 API 接口` |
|
|
61
|
+
| `优化首页性能` | → `/om:start 优化首页性能` |
|
|
62
|
+
| `docs/task.md` | → `/om:start docs/task.md` |
|
|
63
|
+
| `how do I install this?` | → No auto-invoke (question) |
|
|
64
|
+
</rules>
|