momo-ai 1.0.21 → 1.0.22

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.
Files changed (94) hide show
  1. package/.claude/skills/r2mo-rad-lain/SKILL.md +63 -374
  2. package/.trae/skills/algorithmic-art/LICENSE.txt +202 -0
  3. package/.trae/skills/algorithmic-art/SKILL.md +405 -0
  4. package/.trae/skills/algorithmic-art/templates/generator_template.js +223 -0
  5. package/.trae/skills/algorithmic-art/templates/viewer.html +599 -0
  6. package/.trae/skills/doc-coauthoring/SKILL.md +375 -0
  7. package/.trae/skills/frontend-design/LICENSE.txt +177 -0
  8. package/.trae/skills/frontend-design/SKILL.md +42 -0
  9. package/.trae/skills/r2mo-rad-lain/SKILL.md +101 -0
  10. package/README.md +9 -32
  11. package/docs/images/r2mo-lain.png +0 -0
  12. package/package.json +11 -11
  13. package/skills/r2mo-rad-domain/SKILL.md +70 -0
  14. package/src/_skill/repositories.json +9 -3
  15. package/src/_template/LAIN/.obsidian/app.json +1 -0
  16. package/src/_template/LAIN/.obsidian/appearance.json +10 -0
  17. package/src/_template/LAIN/.obsidian/community-plugins.json +7 -0
  18. package/src/_template/LAIN/.obsidian/core-plugins.json +33 -0
  19. package/src/_template/LAIN/.obsidian/plugins/dataview/main.js +20876 -0
  20. package/src/_template/LAIN/.obsidian/plugins/dataview/manifest.json +11 -0
  21. package/src/_template/LAIN/.obsidian/plugins/dataview/styles.css +141 -0
  22. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/data.json +815 -0
  23. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +10 -0
  24. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
  25. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
  26. package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/main.js +153 -0
  27. package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/manifest.json +11 -0
  28. package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/styles.css +1 -0
  29. package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/main.js +7732 -0
  30. package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/manifest.json +10 -0
  31. package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/styles.css +38 -0
  32. package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/main.js +504 -0
  33. package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +12 -0
  34. package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/styles.css +1 -0
  35. package/src/_template/LAIN/.obsidian/snippets/body-font.css +27 -0
  36. package/src/_template/LAIN/.obsidian/themes/Primary/manifest.json +9 -0
  37. package/src/_template/LAIN/.obsidian/themes/Primary/theme.css +3878 -0
  38. package/src/_template/LAIN/.obsidian/themes/Retro Windows/manifest.json +7 -0
  39. package/src/_template/LAIN/.obsidian/themes/Retro Windows/theme.css +582 -0
  40. package/src/_template/LAIN/.obsidian/themes/RetroOS 98/manifest.json +9 -0
  41. package/src/_template/LAIN/.obsidian/themes/RetroOS 98/theme.css +2566 -0
  42. package/src/_template/LAIN/.obsidian/types.json +28 -0
  43. package/src/_template/LAIN/.obsidian/workspace.json +184 -0
  44. package/src/_template/LAIN/AGENTS.md +170 -16
  45. package/src/_template/R2MO/domain-enhance.md +10 -0
  46. package/src/commander/app.json +13 -0
  47. package/src/commander/apply.json +13 -0
  48. package/src/commander/ask.json +6 -0
  49. package/src/commander/docs.json +13 -0
  50. package/src/commander/domain.json +19 -0
  51. package/src/commander/init.json +1 -1
  52. package/src/commander/mmr0.json +6 -0
  53. package/src/commander/mmr2.json +6 -0
  54. package/src/executor/executeApp.js +133 -0
  55. package/src/executor/{executeSkills.js → executeApply.js} +166 -302
  56. package/src/executor/executeAsk.js +274 -0
  57. package/src/executor/executeDocs.js +498 -0
  58. package/src/executor/executeDomain.js +293 -0
  59. package/src/executor/executeInit.js +159 -383
  60. package/src/executor/executeMcp.js +74 -1
  61. package/src/executor/executeMmr0.js +488 -0
  62. package/src/executor/executeMmr2.js +880 -0
  63. package/src/executor/index.js +15 -3
  64. package/src/python/r2mo_proto.py +418 -0
  65. package/src/python/r2mo_proto_database.py +369 -0
  66. package/src/python/r2mo_proto_domain.py +458 -0
  67. package/src/utils/momo-menu.js +43 -13
  68. package/.claude/skills/r2mo-rad-lain/PROMPT.md +0 -281
  69. package/.claude/skills/r2mo-rad-lain/README.md +0 -192
  70. package/.claude/skills/r2mo-rad-lain/examples/argument-parsing.js +0 -154
  71. package/.claude/skills/r2mo-rad-lain/examples/file-operations.js +0 -182
  72. package/.claude/skills/r2mo-rad-lain/file-utils-api.md +0 -281
  73. package/.claude/skills/r2mo-rad-lain/menu-api.md +0 -187
  74. package/.claude/skills/r2mo-rad-lain/scripts/file-utils.js +0 -223
  75. package/.claude/skills/r2mo-rad-lain/scripts/menu.js +0 -289
  76. package/.claude/skills/r2mo-rad-lain/scripts/yaml-parser.js +0 -209
  77. package/.claude/skills/r2mo-rad-lain/templates/command.json.template +0 -13
  78. package/.claude/skills/r2mo-rad-lain/templates/executor.js.template +0 -32
  79. package/.claude/skills/r2mo-rad-lain/templates/interactive-menu.js.template +0 -221
  80. package/src/_template/LAIN/.momo/advanced/actor.md +0 -42
  81. package/src/_template/LAIN/.momo/advanced/refer.json +0 -46
  82. package/src/_template/LAIN/.momo/scripts/submodule-clean.sh +0 -56
  83. package/src/_template/LAIN/changes/proposal.md +0 -39
  84. package/src/_template/LAIN/changes/tasks/task-detail.md +0 -45
  85. package/src/_template/LAIN/changes/tasks.md +0 -49
  86. package/src/_template/LAIN/execute/admin-n-f-dashboard.md +0 -53
  87. package/src/_template/LAIN/execute/admin-n-f-form.md +0 -51
  88. package/src/_template/LAIN/execute/admin-n-f-home.md +0 -49
  89. package/src/_template/LAIN/execute/admin-n-f-list.md +0 -52
  90. package/src/_template/LAIN/execute/admin-n-f-login.md +0 -56
  91. package/src/_template/LAIN/specification/project-model.md +0 -13
  92. package/src/_template/LAIN/specification/project.md +0 -73
  93. package/src/_template/LAIN/specification/requirement.md +0 -25
  94. package/src/commander/skills.json +0 -20
