renma 0.17.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 (171) hide show
  1. package/CHANGELOG.md +152 -1
  2. package/README.md +11 -1
  3. package/architecture.md +21 -10
  4. package/design.md +52 -34
  5. package/dist/agent-skills.d.ts +1 -1
  6. package/dist/agent-skills.d.ts.map +1 -1
  7. package/dist/agent-skills.js +28 -8
  8. package/dist/agent-skills.js.map +1 -1
  9. package/dist/catalog.d.ts +1 -1
  10. package/dist/catalog.d.ts.map +1 -1
  11. package/dist/catalog.js +120 -12
  12. package/dist/catalog.js.map +1 -1
  13. package/dist/cli-help.d.ts +12 -8
  14. package/dist/cli-help.d.ts.map +1 -1
  15. package/dist/cli-help.js +23 -1
  16. package/dist/cli-help.js.map +1 -1
  17. package/dist/cli.d.ts.map +1 -1
  18. package/dist/cli.js +23 -0
  19. package/dist/cli.js.map +1 -1
  20. package/dist/commands/bom.d.ts +6 -3
  21. package/dist/commands/bom.d.ts.map +1 -1
  22. package/dist/commands/bom.js +27 -7
  23. package/dist/commands/bom.js.map +1 -1
  24. package/dist/commands/catalog.d.ts +1 -1
  25. package/dist/commands/catalog.d.ts.map +1 -1
  26. package/dist/commands/catalog.js +7 -1
  27. package/dist/commands/catalog.js.map +1 -1
  28. package/dist/commands/ci-report.d.ts.map +1 -1
  29. package/dist/commands/ci-report.js +18 -5
  30. package/dist/commands/ci-report.js.map +1 -1
  31. package/dist/commands/diff.js +8 -2
  32. package/dist/commands/diff.js.map +1 -1
  33. package/dist/commands/graph.d.ts +6 -2
  34. package/dist/commands/graph.d.ts.map +1 -1
  35. package/dist/commands/graph.js +23 -2
  36. package/dist/commands/graph.js.map +1 -1
  37. package/dist/commands/inspect.d.ts.map +1 -1
  38. package/dist/commands/inspect.js +2 -0
  39. package/dist/commands/inspect.js.map +1 -1
  40. package/dist/commands/ownership.d.ts +4 -3
  41. package/dist/commands/ownership.d.ts.map +1 -1
  42. package/dist/commands/ownership.js +27 -23
  43. package/dist/commands/ownership.js.map +1 -1
  44. package/dist/commands/readiness.d.ts +2 -1
  45. package/dist/commands/readiness.d.ts.map +1 -1
  46. package/dist/commands/readiness.js +98 -30
  47. package/dist/commands/readiness.js.map +1 -1
  48. package/dist/commands/scaffold.d.ts +3 -0
  49. package/dist/commands/scaffold.d.ts.map +1 -1
  50. package/dist/commands/scaffold.js +44 -9
  51. package/dist/commands/scaffold.js.map +1 -1
  52. package/dist/commands/suggest-metadata.d.ts.map +1 -1
  53. package/dist/commands/suggest-metadata.js +2 -0
  54. package/dist/commands/suggest-metadata.js.map +1 -1
  55. package/dist/commands/trust-graph.d.ts.map +1 -1
  56. package/dist/commands/trust-graph.js +12 -0
  57. package/dist/commands/trust-graph.js.map +1 -1
  58. package/dist/config.d.ts.map +1 -1
  59. package/dist/config.js +10 -3
  60. package/dist/config.js.map +1 -1
  61. package/dist/context-lens.d.ts +1 -0
  62. package/dist/context-lens.d.ts.map +1 -1
  63. package/dist/context-lens.js +19 -1
  64. package/dist/context-lens.js.map +1 -1
  65. package/dist/diagnostic-ids.d.ts +9 -0
  66. package/dist/diagnostic-ids.d.ts.map +1 -1
  67. package/dist/diagnostic-ids.js +9 -0
  68. package/dist/diagnostic-ids.js.map +1 -1
  69. package/dist/discovery.d.ts +5 -0
  70. package/dist/discovery.d.ts.map +1 -1
  71. package/dist/discovery.js +108 -65
  72. package/dist/discovery.js.map +1 -1
  73. package/dist/markdown.d.ts.map +1 -1
  74. package/dist/markdown.js +15 -0
  75. package/dist/markdown.js.map +1 -1
  76. package/dist/metadata.d.ts +15 -1
  77. package/dist/metadata.d.ts.map +1 -1
  78. package/dist/metadata.js +235 -0
  79. package/dist/metadata.js.map +1 -1
  80. package/dist/model.d.ts +20 -1
  81. package/dist/model.d.ts.map +1 -1
  82. package/dist/model.js +4 -1
  83. package/dist/model.js.map +1 -1
  84. package/dist/quality-profile.d.ts +91 -0
  85. package/dist/quality-profile.d.ts.map +1 -0
  86. package/dist/quality-profile.js +91 -0
  87. package/dist/quality-profile.js.map +1 -0
  88. package/dist/repeated-context.d.ts.map +1 -1
  89. package/dist/repeated-context.js +38 -83
  90. package/dist/repeated-context.js.map +1 -1
  91. package/dist/repository-boundary.d.ts +30 -0
  92. package/dist/repository-boundary.d.ts.map +1 -0
  93. package/dist/repository-boundary.js +116 -0
  94. package/dist/repository-boundary.js.map +1 -0
  95. package/dist/repository-evidence.d.ts +2 -0
  96. package/dist/repository-evidence.d.ts.map +1 -1
  97. package/dist/repository-evidence.js +6 -4
  98. package/dist/repository-evidence.js.map +1 -1
  99. package/dist/repository-paths.d.ts +6 -2
  100. package/dist/repository-paths.d.ts.map +1 -1
  101. package/dist/repository-paths.js +75 -24
  102. package/dist/repository-paths.js.map +1 -1
  103. package/dist/rules.d.ts +2 -0
  104. package/dist/rules.d.ts.map +1 -1
  105. package/dist/rules.js +322 -189
  106. package/dist/rules.js.map +1 -1
  107. package/dist/scanner.d.ts.map +1 -1
  108. package/dist/scanner.js +5 -1
  109. package/dist/scanner.js.map +1 -1
  110. package/dist/security-diagnostics.d.ts.map +1 -1
  111. package/dist/security-diagnostics.js +95 -30
  112. package/dist/security-diagnostics.js.map +1 -1
  113. package/dist/security-diff.d.ts +5 -2
  114. package/dist/security-diff.d.ts.map +1 -1
  115. package/dist/security-diff.js +20 -4
  116. package/dist/security-diff.js.map +1 -1
  117. package/dist/security-policy-inventory.d.ts +15 -3
  118. package/dist/security-policy-inventory.d.ts.map +1 -1
  119. package/dist/security-policy-inventory.js +123 -26
  120. package/dist/security-policy-inventory.js.map +1 -1
  121. package/dist/security-policy.d.ts +7 -0
  122. package/dist/security-policy.d.ts.map +1 -1
  123. package/dist/security-policy.js +70 -7
  124. package/dist/security-policy.js.map +1 -1
  125. package/dist/security-posture.d.ts.map +1 -1
  126. package/dist/security-posture.js +2 -1
  127. package/dist/security-posture.js.map +1 -1
  128. package/dist/skill-migration.js +2 -0
  129. package/dist/skill-migration.js.map +1 -1
  130. package/dist/static-support.d.ts +13 -0
  131. package/dist/static-support.d.ts.map +1 -0
  132. package/dist/static-support.js +284 -0
  133. package/dist/static-support.js.map +1 -0
  134. package/dist/token-estimator.d.ts +21 -0
  135. package/dist/token-estimator.d.ts.map +1 -0
  136. package/dist/token-estimator.js +84 -0
  137. package/dist/token-estimator.js.map +1 -0
  138. package/dist/trust-graph.d.ts +3 -3
  139. package/dist/trust-graph.d.ts.map +1 -1
  140. package/dist/trust-graph.js +69 -10
  141. package/dist/trust-graph.js.map +1 -1
  142. package/dist/types.d.ts +6 -1
  143. package/dist/types.d.ts.map +1 -1
  144. package/docs/README.md +15 -8
  145. package/docs/advanced-skill-authoring.md +16 -9
  146. package/docs/agent-skills-compatibility.md +10 -2
  147. package/docs/authoring-guide.md +89 -6
  148. package/docs/context-lens.md +319 -153
  149. package/docs/diagnostics.md +46 -11
  150. package/docs/metadata-budget.md +32 -0
  151. package/docs/quality-profile.md +135 -0
  152. package/docs/repository-context-bom.md +67 -8
  153. package/docs/schemas/repository-context-bom-v2.schema.json +648 -0
  154. package/docs/schemas/trust-graph-v2.schema.json +301 -0
  155. package/docs/security-policy.md +21 -5
  156. package/docs/trust-graph.md +47 -0
  157. package/docs/user-manual.md +48 -7
  158. package/examples/context-lens/README.md +8 -3
  159. package/examples/context-lens/contexts/testing/boundary-value-analysis.md +6 -2
  160. package/examples/context-lens/lenses/testing/spec-review-boundary-values.md +27 -5
  161. package/examples/context-lens/lenses/testing/test-design-boundary-values.md +27 -5
  162. package/examples/context-lens/skills/testing/spec-review/SKILL.md +33 -4
  163. package/examples/context-repo/README.md +6 -7
  164. package/examples/context-repo/contexts/domain/payment/idempotency.md +7 -0
  165. package/examples/context-repo/contexts/testing/boundary-value-analysis.md +7 -0
  166. package/examples/context-repo/contexts/testing/negative-testing.md +7 -0
  167. package/examples/context-repo/skills/testing/spec-review/SKILL.md +5 -0
  168. package/package.json +3 -1
  169. package/plan-discovery.md +24 -15
  170. package/plan.md +59 -119
  171. package/scripts/verify-package.mjs +8 -1
