renma 0.18.0 → 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.
Files changed (74) hide show
  1. package/CHANGELOG.md +101 -1
  2. package/README.md +61 -3
  3. package/architecture.md +7 -6
  4. package/design.md +39 -32
  5. package/dist/agent-skills.d.ts +5 -6
  6. package/dist/agent-skills.d.ts.map +1 -1
  7. package/dist/agent-skills.js +2 -10
  8. package/dist/agent-skills.js.map +1 -1
  9. package/dist/catalog.d.ts +27 -1
  10. package/dist/catalog.d.ts.map +1 -1
  11. package/dist/catalog.js +62 -16
  12. package/dist/catalog.js.map +1 -1
  13. package/dist/cli-help.d.ts +8 -8
  14. package/dist/cli-help.d.ts.map +1 -1
  15. package/dist/cli-help.js +19 -4
  16. package/dist/cli-help.js.map +1 -1
  17. package/dist/command-invocation.d.ts +4 -0
  18. package/dist/command-invocation.d.ts.map +1 -0
  19. package/dist/command-invocation.js +14 -0
  20. package/dist/command-invocation.js.map +1 -0
  21. package/dist/commands/inspect.d.ts +5 -0
  22. package/dist/commands/inspect.d.ts.map +1 -1
  23. package/dist/commands/inspect.js +185 -33
  24. package/dist/commands/inspect.js.map +1 -1
  25. package/dist/commands/scaffold.js +30 -9
  26. package/dist/commands/scaffold.js.map +1 -1
  27. package/dist/commands/suggest-metadata.d.ts +6 -2
  28. package/dist/commands/suggest-metadata.d.ts.map +1 -1
  29. package/dist/commands/suggest-metadata.js +516 -72
  30. package/dist/commands/suggest-metadata.js.map +1 -1
  31. package/dist/context-lens.d.ts +1 -0
  32. package/dist/context-lens.d.ts.map +1 -1
  33. package/dist/context-lens.js +19 -1
  34. package/dist/context-lens.js.map +1 -1
  35. package/dist/diagnostic-ids.d.ts +1 -0
  36. package/dist/diagnostic-ids.d.ts.map +1 -1
  37. package/dist/diagnostic-ids.js +1 -0
  38. package/dist/diagnostic-ids.js.map +1 -1
  39. package/dist/discovery.d.ts +33 -1
  40. package/dist/discovery.d.ts.map +1 -1
  41. package/dist/discovery.js +361 -51
  42. package/dist/discovery.js.map +1 -1
  43. package/dist/metadata.d.ts +15 -1
  44. package/dist/metadata.d.ts.map +1 -1
  45. package/dist/metadata.js +235 -0
  46. package/dist/metadata.js.map +1 -1
  47. package/dist/model.d.ts +5 -10
  48. package/dist/model.d.ts.map +1 -1
  49. package/dist/rules.js +69 -23
  50. package/dist/rules.js.map +1 -1
  51. package/dist/scanner.d.ts.map +1 -1
  52. package/dist/scanner.js +66 -2
  53. package/dist/scanner.js.map +1 -1
  54. package/dist/skill-migration.d.ts.map +1 -1
  55. package/dist/skill-migration.js +6 -1
  56. package/dist/skill-migration.js.map +1 -1
  57. package/dist/types.d.ts +72 -0
  58. package/dist/types.d.ts.map +1 -1
  59. package/dist/types.js +50 -1
  60. package/dist/types.js.map +1 -1
  61. package/docs/README.md +2 -1
  62. package/docs/agent-skills-compatibility.md +8 -1
  63. package/docs/authoring-guide.md +100 -13
  64. package/docs/context-lens.md +319 -153
  65. package/docs/diagnostics.md +385 -3
  66. package/docs/metadata-budget.md +32 -0
  67. package/docs/quality-profile.md +17 -5
  68. package/docs/user-manual.md +136 -14
  69. package/examples/context-lens/README.md +8 -3
  70. package/examples/context-lens/contexts/testing/boundary-value-analysis.md +6 -2
  71. package/examples/context-lens/lenses/testing/spec-review-boundary-values.md +27 -5
  72. package/examples/context-lens/lenses/testing/test-design-boundary-values.md +27 -5
  73. package/examples/context-lens/skills/testing/spec-review/SKILL.md +33 -4
  74. package/package.json +1 -1