@@ -0,0 +1,101 @@
1
+ ---
2
+ name: r2mo-rad-lain
3
+ description: R2MO RAD CLI Dev Skill (Lain Native)
4
+ version: 3.0.0
5
+ tags: [r2mo, rad, lain, nodejs, cli, momo]
6
+ repository: https://gitee.com/silentbalanceyh/r2mo-lain.git
7
+ ---
8
+
9
+ # Role: R2MO RAD Expert (Lain Project)
10
+
11
+ ## 🚨 Critical Rules
12
+ 1. **Stack**: CommonJS (`require`). **NO** ESM.
13
+ 2. **Core Libs**:
14
+ - Use `const Ec = require('../epic');` for logging/flow.
15
+ - Use `const Utils = require('../utils/momo-*');` for helpers.
16
+ 3. **Interactive**: MUST use `require('../utils/momo-menu')`. **NO** raw readline.
17
+ 4. **Style**: Use `Ec` for all logging.
18
+
19
+ ## 📂 Architecture
20
+ - **Config**: `src/commander/{cmd}.json`
21
+ - **Executor**: `src/executor/execute{Cmd}.js`
22
+ - **Utils**: `src/utils/` (momo-fs, momo-menu, momo-args)
23
+
24
+ ## 📝 Config Schema (JSON)
25
+ ```json
26
+ {
27
+ "executor": "executeName", "command": "name", "description": "desc",
28
+ "options": [{ "name": "arg", "alias": "a", "type": "string" }]
29
+ }
30
+ ```
31
+
32
+ ## 💻 Executor Template(Native)
33
+
34
+ ```js
35
+ const Ec = require('../epic');
36
+ const Args = require('../utils/momo-args');
37
+ const FS = require('../utils/momo-fs');
38
+ const { selectSingle } = require('../utils/momo-menu');
39
+
40
+ module.exports = async (options) => {
41
+ try {
42
+ // 1. Parsing
43
+ const opts = Args.parseStandard(options);
44
+ const target = Args.parsePositional()[0];
45
+
46
+ // 2. Logic
47
+ Ec.waiting('Working...');
48
+ if (!FS.exists(target)) Ec.error('Path not found');
49
+
50
+ // 3. Menu Example
51
+ const item = await selectSingle([{name: 'Go'}], 'Title');
52
+ if(!item) process.exit(0);
53
+
54
+ // 4. Finish
55
+ Ec.info('✅ Done');
56
+ process.exit(0);
57
+ } catch (e) { Ec.error(e.message); process.exit(1); }
58
+ };
59
+ ```
60
+
61
+ ## 📚 API Reference (Project Context)
62
+
63
+ ### 1. File System ( `momo-fs.js` )
64
+
65
+ Combines file-utils and yaml-parser.
66
+
67
+ ```js
68
+ const FS = require('../utils/momo-fs');
69
+ // Methods:
70
+ ensureDir(path), exists(path), readJson(path), writeJson(path, data)
71
+ copyDir(src, dest), scanDir(dir, filterFn?), createTempDir(prefix?)
72
+ cleanup(path), gitClone(url, dest)
73
+ parseFile(path) // YAML Frontmatter
74
+ ```
75
+
76
+ ### 2. Interactive Menu ( `momo-menu.js` )
77
+
78
+ ```js
79
+ const { selectMultiple, selectSingle, clearScreen } = require('../utils/momo-menu');
80
+ // selectMultiple returns { indices: [], items: [] }
81
+ // selectSingle returns Item | null
82
+ ```
83
+
84
+ ### 3. Argument Parser ( `momo-args.js` )
85
+
86
+ ```js
87
+ const Args = require('../utils/momo-args');
88
+ // Methods:
89
+ parseStandard(options) // Standard KV
90
+ parseOptional(flag, alias)
91
+ parseBool(flag, alias)
92
+ parsePositional()
93
+ ```
94
+
95
+ ### 4. Core (`../epic`)
96
+
97
+ `Ec.info/warn/error/waiting(msg)`
98
+
99
+ `await Ec.ask(query)` (Use only AFTER menu closes)
100
+
101
+ String colors: `.green, .blue, .bold`, etc.
package/README.md CHANGED
@@ -5,15 +5,18 @@
5
5
 
