@vibe-agent-toolkit/agent-skills 0.1.38 → 0.1.39-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/index.d.ts +2 -4
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/inventory/detectors/declared-but-missing.d.ts +1 -1
  6. package/dist/inventory/detectors/declared-but-missing.d.ts.map +1 -1
  7. package/dist/inventory/detectors/declared-but-missing.js.map +1 -1
  8. package/dist/inventory/detectors/marketplace-source-missing.d.ts +1 -1
  9. package/dist/inventory/detectors/marketplace-source-missing.d.ts.map +1 -1
  10. package/dist/inventory/detectors/marketplace-source-missing.js.map +1 -1
  11. package/dist/inventory/detectors/present-but-undeclared.d.ts +1 -1
  12. package/dist/inventory/detectors/present-but-undeclared.d.ts.map +1 -1
  13. package/dist/inventory/detectors/present-but-undeclared.js.map +1 -1
  14. package/dist/inventory/detectors/reference-target-missing.d.ts +1 -1
  15. package/dist/inventory/detectors/reference-target-missing.d.ts.map +1 -1
  16. package/dist/inventory/detectors/reference-target-missing.js.map +1 -1
  17. package/dist/post-build-checks.d.ts +6 -6
  18. package/dist/post-build-checks.d.ts.map +1 -1
  19. package/dist/post-build-checks.js +105 -54
  20. package/dist/post-build-checks.js.map +1 -1
  21. package/dist/skill-packager.d.ts +1 -2
  22. package/dist/skill-packager.d.ts.map +1 -1
  23. package/dist/skill-packager.js +28 -8
  24. package/dist/skill-packager.js.map +1 -1
  25. package/dist/validators/bundled-resource-link-detection.d.ts +1 -1
  26. package/dist/validators/bundled-resource-link-detection.d.ts.map +1 -1
  27. package/dist/validators/bundled-resource-link-detection.js +1 -1
  28. package/dist/validators/bundled-resource-link-detection.js.map +1 -1
  29. package/dist/validators/compat-detectors.d.ts +1 -1
  30. package/dist/validators/compat-detectors.d.ts.map +1 -1
  31. package/dist/validators/compat-detectors.js +1 -1
  32. package/dist/validators/compat-detectors.js.map +1 -1
  33. package/dist/validators/cross-skill-dependency-detection.d.ts +1 -1
  34. package/dist/validators/cross-skill-dependency-detection.d.ts.map +1 -1
  35. package/dist/validators/cross-skill-dependency-detection.js +1 -1
  36. package/dist/validators/cross-skill-dependency-detection.js.map +1 -1
  37. package/dist/validators/description-style-detection.d.ts +1 -1
  38. package/dist/validators/description-style-detection.d.ts.map +1 -1
  39. package/dist/validators/description-style-detection.js +1 -1
  40. package/dist/validators/description-style-detection.js.map +1 -1
  41. package/dist/validators/frontmatter-validation.d.ts +1 -1
  42. package/dist/validators/frontmatter-validation.d.ts.map +1 -1
  43. package/dist/validators/frontmatter-validation.js +1 -1
  44. package/dist/validators/frontmatter-validation.js.map +1 -1
  45. package/dist/validators/imperative-body-detection.d.ts +1 -1
  46. package/dist/validators/imperative-body-detection.d.ts.map +1 -1
  47. package/dist/validators/imperative-body-detection.js +1 -1
  48. package/dist/validators/imperative-body-detection.js.map +1 -1
  49. package/dist/validators/index.d.ts +2 -1
  50. package/dist/validators/index.d.ts.map +1 -1
  51. package/dist/validators/kebab-case-detection.d.ts +1 -1
  52. package/dist/validators/kebab-case-detection.d.ts.map +1 -1
  53. package/dist/validators/kebab-case-detection.js +1 -1
  54. package/dist/validators/kebab-case-detection.js.map +1 -1
  55. package/dist/validators/marketplace-validator.d.ts.map +1 -1
  56. package/dist/validators/marketplace-validator.js.map +1 -1
  57. package/dist/validators/packaging-validator.d.ts +1 -3
  58. package/dist/validators/packaging-validator.d.ts.map +1 -1
  59. package/dist/validators/packaging-validator.js +20 -7
  60. package/dist/validators/packaging-validator.js.map +1 -1
  61. package/dist/validators/plugin-recommended-fields.d.ts +1 -1
  62. package/dist/validators/plugin-recommended-fields.d.ts.map +1 -1
  63. package/dist/validators/plugin-recommended-fields.js +1 -1
  64. package/dist/validators/plugin-recommended-fields.js.map +1 -1
  65. package/dist/validators/registry-validator.d.ts.map +1 -1
  66. package/dist/validators/registry-validator.js.map +1 -1
  67. package/dist/validators/skill-validator.d.ts.map +1 -1
  68. package/dist/validators/skill-validator.js +4 -3
  69. package/dist/validators/skill-validator.js.map +1 -1
  70. package/dist/validators/types.d.ts +1 -20
  71. package/dist/validators/types.d.ts.map +1 -1
  72. package/dist/validators/validation-rules.d.ts +1 -1
  73. package/dist/validators/validation-rules.d.ts.map +1 -1
  74. package/dist/validators/validation-rules.js +2 -2
  75. package/dist/validators/validation-rules.js.map +1 -1
  76. package/dist/validators/validation-utils.d.ts +1 -1
  77. package/dist/validators/validation-utils.d.ts.map +1 -1
  78. package/dist/validators/validation-utils.js.map +1 -1
  79. package/dist/validators/walker-to-issues.d.ts +1 -1
  80. package/dist/validators/walker-to-issues.d.ts.map +1 -1
  81. package/dist/validators/walker-to-issues.js +7 -2
  82. package/dist/validators/walker-to-issues.js.map +1 -1
  83. package/dist/walk-link-graph.d.ts.map +1 -1
  84. package/dist/walk-link-graph.js +2 -1
  85. package/dist/walk-link-graph.js.map +1 -1
  86. package/package.json +6 -5
  87. package/dist/validators/allow-filter.d.ts +0 -37
  88. package/dist/validators/allow-filter.d.ts.map +0 -1
  89. package/dist/validators/allow-filter.js +0 -86
  90. package/dist/validators/allow-filter.js.map +0 -1
  91. package/dist/validators/code-registry.d.ts +0 -23
  92. package/dist/validators/code-registry.d.ts.map +0 -1
  93. package/dist/validators/code-registry.js +0 -58
  94. package/dist/validators/code-registry.js.map +0 -1
  95. package/dist/validators/severity-resolver.d.ts +0 -6
  96. package/dist/validators/severity-resolver.d.ts.map +0 -1
  97. package/dist/validators/severity-resolver.js +0 -9
  98. package/dist/validators/severity-resolver.js.map +0 -1
  99. package/dist/validators/validation-framework.d.ts +0 -21
  100. package/dist/validators/validation-framework.d.ts.map +0 -1
  101. package/dist/validators/validation-framework.js +0 -67
  102. package/dist/validators/validation-framework.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"allow-filter.d.ts","sourceRoot":"","sources":["../../src/validators/allow-filter.ts"],"names":[],"mappings":"AAEA,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omatch';