@@ -1,46 +1,121 @@
1
1
  # Context Lens Assets
2
2
 
3
- `context_lens` is a Renma asset type for purpose-oriented interpretation over reusable context assets.
3
+ `context_lens` is Renma's asset kind for purpose-specific interpretation of one
4
+ or more declared Context Assets. Use a Lens when the same reusable knowledge
5
+ needs to be read with different questions, risks, evidence priorities, or
6
+ output expectations for a particular purpose.
4
7
 
5
- It keeps the Renma core boundary intact:
8
+ A Lens requires Context to interpret. Do not create a Context Lens when there
9
+ is no Context Asset to put in `applies_to`.
10
+
11
+ The governing model is:
6
12
 
7
13
  ```text
8
- LLM proposes. Renma verifies. Human approves.
14
+ Skill = focused task and workflow
15
+ Context Asset = durable reusable knowledge
16
+ Context Lens = purpose-specific interpretation of Context
9
17
  ```
10
18
 
11
- Renma catalogs and validates repository assets. Agents and tools decide what to do at runtime.
19
+ The design principles remain:
20
+
21
+ ```text
22
+ Knowledge should be reusable.
23
+ Interpretation should be purpose-oriented.
24
+ Execution should be skill-specific.
25
+ ```
26
+
27
+ A Lens should make an interpretation reproducible enough that another reviewer
28
+ or LLM can identify the same questions, risks, evidence, and expected output.
29
+ Renma can validate the declared structure and relationships, but it cannot
30
+ deterministically prove that this semantic guidance is professionally sound.
31
+
32
+ See [`examples/context-lens`](../examples/context-lens) for a runnable fixture
33
+ with two valid Lenses, a complete focused workflow, and zero scan findings.
34
+
35
+ ## The Problem A Lens Solves
12
36
 
13
- Renma does not select lenses for a task, rank lenses, assemble prompts, inject context, or run an LLM to judge lens quality.
37
+ A reusable Context Asset may support several purposes. For example, payment
38
+ retry rules can be interpreted for:
14
39
 
15
- ## Model
40
+ - specification review, emphasizing ambiguity and missing sources of truth;
41
+ - test design, emphasizing boundary values and expected results; or
42
+ - failure analysis, emphasizing observed symptoms and logs.
43
+
44
+ The base facts should not be copied into three Skills. Each Lens records one
45
+ purpose-specific way of reading the same facts, while each Skill retains its
46
+ focused task and workflow.
47
+
48
+ Use a direct relationship when no separate interpretation is needed:
16
49
 
17
50
  ```text
18
- references -> contexts -> context_lenses -> skills
51
+ Skill -> Context Asset
19
52
  ```
20
53
 
21
- The design principle is:
54
+ Use a Lens only when purpose-specific interpretation adds meaningful reusable
55
+ structure:
22
56
 
23
57
  ```text
24
- Knowledge should be reusable.
25
- Interpretation should be purpose-oriented.
26
- Execution should be skill-specific.
58
+ Skill -> Context Lens -> Context Asset
27
59
  ```
28
60
 
29
- Use this split when the same base context should be read differently for different purposes.
61
+ These are static repository relationships, not a runtime loading pipeline.
30
62
 
31
- For example, a payment retry context can support:
63
+ ## Placement Decision
32
64
 
33
- - a spec review lens that focuses on ambiguity and source-of-truth gaps
34
- - a test design lens that focuses on boundary values and expected results
35
- - a failure analysis lens that focuses on observed symptoms and logs
65
+ Before creating an asset, apply this sequence:
36
66
 
37
- The base context remains reusable. The lens explains how that context should be interpreted for a purpose.
67
+ 1. Is this the task, workflow, or completion contract? Put it in the Skill.
68
+ 2. Is this durable, reusable, source-backed knowledge? Create or reuse a
69
+ Context Asset.
70
+ 3. Does declared Context need to be interpreted differently for a specific
71
+ purpose? Create a Context Lens.
72
+ 4. Is this a Skill-local overlay or execution variant? Use a Profile if the
73
+ current Profile semantics fit.
74
+ 5. Is this supporting detail used by only one Skill? Use a Reference.
75
+ 6. Is this a local fixture or demonstration? Use an Example.
76
+ 7. Is this only generic persona or tone framing? Usually keep it local; do not
77
+ create an asset solely for the persona.
38
78
 