package/CHANGELOG.md CHANGED
@@ -6,6 +6,155 @@ This project follows the spirit of [Keep a Changelog](https://keepachangelog.com
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.18.1] - 2026-07-13
10
+
11
+ ### Added
12
+
13
+ - Added `token_budget_override`, `token_budget_rationale`, and optional
14
+ `token_budget_reviewed_at` metadata for recording a declared human decision
15
+ that a support asset should remain intentionally long. Invalid, ambiguous,
16
+ incomplete, orphaned, or unnecessary decision metadata emits
17
+ `QUAL-INVALID-TOKEN-BUDGET-OVERRIDE` and never suppresses the default budget.
18
+ Only Markdown-parser-eligible support assets can declare the bundle, and
19
+ override limits must be positive safe integers represented exactly.
20
+ - Added the blocking `CONTEXT-LENS-TARGET-NOT-CONTEXT` diagnostic.
21
+ Context Lens `applies_to` targets must now resolve specifically to Context
22
+ Assets; Skills, support assets, and other Context Lenses are rejected.
23
+
24
+ ### Changed
25
+
26
+ - Changed support-asset token guidance to ask for a split-versus-intentionally-
27
+ long user decision. Semantic splitting remains preferred when it preserves
28
+ coherence and execution order; a valid declared decision provides an
29
+ effective limit for intentionally coherent or ordered long-form assets.
30
+ - Clarified Skill, Context Asset, Context Lens, Skill-local support, and
31
+ external runtime responsibilities across canonical documentation, CLI help,
32
+ scaffolds, and examples. Context Lens guidance now requires declared Context,
33
+ rejects persona-only authoring as insufficient, uses canonical Agent Skills
34
+ relationship metadata, and preserves focused workflows without changing
35
+ Renma's deterministic runtime boundary.
36
+
37
+ ## [0.18.0] - 2026-07-12
38
+
39
+ ### Added
40
+
41
+ - Added the internal `renma-quality` profile family. The emitted profile
42
+ identifier is derived from the Renma package version as
43
+ `renma-quality@<package version>`. Added canonical threshold documentation
44
+ with units, provenance, rationale, false-positive risks, and
45
+ future-configurability status.
46
+ - Added one deterministic Unicode-aware `estimated_tokens` implementation for
47
+ Skill, content-asset, reuse-candidate, and repeated-context analysis.
48
+ - Added first-class `script` and `asset` artifact kinds under both supported
49
+ Skill roots, including original-byte hashes, sizes, text/binary
50
+ classification, Markdown eligibility, and catalog, graph, Trust Graph, and
51
+ BOM inventory.
52
+ - Added direct, one-index-hop, deep-chain, unreachable, and missing-path static
53
+ support reachability for references, scripts, assets, profiles, and examples.
54
+ - Added `renma scaffold skill --resources references,scripts,assets`; file mode
55
+ creates only selected empty directories, while prompt and JSON modes report
56
+ the selected resource contract without writing files.
57
+ - Added BOM and Trust Graph v2 as the first supported long-term schema
58
+ contracts. Renma 0.18.0 does not provide a v1 compatibility mode; the
59
+ earlier experimental v1 surface was removed before broader adoption.
60
+ - Added normalized ownership provenance and static local-resource relationship
61
+ edges across catalog, graph, readiness, BOM, and Trust Graph output.
62
+
63
+ ### Changed
64
+
65
+ - Replaced the thin-router model with focused workflow entrypoints. Ordered
66
+ procedures, completion criteria, and short command examples are valid in
67
+ `SKILL.md`; progressive disclosure is reviewed by semantic destination.
68
+ - Changed Skill body advisories to low above 2,000 and medium above 5,000
69
+ estimated tokens. Changed content advisories to Context 4,000, Reference
70
+ 5,000, Profile 2,000, and Example 2,500 estimated tokens.
71
+ - Changed metadata advisories to 48 frontmatter lines, 4,096 frontmatter
72
+ characters, and 256 characters per prose-like list item, with practical
73
+ exemptions for IDs, repository paths, and URLs.
74
+ - Changed reusable Context eligibility to 60 lines or 800 estimated tokens plus
75
+ four reusable signals. Changed shared-reference eligibility to 80 lines or
76
+ 1,200 estimated tokens plus three reusable headings and four reusable
77
+ phrases. Ordinary workflow headings and constraint words do not qualify.
78
+ - Changed repeated headings to require three files and token shingles to 40
79
+ estimated tokens in three files. Exact-section, exact-code, and per-category
80
+ caps retain their established defaults.
81
+ - Changed Readiness to `workflow.skills_focused`, removed the five-point
82
+ existence penalty for deprecated/archived assets, and reduced subjective
83
+ workflow advisory weights while preserving blocking graph and diagnostic
84
+ failures.
85
+ - Deprecated `metadata.renma.when-to-use` and
86
+ `metadata.renma.when-not-to-use` for new Skill authoring. They remain
87
+ recognized for governance and migration preservation; portable
88
+ `description` is the Skill discovery source of truth.
89
+
90
+ ### Fixed
91
+
92
+ - Stopped overcounting Japanese one character at a time in quality rules and
93
+ undercounting unspaced Japanese as one token in repeated-context analysis.
94
+ - Stopped decoding images, PDFs, fonts, and other opaque assets as UTF-8
95
+ Markdown or exposing binary bytes in diagnostic snippets.
96
+ - Stopped non-Markdown text scripts and assets from contributing frontmatter,
97
+ headings, links, fences, or repeated-context evidence.
98
+ - Fixed nearest-Skill support ownership, nested Skill boundaries, explicit path
99
+ reachability, extensionless and spaced paths, and oversized-file existence
100
+ evidence.
101
+ - Prevented script and asset bytes from declaring policy. Skill-local scripts
102
+ and assets inherit the nearest unambiguous Skill policy; text scripts may be
103
+ scanned under it, while binary files and ordinary output assets stay opaque.
104
+ - Rejected files reached through leaf or ancestor symbolic links, including
105
+ Skill-local directory links that point elsewhere inside or outside the
106
+ repository.
107
+ - Scanned non-Markdown scripts from line 1 even when they begin with `---`, and
108
+ added explicit local, inherited, effective, and missing-effective policy
109
+ inventory provenance.
110
+ - Added balanced-parenthesis Markdown destination parsing and single-pass
111
+ decoding for encoded filename characters.
112
+ - Stopped treating a command, Procedure/Steps/Setup headings, ordered workflow
113
+ wording, or 450/700-word counts as evidence of a bad Skill.
114
+ - Stopped recommending Context Assets as the default destination for
115
+ Skill-specific procedures, variants, edge cases, scripts, and output
116
+ resources.
117
+ - Stopped repeated links to the same specification or source from producing
118
+ maintenance findings by default.
119
+
120
+ ### Removed
121
+
122
+ - Removed default emission of `QUAL-SHORT-DESCRIPTION`,
123
+ `LAYOUT-SKILL-NOT-THIN`, `LAYOUT-SKILL-EXECUTABLE-COMMAND`, and
124
+ `MAINT-REPEATED-LINK`.
125
+ - Removed the Readiness `layout.skills_thin` contract and the unconditional
126
+ lifecycle-status penalty.
127
+
128
+ ### Compatibility
129
+
130
+ - No public quality-threshold configuration was added to
131
+ `renma.config.json`. The versioned internal profile is shaped for possible
132
+ later overrides after usage evidence.
133
+ - `ArtifactKind`, catalog entries, graph nodes, Trust Graph asset properties,
134
+ and Repository Context BOM assets add `script`/`asset` and binary-safety
135
+ evidence. Consumers that exhaustively match kinds or exact-normalize these
136
+ schemas must update for 0.18.0.
137
+ - Scaffold file, prompt, and JSON contracts add selected resource directories;
138
+ existing invocations without `--resources` create no extra directories.
139
+ - Agent Skills specification errors remain separate from Renma advisories:
140
+ `description` is required, a string, and 1-1,024 characters; 150 characters
141
+ is not an Agent Skills minimum.
142
+
143
+ ### Migration
144
+
145
+ - `LAYOUT-SKILL-NOT-THIN` -> `QUAL-SKILL-MIXED-RESPONSIBILITY` when reusable
146
+ knowledge evidence exists, otherwise no finding.
147
+ - `LAYOUT-SKILL-EXECUTABLE-COMMAND` -> no layout finding; security,
148
+ unresolved-helper, path-escape, and large-inline-implementation checks remain.
149
+ - `QUAL-SHORT-DESCRIPTION` -> Agent Skills description validity plus
150
+ `RN-SKILL-DESCRIPTION-MISSING-CAPABILITY`,
151
+ `RN-SKILL-DESCRIPTION-MISSING-USAGE-BOUNDARY`, and
152
+ `RN-SKILL-DESCRIPTION-OMITS-SELECTION-BOUNDARY` where applicable.
153
+ - `MAINT-REPEATED-LINK` -> no maintenance finding by default.
154
+ - Readiness `layout.skills_thin` -> `workflow.skills_focused`.
155
+ - Rebaseline exact catalog, graph, Trust Graph, BOM, Readiness, scaffold JSON,
156
+ and package-content fixtures against the 0.18.0 schemas before release.
157
+
9
158
  ## [0.17.0] - 2026-07-11
