renma 0.18.0 → 0.18.1

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 (40) hide show
  1. package/CHANGELOG.md +30 -1
  2. package/README.md +1 -1
  3. package/architecture.md +7 -6
  4. package/design.md +39 -32
  5. package/dist/cli-help.d.ts +4 -4
  6. package/dist/cli-help.d.ts.map +1 -1
  7. package/dist/cli-help.js +14 -1
  8. package/dist/cli-help.js.map +1 -1
  9. package/dist/commands/scaffold.js +30 -9
  10. package/dist/commands/scaffold.js.map +1 -1
  11. package/dist/context-lens.d.ts +1 -0
  12. package/dist/context-lens.d.ts.map +1 -1
  13. package/dist/context-lens.js +19 -1
  14. package/dist/context-lens.js.map +1 -1
  15. package/dist/diagnostic-ids.d.ts +1 -0
  16. package/dist/diagnostic-ids.d.ts.map +1 -1
  17. package/dist/diagnostic-ids.js +1 -0
  18. package/dist/diagnostic-ids.js.map +1 -1
  19. package/dist/metadata.d.ts +15 -1
  20. package/dist/metadata.d.ts.map +1 -1
  21. package/dist/metadata.js +235 -0
  22. package/dist/metadata.js.map +1 -1
  23. package/dist/model.d.ts +3 -0
  24. package/dist/model.d.ts.map +1 -1
  25. package/dist/model.js.map +1 -1
  26. package/dist/rules.js +69 -23
  27. package/dist/rules.js.map +1 -1
  28. package/docs/README.md +2 -1
  29. package/docs/authoring-guide.md +38 -13
  30. package/docs/context-lens.md +319 -153
  31. package/docs/diagnostics.md +3 -1
  32. package/docs/metadata-budget.md +32 -0
  33. package/docs/quality-profile.md +17 -5
  34. package/docs/user-manual.md +14 -2
  35. package/examples/context-lens/README.md +8 -3
  36. package/examples/context-lens/contexts/testing/boundary-value-analysis.md +6 -2
  37. package/examples/context-lens/lenses/testing/spec-review-boundary-values.md +27 -5
  38. package/examples/context-lens/lenses/testing/test-design-boundary-values.md +27 -5
  39. package/examples/context-lens/skills/testing/spec-review/SKILL.md +33 -4
  40. package/package.json +1 -1
@@ -5,7 +5,7 @@ the active profile as `renma-quality@<Renma package version>`, derived from
5
5
  `package.json` at build time. The source is `src/quality-profile.ts`. The current
6
6
  implementation does not expose quality overrides in `renma.config.json`; fixed
7
7
  defaults preserve comparable repository reports. The internal shape is
8
- versioned so later releases can add reviewed overrides without scattering
8
+ versioned so later releases can add declared overrides without scattering
9
9
  constants across rules.
10
10
 
11
11
  `estimated_tokens` means Renma's deterministic, model-neutral estimate. Latin
@@ -14,6 +14,18 @@ grouped in two-code-point units; other punctuation is grouped in units of up to
14
14
  three code points. It is not an exact token count for any model. Skill budgets
15
15
  measure Markdown after frontmatter. Content-asset budgets measure the full file.
16
16
 
17
+ Contexts, references, profiles, and examples may record a declared human
18
+ decision and effective limit with top-level `token_budget_override` and
19
+ `token_budget_rationale` metadata. The override must be a positive safe integer
20
+ greater than the asset kind's unchanged default. Optional
21
+ `token_budget_reviewed_at` must be a real `YYYY-MM-DD` date. Renma does not add
22
+ these fields automatically. When an asset exceeds its default, an agent should
23
+ first ask whether it can be split along meaningful boundaries without harming
24
+ coherence or execution order, and split only after the user agrees. An override
25
+ is appropriate only when the user confirms the long-form asset is intentionally
26
+ coherent or ordered; it is not a general ignore mechanism. Renma validates the
27
+ declaration but cannot prove that human review occurred.
28
+
17
29
  ## Agent Skills requirements and recommendations
18
30
 
19
31
  | Field | Value | Unit and trigger | Severity | Source | Rationale and false-positive risk | Diagnostic | Reviewed | Configurable later |
@@ -39,10 +51,10 @@ and `assets/` directories are valid. See the official
39
51
  | `descriptionMinChars` | 0 | characters; disabled | none | Renma | Length does not establish selection clarity | `QUAL-SHORT-DESCRIPTION` removed from default behavior | 0.18.0 | possibly |
