@vibe-agent-toolkit/agent-skills 0.2.0-rc.2 → 0.2.0-rc.4

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 (213) hide show
  1. package/dist/files-config.d.ts +34 -1
  2. package/dist/files-config.d.ts.map +1 -1
  3. package/dist/files-config.js +280 -36
  4. package/dist/files-config.js.map +1 -1
  5. package/dist/fs-attribution.d.ts +45 -0
  6. package/dist/fs-attribution.d.ts.map +1 -0
  7. package/dist/fs-attribution.js +57 -0
  8. package/dist/fs-attribution.js.map +1 -0
  9. package/dist/index.d.ts +6 -5
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +9 -3
  12. package/dist/index.js.map +1 -1
  13. package/dist/inventory/detectors/declared-but-missing.d.ts +1 -1
  14. package/dist/inventory/detectors/declared-but-missing.d.ts.map +1 -1
  15. package/dist/inventory/detectors/marketplace-source-missing.d.ts +1 -1
  16. package/dist/inventory/detectors/marketplace-source-missing.d.ts.map +1 -1
  17. package/dist/inventory/detectors/present-but-undeclared.d.ts +1 -1
  18. package/dist/inventory/detectors/present-but-undeclared.d.ts.map +1 -1
  19. package/dist/inventory/detectors/reference-target-missing.d.ts +1 -1
  20. package/dist/inventory/detectors/reference-target-missing.d.ts.map +1 -1
  21. package/dist/inventory/index.d.ts +1 -1
  22. package/dist/inventory/index.d.ts.map +1 -1
  23. package/dist/inventory/index.js +1 -1
  24. package/dist/inventory/index.js.map +1 -1
  25. package/dist/inventory/serialize.d.ts +4 -4
  26. package/dist/inventory/serialize.d.ts.map +1 -1
  27. package/dist/inventory/serialize.js +6 -6
  28. package/dist/inventory/serialize.js.map +1 -1
  29. package/dist/plugin-distribution-layout.d.ts.map +1 -1
  30. package/dist/plugin-distribution-layout.js +3 -1
  31. package/dist/plugin-distribution-layout.js.map +1 -1
  32. package/dist/post-build-checks.d.ts +1 -1
  33. package/dist/post-build-checks.d.ts.map +1 -1
  34. package/dist/post-build-checks.js.map +1 -1
  35. package/dist/projection/skill-extent.d.ts +247 -0
  36. package/dist/projection/skill-extent.d.ts.map +1 -0
  37. package/dist/projection/skill-extent.js +558 -0
  38. package/dist/projection/skill-extent.js.map +1 -0
  39. package/dist/schemas/agent-skill-frontmatter.js +1 -1
  40. package/dist/schemas/agent-skill-frontmatter.js.map +1 -1
  41. package/dist/skill-packager.d.ts +45 -7
  42. package/dist/skill-packager.d.ts.map +1 -1
  43. package/dist/skill-packager.js +123 -25
  44. package/dist/skill-packager.js.map +1 -1
  45. package/dist/skill-source/git-clone.d.ts +1 -1
  46. package/dist/skill-source/git-clone.d.ts.map +1 -1
  47. package/dist/skill-source/git-clone.js +10 -8
  48. package/dist/skill-source/git-clone.js.map +1 -1
  49. package/dist/skill-source/sources/url-source.d.ts.map +1 -1
  50. package/dist/skill-source/sources/url-source.js +2 -1
  51. package/dist/skill-source/sources/url-source.js.map +1 -1
  52. package/dist/skill-test/baseline-delta.d.ts +1575 -0
  53. package/dist/skill-test/baseline-delta.d.ts.map +1 -0
  54. package/dist/skill-test/baseline-delta.js +272 -0
  55. package/dist/skill-test/baseline-delta.js.map +1 -0
  56. package/dist/skill-test/baseline-integrity.d.ts +944 -0
  57. package/dist/skill-test/baseline-integrity.d.ts.map +1 -0
  58. package/dist/skill-test/baseline-integrity.js +3083 -0
  59. package/dist/skill-test/baseline-integrity.js.map +1 -0
  60. package/dist/skill-test/configure-writer.js +1 -1
  61. package/dist/skill-test/configure-writer.js.map +1 -1
  62. package/dist/skill-test/declared-env.d.ts.map +1 -1
  63. package/dist/skill-test/declared-env.js +2 -1
  64. package/dist/skill-test/declared-env.js.map +1 -1
  65. package/dist/skill-test/eval-executor.d.ts +20 -4
  66. package/dist/skill-test/eval-executor.d.ts.map +1 -1
  67. package/dist/skill-test/eval-executor.js +4 -4
  68. package/dist/skill-test/eval-executor.js.map +1 -1
  69. package/dist/skill-test/eval-fragment.d.ts +80 -6
  70. package/dist/skill-test/eval-fragment.d.ts.map +1 -1
  71. package/dist/skill-test/eval-fragment.js +61 -7
  72. package/dist/skill-test/eval-fragment.js.map +1 -1
  73. package/dist/skill-test/eval-grader.d.ts +1 -1
  74. package/dist/skill-test/eval-grader.d.ts.map +1 -1
  75. package/dist/skill-test/eval-grader.js +145 -8
  76. package/dist/skill-test/eval-grader.js.map +1 -1
  77. package/dist/skill-test/eval-inputs.d.ts +107 -6
  78. package/dist/skill-test/eval-inputs.d.ts.map +1 -1
  79. package/dist/skill-test/eval-inputs.js +173 -16
  80. package/dist/skill-test/eval-inputs.js.map +1 -1
  81. package/dist/skill-test/eval-lint.d.ts +13 -0
  82. package/dist/skill-test/eval-lint.d.ts.map +1 -1
  83. package/dist/skill-test/eval-lint.js +17 -4
  84. package/dist/skill-test/eval-lint.js.map +1 -1
  85. package/dist/skill-test/executor-prompt.d.ts +13 -5
  86. package/dist/skill-test/executor-prompt.d.ts.map +1 -1
  87. package/dist/skill-test/executor-prompt.js +8 -5
  88. package/dist/skill-test/executor-prompt.js.map +1 -1
  89. package/dist/skill-test/exit-codes.d.ts +53 -16
  90. package/dist/skill-test/exit-codes.d.ts.map +1 -1
  91. package/dist/skill-test/exit-codes.js +123 -40
  92. package/dist/skill-test/exit-codes.js.map +1 -1
  93. package/dist/skill-test/fragment-merge.d.ts +1 -18
  94. package/dist/skill-test/fragment-merge.d.ts.map +1 -1
  95. package/dist/skill-test/fragment-merge.js +63 -4
  96. package/dist/skill-test/fragment-merge.js.map +1 -1
  97. package/dist/skill-test/grader-prompt.d.ts +27 -7
  98. package/dist/skill-test/grader-prompt.d.ts.map +1 -1
  99. package/dist/skill-test/grader-prompt.js +253 -61
  100. package/dist/skill-test/grader-prompt.js.map +1 -1
  101. package/dist/skill-test/grader-text.d.ts +145 -0
  102. package/dist/skill-test/grader-text.d.ts.map +1 -0
  103. package/dist/skill-test/grader-text.js +410 -0
  104. package/dist/skill-test/grader-text.js.map +1 -0
  105. package/dist/skill-test/grading-adapter.d.ts +32 -0
  106. package/dist/skill-test/grading-adapter.d.ts.map +1 -1
  107. package/dist/skill-test/grading-adapter.js +50 -3
  108. package/dist/skill-test/grading-adapter.js.map +1 -1
  109. package/dist/skill-test/grading-schema.d.ts +160 -5
  110. package/dist/skill-test/grading-schema.d.ts.map +1 -1
  111. package/dist/skill-test/grading-schema.js +66 -7
  112. package/dist/skill-test/grading-schema.js.map +1 -1
  113. package/dist/skill-test/index.d.ts +1 -1
  114. package/dist/skill-test/index.d.ts.map +1 -1
  115. package/dist/skill-test/index.js +1 -1
  116. package/dist/skill-test/index.js.map +1 -1
  117. package/dist/skill-test/lock.d.ts +56 -0
  118. package/dist/skill-test/lock.d.ts.map +1 -1
  119. package/dist/skill-test/lock.js +75 -2
  120. package/dist/skill-test/lock.js.map +1 -1
  121. package/dist/skill-test/pipeline.d.ts +16 -0
  122. package/dist/skill-test/pipeline.d.ts.map +1 -1
  123. package/dist/skill-test/pipeline.js +16 -9
  124. package/dist/skill-test/pipeline.js.map +1 -1
  125. package/dist/skill-test/preflight.d.ts +1 -1
  126. package/dist/skill-test/preflight.d.ts.map +1 -1
  127. package/dist/skill-test/preflight.js +59 -15
  128. package/dist/skill-test/preflight.js.map +1 -1
  129. package/dist/skill-test/run-harness.d.ts +578 -35
  130. package/dist/skill-test/run-harness.d.ts.map +1 -1
  131. package/dist/skill-test/run-harness.js +1281 -148
  132. package/dist/skill-test/run-harness.js.map +1 -1
  133. package/dist/skill-test/staging.d.ts +8 -2
  134. package/dist/skill-test/staging.d.ts.map +1 -1
  135. package/dist/skill-test/staging.js +8 -4
  136. package/dist/skill-test/staging.js.map +1 -1
  137. package/dist/skill-test/tool-eval-schema.d.ts +6 -6
  138. package/dist/test-input.d.ts +57 -6
  139. package/dist/test-input.d.ts.map +1 -1
  140. package/dist/test-input.js +35 -12
  141. package/dist/test-input.js.map +1 -1
  142. package/dist/validators/agent-instruction-presence.d.ts +1 -1
  143. package/dist/validators/agent-instruction-presence.d.ts.map +1 -1
  144. package/dist/validators/agent-instruction-presence.js +2 -1
  145. package/dist/validators/agent-instruction-presence.js.map +1 -1
  146. package/dist/validators/bundled-resource-link-detection.d.ts +1 -1
  147. package/dist/validators/bundled-resource-link-detection.d.ts.map +1 -1
  148. package/dist/validators/bundled-resource-link-detection.js +1 -1
  149. package/dist/validators/bundled-resource-link-detection.js.map +1 -1
  150. package/dist/validators/compat-detectors.d.ts +1 -1
  151. package/dist/validators/compat-detectors.d.ts.map +1 -1
  152. package/dist/validators/compat-detectors.js +1 -1
  153. package/dist/validators/compat-detectors.js.map +1 -1
  154. package/dist/validators/cross-skill-dependency-detection.d.ts +1 -1
  155. package/dist/validators/cross-skill-dependency-detection.d.ts.map +1 -1
  156. package/dist/validators/cross-skill-dependency-detection.js +1 -1
  157. package/dist/validators/cross-skill-dependency-detection.js.map +1 -1
  158. package/dist/validators/description-style-detection.d.ts +1 -1
  159. package/dist/validators/description-style-detection.d.ts.map +1 -1
  160. package/dist/validators/description-style-detection.js +1 -1
  161. package/dist/validators/description-style-detection.js.map +1 -1
  162. package/dist/validators/frontmatter-validation.d.ts +1 -1
  163. package/dist/validators/frontmatter-validation.d.ts.map +1 -1
  164. package/dist/validators/frontmatter-validation.js +1 -1
  165. package/dist/validators/frontmatter-validation.js.map +1 -1
  166. package/dist/validators/imperative-body-detection.d.ts +1 -1
  167. package/dist/validators/imperative-body-detection.d.ts.map +1 -1
  168. package/dist/validators/imperative-body-detection.js +1 -1
  169. package/dist/validators/imperative-body-detection.js.map +1 -1
  170. package/dist/validators/index.d.ts +1 -1
  171. package/dist/validators/index.d.ts.map +1 -1
  172. package/dist/validators/kebab-case-detection.d.ts +1 -1
  173. package/dist/validators/kebab-case-detection.d.ts.map +1 -1
  174. package/dist/validators/kebab-case-detection.js +1 -1
  175. package/dist/validators/kebab-case-detection.js.map +1 -1
  176. package/dist/validators/marketplace-validator.js +1 -1
  177. package/dist/validators/marketplace-validator.js.map +1 -1
  178. package/dist/validators/packaging-validator.d.ts +96 -7
  179. package/dist/validators/packaging-validator.d.ts.map +1 -1
  180. package/dist/validators/packaging-validator.js +148 -21
  181. package/dist/validators/packaging-validator.js.map +1 -1
  182. package/dist/validators/plugin-hosted-shape.d.ts +1 -1
  183. package/dist/validators/plugin-hosted-shape.d.ts.map +1 -1
  184. package/dist/validators/plugin-hosted-shape.js +1 -1
  185. package/dist/validators/plugin-hosted-shape.js.map +1 -1
  186. package/dist/validators/plugin-recommended-fields.d.ts +1 -1
  187. package/dist/validators/plugin-recommended-fields.d.ts.map +1 -1
  188. package/dist/validators/plugin-recommended-fields.js +1 -1
  189. package/dist/validators/plugin-recommended-fields.js.map +1 -1
  190. package/dist/validators/registry-validator.js +1 -1
  191. package/dist/validators/registry-validator.js.map +1 -1
  192. package/dist/validators/rule-engine/rule-engine.d.ts +1 -1
  193. package/dist/validators/rule-engine/rule-engine.d.ts.map +1 -1
  194. package/dist/validators/rule-engine/rule-engine.js +20 -9
  195. package/dist/validators/rule-engine/rule-engine.js.map +1 -1
  196. package/dist/validators/skill-validator.d.ts.map +1 -1
  197. package/dist/validators/skill-validator.js +21 -3
  198. package/dist/validators/skill-validator.js.map +1 -1
  199. package/dist/validators/types.d.ts +1 -1
  200. package/dist/validators/types.d.ts.map +1 -1
  201. package/dist/validators/unified-validator.js +1 -1
  202. package/dist/validators/unified-validator.js.map +1 -1
  203. package/dist/validators/validation-rules.d.ts +1 -1
  204. package/dist/validators/validation-rules.d.ts.map +1 -1
  205. package/dist/validators/walker-to-issues.d.ts +7 -3
  206. package/dist/validators/walker-to-issues.d.ts.map +1 -1
  207. package/dist/validators/walker-to-issues.js +37 -8
  208. package/dist/validators/walker-to-issues.js.map +1 -1
  209. package/dist/walk-link-graph.d.ts +2 -1
  210. package/dist/walk-link-graph.d.ts.map +1 -1
  211. package/dist/walk-link-graph.js +37 -2
  212. package/dist/walk-link-graph.js.map +1 -1
  213. package/package.json +7 -7