10
159
 
11
160
  ### Added
@@ -343,7 +492,9 @@ Tag-only release. No GitHub Release entry was published for this version.
343
492
  - Added metadata governance, advisory diagnostics, local path checks, and semantic split suggestions.
344
493
  - Added the initial project documentation, architecture notes, package metadata, tests, and license.
345
494
 
346
- [Unreleased]: https://github.com/KazuCocoa/renma/compare/v0.17.0...HEAD
495
+ [Unreleased]: https://github.com/KazuCocoa/renma/compare/v0.18.1...HEAD
496
+ [0.18.1]: https://github.com/KazuCocoa/renma/compare/v0.18.0...v0.18.1
497
+ [0.18.0]: https://github.com/KazuCocoa/renma/compare/v0.17.0...v0.18.0
347
498
  [0.17.0]: https://github.com/KazuCocoa/renma/compare/v0.16.0...v0.17.0
348
499
  [0.16.0]: https://github.com/KazuCocoa/renma/compare/v0.15.2...v0.16.0
349
500
  [0.15.2]: https://github.com/KazuCocoa/renma/compare/v0.15.1...v0.15.2
package/README.md CHANGED
@@ -125,6 +125,11 @@ scaffold, or ask it to use `renma scaffold skill` as its starting point.
125
125
  The [Authoring Guide](docs/authoring-guide.md) is the canonical walkthrough for
