@jcode.labs/ragmir 2.3.0 → 2.5.0
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 +23 -17
- package/dist/cli.js +193 -20
- package/dist/cli.js.map +1 -1
- package/dist/doctor.js +5 -5
- package/dist/doctor.js.map +1 -1
- package/dist/index-diagnostics.js +4 -4
- package/dist/index-diagnostics.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +9 -0
- package/dist/mcp.js.map +1 -1
- package/dist/package-manager.d.ts +3 -2
- package/dist/package-manager.d.ts.map +1 -1
- package/dist/package-manager.js +12 -11
- package/dist/package-manager.js.map +1 -1
- package/dist/prompt-routing.d.ts +12 -0
- package/dist/prompt-routing.d.ts.map +1 -0
- package/dist/prompt-routing.js +150 -0
- package/dist/prompt-routing.js.map +1 -0
- package/dist/query.js +1 -1
- package/dist/query.js.map +1 -1
- package/dist/research.js +2 -2
- package/dist/research.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +4 -4
- package/dist/setup.js.map +1 -1
- package/dist/skill.d.ts.map +1 -1
- package/dist/skill.js +8 -9
- package/dist/skill.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/examples/sovereign-rag-demo/README.md +1 -1
- package/package.json +7 -5
- package/skills/ragmir/SKILL.md +77 -59
- package/skills/ragmir-audio-summary/SKILL.md +14 -14
- package/skills/ragmir-legal-dossier/SKILL.md +10 -10
- package/skills/ragmir-markdown-report/SKILL.md +8 -8
package/skills/ragmir/SKILL.md
CHANGED
|
@@ -19,7 +19,6 @@ Default project layout:
|
|
|
19
19
|
|
|
20
20
|
```plain text
|
|
21
21
|
.ragmir/config.json # local Ragmir config
|
|
22
|
-
.ragmir/sources.txt # optional extra source paths
|
|
23
22
|
.ragmir/raw/ # raw documents to ingest
|
|
24
23
|
.ragmir/storage/ # generated local index
|
|
25
24
|
.ragmir/access.log # metadata-only access log
|
|
@@ -29,9 +28,8 @@ Default project layout:
|
|
|
29
28
|
## Data Safety
|
|
30
29
|
|
|
31
30
|
- Do not commit raw documents, secrets, tax IDs, scans, bank documents, tokens, or generated vector stores.
|
|
32
|
-
- Keep `.ragmir/` ignored by Git.
|
|
33
|
-
|
|
34
|
-
- Treat `ragmir search`, `ragmir ask`, `ragmir research`, and MCP results as sensitive because they can
|
|
31
|
+
- Keep `.ragmir/` ignored by Git.
|
|
32
|
+
- Treat `rgr search`, `rgr ask`, `rgr research`, and MCP results as sensitive because they can
|
|
35
33
|
contain private source passages even when redaction is enabled.
|
|
36
34
|
- Prefer summaries and citations over dumping long private passages into the chat.
|
|
37
35
|
- If the user asks for a high-stakes answer, identify which facts came from Ragmir and which still require professional or official verification.
|
|
@@ -41,38 +39,38 @@ Default project layout:
|
|
|
41
39
|
From the repository root:
|
|
42
40
|
|
|
43
41
|
```bash
|
|
44
|
-
pnpm exec
|
|
42
|
+
pnpm exec rgr doctor
|
|
45
43
|
```
|
|
46
44
|
|
|
47
45
|
If Ragmir is installed but setup is incomplete or the index is stale:
|
|
48
46
|
|
|
49
47
|
```bash
|
|
50
|
-
pnpm exec
|
|
48
|
+
pnpm exec rgr doctor --fix
|
|
51
49
|
```
|
|
52
50
|
|
|
53
51
|
If Ragmir is not installed:
|
|
54
52
|
|
|
55
53
|
```bash
|
|
56
54
|
pnpm add -D @jcode.labs/ragmir
|
|
57
|
-
pnpm exec
|
|
55
|
+
pnpm exec rgr setup
|
|
58
56
|
# Optional: one-time model download for higher-quality semantic retrieval.
|
|
59
|
-
pnpm exec
|
|
57
|
+
pnpm exec rgr setup --semantic
|
|
60
58
|
```
|
|
61
59
|
|
|
62
60
|
When the repository should expose only specific agent helpers or must launch MCP through a local
|
|
63
61
|
wrapper, generate the agent kit explicitly:
|
|
64
62
|
|
|
65
63
|
```bash
|
|
66
|
-
pnpm exec
|
|
64
|
+
pnpm exec rgr setup --agents claude,codex --mcp-command ./scripts/serve-mcp.sh
|
|
67
65
|
```
|
|
68
66
|
|
|
69
67
|
If the package manager is npm:
|
|
70
68
|
|
|
71
69
|
```bash
|
|
72
70
|
npm install --save-dev @jcode.labs/ragmir
|
|
73
|
-
npx
|
|
71
|
+
npx rgr setup
|
|
74
72
|
# Optional: one-time model download for higher-quality semantic retrieval.
|
|
75
|
-
npx
|
|
73
|
+
npx rgr setup --semantic
|
|
76
74
|
```
|
|
77
75
|
|
|
78
76
|
Use `status`, `audit`, and `security-audit` for deeper checks after `doctor` explains the current
|
|
@@ -84,14 +82,15 @@ Prefer the smallest command that answers the user's task:
|
|
|
84
82
|
|
|
85
83
|
| Task | Preferred command or tool |
|
|
86
84
|
| --- | --- |
|
|
87
|
-
| Check whether Ragmir is usable | `
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
85
|
+
| Check whether Ragmir is usable | `rgr doctor` or MCP `ragmir_status` |
|
|
86
|
+
| Decide whether a prompt needs Ragmir | `rgr route-prompt "..." --json` or MCP `ragmir_route_prompt` |
|
|
87
|
+
| Repair missing setup or stale index | `rgr doctor --fix` |
|
|
88
|
+
| Inspect skipped, duplicate, archive-like, or mirror-like sources | `rgr audit --unsupported` |
|
|
89
|
+
| Find exact source passages | `rgr search "<query>" --compact` or MCP `ragmir_search` with `compact: true` |
|
|
90
|
+
| Prepare a broad implementation, review, or planning answer | `rgr research "<topic>" --compact` or MCP `ragmir_research` |
|
|
91
|
+
| Return deterministic cited context for a trusted model | `rgr ask "<question>"` or MCP `ragmir_ask` |
|
|
92
|
+
| Check local privacy posture | `rgr security-audit` or MCP `ragmir_security_audit` |
|
|
93
|
+
| Validate recall against known expected files | `rgr evaluate --golden <file>` or MCP `ragmir_evaluate` |
|
|
95
94
|
|
|
96
95
|
## Provider Modes
|
|
97
96
|
|
|
@@ -103,7 +102,7 @@ Default retrieval mode:
|
|
|
103
102
|
}
|
|
104
103
|
```
|
|
105
104
|
|
|
106
|
-
This supports ingestion, search, MCP retrieval, and `
|
|
105
|
+
This supports ingestion, search, MCP retrieval, and `rgr ask` with cited passages without a model
|
|
107
106
|
server. It is lexical/hash retrieval, not model-semantic search. Do not present it as equivalent to
|
|
108
107
|
semantic embeddings.
|
|
109
108
|
|
|
@@ -123,15 +122,15 @@ air-gapped or confidential work and preload model files under `embeddingModelPat
|
|
|
123
122
|
first-run shortcut when a one-time download is acceptable:
|
|
124
123
|
|
|
125
124
|
```bash
|
|
126
|
-
pnpm exec
|
|
127
|
-
pnpm exec
|
|
125
|
+
pnpm exec rgr setup --semantic
|
|
126
|
+
pnpm exec rgr ingest --rebuild
|
|
128
127
|
```
|
|
129
128
|
|
|
130
129
|
Or enable it later:
|
|
131
130
|
|
|
132
131
|
```bash
|
|
133
|
-
pnpm exec
|
|
134
|
-
pnpm exec
|
|
132
|
+
pnpm exec rgr models pull --enable
|
|
133
|
+
pnpm exec rgr ingest --rebuild
|
|
135
134
|
```
|
|
136
135
|
|
|
137
136
|
## Ingestion Workflow
|
|
@@ -139,25 +138,26 @@ pnpm exec ragmir ingest --rebuild
|
|
|
139
138
|
After documents are added or changed:
|
|
140
139
|
|
|
141
140
|
```bash
|
|
142
|
-
pnpm exec
|
|
143
|
-
pnpm exec
|
|
144
|
-
pnpm exec
|
|
145
|
-
pnpm exec
|
|
146
|
-
pnpm exec
|
|
141
|
+
pnpm exec rgr doctor --fix
|
|
142
|
+
pnpm exec rgr audit
|
|
143
|
+
pnpm exec rgr audit --unsupported
|
|
144
|
+
pnpm exec rgr security-audit
|
|
145
|
+
pnpm exec rgr status
|
|
147
146
|
```
|
|
148
147
|
|
|
149
|
-
`
|
|
150
|
-
has no warnings. Normal `
|
|
151
|
-
embedding provider/model or chunking settings. `
|
|
152
|
-
supported files, typically scanned PDFs, produce no indexable text. `
|
|
148
|
+
`rgr doctor --fix` updates the index only when supported files are present and the privacy posture
|
|
149
|
+
has no warnings. Normal `rgr ingest` reuses unchanged rows; use `rgr ingest --rebuild` after changing
|
|
150
|
+
embedding provider/model or chunking settings. `rgr ingest --json` reports `emptyTextFiles` when
|
|
151
|
+
supported files, typically scanned PDFs, produce no indexable text. `rgr doctor` should show
|
|
153
152
|
`ready=true` before relying on the index. The audit must show no missing or stale supported files, and
|
|
154
153
|
the security audit should not show warnings before relying on Ragmir for sensitive work.
|
|
155
154
|
|
|
156
155
|
Default retrieval is tuned for broader recall (`topK: 8`, `chunkOverlap: 200`). Keep MCP retrieval
|
|
157
156
|
bounded by `mcpMaxTopK`, and raise `--top-k` only when the first results are too narrow.
|
|
158
157
|
|
|
159
|
-
For monorepos, keep raw confidential files local and list useful repo docs through
|
|
160
|
-
Entries can be paths or glob patterns relative to the Ragmir project
|
|
158
|
+
For monorepos, keep raw confidential files local and list useful repo docs through the `sources`
|
|
159
|
+
array in `.ragmir/config.json`. Entries can be paths or glob patterns relative to the Ragmir project
|
|
160
|
+
root, with `!` exclusions:
|
|
161
161
|
|
|
162
162
|
```plain text
|
|
163
163
|
../apps/*/README.md
|
|
@@ -168,9 +168,9 @@ Entries can be paths or glob patterns relative to the Ragmir project root, with
|
|
|
168
168
|
Use the CLI when you want agents or setup scripts to update the file without manual editing:
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
|
-
pnpm exec
|
|
172
|
-
pnpm exec
|
|
173
|
-
pnpm exec
|
|
171
|
+
pnpm exec rgr sources add "../apps/*/README.md" "../apps/*/docs/**/*.md"
|
|
172
|
+
pnpm exec rgr sources add "!../apps/**/node_modules/**"
|
|
173
|
+
pnpm exec rgr sources list
|
|
174
174
|
```
|
|
175
175
|
|
|
176
176
|
## Query Workflow
|
|
@@ -178,38 +178,55 @@ pnpm exec ragmir sources list
|
|
|
178
178
|
Use search when you need exact source passages:
|
|
179
179
|
|
|
180
180
|
```bash
|
|
181
|
-
pnpm exec
|
|
181
|
+
pnpm exec rgr search "your query"
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
Use research when the user asks for broad context, implementation planning, review preparation, or a
|
|
185
185
|
cross-document audit:
|
|
186
186
|
|
|
187
187
|
```bash
|
|
188
|
-
pnpm exec
|
|
188
|
+
pnpm exec rgr research "your topic" --compact
|
|
189
189
|
```
|
|
190
190
|
|
|
191
|
-
`
|
|
191
|
+
`rgr research` runs audit and security checks, generates several related retrieval queries, merges
|
|
192
192
|
cited evidence, reports source diagnostics, and performs a lightweight repository code scan unless
|
|
193
193
|
`--no-code` is used.
|
|
194
194
|
|
|
195
195
|
Use ask when you need cited context for the current agent or an external LLM:
|
|
196
196
|
|
|
197
197
|
```bash
|
|
198
|
-
pnpm exec
|
|
198
|
+
pnpm exec rgr ask "your question"
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
Ground answers in returned sources. If search results are weak, say that the current index does not
|
|
202
|
-
prove the point and ask for the missing document. `
|
|
202
|
+
prove the point and ask for the missing document. `rgr ask` returns cited passages rather than LLM
|
|
203
203
|
synthesis. Use those passages as context for the current agent, or tell the user that generative
|
|
204
204
|
synthesis needs a trusted external LLM or model runtime.
|
|
205
205
|
|
|
206
|
+
## Prompt Routing
|
|
207
|
+
|
|
208
|
+
When the user did not explicitly mention Ragmir, use local judgment first. If the prompt asks about
|
|
209
|
+
the current repository, local documents, private specs, architecture, previous decisions, citations,
|
|
210
|
+
release readiness, audits, or implementation planning, prefer Ragmir before answering from memory.
|
|
211
|
+
|
|
212
|
+
When the runtime supports MCP and you are unsure, call `ragmir_route_prompt` with the prompt text. If
|
|
213
|
+
MCP is unavailable, use:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
pnpm exec rgr route-prompt "the user prompt" --json
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
If the decision returns `shouldUseRagmir: true`, call the suggested `tool` with the returned `query`.
|
|
220
|
+
If it returns `false`, answer normally. The router is deterministic and local: it does not store
|
|
221
|
+
prompt text, call an LLM, read the vector index, or retrieve passages.
|
|
222
|
+
|
|
206
223
|
## Deep Research Workflow
|
|
207
224
|
|
|
208
225
|
For broad summaries, audits, planning, or institutional dossiers, do not rely on one query. Build a
|
|
209
226
|
small retrieval plan first:
|
|
210
227
|
|
|
211
|
-
- use `
|
|
212
|
-
- check `
|
|
228
|
+
- use `rgr research` as the first pass when available;
|
|
229
|
+
- check `rgr audit` and `rgr security-audit`;
|
|
213
230
|
- query the main topic;
|
|
214
231
|
- query names, dates, amounts, obligations, risks, decisions, and missing evidence separately;
|
|
215
232
|
- compare the strongest passages across files;
|
|
@@ -229,18 +246,18 @@ If the agent supports MCP, configure a server for the repository:
|
|
|
229
246
|
"mcpServers": {
|
|
230
247
|
"ragmir": {
|
|
231
248
|
"command": "pnpm",
|
|
232
|
-
"args": ["exec", "
|
|
249
|
+
"args": ["exec", "rgr", "serve-mcp"],
|
|
233
250
|
"cwd": "/absolute/path/to/the/repository"
|
|
234
251
|
}
|
|
235
252
|
}
|
|
236
253
|
}
|
|
237
254
|
```
|
|
238
255
|
|
|
239
|
-
Generated MCP helpers use the `ragmir` server name by default. Use `
|
|
240
|
-
or `
|
|
256
|
+
Generated MCP helpers use the `ragmir` server name by default. Use `rgr setup --mcp-name <name>`
|
|
257
|
+
or `rgr install-skill --mcp-name <name>` only when the repository needs a different stable MCP
|
|
241
258
|
key.
|
|
242
259
|
|
|
243
|
-
For Claude Code, run this from the target repository root after `pnpm exec
|
|
260
|
+
For Claude Code, run this from the target repository root after `pnpm exec rgr setup`:
|
|
244
261
|
|
|
245
262
|
```bash
|
|
246
263
|
claude mcp add-json --scope local ragmir "$(cat .ragmir/claude-mcp-server.json)"
|
|
@@ -260,12 +277,13 @@ For OpenCode, merge `.ragmir/opencode.jsonc` into the OpenCode config layer used
|
|
|
260
277
|
For Cline, add `.ragmir/cline-mcp.json` under `mcpServers` in Cline's MCP configuration.
|
|
261
278
|
|
|
262
279
|
For other MCP clients that cannot set `cwd`, set `RAGMIR_PROJECT_ROOT=/absolute/path/to/repository`
|
|
263
|
-
when launching `
|
|
280
|
+
when launching `rgr serve-mcp`. `RAGMIR_PROJECT_ROOT` is the strongest signal; otherwise a
|
|
264
281
|
configured current working directory wins before agent-provided project environment variables.
|
|
265
282
|
|
|
266
283
|
Available MCP tools:
|
|
267
284
|
|
|
268
285
|
- `ragmir_status`: show config and chunk count.
|
|
286
|
+
- `ragmir_route_prompt`: classify a prompt and suggest whether local Ragmir context is needed.
|
|
269
287
|
- `ragmir_search`: retrieve source passages; set `compact: true` when the agent context is tight.
|
|
270
288
|
- `ragmir_ask`: return cited retrieval context.
|
|
271
289
|
- `ragmir_research`: run audit-backed multi-query retrieval with source diagnostics and optional code matches.
|
|
@@ -276,13 +294,13 @@ Available MCP tools:
|
|
|
276
294
|
|
|
277
295
|
Prefer MCP tools over shell commands when the agent runtime provides them. Use shell commands when MCP is unavailable.
|
|
278
296
|
|
|
279
|
-
MCP is read-focused and intentionally does not expose index deletion. Use `pnpm exec
|
|
297
|
+
MCP is read-focused and intentionally does not expose index deletion. Use `pnpm exec rgr
|
|
280
298
|
destroy-index --yes` from the shell when the user explicitly wants to remove the generated index.
|
|
281
299
|
|
|
282
300
|
## Optional Audio Summaries
|
|
283
301
|
|
|
284
302
|
If the user asks for a listenable or TTS summary, load the optional
|
|
285
|
-
`.ragmir/skills/ragmir-audio-summary/` skill installed by `pnpm exec
|
|
303
|
+
`.ragmir/skills/ragmir-audio-summary/` skill installed by `pnpm exec rgr setup`.
|
|
286
304
|
|
|
287
305
|
The audio skill should:
|
|
288
306
|
|
|
@@ -294,7 +312,7 @@ The audio skill should:
|
|
|
294
312
|
## Optional Markdown Reports
|
|
295
313
|
|
|
296
314
|
If the user asks for a Markdown report, dossier, audit memo, planning note, or decision brief, load
|
|
297
|
-
the optional `.ragmir/skills/ragmir-markdown-report/` skill installed by `pnpm exec
|
|
315
|
+
the optional `.ragmir/skills/ragmir-markdown-report/` skill installed by `pnpm exec rgr setup`.
|
|
298
316
|
|
|
299
317
|
The report skill should:
|
|
300
318
|
|
|
@@ -309,15 +327,15 @@ The report skill should:
|
|
|
309
327
|
Most repositories should run the full setup command:
|
|
310
328
|
|
|
311
329
|
```bash
|
|
312
|
-
pnpm exec
|
|
330
|
+
pnpm exec rgr setup
|
|
313
331
|
```
|
|
314
332
|
|
|
315
333
|
Use the lower-level skill installer only when Ragmir is already initialized and you want to refresh
|
|
316
334
|
the local agent kit:
|
|
317
335
|
|
|
318
336
|
```bash
|
|
319
|
-
pnpm exec
|
|
320
|
-
pnpm exec
|
|
337
|
+
pnpm exec rgr install-skill
|
|
338
|
+
pnpm exec rgr install-skill --agents claude,codex --mcp-command ./scripts/serve-mcp.sh
|
|
321
339
|
```
|
|
322
340
|
|
|
323
341
|
This creates:
|
|
@@ -343,9 +361,9 @@ unselected helpers in `.ragmir/` are removed.
|
|
|
343
361
|
For native discovery, install only the agent the user uses:
|
|
344
362
|
|
|
345
363
|
```bash
|
|
346
|
-
pnpm exec
|
|
347
|
-
pnpm exec
|
|
348
|
-
pnpm exec
|
|
364
|
+
pnpm exec rgr install-agent --agents claude
|
|
365
|
+
pnpm exec rgr install-agent --agents kimi
|
|
366
|
+
pnpm exec rgr install-agent --agents claude,codex,kimi,opencode,cline
|
|
349
367
|
```
|
|
350
368
|
|
|
351
369
|
By default this writes project-scope skill folders such as `.claude/skills/`, `.kimi/skills/`,
|
|
@@ -35,7 +35,7 @@ Two reference files sit next to this skill and are read while drafting:
|
|
|
35
35
|
|
|
36
36
|
- Treat the source documents, retrieved passages, generated narration, and final audio as sensitive.
|
|
37
37
|
- Do not use online TTS for confidential content unless the user explicitly allows it.
|
|
38
|
-
- Prefer `pnpm exec
|
|
38
|
+
- Prefer `pnpm exec rgr audio` or `pnpm exec rgr-tts render` for plug-and-play output.
|
|
39
39
|
- Use `--engine transformers --offline` when model files are already present and remote model
|
|
40
40
|
loading is not allowed.
|
|
41
41
|
- Use `--engine edge` only when online TTS is acceptable and global Voice Forge quality is required.
|
|
@@ -63,21 +63,21 @@ gets dropped at the drafting step, not added because it was "also in the documen
|
|
|
63
63
|
From the repository root, run:
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
pnpm exec
|
|
67
|
-
pnpm exec
|
|
68
|
-
pnpm exec
|
|
69
|
-
pnpm exec
|
|
70
|
-
pnpm exec
|
|
66
|
+
pnpm exec rgr doctor
|
|
67
|
+
pnpm exec rgr status
|
|
68
|
+
pnpm exec rgr audit
|
|
69
|
+
pnpm exec rgr audit --unsupported
|
|
70
|
+
pnpm exec rgr security-audit
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
If the audit reports missing or stale files, run:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
pnpm exec
|
|
77
|
-
pnpm exec
|
|
76
|
+
pnpm exec rgr doctor --fix
|
|
77
|
+
pnpm exec rgr audit --unsupported
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
`
|
|
80
|
+
`rgr doctor --fix` rebuilds the index only when supported files are present and the privacy posture
|
|
81
81
|
has no warnings. Do not create an audio summary from stale or incomplete evidence unless the user
|
|
82
82
|
explicitly accepts that limitation.
|
|
83
83
|
|
|
@@ -89,9 +89,9 @@ in step 1 — not from the subject alone.
|
|
|
89
89
|
For a broad summary, run multiple searches:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
pnpm exec
|
|
93
|
-
pnpm exec
|
|
94
|
-
pnpm exec
|
|
92
|
+
pnpm exec rgr search "<main topic>" --top-k 8
|
|
93
|
+
pnpm exec rgr search "<people, dates, money, obligations, risks, or decisions>" --top-k 8
|
|
94
|
+
pnpm exec rgr ask "<specific synthesis question>" --top-k 8
|
|
95
95
|
```
|
|
96
96
|
|
|
97
97
|
When MCP is available, prefer `ragmir_search`, `ragmir_ask`, `ragmir_audit`, and
|
|
@@ -177,7 +177,7 @@ neural voice for the Edge path. Write the narration in the same language you pas
|
|
|
177
177
|
For global Voice Forge quality on non-confidential text, render with Edge MP3:
|
|
178
178
|
|
|
179
179
|
```bash
|
|
180
|
-
pnpm exec
|
|
180
|
+
pnpm exec rgr audio /tmp/RAGMIR-SUMMARY-<subject-kebab>.txt \
|
|
181
181
|
--engine edge \
|
|
182
182
|
--lang <en|es|fr> \
|
|
183
183
|
--out .ragmir/audio/RAGMIR-SUMMARY-<subject-kebab>.mp3
|
|
@@ -189,7 +189,7 @@ the narration text to that service is acceptable.
|
|
|
189
189
|
For confidential or air-gapped operation, preload the model files under `.ragmir/models/tts` and run:
|
|
190
190
|
|
|
191
191
|
```bash
|
|
192
|
-
pnpm exec
|
|
192
|
+
pnpm exec rgr audio /tmp/RAGMIR-SUMMARY-<subject-kebab>.txt \
|
|
193
193
|
--engine transformers \
|
|
194
194
|
--offline \
|
|
195
195
|
--lang <en|es|fr> \
|
|
@@ -59,8 +59,8 @@ dossier and test them on non-sensitive samples first.
|
|
|
59
59
|
After changing redaction rules, rebuild the index:
|
|
60
60
|
|
|
61
61
|
```bash
|
|
62
|
-
pnpm exec
|
|
63
|
-
pnpm exec
|
|
62
|
+
pnpm exec rgr ingest --rebuild
|
|
63
|
+
pnpm exec rgr security-audit --strict
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Retrieval Workflow
|
|
@@ -68,19 +68,19 @@ pnpm exec ragmir security-audit --strict
|
|
|
68
68
|
Start from readiness checks:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
pnpm exec
|
|
72
|
-
pnpm exec
|
|
73
|
-
pnpm exec
|
|
74
|
-
pnpm exec
|
|
71
|
+
pnpm exec rgr doctor
|
|
72
|
+
pnpm exec rgr audit
|
|
73
|
+
pnpm exec rgr audit --unsupported
|
|
74
|
+
pnpm exec rgr security-audit --strict
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
Then run targeted retrieval passes:
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
|
-
pnpm exec
|
|
81
|
-
pnpm exec
|
|
82
|
-
pnpm exec
|
|
83
|
-
pnpm exec
|
|
80
|
+
pnpm exec rgr search "parties obligations dates amounts" --top-k 8
|
|
81
|
+
pnpm exec rgr search "termination clause liability indemnity notice" --top-k 8
|
|
82
|
+
pnpm exec rgr search "timeline meeting decision approval refusal" --top-k 8
|
|
83
|
+
pnpm exec rgr ask "Which documents support the chronology of events?" --top-k 8
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
When MCP is available, prefer `ragmir_status`, `ragmir_search`, `ragmir_ask`, `ragmir_audit`, and
|
|
@@ -28,16 +28,16 @@ sanitized report is safe to commit or share.
|
|
|
28
28
|
From the repository root:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
|
-
pnpm exec
|
|
32
|
-
pnpm exec
|
|
33
|
-
pnpm exec
|
|
31
|
+
pnpm exec rgr doctor
|
|
32
|
+
pnpm exec rgr audit
|
|
33
|
+
pnpm exec rgr security-audit
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
If files are missing, stale, or setup is incomplete:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
pnpm exec
|
|
40
|
-
pnpm exec
|
|
39
|
+
pnpm exec rgr doctor --fix
|
|
40
|
+
pnpm exec rgr audit --unsupported
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
Do not write a final report from stale evidence unless the user explicitly accepts that limitation.
|
|
@@ -47,9 +47,9 @@ Do not write a final report from stale evidence unless the user explicitly accep
|
|
|
47
47
|
For a broad report, use multiple targeted retrieval passes instead of one generic query:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
pnpm exec
|
|
51
|
-
pnpm exec
|
|
52
|
-
pnpm exec
|
|
50
|
+
pnpm exec rgr search "<main report topic>" --top-k 8
|
|
51
|
+
pnpm exec rgr search "<people, dates, amounts, obligations, risks, decisions>" --top-k 8
|
|
52
|
+
pnpm exec rgr ask "<specific synthesis question>" --top-k 8
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
When MCP is available, prefer `ragmir_search`, `ragmir_ask`, `ragmir_audit`, and
|