39
- See [`examples/context-lens`](../examples/context-lens) for a runnable fixture with two valid lenses, readiness output, inspect output, and an invalid diagnostic example.
79
+ If review criteria apply only to one workflow and do not interpret reusable
80
+ Context, keep them in the Skill body, a Skill-local Reference, or a Skill-local
81
+ Profile when they genuinely form an overlay or variant.
40
82
 
41
- ## Minimal Valid Lens
83
+ ## Lens Fields And Body
42
84
 
43
- A minimal valid lens declares a stable ID, owner, purpose, and at least one `applies_to` target.
85
+ Prefer compact, flat frontmatter. Detailed interpretation belongs in the
86
+ Markdown body rather than turning metadata into a prompt template.
87
+
88
+ - `id`: required stable Lens ID. Prefer a `lens.<domain>.<purpose>` style.
89
+ - `type`: recommended `context_lens` discriminator. It is optional under
90
+ `lenses/**` and required when a Lens is stored under `context/**` or
91
+ `contexts/**`.
92
+ - `owner`: required accountable owner.
93
+ - `status`: optional lifecycle state: `experimental`, `stable`, `deprecated`,
94
+ or `archived`.
95
+ - `version`: optional schema version. The supported Lens schema version is `1`.
96
+ - `scope`: optional scope. The supported value is `context`.
97
+ - `purpose`: required short label for why the Context is being interpreted,
98
+ such as `spec_review`, `test_design`, or `failure_analysis`.
99
+ - `applies_to`: required list of existing Context Asset IDs or
100
+ repository-relative paths. These are the assets the Lens interprets.
101
+ - `focus`: optional compact list of questions, risks, checks, or evidence themes
102
+ to emphasize.
103
+ - `expected_outputs`: optional compact list of outputs the interpretation should
104
+ shape.
105
+
106
+ The Markdown body should explain how to apply those fields. It may provide a
107
+ brief professional framing, then should define concrete interpretation
108
+ questions, important risks, evidence expectations, prioritization rules, and
109
+ the expected output. It should not copy the Context or take over the Skill's
110
+ ordered workflow and completion contract.
111
+
112
+ Deprecated aliases such as `target`, `targets`, `output`, and `outputs` produce
113
+ warnings. Use `applies_to` and `expected_outputs`.
114
+
115
+ ## Minimal Structural Example
116
+
117
+ A minimal valid Lens declares a stable ID, owner, purpose, and at least one real
118
+ `applies_to` target:
44
119
 
45
120
  ```yaml
46
121
  ---
@@ -54,164 +129,230 @@ applies_to:
54
129
  ---
55
130
  # Spec Review Lens for Boundary Values
56
131
 
57
- Review the boundary value analysis context for ambiguity, missing limits, and unclear sources of truth.
132
+ Review the boundary-value Context for ambiguity, missing limits, and unclear
133
+ sources of truth. Cite the specification evidence behind each finding.
58
134
  ```
59
135
 
60
- `type: context_lens` is optional for files under `lenses/**`, but it is recommended because it makes the file's intent obvious in code review. It is required when a lens is stored under `context/**` or `contexts/**`.
136
+ This is structurally valid only when the target resolves to a Context Asset. It
137
+ is useful only if the body makes the purpose-specific interpretation concrete
138
+ enough for review.
139
+
140
+ ## Persona Framing Is Not A Lens
141
+
142
+ A persona may frame a Lens, but a persona alone does not define one.
61
143
 
62
- ## Multiple Lenses
144
+ Do not create a Lens that says only “Act as a senior QA engineer.” Describe the
145
+ concrete questions, risks, checks, evidence, and expected outputs that the
146
+ professional perspective implies.
63
147
 
64
- Multiple lenses can interpret the same base context for different review purposes:
148
+ ### Insufficient Lens
149
+
150
+ ```markdown
151
+ # Senior QA Engineer Lens
152
+
153
+ Act as a senior QA engineer.
154
+ ```
155
+
156
+ This is insufficient because it:
157
+
158
+ - does not identify what Context is being interpreted;
159
+ - does not define a useful purpose;
160
+ - does not identify review questions or risks;
161
+ - does not say what evidence should be emphasized;
162
+ - does not define an expected output; and
163
+ - can become generic prompt-role wording rather than a reusable interpretation
164
+ asset.
165
+
166
+ ### Better Lens
167
+
168
+ The following Context Asset and Lens use repository-defined example IDs. They
169
+ are not built into Renma. An author must create or identify the real Context
170
+ Asset before declaring it in `applies_to`.
171
+
172
+ The complete responsibility chain is:
173
+
174
+ ```text
175
+ Context Asset -> reusable test-quality knowledge
176
+ Context Lens -> test-code-review interpretation criteria
177
+ Skill -> review task and output contract
178
+ ```
179
+
180
+ #### Example Context Asset
65
181
 
