momo-ai 1.0.87 → 1.0.89

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.
@@ -0,0 +1,2 @@
1
+ approval_policy = "never"
2
+ sandbox_mode = "danger-full-access"
@@ -0,0 +1,35 @@
1
+ {
2
+ "name": "r2mo-lain",
3
+ "version": "0.1.0",
4
+ "description": "Project-local Codex slash command workspace for R2MO Lain workflows.",
5
+ "author": {
6
+ "name": "R2MO"
7
+ },
8
+ "homepage": "https://gitee.com/silentbalanceyh/r2mo-lain",
9
+ "repository": "https://gitee.com/silentbalanceyh/r2mo-lain.git",
10
+ "license": "ISC",
11
+ "keywords": [
12
+ "r2mo",
13
+ "lain",
14
+ "momo",
15
+ "codex",
16
+ "slash-commands"
17
+ ],
18
+ "skills": "./skills/",
19
+ "interface": {
20
+ "displayName": "R2MO Lain",
21
+ "shortDescription": "R2MO Lain Codex slash commands",
22
+ "longDescription": "Project-local Codex plugin package for developing reusable slash commands around R2MO Lain CLI workflows.",
23
+ "developerName": "R2MO",
24
+ "category": "Coding",
25
+ "capabilities": [
26
+ "Interactive",
27
+ "Write"
28
+ ],
29
+ "websiteURL": "https://gitee.com/silentbalanceyh/r2mo-lain",
30
+ "defaultPrompt": [
31
+ "Help me develop a Codex slash command for an R2MO Lain workflow"
32
+ ],
33
+ "screenshots": []
34
+ }
35
+ }
package/AGENTS.md CHANGED
@@ -1,307 +1,281 @@
1
- # AI Agents Integration (Momo CLI)
1
+ # Codex Project Guide for r2mo-lain
2
2
 
3
- This document helps AI coding assistants understand the project structure and workflows. Following these conventions improves accuracy when assisting development.
3
+ This file gives Codex the project-specific rules for working in this repository. It is derived from `CLAUDE.md` and adapted for Codex coding workflows.
4
4
 
5
- ## Project Workflow
5
+ ## Project Identity
6
6
 
7
- 1. **Requirements** Define and analyze business needs
8
- 2. **Task planning** – Break requirements into executable tasks
9
- 3. **Role assignment** – Assign AI or human roles per task
10
- 4. **Implementation** – Implement tasks and generate code
11
- 5. **Verification** – Validate that outcomes meet requirements
12
- 6. **Archive & commit** – Archive and commit completed work
7
+ `r2mo-lain` is a Node.js RAD CLI for R2MO / Momo workflows.
13
8
 
14
- ## Momo CLI Tools (Reference)
9
+ - Package name: `momo-ai`
10
+ - CLI binaries: `momo` and `lain`
11
+ - Main entry: `src/momo.js`
12
+ - Command metadata: `src/commander/*.json`
13
+ - Command executors: `src/executor/execute*.js`
14
+ - Shared utilities: `src/utils/momo-*.js`
15
+ - Core runtime/logging helpers: `src/epic/`
15
16
 
16
- All tools are invoked as `momo <command> [options]`. Descriptions and options are derived from `src/commander/*.json`.
17
+ This repository is not itself a Maven application. Do not apply Java, Spring, R2MO framework, or Zero framework coding rules unless the active task explicitly targets a generated Maven project outside this CLI or a Maven project is proven by a relevant `pom.xml`.
17
18
 
18
- ---
19
+ ## Critical Coding Rules
19
20
 
20
- ### Basic commands
21
+ ### Module System
21
22
 
22
- #### `momo help [-c <command>]`
23
- Show help. With `-c`, show detailed help for a specific command.
23
+ Use CommonJS only.
24
24
 