126
126
  both workflows.
127
127
 
128
+ Renma 0.18.x uses focused workflows rather than a thin-router model. See the
129
+ [canonical quality profile](docs/quality-profile.md) for every fixed threshold,
130
+ unit, rationale, provenance, and diagnostic mapping. Quality thresholds are not
131
+ configurable through `renma.config.json` in this release.
132
+
128
133
  ## Install And Quick Start
129
134
 
130
135
  Run Renma without installing it globally:
@@ -214,6 +219,8 @@ lenses/
214
219
  This is an illustrative layout, not a required domain hierarchy. `contexts/`
215
220
  is preferred and `context/` remains supported. Skill-local `references/`,
216
221
  `assets/`, `scripts/`, `examples/`, and `profiles/` are valid support material.
222
+ Local support without a declared owner inherits effective ownership from its
223
+ nearest owning Skill; reports distinguish inherited ownership from declarations.
217
224
  When deterministic evidence shows that knowledge is reusable beyond one Skill,
218
225
  promote it to an owned Context Asset rather than moving it based on location
219
226
  alone.
@@ -260,12 +267,15 @@ canonical and migration rules.
260
267
  - [Authoring Guide](docs/authoring-guide.md)
261
268
  - [Agent Skills Compatibility and Migration](docs/agent-skills-compatibility.md)
262
269
  - [Diagnostics Reference](docs/diagnostics.md)
270
+ - [Renma Quality Profile](docs/quality-profile.md)
263
271
  - [Security Policy Guide](docs/security-policy.md)
264
272
  - [Repository Context BOM contract](docs/repository-context-bom.md)
265
273
  - [Architecture](architecture.md)
266
274
  - [Product Design](design.md)
267
275
  - [Current Roadmap](plan.md)
268
- - [Proposed 0.18.0 Skill Discovery](plan-discovery.md)
276
+ - [Deferred Skill-to-Skill Discovery Design](plan-discovery.md): unassigned
277
+ exploratory route/index design, separate from implemented repository and
278
+ support-resource discovery.
269
279
  - [Interactive Placeholder Example](examples/interactive-placeholder): minimal
270
280
  hands-on clarify-before-act Skill interaction with a local tool.
271
281
  - [Example Context Repository](examples/context-repo): richer repository-aware
package/architecture.md CHANGED
@@ -36,7 +36,7 @@ assemble prompts, or execute workflows. Agents and runtimes decide how to use
36
36
  repository assets for a task. Future evidence validation does not make Renma a
37
37
  runtime telemetry collector; signal production and collection remain external.
38
38
 
39
- Provenance remains repository-level. A Repository Context BOM is a manifest of declared assets, hashes, owners, lifecycle states, dependencies, security posture, diagnostics, and readiness evidence; it is not a report of actual LLM runtime usage. BOM v1 keeps Git revision identity in the surrounding Git/CI/PR artifact context and keeps any future consumed-context evidence separate from the declared repository manifest contract.
39
+ Provenance remains repository-level. Repository Context BOM v2 is a manifest of declared assets, hashes, owners, lifecycle states, dependencies, security posture, diagnostics, and readiness evidence; it is not a report of actual LLM runtime usage. BOM v2 keeps Git revision identity in the surrounding Git/CI/PR artifact context and keeps any future consumed-context evidence separate from the declared repository manifest contract.
40
40
 
41
41
  ## Goals
42
42
 
@@ -121,12 +121,13 @@ that local support should be promoted.
121
121
 
122
122
  ### Skill
123
123
 
124
- A Skill is an agent-facing entrypoint, routing contract, and usage guide. It
125
- tells a consuming agent when and how to use a capability, what preflight
126
- questions matter, which safety and verification steps apply, and which Context
127
- Assets or Context Lenses are relevant. Renma recognizes Agent Skills-compatible
128
- syntax as the portable authoring boundary without reducing its internal model
129
- to the Agent Skills data model.
124
+ A Skill is a focused task or workflow entrypoint. It tells a consuming agent
125
+ when the workflow applies, which inputs and preflight questions matter, what
126
+ ordered instructions and decisions to follow, which safety and verification
127
+ steps apply, what output completes the work, and which Context Assets or
128
+ Context Lenses are relevant. Renma recognizes Agent Skills-compatible syntax as
129
+ the portable authoring boundary without reducing its internal model to the
130
+ Agent Skills data model.
130
131
 