66
182
  ```yaml
67
183
  ---
68
- id: lens.testing.spec-review.boundary-values
69
- type: context_lens
184
+ id: context.testing.test-quality
70
185
  owner: qa-platform
71
- status: experimental
72
- purpose: spec_review
73
- applies_to:
74
- - context.testing.boundary-value-analysis
75
- focus:
76
- - ambiguity
77
- - missing boundary
78
- expected_outputs:
79
- - unresolved questions
80
- - risk notes
186
+ status: stable
187
+ when_to_use:
188
+ - Reviewing automated test design or implementation quality
189
+ when_not_to_use:
190
+ - Reviewing application behavior without test-quality concerns
81
191
  ---
192
+ # Test Quality
193
+
194
+ Reliable automated tests trace assertions to intended requirements, avoid
195
+ false confidence, behave deterministically, isolate unrelated state, and emit
196
+ failure evidence that helps distinguish product defects from test defects.
82
197
  ```
83
198
 
199
+ This Context Asset owns the reusable test-quality knowledge. A Skill may use it
200
+ directly, or use the following Lens when test-code-review interpretation adds
201
+ reusable structure.
202
+
203
+ #### Context Lens Over The Example Asset
204
+
84
205
  ```yaml
85
206
  ---
86
- id: lens.testing.test-design.boundary-values
207
+ id: lens.testing.test-code-review.quality
87
208
  type: context_lens
88
209
  owner: qa-platform
89
210
  status: experimental
90
- purpose: test_design
211
+ purpose: test_code_review
91
212
  applies_to:
92
- - context.testing.boundary-value-analysis
213
+ - context.testing.test-quality
93
214
  focus:
94
- - inclusive limits
95
- - zero and empty values
96
- - overflow behavior
215
+ - requirement coverage
216
+ - false-positive and false-negative risk
217
+ - determinism
218
+ - test isolation
219
+ - failure diagnosability
97
220
  expected_outputs:
98
- - test cases
99
- - edge-case checklist
221
+ - prioritized findings
222
+ - evidence-backed rationale
223
+ - recommended corrections
100
224
  ---
101
- ```
225
+ # Test Code Review Quality Lens
102
226
 
103
- A skill declares static lens relationships with `requires_lens` or `optional_lens`:
227
+ Evaluate the applied test-quality Context from the perspective of an
228
+ experienced QA engineer responsible for release confidence.
104
229
 
105
- ```yaml
106
- ---
107
- id: skill.testing.spec-review
108
- owner: qa-platform
109
- status: experimental
110
- requires_context:
111
- - context.testing.boundary-value-analysis
112
- requires_lens:
113
- - lens.testing.spec-review.boundary-values
114
- ---
230
+ ## Interpretation Criteria
231
+
232
+ - Determine whether each test verifies the intended requirement rather than
233
+ merely exercising code.
234
+ - Identify assertions or missing checks that can produce false confidence,
235
+ false positives, or false negatives.
236
+ - Examine whether timing and synchronization assumptions are deterministic.
237
+ - Check whether tests are isolated from unrelated state and ordering.
238
+ - Distinguish product defects from test implementation defects when analyzing
239
+ failures.
240
+ - Prefer failure output that identifies the violated requirement and likely
241
+ underlying cause.
242
+
243
+ ## Evidence And Output
244
+
245
+ Cite relevant code, requirements, repository guidance, or observed failure
246
+ evidence. Produce prioritized findings with rationale and recommended
247
+ corrections; keep unresolved assumptions explicit.
115
248
  ```
116
249
 
117
- These fields create catalog and graph relationships. They do not make Renma choose runtime context or inject the lens into an agent.
250
+ The framing sentence is optional. The concrete criteria and evidence contract
251
+ are what make the Lens useful.
118
252
 