25
- **Options:**
26
- - `-c, --command`: Command name
25
+ ```js
26
+ const Ec = require('../epic');
27
+ const Args = require('../utils/momo-args');
27
28
 
28
- **Examples:**
29
- ```bash
30
- momo help
31
- momo help -c init
29
+ module.exports = async (options) => {
30
+ // implementation
31
+ };
32
32
  ```
33
33
 
34
- #### `momo env`
35
- Check environment (Node.js, Python, and other system dependencies).
34
+ Do not introduce ESM syntax.
36
35
 
37
- **Examples:**
38
- ```bash
39
- momo env
36
+ ```js
37
+ // Do not use in this project
38
+ import Ec from '../epic';
39
+ export default handler;
40
40
  ```
41
41
 
42
- #### `momo init [-d <dir>]`
43
- Initialize R2MO specification directory structure.
42
+ ### Core Imports
44
43
 
45
- **Options:**
46
- - `-d, --dir`: Target directory (default: current directory)
44
+ Use the existing project modules instead of adding parallel abstractions.
47
45
 
48
- **Examples:**
49
- ```bash
50
- momo init
51
- momo init -d ./my-project
46
+ ```js
47
+ const Ec = require('../epic');
48
+ const Args = require('../utils/momo-args');
49
+ const FS = require('../utils/momo-fs');
50
+ const { selectSingle, selectMultiple } = require('../utils/momo-menu');
52
51
  ```
53
52
 
54
- ---
53
+ Path depth may vary by file location, but keep the same module families:
55
54
 
56
- ### Development & project commands
55
+ - `../epic` for logging, metadata parsing, flow control, and shared runtime helpers.
56
+ - `../utils/momo-*` for filesystem, menu, argument, repository, and other utility behavior.
57
+ - `src/commander/*.json` for command declaration and option metadata.
58
+ - `src/executor/execute*.js` for command implementation.
57
59
 
58
- #### `momo app -n <name>`
59
- Create a new R2MO/Spring or ZERO/Vertx application.
60
+ ### Interactive Input
60
61
 
61
- **Options:**
62
- - `-n, --name`: Application name (required)
62
+ All interactive selection UI must use `src/utils/momo-menu.js`.
63
63
 
64
- **Examples:**
65
- ```bash
66
- momo app -n my-app
67
- ```
68
-
69
- #### `momo open [-d <dir>]`
70
- Open the project with a chosen AI tool (Antigravity, Trae, Cursor).
71
-
72
- **Options:**
73
- - `-d, --dir`: Directory to open (default: current directory)
74
-
75
- **Examples:**
76
- ```bash
77
- momo open
78
- momo open -d ./src
79
- ```
64
+ - Use `selectSingle()` for one choice.
65
+ - Use `selectMultiple()` for multiple choices.
66
+ - Use `clearScreen()` when matching existing menu behavior.
67
+ - Do not add raw `readline`, `inquirer`, `prompts`, or another prompt package in command executors.
68
+ - `readline` belongs in `momo-menu.js`; do not duplicate raw terminal handling elsewhere.
80
69
 
81
- #### `momo domain [-d <dir>] [-e]`
82
- Run `r2mo_proto` to process Maven project domain model (Protobuf / DB).
70
+ ### Logging And Output
83
71
 
84
- **Options:**
85
- - `-d, --dir`: Target directory (default: current directory); must be Maven root with `pom.xml`
86
- - `-e, --entity`: Generate from Entity (true) or from SQL (false); default true
72
+ Use `Ec` for normal command output.
87
73
 
88
- **Examples:**
89
- ```bash
90
- momo domain
91
- momo domain -d ./my-maven-project
74
+ ```js
75
+ Ec.info('Done');
76
+ Ec.warn('Skipped existing file');
77
+ Ec.error('Path not found');
78
+ Ec.waiting('Working...');
92
79
  ```
93
80
 
94
- #### `momo ui -n <name> [-d <dir>] [-u]`
95
- Create or update a UI subproject from the r2mo-ui template (Rust/WASM + Tauri).
96
-
97
- **Options:**
98
- - `-n, --name`: Project name (required for create; DPA suggests `xxx-ui`)
99
- - `-d, --dir`: Parent directory (default: current directory)
100
- - `-u, --update`: Update mode: sync root MD, `src/pages/components`, `src/pages/utils`, and optionally other changed files via multi-select; target defaults to current directory when `-u` is used without `-n`
101
-
102
- **Examples:**
103
- ```bash
104
- momo ui -n my-app-ui -d .
105
- momo ui -u
81
+ Avoid direct `console.log()` in new business logic. Only preserve or extend direct console output when the file is already a dedicated renderer, such as detailed help output or low-level terminal UI, and the existing style requires formatted raw output.
82
+
83
+ ### Process Exit
84
+
85
+ Executors are CLI command handlers and commonly terminate explicitly.
86
+
87
+ - On success, use `process.exit(0)` when the existing command pattern does so.
88
+ - On handled failure, log with `Ec.error()` and use `process.exit(1)`.
89
+ - Do not silently swallow errors.
90
+ - Keep cleanup before exit for temp directories, raw terminal mode, and copied/generated resources.
91
+
92
+ ## Project Architecture
93
+
94
+ ```text
95
+ src/
96
+ ├── commander/ # Command configuration JSON files
97
+ │ └── {cmd}.json
98
+ ├── executor/ # Command implementations
99
+ │ └── execute{Cmd}.js
100
+ ├── utils/ # Shared CLI utilities
101
+ │ ├── momo-args.js
102
+ │ ├── momo-menu.js
103
+ │ └── momo-*.js
104
+ ├── epic/ # Core runtime helpers and logging
105
+ ├── python/ # Python helpers invoked by CLI commands
106
+ ├── _template/ # Project, prompt, MCP, and agent templates
107
+ ├── _agent/ # Agent metadata/templates
108
+ ├── _skill/ # Skill repository metadata
109
+ └── _mcp/ # MCP skills server
106
110
  ```
107
111
 
108
- #### `momo admin [-d <dir>]`
109
- Generate front-end page structure from project requirements (`.r2mo/requirements/project.md`). Writes module/personal pages under `src/pages/`; skips overwriting existing files (metadata, requirement, page yaml).
110
-
111
- **Options:**
112
- - `-d, --dir`: Target directory (default: current directory)
113
-
114
- **Examples:**
115
- ```bash
116
- momo admin
117
- momo admin -d .
112
+ ## Command Implementation Workflow
113
+
114
+ When adding a `momo` command:
115
+
116
+ 1. Add command metadata in `src/commander/{cmd}.json`.
117
+ 2. Implement the executor in `src/executor/execute{Cmd}.js`.
118
+ 3. Export the executor from `src/executor/index.js`.
119
+ 4. Use `Ec.parseMetadata()` / existing command loading behavior instead of custom discovery.
120
+ 5. Test with `node src/momo.js help` and the specific command path.
121
+
122
+ Command config shape:
123
+
124
+ ```json
125
+ {
126
+ "executor": "executeName",
127
+ "command": "name",
128
+ "description": "Command description",
129
+ "options": [
130
+ {
131
+ "name": "argument",
132
+ "alias": "a",
133
+ "type": "string",
134
+ "description": "Option description"
135
+ }
136
+ ]
137
+ }
118
138
  ```
119
139
 
120
- ---
121
-
122
- ### Specification & API commands
123
-
124
- #### `momo mod [-d <dir>]`
125
- Pull r2mo-spec into `.r2mo/repo` and copy project/OpenAPI artifacts to `.r2mo/api/`.
126
-
127
- **Options:**
128
- - `-d, --dir`: Project root (default: current directory)
129
-
130
- **Examples:**
131
- ```bash
132
- momo mod
133
- momo mod -d .
140
+ Executor pattern:
141
+
142
+ ```js
143
+ const Ec = require('../epic');
144
+ const Args = require('../utils/momo-args');
145
+ const FS = require('../utils/momo-fs');
146
+ const { selectSingle } = require('../utils/momo-menu');
147
+
148
+ module.exports = async (options) => {
149
+ try {
150
+ const opts = Args.parseStandard(options);
151
+ const target = Args.parsePositional()[0];
152
+
153
+ Ec.waiting('Working...');
154
+
155
+ if (target && !FS.exists(target)) {
156
+ Ec.error('Path not found');
157
+ process.exit(1);
158
+ }
159
+
160
+ const item = await selectSingle([{ name: 'Go' }], 'Title');
161
+ if (!item) {
162
+ process.exit(0);
163
+ }
164
+
165
+ Ec.info('Done');
166
+ process.exit(0);
167
+ } catch (e) {
168
+ Ec.error(e.message);
169
+ process.exit(1);
170
+ }
171
+ };
134
172
  ```
135
173
 
136
- #### `momo openapi [-d <dir>]`
137
- Extract Operation/Schema markdown from subprojects’ `src/main/resources/openapi` and copy to `-ui/.r2mo/api/` preserving structure.
174
+ ## Codex Slash Command Development
138
175
 
139
- **Options:**
140
- - `-d, --dir`: Project root (default: current directory)
176
+ This repository is also initialized as a project-local Codex plugin workspace for `/` command development.
141
177
 
142
- **Examples:**
143
- ```bash
144
- momo openapi
145
- momo openapi -d .
146
- ```
178
+ - Plugin manifest: `.codex-plugin/plugin.json`
179
+ - Slash command directory: `commands/`
180
+ - Command conventions: `commands/_conventions.md`
181
+ - Command template: `commands/_template.md`
182
+ - Command validator: `scripts/validate-commands.js`
147
183
 
148
- #### `momo docs [-d <dir>]`
149
- Open the docs directory with Obsidian.
184
+ Rules for Codex slash commands:
150
185
 
151
- **Options:**
152
- - `-d, --dir`: Target directory (default: current directory)
186
+ - Finished commands live at `commands/<name>.md` and become invokable as `/<name>`.
187
+ - Drafts, templates, and notes must start with `_`, for example `commands/_template.md`; underscore files are meta-documents and should not be treated as runnable commands.
188
+ - Every runnable command must include YAML frontmatter with `description`.
189
+ - Use `$ARGUMENTS` in command files for user-provided invocation text.
190
+ - Keep runnable command files operational: include `Arguments`, `Preflight`, `Plan`, `Commands`, `Verification`, `Summary`, and `Next Steps` sections.
191
+ - Validate command files with `npm run validate:commands` before claiming command setup is complete.
192
+ - Do not add a runnable slash command until its workflow is specific, safe, and verifiable.
153
193
 
154
- **Examples:**
155
- ```bash
156
- momo docs
157
- momo docs -d ./specification
158
- ```
194
+ ## Existing Utility Contracts
159
195
 
160
- #### `momo menu [-d <dir>]`
161
- Scan `src/pages` for `menu.yaml` and print the full tree menu (name, text, icon).
196
+ Argument parsing:
162
197
 
163
- **Options:**
164
- - `-d, --dir`: Project root (default: current directory)
198
+ ```js
199
+ const Args = require('../utils/momo-args');
165
200
 
166
- **Examples:**
167
- ```bash
168
- momo menu
169
- momo menu -d .
201
+ const opts = Args.parseStandard(options);
202
+ const value = Args.parseOptional('flag', 'f');
203
+ const enabled = Args.parseBool('flag', 'f');
204
+ const args = Args.parsePositional();
170
205
  ```
171
206
 
172
- ---
207
+ Interactive menus:
173
208
 
174
- ### Dictionary & Flyway commands
209
+ ```js
210
+ const { selectSingle, selectMultiple, clearScreen } = require('../utils/momo-menu');
175
211
 
176
- #### `momo dict [-d <dir>] [-r]`
177
- **Forward:** Read `.r2mo/api/components/schemas` (XTabular/XCategory), connect via `app.env`, export `X_TABULAR`/`X_CATEGORY` by TYPE to `targetDir/.r2mo/data/dbdict/` as `dict.{type}.yaml` and `tree.{type}.yaml`. When matching Flyway SQL exists, prepend metadata (sqlFile, sqlPath) in YAML front-matter.
178
-
179
- **Reverse (`-r`):** Read `.r2mo/data/dbdict` YAML (DPA: from `-ui` dir). Only process files with valid metadata (sqlPath). Ask once to overwrite; then overwrite the SQL files at recorded paths.
180
-
181
- **Options:**
182
- - `-d, --dir`: Project root (default: current directory)
183
- - `-r, --reverse`: Reverse mode: YAML as input, generate/overwrite Flyway SQL using metadata
184
-
185
- **Examples:**
186
- ```bash
187
- momo dict
188
- momo dict -d .
189
- momo dict -r
212
+ const item = await selectSingle(items, 'Title');
213
+ const result = await selectMultiple(items, 'Title');
214
+ clearScreen();
190
215
  ```
191
216
 
192
- ---
193
-
194
- ### Spec repository codegen commands
195
-
196
- #### `momo mmr0`
197
- Download from r2mo-spec repository and generate Flyway SQL files (e.g. into `-domain` Flyway dir).
198
-
199
- **Examples:**
200
- ```bash
201
- momo mmr0
202
- ```
203
-
204
- #### `momo mmr2`
205
- Download from r2mo-spec repository and generate Entity classes.
206
-
207
- **Examples:**
208
- ```bash
209
- momo mmr2
210
- ```
211
-
212
- ---
213
-
214
- ### Skills & MCP commands
215
-
216
- #### `momo apply [-r [repo_name]]`
217
- Install skills from a remote repository into the local project. Choose target path interactively.
218
-
219
- **Options:**
220
- - `-r, --remote`: Install from remote (optional repo name)
221
-
222
- **Install targets:**
223
- - Cursor (`.claude/skills/`)
224
- - Antigravity (`.agent/skills/`)
225
- - Trae CN / Trae (`.trae/skills/`)
226
- - Lingma (`.lingma/skills/`)
227
-
228
- **Examples:**
229
- ```bash
230
- momo apply -r
231
- momo apply -r anthropics/skills
232
- ```
233
-
234
- #### `momo mcp [-c]`
235
- Configure MCP Skills Server: merge project and global skills and generate Cursor `mcp.json`.
236
-
237
- **Options:**
238
- - `-c, --check`: Only check dependencies; do not configure
239
-
240
- **Behavior:**
241
- - Install MCP deps under `.r2mo/mcpserver`
242
- - Write `.cursor/mcp.json`
243
- - Copy config to clipboard
244
-
245
- **Examples:**
246
- ```bash
247
- momo mcp
248
- momo mcp -c
249
- ```
250
-
251
- ---
252
-
253
- ### Prompt & template commands
217
+ Core logging:
254
218
 
255
- #### `momo ask`
256
- Pick a prompt template from `src/_template/R2MO/`, extract content between `--- BEGIN` and `--- END`, copy to clipboard, and show template details (file, title, version, skills, commands). If the prompt contains a “模块:ID,NAME,PATH” placeholder, scan `src/pages/*/requirement.module.md` (with valid front-matter, no `{}` placeholders), let the user choose a module, and replace the placeholder with that module’s ID, name, and path.
219
+ ```js
220
+ const Ec = require('../epic');
257
221
 
