renma 0.15.0 → 0.15.2
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/CHANGELOG.md +28 -1
- package/README.md +5 -5
- package/dist/cli-help.d.ts +293 -0
- package/dist/cli-help.d.ts.map +1 -0
- package/dist/cli-help.js +715 -0
- package/dist/cli-help.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +38 -120
- package/dist/cli.js.map +1 -1
- package/dist/commands/bom.d.ts +7 -0
- package/dist/commands/bom.d.ts.map +1 -1
- package/dist/commands/bom.js +24 -13
- package/dist/commands/bom.js.map +1 -1
- package/dist/commands/graph.d.ts +2 -1
- package/dist/commands/graph.d.ts.map +1 -1
- package/dist/commands/graph.js +3 -0
- package/dist/commands/graph.js.map +1 -1
- package/dist/repository-evidence.d.ts +11 -1
- package/dist/repository-evidence.d.ts.map +1 -1
- package/dist/repository-evidence.js +22 -2
- package/dist/repository-evidence.js.map +1 -1
- package/dist/repository-paths.d.ts +6 -0
- package/dist/repository-paths.d.ts.map +1 -0
- package/dist/repository-paths.js +62 -0
- package/dist/repository-paths.js.map +1 -0
- package/dist/rules.d.ts +6 -1
- package/dist/rules.d.ts.map +1 -1
- package/dist/rules.js +78 -75
- package/dist/rules.js.map +1 -1
- package/dist/scanner.d.ts +7 -1
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +26 -28
- package/dist/scanner.js.map +1 -1
- package/package.json +1 -1
package/dist/cli-help.js
ADDED
|
@@ -0,0 +1,715 @@
|
|
|
1
|
+
const OPTION_HELP = {
|
|
2
|
+
config: {
|
|
3
|
+
flags: "-c, --config <path>",
|
|
4
|
+
description: "Read Renma JSON config from path.",
|
|
5
|
+
},
|
|
6
|
+
"fail-on": {
|
|
7
|
+
flags: "--fail-on <level>",
|
|
8
|
+
description: "Exit 1 when scan findings meet severity: low, medium, high, or critical.",
|
|
9
|
+
},
|
|
10
|
+
focus: {
|
|
11
|
+
flags: "--focus <asset-id-or-path>",
|
|
12
|
+
description: "Keep one matched asset and its one-hop graph neighborhood.",
|
|
13
|
+
},
|
|
14
|
+
format: {
|
|
15
|
+
flags: "--format <format>",
|
|
16
|
+
description: "Output format for commands that accept --format.",
|
|
17
|
+
},
|
|
18
|
+
from: {
|
|
19
|
+
flags: "--from <ref>",
|
|
20
|
+
description: "Git ref to use as the comparison baseline.",
|
|
21
|
+
},
|
|
22
|
+
help: {
|
|
23
|
+
flags: "-h, --help",
|
|
24
|
+
description: "Show this help page without running the command.",
|
|
25
|
+
},
|
|
26
|
+
"include-owned": {
|
|
27
|
+
flags: "--include-owned",
|
|
28
|
+
description: "Include flat owned asset details in ownership output.",
|
|
29
|
+
},
|
|
30
|
+
id: {
|
|
31
|
+
flags: "--id <id>",
|
|
32
|
+
description: "Set the scaffolded asset ID instead of deriving one.",
|
|
33
|
+
},
|
|
34
|
+
json: {
|
|
35
|
+
flags: "--json",
|
|
36
|
+
description: "Shortcut for --format json where JSON is supported.",
|
|
37
|
+
},
|
|
38
|
+
lines: {
|
|
39
|
+
flags: "--lines <range>",
|
|
40
|
+
description: "Print an exact line range such as L10-L42 or 10-42.",
|
|
41
|
+
},
|
|
42
|
+
"max-context-bytes": {
|
|
43
|
+
flags: "--max-context-bytes <n>",
|
|
44
|
+
description: "Limit nearby context bytes for semantic split suggestions.",
|
|
45
|
+
},
|
|
46
|
+
"max-source-bytes": {
|
|
47
|
+
flags: "--max-source-bytes <n>",
|
|
48
|
+
description: "Limit source file bytes for semantic split suggestions.",
|
|
49
|
+
},
|
|
50
|
+
"omit-generated-at": {
|
|
51
|
+
flags: "--omit-generated-at",
|
|
52
|
+
description: "Omit the BOM run-time generatedAt timestamp.",
|
|
53
|
+
},
|
|
54
|
+
owner: {
|
|
55
|
+
flags: "--owner <owner>",
|
|
56
|
+
description: "Owner value for commands that accept --owner.",
|
|
57
|
+
},
|
|
58
|
+
tags: {
|
|
59
|
+
flags: "--tags <tags>",
|
|
60
|
+
description: "Set comma-separated or repeated scaffold tags.",
|
|
61
|
+
},
|
|
62
|
+
title: {
|
|
63
|
+
flags: "--title <title>",
|
|
64
|
+
description: "Set scaffold title metadata.",
|
|
65
|
+
},
|
|
66
|
+
to: {
|
|
67
|
+
flags: "--to <ref>",
|
|
68
|
+
description: "Git ref to use as the comparison target.",
|
|
69
|
+
},
|
|
70
|
+
version: {
|
|
71
|
+
flags: "-v, --version",
|
|
72
|
+
description: "Print the Renma package version.",
|
|
73
|
+
},
|
|
74
|
+
view: {
|
|
75
|
+
flags: "--view <view>",
|
|
76
|
+
description: "Graph view: summary, workflow, full, layered, or lens.",
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export const COMMAND_HELP = [
|
|
80
|
+
{
|
|
81
|
+
name: "scan",
|
|
82
|
+
usage: "renma scan [path] [options]",
|
|
83
|
+
question: "What concrete problems should be fixed?",
|
|
84
|
+
purpose: "Scan is usually the first command when improving existing skills or context assets. It reports concrete findings and deterministic diagnostics without editing files.",
|
|
85
|
+
useWhen: [
|
|
86
|
+
"You need the first actionable view of repository problems.",
|
|
87
|
+
"You are preparing or verifying a patch for skills, contexts, prompts, or agent-facing docs.",
|
|
88
|
+
"A downstream tool or coding agent needs JSON guidance, repair constraints, and verification steps.",
|
|
89
|
+
],
|
|
90
|
+
doNotUseFor: [
|
|
91
|
+
"Automatically rewriting files or applying fixes.",
|
|
92
|
+
"An agent inventing owners, references, source-of-truth documents, or product rules.",
|
|
93
|
+
"Selecting runtime context for an LLM or assembling task prompts.",
|
|
94
|
+
],
|
|
95
|
+
examples: [
|
|
96
|
+
"renma scan .",
|
|
97
|
+
"renma scan . --format json",
|
|
98
|
+
"renma scan . --fail-on high",
|
|
99
|
+
],
|
|
100
|
+
interpretation: [
|
|
101
|
+
"Text output is a human-readable finding list.",
|
|
102
|
+
"JSON output includes structured diagnostics, review bundles, and guidance intended for downstream tools and coding agents.",
|
|
103
|
+
"When repair constraints or verification steps are present, follow them instead of broadening the edit.",
|
|
104
|
+
],
|
|
105
|
+
nextSteps: [
|
|
106
|
+
"Inspect evidence before editing.",
|
|
107
|
+
"Prepare a minimal reviewable patch that preserves supported semantics.",
|
|
108
|
+
"Rerun scan and any relevant structural commands after editing.",
|
|
109
|
+
],
|
|
110
|
+
options: [
|
|
111
|
+
"config",
|
|
112
|
+
"fail-on",
|
|
113
|
+
{
|
|
114
|
+
name: "format",
|
|
115
|
+
description: "Output format: text or json. Defaults to text.",
|
|
116
|
+
},
|
|
117
|
+
"json",
|
|
118
|
+
"help",
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "catalog",
|
|
123
|
+
usage: "renma catalog [path] [options]",
|
|
124
|
+
question: "What assets and metadata exist?",
|
|
125
|
+
purpose: "Catalog inventories discovered assets and normalized metadata so reviewers can see the repository evidence Renma found.",
|
|
126
|
+
useWhen: [
|
|
127
|
+
"You need IDs, kinds, owners, lifecycle states, hashes, tags, declared dependencies, or context relationships.",
|
|
128
|
+
"You want inventory evidence before changing metadata or references.",
|
|
129
|
+
"You need stable JSON or Markdown asset inventory for review.",
|
|
130
|
+
],
|
|
131
|
+
doNotUseFor: [
|
|
132
|
+
"Treating inventory as a problem list by itself.",
|
|
133
|
+
"Deciding what context an agent should consume at runtime.",
|
|
134
|
+
"Proving that a declared dependency is semantically correct.",
|
|
135
|
+
],
|
|
136
|
+
examples: [
|
|
137
|
+
"renma catalog . --format markdown",
|
|
138
|
+
"renma catalog . --format json",
|
|
139
|
+
],
|
|
140
|
+
interpretation: [
|
|
141
|
+
"Catalog output is deterministic inventory evidence.",
|
|
142
|
+
"Missing, duplicate, or unresolved metadata may appear as diagnostics, but catalog is not a substitute for scan.",
|
|
143
|
+
"Dependencies are declared relationships discovered from repository metadata and references.",
|
|
144
|
+
],
|
|
145
|
+
nextSteps: [
|
|
146
|
+
"Run graph to inspect relationships.",
|
|
147
|
+
"Run readiness for repository-level summary.",
|
|
148
|
+
"Run scan for concrete findings to fix.",
|
|
149
|
+
],
|
|
150
|
+
options: [
|
|
151
|
+
"config",
|
|
152
|
+
{
|
|
153
|
+
name: "format",
|
|
154
|
+
description: "Output format: json or markdown. Defaults to json.",
|
|
155
|
+
},
|
|
156
|
+
"json",
|
|
157
|
+
"help",
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: "graph",
|
|
162
|
+
usage: "renma graph [path] [options]",
|
|
163
|
+
question: "How are assets structurally connected?",
|
|
164
|
+
purpose: "Graph shows declared structural relationships between assets, including focused views around one asset.",
|
|
165
|
+
useWhen: [
|
|
166
|
+
"You need to inspect dependencies, references, unresolved targets, or isolation.",
|
|
167
|
+
"You want a one-hop neighborhood with --focus for one asset ID or path.",
|
|
168
|
+
"You need Markdown, JSON, or Mermaid evidence for review.",
|
|
169
|
+
],
|
|
170
|
+
doNotUseFor: [
|
|
171
|
+
"It does not select context for an LLM.",
|
|
172
|
+
"It does not prove that a dependency is semantically correct.",
|
|
173
|
+
"Deleting isolated assets without human review.",
|
|
174
|
+
],
|
|
175
|
+
examples: [
|
|
176
|
+
"renma graph . --format markdown",
|
|
177
|
+
"renma graph . --view layered --format mermaid",
|
|
178
|
+
"renma graph . --focus contexts/testing/boundary-value-analysis.md --view full",
|
|
179
|
+
],
|
|
180
|
+
interpretation: [
|
|
181
|
+
"Edges represent declared relationships Renma can resolve or report as unresolved.",
|
|
182
|
+
"Unexpected isolation is evidence to review, not automatic permission to delete an asset.",
|
|
183
|
+
"Focused output filters to the matched asset and directly connected neighbors.",
|
|
184
|
+
],
|
|
185
|
+
nextSteps: [
|
|
186
|
+
"Use catalog to inspect the assets behind graph nodes.",
|
|
187
|
+
"Use scan to fix concrete relationship findings.",
|
|
188
|
+
"Rerun graph after metadata or reference changes.",
|
|
189
|
+
],
|
|
190
|
+
options: [
|
|
191
|
+
"config",
|
|
192
|
+
{
|
|
193
|
+
name: "format",
|
|
194
|
+
description: "Output format: json, markdown, or mermaid. Defaults to json. JSON defaults to the full view; non-JSON formats default to the summary view.",
|
|
195
|
+
},
|
|
196
|
+
"json",
|
|
197
|
+
"view",
|
|
198
|
+
"focus",
|
|
199
|
+
"help",
|
|
200
|
+
],
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "trust-graph",
|
|
204
|
+
usage: "renma trust-graph [path] [options]",
|
|
205
|
+
question: "What trust-relevant evidence is connected to each asset?",
|
|
206
|
+
purpose: "Trust graph connects deterministic evidence such as ownership, lifecycle, policy, references, dependencies, and diagnostics.",
|
|
207
|
+
useWhen: [
|
|
208
|
+
"A reviewer or downstream tool needs traceable trust-relevant evidence per asset.",
|
|
209
|
+
"You need to connect owners, lifecycle status, effective policy fingerprints, dependencies, and diagnostics.",
|
|
210
|
+
"You want a stable evidence layer for human review.",
|
|
211
|
+
],
|
|
212
|
+
doNotUseFor: [
|
|
213
|
+
"It is not a subjective trust score.",
|
|
214
|
+
"It does not certify that an asset is trustworthy.",
|
|
215
|
+
"Runtime policy enforcement, prompt assembly, or telemetry.",
|
|
216
|
+
],
|
|
217
|
+
examples: [
|
|
218
|
+
"renma trust-graph . --format markdown",
|
|
219
|
+
"renma trust-graph . --format json",
|
|
220
|
+
],
|
|
221
|
+
interpretation: [
|
|
222
|
+
"The report connects evidence; it does not decide trust for you.",
|
|
223
|
+
"Missing owner, lifecycle, policy, or diagnostic evidence should be reviewed in context.",
|
|
224
|
+
"JSON is the source of truth for downstream tooling; Markdown is for human review.",
|
|
225
|
+
],
|
|
226
|
+
nextSteps: [
|
|
227
|
+
"Use scan for concrete diagnostics.",
|
|
228
|
+
"Use ownership when owner coverage needs deeper review.",
|
|
229
|
+
"Use readiness for repository-level summary.",
|
|
230
|
+
],
|
|
231
|
+
options: [
|
|
232
|
+
"config",
|
|
233
|
+
{
|
|
234
|
+
name: "format",
|
|
235
|
+
description: "Output format: json or markdown. Defaults to json.",
|
|
236
|
+
},
|
|
237
|
+
"json",
|
|
238
|
+
"help",
|
|
239
|
+
],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
name: "readiness",
|
|
243
|
+
usage: "renma readiness [path] [options]",
|
|
244
|
+
question: "Is the repository broadly prepared for agent-facing use?",
|
|
245
|
+
purpose: "Readiness provides a repository-level scorecard and health summary derived from deterministic repository evidence.",
|
|
246
|
+
useWhen: [
|
|
247
|
+
"You need a broad maintainer or CI summary after scan, catalog, or graph review.",
|
|
248
|
+
"You want repository-level checks for ownership, graph resolution, lifecycle, context lens governance, and selected findings.",
|
|
249
|
+
"You need Markdown for review or JSON for automation.",
|
|
250
|
+
],
|
|
251
|
+
doNotUseFor: [
|
|
252
|
+
"Replacing scan when you need concrete findings.",
|
|
253
|
+
"Deciding whether an agent should consume a particular context asset at runtime.",
|
|
254
|
+
"Claiming what an LLM actually used.",
|
|
255
|
+
],
|
|
256
|
+
examples: [
|
|
257
|
+
"renma readiness . --format markdown",
|
|
258
|
+
"renma readiness . --format json",
|
|
259
|
+
],
|
|
260
|
+
interpretation: [
|
|
261
|
+
"Scan gives concrete findings; readiness gives a broad repository summary.",
|
|
262
|
+
"Readiness scores and checks are static repository review signals.",
|
|
263
|
+
"Security posture and context lens summaries remain deterministic evidence, not runtime decisions.",
|
|
264
|
+
],
|
|
265
|
+
nextSteps: [
|
|
266
|
+
"Use scan to fix specific findings behind readiness failures.",
|
|
267
|
+
"Use catalog and graph to inspect inventory or relationship causes.",
|
|
268
|
+
"Rerun readiness after the patch.",
|
|
269
|
+
],
|
|
270
|
+
options: [
|
|
271
|
+
"config",
|
|
272
|
+
{
|
|
273
|
+
name: "format",
|
|
274
|
+
description: "Output format: json or markdown. Defaults to json.",
|
|
275
|
+
},
|
|
276
|
+
"json",
|
|
277
|
+
"help",
|
|
278
|
+
],
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
name: "bom",
|
|
282
|
+
usage: "renma bom [path] [options]",
|
|
283
|
+
question: "What declared repository context manifest should be reviewed?",
|
|
284
|
+
purpose: "BOM prints a declared repository evidence snapshot combining catalog, graph, lifecycle, hashes, diagnostics, readiness, and security posture evidence.",
|
|
285
|
+
useWhen: [
|
|
286
|
+
"Reviewers or CI consumers need one manifest of declared repository context evidence.",
|
|
287
|
+
"You need a PR artifact that combines inventory, dependencies, diagnostics, readiness, lifecycle, hashes, and security posture.",
|
|
288
|
+
"You need structured JSON generated from deterministic repository evidence or compact Markdown for review.",
|
|
289
|
+
],
|
|
290
|
+
doNotUseFor: [
|
|
291
|
+
"Reporting what an LLM actually consumed.",
|
|
292
|
+
"It is not telemetry, prompt assembly, runtime context selection, or agent execution.",
|
|
293
|
+
"Normalizing every repository or environment-dependent metadata value.",
|
|
294
|
+
],
|
|
295
|
+
examples: [
|
|
296
|
+
"renma bom . --format json",
|
|
297
|
+
"renma bom . --format markdown",
|
|
298
|
+
"renma bom . --format json --omit-generated-at",
|
|
299
|
+
],
|
|
300
|
+
interpretation: [
|
|
301
|
+
"The BOM is a declared repository manifest, not a runtime usage report or telemetry.",
|
|
302
|
+
"--omit-generated-at only removes the run-time generation timestamp.",
|
|
303
|
+
"With the same checkout path, config path, repository contents, Renma version, and UTC evaluation date, repeated --omit-generated-at JSON runs should be byte-identical.",
|
|
304
|
+
"The option does not remove freshness metadata, suppress freshness diagnostics, normalize absolute root or configPath values, hide file moves, or make output portable across runners.",
|
|
305
|
+
],
|
|
306
|
+
nextSteps: [
|
|
307
|
+
"Review diagnostics and readiness sections before merging.",
|
|
308
|
+
"Use scan, catalog, or graph for focused follow-up.",
|
|
309
|
+
"Store JSON when automation needs the source of truth.",
|
|
310
|
+
],
|
|
311
|
+
options: [
|
|
312
|
+
"config",
|
|
313
|
+
{
|
|
314
|
+
name: "format",
|
|
315
|
+
description: "Output format: json or markdown. Defaults to json.",
|
|
316
|
+
},
|
|
317
|
+
"json",
|
|
318
|
+
"omit-generated-at",
|
|
319
|
+
"help",
|
|
320
|
+
],
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
name: "ownership",
|
|
324
|
+
usage: "renma ownership [path] [options]",
|
|
325
|
+
question: "Where is ownership missing or concentrated?",
|
|
326
|
+
purpose: "Ownership helps review owner coverage, unowned assets, and concentration by declared owner.",
|
|
327
|
+
useWhen: [
|
|
328
|
+
"You need to find assets without owner metadata.",
|
|
329
|
+
"You want to review what one owner is responsible for.",
|
|
330
|
+
"You need ownership coverage evidence for governance review.",
|
|
331
|
+
],
|
|
332
|
+
doNotUseFor: [
|
|
333
|
+
"Renma should not invent or assign an owner from paths, prose, Git history, or guesses.",
|
|
334
|
+
"Replacing human or source-of-truth confirmation for missing ownership.",
|
|
335
|
+
"Treating unowned assets as automatic failures in every repository.",
|
|
336
|
+
],
|
|
337
|
+
examples: [
|
|
338
|
+
"renma ownership . --format markdown",
|
|
339
|
+
"renma ownership . --include-owned",
|
|
340
|
+
"renma ownership . --owner qa-platform --format json",
|
|
341
|
+
],
|
|
342
|
+
interpretation: [
|
|
343
|
+
"Ownership output reports declared owner metadata and coverage.",
|
|
344
|
+
"Missing ownership normally requires confirmation from a human or an existing source of truth.",
|
|
345
|
+
"Owner filters keep repository-level totals while adding owner-specific details.",
|
|
346
|
+
],
|
|
347
|
+
nextSteps: [
|
|
348
|
+
"Confirm missing owners before editing metadata.",
|
|
349
|
+
"Use suggest-metadata when preparing a metadata-only retrofit.",
|
|
350
|
+
"Rerun ownership and scan after ownership changes.",
|
|
351
|
+
],
|
|
352
|
+
options: [
|
|
353
|
+
"config",
|
|
354
|
+
{
|
|
355
|
+
name: "format",
|
|
356
|
+
description: "Output format: json or markdown. Defaults to json.",
|
|
357
|
+
},
|
|
358
|
+
"json",
|
|
359
|
+
"include-owned",
|
|
360
|
+
{
|
|
361
|
+
name: "owner",
|
|
362
|
+
description: "Show owner-specific declared asset details while preserving repository-level coverage totals.",
|
|
363
|
+
},
|
|
364
|
+
"help",
|
|
365
|
+
],
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
name: "diff",
|
|
369
|
+
usage: "renma diff [path] --from <ref> --to <ref> [options]",
|
|
370
|
+
question: "What deterministic readiness evidence changed between refs?",
|
|
371
|
+
purpose: "Diff compares deterministic repository evidence between Git refs for context and skill review.",
|
|
372
|
+
useWhen: [
|
|
373
|
+
"You need to review readiness, asset, graph, check, or finding changes before merging.",
|
|
374
|
+
"A pull request changes skills, contexts, metadata, or agent-facing docs.",
|
|
375
|
+
"You want JSON or Markdown evidence over repository governance changes.",
|
|
376
|
+
],
|
|
377
|
+
doNotUseFor: [
|
|
378
|
+
"A generic source-code diff.",
|
|
379
|
+
"Determining what an LLM consumed at runtime.",
|
|
380
|
+
"Replacing human review of semantic changes.",
|
|
381
|
+
],
|
|
382
|
+
examples: [
|
|
383
|
+
"renma diff . --from main --to HEAD",
|
|
384
|
+
"renma diff . --from origin/main --to HEAD --format markdown",
|
|
385
|
+
],
|
|
386
|
+
interpretation: [
|
|
387
|
+
"The report compares Renma evidence generated at two refs.",
|
|
388
|
+
"Added or removed findings show deterministic review signal changes, not arbitrary source hunks.",
|
|
389
|
+
"Usage errors exit 2; generated comparison output follows command status rules.",
|
|
390
|
+
],
|
|
391
|
+
nextSteps: [
|
|
392
|
+
"Use ci-report when a PR-oriented summary is needed.",
|
|
393
|
+
"Use scan or graph on the working tree to investigate changed evidence.",
|
|
394
|
+
"Summarize changed evidence and remaining uncertainty for reviewers.",
|
|
395
|
+
],
|
|
396
|
+
options: [
|
|
397
|
+
"config",
|
|
398
|
+
"from",
|
|
399
|
+
"to",
|
|
400
|
+
{
|
|
401
|
+
name: "format",
|
|
402
|
+
description: "Output format: json or markdown. Defaults to json.",
|
|
403
|
+
},
|
|
404
|
+
"json",
|
|
405
|
+
"help",
|
|
406
|
+
],
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
name: "ci-report",
|
|
410
|
+
usage: "renma ci-report [path] --from <ref> --to <ref> [options]",
|
|
411
|
+
question: "What should a CI or PR reviewer inspect?",
|
|
412
|
+
purpose: "CI report produces a pull-request-oriented summary from deterministic Renma evidence.",
|
|
413
|
+
useWhen: [
|
|
414
|
+
"CI needs a PASS, WARN, or FAIL status with review-focused details.",
|
|
415
|
+
"A PR reviewer needs readiness, graph, and finding changes summarized.",
|
|
416
|
+
"You want Markdown for a PR comment or JSON for automation.",
|
|
417
|
+
],
|
|
418
|
+
doNotUseFor: [
|
|
419
|
+
"Replacing human review.",
|
|
420
|
+
"A full generic code diff.",
|
|
421
|
+
"Certifying that all semantic changes are correct.",
|
|
422
|
+
],
|
|
423
|
+
examples: [
|
|
424
|
+
"renma ci-report . --from main --to HEAD --format markdown",
|
|
425
|
+
"renma ci-report . --from origin/main --to HEAD --format json",
|
|
426
|
+
],
|
|
427
|
+
interpretation: [
|
|
428
|
+
"The report combines deterministic evidence for review.",
|
|
429
|
+
"PASS and WARN exit 0; FAIL exits 1; usage errors exit 2.",
|
|
430
|
+
"Reviewers should still inspect meaningful semantic changes.",
|
|
431
|
+
],
|
|
432
|
+
nextSteps: [
|
|
433
|
+
"Fix or explain new failures and warnings.",
|
|
434
|
+
"Use diff for the underlying evidence comparison.",
|
|
435
|
+
"Rerun ci-report after updating the branch.",
|
|
436
|
+
],
|
|
437
|
+
options: [
|
|
438
|
+
"config",
|
|
439
|
+
"from",
|
|
440
|
+
"to",
|
|
441
|
+
{
|
|
442
|
+
name: "format",
|
|
443
|
+
description: "Output format: json or markdown. Defaults to markdown.",
|
|
444
|
+
},
|
|
445
|
+
"json",
|
|
446
|
+
"help",
|
|
447
|
+
],
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
name: "inspect",
|
|
451
|
+
usage: "renma inspect <file> [options]",
|
|
452
|
+
question: "What is the outline or exact line slice of one file?",
|
|
453
|
+
purpose: "Inspect provides a compact outline or exact line slice of a single file.",
|
|
454
|
+
useWhen: [
|
|
455
|
+
"You need to inspect one asset before editing without reading the whole repository.",
|
|
456
|
+
"A coding agent needs a deterministic outline or exact line range.",
|
|
457
|
+
"You want Context Lens or relationship hints for one file when repository context can be inferred.",
|
|
458
|
+
],
|
|
459
|
+
doNotUseFor: [
|
|
460
|
+
"Selecting runtime context for an LLM.",
|
|
461
|
+
"Assembling prompts for task execution.",
|
|
462
|
+
"Replacing scan, catalog, or graph for repository-wide evidence.",
|
|
463
|
+
],
|
|
464
|
+
examples: [
|
|
465
|
+
"renma inspect skills/testing/spec-review/SKILL.md",
|
|
466
|
+
"renma inspect skills/testing/spec-review/SKILL.md --lines L10-L42",
|
|
467
|
+
"renma inspect contexts/testing/boundary-value-analysis.md --format json",
|
|
468
|
+
],
|
|
469
|
+
interpretation: [
|
|
470
|
+
"Without --lines, output is a structured outline of one file.",
|
|
471
|
+
"With --lines, output is an exact source slice.",
|
|
472
|
+
"Inspect is an inspection helper, not a runtime context selector or prompt assembler.",
|
|
473
|
+
],
|
|
474
|
+
nextSteps: [
|
|
475
|
+
"Use scan for concrete findings before or after edits.",
|
|
476
|
+
"Use catalog or graph if one-file inspection reveals relationship questions.",
|
|
477
|
+
"Cite exact lines when summarizing edits for review.",
|
|
478
|
+
],
|
|
479
|
+
options: [
|
|
480
|
+
{
|
|
481
|
+
name: "format",
|
|
482
|
+
description: "Output format: text or json. Defaults to json.",
|
|
483
|
+
},
|
|
484
|
+
"json",
|
|
485
|
+
"lines",
|
|
486
|
+
"help",
|
|
487
|
+
],
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
name: "scaffold",
|
|
491
|
+
usage: "renma scaffold <skill|context|context_lens> <path> [options]",
|
|
492
|
+
question: "How can a new asset start from a deterministic structure?",
|
|
493
|
+
purpose: "Scaffold creates deterministic starter structures or authoring prompts for new Renma assets.",
|
|
494
|
+
useWhen: [
|
|
495
|
+
"You are creating a new skill, context asset, or context lens.",
|
|
496
|
+
"You want a starter file or prompt with expected metadata and sections.",
|
|
497
|
+
"You need a deterministic starting point before authoring content.",
|
|
498
|
+
],
|
|
499
|
+
doNotUseFor: [
|
|
500
|
+
"Generating a complete production-ready skill or context.",
|
|
501
|
+
"Inventing domain knowledge merely to fill the template.",
|
|
502
|
+
"Replacing author-provided purpose, routing boundaries, inputs, completion criteria, verification, or references.",
|
|
503
|
+
],
|
|
504
|
+
examples: [
|
|
505
|
+
"renma scaffold skill skills/testing/spec-review/SKILL.md --owner qa-platform",
|
|
506
|
+
"renma scaffold context contexts/testing/boundary-value-analysis.md --owner qa-platform",
|
|
507
|
+
"renma scaffold context_lens lenses/testing/spec-review-boundary-values.md --owner qa-platform",
|
|
508
|
+
"renma scaffold skill skills/testing/spec-review/SKILL.md --owner qa-platform --format prompt",
|
|
509
|
+
],
|
|
510
|
+
interpretation: [
|
|
511
|
+
"File mode creates the scaffold file at the target path and refuses to overwrite existing files.",
|
|
512
|
+
"Prompt and JSON modes print to stdout instead of creating the scaffold file.",
|
|
513
|
+
"Generated scaffold content is a starting structure, not a complete asset.",
|
|
514
|
+
"The author must still provide purpose, routing boundaries, inputs, completion criteria, verification, and references.",
|
|
515
|
+
"Domain knowledge must come from evidence or human input.",
|
|
516
|
+
],
|
|
517
|
+
nextSteps: [
|
|
518
|
+
"Edit the generated content with evidence-backed details.",
|
|
519
|
+
"Run scan, catalog, graph, and readiness after editing.",
|
|
520
|
+
"Have a human review meaningful semantic content before merging.",
|
|
521
|
+
],
|
|
522
|
+
options: [
|
|
523
|
+
{
|
|
524
|
+
name: "format",
|
|
525
|
+
description: "Output format: file, prompt, or json. Defaults to file. File mode writes the scaffold to the target path and requires --owner. Prompt and JSON modes print to stdout instead of creating the target file.",
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
name: "owner",
|
|
529
|
+
description: "Set owner metadata on the scaffold. Required when --format file is used.",
|
|
530
|
+
},
|
|
531
|
+
"id",
|
|
532
|
+
"title",
|
|
533
|
+
"tags",
|
|
534
|
+
"help",
|
|
535
|
+
],
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
name: "suggest-metadata",
|
|
539
|
+
usage: "renma suggest-metadata <file> [options]",
|
|
540
|
+
question: "How can a coding agent prepare a metadata-only retrofit?",
|
|
541
|
+
purpose: "Suggest metadata emits a prompt or structured suggestion for a metadata-focused retrofit of one existing asset.",
|
|
542
|
+
useWhen: [
|
|
543
|
+
"An asset lacks compact metadata and you want a reviewable metadata patch.",
|
|
544
|
+
"You need guidance that preserves the existing Markdown body and semantics.",
|
|
545
|
+
"A human explicitly provides an owner with --owner or the asset already declares one.",
|
|
546
|
+
],
|
|
547
|
+
doNotUseFor: [
|
|
548
|
+
"Editing the file automatically.",
|
|
549
|
+
"Changing the Markdown body or asset semantics unless explicitly requested.",
|
|
550
|
+
"Inferring an owner without evidence.",
|
|
551
|
+
],
|
|
552
|
+
examples: [
|
|
553
|
+
"renma suggest-metadata skills/testing/spec-review/SKILL.md --format prompt",
|
|
554
|
+
"renma suggest-metadata skills/testing/spec-review/SKILL.md --owner qa-platform --format json",
|
|
555
|
+
],
|
|
556
|
+
interpretation: [
|
|
557
|
+
"The command prints to stdout and does not edit the target file.",
|
|
558
|
+
"Without --owner, do not add owner metadata unless the asset already declares one or a maintainer confirms it.",
|
|
559
|
+
"Preserve existing Markdown body and semantics for a metadata-only retrofit.",
|
|
560
|
+
],
|
|
561
|
+
nextSteps: [
|
|
562
|
+
"Apply only evidence-backed metadata changes in a reviewable patch.",
|
|
563
|
+
"Run scan and ownership after editing.",
|
|
564
|
+
"Report any missing owner, reference, or source-of-truth uncertainty.",
|
|
565
|
+
],
|
|
566
|
+
options: [
|
|
567
|
+
{
|
|
568
|
+
name: "format",
|
|
569
|
+
description: "Output format: prompt or json. Defaults to prompt. The command prints to stdout and does not edit the target file.",
|
|
570
|
+
},
|
|
571
|
+
"json",
|
|
572
|
+
{
|
|
573
|
+
name: "owner",
|
|
574
|
+
description: "Explicitly provide an owner candidate. Renma must not infer an owner when this option is absent.",
|
|
575
|
+
},
|
|
576
|
+
"help",
|
|
577
|
+
],
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
name: "suggest-semantic-split",
|
|
581
|
+
usage: "renma suggest-semantic-split <file> [options]",
|
|
582
|
+
question: "How can a coding agent prepare a reviewable semantic split?",
|
|
583
|
+
purpose: "Suggest semantic split packages bounded source material and instructions for drafting a semantic split.",
|
|
584
|
+
useWhen: [
|
|
585
|
+
"A Markdown asset is too large or mixes multiple responsibilities.",
|
|
586
|
+
"A coding agent needs bounded source context and deterministic helper commands.",
|
|
587
|
+
"You want a prompt or JSON review bundle before proposing a split.",
|
|
588
|
+
],
|
|
589
|
+
doNotUseFor: [
|
|
590
|
+
"Editing files automatically.",
|
|
591
|
+
"Splitting merely to satisfy a size metric when boundaries are not semantically meaningful.",
|
|
592
|
+
"Dropping meaning, references, metadata, or review context.",
|
|
593
|
+
],
|
|
594
|
+
examples: [
|
|
595
|
+
"renma suggest-semantic-split docs/large-runbook.md",
|
|
596
|
+
"renma suggest-semantic-split docs/large-runbook.md --format json",
|
|
597
|
+
"renma suggest-semantic-split docs/large-runbook.md --max-source-bytes 32768",
|
|
598
|
+
],
|
|
599
|
+
interpretation: [
|
|
600
|
+
"The command prints to stdout and does not edit files.",
|
|
601
|
+
"A split must preserve meaning and references.",
|
|
602
|
+
"The resulting patch requires review.",
|
|
603
|
+
],
|
|
604
|
+
nextSteps: [
|
|
605
|
+
"Draft bounded files only when the proposed boundaries are meaningful.",
|
|
606
|
+
"Preserve references and summarize uncertainty.",
|
|
607
|
+
"Run scan, catalog, graph, and readiness after editing.",
|
|
608
|
+
],
|
|
609
|
+
options: [
|
|
610
|
+
{
|
|
611
|
+
name: "format",
|
|
612
|
+
description: "Output format: prompt or json. Defaults to prompt. The command prints to stdout and does not edit files.",
|
|
613
|
+
},
|
|
614
|
+
"json",
|
|
615
|
+
"max-source-bytes",
|
|
616
|
+
"max-context-bytes",
|
|
617
|
+
"help",
|
|
618
|
+
],
|
|
619
|
+
},
|
|
620
|
+
];
|
|
621
|
+
const COMMAND_MAP = new Map(COMMAND_HELP.map((command) => [command.name, command]));
|
|
622
|
+
export function isCommandName(value) {
|
|
623
|
+
return COMMAND_MAP.has(value);
|
|
624
|
+
}
|
|
625
|
+
export function renderGlobalHelp(version) {
|
|
626
|
+
return [
|
|
627
|
+
`renma ${version}`,
|
|
628
|
+
"",
|
|
629
|
+
"Renma provides deterministic repository governance and maintenance evidence for skills, context assets, and agent-facing documentation.",
|
|
630
|
+
"",
|
|
631
|
+
"Boundaries:",
|
|
632
|
+
"- Renma does not call an LLM.",
|
|
633
|
+
"- Renma does not select runtime context.",
|
|
634
|
+
"- Renma does not assemble prompts for task execution.",
|
|
635
|
+
"- Renma does not execute agents.",
|
|
636
|
+
"- Renma does not collect runtime telemetry.",
|
|
637
|
+
"- Renma does not automatically perform large semantic rewrites.",
|
|
638
|
+
"",
|
|
639
|
+
"Usage",
|
|
640
|
+
" renma <command> [args] [options]",
|
|
641
|
+
" renma <command> --help",
|
|
642
|
+
"",
|
|
643
|
+
"Start here: existing repository",
|
|
644
|
+
" renma scan .",
|
|
645
|
+
" renma catalog . --format markdown",
|
|
646
|
+
" renma graph . --format markdown",
|
|
647
|
+
" renma readiness . --format markdown",
|
|
648
|
+
"",
|
|
649
|
+
"Start here: new skill",
|
|
650
|
+
" renma scaffold skill skills/<name>/SKILL.md --owner <owner>",
|
|
651
|
+
" renma scan .",
|
|
652
|
+
" renma catalog . --format markdown",
|
|
653
|
+
" renma graph . --format markdown",
|
|
654
|
+
" renma readiness . --format markdown",
|
|
655
|
+
"",
|
|
656
|
+
"Normal maintenance loop",
|
|
657
|
+
" inspect evidence -> prepare a reviewable patch -> human review -> rerun Renma",
|
|
658
|
+
"",
|
|
659
|
+
"Commands",
|
|
660
|
+
...COMMAND_HELP.map((command) => ` ${command.name.padEnd(24)} ${command.question}`),
|
|
661
|
+
"",
|
|
662
|
+
"Options",
|
|
663
|
+
` ${OPTION_HELP.help.flags.padEnd(28)} ${OPTION_HELP.help.description}`,
|
|
664
|
+
` ${OPTION_HELP.version.flags.padEnd(28)} ${OPTION_HELP.version.description}`,
|
|
665
|
+
"",
|
|
666
|
+
"Run `renma <command> --help` for command-specific purpose, boundaries, examples, and options.",
|
|
667
|
+
].join("\n");
|
|
668
|
+
}
|
|
669
|
+
export function renderCommandHelp(name, version) {
|
|
670
|
+
const command = COMMAND_MAP.get(name);
|
|
671
|
+
if (!command) {
|
|
672
|
+
throw new Error(`Missing CLI help for command ${name}`);
|
|
673
|
+
}
|
|
674
|
+
return [
|
|
675
|
+
`renma ${version}`,
|
|
676
|
+
"",
|
|
677
|
+
"Usage",
|
|
678
|
+
` ${command.usage}`,
|
|
679
|
+
"",
|
|
680
|
+
"Purpose",
|
|
681
|
+
` ${command.purpose}`,
|
|
682
|
+
"",
|
|
683
|
+
"Use when",
|
|
684
|
+
...renderBullets(command.useWhen),
|
|
685
|
+
"",
|
|
686
|
+
"Do not use for",
|
|
687
|
+
...renderBullets(command.doNotUseFor),
|
|
688
|
+
"",
|
|
689
|
+
"Examples",
|
|
690
|
+
...command.examples.map((example) => ` ${example}`),
|
|
691
|
+
"",
|
|
692
|
+
"How to interpret the result",
|
|
693
|
+
...renderBullets(command.interpretation),
|
|
694
|
+
"",
|
|
695
|
+
"Typical next steps",
|
|
696
|
+
...renderBullets(command.nextSteps),
|
|
697
|
+
"",
|
|
698
|
+
"Options",
|
|
699
|
+
...command.options.map((option) => {
|
|
700
|
+
const name = commandOptionName(option);
|
|
701
|
+
const help = OPTION_HELP[name];
|
|
702
|
+
const description = typeof option === "string"
|
|
703
|
+
? help.description
|
|
704
|
+
: (option.description ?? help.description);
|
|
705
|
+
return ` ${help.flags.padEnd(28)} ${description}`;
|
|
706
|
+
}),
|
|
707
|
+
].join("\n");
|
|
708
|
+
}
|
|
709
|
+
function commandOptionName(option) {
|
|
710
|
+
return typeof option === "string" ? option : option.name;
|
|
711
|
+
}
|
|
712
|
+
function renderBullets(items) {
|
|
713
|
+
return items.map((item) => `- ${item}`);
|
|
714
|
+
}
|
|
715
|
+
//# sourceMappingURL=cli-help.js.map
|