131
132
  A skill should not be the only source of truth for reusable expert knowledge.
132
133
 
@@ -162,11 +163,21 @@ Normalized asset kinds:
162
163
  - `profile`
163
164
  - `reference`
164
165
  - `example`
166
+ - `script`
167
+ - `asset`
165
168
  - `agent`
166
169
  - `config`
167
170
  - `unknown`
168
171
 
169
- Shared Markdown under `contexts/` or `context/` uses the dedicated `context` kind. Skill-local supporting material remains `reference`.
172
+ Shared Markdown under `contexts/` or `context/` uses the dedicated `context`
173
+ kind. Skill-local scripts and assets are first-class inventory. Repository files
174
+ carry original-byte size and hash, text or binary classification, and Markdown
175
+ parser eligibility. Only artifacts explicitly eligible for Markdown parsing
176
+ contribute frontmatter, headings, links, fences, or repeated-context evidence.
177
+ Opaque files are never decoded into diagnostic snippets. Skill-local support
178
+ inherits effective ownership from its nearest owning Skill when it has no local
179
+ owner; catalog, graph, ownership, Readiness, Trust Graph, and BOM retain
180
+ `inherited` provenance instead of presenting that owner as locally declared.
170
181
 
171
182
  ### Dependency
172
183
 
@@ -457,7 +468,7 @@ Consumed-context evidence from external agents, editor integrations, prompt wrap
457
468
 
458
469
  The scanner, normalized asset model, graph-backed governance, ownership,
459
470
  Readiness, repeated-context evidence, semantic diff, security diagnostics,
460
- Trust Graph, and Repository Context BOM v1 are implemented architecture. New
471
+ Trust Graph v2 and Repository Context BOM v2 are implemented architecture. New
461
472
  projections should reuse the shared repository-evidence snapshot and remain
462
473
  additive unless a separately versioned contract requires a breaking change.
463
474
 
@@ -507,7 +518,7 @@ Baseline now in place:
507
518
  references, profiles, and examples.
508
519
  - Security diagnostics, security posture summaries, and effective policy
509
520
  inventory for agent-facing repository content.
510
- - Trust Graph evidence and Repository Context BOM v1.
521
+ - Trust Graph v2 evidence and Repository Context BOM v2.
511
522
  - CI integration examples and optional LLM-assisted review bundles.
512
523
 
513
524
  Future work may add imported external evidence after its contract is defined;
package/design.md CHANGED
@@ -23,7 +23,7 @@ what context an agent should load at task time.
23
23
 
24
24
  ```mermaid
25
25
  flowchart LR
26
- Skill["Skill: agent-facing entrypoint, routing contract, usage guide"]
26
+ Skill["Skill: focused task and workflow"]
27
27
  Lens["Context Lens: purpose-oriented interpretation"]
28
28
  Asset["Context Asset: independently owned source-of-truth knowledge"]
29
29
  Skill -->|may reference| Lens
@@ -31,9 +31,10 @@ flowchart LR
31
31
  Lens -->|interprets| Asset
32
32
  ```
33
33
 
34
- Skills tell an agent when and how to use a capability. They can reference
35
- context assets, ask preflight questions, describe safety gates, and define
36
- verification expectations.
34
+ Skills define a focused task or workflow. They can own activation boundaries,
35
+ inputs, ordered instructions, decisions, constraints, short commands, examples,
36
+ edge cases, verification, output, and completion criteria. They can also declare
37
+ Context Asset and Context Lens relationships.
37
38
 
38
39
  Context assets hold reusable expertise. They should be maintainable outside a
39
40
  single skill, owned by the right team, versioned, reviewed, and reused across
@@ -87,9 +88,9 @@ policy, security profile resolution, allowed data, forbidden inputs, approved
87
88
  network and upload destinations, human approval requirements, and high-risk
88
89
  findings without enforcing runtime behavior.
89
90
 
90
- Trust Graph v1 is a deterministic interpretation of existing catalog, graph, scan, and security evidence. It exposes stable asset, owner, lifecycle, dependency, security profile, effective policy, and diagnostic evidence, but it does not introduce subjective trust scores or a separate runtime system. `scan` lists concrete problems, `graph` shows structural relationships, `trust-graph` connects trust-relevant evidence, and `readiness` summarizes repository-level preparedness.
91
+ Trust Graph v2 is a deterministic interpretation of existing catalog, graph, scan, and security evidence. It exposes stable asset, owner, lifecycle, dependency, security profile, compositional effective-policy provenance, and diagnostic evidence, but it does not introduce subjective trust scores or a separate runtime system. `scan` lists concrete problems, `graph` shows structural relationships, `trust-graph` connects trust-relevant evidence, and `readiness` summarizes repository-level preparedness.
91
92
 
92
- Repository Context BOM v1 is a declared repository evidence snapshot: assets, hashes, owners, lifecycle states, dependencies, security posture, diagnostics, and readiness evidence. Snapshot consistency comes from one in-memory repository snapshot per BOM execution, not output formatting flags. `--omit-generated-at` only removes run-time generation timestamp noise; it does not ignore repository metadata timestamps such as `lastReviewedAt` or `expiresAt`, suppress freshness diagnostics, normalize environment-dependent absolute paths such as `root` or `configPath`, hide file moves, or provide portable byte-for-byte output across runners. The BOM does not claim actual LLM runtime usage. Actual consumed-context evidence remains a future separate artifact or attachment that external agents or wrappers may produce and Renma may later validate against the repository model. See `docs/repository-context-bom.md` for the resolved v1 contract.
93
+ Repository Context BOM v2 is a declared repository evidence snapshot: assets, hashes, owners, lifecycle states, dependencies, security posture, diagnostics, and readiness evidence. Snapshot consistency comes from one in-memory repository snapshot per BOM execution, not output formatting flags. `--omit-generated-at` only removes run-time generation timestamp noise; it does not ignore repository metadata timestamps such as `lastReviewedAt` or `expiresAt`, suppress freshness diagnostics, normalize environment-dependent absolute paths such as `root` or `configPath`, hide file moves, or provide portable byte-for-byte output across runners. The BOM does not claim actual LLM runtime usage. Actual consumed-context evidence remains a future separate artifact or attachment that external agents or wrappers may produce and Renma may later validate against the repository model. See `docs/repository-context-bom.md` for the v2 contract.
93
94
 