6
6
  ![R2MO](docs/images/logo.jpeg)
7
7
 
8
- ## 引导
8
+ ## 0. 引导
9
9
 
10
- - 文档:<https://www.yuque.com/jiezizhu/r2mo>
11
- - [>> 快速开始](https://www.yuque.com/jiezizhu/r2mo/xw91uhgzl0iztgtm)
10
+ - 教程:<https://www.yuque.com/jiezizhu/r2mo>
11
+ - [>> 快速开始](https://www.yuque.com/jiezizhu/r2mo/ssl9rl5klogu7cp0)
12
+ - 教程地图:<https://kumu.io/LangYu1017/zero>
12
13
  - 示例:<https://gitee.com/zero-ws/zero-rachel-momo>
13
14
 
14
- ## 1. 介绍
15
+ ![R2MO-Lain](docs/images/r2mo-lain.png)
16
+
17
+ ---
15
18
 
16
- ### 1.1. 功能说明
19
+ ## 1. 介绍
17
20
 
18
21
  当前工具会在操作系统中安装 `momo` 命令,使用它进行 `SDD - Spec Driven Development` 开发。
19
22
 
@@ -21,36 +24,10 @@
21
24
 
22
25
  ## 2. 工具使用
23
26
 
24
- ### 2.1. 安装
25
-
26
27
  ```bash
27
28
  npm install -g momo-ai
28
29
  # 查看帮助
29
30
  momo help
30
31
  ```
31
32
 
32
- ### 2.3. 命令
33
-
34
- ```bash
35
- momo env # 环境检查
36
-
37
- momo init -d app-fly # 初始化 directory = app-fly 的项目
38
- momo init # 初始化当前项目
39
- ```
40
- <hr/>
41
-
42
- ## 3. 参考链接
43
-
44
- ### 3.1. 旧版
45
-
46
- - (后端)Zero Ecotope:<https://www.zerows.io>
47
- - (前端)Zero UI:<https://www.vertxui.cn>
48
- - (工具)Zero AI:<https://www.vertxai.cn>
49
- - (标准)Zero Schema:<https://www.vertx-cloud.cn>
50
-
51
- ### 3.2. 新增
52
-
53
- - Maven 统一版本管理:<https://gitee.com/silentbalanceyh/rachel-momo>
54
- - Rapid快速开发框架:<https://gitee.com/silentbalanceyh/r2mo-rapid>
55
- - Zero Epoch:<https://www.zerows.io>
56
- - Zero Demo:<https://gitee.com/zero-ws/zero-rachel-momo>
33
+ <hr/>
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "momo-ai",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Rachel Momo ( OpenSpec )",
5
5
  "main": "src/momo.js",
6
6
  "bin": {
@@ -34,25 +34,25 @@
34
34
  "clipboard-copy": "^4.0.1",
35
35
  "co": "^4.6.0",
36
36
  "colors": "^1.4.0",
37
- "commander": "^11.0.0",
38
- "crypto-js": "^4.1.1",
37
+ "commander": "^14.0.2",
38
+ "crypto-js": "^4.2.0",
39
39
  "dox": "^1.0.0",
40
- "ejs": "^3.1.10",
41
- "exceljs": "^4.3.0",
40
+ "ejs": "^4.0.1",
41
+ "exceljs": "^4.4.0",
42
42
  "extend": "^3.0.2",
43
43
  "front-matter": "^4.0.2",
44
- "handlebars": "^4.7.7",
44
+ "handlebars": "^4.7.8",
45
45
  "i": "^0.3.7",
46
- "immutable": "^4.3.0",
46
+ "immutable": "^5.1.4",
47
47
  "linebyline": "^1.3.0",
48
- "lodash": "^4.17.21",
48
+ "lodash": "^4.17.23",
49
49
  "mkdirp": "^3.0.1",
50
50
  "mockjs": "^1.1.0",
51
51
  "random-js": "^2.1.0",
52
- "superagent": "^8.0.9",
52
+ "superagent": "^10.3.0",
53
53
  "taffydb": "^2.7.3",
54
- "underscore": "^1.13.6",
55
- "uuid": "^9.0.0",
54
+ "underscore": "^1.13.7",
55
+ "uuid": "^13.0.0",
56
56
  "zod": "^4.3.5"
57
57
  },
58
58
  "homepage": "https://gitee.com/silentbalanceyh/r2mo-lain",
@@ -0,0 +1,70 @@
1
+ ---
2
+ name: r2mo-rad-domain
3
+ description: R2MO Domain Intelligence Enhancer (AI Protocol)
4
+ version: 1.0.0
5
+ tags: [r2mo, rad, lain, protocol, natural-language]
6
+ repository: https://gitee.com/silentbalanceyh/r2mo-lain.git
7
+ ---
8
+
9
+ # Role: R2MO Domain Expert
10
+
11
+ ## 🚨 Critical Rules
12
+ 1. **Execution Mode**: You act as a direct processor. Do not generate script code. **Perform the analysis and file modifications directly.**
13
+ 2. **Path Resolution Logic**:
14
+ - **Identify**: Read `pom.xml` in the current root -> Extract `<artifactId>` -> Set as **{PROJECT_ID}**.
15
+ - **Locate**: Enter directory `./{PROJECT_ID}-ui/.r2mo/domain/`.
16
+ 3. **Enhancement Logic**:
17
+ - **Read**: Scan all `.proto` files in the target directory.
18
+ - **Translate**: Identify the main model name, translate its business meaning into Chinese, and append it as a comment.
19
+ - **Infer**: Apply "Expert Experience" rules to field names.
20
+ - **Rewrite**: Append semantic constraints as comments to the file content in-place.
21
+ 4. **Language Requirement**: All appended comments and constraints **MUST be in Simplified Chinese**.
22
+
23
+ ## 📂 Architecture
24
+ - **Input**: Project `pom.xml` and Protobuf definitions.
25
+ - **Logic**: Semantic Inference Engine (Expert Knowledge Base).
26
+ - **Output**: Enhanced `.proto` files with Chinese business constraints.
27
+
28
+ ## 💻 Executor Template(Native)
29
+
30
+ **[INSTRUCTION SET FOR AI AGENT]**
31
+
32
+ ### STEP 1: CONTEXTUALIZATION
33
+ 1. **Find Project ID**:
34
+ - Scan the current directory for `pom.xml`.
35
+ - Extract the text content of the `<artifactId>` tag.
36
+ - *Example*: If `<artifactId>shop</artifactId>`, then ID is `shop`.
37
+ 2. **Target Directory**:
38
+ - Construct path: `{ID}-ui/.r2mo/domain/`.
39
+ - If directory exists, proceed. If not, stop and report error.
40
+
41
+ ### STEP 2: SEMANTIC ANALYSIS (The Expert Rules)
42
+
43
+ **Part A: Model Name Translation**
44
+ Identify the main `message` name in each file. Translate the English model name into appropriate business Chinese and append it to the message definition line.
45
+ * *Example*: `message MerchantAccount {` -> `message MerchantAccount { // [模型: 商户账户]`
46
+ * *Example*: `message OrderItem {` -> `message OrderItem { // [模型: 订单明细]`
47
+
48
+ **Part B: Field Constraint Inference**
49
+ Read every field definition. Analyze the **Field Name**. If it matches a pattern below, append the specific **Chinese Comment**:
50
+
51
+ | Field Name Pattern | Constraint Comment to Append (Chinese) |
52
+ | :--- | :--- |
53
+ | `email` | `// [格式: 邮箱]` |
54
+ | `phone`, `mobile` | `// [格式: 手机号]` |
55
+ | `password`, `secret` | `// [安全: 加密存储]` |
56
+ | `price`, `amount`, `cost` | `// [精度: 2位小数]` |
57
+ | `rate`, `ratio` | `// [精度: 4位小数]` |
58
+ | `status`, `type`, `state` | `// [枚举/常量]` (Check for Enum definitions) |
59
+ | `created_at`, `_time` | `// [格式: ISO8601]` |
60
+ | `is_...`, `active`, `enable` | `// [布尔: 0/1]` |
61
+ | `_id`, `_key` | `// [必填, 雪花/UUID]` |
62
+ | `name`, `title` | `// [长度: 64]` |
63
+ | `desc`, `content`, `remark` | `// [长度: 500/大字段]` |
64
+ | *(Repeated Field)* | `// [关系: 0..n]` |
65
+
66
+ ### STEP 3: EXECUTION (Rewrite)
67
+ 1. **Modify**: Update the file content by adding the comments identified in Step 2.
68
+ - *Constraint*: Do **NOT** change the `syntax`, `package`, `option`, field types, or field names. Only add comments at the end of lines.
69
+ 2. **Save**: Overwrite the files with the enhanced content.
70
+ 3. **Report**: List the files that were successfully enhanced.
@@ -1,16 +1,22 @@
1
1
  {
2
2
  "repositories": [
3
3
  {
4
- "name": "anthropics/skills",
4
+ "name": "anthropics",
5
5
  "description": "Anthropic 官方技能仓库",
6
6
  "url": "https://github.com/anthropics/skills.git",
7
7
  "skillsPath": "skills"
8
8
  },
9
9
  {
10
- "name": "silentbalanceyh/r2mo-lain",
11
- "description": "R2MO 项目技能仓库 (Gitee)",
10
+ "name": "r2mo",
11
+ "description": "R2MO 项目技能仓库",
12
12
  "url": "https://gitee.com/silentbalanceyh/r2mo-lain.git",
13
13
  "skillsPath": "skills"
14
+ },
15
+ {
16
+ "name":"superpowers",
17
+ "description": "Superpowers AI 官方技能仓库",
18
+ "url": "https://github.com/obra/superpowers.git",
19
+ "skillsPath": "skills"
14
20
  }
15
21
  ]
16
22
  }
@@ -0,0 +1 @@
1
+ {}
@@ -0,0 +1,10 @@
1
+ {
2
+ "theme": "moonstone",
3
+ "cssTheme": "",
4
+ "interfaceFontFamily": "",
5
+ "baseFontSize": 20,
6
+ "textFontFamily": "STFangsong",
7
+ "enabledCssSnippets": [
8
+ "body-font"
9
+ ]
10
+ }
@@ -0,0 +1,7 @@
1
+ [
2
+ "dataview",
3
+ "obsidian-excalidraw-plugin",
4
+ "obsidian-kanban",
5
+ "obsidian-plantuml",
6
+ "obsidian-tasks-plugin"
7
+ ]
@@ -0,0 +1,33 @@
1
+ {
2
+ "file-explorer": true,
3
+ "global-search": true,
4
+ "switcher": true,
5
+ "graph": true,
6
+ "backlink": true,
7
+ "canvas": true,
8
+ "outgoing-link": true,
9
+ "tag-pane": true,
10
+ "footnotes": false,
11
+ "properties": true,
12
+ "page-preview": true,
13
+ "daily-notes": true,
14
+ "templates": true,
15
+ "note-composer": true,
16
+ "command-palette": true,
17
+ "slash-command": false,
18
+ "editor-status": true,
19
+ "bookmarks": true,
20
+ "markdown-importer": true,
21
+ "zk-prefixer": false,
22
+ "random-note": false,
23
+ "outline": true,
24
+ "word-count": true,
25
+ "slides": true,
26
+ "audio-recorder": false,
27
+ "workspaces": true,
28
+ "file-recovery": true,
29
+ "publish": true,
30
+ "sync": true,
31
+ "bases": true,
32
+ "webviewer": true
33
+ }