renma 0.18.1 → 0.18.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 +71 -0
- package/README.md +60 -2
- package/dist/agent-skills.d.ts +5 -6
- package/dist/agent-skills.d.ts.map +1 -1
- package/dist/agent-skills.js +2 -10
- package/dist/agent-skills.js.map +1 -1
- package/dist/catalog.d.ts +27 -1
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +62 -16
- package/dist/catalog.js.map +1 -1
- package/dist/cli-help.d.ts +4 -4
- package/dist/cli-help.d.ts.map +1 -1
- package/dist/cli-help.js +5 -3
- package/dist/cli-help.js.map +1 -1
- package/dist/command-invocation.d.ts +4 -0
- package/dist/command-invocation.d.ts.map +1 -0
- package/dist/command-invocation.js +14 -0
- package/dist/command-invocation.js.map +1 -0
- package/dist/commands/inspect.d.ts +5 -0
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +185 -33
- package/dist/commands/inspect.js.map +1 -1
- package/dist/commands/suggest-metadata.d.ts +6 -2
- package/dist/commands/suggest-metadata.d.ts.map +1 -1
- package/dist/commands/suggest-metadata.js +516 -72
- package/dist/commands/suggest-metadata.js.map +1 -1
- package/dist/discovery.d.ts +33 -1
- package/dist/discovery.d.ts.map +1 -1
- package/dist/discovery.js +361 -51
- package/dist/discovery.js.map +1 -1
- package/dist/model.d.ts +2 -10
- package/dist/model.d.ts.map +1 -1
- package/dist/model.js.map +1 -1
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +66 -2
- package/dist/scanner.js.map +1 -1
- package/dist/skill-migration.d.ts.map +1 -1
- package/dist/skill-migration.js +6 -1
- package/dist/skill-migration.js.map +1 -1
- package/dist/types.d.ts +72 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +50 -1
- package/dist/types.js.map +1 -1
- package/docs/agent-skills-compatibility.md +8 -1
- package/docs/authoring-guide.md +62 -0
- package/docs/diagnostics.md +382 -2
- package/docs/user-manual.md +122 -12
- package/package.json +1 -1
package/docs/authoring-guide.md
CHANGED
|
@@ -258,6 +258,24 @@ Do not route an already canonical Skill through `suggest-metadata` as ceremony.
|
|
|
258
258
|
Use it only for a metadata retrofit, explicit owner retrofit, recognized
|
|
259
259
|
pre-0.16 one-way migration, or blocked migration review.
|
|
260
260
|
|
|
261
|
+
### Evidence-first LLM preflight
|
|
262
|
+
|
|
263
|
+
When an LLM is asked to improve one existing Skill:
|
|
264
|
+
|
|
265
|
+
1. Run `renma scan . --fail-on high --format json`.
|
|
266
|
+
2. Run `renma inspect <SKILL.md> --format json`.
|
|
267
|
+
3. Inspect relevant local resources and referenced Context Assets.
|
|
268
|
+
4. Use `renma suggest-metadata` only when metadata retrofit or migration
|
|
269
|
+
evidence exists.
|
|
270
|
+
5. Prepare the smallest intended patch.
|
|
271
|
+
6. Run `renma scan . --fail-on high --format json` again.
|
|
272
|
+
7. Stop without manufacturing work when Renma returns `no-proposal`.
|
|
273
|
+
8. Report unresolved human decisions.
|
|
274
|
+
|
|
275
|
+
For a classification-only question, `renma inspect <target> --format json` may
|
|
276
|
+
be the first command. `scan` remains the normal repository-level starting
|
|
277
|
+
point.
|
|
278
|
+
|
|
261
279
|
### 4. Review before applying
|
|
262
280
|
|
|
263
281
|
Treat the output as a candidate. Compare it with the source and apply only the
|
|
@@ -361,6 +379,50 @@ examples, and a zero-context classification self-check.
|
|
|
361
379
|
Context and Context Lens scaffolds keep their top-level Renma metadata syntax;
|
|
362
380
|
the Agent Skills `metadata.renma.*` serialization boundary applies to Skills.
|
|
363
381
|
|
|
382
|
+
## Context Asset Discovery Boundary
|
|
383
|
+
|
|
384
|
+
The classification precedence is: explicit Skill entrypoint, explicit local
|
|
385
|
+
support inside a recognized Skill, recognized top-level asset root,
|
|
386
|
+
repository-level support or configuration, compatible generic nested rules,
|
|
387
|
+
then unknown. This makes the repository root authoritative:
|
|
388
|
+
|
|
389
|
+
```text
|
|
390
|
+
contexts/foo/references/policy.md
|
|
391
|
+
-> independent Context Asset
|
|
392
|
+
|
|
393
|
+
skills/foo/references/policy.md
|
|
394
|
+
-> Skill-local Reference
|
|
395
|
+
|
|
396
|
+
references/policy.md
|
|
397
|
+
-> outside the Context root
|
|
398
|
+
|
|
399
|
+
tools/helper.mjs
|
|
400
|
+
-> repository implementation
|
|
401
|
+
|
|
402
|
+
skills/foo/tools/helper.mjs
|
|
403
|
+
-> not canonical Skill-local support
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
Use `contexts/**` for preferred independent Context and `context/**` only for
|
|
407
|
+
compatibility. Nested `references/`, `examples/`, `profiles/`, `scripts/`, or
|
|
408
|
+
`assets/` does not override either Context root. The same names are Skill-local
|
|
409
|
+
only inside `skills/**` or `.agents/skills/**`, where they establish a structural
|
|
410
|
+
parent candidate. Local metadata overrides remain supported where valid, but
|
|
411
|
+
are not required. `tools/**` is shared repository implementation, and a Skill
|
|
412
|
+
uses `scripts/`, not `tools/`, for canonical local executable support.
|
|
413
|
+
|
|
414
|
+
The Skill-local path rule establishes only a structural parent candidate. The
|
|
415
|
+
catalog must resolve exactly one parent entrypoint before Renma reports
|
|
416
|
+
inherited governance. A missing or ambiguous parent remains structurally
|
|
417
|
+
Skill-local but unowned or unresolved; `suggest-metadata` blocks instead of
|
|
418
|
+
adding independent metadata automatically. Existing explicit local owner or
|
|
419
|
+
policy metadata is preserved and is not described as inherited.
|
|
420
|
+
|
|
421
|
+
Humans decide whether knowledge needs independent ownership, lifecycle, reuse,
|
|
422
|
+
and source-of-truth status. Renma classifies the resulting placement but never
|
|
423
|
+
promotes or moves content automatically. A `no-proposal` result is successful:
|
|
424
|
+
preserve the file and stop unless a separate intentional change is supported.
|
|
425
|
+
|
|
364
426
|
For current guidance on deriving several focused, bounded workflows from a broad
|
|
365
427
|
existing Skill—including focused `inspect`, graph, Context reuse, and Appium
|
|
366
428
|
examples—see [Advanced Skill Authoring](advanced-skill-authoring.md). That guide
|
package/docs/diagnostics.md
CHANGED
|
@@ -57,6 +57,259 @@ Structured facts in `details` are the authoritative inputs for review tooling.
|
|
|
57
57
|
`llmHint` is guidance only; changing hint wording should not change bundle
|
|
58
58
|
grouping, affected files, affected assets, or repair decisions.
|
|
59
59
|
|
|
60
|
+
## Classification Evidence
|
|
61
|
+
|
|
62
|
+
`inspect`, `suggest-metadata`, and relevant scan finding or diagnostic
|
|
63
|
+
`details` include additive `classification` evidence. Classification answers
|
|
64
|
+
what path rule matched; governance separately answers whether owner, policy, or
|
|
65
|
+
metadata is declared, inherited, missing, or not required. A file's kind never
|
|
66
|
+
implies that it has an owner. `inspect` additionally exposes
|
|
67
|
+
`repositoryBoundary`, preserving resolution source and repository-relative path
|
|
68
|
+
when resolved or stable unresolved/ambiguous reason evidence and candidate
|
|
69
|
+
roots when no safe boundary can be selected.
|
|
70
|
+
|
|
71
|
+
For marker-free directory-segment inference, only `.agents`, `skills`,
|
|
72
|
+
`contexts`, `context`, `lenses`, and `tools` can positively establish a
|
|
73
|
+
structural boundary. Recognized root filenames are handled separately:
|
|
74
|
+
`AGENTS.md` may establish its containing directory as the structural root when
|
|
75
|
+
no stronger repository marker is available, while `renma.config.json` and
|
|
76
|
+
`.renma.json` normally establish the boundary through repository-marker
|
|
77
|
+
detection. The support-like names `profiles`, `references`, `examples`,
|
|
78
|
+
`scripts`, and `assets` are guards only: they can block a later boundary-like
|
|
79
|
+
segment or contribute ambiguity evidence, but never establish a repository root
|
|
80
|
+
by themselves.
|
|
81
|
+
|
|
82
|
+
> Classification describes how Renma interpreted repository structure. It does
|
|
83
|
+
> not by itself prove ownership, policy, lifecycle, source-of-truth status, or
|
|
84
|
+
> human intent.
|
|
85
|
+
|
|
86
|
+
> Governance evidence describes what is actually declared or inherited.
|
|
87
|
+
|
|
88
|
+
> Decision evidence describes whether Renma recommends a change, blocks one,
|
|
89
|
+
> requires confirmation, or recommends no change.
|
|
90
|
+
|
|
91
|
+
### How to Read Classification Evidence
|
|
92
|
+
|
|
93
|
+
These fields answer different questions and must not be substituted for one
|
|
94
|
+
another:
|
|
95
|
+
|
|
96
|
+
| Field | What it indicates | What it does not indicate |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| `kind` | The semantic parsing or inventory role Renma assigned to the file. | Governance scope, ownership, policy, lifecycle, validity, or human intent. |
|
|
99
|
+
| `scope` | The structural governance boundary implied by the path. | That governance metadata exists, is valid, or may be inherited. |
|
|
100
|
+
| `matchedRule` | The primary stable structural rule that classified the normalized repository-relative path. | That the resulting asset is owned, current, authoritative, or safe to change. |
|
|
101
|
+
| `reasonCode` | A more specific deterministic reason for the rule result. | Governance or a repair decision by itself. |
|
|
102
|
+
| `parentResolution` | How repository evidence resolved the parent implied by a Skill-local path. | The parent's owner or policy values. It is normally absent outside Skill-local classification. |
|
|
103
|
+
| `governance` | Declared or inherited ownership, policy, and metadata provenance supported by repository evidence. | Human intent beyond the declarations Renma found. |
|
|
104
|
+
| `decisionStatus` | The application gate for a command that can recommend a change. It is decision evidence, not classification evidence. | A different structural classification or permission to ignore blocked evidence. |
|
|
105
|
+
|
|
106
|
+
`kind` is one of `skill`, `agent`, `context`, `context_lens`, `profile`,
|
|
107
|
+
`reference`, `example`, `script`, `asset`, `config`, or `unknown`. It selects a
|
|
108
|
+
semantic parsing or inventory role. It is not equivalent to `scope`: for
|
|
109
|
+
example, a `reference` can be `skill-local`, while a repository tool currently
|
|
110
|
+
has `kind: "unknown"` and `scope: "repository-support"`. Metadata can refine a
|
|
111
|
+
file under a Context root from `context` to `context_lens` without changing the
|
|
112
|
+
structural rule that matched.
|
|
113
|
+
|
|
114
|
+
Optional classification fields add evidence without changing those core
|
|
115
|
+
meanings:
|
|
116
|
+
|
|
117
|
+
| Field | Meaning | Do not infer |
|
|
118
|
+
| --- | --- | --- |
|
|
119
|
+
| `reason` | Human-readable explanation of the current result. | A stable machine branch; wording may improve without a contract change. |
|
|
120
|
+
| `recognizedRoot` | The repository-relative asset root or boundary recognized by the matched rule, such as `skills`, `.agents/skills`, or `contexts`. | The absolute filesystem repository root; use `repositoryBoundary` for that evidence. |
|
|
121
|
+
| `parentAssetCandidatePath` | The parent Skill path implied by structure before repository resolution. | That the file exists or supplies governance. |
|
|
122
|
+
| `parentAssetPath` | The one parent Skill source path selected by a `resolved` result. | That the parent declares an owner or policy. |
|
|
123
|
+
| `parentAssetCandidates` | All plausible parent Skill paths retained by an `ambiguous` result. | That the first candidate is preferred or safe to select. |
|
|
124
|
+
| `supportDirectory` | The support-like directory involved in classification, such as `references` or `scripts`. | That the directory is valid Skill-local support without the matching rule and parent evidence. |
|
|
125
|
+
| `ignoredNestedSegments` | Nested support-like names that did not override a higher-priority recognized root. | That Renma ignored the file's content or omitted it from inventory. |
|
|
126
|
+
| `competingRules` | Stable negative evidence explaining why a nearby alternative rule did not match. | An additional positive classification or permission to choose that rule. |
|
|
127
|
+
|
|
128
|
+
#### Scope
|
|
129
|
+
|
|
130
|
+
| `scope` | Meaning | Do not infer |
|
|
131
|
+
| --- | --- | --- |
|
|
132
|
+
| `independent` | The path establishes a recognized first-class asset or agent boundary rather than Skill-local or repository-support placement. | That owner, policy, lifecycle, or source-of-truth metadata exists or is valid. |
|
|
133
|
+
| `skill-local` | The path is under a recognized canonical Skill support directory. | That a parent Skill exists or that inheritance is valid. Check `parentResolution` and `governance`. |
|
|
134
|
+
| `repository-support` | The path is recognized as repository implementation or configuration support. | That it is an independently governed Context Asset. |
|
|
135
|
+
| `unknown` | The path rule does not establish a known governance scope. | That the file is irrelevant, safe, unowned, or outside the repository. |
|
|
136
|
+
|
|
137
|
+
#### Matched Rules
|
|
138
|
+
|
|
139
|
+
`matchedRule` is the primary stable structural classification. Rules are applied
|
|
140
|
+
in the precedence shown after this table, so a higher-priority match prevents a
|
|
141
|
+
later, more generic interpretation.
|
|
142
|
+
|
|
143
|
+
| `matchedRule` | Repository evidence matched | Indicates | Must not be inferred |
|
|
144
|
+
| --- | --- | --- | --- |
|
|
145
|
+
| `skill-entrypoint` | A recognized canonical or historical Skill entrypoint shape under `skills/**` or `.agents/skills/**`. | The file is classified as a Skill entrypoint with independent scope. | That Agent Skills frontmatter is valid, that governance is complete, or that no migration is needed. |
|
|
146
|
+
| `skill-local-support` | A path inside `references/`, `profiles/`, `examples/`, `scripts/`, or `assets/` beneath a recognized Skill path shape. | The file has a structurally implied Skill parent candidate and Skill-local scope. | That the parent exists or inheritance is valid. Require `parentResolution: "resolved"` and governance evidence. |
|
|
147
|
+
| `context-root` | A file under `contexts/**`. | The file is an independent Context Asset by structure; metadata may refine its `kind` to `context_lens`. | That owner, lifecycle, policy, or source-of-truth metadata is complete or valid. |
|
|
148
|
+
| `context-root-legacy` | A file under the supported legacy `context/**` root. | The file is an independent Context Asset by the compatibility path rule. | That it is current, owned, authoritative, or should be moved automatically. |
|
|
149
|
+
| `lens-root` | A file under `lenses/**`. | The file is an independent Context Lens by structure. | That Lens targets, governance, or policy declarations are valid. |
|
|
150
|
+
| `agent-root` | `AGENTS.md` or a file under `.agents/**` after higher-priority Skill entrypoint rules. | The file is repository agent guidance with independent scope. | That it is an Agent Skill, that its instructions are valid, or that governance is complete. |
|
|
151
|
+
| `repository-tool` | A file under top-level `tools/**`. | The file is repository implementation with repository-support scope. | That it is an independently governed Context Asset. |
|
|
152
|
+
| `config-file` | A filename matching `renma.config.json` or `.renma.json` after higher-priority rules. | The file is recognized as Renma configuration support. | That its contents are valid, effective for a particular target, or proof of asset governance. |
|
|
153
|
+
| `generic-reference` | A nested `references/` directory outside recognized independent and Skill-local asset boundaries. | The file receives the `reference` parsing or inventory role, but its scope remains unknown. | That it belongs to a Skill, may inherit governance, or is an independent Context Asset. |
|
|
154
|
+
| `generic-example` | A nested `examples/` directory outside recognized independent and Skill-local asset boundaries. | The file receives the `example` parsing or inventory role, but its scope remains unknown. | That it belongs to a Skill, may inherit governance, or is independently governed. |
|
|
155
|
+
| `generic-profile` | A nested `profiles/` directory outside recognized independent and Skill-local asset boundaries. | The file receives the `profile` parsing or inventory role, but its scope remains unknown. | That it is selected by a Skill, may inherit governance, or defines effective policy. |
|
|
156
|
+
| `unknown` | No supported positive structural rule matched, or the path uses an unsupported reserved layout. | Renma has no more specific structural classification for the path. | That the file is irrelevant, harmless, unowned, safe to edit, or outside the resolved repository. |
|
|
157
|
+
|
|
158
|
+
The stable path-rule precedence is:
|
|
159
|
+
|
|
160
|
+
1. `skill-entrypoint`.
|
|
161
|
+
2. `skill-local-support` inside a recognized Skill boundary.
|
|
162
|
+
3. Recognized asset roots: `context-root`, `context-root-legacy`, `lens-root`,
|
|
163
|
+
and `agent-root`.
|
|
164
|
+
4. Repository support or configuration: `repository-tool` and `config-file`.
|
|
165
|
+
5. Compatible nested rules: `generic-reference`, `generic-example`, and
|
|
166
|
+
`generic-profile`.
|
|
167
|
+
6. `unknown`.
|
|
168
|
+
|
|
169
|
+
#### Parent Skill Resolution
|
|
170
|
+
|
|
171
|
+
`parentResolution` is meaningful for `skill-local-support`. Only `resolved`
|
|
172
|
+
permits Renma to claim one parent Skill, and even then consumers must inspect
|
|
173
|
+
`governance` to learn whether that parent supplies an owner or policy.
|
|
174
|
+
|
|
175
|
+
| `parentResolution` | Meaning | Consumer behavior |
|
|
176
|
+
| --- | --- | --- |
|
|
177
|
+
| `structural-candidate` | Path classification derived a possible `parentAssetCandidatePath`, but repository evidence has not resolved it. | Do not claim inheritance. Resolve the repository and parent evidence first. |
|
|
178
|
+
| `resolved` | Repository evidence found exactly one parent Skill and exposes it as `parentAssetPath`. | Inheritance may be reported only as supported by the accompanying governance evidence. |
|
|
179
|
+
| `missing` | No parent Skill exists at the structurally implied location. | Do not claim inheritance; treat a related change recommendation as blocked until the layout is reviewed. |
|
|
180
|
+
| `ambiguous` | More than one parent Skill candidate remains plausible; candidates may appear in `parentAssetCandidates`. | Do not choose a parent or claim inheritance; require layout or human resolution. |
|
|
181
|
+
|
|
182
|
+
For example, these two files have the same semantic role and structural scope,
|
|
183
|
+
but only the first has one resolved parent:
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"classification": {
|
|
188
|
+
"kind": "reference",
|
|
189
|
+
"scope": "skill-local",
|
|
190
|
+
"matchedRule": "skill-local-support",
|
|
191
|
+
"parentResolution": "resolved",
|
|
192
|
+
"parentAssetPath": "skills/foo/SKILL.md"
|
|
193
|
+
},
|
|
194
|
+
"governance": {
|
|
195
|
+
"ownership": {
|
|
196
|
+
"declaredOwner": null,
|
|
197
|
+
"effectiveOwner": "docs",
|
|
198
|
+
"source": "inherited"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
```json
|
|
205
|
+
{
|
|
206
|
+
"classification": {
|
|
207
|
+
"kind": "reference",
|
|
208
|
+
"scope": "skill-local",
|
|
209
|
+
"matchedRule": "skill-local-support",
|
|
210
|
+
"parentResolution": "missing"
|
|
211
|
+
},
|
|
212
|
+
"governance": {
|
|
213
|
+
"ownership": {
|
|
214
|
+
"declaredOwner": null,
|
|
215
|
+
"effectiveOwner": null,
|
|
216
|
+
"source": "unowned"
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The resolved example may inherit the owner shown by governance evidence. The
|
|
223
|
+
missing example must not inherit merely because its scope remains
|
|
224
|
+
`skill-local`.
|
|
225
|
+
|
|
226
|
+
#### Reason Codes
|
|
227
|
+
|
|
228
|
+
`reasonCode` narrows the primary structural result without replacing
|
|
229
|
+
`matchedRule`. Representative groups are:
|
|
230
|
+
|
|
231
|
+
- Skill boundary evidence: `under-canonical-skill-root`,
|
|
232
|
+
`under-skill-support-directory`, `unsupported-skill-local-directory`, and
|
|
233
|
+
`outside-recognized-skill-boundary`.
|
|
234
|
+
- Independent asset roots: `under-recognized-context-root`,
|
|
235
|
+
`under-legacy-context-root`, `under-recognized-lens-root`, and
|
|
236
|
+
`under-recognized-agent-root`.
|
|
237
|
+
- Repository support: `repository-tool-not-context` and
|
|
238
|
+
`recognized-config-file`.
|
|
239
|
+
- Generic or negative boundary evidence: `under-generic-support-directory`,
|
|
240
|
+
`outside-recognized-context-root`, and
|
|
241
|
+
`outside-recognized-asset-boundary`.
|
|
242
|
+
|
|
243
|
+
Some negative reason codes occur inside `competingRules`, where `matched: false`
|
|
244
|
+
records why a nearby interpretation did not apply. Human-readable `reason`
|
|
245
|
+
wording may improve over time. Machine consumers should branch on
|
|
246
|
+
`matchedRule` and `reasonCode`, retain unfamiliar future values, and never infer
|
|
247
|
+
governance from a reason code alone.
|
|
248
|
+
|
|
249
|
+
#### Governance and Decision Evidence
|
|
250
|
+
|
|
251
|
+
Governance is separate from classification. `ownership` reports declared and
|
|
252
|
+
effective owners plus whether the source is `declared`, `inherited`, or
|
|
253
|
+
`unowned`. When available, `policySource`, `policyInheritedFrom`, and
|
|
254
|
+
`metadataState` report equivalent provenance for policy and metadata. A
|
|
255
|
+
resolved parent can still be unowned or have missing policy, so classification
|
|
256
|
+
alone is never enough to construct governance.
|
|
257
|
+
|
|
258
|
+
Commands that make recommendations expose one of these `decisionStatus`
|
|
259
|
+
values:
|
|
260
|
+
|
|
261
|
+
| `decisionStatus` | Meaning | Consumer behavior |
|
|
262
|
+
| --- | --- | --- |
|
|
263
|
+
| `deterministic` | Renma has enough supported evidence to construct the reported change candidate. | Review and apply only the reported candidate; do not infer additional changes. |
|
|
264
|
+
| `human-confirmation-required` | Renma constructed candidate evidence, but human intent or semantics must be confirmed before application. | Do not apply until the required human confirmation occurs. |
|
|
265
|
+
| `blocked` | Conflicting, incomplete, unsafe, or unresolved evidence prevents a change recommendation. | Hard stop. Do not apply a patch even if another payload field looks candidate-like. |
|
|
266
|
+
| `no-change-recommended` | Renma successfully determined that no edit is recommended. | Treat as a successful no-edit result; do not manufacture a patch. |
|
|
267
|
+
|
|
268
|
+
`decisionStatus` is the authoritative application gate. The accompanying
|
|
269
|
+
decision `reasonCode` and `summary` explain that outcome; neither changes the
|
|
270
|
+
structural classification.
|
|
271
|
+
|
|
272
|
+
#### Safe Consumer Rules
|
|
273
|
+
|
|
274
|
+
1. Do not infer ownership from `kind`.
|
|
275
|
+
2. Do not infer inheritance from `scope: "skill-local"`.
|
|
276
|
+
3. Require `parentResolution: "resolved"` plus governance evidence before
|
|
277
|
+
claiming inheritance.
|
|
278
|
+
4. Treat `decisionStatus: "blocked"` as a hard stop.
|
|
279
|
+
5. Treat `decisionStatus: "no-change-recommended"` as a successful no-edit
|
|
280
|
+
result.
|
|
281
|
+
6. Use `matchedRule` and `reasonCode` for machine branching, not the
|
|
282
|
+
human-readable `reason`.
|
|
283
|
+
7. Preserve forward compatibility with unknown future enum values. Retain the
|
|
284
|
+
raw value and fail closed rather than guessing its meaning.
|
|
285
|
+
|
|
286
|
+
Example additive details:
|
|
287
|
+
|
|
288
|
+
```json
|
|
289
|
+
{
|
|
290
|
+
"classification": {
|
|
291
|
+
"kind": "context",
|
|
292
|
+
"scope": "independent",
|
|
293
|
+
"matchedRule": "context-root",
|
|
294
|
+
"reasonCode": "under-recognized-context-root",
|
|
295
|
+
"recognizedRoot": "contexts",
|
|
296
|
+
"ignoredNestedSegments": ["references"],
|
|
297
|
+
"reason": "The file is under the recognized contexts/** root. The nested references/ segment does not change its classification."
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Adding classification evidence does not emit a finding for every file, change
|
|
303
|
+
diagnostic severity, or change scan pass/fail behavior. Existing
|
|
304
|
+
`requires_human_decision` repair constraints remain the mechanism for intent
|
|
305
|
+
that Renma cannot infer.
|
|
306
|
+
|
|
307
|
+
`suggestedMode: "no-proposal"` with `no-change-recommended` is a successful
|
|
308
|
+
result, especially for ordinary Skill-local support that inherits governance.
|
|
309
|
+
Suggestion consumers should also handle unknown future `suggestedMode` values
|
|
310
|
+
conservatively. These command-contract refinements do not change scan finding
|
|
311
|
+
severity, scan pass/fail thresholds, or Readiness scoring.
|
|
312
|
+
|
|
60
313
|
Example:
|
|
61
314
|
|
|
62
315
|
```json
|
|
@@ -109,6 +362,132 @@ edit shapes. `requires_human_decision` marks ambiguity that should not be guesse
|
|
|
109
362
|
by automation. `risk` highlights security, data-handling, or destructive-action
|
|
110
363
|
concerns.
|
|
111
364
|
|
|
365
|
+
## Presenting Renma Evidence to a User
|
|
366
|
+
|
|
367
|
+
Raw Renma JSON is evidence for an LLM or coding agent, not usually the best
|
|
368
|
+
user-facing explanation. The consumer should translate the relevant fields into
|
|
369
|
+
plain language while preserving the boundary between confirmed facts,
|
|
370
|
+
recommendations, and unresolved human intent.
|
|
371
|
+
|
|
372
|
+
The overall loop is:
|
|
373
|
+
|
|
374
|
+
```text
|
|
375
|
+
Renma emits deterministic evidence
|
|
376
|
+
-> LLM summarizes the evidence
|
|
377
|
+
-> user supplies missing intent
|
|
378
|
+
-> LLM performs the smallest supported change
|
|
379
|
+
-> Renma verifies the result
|
|
380
|
+
-> LLM summarizes the new state
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
In practice, an LLM or coding agent should:
|
|
384
|
+
|
|
385
|
+
1. Read Renma's deterministic evidence.
|
|
386
|
+
2. Summarize the important facts in user-facing language.
|
|
387
|
+
3. Separate confirmed facts from recommendations and unresolved intent.
|
|
388
|
+
4. Ask only for human decisions that Renma cannot determine.
|
|
389
|
+
5. Rerun the relevant Renma command after the user supplies new intent.
|
|
390
|
+
6. Explain how the evidence or recommendation changed.
|
|
391
|
+
7. Repeat until the intended repository state is explicit and Renma verifies
|
|
392
|
+
it.
|
|
393
|
+
|
|
394
|
+
A useful summary normally contains:
|
|
395
|
+
|
|
396
|
+
- **Confirmed repository facts:** paths, declarations, resolved relationships,
|
|
397
|
+
and other evidence Renma actually observed.
|
|
398
|
+
- **Renma's deterministic interpretation:** the classification, governance,
|
|
399
|
+
and decision evidence without added assumptions.
|
|
400
|
+
- **Current recommendation:** the smallest change Renma supports, or an
|
|
401
|
+
explicit successful no-change result.
|
|
402
|
+
- **Unresolved human decisions:** only intent that repository evidence cannot
|
|
403
|
+
determine.
|
|
404
|
+
- **Next safe verification step:** the relevant structured Renma command, or a
|
|
405
|
+
statement that no executable action is safe yet.
|
|
406
|
+
|
|
407
|
+
For example:
|
|
408
|
+
|
|
409
|
+
```text
|
|
410
|
+
Renma classified this file as a Skill-local Reference.
|
|
411
|
+
|
|
412
|
+
One parent Skill resolved at skills/foo/SKILL.md, and the effective owner is
|
|
413
|
+
inherited from that Skill.
|
|
414
|
+
|
|
415
|
+
No independent metadata change is currently recommended.
|
|
416
|
+
|
|
417
|
+
A human decision is needed only if this knowledge is intended to be reused
|
|
418
|
+
outside this Skill. If so, consider promoting it to contexts/** and then rerun
|
|
419
|
+
Renma.
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
LLM consumers must follow these guardrails:
|
|
423
|
+
|
|
424
|
+
- Do not expose raw diagnostics without summarizing their meaning when a
|
|
425
|
+
user-facing explanation is expected.
|
|
426
|
+
- Do not ask the user to decide facts Renma already resolved.
|
|
427
|
+
- Do not invent an owner, policy, lifecycle, reference, or source-of-truth
|
|
428
|
+
claim.
|
|
429
|
+
- Do not convert `structural-candidate` into `resolved`.
|
|
430
|
+
- Do not claim inheritance without `parentResolution: "resolved"` and matching
|
|
431
|
+
governance evidence.
|
|
432
|
+
- Do not present `decisionStatus: "blocked"` as an applicable patch.
|
|
433
|
+
- Do not assume every diagnostic requires an edit.
|
|
434
|
+
- Do not hide unresolved human intent behind an automatic recommendation.
|
|
435
|
+
- Treat `no-change-recommended` as a valid successful outcome.
|
|
436
|
+
- After new user intent is provided, rerun Renma rather than relying on an old
|
|
437
|
+
result.
|
|
438
|
+
|
|
439
|
+
### Iterative Example
|
|
440
|
+
|
|
441
|
+
Initial Renma evidence:
|
|
442
|
+
|
|
443
|
+
```text
|
|
444
|
+
kind: reference
|
|
445
|
+
scope: skill-local
|
|
446
|
+
parentResolution: resolved
|
|
447
|
+
decisionStatus: no-change-recommended
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
LLM summary:
|
|
451
|
+
|
|
452
|
+
```text
|
|
453
|
+
This file is local support for one Skill and already inherits its governance.
|
|
454
|
+
No metadata change is needed. Should this knowledge remain local, or is it
|
|
455
|
+
intended for reuse by other Skills?
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
User:
|
|
459
|
+
|
|
460
|
+
```text
|
|
461
|
+
It should be reusable by three Skills.
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
LLM response:
|
|
465
|
+
|
|
466
|
+
```text
|
|
467
|
+
That changes the repository-design intent. I will treat promotion to an
|
|
468
|
+
independent Context Asset as the candidate direction, preserve the original
|
|
469
|
+
meaning, and rerun Renma after the placement and references are updated.
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
After the intended patch, Renma verifies:
|
|
473
|
+
|
|
474
|
+
```text
|
|
475
|
+
kind: context
|
|
476
|
+
scope: independent
|
|
477
|
+
matchedRule: context-root
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
LLM summary:
|
|
481
|
+
|
|
482
|
+
```text
|
|
483
|
+
The knowledge is now an independent Context Asset under contexts/**. Renma
|
|
484
|
+
verified the new classification. Ownership and references should now be
|
|
485
|
+
reviewed as independent governance rather than inherited Skill-local state.
|
|
486
|
+
```
|
|
487
|
+
|
|
488
|
+
This example is conceptual. Renma does not automatically move files, invent
|
|
489
|
+
references, or decide that local knowledge should be promoted.
|
|
490
|
+
|
|
112
491
|
## Review Bundles
|
|
113
492
|
|
|
114
493
|
`renma scan --json` also includes `reviewBundles`, a deterministic grouping of
|
|
@@ -183,8 +562,9 @@ These diagnostics are emitted after files are parsed into catalog entries. For s
|
|
|
183
562
|
Owner absence is handled as ownership coverage information. Shared assets
|
|
184
563
|
without `owner` are accepted and reported as unowned by `renma ownership`;
|
|
185
564
|
Renma does not invent an owner. Skill-local support is the exception: it uses
|
|
186
|
-
deterministic effective ownership
|
|
187
|
-
|
|
565
|
+
deterministic effective ownership only after repository evidence resolves one
|
|
566
|
+
parent Skill with an effective owner, and reports that inherited provenance
|
|
567
|
+
separately from declared metadata.
|
|
188
568
|
|
|
189
569
|
| Severity | Message | Meaning | Fix |
|
|
190
570
|
| --------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
|
package/docs/user-manual.md
CHANGED
|
@@ -73,17 +73,20 @@ support paths:
|
|
|
73
73
|
|
|
74
74
|
The same reserved names apply under `.agents/skills/**`.
|
|
75
75
|
|
|
76
|
-
These
|
|
77
|
-
specific to one Skill. Promote reusable source-of-truth knowledge to an
|
|
78
|
-
Context Asset, or a helper shared across workflows to `tools/**`, only
|
|
79
|
-
repository evidence supports that change; Renma does not move files
|
|
76
|
+
These valid support paths are structurally Skill-local. Keep material local when
|
|
77
|
+
it is specific to one Skill. Promote reusable source-of-truth knowledge to an
|
|
78
|
+
owned Context Asset, or a helper shared across workflows to `tools/**`, only
|
|
79
|
+
when repository evidence supports that change; Renma does not move files
|
|
80
80
|
automatically.
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
support artifact does not declare an owner,
|
|
84
|
-
Graph, and BOM reporting use the
|
|
85
|
-
effective ownership and mark it as inherited.
|
|
86
|
-
|
|
82
|
+
Renma claims a parent only after repository evidence resolves exactly one Skill
|
|
83
|
+
entrypoint. When that resolved local support artifact does not declare an owner,
|
|
84
|
+
ownership, Readiness, graph, Trust Graph, and BOM reporting may use the parent
|
|
85
|
+
Skill's owner as deterministic effective ownership and mark it as inherited.
|
|
86
|
+
Missing or ambiguous parents never inherit. See
|
|
87
|
+
[classification evidence](diagnostics.md#how-to-read-classification-evidence)
|
|
88
|
+
for the detailed contract. This does not invent ownership for shared Context
|
|
89
|
+
Assets or unrelated repository files.
|
|
87
90
|
|
|
88
91
|
Only files marked Markdown-parser eligible contribute frontmatter metadata,
|
|
89
92
|
headings, links, code fences, and repeated-context evidence. Text scripts and
|
|
@@ -162,6 +165,61 @@ Review the Skill with this platform's standard Skill authoring guidance, then us
|
|
|
162
165
|
Start by running `renma --help` and use command-specific help to choose the appropriate workflow. Make only evidence-backed changes. Do not invent owners, references, product rules, or source-of-truth claims. Preserve existing semantics unless a diagnostic or explicit requirement supports a change. Run `renma scan . --fail-on high` after editing, fix relevant diagnostics, rerun it, and summarize both resolved and remaining findings.
|
|
163
166
|
```
|
|
164
167
|
|
|
168
|
+
Recommended evidence-first preflight:
|
|
169
|
+
|
|
170
|
+
1. Run `renma scan . --fail-on high --format json`.
|
|
171
|
+
2. Run `renma inspect <SKILL.md> --format json`.
|
|
172
|
+
3. Inspect relevant local resources and referenced Context Assets.
|
|
173
|
+
4. Use `renma suggest-metadata` only when retrofit or migration evidence exists.
|
|
174
|
+
5. Prepare the smallest intended patch.
|
|
175
|
+
6. Rerun `renma scan . --fail-on high --format json`.
|
|
176
|
+
7. Stop without manufacturing work when `suggest-metadata` reports
|
|
177
|
+
`decisionStatus: "no-change-recommended"`; this currently uses
|
|
178
|
+
`suggestedMode: "no-proposal"`.
|
|
179
|
+
8. Report unresolved human decisions.
|
|
180
|
+
|
|
181
|
+
For one classification question, `renma inspect <target> --format json` may be
|
|
182
|
+
the initial preflight. Repository-wide work should normally start with `scan`.
|
|
183
|
+
|
|
184
|
+
## Context Asset Discovery Boundary
|
|
185
|
+
|
|
186
|
+
`contexts/**` is the preferred independent Context Asset root and `context/**`
|
|
187
|
+
remains supported. Nested directory names never override a recognized root.
|
|
188
|
+
Files under canonical Skill `references/`, `profiles/`, `examples/`, `scripts/`,
|
|
189
|
+
and `assets/` directories are structurally Skill-local. Renma claims one parent
|
|
190
|
+
and possible inherited governance only after repository evidence resolves
|
|
191
|
+
exactly one Skill under `skills/**` or `.agents/skills/**`. Supported explicit
|
|
192
|
+
local metadata remains valid but is not required. See
|
|
193
|
+
[classification evidence](diagnostics.md#how-to-read-classification-evidence)
|
|
194
|
+
for the detailed contract.
|
|
195
|
+
|
|
196
|
+
Top-level `references/**` is not a Context root. `tools/**` contains shared
|
|
197
|
+
repository implementation, not Context knowledge, and `skills/**/tools/**` is
|
|
198
|
+
not a canonical local support directory. Skill-local executable support belongs
|
|
199
|
+
under `scripts/`.
|
|
200
|
+
|
|
201
|
+
```text
|
|
202
|
+
contexts/foo/references/policy.md
|
|
203
|
+
-> independent Context Asset
|
|
204
|
+
|
|
205
|
+
skills/foo/references/policy.md
|
|
206
|
+
-> Skill-local Reference
|
|
207
|
+
|
|
208
|
+
references/policy.md
|
|
209
|
+
-> outside the Context root
|
|
210
|
+
|
|
211
|
+
tools/helper.mjs
|
|
212
|
+
-> repository implementation
|
|
213
|
+
|
|
214
|
+
skills/foo/tools/helper.mjs
|
|
215
|
+
-> not canonical Skill-local support
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
Placement as independent Context is a human decision about ownership,
|
|
219
|
+
lifecycle, reuse, and source of truth. Classification after placement is
|
|
220
|
+
deterministic. Renma never moves a file based on content. A successful
|
|
221
|
+
`no-proposal` result means no edit should be manufactured.
|
|
222
|
+
|
|
165
223
|
## User Story: Create A New Skill With Scaffold
|
|
166
224
|
|
|
167
225
|
Use this flow when adding a new agent-facing Skill. Platform-native guidance
|
|
@@ -640,7 +698,19 @@ renma inspect contexts/testing/boundary-value-analysis.md --format json
|
|
|
640
698
|
renma inspect skills/testing/spec-review/SKILL.md --lines L10-L42
|
|
641
699
|
```
|
|
642
700
|
|
|
643
|
-
Use this when editing one skill or context file and you want a deterministic outline without reading the whole repository catalog. Without `--lines`, output includes file size, line count, frontmatter range, headings, code fences, links, asset relationships, and a concise Context Lens governance summary when repository context can be inferred. Use `--lines <range>` for an exact source slice; ranges can look like `L10-L42` or `10-42`.
|
|
701
|
+
Use this when editing one skill or context file and you want a deterministic outline without reading the whole repository catalog. Without `--lines`, output includes file size, line count, frontmatter range, headings, code fences, links, asset relationships, and a concise Context Lens governance summary when repository context can be inferred. It also always includes `classification` with `kind`, `scope`, `matchedRule`, `reasonCode`, root or parent evidence, and concise competing rules. A Skill-local path exposes `parentAssetCandidatePath`; `parentAssetPath` appears only when `parentResolution` is `resolved`, while `missing` and `ambiguous` remain explicit fail-closed states. `governance` is separate and reports ownership, policy, and metadata provenance only from repository evidence. Unknown files and repository tools still receive classification. Use `--lines <range>` for an exact source slice; ranges can look like `L10-L42` or `10-42`. `--lines` output itself is unchanged.
|
|
702
|
+
|
|
703
|
+
JSON also includes `repositoryBoundary`. Resolved results record the root,
|
|
704
|
+
repository-relative path, and resolution source. Unresolved results retain a
|
|
705
|
+
stable reason code and `candidateRoots`; structural ambiguity uses
|
|
706
|
+
`repository-boundary-ambiguous` instead of selecting a broad ancestor.
|
|
707
|
+
|
|
708
|
+
For a file target, Renma resolves a repository root from an explicit caller root,
|
|
709
|
+
the nearest safe `.git` file/directory or Renma config marker, or an unambiguous
|
|
710
|
+
structural boundary, in that order. Current-working-directory containment alone
|
|
711
|
+
does not establish a repository. This keeps nested repositories and absolute
|
|
712
|
+
targets outside the current directory deterministic without scanning an
|
|
713
|
+
unrelated parent tree.
|
|
644
714
|
|
|
645
715
|
### `readiness`
|
|
646
716
|
|
|
@@ -763,7 +833,17 @@ workflow, constraints, and completion criteria with platform-native guidance;
|
|
|
763
833
|
apply only intended metadata or migration changes; run
|
|
764
834
|
`renma scan . --fail-on high`; fix relevant diagnostics; and rerun the scan.
|
|
765
835
|
Context Asset output does not receive this Skill-specific authoring guidance.
|
|
766
|
-
JSON
|
|
836
|
+
JSON adds `classification`, `decisionStatus`, structured `decision` evidence,
|
|
837
|
+
and safe `nextActions` to the existing suggestion fields. Each action has
|
|
838
|
+
`kind` and `invocation`; execute `invocation.command` with the exact
|
|
839
|
+
`invocation.args` array. `invocation.display` is for people and must not be
|
|
840
|
+
parsed as the machine contract, including on paths with spaces, quotes, or
|
|
841
|
+
Windows separators.
|
|
842
|
+
|
|
843
|
+
When no repository root resolves, `decisionStatus` is `blocked` and Renma does
|
|
844
|
+
not emit an executable `scan .` action. Establish the repository root with an
|
|
845
|
+
explicit root or repository marker before verification; the caller's current
|
|
846
|
+
directory is not assumed to contain the target.
|
|
767
847
|
|
|
768
848
|
For Skill targets using the pre-0.16 Renma Skill format, the 0.16.0 metadata
|
|
769
849
|
migration path is one-way: recognized governance and security frontmatter
|
|
@@ -771,6 +851,8 @@ becomes Agent Skills identity plus `metadata.renma.*`. Separately, `skill.md` an
|
|
|
771
851
|
report any required entrypoint rename or move, even when their frontmatter
|
|
772
852
|
already uses Agent Skills fields. For a canonical Agent Skill, `--owner` may
|
|
773
853
|
instead propose an owner metadata retrofit; it never causes reverse migration.
|
|
854
|
+
Skill migration `sourcePath` and `targetPath` values are repository-relative,
|
|
855
|
+
including when the user invokes Renma from the parent of a nested repository.
|
|
774
856
|
The normative behavior is documented in
|
|
775
857
|
[Agent Skills Compatibility and Migration](agent-skills-compatibility.md).
|
|
776
858
|
|
|
@@ -785,7 +867,35 @@ invalid evidence, confirm the Skill's intent with platform-native authoring
|
|
|
785
867
|
guidance, correct the source evidence, rerun `suggest-metadata`, then validate
|
|
786
868
|
intended corrections with `renma scan . --fail-on high`.
|
|
787
869
|
|
|
788
|
-
Owner metadata remains recommended but not required. Without `--owner`,
|
|
870
|
+
Owner metadata remains recommended but not required. Without `--owner`, Renma
|
|
871
|
+
does not invent an owner. With `--owner <owner>`, the command may include that
|
|
872
|
+
owner because it was explicitly provided. If an existing asset already
|
|
873
|
+
declares an owner, `suggest-metadata` preserves it; a different `--owner` value
|
|
874
|
+
is treated as conflicting evidence and blocks a candidate. Renma does not infer
|
|
875
|
+
owners from Git history, file paths, prose, or authors.
|
|
876
|
+
If the explicit owner equals the existing canonical `metadata.renma.owner`, the
|
|
877
|
+
result is `suggestedMode: "no-proposal"` with
|
|
878
|
+
`decisionStatus: "no-change-recommended"`; no candidate metadata, canonical
|
|
879
|
+
frontmatter, or patch instruction is emitted.
|
|
880
|
+
|
|
881
|
+
Ordinary Skill-local support returns `suggestedMode: "no-proposal"` and
|
|
882
|
+
`decisionStatus: "no-change-recommended"` when it can inherit governance from
|
|
883
|
+
one resolved parent Skill. Its `candidateMetadata` is empty. A missing or
|
|
884
|
+
ambiguous parent returns `decisionStatus: "blocked"`, leaves governance
|
|
885
|
+
unowned or unresolved, and provides a scan/layout action instead of claiming
|
|
886
|
+
inheritance. Existing explicit local owner or policy metadata is preserved
|
|
887
|
+
under `skill-local-existing-metadata-preserved`; an explicit `--owner` can still
|
|
888
|
+
request a supported intentional override after the parent resolves. Prompt and
|
|
889
|
+
JSON output both distinguish the observed path fact, deterministic
|
|
890
|
+
interpretation, recommendation, and remaining human decision. Repository tools
|
|
891
|
+
and unknown paths never receive fabricated Context metadata candidates.
|
|
892
|
+
|
|
893
|
+
`decisionStatus` is authoritative: `blocked` never authorizes a patch,
|
|
894
|
+
`no-change-recommended` stops without a patch, `human-confirmation-required`
|
|
895
|
+
identifies what must be confirmed before applying only the candidate fields,
|
|
896
|
+
and `deterministic` permits the reviewed candidate. Consumers should include a
|
|
897
|
+
conservative default for unknown future `suggestedMode` values rather than
|
|
898
|
+
assuming every non-`no-proposal` value is applicable.
|
|
789
899
|
|
|
790
900
|
### `suggest-semantic-split`
|
|
791
901
|
|