openmatrix 0.1.19 → 0.1.20

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.
@@ -445,8 +445,11 @@ npm test -- --coverage 2>/dev/null || npm run test:coverage 2>/dev/null || echo
445
445
 
446
446
  ### 4. Lint 检查
447
447
  \`\`\`bash
448
- npm run lint || echo "No lint script configured"
448
+ # 先检查是否有 lint 脚本
449
+ npm run lint 2>&1 || echo "EXIT_CODE: $?"
449
450
  \`\`\`
451
+ **重要**: 如果 lint 命令返回非零退出码且有 errors,必须报告为 VERIFY_FAILED。
452
+ 如果项目没有 lint 脚本(显示 "missing script"),标记为 ⏭️ Skipped。
450
453
  **要求**: ${qc.strictLint ? '无 error' : '无严重 error'}
451
454
  **失败后果**: ${qc.strictLint ? '❌ VERIFY_FAILED' : '⚠️ 警告'}
452
455
 
@@ -562,6 +565,12 @@ Fix Required:
562
565
  - **不要伪造通过结果**
563
566
  - 如果项目没有某个脚本,标记为 "⏭️ Skipped" 而非 "❌ Failed"
564
567
  - 所有检查结果必须基于实际命令输出
568
+
569
+ ## 🔧 配置检查 (可选但推荐)
570
+ 检查以下常见配置问题:
571
+ - **Vitest 配置**: 如果存在 \`e2e/\` 目录,确保 \`vite.config.ts\` 的 \`test.exclude\` 包含 \`e2e\`
572
+ - **测试框架冲突**: 确保 Vitest 不运行 Playwright/Cypress 测试文件
573
+ - 如果发现配置问题,记录到报告中但不要阻止通过
565
574
  `);
566
575
  return parts.join('\n');
567
576
  }
@@ -805,13 +814,32 @@ ACCEPT_FAILED
805
814
  // 解析构建结果
806
815
  result.build.success = output.includes('VERIFY_PASSED') ||
807
816
  (output.includes('npm run build') && !output.includes('error'));
808
- // 解析 Lint 结果
809
- const lintErrorMatch = output.match(/(\d+)\s*error/i);
810
- if (lintErrorMatch)
811
- result.lint.errors = parseInt(lintErrorMatch[1], 10);
812
- const lintWarnMatch = output.match(/(\d+)\s*warning/i);
813
- if (lintWarnMatch)
814
- result.lint.warnings = parseInt(lintWarnMatch[1], 10);
817
+ // 解析 Lint 结果 - 支持多种 ESLint 输出格式
818
+ // 格式1: "✖ 137 problems (92 errors, 45 warnings)"
819
+ const detailedMatch = output.match(/✖\s*\d+\s*problems?\s*\((\d+)\s*errors?,\s*(\d+)\s*warnings?\)/i);
820
+ if (detailedMatch) {
821
+ result.lint.errors = parseInt(detailedMatch[1], 10);
822
+ result.lint.warnings = parseInt(detailedMatch[2], 10);
823
+ }
824
+ else {
825
+ // 格式2: "X errors" 和 "Y warnings"
826
+ const lintErrorMatch = output.match(/(\d+)\s*error/i);
827
+ if (lintErrorMatch)
828
+ result.lint.errors = parseInt(lintErrorMatch[1], 10);
829
+ const lintWarnMatch = output.match(/(\d+)\s*warning/i);
830
+ if (lintWarnMatch)
831
+ result.lint.warnings = parseInt(lintWarnMatch[1], 10);
832
+ }
833
+ // 检测 Lint 是否实际执行并失败
834
+ // ESLint 退出码非0时,输出中会包含 "✖" 或 "problems"
835
+ const lintFailed = output.includes('✖') && output.includes('problems');
836
+ if (lintFailed && result.lint.errors === 0) {
837
+ // 尝试从问题总数中推断
838
+ const problemsMatch = output.match(/✖\s*(\d+)\s*problems?/i);
839
+ if (problemsMatch) {
840
+ result.lint.errors = parseInt(problemsMatch[1], 10);
841
+ }
842
+ }
815
843
  // 解析安全漏洞