94
95
  Renma findings should be useful not only to humans, but also to LLM coding
95
96
  agents. A good Renma diagnostic should explain what is wrong, why it matters for
@@ -104,34 +105,36 @@ Current diagnostics include evidence, `whyItMatters`, remediation, typed repair
104
105
  constraints, verification steps, and LLM-facing hints where applicable. These
105
106
  fields remain deterministic rule output, not LLM-generated validation.
106
107
 
107
- Example diagnostic shape:
108
+ Example diagnostic shape (selected stable fields from a deterministic fixture;
109
+ input-specific `details` omitted):
108
110
 
109
111
  ```json
110
112
  {
111
- "id": "RMA-SKILL-TOO-MONOLITHIC",
112
- "severity": "medium",
113
- "category": "structure",
114
- "title": "Skill mixes reusable knowledge with usage guidance",
113
+ "id": "QUAL-SKILL-MIXED-RESPONSIBILITY",
114
+ "severity": "low",
115
+ "category": "maintenance",
116
+ "confidence": "medium",
117
+ "title": "Skill may mix its workflow with reusable knowledge",
115
118
  "evidence": {
116
- "path": "skills/testing/test-case-generation/SKILL.md",
117
- "startLine": 42,
118
- "endLine": 78,
119
- "snippet": "boundary value analysis"
119
+ "path": "skills/mobile/SKILL.md",
120
+ "startLine": 11,
121
+ "endLine": 11,
122
+ "snippet": "Detected reusable-knowledge headings: Platform Facts - Known Issues - Domain Rules - Product Policy; Detected reusable-knowledge phrases: known issue"
120
123
  },
121
- "whyItMatters": "Reusable QA and domain knowledge should be owned, reviewed, and reused as shared context assets instead of being buried in one skill.",
122
- "remediation": "Split reusable knowledge into first-class shared context assets and keep the skill as an LLM-facing usage guide.",
124
+ "whyItMatters": "Reusable setup notes, troubleshooting, platform guidance, testing heuristics, or domain rules are easier to own, review, and reuse when they live in shared context assets instead of only inside one skill.",
125
+ "remediation": "Review the matched headings and phrases. Promote content to contexts/ only when it needs cross-Skill reuse, independent ownership, lifecycle, or source-of-truth status; otherwise keep Skill-specific detail in SKILL.md or references/.",
123
126
  "constraints": [
124
- "Do not introduce task context selection.",
125
- "Do not create prompt packages.",
126
- "Keep the skill as a routing contract / usage guide.",
127
- "Each context asset should have id, owner, status, and short scope."
127
+ "Do not make Renma select runtime context.",
128
+ "Do not assemble prompt packages.",
129
+ "Do not automatically rewrite or split skills.",
130
+ "Preserve SKILL.md as a focused workflow entrypoint.",
131
+ "Give extracted context assets stable metadata such as id, owner, and status."
128
132
  ],
129
133
  "verificationSteps": [
130
134
  "Run renma scan.",
131
- "Run any project-specific validation checks that apply to this repository.",
132
- "Ensure the skill no longer mixes reusable domain knowledge with usage guidance."
135
+ "Confirm the advisory is resolved or intentionally accepted after reusable knowledge is represented as shared context assets."
133
136
  ],
134
- "llmHint": "Create shared context assets for reusable QA knowledge, update skill metadata, and preserve the skill as a concise usage guide."
137
+ "llmHint": "Check whether the matched knowledge is used across Skills or needs independent ownership. Use contexts/ only for shared knowledge; keep Skill-local procedures and edge cases in SKILL.md or references/."
135
138
  }
136
139
  ```
137
140
 
@@ -139,11 +142,12 @@ Central repair workflow:
139
142
 
140
143
  1. A single `SKILL.md` contains reusable domain knowledge, tool guidance, and
141
144
  QA heuristics.
142
- 2. Renma emits structured findings explaining that the skill is too monolithic
143
- and mixes usage guidance with reusable context.
145
+ 2. Renma detects reusable-knowledge signals and reports possible mixed
146
+ responsibility. The finding does not require every matched detail to move.
144
147
  3. Codex or Claude reads the diagnostics and proposes a patch that moves
145
- reusable knowledge into first-class context assets under `contexts/`, keeps
146
- the skill concise, adds metadata, and updates declared context references.
148
+ knowledge into `contexts/` only when it needs cross-Skill reuse, independent
149
+ ownership, lifecycle, or source-of-truth status. Skill-specific workflow and
150
+ detail remain in `SKILL.md` or Skill-local References.
147
151
  4. A human reviews the patch.
148
152
  5. Renma scans the repository again and confirms the skill/context separation is
149
153
  healthier.
@@ -214,11 +218,13 @@ as a compatibility alias. Files under either root are classified as the
214
218
  can live under `lenses/`, or context files can opt in with `type: context_lens`.
215
219
 
216
220
  Skill-local `assets/`, `profiles/`, `references/`, `examples/`, and `scripts/`
217
- remain supported. They are useful for local routing variants, nearby examples,
218
- Skill-specific supporting text, fixtures, and helpers. When evidence shows that
219
- knowledge is reusable across Skills, teams, tools, or agents, it should move
220
- into `contexts/` as an owned Context Asset. Shared helper implementations may
221
- move to `tools/**`; location alone does not require either promotion.
221
+ remain supported. They are useful for local workflow variants, nearby examples,
222
+ Skill-specific supporting text, fixtures, and helpers. Profiles represent
223
+ Skill-local overlays or workflow variants; they are not generic global
224
+ personas. When evidence shows that knowledge is reusable across Skills, teams,
225
+ tools, or agents, it should move into `contexts/` as an owned Context Asset.
226
+ Shared helper implementations may move to `tools/**`; location alone does not
227
+ require either promotion.
222
228
 