119
- ## Supported Fields
253
+ The important boundary is:
120
254
 
121
- Prefer compact, flat metadata. Detailed interpretation guidance belongs in the Markdown body, not in frontmatter.
255
+ ```text
256
+ Skill defines the review task.
257
+ Lens defines what purpose-specific review judgment means when interpreting Context.
258
+ ```
122
259
 
123
- - `id`: required stable lens ID. Prefer the `lens.<domain>.<purpose>` prefix style.
124
- - `type`: recommended `context_lens` discriminator.
125
- - `owner`: required accountable owner.
126
- - `status`: optional lifecycle status: `experimental`, `stable`, `deprecated`, or `archived`.
127
- - `version`: optional lens schema version. The supported schema version is `1`.
128
- - `scope`: optional lens scope. The supported scope is `context`.
129
- - `purpose`: required short purpose label such as `spec_review`, `test_design`, or `failure_analysis`.
130
- - `applies_to`: required context asset IDs or repository-relative paths this lens interprets.
131
- - `focus`: optional compact review focus terms.
132
- - `expected_outputs`: optional compact output expectations.
260
+ ## How A Lens Differs From Adjacent Assets
133
261
 
134
- Deprecated field aliases such as `target`, `targets`, `output`, and `outputs` produce warnings. Use `applies_to` and `expected_outputs`.
262
+ | Asset or responsibility | What it owns |
263
+ | --- | --- |
264
+ | Skill | Focused task or workflow: activation boundaries, inputs, ordered instructions, decisions, constraints, verification, output, and completion criteria |
265
+ | Context Asset | Durable, reusable, source-backed knowledge with independent ownership and lifecycle |
266
+ | Context Lens | Purpose-specific interpretation of one or more declared Context Assets |
267
+ | Profile | Skill-local overlay or variant when current Profile semantics fit |
268
+ | Reference | Supporting detail owned and loaded by one Skill |
269
+ | Example | Skill-local example, fixture, or demonstration |
270
+ | External agent or runtime | Live asset selection, loading or injection, prompt assembly, tool execution, and application of the finished workflow |
135
271
 
136
- ## Diagnostics
272
+ A schema-valid Lens can still be semantically weak. Renma can prove that an ID,
273
+ owner, purpose, and `applies_to` relationship to a Context Asset exist. It
274
+ cannot prove that vague focus words, generic persona language, or an
275
+ underspecified body capture useful professional judgment. That quality remains
276
+ an authoring and human-review responsibility; Renma does not call an LLM or add
277
+ subjective Lens scores.
137
278
 
138
- Context Lens governance diagnostics use stable string codes in JSON output. The detailed diagnostics appear in `scan` and `readiness`; concise summaries appear in `readiness` and `inspect`.
279
+ ## Canonical Skill Relationships
139
280
 
140
- Invalid example:
281
+ A canonical Agent Skills `SKILL.md` declares Renma relationships as flat,
282
+ string-valued `metadata.renma.*` fields. List values are JSON-array strings:
141
283
 
142
284
  ```yaml
143
285
  ---
144
- id: lens.testing.spec-review.boundary-values
145
- owner: qa-platform
146
- applies_to:
147
- - ./contexts/testing/missing.md
286
+ name: spec-review
287
+ description: Review specifications for ambiguity and missing boundaries. Use when requirements need evidence-backed review before implementation.
288
+ metadata:
289
+ renma.id: skill.testing.spec-review
290
+ renma.owner: qa-platform
291
+ renma.status: experimental
292
+ renma.requires-context: '["context.testing.boundary-value-analysis"]'
293
+ renma.requires-lens: '["lens.testing.spec-review.boundary-values"]'
294
+ renma.optional-lens: '[]'
148
295
  ---
149
- # Spec Review Lens
150
296
  ```
151
297
 
152
- Expected diagnostics include:
298
+ Do not use pre-0.16 top-level Skill metadata in current examples. The
299
+ `metadata.renma.*` relationships create catalog and graph evidence; they do not
300
+ make Renma select a Lens, load Context, or inject either into an agent.
153
301
 