@@ -0,0 +1,247 @@
1
+ /**
2
+ * The **skill** extent, expressed as the generic closure primitive plus a
3
+ * declaration — zones.md §7.3's adequacy test, run for real.
4
+ *
5
+ * §7.3 requires that *a built-in extent must be expressible the way a
6
+ * config-declared one would be*. A skill bundle is the hardest case VAT has,
7
+ * because a privileged walker (`walk-link-graph.ts`) already computes it, so
8
+ * this module is the falsification: it translates a `SkillPackagingConfig` into
9
+ * an {@link ExtentDeclaration} and hands it to `ClosureExtentContributor`. There
10
+ * is deliberately **no bespoke walker here**. A second walker that passed its
11
+ * own tests would prove nothing about the primitive — it would only prove that
12
+ * the skill contributor can stay privileged, which is the outcome §17 risk 3
13
+ * asks about.
14
+ *
15
+ * ## What the primitive expresses, measured against the shipped walker
16
+ *
17
+ * The equality experiment lives in `test/projection-skill-extent.test.ts`, and
18
+ * its result is that **membership** agrees exactly on a corpus whose every link
19
+ * target is an ordinary reachable file, and — since the primitive gained a
20
+ * labelled `refusals` cascade plus `admitPaths` — on three of the cascade
21
+ * discriminators that used to diverge, and now on their REASONS as well. What
22
+ * remains is listed below. Stated here rather than in a report, because a reader
23
+ * reaching for this translation needs the boundary, not the anecdote:
24
+ *
25
+ * | Walker feature | Verdict |
26
+ * |---|---|
27
+ * | `linkFollowDepth` *membership* | **expressible** — same union, same off-by-one (`depth < maxDepth`) |
28
+ * | `depth-exceeded` *the REASON* | **expressible** — and it moved out of the not-expressible list once the primitive stopped guarding ENUMERATION on `maxDepth` and started guarding only ADMISSION. A member at the bound now has its references resolved and judged, and one the budget alone turns away becomes a `CLOSURE_DEPTH_EXCEEDED` condition carrying the same provenance a refusal does. This is the one verdict a DECLARATION states directly rather than through a `refusals` rule, so it carries no label and `matchedPattern` is null — which is exactly what the walker's own row says (`makeExclusion` attaches `matchedRule` only for `pattern-matched`) |
29
+ * | `excludeReferencesFromBundle` *membership* | **expressible** — first-match-wins and any-match select the same file set; carried as ONE refusal rule per declared rule, in declared order, which selects the same set the flat union did |
30
+ * | `excludeReferencesFromBundle` *WHICH rule matched* | **expressible** — one refusal rule apiece means the primitive's first-match-wins scan is `excludeMatchers.find(...)`'s scan, and the winner's first pattern lands in `realization_conditions.matchedPattern`, the column `packaging-validator.ts` reads as `matchedRule.patterns[0]` |
31
+ * | `excludeReferencesFromBundle` *`template` payload* | **expressible** — carried verbatim in `ExtentRefusalRule.payload` (opaque to the primitive) and reported as `realization_conditions.matchedPayload`, beside the rule's declared index. ⚠️ Never MEASURED against the walker: no shipped config declares a `template`, so the corpus shadow synthesizes one to compare the two arms |
32
+ * | `excludeNavigationFiles` | **expressible** — a refusal rule over `NAVIGATION_FILE_PATTERNS`, gated on the knob exactly as `classifyExclusion` gates its branch |
33
+ * | `agent-instruction-file` *membership* | **expressible** — a refusal rule over `AGENT_INSTRUCTION_FILE_PATTERNS`, unconditionally, and the explicit-`files:` escape hatch becomes `admitPaths` (see {@link declaredAgentInstructionSources}) |
34
+ * | `directory-target` *membership* | **expressible** — a refusal rule over `kinds: ['directory']`, which reads `resources.kind`; a path glob cannot express it, because a directory's path is shaped like a file's |
35
+ * | the REASON of those four exclusions | **expressible** — each refusal rule carries a `label`, and the first-match-wins order is `classifyExclusion`'s own branch order, so the refusal reports `SKILL_REFUSED_DIRECTORY_TARGET` where the walker reports `directory-target`. Pinned by the corpus shadow's reason-mismatch bucket, not asserted here |
36
+ * | `deferredArtifacts` (`files:`) | **not expressible** — its three-way classification is keyed on filesystem existence and on gitignore, and the closure does no I/O by construction. Only the ONE fact `admitPaths` needs — which sources are explicit, non-glob agent-instruction files — is a pure function of the config, which is why that much survives the translation |
37
+ * | `gitignored` | **expressible, CONDITIONALLY** — a COLUMN match, not an oracle: `resource_realizations.gitignored` is a first-class boolean the registry crawl fills, and `ExtentRefusalRule.flags` reads boolean columns. Carried as `{ gitignored: true, exists: true }` — a CONJUNCTION, because `classifyGitignored` is existence-gated — and emitted only when the population has a `GitTracker`, since without one the column is `false` on every row. ⚠️ Two bounds: the WALKER needs no tracker (it spawns `git check-ignore`), so the arms diverge in the no-tracker state; and `classifyGitignoredTarget` turns a gitignored `files:` DEST into a `deferred` verdict rather than a refusal, which no declaration can say (`admitPaths` would make it a member) |
38
+ * | `skill-definition` | **expressible**, as two halves that were always two verdicts under one `if`. The cross-skill half is an ordinary `basenames: ['SKILL.md']` rule, sitting between the agent-instruction rule and the globs exactly where `classifyExclusion` puts it. The self-link half is the walker's `{ kind: 'skipped' }`, and it is not a rule: the PRIMITIVE now skips a reference resolving to `closureFrom`, because the root is a member by declaration in any closure — see `closure-extent.ts`'s `hopFor`. ⚠️ The walker compares the basename with `===`; `basenames` folds case, so `Skill.md` diverges — see {@link SKILL_DEFINITION_BASENAME} |
39
+ * | `outside-project` | **expressible as a REASON, not as a full row** — and it never needed an oracle: `relativize` states every path against the root, and one the root does not contain comes back `..`-prefixed. It was a LABELLING gap, not a knowledge gap; the closure knew, and reported `CLOSURE_REFERENCE_UNRESOLVED`, which is true and useless. It is now `CLOSURE_REFERENCE_OUTSIDE_ROOT`, naming the same target the walker's row names. ⚠️ `targetExists` stays null: the walker `stat`s the escaping path, a projection populated from one root observes nothing outside it |
40
+ * | `missing-target` | **not expressible** — and NOT for the reason the column suggests. `exists` is a real column and `flags` reads it, but no rule can ever fire on it here: a path that is not on disk is never ENUMERATED, so it has no realization for a candidate to be, and the reference resolves to nothing long before the cascade runs. The producer is structurally blind, so the matcher is dead. The fact is still reported — as `CLOSURE_REFERENCE_UNRESOLVED` — but that code conflates "absent" with "present and not enumerated by any contributor", and only a filesystem probe separates them |
41
+ * | routable vs non-routable | **not expressible** (reasoned, not measured — the corpus has no HTML), and the earlier reason given here was wrong. The declaration is not short of a COLUMN: `resource_realizations.ext` carries the extension and `blobs.contentKey` is literally `<parserKind>.<sha256>`. What it is short of is a VERDICT: `isRoutable` makes an HTML page a member that is not traversed THROUGH, and the primitive has no admit-but-do-not-traverse outcome — a refusal would drop a file the walker bundles. Expressing it means a new verdict in the primitive, not a new matcher |
42
+ * | `unreadable-target` | **not expressible** — the one genuine oracle left. It is `existsSync` true AND `statSync` throwing anyway, a read outcome no column records: `contentState: 'unreadable'` is a *different* fact (a BYTE read that threw) and is demand-driven besides, so a path nobody asked to hash reads `deferred` whether or not it is stattable |
43
+ * | a refusal's PROVENANCE (`sourcePath`, `sourceLine`, `linkHref`, `targetExists`, `matchedRule`) | **expressible** — `realization_conditions` gained the six columns (projection schema v4), the closure fills them at the refusal site, and every one of the five is compared field by field against the walker's own row by the corpus shadow's provenance bucket |
44
+ *
45
+ * Read the membership, reason and provenance rows together: the primitive now
46
+ * selects the same files for those causes, names the same cause, and carries the
47
+ * same `sourcePath`/`sourceLine`/`linkHref`/`targetExists`/matched-rule
48
+ * provenance the walker attaches to a refusal.
49
+ *
50
+ * ## The residue is TWO reasons, not six — and one of them is not an oracle problem
51
+ *
52
+ * The count above used to be six, and four of those six were stale. Three had
53
+ * gained the machinery to express them (`gitignored` became a boolean column of
54
+ * the realization row; `outside-project` was always path math the closure was
55
+ * already doing; `skill-definition` needed one basename rule plus a self-link
56
+ * rule the primitive owes every closure), and one — `missing-target` — was
57
+ * inexpressible for a completely different reason than "no oracle": its matcher
58
+ * exists and can never fire, because the producer never emits the row it would
59
+ * match.
60
+ *
61
+ * What is left is `unreadable-target`, a genuine filesystem read outcome, and
62
+ * routability, which needs a new VERDICT in the primitive rather than a new
63
+ * matcher. Both are stated above with the evidence for the claim, because a
64
+ * boundary list that is never re-derived is how four verdicts stayed wrong for
65
+ * three increments.
66
+ *
67
+ * ⚠️ **Neither new verdict is measured against the walker on the real corpus,
68
+ * and they are not equally unmeasured elsewhere. Stated per verdict, because an
69
+ * aggregate "verified" would be false for one of them.**
70
+ *
71
+ * - **`skill-definition` IS measured against the walker, at FIXTURE scale.**
72
+ * `projection-skill-extent.test.ts` builds a corpus containing a sibling
73
+ * `skills/tool-b/SKILL.md`, and that divergence — named there, as a
74
+ * one-element equality — closes when this rule lands.
75
+ * - **`gitignored` is reasoned, not measured against the walker anywhere.** The
76
+ * `flags` conjunction it is made of has its own falsifying case in
77
+ * `projection-closure-extent.test.ts` (including the `exists: false` control
78
+ * that separates AND from OR), but no fixture yet links a skill to a gitignored
79
+ * file with both arms running, so no two-arm comparison has ever exercised it.
80
+ *
81
+ * Neither is reachable on the REAL corpus, and that is asserted rather than
82
+ * assumed: the corpus shadow was green with both verdicts unexpressed, which is
83
+ * possible only if no declared skill links to a gitignored file or to another
84
+ * skill's SKILL.md, and both populations are now pinned at zero there. The day a
85
+ * link appears the test fails and the reader learns the corpus grew teeth
86
+ * ([[fixtures-that-cannot-distinguish]]).
87
+ *
88
+ * The `excludeNavigationFiles` row is the one worth reading twice, because the
89
+ * shape of its extension is the argument for why a rule needs a basename matcher
90
+ * and not a cleverer glob: `isNavigationBasename` matches a **case-insensitive
91
+ * basename set** (`README.md`, `index.md`, …), while `patterns` is picomatch
92
+ * over a root-relative path. A brace alternation over `README` / `readme` /
93
+ * `Readme` enumerates spellings a case-insensitive filesystem generates freely,
94
+ * so the approximation silently under-matches exactly where the walker's comment
95
+ * says it must not (`Claude.md` is loaded as instructions on APFS just as
96
+ * `CLAUDE.md` is). The honest extension was a declared basename set, and it is
97
+ * what `ExtentRefusalRule.basenames` is.
98
+ *
99
+ * ## `closureFrom` is stated in projection coordinates
100
+ *
101
+ * {@link skillExtentDeclaration} takes the SKILL.md path **relative to the
102
+ * corpus root**, the way `resource_realizations.path` spells it, because that is
103
+ * the only coordinate system `closureFrom` is resolved in. The packager works in
104
+ * absolute paths; converting is the caller's job precisely because the caller is
105
+ * the one holding the root.
106
+ */
107
+ import { type ContributorStratum, type ExtentContribution, type ExtentContributor, type ExtentDeclaration, type JsonValue, type ProjectionBase, type SkillPackagingConfig } from '@vibe-agent-toolkit/resources';
108
+ /**
109
+ * `zone_provenance.contributorId` prefix for a skill extent.
110
+ *
111
+ * **Per-skill, not fixed.** The plan specced a bare `builtin:skill`, which was
112
+ * written before anyone asked how many skills a corpus has:
113
+ * `ContributorRegistry.register` refuses a duplicate id, so a fixed id caps a
114
+ * population at **one** skill extent — and this repo alone ships thirteen. The
115
+ * extent ids were already distinct (the skill name is the within-root
116
+ * discriminator); only the contributor key space collided. Nothing schema-level
117
+ * objects: `zone_provenance.contributorId` is an open string.
118
+ */
119
+ export declare const SKILL_EXTENT_CONTRIBUTOR_ID_PREFIX = "builtin:skill";
120
+ /**
121
+ * The `zone_provenance.contributorId` for one skill's extent.
122
+ *
123
+ * @param skillName - The skill's name
124
+ * @returns The contributor id, unique per skill
125
+ */
126
+ export declare function skillExtentContributorId(skillName: string): string;
127
+ /** The `resolution_contexts.kind` a skill extent has. */
128
+ export declare const SKILL_EXTENT_KIND = "skill";
129
+ /**
130
+ * The refusal labels this translation supplies — **one per branch of the walker's
131
+ * exclusion cascade that a declaration can express**, and that property rather
132
+ * than a count is the definition: every `SKILL_REFUSED_*` constant below is a
133
+ * member, so adding a branch adds a member without falsifying this line. (The
134
+ * branches come from three classifiers, not one: `classifyExclusion`,
135
+ * `classifyPathKind` and `classifyGitignored` — each label's own doc line names
136
+ * which.)
137
+ *
138
+ * SCREAMING_SNAKE because they land in `realization_conditions.code`, whose two
139
+ * existing members (`CLOSURE_REFERENCE_UNRESOLVED`, `CLOSURE_ROOT_ABSENT`) set
140
+ * that convention. Prefixed `SKILL_REFUSED_` because that column is an OPEN
141
+ * vocabulary shared by every contributor in a population: a bare
142
+ * `DIRECTORY_TARGET` would not say whose cascade decided it.
143
+ *
144
+ * The walker reason each one stands for is in its own doc line, and that mapping
145
+ * is asserted end-to-end by the corpus shadow's reason-mismatch bucket rather
146
+ * than trusted — see `projection-skill-extent-corpus.integration.test.ts`.
147
+ */
148
+ /** `classifyPathKind`'s `directory-target`. */
149
+ export declare const SKILL_REFUSED_DIRECTORY_TARGET = "SKILL_REFUSED_DIRECTORY_TARGET";
150
+ /** `classifyExclusion`'s `navigation-file`. */
151
+ export declare const SKILL_REFUSED_NAVIGATION_FILE = "SKILL_REFUSED_NAVIGATION_FILE";
152
+ /** `classifyExclusion`'s `agent-instruction-file`. */
153
+ export declare const SKILL_REFUSED_AGENT_INSTRUCTION_FILE = "SKILL_REFUSED_AGENT_INSTRUCTION_FILE";
154
+ /** `classifyExclusion`'s `pattern-matched`, from `excludeReferencesFromBundle`. */
155
+ export declare const SKILL_REFUSED_PATTERN_MATCHED = "SKILL_REFUSED_PATTERN_MATCHED";
156
+ /**
157
+ * `classifyExclusion`'s `skill-definition` — ANOTHER skill's SKILL.md.
158
+ *
159
+ * Only the cross-skill half. The walker's branch is two verdicts wearing one
160
+ * `if`: a link to a *sibling's* SKILL.md is this refusal, and a link back to the
161
+ * walk's OWN `skillRootPath` is `{ kind: 'skipped' }` — recorded nowhere. The
162
+ * declaration expresses the first as an ordinary basename rule; the second is
163
+ * not a rule at all, and it is the primitive that supplies it, because a
164
+ * reference to `closureFrom` is a self-link in any closure and not a fact about
165
+ * skills (see `closure-extent.ts`'s `hopFor`).
166
+ */
167
+ export declare const SKILL_REFUSED_SKILL_DEFINITION = "SKILL_REFUSED_SKILL_DEFINITION";
168
+ /** `classifyGitignored`'s `gitignored`, existence-gated exactly as that branch is. */
169
+ export declare const SKILL_REFUSED_GITIGNORED = "SKILL_REFUSED_GITIGNORED";
170
+ /**
171
+ * Translate a skill's packaging config into a closure-extent declaration.
172
+ *
173
+ * This is the whole of the skill extent's behaviour: everything else is the
174
+ * generic contributor. `linkFollowDepth` becomes `maxDepth` unchanged (same
175
+ * `number | 'full'` union, same meaning of a hop), and {@link skillRefusals}
176
+ * becomes the cascade — one rule per `classifyExclusion` branch this translation
177
+ * can express, in that function's own order.
178
+ *
179
+ * ⚠️ This paragraph used to say the `excludeReferencesFromBundle` rules
180
+ * "flatten into ONE labelled refusal rule". They have not since the increment
181
+ * that restored `matchedRule`: they expand to one rule EACH, in declared order,
182
+ * which is what lets `realization_conditions.matchedPattern` name WHICH rule
183
+ * caught a file. The `template` it also said the primitive had "nowhere to put"
184
+ * rides in that rule's opaque `payload`.
185
+ *
186
+ * `follow` is left to the schema default (the three markdown forms), matching
187
+ * the walker: it processes only `isLocalFileLink` links off the markdown AST, so
188
+ * an `@`-prefixed or bare token is not an edge on either side.
189
+ *
190
+ * @param config - The skill's `skills.config.<name>` packaging block
191
+ * @param skillPath - The SKILL.md path **relative to the corpus root**, forward-slashed
192
+ * @param hasGitTracker - Whether the population this declaration will run in was
193
+ * given a usable git oracle. Not "should gitignored files be refused": the
194
+ * column that rule reads is unfilled without one, so declaring it anyway would
195
+ * claim a branch that cannot run. REQUIRED rather than defaulted, because a
196
+ * defaulted `false` would let a caller that does have a tracker silently ship a
197
+ * declaration missing the last rule of the cascade — a no-op wearing a fix
198
+ * @returns The declaration, schema-parsed so every default is materialized
199
+ * @throws When the resulting declaration is not schema-valid — e.g. an empty `skillPath`
200
+ */
201
+ export declare function skillExtentDeclaration(config: SkillPackagingConfig, skillPath: string, hasGitTracker: boolean): ExtentDeclaration;
202
+ /**
203
+ * The skill extent — `ClosureExtentContributor` under a fixed id and kind.
204
+ *
205
+ * Delegation rather than inheritance, and the thinness is the finding: if this
206
+ * class needed to *do* anything, the closure primitive would have been
207
+ * inadequate and the skill contributor would have stayed privileged. It owns
208
+ * only the two things the registry reads before `contribute` runs — a stable
209
+ * `id` for `zone_provenance`, and the `kind` `ContributorRegistry.forKind`
210
+ * partitions on.
211
+ *
212
+ * **One instance per skill**, keyed by {@link skillExtentContributorId}. A fixed
213
+ * id would cap a population at one skill extent, because
214
+ * `ContributorRegistry.register` refuses a duplicate — see that function.
215
+ */
216
+ export declare class SkillExtentContributor implements ExtentContributor {
217
+ #private;
218
+ readonly id: string;
219
+ readonly kind: string;
220
+ readonly stratum: ContributorStratum;
221
+ /**
222
+ * Delegated, never restated: this contributor's `contribute` is the
223
+ * delegate's, so whether it reads blob-keyed tables is the delegate's answer
224
+ * and a hard-coded `true` here would be a second copy free to drift.
225
+ */
226
+ get readsBlobs(): boolean;
227
+ /**
228
+ * @param skillName - The skill's name. Discriminates both the contributor id
229
+ * and, through the delegate, the extent's within-root context id — one
230
+ * source for both, so the two cannot drift apart.
231
+ */
232
+ constructor(skillName: string);
233
+ /**
234
+ * Produce the skill extent by running the closure primitive.
235
+ *
236
+ * Not `async`: the delegate's promise is returned directly, so there is no
237
+ * second microtask and no place for this method to add behaviour.
238
+ *
239
+ * @param base - Everything merged so far — the realizations a reference can
240
+ * resolve to, and the `blob_references` rows that are the edges
241
+ * @param parameters - A {@link skillExtentDeclaration} result, arriving as
242
+ * config data exactly as a user-declared extent would
243
+ * @returns The extent's context, members, realizations and conditions
244
+ */
245
+ contribute(base: ProjectionBase, parameters: JsonValue): Promise<ExtentContribution>;
246
+ }
247
+ //# sourceMappingURL=skill-extent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-extent.d.ts","sourceRoot":"","sources":["../../src/projection/skill-extent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyGG;AAIH,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEtB,KAAK,SAAS,EACd,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,+BAA+B,CAAC;AASvC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kCAAkC,kBAAkB,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAElE;AAED,yDAAyD;AACzD,eAAO,MAAM,iBAAiB,UAAU,CAAC;AAyCzC;;;;;;;;;;;;;;;;;;GAkBG;AACH,+CAA+C;AAC/C,eAAO,MAAM,8BAA8B,mCAAmC,CAAC;AAE/E,+CAA+C;AAC/C,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAE7E,sDAAsD;AACtD,eAAO,MAAM,oCAAoC,yCAAyC,CAAC;AAE3F,mFAAmF;AACnF,eAAO,MAAM,6BAA6B,kCAAkC,CAAC;AAE7E;;;;;;;;;;GAUG;AACH,eAAO,MAAM,8BAA8B,mCAAmC,CAAC;AAE/E,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AA+QnE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,oBAAoB,EAC5B,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,OAAO,GACrB,iBAAiB,CAQnB;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,sBAAuB,YAAW,iBAAiB;;IAC9D,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAqB;IAE1C,QAAQ,CAAC,OAAO,EAAE,kBAAkB,CAAa;IAKjD;;;;OAIG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;OAIG;gBACS,SAAS,EAAE,MAAM;IAK7B;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAGrF"}