40
52
  | `skillTokenWarn` | 2,000 | `estimated_tokens`; body above | low | Renma | Early progressive-disclosure review; focused workflows may exceed it | `QUAL-SKILL-TOKEN-BUDGET` | 0.18.0 | possibly |
41
53
  | `skillTokenStrongWarn` | 5,000 | `estimated_tokens`; body above | medium | Agent Skills recommendation with Renma severity | Stronger review, not a required split | `QUAL-SKILL-TOKEN-BUDGET` | 0.18.0 | possibly |
42
- | `contentTokenWarn.context` | 4,000 | `estimated_tokens`; full file above | low | Renma | Review coherent scope; size alone is insufficient | `QUAL-SUPPORT-ASSET-TOKEN-BUDGET` | 0.18.0 | possibly |
43
- | `contentTokenWarn.reference` | 5,000 | same | low | Renma | Detailed local references may legitimately be long | same | 0.18.0 | possibly |
44
- | `contentTokenWarn.profile` | 2,000 | same | low | Renma | Profiles should remain reviewable overlays | same | 0.18.0 | possibly |
45
- | `contentTokenWarn.example` | 2,500 | same | low | Renma | Complete examples may legitimately be long | same | 0.18.0 | possibly |
54
+ | `contentTokenWarn.context` | 4,000 | `estimated_tokens`; full file above effective limit | low | Renma | Prefer an agreed semantic split when coherence survives; intentionally coherent or ordered assets may record a declared decision | `QUAL-SUPPORT-ASSET-TOKEN-BUDGET` | 0.18.1 | metadata only after human decision |
55
+ | `contentTokenWarn.reference` | 5,000 | same | low | Renma | Detailed local references may legitimately be long | same | 0.18.1 | same |
56
+ | `contentTokenWarn.profile` | 2,000 | same | low | Renma | Profiles should remain reviewable overlays | same | 0.18.1 | same |
57
+ | `contentTokenWarn.example` | 2,500 | same | low | Renma | Complete examples may legitimately be long | same | 0.18.1 | same |
46
58
  | `lowHeadingDensityMinTokens` | 400 | body `estimated_tokens`, with fewer than 2 headings | low | Renma | Long prose can still be intentionally linear | `QUAL-LOW-HEADING-DENSITY` | 0.18.0 | possibly |
47
59
  | `lowHeadingDensityMinHeadings` | 2 | headings | low | Renma | Navigation heuristic only | same | 0.18.0 | possibly |
48
60
 
@@ -711,7 +711,9 @@ Renma does not infer owners automatically. If an asset is unowned, choose an own
711
711
 
712
712
  ### `scaffold`
713
713
 
714
- Creates a starter skill or context asset.
714
+ Creates starter assets with distinct responsibilities: a Skill is a focused
715
+ workflow entrypoint, Context is durable reusable knowledge, and a Context Lens
716
+ is purpose-specific interpretation of one or more declared Context Assets.
715
717
 
716
718
  ```bash
717
719
  renma scaffold skill skills/testing/spec-review/SKILL.md --owner qa-platform
@@ -720,7 +722,17 @@ renma scaffold context_lens lenses/testing/spec-review-boundary-values.md --owne
720
722
  renma scaffold skill skills/testing/spec-review/SKILL.md --owner qa-platform --format prompt
721
723
  ```
722
724
 
723
- `scaffold --format file` writes a starter file, `--format prompt` emits an authoring prompt, and `--format json` emits structured scaffold data. The generated content is intentionally minimal; fill in metadata, dependencies, and verification steps before depending on it in automation.
725
+ `scaffold --format file` writes a starter file, `--format prompt` emits an
726
+ authoring prompt, and `--format json` emits structured scaffold data. The
727
+ generated content is intentionally minimal; fill in metadata, dependencies, and
728
+ verification steps before depending on it in automation.
729
+
730
+ For a Context Lens, replace every placeholder `purpose`, `applies_to`, `focus`,
731
+ and `expected_outputs` value with repository-grounded content. Every
732
+ `applies_to` target must resolve to a real Context Asset. Do not use a Lens as
733
+ generic persona storage, a prompt template, or a runtime routing rule, and do
734
+ not create one when there is no Context Asset to interpret. See the
735
+ [Context Lens guide](context-lens.md) for the canonical decision model.
724
736
 
725
737
  For a Skill, use platform-native authoring guidance before and after scaffolding.
726
738
  File mode prints concise Skill-only next steps after the `Created` line. Prompt
@@ -15,9 +15,11 @@ It includes:
15
15
  [`SKILL.md`](skills/testing/spec-review/SKILL.md) with static required and
16
16
  optional Lens relationships.
17
17
 