154
- - `CONTEXT-LENS-MISSING-REQUIRED-FIELD` because `purpose` is missing.
155
- - `CONTEXT-LENS-PATH-NORMALIZATION-MISMATCH` because `./contexts/testing/missing.md` normalizes to `contexts/testing/missing.md`.
156
- - `CONTEXT-LENS-TARGET-NOT-FOUND` because the target path does not resolve to a cataloged asset.
157
-
158
- Blocking Context Lens diagnostics are `error` diagnostics. Warnings are reported by default but do not fail readiness unless another policy makes the repository not ready.
159
-
160
- ## Readiness And Inspect
161
-
162
- `renma readiness --json` includes an additive `summary.contextLens` object:
163
-
164
- ```json
165
- {
166
- "summary": {
167
- "contextLens": {
168
- "enabled": true,
169
- "detected": true,
170
- "totalLensCount": 2,
171
- "validLensCount": 2,
172
- "invalidLensCount": 0,
173
- "diagnosticCounts": {
174
- "error": 0,
175
- "warning": 0,
176
- "info": 0
177
- }
178
- }
179
- }
180
- }
181
- ```
302
+ ## Runtime Responsibility Boundary
182
303
 
183
- Markdown readiness includes a `Context Lens` section with lens counts, diagnostic counts, a representative diagnostic code, definition paths, and target references.
304
+ Renma catalogs and validates repository assets. An external agent or runtime:
184
305
 
185
- `renma inspect <file> --format text` includes a concise Context Lens summary:
306
+ - selects relevant assets for a live task;
307
+ - loads or injects Context and Lens content;
308
+ - assembles prompts;
309
+ - executes tools and the focused Skill workflow; and
310
+ - applies or presents the result.
311
+
312
+ Renma does not select or rank Lenses, assemble prompts, inject Context, execute
313
+ a Skill, infer semantic intent, or use an LLM to judge Lens quality.
186
314
 
187
315
  ```text
188
- Context Lens:
189
- - Enabled: yes
190
- - Detected: yes
191
- - Lenses: 2/2 valid (0 invalid)
192
- - Diagnostics: error 0, warning 0, info 0
193
- - Representative diagnostic: (none)
194
- - Definition paths: lenses/testing/spec-review-boundary-values.md, lenses/testing/test-design-boundary-values.md
195
- - Target references: context.testing.boundary-value-analysis
316
+ LLM proposes. Renma verifies. Human approves.
196
317
  ```
197
318
 
198
- `renma inspect <file> --format json` includes the same additive `contextLens` summary object.
319
+ ## Diagnostics, Readiness, And Inspect
199
320
 
200
- ## CI Usage
321
+ Context Lens governance diagnostics use stable string codes in `scan` and
322
+ `readiness`. Blocking `error` diagnostics include missing required fields,
323
+ duplicate Lens IDs, unresolved `applies_to` targets, and resolved targets that
324
+ are not Context Assets. Warnings are reported for review but do not fail
325
+ readiness unless another policy makes the repository not ready.
201
326
 
202
- Use readiness in CI when Context Lens governance should block merges:
327
+ For example, this invalid definition is missing `purpose`, uses a path that
328
+ normalizes differently, and targets no cataloged asset:
203
329
 
204
- ```bash
205
- renma readiness . --json
330
+ ```yaml
331
+ ---
332
+ id: lens.testing.spec-review.boundary-values
333
+ owner: qa-platform
334
+ applies_to:
335
+ - ./contexts/testing/missing.md
336
+ ---
337
+ # Spec Review Lens
206
338
  ```
207
339
 
208
- The command exits `1` when readiness is not ready, including when blocking Context Lens diagnostics are present.
340
+ Expected diagnostics include:
341
+
342
+ - `CONTEXT-LENS-MISSING-REQUIRED-FIELD`;
343
+ - `CONTEXT-LENS-PATH-NORMALIZATION-MISMATCH`; and
344
+ - `CONTEXT-LENS-TARGET-NOT-FOUND`.
209
345
 
210
- For pull-request review artifacts, `renma ci-report` continues to report deterministic catalog, graph, readiness, finding, and security deltas. It does not call an LLM or make subjective lens-quality judgments.
346
+ `renma readiness --json` exposes Lens counts and diagnostics under
347
+ `summary.contextLens`; Markdown readiness includes a `Context Lens` section.
348
+ `renma inspect <file> --format text` shows the definition paths, targets, and
349
+ static graph neighborhood. These views report repository evidence, not runtime
350
+ use.
211
351
 
212
- ## Authoring Helpers
352
+ ## Authoring And Verification
213
353
 
214
- Use `scaffold` to create a compact starter lens:
354
+ Use `scaffold` for a starter, then replace every placeholder with
355
+ repository-grounded values:
215
356
 
216
357
  ```bash