2
- function isExpired(expires, now) {
3
- if (!expires)
4
- return false;
5
- const parsed = Date.parse(expires);
6
- return Number.isFinite(parsed) && parsed < now.getTime();
7
- }
8
- function buildMatchers(allowByCode) {
9
- const matchers = new Map();
10
- for (const [code, entries] of Object.entries(allowByCode)) {
11
- if (!entries)
12
- continue;
13
- // `dot: true` — adopter paths often contain dotfile segments (.claude/,
14
- // .worktrees/, .config/). Without it `picomatch('**/*')` silently fails
15
- // to match any path traversing a dotfile dir, so allow entries are
16
- // never applied. The path was given to us by the validator; we are not
17
- // doing glob discovery on the filesystem.
18
- // `dot: true` — adopter paths often contain dotfile segments (.claude/,
19
- // .worktrees/, .config/). Without it `picomatch('**/*')` silently fails
20
- // to match any path traversing a dotfile dir, so allow entries are
21
- // never applied. The path was given to us by the validator; we are not
22
- // doing glob discovery on the filesystem.
23
- matchers.set(code, entries.map(e => ({ entry: e, match: picomatch(e.paths, { dot: true }), used: false })));
24
- }
25
- return matchers;
26
- }
27
- function collectExpiredAndUnused(matchers, allowed, now) {
28
- const expired = [];
29
- const unused = [];
30
- for (const [code, list] of matchers) {
31
- for (const m of list) {
32
- if (isExpired(m.entry.expires, now)) {
33
- const matchedLocations = allowed
34
- .filter(a => a.code === code && a.reason === m.entry.reason)
35
- .map(a => a.location);
36
- expired.push({
37
- code,
38
- reason: m.entry.reason,
39
- expires: m.entry.expires,
40
- matchedLocations,
41
- });
42
- }
43
- if (!m.used) {
44
- const unusedRecord = {
45
- code,
46
- paths: m.entry.paths,
47
- reason: m.entry.reason,
48
- };
49
- if (m.entry.expires !== undefined) {
50
- unusedRecord.expires = m.entry.expires;
51
- }
52
- unused.push(unusedRecord);
53
- }
54
- }
55
- }
56
- return { expired, unused };
57
- }
58
- export function applyAllowFilter(issues, config, now = new Date()) {
59
- const emitted = [];
60
- const allowed = [];
61
- const matchers = buildMatchers(config.allow ?? {});
62
- for (const issue of issues) {
63
- const code = issue.code;
64
- const byCode = matchers.get(code);
65
- const location = issue.location ?? '';
66
- const hit = byCode?.find(m => m.match(location));
67
- if (hit) {
68
- hit.used = true;
69
- const record = {
70
- code,
71
- location,
72
- reason: hit.entry.reason,
73
- };
74
- if (hit.entry.expires !== undefined) {
75
- record.expires = hit.entry.expires;
76
- }
77
- allowed.push(record);
78
- }
79
- else {
80
- emitted.push(issue);
81
- }
82
- }
83
- const { expired, unused } = collectExpiredAndUnused(matchers, allowed, now);
84
- return { emitted, allowed, expired, unused };
85
- }
86
- //# sourceMappingURL=allow-filter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"allow-filter.js","sourceRoot":"","sources":["../../src/validators/allow-filter.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAkDlC,SAAS,SAAS,CAAC,OAA2B,EAAE,GAAS;IACvD,IAAI,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,MAAM,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;AAC3D,CAAC;AAED,SAAS,aAAa,CACpB,WAAqD;IAErD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAA8B,CAAC;IACvD,KAAK,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAiD,EAAE,CAAC;QAC1G,IAAI,CAAC,OAAO;YAAE,SAAS;QACvB,wEAAwE;QACxE,wEAAwE;QACxE,mEAAmE;QACnE,uEAAuE;QACvE,0CAA0C;QAC1C,wEAAwE;QACxE,wEAAwE;QACxE,mEAAmE;QACnE,uEAAuE;QACvE,0CAA0C;QAC1C,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CA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QACtB,CAAC;IACH,CAAC;IAED,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAC;IAE5E,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;AAC/C,CAAC"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Canonical code registry.
3
- *
4
- * Single source of truth for every overridable validation code VAT emits.
5
- * Describes default severity, human description, fix hint, and a stable
6
- * reference anchor into docs/validation-codes.md.
7
- *
8
- * Renderers (CLI help, skill docs, runtime output) all pull from this
9
- * registry — no duplication.
10
- */
11
- export type IssueSeverity = 'error' | 'warning' | 'info' | 'ignore';
12
- /** Non-ignore severities actually emitted to consumers. */
13
- export type EmittedSeverity = Exclude<IssueSeverity, 'ignore'>;
14
- export type IssueCode = 'LINK_OUTSIDE_PROJECT' | 'LINK_TARGETS_DIRECTORY' | 'LINK_TO_NAVIGATION_FILE' | 'LINK_TO_GITIGNORED_FILE' | 'LINK_MISSING_TARGET' | 'LINK_TO_SKILL_DEFINITION' | 'LINK_DROPPED_BY_DEPTH' | 'PACKAGED_UNREFERENCED_FILE' | 'PACKAGED_BROKEN_LINK' | 'SKILL_LENGTH_EXCEEDS_RECOMMENDED' | 'SKILL_TOTAL_SIZE_LARGE' | 'SKILL_TOO_MANY_FILES' | 'REFERENCE_TOO_DEEP' | 'DESCRIPTION_TOO_VAGUE' | 'NO_PROGRESSIVE_DISCLOSURE' | 'SKILL_DESCRIPTION_OVER_CLAUDE_CODE_LIMIT' | 'SKILL_DESCRIPTION_FILLER_OPENER' | 'SKILL_DESCRIPTION_WRONG_PERSON' | 'SKILL_CLAUDE_PLUGIN_NAME_MISMATCH' | 'SKILL_NAME_MISMATCHES_DIR' | 'RESERVED_WORD_IN_NAME' | 'SKILL_TIME_SENSITIVE_CONTENT' | 'SKILL_FRONTMATTER_EXTRA_FIELDS' | 'SKILL_CROSS_SKILL_AUTH_UNDECLARED' | 'SKILL_DESCRIPTION_STYLE_MIXED_IN_PACKAGE' | 'PLUGIN_MISSING_DESCRIPTION' | 'PLUGIN_MISSING_AUTHOR' | 'PLUGIN_MISSING_LICENSE' | 'PLUGIN_NAME_NOT_KEBAB_CASE' | 'SKILL_NAME_NOT_KEBAB_CASE' | 'SKILL_REFERENCES_BUT_NO_LINKS' | 'SKILL_BODY_NOT_IMPERATIVE' | 'CAPABILITY_LOCAL_SHELL' | 'CAPABILITY_EXTERNAL_CLI' | 'CAPABILITY_BROWSER_AUTH' | 'COMPAT_TARGET_INCOMPATIBLE' | 'COMPAT_TARGET_NEEDS_REVIEW' | 'COMPAT_TARGET_UNDECLARED' | 'ALLOW_EXPIRED' | 'ALLOW_UNUSED' | 'COMPONENT_DECLARED_BUT_MISSING' | 'COMPONENT_PRESENT_BUT_UNDECLARED' | 'REFERENCE_TARGET_MISSING' | 'MARKETPLACE_PLUGIN_SOURCE_MISSING';
15
- export interface CodeRegistryEntry {
16
- defaultSeverity: EmittedSeverity;
17
- description: string;
18
- fix: string;
19
- /** Stable anchor into docs/validation-codes.md (e.g. '#link_outside_project'). */
20
- reference: string;
21
- }
22
- export declare const CODE_REGISTRY: Record<IssueCode, CodeRegistryEntry>;
23
- //# sourceMappingURL=code-registry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-registry.d.ts","sourceRoot":"","sources":["../../src/validators/code-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpE,2DAA2D;AAC3D,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAC;AAE/D,MAAM,MAAM,SAAS,GAEjB,sBAAsB,GACtB,wBAAwB,GACxB,yBAAyB,GACzB,yBAAyB,GACzB,qBAAqB,GACrB,0BAA0B,GAE1B,uBAAuB,GACvB,4BAA4B,GAC5B,sBAAsB,GAEtB,kCAAkC,GAClC,wBAAwB,GACxB,sBAAsB,GACtB,oBAAoB,GACpB,uBAAuB,GACvB,2BAA2B,GAC3B,0CAA0C,GAC1C,iCAAiC,GACjC,gCAAgC,GAChC,mCAAmC,GACnC,2BAA2B,GAC3B,uBAAuB,GACvB,8BAA8B,GAC9B,gCAAgC,GAChC,mCAAmC,GACnC,0CAA0C,GAE1C,4BAA4B,GAC5B,uBAAuB,GACvB,wBAAwB,GAExB,4BAA4B,GAC5B,2BAA2B,GAE3B,+BAA+B,GAC/B,2BAA2B,GAE3B,wBAAwB,GACxB,yBAAyB,GACzB,yBAAyB,GAEzB,4BAA4B,GAC5B,4BAA4B,GAC5B,0BAA0B,GAE1B,eAAe,GACf,cAAc,GAEd,gCAAgC,GAChC,kCAAkC,GAClC,0BAA0B,GAC1B,mCAAmC,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,kFAAkF;IAClF,SAAS,EAAE,MAAM,CAAC;CACnB;AASD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,SAAS,EAAE,iBAAiB,CAyQ9D,CAAC"}
@@ -1,58 +0,0 @@
1
- /**
2
- * Canonical code registry.
3
- *
4
- * Single source of truth for every overridable validation code VAT emits.
5
- * Describes default severity, human description, fix hint, and a stable
6
- * reference anchor into docs/validation-codes.md.
7
- *
8
- * Renderers (CLI help, skill docs, runtime output) all pull from this
9
- * registry — no duplication.
10
- */
11
- const entry = (defaultSeverity, description, fix, anchor) => ({ defaultSeverity, description, fix, reference: `#${anchor}` });
12
- export const CODE_REGISTRY = {
13
- LINK_OUTSIDE_PROJECT: entry('error', 'Markdown link points to a file outside the project root.', 'Move the target inside the project or remove the link. Use validation.allow if the reference is intentional and cross-project.', 'link_outside_project'),
14
- LINK_TARGETS_DIRECTORY: entry('error', 'Markdown link resolves to a directory rather than a file.', 'Point the link at a specific file (e.g. README.md inside the directory) instead of the directory itself.', 'link_targets_directory'),
15
- LINK_TO_NAVIGATION_FILE: entry('warning', 'Markdown link targets a navigation file (README.md, index.md, etc.) which was excluded from the bundle.', 'Link to the specific content instead of the navigation file, or set severity.LINK_TO_NAVIGATION_FILE to ignore if this is intentional.', 'link_to_navigation_file'),
16
- LINK_TO_GITIGNORED_FILE: entry('error', 'Markdown link targets a gitignored file; risks leaking ignored data into the bundle.', 'Link to a non-ignored file or adjust .gitignore. Allow the specific path via validation.allow if the risk has been reviewed.', 'link_to_gitignored_file'),
17
- LINK_MISSING_TARGET: entry('error', 'Markdown link target does not exist on disk and is not a declared build artifact.', 'Fix the link path, create the file, or declare it under skills.config.<name>.files as a build artifact.', 'link_missing_target'),
18
- LINK_TO_SKILL_DEFINITION: entry('error', "Markdown link targets another skill's SKILL.md; bundling it creates duplicate skill definitions.", 'Link to a specific resource inside the other skill, or reference the other skill by name.', 'link_to_skill_definition'),
19
- LINK_DROPPED_BY_DEPTH: entry('warning', 'Walker stopped following links at the configured linkFollowDepth; this link was not bundled.', 'Raise linkFollowDepth, bundle the file via files config, declare the drop intentional with validation.allow, or exclude via excludeReferencesFromBundle.rules.', 'link_dropped_by_depth'),
20
- PACKAGED_UNREFERENCED_FILE: entry('error', 'File in the packaged output is not referenced from any packaged markdown.', 'Add a markdown link or code-block mention in SKILL.md or a linked resource. Allow via validation.allow if the file is consumed programmatically.', 'packaged_unreferenced_file'),
21
- PACKAGED_BROKEN_LINK: entry('error', 'Link in the packaged output resolves to a file that is not present in the output (likely a link-rewriter bug).', 'Report the issue — this indicates a VAT bug. As a temporary workaround, set severity.PACKAGED_BROKEN_LINK to ignore while the underlying bug is fixed.', 'packaged_broken_link'),
22
- SKILL_LENGTH_EXCEEDS_RECOMMENDED: entry('warning', 'SKILL.md line count exceeds the recommended limit; longer files degrade skill triggering.', 'Split content into linked resources (progressive disclosure) or allow if the length is justified.', 'skill_length_exceeds_recommended'),
23
- SKILL_TOTAL_SIZE_LARGE: entry('warning', 'Total packaged line count exceeds the recommended limit.', 'Reduce bundled content, move references out of the bundle, or allow if the size is justified.', 'skill_total_size_large'),
24
- SKILL_TOO_MANY_FILES: entry('warning', 'Packaged file count exceeds the recommended limit.', 'Consolidate or restructure references, or allow if the file count is justified.', 'skill_too_many_files'),
25
- REFERENCE_TOO_DEEP: entry('warning', 'Bundled link graph exceeds the recommended depth; deeply nested references hurt discoverability.', 'Flatten the reference structure or allow if depth is intentional.', 'reference_too_deep'),
26
- DESCRIPTION_TOO_VAGUE: entry('warning', 'SKILL.md description is too short to reliably trigger the skill.', 'Expand the description with concrete triggers and use cases.', 'description_too_vague'),
27
- NO_PROGRESSIVE_DISCLOSURE: entry('warning', 'Long SKILL.md with no linked references; progressive disclosure recommended.', 'Move background detail into linked resources and reference them from SKILL.md.', 'no_progressive_disclosure'),
28
- SKILL_DESCRIPTION_OVER_CLAUDE_CODE_LIMIT: entry('warning', 'SKILL.md description exceeds the 250-character Claude Code /skills display limit.', 'Shorten the description below 250 chars (target ≤200 for a safety margin, or ≤130 if shipping a large skill collection).', 'skill_description_over_claude_code_limit'),
29
- SKILL_DESCRIPTION_FILLER_OPENER: entry('warning', 'SKILL.md description opens with meta-filler (e.g., "This skill...", "A skill that...", "Use when you want to...").', 'Lead with a verb phrase ("Extracts text from PDFs...") or "Use when <concrete trigger>".', 'skill_description_filler_opener'),
30
- SKILL_DESCRIPTION_WRONG_PERSON: entry('warning', 'SKILL.md description uses first-person or conversational second-person voice.', 'Rewrite in third person. "I can extract PDFs" → "Extracts text from PDFs". "You can use this to..." → the action itself.', 'skill_description_wrong_person'),
31
- SKILL_CLAUDE_PLUGIN_NAME_MISMATCH: entry('warning', 'plugin.json name does not match the co-located root SKILL.md frontmatter name.', 'Align the names: update plugin.json `name` to match SKILL.md `name` (the skill is authoritative), or intentionally namespace the plugin (configure `validation.severity` or `validation.allow` with a reason).', 'skill_claude_plugin_name_mismatch'),
32
- SKILL_NAME_MISMATCHES_DIR: entry('warning', 'Frontmatter name field does not match the skill parent directory name.', 'Align them: rename the directory to match name, or update name to match the directory.', 'skill_name_mismatches_dir'),
33
- RESERVED_WORD_IN_NAME: entry('warning', 'Frontmatter `name` contains a reserved word (`anthropic` or `claude`); Claude Code rejects non-certified skills using these words.', 'Rename the skill to avoid `anthropic` or `claude` in the name.', 'reserved_word_in_name'),
34
- SKILL_TIME_SENSITIVE_CONTENT: entry('info', 'SKILL.md body contains time-sensitive prose (e.g., "as of November 2025") that may become stale.', 'Remove the time qualifier, or move deprecated guidance into a clearly labeled "## Old patterns" section with a <details> block.', 'skill_time_sensitive_content'),
35
- SKILL_FRONTMATTER_EXTRA_FIELDS: entry('warning', 'SKILL.md frontmatter contains a field outside the standard agentskills.io + Claude Code key set.', 'Move custom data under `metadata.<key>`, or remove the field. Per-project config belongs in vibe-agent-toolkit.config.yaml, not SKILL.md frontmatter.', 'skill_frontmatter_extra_fields'),
36
- SKILL_CROSS_SKILL_AUTH_UNDECLARED: entry('warning', 'SKILL.md body declares a dependency on a sibling skill or ANTHROPIC_*_KEY environment variable that is not mentioned in the description.', 'Name the dependency in the description (e.g. "Requires ado skill for auth" or "Requires ANTHROPIC_ADMIN_API_KEY") so agents loading the skill discover it without reading the body.', 'skill_cross_skill_auth_undeclared'),
37
- SKILL_DESCRIPTION_STYLE_MIXED_IN_PACKAGE: entry('warning', 'Sibling skills in the same package use mixed YAML scalar styles for their `description` frontmatter (e.g., folded `>-` alongside inline double-quoted).', 'Pick one YAML style and apply it to every skill in the package.', 'skill_description_style_mixed_in_package'),
38
- PLUGIN_MISSING_DESCRIPTION: entry('info', 'plugin.json is missing the recommended `description` field.', 'Add a "description" field to plugin.json so users see what the plugin does in the listing.', 'plugin_missing_description'),
39
- PLUGIN_MISSING_AUTHOR: entry('info', 'plugin.json is missing the recommended `author` field.', 'Add an "author" object (e.g. { "name": "..." }) to plugin.json so downstream consumers can attribute the plugin.', 'plugin_missing_author'),
40
- PLUGIN_MISSING_LICENSE: entry('info', 'plugin.json is missing the recommended `license` field.', 'Add a "license" SPDX identifier (e.g. "MIT") to plugin.json so redistribution terms are explicit.', 'plugin_missing_license'),
41
- PLUGIN_NAME_NOT_KEBAB_CASE: entry('info', 'Plugin name does not match the kebab-case convention required by Claude Code (lowercase alphanumeric with single hyphens).', 'Rename the plugin to kebab-case (e.g. "my-plugin"). Schema parse already errors; this code surfaces the same finding with a more actionable message.', 'plugin_name_not_kebab_case'),
42
- SKILL_NAME_NOT_KEBAB_CASE: entry('info', 'Skill frontmatter `name` does not match the kebab-case convention.', 'Rename the skill to kebab-case (e.g. "my-skill"). Schema parse already errors; this code surfaces the same finding with a more actionable message.', 'skill_name_not_kebab_case'),
43
- SKILL_REFERENCES_BUT_NO_LINKS: entry('info', 'Skill directory contains scripts/, references/, or assets/ subdirectories but the SKILL.md body has zero markdown links into them.', 'Add explicit markdown links from SKILL.md (or a linked file) into the bundled subdirectories, or remove the unreferenced directory. Allow via validation.allow if the assets are consumed programmatically.', 'skill_references_but_no_links'),
44
- SKILL_BODY_NOT_IMPERATIVE: entry('info', 'SKILL.md body contains second-person instructional openers (e.g. "You should…", "You need to…", "You can…").', 'Rewrite as imperative ("Configure the MCP server…" instead of "You should configure…"). Skill bodies read more cleanly as instructions to the agent rather than to a human reader. Allow via validation.allow if the heuristic misfires on quoted prompts or user dialog.', 'skill_body_not_imperative'),
45
- CAPABILITY_LOCAL_SHELL: entry('info', 'Skill references a local-shell tool (Bash/Edit/Write/NotebookEdit) or invokes a shell.', 'Informational. Declare a plugin target that provides shell (claude-code, claude-cowork) so this observation resolves to an expected verdict.', 'capability_local_shell'),
46
- CAPABILITY_EXTERNAL_CLI: entry('info', 'Skill invokes an external CLI binary not bundled with the skill.', 'Informational. Ensure the declared target guarantees the binary or document the prerequisite.', 'capability_external_cli'),
47
- CAPABILITY_BROWSER_AUTH: entry('info', 'Skill appears to require an interactive browser login flow.', 'Informational. If a service-principal flow would work, prefer it. Otherwise declare a browser-capable target.', 'capability_browser_auth'),
48
- COMPAT_TARGET_INCOMPATIBLE: entry('warning', "Skill's declared target runtime definitively lacks a required capability.", 'Narrow the declared target to runtimes that support the capability, or allow with a reason.', 'compat_target_incompatible'),
49
- COMPAT_TARGET_NEEDS_REVIEW: entry('warning', "Declared target's capability profile covers the axis but a specific resource is uncertain.", 'Document the prerequisite or allow with a reason.', 'compat_target_needs_review'),
50
- COMPAT_TARGET_UNDECLARED: entry('info', 'Skill has capability observations but no target is declared.', 'Declare targets in vibe-agent-toolkit.config.yaml, plugin.json, or marketplace.json defaults.', 'compat_target_undeclared'),
51
- ALLOW_EXPIRED: entry('warning', "A validation.allow entry's expires date is in the past; the allowance still applies but should be re-reviewed.", 'Re-review the allow entry: extend expires, remove the entry, or fix the underlying issue. Upgrade severity to error for zero-tolerance expiry.', 'allow_expired'),
52
- ALLOW_UNUSED: entry('warning', 'A validation.allow entry did not match any emitted issue; the allow entry is dead weight.', 'Remove the entry or fix the pattern. Upgrade severity to error to block on unused allow entries.', 'allow_unused'),
53
- COMPONENT_DECLARED_BUT_MISSING: entry('warning', 'A component path declared in the plugin manifest does not exist on disk.', 'Add the missing file, remove the manifest declaration, or correct the path. Use validation.allow if the artifact is generated by an install-time build step.', 'component_declared_but_missing'),
54
- COMPONENT_PRESENT_BUT_UNDECLARED: entry('info', 'A component is present under the canonical layout but the manifest declares an explicit list that omits it; the runtime may silently skip it at install.', 'Add the component to the appropriate manifest field, or remove the file if unintended. Skipped when the manifest omits the field entirely (auto-discovery is intentional).', 'component_present_but_undeclared'),
55
- REFERENCE_TARGET_MISSING: entry('error', 'A cross-component reference resolved from the manifest points to a path that does not exist.', 'Add the referenced file or correct the path in the manifest.', 'reference_target_missing'),
56
- MARKETPLACE_PLUGIN_SOURCE_MISSING: entry('error', 'A marketplace declares a plugin with a path-based source that does not exist.', 'Correct the source path or remove the entry from marketplace.plugins[].', 'marketplace_plugin_source_missing'),
57
- };
58
- //# sourceMappingURL=code-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-registry.js","sourceRoot":"","sources":["../../src/validators/code-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAuEH,MAAM,KAAK,GAAG,CACZ,eAAgC,EAChC,WAAmB,EACnB,GAAW,EACX,MAAc,EACK,EAAE,CAAC,CAAC,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;AAEzF,MAAM,CAAC,MAAM,aAAa,GAAyC;IACjE,oBAAoB,EAAE,KAAK,CACzB,OAAO,EACP,0DAA0D,EAC1D,gIAAgI,EAChI,sBAAsB,CACvB;IACD,sBAAsB,EAAE,KAAK,CAC3B,OAAO,EACP,2DAA2D,EAC3D,0GAA0G,EAC1G,wBAAwB,CACzB;IACD,uBAAuB,EAAE,KAAK,CAC5B,SAAS,EACT,yGAAyG,EACzG,wIAAwI,EACxI,yBAAyB,CAC1B;IACD,uBAAuB,EAAE,KAAK,CAC5B,OAAO,EACP,sFAAsF,EACtF,8HAA8H,EAC9H,yBAAyB,CAC1B;IACD,mBAAmB,EAAE,KAAK,CACxB,OAAO,EACP,mFAAmF,EACnF,yGAAyG,EACzG,qBAAqB,CACtB;IACD,wBAAwB,EAAE,KAAK,CAC7B,OAAO,EACP,kGAAkG,EAClG,2FAA2F,EAC3F,0BAA0B,CAC3B;IACD,qBAAqB,EAAE,KAAK,CAC1B,SAAS,EACT,8FAA8F,EAC9F,gKAAgK,EAChK,uBAAuB,CACxB;IACD,0BAA0B,EAAE,KAAK,CAC/B,OAAO,EACP,2EAA2E,EAC3E,kJAAkJ,EAClJ,4BAA4B,CAC7B;IACD,oBAAoB,EAAE,KAAK,CACzB,OAAO,EACP,gHAAgH,EAChH,wJAAwJ,EACxJ,sBAAsB,CACvB;IACD,gCAAgC,EAAE,KAAK,CACrC,SAAS,EACT,2FAA2F,EAC3F,mGAAmG,EACnG,kCAAkC,CACnC;IACD,sBAAsB,EAA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a,EAAE,KAAK,CAClB,SAAS,EACT,gHAAgH,EAChH,gJAAgJ,EAChJ,eAAe,CAChB;IACD,YAAY,EAAE,KAAK,CACjB,SAAS,EACT,2FAA2F,EAC3F,kGAAkG,EAClG,cAAc,CACf;IACD,8BAA8B,EAAE,KAAK,CACnC,SAAS,EACT,0EAA0E,EAC1E,8JAA8J,EAC9J,gCAAgC,CACjC;IACD,gCAAgC,EAAE,KAAK,CACrC,MAAM,EACN,0JAA0J,EAC1J,4KAA4K,EAC5K,kCAAkC,CACnC;IACD,wBAAwB,EAAE,KAAK,CAC7B,OAAO,EACP,8FAA8F,EAC9F,8DAA8D,EAC9D,0BAA0B,CAC3B;IACD,iCAAiC,EAAE,KAAK,CACtC,OAAO,EACP,+EAA+E,EAC/E,yEAAyE,EACzE,mCAAmC,CACpC;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- import { type IssueCode, type IssueSeverity } from './code-registry.js';
2
- export interface SeverityConfig {
3
- severity?: Partial<Record<IssueCode, IssueSeverity>>;
4
- }
5
- export declare function resolveSeverity(code: IssueCode, config: SeverityConfig): IssueSeverity;
6
- //# sourceMappingURL=severity-resolver.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"severity-resolver.d.ts","sourceRoot":"","sources":["../../src/validators/severity-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEvF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;CACtD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,aAAa,CAMtF"}
@@ -1,9 +0,0 @@
1
- import { CODE_REGISTRY } from './code-registry.js';
2
- export function resolveSeverity(code, config) {
3
- const override = config.severity?.[code];
4
- if (override === 'error' || override === 'warning' || override === 'ignore') {
5
- return override;
6
- }
7
- return CODE_REGISTRY[code].defaultSeverity;
8
- }
9
- //# sourceMappingURL=severity-resolver.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"severity-resolver.js","sourceRoot":"","sources":["../../src/validators/severity-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAsC,MAAM,oBAAoB,CAAC;AAMvF,MAAM,UAAU,eAAe,CAAC,IAAe,EAAE,MAAsB;IACrE,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,QAAQ,KAAK,OAAO,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC5E,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,aAAa,CAAC,IAAI,CAAC,CAAC,eAAe,CAAC;AAC7C,CAAC"}
@@ -1,21 +0,0 @@
1
- import { type AllowConfig } from './allow-filter.js';
2
- import { type IssueCode } from './code-registry.js';
3
- import { type SeverityConfig } from './severity-resolver.js';
4
- import type { ValidationIssue } from './types.js';
5
- export interface ValidationConfig extends SeverityConfig, AllowConfig {
6
- }
7
- export interface FrameworkResult {
8
- /** Issues the consumer should surface (severity resolved; ignores dropped). */
9
- emitted: ValidationIssue[];
10
- /** Issues suppressed by an allow entry (for verbose display). */
11
- allowed: Array<{
12
- code: IssueCode;
13
- location: string;
14
- reason: string;
15
- expires?: string | undefined;
16
- }>;
17
- /** True when any emitted issue has resolved severity 'error'. */
18
- hasErrors: boolean;
19
- }
20
- export declare function runValidationFramework(rawIssues: readonly ValidationIssue[], config: ValidationConfig, now?: Date): FrameworkResult;
21
- //# sourceMappingURL=validation-framework.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation-framework.d.ts","sourceRoot":"","sources":["../../src/validators/validation-framework.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,WAAW,EAAoB,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAiB,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,gBAAiB,SAAQ,cAAc,EAAE,WAAW;CAAG;AAExE,MAAM,WAAW,eAAe;IAC9B,+EAA+E;IAC/E,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,iEAAiE;IACjE,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,SAAS,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC,CAAC;IACpG,iEAAiE;IACjE,SAAS,EAAE,OAAO,CAAC;CACpB;AAoDD,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,SAAS,eAAe,EAAE,EACrC,MAAM,EAAE,gBAAgB,EACxB,GAAG,GAAE,IAAiB,GACrB,eAAe,CAyBjB"}
@@ -1,67 +0,0 @@
1
- import { applyAllowFilter } from './allow-filter.js';
2
- import { CODE_REGISTRY } from './code-registry.js';
3
- import { resolveSeverity } from './severity-resolver.js';
4
- function finalize(issue, config) {
5
- const code = issue.code;
6
- const entry = CODE_REGISTRY[code];
7
- if (!entry) {
8
- // Not a registry code — return as-is (non-overridable / info codes bypass framework).
9
- return issue;
10
- }
11
- const resolved = resolveSeverity(code, config);
12
- if (resolved === 'ignore')
13
- return null;
14
- return { ...issue, severity: resolved, reference: entry.reference };
15
- }
16
- function metaIssue(code, message, location) {
17
- const entry = CODE_REGISTRY[code];
18
- return {
19
- severity: entry.defaultSeverity,
20
- code,
21
- message,
22
- location,
23
- fix: entry.fix,
24
- reference: entry.reference,
25
- };
26
- }
27
- function emitExpiredMeta(expired, config, emitted) {
28
- for (const e of expired) {
29
- const msg = `Allow entry for ${e.code} expired on ${e.expires} (reason: ${e.reason}).`;
30
- const raw = metaIssue('ALLOW_EXPIRED', msg, `validation.allow.${e.code}`);
31
- const final = finalize(raw, config);
32
- if (final)
33
- emitted.push(final);
34
- }
35
- }
36
- function emitUnusedMeta(unused, config, emitted) {
37
- for (const u of unused) {
38
- const msg = `Allow entry for ${u.code} matched no issues (paths: ${u.paths.join(', ')}).`;
39
- const raw = metaIssue('ALLOW_UNUSED', msg, `validation.allow.${u.code}`);
40
- const final = finalize(raw, config);
41
- if (final)
42
- emitted.push(final);
43
- }
44
- }
45
- export function runValidationFramework(rawIssues, config, now = new Date()) {
46
- // 1. Allow filter against raw issues (before severity resolution — allow is
47
- // indifferent to severity).
48
- const filtered = applyAllowFilter(rawIssues, config, now);
49
- // 2. Resolve severities and drop ignored issues.
50
- const emitted = [];
51
- for (const i of filtered.emitted) {
52
- const final = finalize(i, config);
53
- if (final)
54
- emitted.push(final);
55
- }
56
- // 3. Emit ALLOW_EXPIRED for each expired entry (severity from config).
57
- emitExpiredMeta(filtered.expired, config, emitted);
58
- // 4. Emit ALLOW_UNUSED for entries that matched nothing.
59
- emitUnusedMeta(filtered.unused, config, emitted);
60
- const allowed = filtered.allowed;
61
- return {
62
- emitted,
63
- allowed,
64
- hasErrors: emitted.some(i => i.severity === 'error'),
65
- };
66
- }
67
- //# sourceMappingURL=validation-framework.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"validation-framework.js","sourceRoot":"","sources":["../../src/validators/validation-framework.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAsC,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAuB,MAAM,wBAAwB,CAAC;AAc9E,SAAS,QAAQ,CAAC,KAAsB,EAAE,MAAwB;IAChE,MAAM,IAAI,GAAG,KAAK,CAAC,IAAiB,CAAC;IACrC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAA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