223
229
  Renma can also flag large skill-local support files as shared-context candidates when they contain generic source-of-truth structure such as setup, decision logic, troubleshooting, validation, constraints, policy, or procedure guidance. This advisory does not decide semantic reuse itself. It surfaces structurally broad support files and asks the calling LLM or human to inspect the repository for similar concepts, overlapping guidance, and reuse opportunities before making a reviewable patch.
224
230
 
@@ -228,17 +234,29 @@ Shared context assets should be organized by semantic scope, not migration state
228
234
 
229
235
  Renma normalizes scanned files into asset kinds:
230
236
 
231
- - `skill`: LLM-facing entrypoint, routing contract, and usage guide
237
+ - `skill`: focused task or workflow with activation boundaries, instructions,
238
+ verification, output, and completion criteria
232
239
  - `context`: shared source-of-truth knowledge asset under `contexts/` or
233
240
  `context/`
234
241
  - `context_lens`: purpose-oriented interpretation layer over context assets
235
242
  - `profile`: skill-local overlay or variant
236
243
  - `reference`: skill-local supporting material
237
244
  - `example`: skill-local example or fixture text
245
+ - `script`: Skill-local deterministic executable implementation
246
+ - `asset`: Skill-local template, image, data, font, PDF, or output resource
238
247
  - `agent`: repository or agent instruction file
239
248
  - `config`: Renma configuration
240
249
  - `unknown`: scanned file that does not match a known kind
241
250
 
251
+ Catalog, graph, Trust Graph, and BOM output include script and asset inventory.
252
+ Each cataloged asset records original-byte size and hash, text/binary
253
+ classification, and Markdown-parser eligibility. Binary assets remain opaque;
254
+ Renma does not decode them as UTF-8 or expose their bytes in snippets.
255
+ Non-Markdown text remains available to dedicated path and security analysis but
256
+ cannot declare catalog metadata or contribute Markdown structure. Skill-local
257
+ support without a local owner inherits effective ownership from the nearest
258
+ Skill, with inherited provenance exposed in normalized reports.
259
+
242
260
  The dedicated `context` kind is central to the product model. It lets catalog,
243
261
  graph, and validation output distinguish reusable team-owned knowledge from
244
262
  skill-local reference material.
@@ -2,7 +2,7 @@ import { type AgentSkillDiagnosticId } from "./diagnostic-ids.js";
2
2
  import type { ParsedDocument } from "./types.js";
3
3
  import { type ParsedYamlFrontmatter } from "./yaml-frontmatter.js";
4
4
  export declare const AGENT_SKILLS_SPECIFICATION = "https://agentskills.io/specification";
5
- export declare const AGENT_SKILLS_VALIDATION_PROFILE = "agentskills.io/specification@2026-07-11";
5
+ export declare const AGENT_SKILLS_VALIDATION_PROFILE = "agentskills.io/specification@2026-07-12";
6
6
  export declare const AGENT_SKILLS_TOP_LEVEL_FIELDS: readonly ["name", "description", "license", "compatibility", "metadata", "allowed-tools"];
7
7
  export declare const LEGACY_RENMA_SKILL_FIELDS: readonly ["id", "title", "version", "owner", "status", "purpose", "last_reviewed_at", "review_cycle", "expires_at", "tags", "when_to_use", "when_not_to_use", "requires_context", "optional_context", "requires_lens", "optional_lens", "conflicts", "superseded_by", "allowed_data", "network_allowed", "external_upload_allowed", "secrets_allowed", "requires_human_approval", "forbidden_inputs", "approved_network_destinations", "approved_upload_destinations", "security_profile"];
8
8
  export type AgentSkillFormat = "agent-skills" | "renma-legacy" | "hybrid" | "unknown";