18
- The Skill is a thin routing and workflow layer. The Context Asset owns reusable
19
- boundary-value knowledge. Each Lens explains how to apply that knowledge for a
20
- particular purpose without copying it into the Skill.
18
+ The Skill is a complete focused workflow entrypoint: it defines selection
19
+ boundaries, inputs, ordered review steps, output, validation, and completion.
20
+ The Context Asset owns reusable boundary-value knowledge. Each Lens explains
21
+ how to interpret that knowledge for a particular purpose without copying it
22
+ into the Skill.
21
23
 
22
24
  ```text
23
25
  Skill -> Context Lens -> Context Asset
@@ -71,6 +73,9 @@ Review the boundary-value Context for ambiguity and missing limits.
71
73
  ```
72
74
 
73
75
  The supported Lens schema version is `1`; the supported scope is `context`.
76
+ Structural validity is only the starting point. A useful Lens also defines
77
+ concrete questions, risks, checks, evidence, and expected outputs. Persona-only
78
+ wording such as “Act as a senior QA engineer” is not sufficient by itself.
74
79
 
75
80
  ## Diagnostic Illustration
76
81
 
@@ -18,6 +18,10 @@ requires_human_approval: false
18
18
  ---
19
19
  # Boundary Value Analysis
20
20
 
21
- Boundary value analysis is reusable testing knowledge. It should stay as a base context asset because it can support spec review, test design, regression planning, onboarding, and other skills.
21
+ Boundary value analysis is reusable testing knowledge. It should stay as a base
22
+ Context Asset because it can support spec review, test design, regression
23
+ planning, onboarding, and other Skills.
22
24
 
23
- Keep task-specific interpretation in context lens assets instead of copying this content into each skill.
25
+ When several workflows need reusable purpose-specific interpretation, keep that
26
+ interpretation in Context Lenses instead of copying this knowledge into each
27
+ Skill. A Skill may reference this Context directly when no Lens adds value.
@@ -11,8 +11,15 @@ tags:
11
11
  purpose: spec_review
12
12
  applies_to:
13
13
  - context.testing.boundary-value-analysis
14
- focus: ambiguity, missing boundary, source of truth, confirmation questions
15
- expected_outputs: unresolved questions, risk notes, spec clarification suggestions
14
+ focus:
15
+ - ambiguity
16
+ - missing boundary
17
+ - source of truth
18
+ - confirmation questions
19
+ expected_outputs:
20
+ - unresolved questions
21
+ - risk notes
22
+ - spec clarification suggestions
16
23
  allowed_data:
17
24
  - repo-local-files
18
25
  network_allowed: false
@@ -22,8 +29,23 @@ requires_human_approval: false
22
29
  ---
23
30
  # Spec Review Lens for Boundary Values
24
31
 
25
- Use this lens when reading boundary value analysis context during spec review.
32
+ Interpret the applied boundary-value Context from the perspective of an
33
+ experienced QA reviewer responsible for finding specification risk before
34
+ implementation.
26
35
 
27
- Emphasize whether the spec defines exact lower and upper bounds, inclusive or exclusive behavior, empty or zero cases, overflow handling, retry limits, and ownership of the source of truth.
36
+ ## Interpretation Criteria
28
37
 
29
- The lens should help produce review questions and risk notes. It should not duplicate the base boundary value analysis context or become a prompt template.
38
+ - Determine whether each material limit has an exact value and an identified
39
+ source of truth.
40
+ - Check whether lower and upper bounds are inclusive or exclusive and whether
41
+ empty, zero, overflow, and retry-limit behavior is specified.
42
+ - Identify conflicting requirements, undefined ownership, and assumptions that
43
+ could lead implementations or tests to disagree.
44
+ - Distinguish documented facts from inferred behavior and unresolved decisions.
45
+
46
+ ## Evidence And Output
47
+
48
+ Cite the specification section or repository source behind every conclusion.
49
+ Produce prioritized unresolved questions, risk notes, and clarification
50
+ suggestions. Do not duplicate the base Context, define the Skill workflow, or
51
+ turn this Lens into a prompt template.
@@ -11,8 +11,15 @@ tags:
11
11
  purpose: test_design
12
12
  applies_to:
13
13
  - context.testing.boundary-value-analysis
14
- focus: inclusive limits, empty and zero values, overflow behavior, retry limits
15
- expected_outputs: test cases, edge-case checklist, coverage notes
14
+ focus:
15
+ - inclusive limits
16
+ - empty and zero values
17
+ - overflow behavior
18
+ - retry limits
19
+ expected_outputs:
20
+ - test cases
21
+ - edge-case checklist
22
+ - coverage notes
16
23
  allowed_data:
17
24
  - repo-local-files
18
25
  network_allowed: false
@@ -22,8 +29,23 @@ requires_human_approval: false
22
29
  ---
23
30
  # Test Design Lens for Boundary Values
24
31
 
25
- Use this lens when turning boundary value analysis context into concrete test coverage.
32
+ Interpret the applied boundary-value Context for test design that provides
33
+ reviewable evidence of behavior at and around material limits.
26
34
 
27
- Emphasize lower and upper bounds, inclusive and exclusive behavior, empty input, zero values, overflow, maximum retries, and expected failure modes.
35
+ ## Interpretation Criteria
28
36
 
29
- The lens should help produce test cases and coverage notes. It should not select runtime context, assemble a prompt, or duplicate the base boundary value analysis context.
37
+ - Map each declared limit to cases below, at, and above the boundary when those
38
+ states are valid for the system.
39
+ - Distinguish inclusive from exclusive behavior and cover empty input, zero
40
+ values, overflow, maximum retries, and expected failure modes when applicable.
41
+ - Trace each proposed case to a stated requirement and identify any expected
42
+ result that the specification leaves unresolved.
43
+ - Prefer deterministic cases whose setup, assertion, and failure evidence can
44
+ distinguish product behavior from a test defect.
45
+
46
+ ## Evidence And Output
47
+
48
+ Produce test cases, an edge-case checklist, and coverage notes with requirement
49
+ citations. Keep unresolved expected results explicit. Do not select runtime
50
+ Context, assemble a prompt, define the Skill workflow, or duplicate the base
51
+ Context.
@@ -19,7 +19,15 @@ metadata:
19
19
 
20
20
  Use this skill to review a specification before implementation or test design.
21
21
 
22
- The skill stays thin. It declares the reusable base context and the purpose-oriented lens, while the detailed knowledge remains in context assets and lens assets.
22
+ This Skill owns the focused review workflow. The declared Context Asset owns
23
+ reusable boundary-value knowledge, and the declared Lenses own purpose-specific
24
+ interpretation of that knowledge.
25
+
26
+ ## Selection Boundaries
27
+
28
+ Use this workflow when a specification needs evidence-backed analysis of
29
+ implementation or test-design boundaries. Do not use it to implement the
30
+ change, approve product decisions, or perform unrelated editorial review.
23
31
 
24
32
  ## Required Inputs
25
33
 
@@ -28,9 +36,28 @@ The skill stays thin. It declares the reusable base context and the purpose-orie
28
36
 
29
37
  ## Instructions
30
38
 
31
- 1. Read the declared context assets.
32
- 2. Apply the declared context lens to focus the review.
33
- 3. Produce unresolved questions, risk notes, and clarification suggestions.
39
+ 1. Confirm that the supplied specification and its sources are available. If a
40
+ required source is missing, record the gap rather than inventing behavior.
41
+ 2. Read the declared boundary-value Context Asset and the required spec-review
42
+ Lens. Apply the optional test-design Lens only when test coverage is also in
43
+ scope for the requested review.
44
+ 3. Extract stated behavior, limits, assumptions, and sources from the supplied
45
+ specification. Keep facts separate from inferences and unresolved questions.
46
+ 4. Apply the required Lens's interpretation criteria to the reusable Context.
47
+ Cite the reusable guidance where relevant instead of reproducing it in this
48
+ Skill or output.
49
+ 5. Prioritize findings by implementation or release risk. Cite the relevant
50
+ specification section or repository evidence for every finding.
51
+ 6. Produce the expected output below and leave decisions with the accountable
52
+ human owner.
53
+
54
+ ## Expected Output
55
+
56
+ - A short scope and evidence summary.
57
+ - Prioritized unresolved questions and risk notes.
58
+ - Clarification suggestions tied to cited source gaps.
59
+ - The Context and Lens IDs applied, including why the optional Lens was or was
60
+ not used.
34
61
 
35
62
  ## When Not To Use
36
63
 
@@ -41,6 +68,8 @@ approval, or an editorial workflow for copy-only review.
41
68
 
42
69
  - The output distinguishes known facts from open questions.
43
70
  - The output cites the source-of-truth gaps it found.
71
+ - Each finding has an impact or risk and an evidence-backed rationale.
72
+ - Use of the optional Lens matches the requested review scope.
44
73
  - The skill does not copy reusable testing guidance into this file.
45
74
 
46
75
  ## Completion Criteria
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "renma",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "description": "Manage human-curated context assets for LLMs and agents in Git.",
5
5
  "license": "MIT",
6
6
  "repository": {