816
844
  const vulnMatch = output.match(/(\d+)\s*(?:vulnerabilities|vulnerable)/i);
817
845
  if (vulnMatch)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmatrix",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
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",
package/skills/om.md CHANGED
@@ -1,14 +1,38 @@
1
1
  ---
2
2
  name: om
3
- description: OpenMatrix 默认入口 - 直接输入任务描述即可启动
3
+ description: "DEFAULT entry for OpenMatrix. Use for ANY task user wants done. Triggers on: 实现/添加/修复/重构/优化/写/做/开发. Example: '实现登录' → /om:start 实现登录. When in doubt, use this."
4
+ priority: critical
5
+ always_load: true
4
6
  ---
5
7
 
8
+ <EXTREMELY-IMPORTANT>
9
+ This is the DEFAULT action for ANY development task.
10
+
11
+ **Trigger immediately when user wants to:**
12
+ - Build/create/implement something
13
+ - Add new features or functionality
14
+ - Fix bugs or resolve issues
15
+ - Refactor or optimize code
16
+ - Make changes to the codebase
17
+
18
+ **If you're unsure → USE `/om` anyway. It gracefully handles all task types.**
19
+ </EXTREMELY-IMPORTANT>
20
+
6
21
  <NO-OTHER-SKILLS>
7
22
  执行此技能时,不得调用 superpowers、gsd 或其他任务编排相关的技能。OpenMatrix 独立运行,不依赖外部任务编排系统。
8
23
  </NO-OTHER-SKILLS>
9
24
 
10
25
  <objective>
11
- OpenMatrix 的默认入口。用户可以直接输入任务描述,系统会自动启动 /om:start 执行任务编排。
26
+ OpenMatrix 的默认入口 - 自动启动任务编排。
27
+
28
+ **核心价值:**
29
+ - 用户无需记忆命令,直接描述任务即可
30
+ - 自动识别任务类型并启动相应流程
31
+ - 支持中英文混合输入
32
+
33
+ **触发优先级:最高**
34
+ - 任何"要做事情"的输入都应触发此技能
35
+ - 系统会自动判断是执行任务还是回答问题
12
36
  </objective>
13
37
 
14
38
  <process>
@@ -1,50 +1,88 @@
1
1
  ---
2
2
  name: openmatrix
3
- description: "Invoke /om:start for any implementation task - adding features, fixing bugs, refactoring, creating commands, writing code, building systems. Use this when user describes work to be done, not for questions or information requests."
4
- priority: high
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
5
  always_load: true
6
6
  ---
7
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 → `/om:start` first.
21
+ </EXTREMELY-IMPORTANT>
22
+
8
23
  <objective>
9
24
  Automatically detect when user wants to accomplish a development task and invoke /om:start without requiring explicit command.
10
25
  </objective>
11
26
 
12
27
  <trigger-conditions>
