momo-ai 1.0.87 → 1.0.88
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/.codex/config.toml +2 -0
- package/.codex-plugin/plugin.json +35 -0
- package/.omc/sessions/f23b8556-e76e-4986-b4ba-fbfc3fec8da6.json +8 -0
- package/AGENTS.md +229 -255
- package/README.md +2 -2
- package/commands/_README.md +28 -0
- package/commands/_conventions.md +57 -0
- package/commands/_template.md +66 -0
- package/package.json +3 -2
- package/scripts/validate-commands.js +76 -0
- package/src/commander/task.json +1 -1
- package/src/executor/executeTask.js +167 -152
- package/src/index.test.js +128 -0
- package/.omc/state/agent-replay-f23b8556-e76e-4986-b4ba-fbfc3fec8da6.jsonl +0 -2
- package/.omc/state/idle-notif-cooldown.json +0 -3
|
@@ -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
|
-
#
|
|
1
|
+
# Codex Project Guide for r2mo-lain
|
|
2
2
|
|
|
3
|
-
This
|
|
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
|
|
5
|
+
## Project Identity
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
###
|
|
21
|
+
### Module System
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
Show help. With `-c`, show detailed help for a specific command.
|
|
23
|
+
Use CommonJS only.
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
```js
|
|
26
|
+
const Ec = require('../epic');
|
|
27
|
+
const Args = require('../utils/momo-args');
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
momo help -c init
|
|
29
|
+
module.exports = async (options) => {
|
|
30
|
+
// implementation
|
|
31
|
+
};
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
Check environment (Node.js, Python, and other system dependencies).
|
|
34
|
+
Do not introduce ESM syntax.
|
|
36
35
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
```js
|
|
37
|
+
// Do not use in this project
|
|
38
|
+
import Ec from '../epic';
|
|
39
|
+
export default handler;
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
Initialize R2MO specification directory structure.
|
|
42
|
+
### Core Imports
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
- `-d, --dir`: Target directory (default: current directory)
|
|
44
|
+
Use the existing project modules instead of adding parallel abstractions.
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
momo
|
|
51
|
-
|
|
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
|
-
|
|
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
|
-
|
|
59
|
-
Create a new R2MO/Spring or ZERO/Vertx application.
|
|
60
|
+
### Interactive Input
|
|
60
61
|
|
|
61
|
-
|
|
62
|
-
- `-n, --name`: Application name (required)
|
|
62
|
+
All interactive selection UI must use `src/utils/momo-menu.js`.
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
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
|
-
|
|
82
|
-
Run `r2mo_proto` to process Maven project domain model (Protobuf / DB).
|
|
70
|
+
### Logging And Output
|
|
83
71
|
|
|
84
|
-
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
momo
|
|
117
|
-
|
|
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
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
|
|
149
|
-
Open the docs directory with Obsidian.
|
|
184
|
+
Rules for Codex slash commands:
|
|
150
185
|
|
|
151
|
-
|
|
152
|
-
-
|
|
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
|
-
|
|
155
|
-
```bash
|
|
156
|
-
momo docs
|
|
157
|
-
momo docs -d ./specification
|
|
158
|
-
```
|
|
194
|
+
## Existing Utility Contracts
|
|
159
195
|
|
|
160
|
-
|
|
161
|
-
Scan `src/pages` for `menu.yaml` and print the full tree menu (name, text, icon).
|
|
196
|
+
Argument parsing:
|
|
162
197
|
|
|
163
|
-
|
|
164
|
-
|
|
198
|
+
```js
|
|
199
|
+
const Args = require('../utils/momo-args');
|
|
165
200
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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
|
-
|
|
209
|
+
```js
|
|
210
|
+
const { selectSingle, selectMultiple, clearScreen } = require('../utils/momo-menu');
|
|
175
211
|
|
|
176
|
-
|
|
177
|
-
|
|
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
|
-
|
|
256
|
-
|
|
219
|
+
```js
|
|
220
|
+
const Ec = require('../epic');
|
|
257
221
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
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
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
-
|
|
293
|
-
-
|
|
294
|
-
-
|
|
295
|
-
-
|
|
296
|
-
-
|
|
297
|
-
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
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
|
@@ -70,7 +70,7 @@ momo help
|
|
|
70
70
|
|:---|:---|:---|
|
|
71
71
|
| `momo ask` | 从模板目录中选择提示词并复制到剪切板 | `momo ask` |
|
|
72
72
|
| `momo run` | 从 `.r2mo/task` 中选择任务,生成提示词到剪贴板 | `momo run` |
|
|
73
|
-
| `momo task` |
|
|
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.
|