@@ -1 +1 @@
1
- {"version":3,"file":"agent-skills.d.ts","sourceRoot":"","sources":["../src/agent-skills.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAEL,KAAK,qBAAqB,EAE3B,MAAM,uBAAuB,CAAC;AAE/B,eAAO,MAAM,0BAA0B,yCACC,CAAC;AACzC,eAAO,MAAM,+BAA+B,4CACD,CAAC;AAE5C,eAAO,MAAM,6BAA6B,2FAOhC,CAAC;AAEX,eAAO,MAAM,yBAAyB,4dA4B5B,CAAC;AAQX,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,cAAc,GACd,QAAQ,GACR,SAAS,CAAC;AAEd,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,eAAe,GAAG,iBAAiB,CAAC;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,o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,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,0BAA0B,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,wFAAwF;AACxF,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,cAAc,EAAE,GAC1B,4BAA4B,CA0B9B;AAED,sFAAsF;AACtF,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,cAAc,GACvB,0BAA0B,CAG5B;AAED,2EAA2E;AAC3E,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,cAAc,GACvB,oBAAoB,CAMtB;AAED,sEAAsE;AACtE,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,cAAc,GACvB,MAAM,GAAG,SAAS,CAKpB;AA0LD,8DAA8D;AAC9D,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,GACb,wBAAwB,CAE1B;AAED,0FAA0F;AAC1F,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,OAAO,GACb,wBAAwB,CAE1B;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,GACb,wBAAwB,CAE1B;AA+BD,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIxE;AAwYD,6EAA6E;AAC7E,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,EAAE,EACf,aAAa,EAAE,MAAM,GACpB,GAAG,CAAC,MAAM,CAAC,CAgCb"}
@@ -1,9 +1,11 @@
1
1
  import path from "node:path";
2
+ import { logicalSkillDirectory } from "./discovery.js";
2
3
  import { AGENT_SKILL_DIAGNOSTIC_IDS as IDS, } from "./diagnostic-ids.js";
3
4
  import { classifyRepositorySkillEntrypointPath } from "./discovery.js";
4
5
  import { parseAgentSkillFrontmatter, } from "./yaml-frontmatter.js";
6
+ import { DEFAULT_QUALITY_PROFILE } from "./quality-profile.js";
5
7
  export const AGENT_SKILLS_SPECIFICATION = "https://agentskills.io/specification";
6
- export const AGENT_SKILLS_VALIDATION_PROFILE = "agentskills.io/specification@2026-07-11";
8
+ export const AGENT_SKILLS_VALIDATION_PROFILE = "agentskills.io/specification@2026-07-12";
7
9
  export const AGENT_SKILLS_TOP_LEVEL_FIELDS = [
8
10
  "name",
9
11
  "description",
@@ -43,9 +45,10 @@ export const LEGACY_RENMA_SKILL_FIELDS = [
43
45
  ];
44
46
  const ALLOWED_TOP_LEVEL_FIELDS = new Set(AGENT_SKILLS_TOP_LEVEL_FIELDS);
45
47
  const LEGACY_FIELDS = new Set(LEGACY_RENMA_SKILL_FIELDS);
46
- const MAX_NAME_LENGTH = 64;
47
- const MAX_DESCRIPTION_LENGTH = 1024;
48
- const MAX_COMPATIBILITY_LENGTH = 500;
48
+ const AGENT_SKILLS_LIMITS = DEFAULT_QUALITY_PROFILE.agentSkills;
49
+ const MAX_NAME_LENGTH = AGENT_SKILLS_LIMITS.nameMaxChars;
50
+ const MAX_DESCRIPTION_LENGTH = AGENT_SKILLS_LIMITS.descriptionMaxChars;
51
+ const MAX_COMPATIBILITY_LENGTH = AGENT_SKILLS_LIMITS.compatibilityMaxChars;
49
52
  /** Validate every discovered Skill using one locally versioned Agent Skills profile. */
50
53
  export function validateAgentSkills(documents) {
51
54
  const results = documents
@@ -231,10 +234,16 @@ function validateName(document, frontmatter, issues) {
231
234
  if (nameValidation.problems.length > 0) {
232
235
  issues.push(createIssue(document, IDS.AS_INVALID_NAME, "error", "specification", `Invalid Agent Skills name "${rawName}": ${nameValidation.problems.join("; ")}.`, field?.startLine ?? 1, "name"));
233
236
  }
234
- const parent = path.posix.basename(path.posix.dirname(document.artifact.path));
235
- const parentValidation = normalizeAgentSkillDirectoryName(parent);
236
- if (nameValidation.normalized !== undefined &&
237
- parentValidation.normalized !== nameValidation.normalized) {
237
+ const logicalDirectory = logicalSkillDirectory(document.artifact.path);
238
+ const parent = logicalDirectory
239
+ ? path.posix.basename(logicalDirectory)
240
+ : undefined;
241
+ const parentValidation = parent
242
+ ? normalizeAgentSkillDirectoryName(parent)
243
+ : undefined;
244
+ if (parent !== undefined &&
245
+ nameValidation.normalized !== undefined &&
246
+ parentValidation?.normalized !== nameValidation.normalized) {
238
247
  issues.push({
239
248
  ...createIssue(document, IDS.AS_NAME_DIRECTORY_MISMATCH, "error", "specification", `Agent Skills name "${rawName}" must match parent directory "${parent}".`, field?.startLine ?? 1, "name"),
240
249
  details: { name: rawName, parentDirectory: parent },
@@ -294,6 +303,9 @@ function authoringIssues(document, frontmatter, description) {
294
303
  const issues = [];
295
304
  const bodyLines = collectBodyLines(document, frontmatter);
296
305
  const descriptionLine = firstField(frontmatter, "description")?.startLine ?? 1;
306
+ if (!descriptionCapabilityPattern().test(description)) {
307
+ issues.push(createIssue(document, IDS.RN_DESCRIPTION_MISSING_CAPABILITY, "warning", "renma-authoring", "Description should state what the skill does, not only that it should be used.", descriptionLine, "description"));
308
+ }
297
309
  if (!usageBoundaryPattern().test(description)) {
298
310
  issues.push(createIssue(document, IDS.RN_DESCRIPTION_MISSING_USAGE_BOUNDARY, "warning", "renma-authoring", "Description should state when the agent should use this skill.", descriptionLine, "description"));
299
311
  }
@@ -447,6 +459,14 @@ function characterLength(value) {
447
459
  function usageBoundaryPattern() {
448
460
  return /\b(?:use(?: this skill)? (?:when|for|to)|when (?:a|an|the|you|reviewing|working|handling))\b/i;
449
461
  }
462
+ /**
463
+ * Conservative English capability evidence for the Agent Skills "what" clause.
464
+ * Non-ASCII descriptions are accepted because Renma cannot reliably infer
465
+ * capability semantics across languages with a deterministic word list.
466
+ */
467
+ function descriptionCapabilityPattern() {
468
+ return /[^\p{ASCII}]|\b(?:address(?:es|ing)?|analy[sz](?:e|es|ing)|analysis|automat(?:e|es|ing|ion)|build(?:s|ing)?|calculat(?:e|es|ing|ion)|compar(?:e|es|ing|ison)|configur(?:e|es|ing|ation)|convert(?:s|ing)?|creat(?:e|es|ing|ion)|debug(?:s|ging)?|deploy(?:s|ing|ment)?|design(?:s|ing)?|diagnos(?:e|es|ing|is)|document(?:s|ing|ation)?|edit(?:s|ing)?|evaluat(?:e|es|ing|ion)|extract(?:s|ing|ion)?|find(?:s|ing)?|fix(?:es|ing)?|generat(?:e|es|ing|ion)|guid(?:e|es|ing|ance)|implement(?:s|ing|ation)?|inspect(?:s|ing|ion)?|install(?:s|ing|ation)?|manage(?:s|ment|ing)?|migrat(?:e|es|ing|ion)|monitor(?:s|ing)?|organiz(?:e|es|ing|ation)|plan(?:s|ning)?|prepar(?:e|es|ing|ation)|produc(?:e|es|ing|tion)|publish(?:es|ing)?|read(?:s|ing)?|releas(?:e|es|ing)|render(?:s|ing)?|review(?:s|ing)?|rout(?:e|es|ing)|scaffold(?:s|ing)?|search(?:es|ing)?|summari[sz](?:e|es|ing|ation)|test(?:s|ing)?|transform(?:s|ing|ation)?|triag(?:e|es|ing)|updat(?:e|es|ing)|validat(?:e|es|ing|ion)|verif(?:y|ies|ying|ication)|writ(?:e|es|ing))\b/iu;
469
+ }
450
470
  function explicitSelectionBoundaryPattern() {
451
471
  return /\b(?:do not use (?:this|the) skill|do not select (?:this|the) skill|use another skill|when not to use (?:this|the) skill)\b/i;
452
472
  }