258
- **Examples:**
259
- ```bash
260
- momo ask
222
+ Ec.info('Information message');
223
+ Ec.warn('Warning message');
224
+ Ec.error('Error message');
225
+ Ec.waiting('Processing...');
261
226
  ```
262
227
 
263
- ---
264
-
265
- ## Tool summary (by command)
266
-
267
- | Command | Description (short) |
268
- |----------|----------------------|
269
- | `help` | Show help; optional `-c` for command-specific help |
270
- | `env` | Environment check |
271
- | `init` | Initialize R2MO spec directory |
272
- | `app` | Create R2MO/Spring or ZERO/Vertx app |
273
- | `open` | Open project in AI tool (Antigravity/Trae/Cursor) |
274
- | `domain` | Run r2mo_proto for domain/Protobuf |
275
- | `ui` | Create/update UI subproject from r2mo-ui; `-u` update mode |
276
- | `admin` | Generate front-end page structure from requirements (skip existing) |
277
- | `mod` | Pull r2mo-spec, copy OpenAPI to `.r2mo/api/` |
278
- | `openapi`| Extract OpenAPI md to `-ui/.r2mo/api/` |
279
- | `docs` | Open docs in Obsidian |
280
- | `menu` | Print tree menu from `src/pages` menu.yaml |
281
- | `dict` | Export dict to `.r2mo/data/dbdict` (with metadata); `-r` reverse to Flyway SQL |
282
- | `mmr0` | Generate Flyway SQL from r2mo-spec |
283
- | `mmr2` | Generate Entity classes from r2mo-spec |
284
- | `apply` | Install skills from remote (Cursor/Agent/Trae/Lingma) |
285
- | `mcp` | Configure MCP Skills Server and `mcp.json` |
286
- | `ask` | Select prompt template, optional module substitution, copy to clipboard |
287
-
288
- ---
289
-
290
- ## Key paths
291
-
292
- - **Spec / requirements:** `.r2mo/requirements/`, `src/_template/R2MO/`
293
- - **Schemas / API:** `.r2mo/api/components/schemas`, `-ui/.r2mo/api/`
294
- - **Dictionary:** `.r2mo/data/dbdict/` (dict.*.yaml, tree.*.yaml; optional front-matter sqlFile/sqlPath)
295
- - **Flyway SQL:** `-domain/src/main/resources/plugins/<artifactId>/flyway/MYSQL/`
296
- - **Skills:** `.claude/skills/`, `.agent/skills/`, `.trae/skills/`, `.lingma/skills/`
297
- - **MCP:** `.r2mo/mcpserver/`, `.cursor/mcp.json`
298
-
299
- ---
300
-
301
- ## Conventions
302
-
303
- 1. **DPA vs ONE:** DPA = Domain + Provider + Api (+ `-ui`); target dir for UI/dbdict is `-ui`; app.env from `-api`. ONE = single project; target dir is project root.
304
- 2. **momo dict:** Forward writes YAML with optional metadata from matching Flyway SQL; reverse only processes YAML with valid metadata and overwrites SQL after user confirmation.
305
- 3. **momo admin:** Does not overwrite existing metadata, requirement, or page yaml files.
306
- 4. **momo ask:** Modules with `{}` placeholders in front-matter are excluded from the module list.
307
- 5. **momo ui -u:** Without `-n`, target is current directory; Rust/Tauri and listed root files are not updated in “other files” multi-select.
228
+ ## Testing And Verification
229
+
230
+ There is no broad test suite configured beyond the package script. Prefer targeted CLI verification.
231
+
232
+ - Run `node src/momo.js version` after changes touching startup or package metadata.
233
+ - Run `node src/momo.js help` after changes touching command metadata, executor registration, or help behavior.
234
+ - Run `node src/momo.js help -c <command>` after adding or changing one command.
235
+ - Run the changed command with a safe temp directory or fixture when it writes files.
236
+ - Run `npm test` only if the current task requires the package script; note that it maps directly to `src/index.test.js`.
237
+
238
+ Do not claim verification succeeded unless the command was actually run and completed successfully.
239
+
240
+ ## Momo CLI Context
241
+
242
+ Common user-facing commands are:
243
+
244
+ - `momo help [-c <command>]`
245
+ - `momo env`
246
+ - `momo init [-d <dir>]`
247
+ - `momo app -n <name>`
248
+ - `momo open [-d <dir>]`
249
+ - `momo domain [-d <dir>] [-e]`
250
+ - `momo ui -n <name> [-d <dir>] [-u]`
251
+ - `momo admin [-d <dir>]`
252
+ - `momo mod [-d <dir>]`
253
+ - `momo openapi [-d <dir>]`
254
+ - `momo docs [-d <dir>]`
255
+ - `momo menu [-d <dir>]`
256
+ - `momo dict [-d <dir>] [-r]`
257
+ - `momo mmr0`
258
+ - `momo mmr2`
259
+ - `momo apply [-r [repo_name]]`
260
+ - `momo mcp [-c]`
261
+ - `momo ask`
262
+ - `momo task`
263
+ - `momo run`
264
+ - `momo team`
265
+ - `momo focus`
266
+
267
+ When command details are needed, prefer reading the corresponding `src/commander/{cmd}.json` and `src/executor/execute{Cmd}.js` instead of relying on this summary.
268
+
269
+ ## Editing Discipline
270
+
271
+ - Keep changes small and aligned with the existing style.
272
+ - Do not introduce new dependencies for behavior already covered by `src/utils` or `src/epic`.
273
+ - Do not rewrite unrelated command executors while implementing a specific command.
274
+ - Preserve existing generated/template assets unless the task explicitly targets them.
275
+ - Respect dirty worktree changes that were not made for the current task.
276
+ - Update templates under `src/_template/` only when the user asks for template behavior changes.
277
+
278
+ ## Repository Metadata
279
+
280
+ - Repository: `https://gitee.com/silentbalanceyh/r2mo-lain.git`
281
+ - Keywords: `r2mo`, `rad`, `lain`, `nodejs`, `cli`, `momo`
package/README.md CHANGED
@@ -69,8 +69,8 @@ momo help
69
69
  | 命令 | 说明 | 示例 |