217
358
  renma scaffold context_lens lenses/testing/spec-review-boundary-values.md \
@@ -221,33 +362,58 @@ renma scaffold context_lens lenses/testing/spec-review-boundary-values.md \
221
362
  --tags testing,spec-review
222
363
  ```
223
364
 
224
- Use `inspect` on a lens to review its purpose metadata and declared graph neighborhood. Lens inspection shows inbound skill references, outbound `applies_to` context targets, and the static `skill -> lens -> context` chain.
225
-
226
- ## Good Lens Boundaries
227
-
228
- A lens should answer:
229
-
230
- - What purpose is this context being read for?
231
- - Which context assets does it apply to?
232
- - What questions, risks, checks, or evidence should be emphasized?
233
- - What output shape should the agent or human reviewer produce?
365
+ Before review:
234
366
 
235
- A lens should not become:
367
+ 1. Replace `purpose`, every `applies_to` target, `focus`, and
368
+ `expected_outputs`.
369
+ 2. Confirm that each target is an existing Context Asset and that the Lens adds
370
+ meaningful interpretation rather than copying it.
371
+ 3. Keep the focused workflow in the Skill and reusable knowledge in Context.
372
+ 4. Replace persona-only wording with concrete criteria, evidence expectations,
373
+ and outputs.
374
+ 5. Run:
236
375
 
237
- - a copy of the base context
238
- - a long prompt template
239
- - a runtime routing rule
240
- - a QA-specific rule hardcoded into Renma core
241
- - a replacement for the skill entrypoint
242
-
243
- ## Non-Goals For 0.12.0
244
-
245
- Renma 0.12.0 intentionally does not implement:
246
-
247
- - runtime selection
248
- - prompt assembly
249
- - context injection
250
- - automatic LLM judgment or subjective scoring
251
- - external signal imports from Codex, Claude, IDEs, or similar tools
376
+ ```bash
377
+ renma scan . --fail-on high
378
+ renma catalog . --format markdown
379
+ renma graph . --view layered --format mermaid
380
+ renma readiness . --format markdown
381
+ ```
252
382
 
253
- The release stabilizes deterministic Context Lens governance: summary output, diagnostics, readiness integration, inspect integration, docs, and examples.
383
+ The final semantic decision belongs to a human reviewer.
384
+
385
+ ## Zero-Context Classification Self-Check
386
+
387
+ An unfamiliar author or LLM should classify these cases as follows:
388
+
389
+ 1. Payment retry rules and retry limits → **Context Asset**, because they are
390
+ durable domain knowledge that may support several workflows.
391
+ 2. Review a test implementation and produce prioritized findings → **Skill**,
392
+ because this is the focused task and output contract.
393
+ 3. Emphasize false-confidence risk, determinism, isolation, and diagnosability
394
+ while interpreting shared test-quality guidance → **Context Lens**, because
395
+ it defines purpose-specific interpretation of declared reusable Context.
396
+ 4. “Act as a senior QA engineer” → **insufficient by itself**; it may be brief
397
+ local framing, but it does not define concrete interpretation criteria.
398
+ 5. A strict Skill-local review variant → **Profile**, when the current Profile
399
+ overlay semantics fit.
400
+ 6. Detailed framework-specific notes used only by one review Skill →
401
+ **Reference**, because the detail is locally owned and loaded.
402
+ 7. Select the most relevant Lens dynamically for the current task → **external
403
+ agent or runtime**, because Renma core and Lens assets do not perform live
404
+ selection.
405
+
406
+ ## Current Non-Goals
407
+
408
+ Renma does not implement:
409
+
410
+ - runtime Lens or Context selection;
411
+ - prompt assembly or Context injection;
412
+ - Skill or tool execution;
413
+ - automatic semantic inference;
414
+ - automatic LLM judgment or subjective Lens scoring; or
415
+ - external runtime signal imports from agents, IDEs, or similar tools.
416
+
417
+ Context Lens support remains deterministic repository governance: discovery,
418
+ metadata and relationship validation, diagnostics, readiness, inspect, graph,
419
+ documentation, and examples.