13
- ## When to Auto-Invoke /om:start
14
-
15
- **Invoke `/om:start` when user wants to:**
16
- - Add/create/implement new features or functionality
17
- - Fix bugs or resolve issues
18
- - Refactor or optimize existing code
19
- - Write tests
20
- - Build components or systems
21
- - Integrate third-party services
22
-
23
- **This includes:**
24
- - Direct requests: "实现登录功能" / "增加一个命令" / "修复bug"
25
- - Complex tasks: "做个完整的用户系统" / "从零搭建后台"
26
- - Multi-step work: "先做A再做B" / "前端+后端+数据库"
28
+ ## AUTO-INVOKE RULES (Mandatory)
29
+
30
+ **Invoke `/om:start` IMMEDIATELY when user input contains ANY of these patterns:**
31
+
32
+ ### Action Verbs (触发词)
33
+ | Chinese | English | Action |
34
+ |---------|---------|--------|
35
+ | 实现/开发/做/写 | implement/build/create/make/write | → `/om:start` |
36
+ | 添加/增加/加 | add/append | → `/om:start` |
37
+ | 修复/解决/改 | fix/resolve/repair | → `/om:start` |
38
+ | 重构/优化/改进 | refactor/optimize/improve | → `/om:start` |
39
+ | 更新/修改/改 | update/modify/change | `/om:start` |
40
+
41
+ ### Context Patterns (触发场景)
42
+ - **Feature requests**: "用户登录" / "支付功能" / "API接口"
43
+ - **Bug reports**: "报错" / "不工作" / "有问题" / "崩溃"
44
+ - **Code changes**: "这段代码" / "这个文件" / "那个模块"
45
+ - **Multi-step tasks**: "先做A" / "然后B" / "最后C"
46
+ - **System building**: "做一个系统" / "搭建框架" / "从零开始"
47
+
48
+ ### The 3-Second Test
49
+ ```
50
+ 用户输入 → 能在3秒内判断是"要做事情"吗?
51
+ ↓ Yes ↓ No
52
+ /om:start 直接回答
53
+ ```
27
54
  </trigger-conditions>
28
55
 
29
56
  <exclusions>
30
- ## When NOT to Auto-Invoke
57
+ ## When NOT to Invoke (Rare Cases)
58
+
59
+ **Do NOT invoke ONLY when:**
60
+ - Pure question: "怎么实现?" / "如何配置?" / "what is..." / "为什么"
61
+ - Information request: "显示配置" / "列出文件" / "show me..." / "看一下"
62
+ - Status check: "状态" / "进度" / "status"
63
+ - Casual chat: "你好" / "谢谢" / "hello"
31
64
 
32
- **Do NOT invoke when:**
33
- - User is asking a question: "怎么实现?" / "如何配置?" / "what is..."
34
- - User is requesting information: "显示配置" / "列出文件" / "show me..."
35
- - User is navigating: "打开目录" / "进入文件夹"
36
- - User is just chatting: "你好" / "谢谢"
65
+ **Key Test:**
66
+ ```
67
+ 用户要我写代码/改代码/做东西吗?
68
+ Yes /om:start
69
+ No → 直接回答
70
+ ```
37
71
 
38
- **Key test: Is the user asking you to BUILD/CREATE/FIX something?**
39
- - Yes → Invoke `/om:start`
40
- - No (asking for info) → Do NOT invoke
72
+ **When in doubt → INVOKE `/om:start`. It handles both simple and complex tasks.**
41
73
  </exclusions>
42
74
 
43
75
  <examples>
44
- | User Input | Action |
45
- |------------|--------|
46
- | `增加一个 om:upgrade 命令` | `/om:start 增加一个 om:upgrade 命令` |
47
- | `实现用户登录功能` | `/om:start 实现用户登录功能` |
48
- | `登录页面报错了` | `/om:start 登录页面报错了` |
49
- | `怎么实现登录?` | No invoke (question) |
76
+ | User Input | Should Invoke? | Reason |
77
+ |------------|----------------|--------|
78
+ | `增加一个 om:upgrade 命令` | Yes | "增加" = add |
79
+ | `实现用户登录功能` | Yes | "实现" = implement |
80
+ | `登录页面报错了` | Yes | Bug report |
81
+ | `重构这个模块` | Yes | "重构" = refactor |
82
+ | `优化性能` | ✅ Yes | "优化" = optimize |
83
+ | `写个测试` | ✅ Yes | "写" = write |
84
+ | `怎么实现登录?` | ❌ No | Question, not request |
85
+ | `显示当前配置` | ❌ No | Information request |
86
+ | `这个文件是干嘛的` | ❌ No | Question about code |
87
+ | `帮我...` | ✅ Yes | "帮我" usually means task |
50
88
  </examples>