70
70
  |:---|:---|:---|
71
71
  | `momo ask` | 从模板目录中选择提示词并复制到剪切板 | `momo ask` |
72
- | `momo run` | `.r2mo/task` 中选择任务,生成提示词到剪贴板 | `momo run` |
73
- | `momo task` | `.r2mo/task/` 下使用五槽位创建任务,写入提示词到剪贴板 | `momo task` |
72
+ | `momo run` | 从项目根或 `.r2mo` 目录下的 `task/` 中选择任务,生成提示词到剪贴板 | `momo run` |
73
+ | `momo task` | 按项目根或 `.r2mo` 目录下的 `task/thread` 配置对齐任务槽位;thread 缺失时默认 20,满队列时交互选择要转历史的任务 | `momo task` |
74
74
 
75
75
  <hr/>
76
76
 
@@ -88,4 +88,4 @@ momo help
88
88
  - Maven 统一版本管理:<https://gitee.com/silentbalanceyh/rachel-momo>
89
89
  - Rapid快速开发框架:<https://gitee.com/silentbalanceyh/r2mo-rapid>
90
90
  - Zero Epoch:<https://www.zerows.io>
91
- - Zero Demo:<https://gitee.com/zero-ws/zero-rachel-momo>
91
+ - Zero Demo:<https://gitee.com/zero-ws/zero-rachel-momo>
@@ -0,0 +1,28 @@
1
+ # R2MO Lain Codex Slash Commands
2
+
3
+ This directory is the project-local workspace for Codex `/` command development.
4
+
5
+ Only finished command files should be exposed as slash commands. Keep work-in-progress notes, templates, and conventions prefixed with `_` so they remain meta-documents instead of user-invocable commands.
6
+
7
+ ## Current State
8
+
9
+ No runnable slash command is registered yet. The environment is initialized for later command development.
10
+
11
+ ## File Rules
12
+
13
+ - Use `commands/<name>.md` for a finished command that should be invokable as `/<name>`.
14
+ - Use `commands/_<name>.md` for conventions, drafts, templates, and notes.
15
+ - Use lower-case kebab-case names, for example `run-task.md`.
16
+ - Include YAML frontmatter with at least `description`.
17
+ - Use `$ARGUMENTS` in the command body when the command needs user-provided arguments.
18
+ - Keep command text operational and verifiable: preflight, plan, commands, verification, summary, next steps.
19
+
20
+ ## Validation
21
+
22
+ Run:
23
+
24
+ ```bash
25
+ npm run validate:commands
26
+ ```
27
+
28
+ The validator ignores underscore-prefixed Markdown files and checks finished command files for required structure.