@skill-graph/cli 0.5.6
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.
- package/CHANGELOG.md +247 -0
- package/LICENSE +200 -0
- package/NOTICE +62 -0
- package/README.md +398 -0
- package/SKILL_GRAPH.md +443 -0
- package/bin/skill-graph.js +374 -0
- package/docs/ADOPTION.md +117 -0
- package/docs/CONFORMANCE.md +66 -0
- package/docs/PRIMER.md +384 -0
- package/docs/QUICKSTART-30MIN.md +333 -0
- package/docs/ROUTING-METRICS.md +120 -0
- package/docs/SKILL-MD-FORMAT-COMPATIBILITY.md +127 -0
- package/docs/SKILL_AUDIT_CHECKLIST.md +199 -0
- package/docs/SKILL_AUDIT_LOOP.md +195 -0
- package/docs/SKILL_METADATA_PROTOCOL.md +609 -0
- package/docs/_archived/marketplace-publication-priority-2026-05-18.md +239 -0
- package/docs/adr/0001-predicate-set.md +69 -0
- package/docs/adr/0002-json-ld-context.md +82 -0
- package/docs/adr/0003-ontoclean-rigidity-tags.md +65 -0
- package/docs/adr/0004-persistent-identifiers.md +74 -0
- package/docs/adr/0005-freshness-consolidation.md +70 -0
- package/docs/adr/0006-revise-predicate-rename.md +105 -0
- package/docs/adr/0007-audit-loop-cadence.md +99 -0
- package/docs/adr/0008-skill-surface-split-and-curation-policy.md +93 -0
- package/docs/category-consumers.md +168 -0
- package/docs/concept-map.md +194 -0
- package/docs/diagrams/drift-states.mmd +21 -0
- package/docs/diagrams/manifest-pipeline.mmd +25 -0
- package/docs/diagrams/routing-harness.mmd +41 -0
- package/docs/diagrams/starter-graph.mmd +53 -0
- package/docs/field-decision-guide.md +315 -0
- package/docs/field-rationale.md +211 -0
- package/docs/field-reference.generated.md +624 -0
- package/docs/field-reference.md +1426 -0
- package/docs/glossary.md +190 -0
- package/docs/head-noun-glossary.md +63 -0
- package/docs/images/audit-phases.png +0 -0
- package/docs/images/drift-states.png +0 -0
- package/docs/images/graded-mode.png +0 -0
- package/docs/images/manifest-pipeline.png +0 -0
- package/docs/images/routing-harness.png +0 -0
- package/docs/images/skill-anatomy.png +0 -0
- package/docs/images/starter-graph.png +0 -0
- package/docs/images/system-model.png +0 -0
- package/docs/integrations/github-actions.md +155 -0
- package/docs/manifest-field-mapping.md +443 -0
- package/docs/marketplace-publication-queue.generated.md +240 -0
- package/docs/marketplace-release-agent-prompt.md +82 -0
- package/docs/marketplace-skill-candidate-list.md +272 -0
- package/docs/marketplace-syndication.md +222 -0
- package/docs/migration-sample-review.md +155 -0
- package/docs/migrations/v4-to-v5.md +168 -0
- package/docs/migrations/v5-to-v6.md +221 -0
- package/docs/name-exceptions.yaml +37 -0
- package/docs/plans/marketplace-p1-public-migration-plan.md +41 -0
- package/docs/plans/multi-root-workspace.md +148 -0
- package/docs/plans/scripts-roadmap.md +107 -0
- package/docs/plans/v4-schema-bump.md +160 -0
- package/docs/plans/wave-2-extraction.md +122 -0
- package/docs/positioning-vs-marketplaces.md +175 -0
- package/docs/proposals/skill-audit-loop-positioning.md +160 -0
- package/docs/quality-doctrine.md +138 -0
- package/docs/recommended-skills.md +150 -0
- package/docs/research/skill-comprehension-eval-research.md +1830 -0
- package/docs/research/skill-retrieval-evidence.md +66 -0
- package/docs/skill-metadata-protocol.md +471 -0
- package/docs/skills-sh-maintainer-cleanup-request.md +80 -0
- package/examples/audits/a11y/findings.md +52 -0
- package/examples/audits/a11y/scorecard.md +21 -0
- package/examples/audits/a11y/verdict.md +44 -0
- package/examples/audits/debugging/findings.md +59 -0
- package/examples/audits/debugging/scorecard.md +22 -0
- package/examples/audits/debugging/verdict.md +33 -0
- package/examples/audits/documentation/findings.md +59 -0
- package/examples/audits/documentation/scorecard.md +22 -0
- package/examples/audits/documentation/verdict.md +33 -0
- package/examples/evals/a11y.json +140 -0
- package/examples/evals/api-design.json +52 -0
- package/examples/evals/code-review.json +52 -0
- package/examples/evals/data-modeling.json +52 -0
- package/examples/evals/database-migration.json +52 -0
- package/examples/evals/debugging.json +118 -0
- package/examples/evals/dependency-architecture.json +52 -0
- package/examples/evals/design-system-architecture.json +52 -0
- package/examples/evals/error-tracking.json +52 -0
- package/examples/evals/event-contract-design.json +52 -0
- package/examples/evals/form-ux-architecture.json +52 -0
- package/examples/evals/framework-fit-analysis.json +52 -0
- package/examples/evals/graph-audit.json +139 -0
- package/examples/evals/information-architecture.json +52 -0
- package/examples/evals/interaction-feedback.json +52 -0
- package/examples/evals/interaction-patterns.json +52 -0
- package/examples/evals/layout-composition.json +52 -0
- package/examples/evals/lint-overlay.json +117 -0
- package/examples/evals/microcopy.json +52 -0
- package/examples/evals/observability-modeling.json +52 -0
- package/examples/evals/pattern-recognition.json +96 -0
- package/examples/evals/performance-engineering.json +52 -0
- package/examples/evals/refactor.json +128 -0
- package/examples/evals/semiotics.json +52 -0
- package/examples/evals/skill-infrastructure.json +96 -0
- package/examples/evals/skill-router.json +140 -0
- package/examples/evals/skill-router.routing.json +113 -0
- package/examples/evals/system-interface-contracts.json +52 -0
- package/examples/evals/task-analysis.json +52 -0
- package/examples/evals/testing-strategy.json +118 -0
- package/examples/evals/type-safety.json +249 -0
- package/examples/evals/visual-design-foundations.json +52 -0
- package/examples/evals/webhook-integration.json +52 -0
- package/examples/exports/a11y.skill-md.md +80 -0
- package/examples/exports/debugging.skill-md.md +80 -0
- package/examples/exports/refactor.skill-md.md +78 -0
- package/examples/exports/testing-strategy.skill-md.md +81 -0
- package/examples/projects/markdown-static-site/README.md +115 -0
- package/examples/projects/markdown-static-site/skills/content-source-router/SKILL.md +131 -0
- package/examples/projects/markdown-static-site/skills/image-optimization-pipeline-config/SKILL.md +132 -0
- package/examples/projects/markdown-static-site/skills/link-rot-detection/SKILL.md +103 -0
- package/examples/projects/markdown-static-site/skills/markdown-post-frontmatter-validation/SKILL.md +133 -0
- package/examples/projects/markdown-static-site/skills/migrate-posts-to-v2-frontmatter/SKILL.md +140 -0
- package/examples/projects/saas-stripe-postgres/README.md +208 -0
- package/examples/projects/saas-stripe-postgres/db/migrations/0004_canonicalize_orders.sql +37 -0
- package/examples/projects/saas-stripe-postgres/db/schema.sql +112 -0
- package/examples/projects/saas-stripe-postgres/skills/migrate-orders-to-canonical-schema/SKILL.md +149 -0
- package/examples/projects/saas-stripe-postgres/skills/nextjs-server-action-validation/SKILL.md +154 -0
- package/examples/projects/saas-stripe-postgres/skills/payment-provider-router/SKILL.md +153 -0
- package/examples/projects/saas-stripe-postgres/skills/postgres-rls-pattern/SKILL.md +163 -0
- package/examples/projects/saas-stripe-postgres/skills/stripe-webhook-signature-verification/SKILL.md +137 -0
- package/examples/protocol/skill-metadata-template.md +301 -0
- package/examples/protocol/skills.manifest.sample.json +13245 -0
- package/examples/skill-metadata-template.md +317 -0
- package/examples/skills.manifest.sample.json +13519 -0
- package/examples/tests/v3-1-skos-fixture/SKILL.md +93 -0
- package/marketplace/README.md +17 -0
- package/marketplace/skills/a11y/SKILL.md +66 -0
- package/marketplace/skills/acid-fundamentals/SKILL.md +106 -0
- package/marketplace/skills/agent-engineering/SKILL.md +386 -0
- package/marketplace/skills/agent-eval-design/SKILL.md +55 -0
- package/marketplace/skills/ai-native-development/SKILL.md +294 -0
- package/marketplace/skills/api-design/SKILL.md +60 -0
- package/marketplace/skills/architecture-decision-records/SKILL.md +55 -0
- package/marketplace/skills/background-jobs/SKILL.md +265 -0
- package/marketplace/skills/bounded-context-mapping/SKILL.md +55 -0
- package/marketplace/skills/cap-theorem-tradeoffs/SKILL.md +127 -0
- package/marketplace/skills/client-server-boundary/SKILL.md +187 -0
- package/marketplace/skills/code-review/SKILL.md +120 -0
- package/marketplace/skills/color-system-design/SKILL.md +43 -0
- package/marketplace/skills/component-architecture/SKILL.md +126 -0
- package/marketplace/skills/compression/SKILL.md +112 -0
- package/marketplace/skills/conceptual-modeling/SKILL.md +181 -0
- package/marketplace/skills/connection-pooling/SKILL.md +105 -0
- package/marketplace/skills/constraint-awareness/SKILL.md +287 -0
- package/marketplace/skills/content-monitor/SKILL.md +209 -0
- package/marketplace/skills/context-engineering/SKILL.md +320 -0
- package/marketplace/skills/context-graph/SKILL.md +174 -0
- package/marketplace/skills/context-management/SKILL.md +174 -0
- package/marketplace/skills/context-window/SKILL.md +239 -0
- package/marketplace/skills/contract-testing/SKILL.md +120 -0
- package/marketplace/skills/cron-scheduling/SKILL.md +223 -0
- package/marketplace/skills/dark-mode-implementation/SKILL.md +47 -0
- package/marketplace/skills/data-modeling/SKILL.md +59 -0
- package/marketplace/skills/data-modeling-fundamentals/SKILL.md +117 -0
- package/marketplace/skills/database-migration/SKILL.md +429 -0
- package/marketplace/skills/debugging/SKILL.md +67 -0
- package/marketplace/skills/dependency-architecture/SKILL.md +58 -0
- package/marketplace/skills/design-module-composition/SKILL.md +43 -0
- package/marketplace/skills/design-system-architecture/SKILL.md +61 -0
- package/marketplace/skills/design-thinking/SKILL.md +44 -0
- package/marketplace/skills/diagnosis/SKILL.md +296 -0
- package/marketplace/skills/diff-analysis/SKILL.md +188 -0
- package/marketplace/skills/e2e-test-design/SKILL.md +113 -0
- package/marketplace/skills/entity-relationship-modeling/SKILL.md +218 -0
- package/marketplace/skills/epistemic-grounding/SKILL.md +112 -0
- package/marketplace/skills/error-boundary/SKILL.md +235 -0
- package/marketplace/skills/error-tracking/SKILL.md +261 -0
- package/marketplace/skills/eval-driven-development/SKILL.md +147 -0
- package/marketplace/skills/evaluation/SKILL.md +113 -0
- package/marketplace/skills/event-contract-design/SKILL.md +60 -0
- package/marketplace/skills/event-storming/SKILL.md +56 -0
- package/marketplace/skills/form-ux-architecture/SKILL.md +60 -0
- package/marketplace/skills/framework-fit-analysis/SKILL.md +59 -0
- package/marketplace/skills/frontend-architecture/SKILL.md +43 -0
- package/marketplace/skills/generative-ui/SKILL.md +118 -0
- package/marketplace/skills/graph-audit/SKILL.md +81 -0
- package/marketplace/skills/guardrails/SKILL.md +118 -0
- package/marketplace/skills/hooks-patterns/SKILL.md +185 -0
- package/marketplace/skills/http-semantics/SKILL.md +136 -0
- package/marketplace/skills/ideation/SKILL.md +41 -0
- package/marketplace/skills/indexing-strategy/SKILL.md +108 -0
- package/marketplace/skills/information-architecture/SKILL.md +59 -0
- package/marketplace/skills/integration-test-design/SKILL.md +111 -0
- package/marketplace/skills/intent-recognition/SKILL.md +136 -0
- package/marketplace/skills/interaction-feedback/SKILL.md +59 -0
- package/marketplace/skills/interaction-patterns/SKILL.md +59 -0
- package/marketplace/skills/journey-mapping/SKILL.md +41 -0
- package/marketplace/skills/keywords/SKILL.md +213 -0
- package/marketplace/skills/knowledge-modeling/SKILL.md +232 -0
- package/marketplace/skills/layout-composition/SKILL.md +59 -0
- package/marketplace/skills/linguistics/SKILL.md +429 -0
- package/marketplace/skills/lint-overlay/SKILL.md +76 -0
- package/marketplace/skills/mental-models/SKILL.md +126 -0
- package/marketplace/skills/merge-queue/SKILL.md +94 -0
- package/marketplace/skills/methodology/SKILL.md +317 -0
- package/marketplace/skills/microcopy/SKILL.md +232 -0
- package/marketplace/skills/middleware-patterns/SKILL.md +363 -0
- package/marketplace/skills/mobile-responsive-ux/SKILL.md +287 -0
- package/marketplace/skills/mutation-testing/SKILL.md +112 -0
- package/marketplace/skills/naming-conventions/SKILL.md +112 -0
- package/marketplace/skills/observability-modeling/SKILL.md +59 -0
- package/marketplace/skills/ontology-modeling/SKILL.md +67 -0
- package/marketplace/skills/owasp-security/SKILL.md +153 -0
- package/marketplace/skills/pattern-recognition/SKILL.md +472 -0
- package/marketplace/skills/performance-budgets/SKILL.md +185 -0
- package/marketplace/skills/performance-engineering/SKILL.md +58 -0
- package/marketplace/skills/performance-testing/SKILL.md +125 -0
- package/marketplace/skills/printify/SKILL.md +42 -0
- package/marketplace/skills/prioritization/SKILL.md +118 -0
- package/marketplace/skills/problem-framing/SKILL.md +41 -0
- package/marketplace/skills/problem-locating-solving/SKILL.md +203 -0
- package/marketplace/skills/project-knowledge-extraction/SKILL.md +54 -0
- package/marketplace/skills/prompt-craft/SKILL.md +134 -0
- package/marketplace/skills/prompt-injection-defense/SKILL.md +132 -0
- package/marketplace/skills/property-based-testing/SKILL.md +100 -0
- package/marketplace/skills/prototyping/SKILL.md +43 -0
- package/marketplace/skills/query-optimization/SKILL.md +144 -0
- package/marketplace/skills/real-time-updates/SKILL.md +324 -0
- package/marketplace/skills/ref-patterns/SKILL.md +284 -0
- package/marketplace/skills/refactor/SKILL.md +65 -0
- package/marketplace/skills/rendering-models/SKILL.md +142 -0
- package/marketplace/skills/replication-patterns/SKILL.md +110 -0
- package/marketplace/skills/research-synthesis/SKILL.md +41 -0
- package/marketplace/skills/route-handler-design/SKILL.md +347 -0
- package/marketplace/skills/schema-evolution/SKILL.md +140 -0
- package/marketplace/skills/security-fundamentals/SKILL.md +139 -0
- package/marketplace/skills/semantic-center/SKILL.md +194 -0
- package/marketplace/skills/semantic-relations/SKILL.md +250 -0
- package/marketplace/skills/semantics/SKILL.md +366 -0
- package/marketplace/skills/semiotics/SKILL.md +230 -0
- package/marketplace/skills/seo-strategy/SKILL.md +260 -0
- package/marketplace/skills/server-actions-design/SKILL.md +243 -0
- package/marketplace/skills/server-components-design/SKILL.md +190 -0
- package/marketplace/skills/sharding-strategy/SKILL.md +123 -0
- package/marketplace/skills/shopify/SKILL.md +42 -0
- package/marketplace/skills/skill-infrastructure/SKILL.md +320 -0
- package/marketplace/skills/skill-router/SKILL.md +71 -0
- package/marketplace/skills/skill-scaffold/SKILL.md +105 -0
- package/marketplace/skills/snapshot-testing/SKILL.md +120 -0
- package/marketplace/skills/spec-driven-development/SKILL.md +148 -0
- package/marketplace/skills/state-machine-modeling/SKILL.md +56 -0
- package/marketplace/skills/state-management/SKILL.md +134 -0
- package/marketplace/skills/streaming-architecture/SKILL.md +194 -0
- package/marketplace/skills/summarization/SKILL.md +156 -0
- package/marketplace/skills/suspense-patterns/SKILL.md +265 -0
- package/marketplace/skills/system-interface-contracts/SKILL.md +59 -0
- package/marketplace/skills/task-analysis/SKILL.md +201 -0
- package/marketplace/skills/taxonomy-design/SKILL.md +66 -0
- package/marketplace/skills/test-coverage-strategy/SKILL.md +108 -0
- package/marketplace/skills/test-doubles-design/SKILL.md +98 -0
- package/marketplace/skills/test-driven-development/SKILL.md +96 -0
- package/marketplace/skills/testing-strategy/SKILL.md +67 -0
- package/marketplace/skills/theme-system-design/SKILL.md +43 -0
- package/marketplace/skills/tool-call-flow/SKILL.md +229 -0
- package/marketplace/skills/tool-call-strategy/SKILL.md +292 -0
- package/marketplace/skills/transaction-isolation/SKILL.md +98 -0
- package/marketplace/skills/type-safety/SKILL.md +177 -0
- package/marketplace/skills/typography-system/SKILL.md +43 -0
- package/marketplace/skills/usability-testing/SKILL.md +43 -0
- package/marketplace/skills/user-research/SKILL.md +43 -0
- package/marketplace/skills/vercel-composition-patterns/SKILL.md +157 -0
- package/marketplace/skills/version-control/SKILL.md +233 -0
- package/marketplace/skills/visual-design-foundations/SKILL.md +59 -0
- package/marketplace/skills/visual-hierarchy/SKILL.md +43 -0
- package/marketplace/skills/webhook-integration/SKILL.md +331 -0
- package/marketplace/skills/writing-humanizer/SKILL.md +380 -0
- package/package.json +67 -0
- package/schemas/manifest.schema.json +811 -0
- package/schemas/manifest.v2.schema.json +164 -0
- package/schemas/manifest.v3.schema.json +758 -0
- package/schemas/manifest.v4.schema.json +755 -0
- package/schemas/manifest.v5.schema.json +755 -0
- package/schemas/manifest.v6.schema.json +811 -0
- package/schemas/skill.context.jsonld +279 -0
- package/schemas/skill.schema.json +919 -0
- package/schemas/skill.v2.schema.json +201 -0
- package/schemas/skill.v3.schema.json +827 -0
- package/schemas/skill.v4.schema.json +822 -0
- package/schemas/skill.v5.schema.json +830 -0
- package/schemas/skill.v6.schema.json +946 -0
- package/schemas/vocabulary/keywords.json +180 -0
- package/schemas/vocabulary/workspace_tags.json +23 -0
- package/scripts/__tests__/migrate-skill-v2-to-v3.test.js +161 -0
- package/scripts/__tests__/migrate-skill-v3-to-v4.test.js +158 -0
- package/scripts/__tests__/test-export-parser-drift.js +149 -0
- package/scripts/__tests__/test-marketplace-export.js +114 -0
- package/scripts/__tests__/test-router-paths.js +82 -0
- package/scripts/__tests__/test-stability-promotion.js +244 -0
- package/scripts/__tests__/test-v3-1-alias-contract.js +109 -0
- package/scripts/__tests__/test-v3-1-skos-runtime.js +116 -0
- package/scripts/backfill-schema-version.js +198 -0
- package/scripts/build-field-reference.js +160 -0
- package/scripts/build-retrieval-baseline.js +511 -0
- package/scripts/check-markdown-links.js +211 -0
- package/scripts/check-protocol-consistency.js +979 -0
- package/scripts/export-marketplace-skills.js +610 -0
- package/scripts/export-skill.js +374 -0
- package/scripts/generate-manifest.js +787 -0
- package/scripts/lib/alias-contract.js +83 -0
- package/scripts/lib/audit-prompt-builder.js +771 -0
- package/scripts/lib/mock-grader.js +134 -0
- package/scripts/lib/parse-frontmatter.js +429 -0
- package/scripts/lib/roots.js +119 -0
- package/scripts/lint/check-archetype-sections.js +185 -0
- package/scripts/lint/check-category-enum.js +83 -0
- package/scripts/lint/check-routing-eval.js +146 -0
- package/scripts/lint/check-routing-quality.js +211 -0
- package/scripts/lint/check-stability-promotion.js +220 -0
- package/scripts/lint/format-code-frame.js +206 -0
- package/scripts/marketplace-install.js +125 -0
- package/scripts/migrate-category-to-enum.js +169 -0
- package/scripts/migrate-skill-v2-to-v3.js +424 -0
- package/scripts/migrate-skill-v3-to-v4.js +200 -0
- package/scripts/migrate-skill-v5-to-v6.js +304 -0
- package/scripts/restructure-by-category.js +85 -0
- package/scripts/seed-publication-classification.js +282 -0
- package/scripts/skill-audit.js +893 -0
- package/scripts/skill-graph-drift.js +483 -0
- package/scripts/skill-graph-route.js +766 -0
- package/scripts/skill-graph-routing-eval.js +393 -0
- package/scripts/skill-lint.js +1317 -0
- package/scripts/skill-overlap.js +213 -0
- package/scripts/verify-skill-md-export.js +201 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Public CLI dispatcher for Skill Graph.
|
|
4
|
+
*
|
|
5
|
+
* Keeps the existing zero-dependency scripts as the implementation surface and
|
|
6
|
+
* exposes a stable installable command for users who do not want to clone the
|
|
7
|
+
* repo just to run one tool.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
const path = require('path');
|
|
13
|
+
const fs = require('fs');
|
|
14
|
+
const { spawnSync } = require('child_process');
|
|
15
|
+
|
|
16
|
+
const REPO_ROOT = path.resolve(__dirname, '..');
|
|
17
|
+
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// Subcommand → implementation map
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
//
|
|
22
|
+
// Script paths are relative to REPO_ROOT. The `inline` key marks subcommands
|
|
23
|
+
// implemented as inline Node code in this file rather than via a delegated
|
|
24
|
+
// script (e.g. `init`).
|
|
25
|
+
//
|
|
26
|
+
// The optional `help` key provides a static help string that is printed when
|
|
27
|
+
// `--help` / `-h` is passed. Use this for scripts that cannot handle --help
|
|
28
|
+
// themselves (e.g. scripts that require positional args or have heavy init
|
|
29
|
+
// that runs before arg-parsing).
|
|
30
|
+
//
|
|
31
|
+
// Spec subcommands (ordered as per SH-6134):
|
|
32
|
+
// init, add, lint, audit, route, drift, export, evolve
|
|
33
|
+
//
|
|
34
|
+
// Legacy subcommands (retained for backward compat):
|
|
35
|
+
// manifest, overlap, routing-eval, export-verify, marketplace-export, protocol-check
|
|
36
|
+
|
|
37
|
+
const COMMANDS = {
|
|
38
|
+
// ─── Spec subcommands ────────────────────────────────────────────────────
|
|
39
|
+
init: { inline: true },
|
|
40
|
+
add: { script: 'scripts/marketplace-install.js' },
|
|
41
|
+
lint: {
|
|
42
|
+
script: 'scripts/skill-lint.js',
|
|
43
|
+
help: `Usage: skill-graph lint [<skill>] [options]
|
|
44
|
+
|
|
45
|
+
Validate SKILL.md files against the Skill Metadata Protocol schema and lint rules.
|
|
46
|
+
|
|
47
|
+
Arguments:
|
|
48
|
+
[<skill>] Path or name of a specific skill to lint. If omitted, lints all skills.
|
|
49
|
+
|
|
50
|
+
Options:
|
|
51
|
+
--include-template Also lint examples/protocol/skill-metadata-template.md.
|
|
52
|
+
--path <dir> Override the skills root directory.
|
|
53
|
+
--json Emit JSON output.
|
|
54
|
+
--strict Treat warnings as errors.
|
|
55
|
+
|
|
56
|
+
Examples:
|
|
57
|
+
skill-graph lint
|
|
58
|
+
skill-graph lint my-skill
|
|
59
|
+
skill-graph lint --include-template
|
|
60
|
+
`,
|
|
61
|
+
},
|
|
62
|
+
audit: {
|
|
63
|
+
script: 'lib/audit/skill-audit.js',
|
|
64
|
+
help: `Usage: skill-graph audit <skill-name> [options]
|
|
65
|
+
|
|
66
|
+
Seed or run a single-skill audit against a SKILL.md file.
|
|
67
|
+
|
|
68
|
+
Arguments:
|
|
69
|
+
<skill-name> Skill directory name (relative to workspace skill roots).
|
|
70
|
+
|
|
71
|
+
Options:
|
|
72
|
+
--audit-root <path> Output directory root (default: examples/audits/).
|
|
73
|
+
--force Overwrite existing audit artifacts.
|
|
74
|
+
--graded Enable the prompt-driven grader pass.
|
|
75
|
+
--grader-cli <cmd> Grader command (default: claude -p). Requires --graded.
|
|
76
|
+
--grader-timeout <ms> Per-dimension grader timeout (default: 120000).
|
|
77
|
+
|
|
78
|
+
Examples:
|
|
79
|
+
skill-graph audit my-skill
|
|
80
|
+
skill-graph audit my-skill --graded
|
|
81
|
+
skill-graph audit my-skill --graded --grader-cli "codex exec" --force
|
|
82
|
+
`,
|
|
83
|
+
},
|
|
84
|
+
route: {
|
|
85
|
+
script: 'scripts/skill-graph-route.js',
|
|
86
|
+
help: `Usage: skill-graph route <query> [options]
|
|
87
|
+
|
|
88
|
+
Select and explain which skills are relevant for a natural-language query.
|
|
89
|
+
|
|
90
|
+
Arguments:
|
|
91
|
+
<query> Natural-language description of the task or topic.
|
|
92
|
+
|
|
93
|
+
Options:
|
|
94
|
+
--project <name> Filter to skills in a specific project.
|
|
95
|
+
--max <n> Maximum number of skills to return (default: 5).
|
|
96
|
+
--manifest <path> Path to compiled manifest (default: skills.manifest.json).
|
|
97
|
+
--json Emit JSON output.
|
|
98
|
+
--min-eval-state Minimum eval state filter (unverified|passing|monitored).
|
|
99
|
+
|
|
100
|
+
Examples:
|
|
101
|
+
skill-graph route "audit my skills for schema conformance"
|
|
102
|
+
skill-graph route "debug a failing eval" --max 3
|
|
103
|
+
`,
|
|
104
|
+
},
|
|
105
|
+
drift: {
|
|
106
|
+
script: 'scripts/skill-graph-drift.js',
|
|
107
|
+
help: `Usage: skill-graph drift [skill] [options]
|
|
108
|
+
|
|
109
|
+
Check whether grounding truth-source files have changed since the last recorded hash.
|
|
110
|
+
|
|
111
|
+
Arguments:
|
|
112
|
+
[skill] Skill name to check. If omitted, checks all skills.
|
|
113
|
+
|
|
114
|
+
Options:
|
|
115
|
+
--record Record current hashes as the new baseline.
|
|
116
|
+
--apply <skill> Apply hash recording to a specific skill only.
|
|
117
|
+
--json Emit JSON output.
|
|
118
|
+
|
|
119
|
+
Examples:
|
|
120
|
+
skill-graph drift
|
|
121
|
+
skill-graph drift graph-audit
|
|
122
|
+
skill-graph drift --record --apply skills/graph-audit
|
|
123
|
+
`,
|
|
124
|
+
},
|
|
125
|
+
export: {
|
|
126
|
+
script: 'scripts/export-marketplace-skills.js',
|
|
127
|
+
help: `Usage: skill-graph export [options]
|
|
128
|
+
|
|
129
|
+
Generate and validate the public marketplace export surface.
|
|
130
|
+
|
|
131
|
+
Options:
|
|
132
|
+
--output <dir> Marketplace output root (default: marketplace).
|
|
133
|
+
--check Do not write; fail if generated files are missing or stale.
|
|
134
|
+
--validate-only Alias for --check.
|
|
135
|
+
|
|
136
|
+
Examples:
|
|
137
|
+
skill-graph export
|
|
138
|
+
skill-graph export --check
|
|
139
|
+
`,
|
|
140
|
+
},
|
|
141
|
+
evolve: {
|
|
142
|
+
script: 'lib/audit/skill-evolution-loop.js',
|
|
143
|
+
requires: ['lib/audit-shared/auto-improve.js'],
|
|
144
|
+
unmetMessage: `skill-graph evolve depends on lib/audit-shared/auto-improve.js, which is\n` +
|
|
145
|
+
`not yet bundled in this release. The script also reaches into parent-repo paths\n` +
|
|
146
|
+
`(scripts/run-skill-improvement-loop.js, scripts/skill-auto-create.js,\n` +
|
|
147
|
+
`scripts/dispatch-solver.js, agent-orchestration/logs/) that exist only in the\n` +
|
|
148
|
+
`source Development monorepo.\n\n` +
|
|
149
|
+
`Standalone-compatible refactor tracked in SH-6138 (parent EPIC SH-6132).\n` +
|
|
150
|
+
`Until then, run the loop from the source repo where these deps are available.`,
|
|
151
|
+
help: `Usage: skill-graph evolve [options]
|
|
152
|
+
|
|
153
|
+
Run the continuous Karpathy-style skill-improvement loop.
|
|
154
|
+
|
|
155
|
+
Options:
|
|
156
|
+
--top <n> Process top n items per cycle (default: 5).
|
|
157
|
+
--max-cycles <n> Maximum improvement cycles (default: 10).
|
|
158
|
+
--max-iterations <n> Safety cap per cycle (default: 20).
|
|
159
|
+
--continuous Auto re-analyze and repeat until convergence.
|
|
160
|
+
--auto-improve Full Karpathy spine (analyze → triage → execute → verify).
|
|
161
|
+
--analyze-only Produce analysis without executing improvements.
|
|
162
|
+
--resume Resume from last checkpoint.
|
|
163
|
+
--cooldown <sec> Seconds between continuous cycles (default: 0).
|
|
164
|
+
--min-priority <n> Skip items below this priority score (default: 0).
|
|
165
|
+
--failure-budget <n> Tolerated failures before aborting (default: 5).
|
|
166
|
+
--pilot <skill> Run in bounded pilot lane for a single skill.
|
|
167
|
+
--actions <list> Comma-separated action types to allow (default: all).
|
|
168
|
+
|
|
169
|
+
Examples:
|
|
170
|
+
skill-graph evolve --top 5 --max-cycles 3
|
|
171
|
+
skill-graph evolve --continuous --max-cycles 20 --min-priority 5
|
|
172
|
+
skill-graph evolve --auto-improve --max-cycles 3 --failure-budget 5
|
|
173
|
+
skill-graph evolve --analyze-only
|
|
174
|
+
skill-graph evolve --resume
|
|
175
|
+
|
|
176
|
+
Note: skill-graph evolve is not yet standalone-compatible. It depends on
|
|
177
|
+
lib/audit-shared/auto-improve.js and several parent-repo scripts that
|
|
178
|
+
do not yet ship with @skill-graph/cli. Tracking the standalone refactor
|
|
179
|
+
in SH-6138. Until then, run the loop from the source Development repo.
|
|
180
|
+
`,
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
// ─── Legacy / additional subcommands (backward compat) ───────────────────
|
|
184
|
+
manifest: { script: 'scripts/generate-manifest.js' },
|
|
185
|
+
overlap: { script: 'scripts/skill-overlap.js' },
|
|
186
|
+
'routing-eval': { script: 'scripts/skill-graph-routing-eval.js' },
|
|
187
|
+
'export-verify': { script: 'scripts/verify-skill-md-export.js' },
|
|
188
|
+
'export:verify-skill-md': { script: 'scripts/verify-skill-md-export.js' },
|
|
189
|
+
'marketplace-export': { script: 'scripts/export-marketplace-skills.js' },
|
|
190
|
+
'marketplace:export': { script: 'scripts/export-marketplace-skills.js' },
|
|
191
|
+
'protocol-check': { script: 'scripts/check-protocol-consistency.js' },
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
function printHelp() {
|
|
195
|
+
process.stdout.write(`Usage: skill-graph <command> [args]
|
|
196
|
+
|
|
197
|
+
Commands:
|
|
198
|
+
init Scaffold a new SKILL.md from the official template
|
|
199
|
+
add <slug> Install a skill from the marketplace into your library
|
|
200
|
+
lint [skill] Validate SKILL.md files against the schema and lint rules
|
|
201
|
+
audit <skill> Seed or run a single-skill audit (stub or graded mode)
|
|
202
|
+
route <query> Select and explain skills for a natural-language query
|
|
203
|
+
drift Check or record grounding truth-source hashes (drift sentinel)
|
|
204
|
+
export Generate and validate the public marketplace export surface
|
|
205
|
+
evolve Run the continuous skill-improvement loop (Karpathy-style)
|
|
206
|
+
|
|
207
|
+
Additional commands (retained for backward compatibility):
|
|
208
|
+
manifest Generate or validate a skills.manifest.json
|
|
209
|
+
overlap Detect duplicate activation signals across skills
|
|
210
|
+
routing-eval Run routing examples / anti_examples through the router
|
|
211
|
+
export-verify Verify exported skills against the plain SKILL.md export shape
|
|
212
|
+
marketplace-export
|
|
213
|
+
Alias for export
|
|
214
|
+
protocol-check Check cross-artifact protocol consistency
|
|
215
|
+
|
|
216
|
+
Examples:
|
|
217
|
+
skill-graph init
|
|
218
|
+
skill-graph add debugging
|
|
219
|
+
skill-graph lint --include-template
|
|
220
|
+
skill-graph audit my-skill --graded
|
|
221
|
+
skill-graph route "audit my skills for schema conformance"
|
|
222
|
+
skill-graph drift --record --apply skills/graph-audit
|
|
223
|
+
skill-graph export
|
|
224
|
+
skill-graph evolve --top 5 --max-cycles 3
|
|
225
|
+
`);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ---------------------------------------------------------------------------
|
|
229
|
+
// `init` — inline scaffolder
|
|
230
|
+
// ---------------------------------------------------------------------------
|
|
231
|
+
// Copies examples/protocol/skill-metadata-template.md into
|
|
232
|
+
// skills/<slug>/SKILL.md in the caller's working directory (or SKILL.md in
|
|
233
|
+
// the current directory if no slug is given).
|
|
234
|
+
|
|
235
|
+
function runInit(args) {
|
|
236
|
+
const helpFlag = args.includes('--help') || args.includes('-h');
|
|
237
|
+
if (helpFlag) {
|
|
238
|
+
process.stdout.write(`Usage: skill-graph init [<slug>] [options]
|
|
239
|
+
|
|
240
|
+
Scaffold a new skill from the official Skill Metadata Protocol template.
|
|
241
|
+
|
|
242
|
+
Arguments:
|
|
243
|
+
<slug> Name for the new skill directory (e.g. "my-skill").
|
|
244
|
+
If omitted, writes SKILL.md in the current directory.
|
|
245
|
+
|
|
246
|
+
Options:
|
|
247
|
+
--output <dir> Override the output directory.
|
|
248
|
+
--force Overwrite an existing SKILL.md.
|
|
249
|
+
--help Show this help.
|
|
250
|
+
|
|
251
|
+
Examples:
|
|
252
|
+
skill-graph init
|
|
253
|
+
skill-graph init my-skill
|
|
254
|
+
skill-graph init my-skill --output ./skills
|
|
255
|
+
`);
|
|
256
|
+
process.exit(0);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const templateSrc = path.join(REPO_ROOT, 'examples', 'protocol', 'skill-metadata-template.md');
|
|
260
|
+
if (!fs.existsSync(templateSrc)) {
|
|
261
|
+
process.stderr.write(`Error: template not found at ${templateSrc}\n`);
|
|
262
|
+
process.stderr.write('Is REPO_ROOT set correctly? (' + REPO_ROOT + ')\n');
|
|
263
|
+
process.exit(1);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Resolve output path.
|
|
267
|
+
let slug = null;
|
|
268
|
+
let outputDir = null;
|
|
269
|
+
for (let i = 0; i < args.length; i++) {
|
|
270
|
+
if (args[i] === '--output' && args[i + 1]) { outputDir = args[++i]; }
|
|
271
|
+
else if (args[i] === '--force') { /* handled below */ }
|
|
272
|
+
else if (!args[i].startsWith('--')) { slug = args[i]; }
|
|
273
|
+
}
|
|
274
|
+
const force = args.includes('--force');
|
|
275
|
+
|
|
276
|
+
let destDir;
|
|
277
|
+
if (outputDir) {
|
|
278
|
+
destDir = slug ? path.resolve(outputDir, slug) : path.resolve(outputDir);
|
|
279
|
+
} else {
|
|
280
|
+
destDir = slug ? path.resolve(process.cwd(), 'skills', slug) : process.cwd();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
const destFile = path.join(destDir, 'SKILL.md');
|
|
284
|
+
|
|
285
|
+
if (fs.existsSync(destFile) && !force) {
|
|
286
|
+
process.stderr.write(`Error: ${destFile} already exists. Use --force to overwrite.\n`);
|
|
287
|
+
process.exit(1);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
fs.mkdirSync(destDir, { recursive: true });
|
|
291
|
+
fs.copyFileSync(templateSrc, destFile);
|
|
292
|
+
|
|
293
|
+
process.stdout.write(`Created: ${destFile}\n`);
|
|
294
|
+
if (slug) {
|
|
295
|
+
process.stdout.write(`\nNext steps:\n`);
|
|
296
|
+
process.stdout.write(` 1. Edit ${destFile} — fill in name, description, domain_context, etc.\n`);
|
|
297
|
+
process.stdout.write(` 2. Strip all "# TEMPLATE NOTE:" comments and "> **TEMPLATE NOTE:**" blockquotes.\n`);
|
|
298
|
+
process.stdout.write(` 3. Run: skill-graph lint ${slug}\n`);
|
|
299
|
+
} else {
|
|
300
|
+
process.stdout.write(`\nEdit SKILL.md and strip all template scaffolding before shipping.\n`);
|
|
301
|
+
}
|
|
302
|
+
process.exit(0);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// ---------------------------------------------------------------------------
|
|
306
|
+
// Main dispatcher
|
|
307
|
+
// ---------------------------------------------------------------------------
|
|
308
|
+
|
|
309
|
+
function main() {
|
|
310
|
+
const args = process.argv.slice(2);
|
|
311
|
+
const command = args.shift();
|
|
312
|
+
|
|
313
|
+
if (!command || command === '--help' || command === '-h' || command === 'help') {
|
|
314
|
+
printHelp();
|
|
315
|
+
process.exit(0);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const entry = COMMANDS[command];
|
|
319
|
+
if (!entry) {
|
|
320
|
+
process.stderr.write(`Unknown command: ${command}\n\n`);
|
|
321
|
+
printHelp();
|
|
322
|
+
process.exit(1);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
// Inline subcommands run in-process.
|
|
326
|
+
if (entry.inline) {
|
|
327
|
+
if (command === 'init') { runInit(args); }
|
|
328
|
+
// (future inline commands added here)
|
|
329
|
+
return;
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// Intercept --help / -h before delegating to scripts that may not support it.
|
|
333
|
+
const wantsHelp = args.includes('--help') || args.includes('-h');
|
|
334
|
+
if (wantsHelp && entry.help) {
|
|
335
|
+
process.stdout.write(entry.help);
|
|
336
|
+
process.exit(0);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const scriptPath = path.join(REPO_ROOT, entry.script);
|
|
340
|
+
if (!fs.existsSync(scriptPath)) {
|
|
341
|
+
process.stderr.write(`Error: implementation script not found: ${entry.script}\n`);
|
|
342
|
+
process.stderr.write(`REPO_ROOT: ${REPO_ROOT}\n`);
|
|
343
|
+
process.exit(1);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
if (Array.isArray(entry.requires) && entry.requires.length) {
|
|
347
|
+
const missing = entry.requires.filter((rel) => !fs.existsSync(path.join(REPO_ROOT, rel)));
|
|
348
|
+
if (missing.length) {
|
|
349
|
+
process.stderr.write(`Error: '${command}' is not standalone-compatible in this release.\n\n`);
|
|
350
|
+
if (entry.unmetMessage) process.stderr.write(`${entry.unmetMessage}\n\n`);
|
|
351
|
+
process.stderr.write(`Missing required file(s):\n`);
|
|
352
|
+
for (const rel of missing) process.stderr.write(` - ${rel}\n`);
|
|
353
|
+
process.exit(1);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
const result = spawnSync(process.execPath, [scriptPath, ...args], {
|
|
358
|
+
cwd: process.cwd(),
|
|
359
|
+
env: {
|
|
360
|
+
...process.env,
|
|
361
|
+
SKILL_GRAPH_PACKAGE_ROOT: REPO_ROOT,
|
|
362
|
+
SKILL_GRAPH_WORKSPACE: process.cwd(),
|
|
363
|
+
},
|
|
364
|
+
stdio: 'inherit',
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
if (result.error) {
|
|
368
|
+
process.stderr.write(`Failed to run ${command}: ${result.error.message}\n`);
|
|
369
|
+
process.exit(1);
|
|
370
|
+
}
|
|
371
|
+
process.exit(result.status == null ? 1 : result.status);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
main();
|
package/docs/ADOPTION.md
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Adopting Skill Graph
|
|
2
|
+
|
|
3
|
+
> Should you adopt Skill Graph for your AI agent skill library? This page is a 1-screen decision tree. For the full mental model, read [`PRIMER.md`](PRIMER.md). For the contract details, read [`skill-metadata-protocol.md`](skill-metadata-protocol.md).
|
|
4
|
+
|
|
5
|
+
## Relevance probe
|
|
6
|
+
|
|
7
|
+
> **Skill Metadata Protocol is for project-relevant skills; Skill Graph is for operating on a library of them.** If your skills are generic (no codebase grounding, no inter-skill relations, one project), plain `SKILL.md` covers it. If you've started authoring skills that reference real files in your repo, that need to coexist with related skills, or that should activate for some projects but not others, you need the protocol. If you then want indexing, routing, clustering, drift checks, and eval loops across the library, you are in Skill Graph territory. For progressive adoption levels, read [`CONFORMANCE.md`](CONFORMANCE.md).
|
|
8
|
+
>
|
|
9
|
+
> The pain test is the same idea, said differently: if you've ever said *"why did the agent load the wrong skill?"* or *"this skill was right last week but the code changed,"* those are the failure modes the contract addresses. Library size is a proxy — these failures usually become worth the extra metadata around 10-15 skills, earlier with multiple projects or grounded codebase skills, later for a single small library.
|
|
10
|
+
|
|
11
|
+
## You don't have skills yet?
|
|
12
|
+
|
|
13
|
+
If you have not yet authored any skills, start with plain `SKILL.md` files first. That is the on-ramp. **Pilot Skill Graph on one painful skill before migrating the whole library**: usually around 10-15 skills, or earlier if you have multiple projects, repo-grounded claims, or a real wrong-routing incident.
|
|
14
|
+
|
|
15
|
+
## Quick yes/no
|
|
16
|
+
|
|
17
|
+
You should adopt Skill Graph if your skill library has any of these properties:
|
|
18
|
+
|
|
19
|
+
1. **Two or more skills cover overlapping territory** and the agent routes to the wrong one.
|
|
20
|
+
2. **One skill is load-bearing for another** and you've silently broken the assumption.
|
|
21
|
+
3. **One or more skills are grounded in specific repo files** that change frequently.
|
|
22
|
+
4. **You run evals on skills** and want the router to respect quality.
|
|
23
|
+
5. **You're authoring skills for multiple projects** that share some and diverge on others.
|
|
24
|
+
6. **You need to verify a skill still matches reality** (drift detection on grounded claims).
|
|
25
|
+
|
|
26
|
+
If none of these apply, stay on plain [`SKILL.md`](https://agentskills.io/specification). The extra fields are overhead without payoff until the library is large enough to produce the implicit graph.
|
|
27
|
+
|
|
28
|
+
## The 5-minute decision
|
|
29
|
+
|
|
30
|
+
| You have… | You want… | Recommendation |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| 0-9 skills, single project, no grounded skills, no wrong-routing incidents | A simple way to author and load instructions | Stay on plain `SKILL.md`; revisit when routing or grounding pain appears |
|
|
33
|
+
| **10+ skills with one wrong-routing incident OR multi-project workspace OR any grounded skill** | Routing that respects relations + drift detection + project scoping | **Pilot Skill Graph on the painful skill first** |
|
|
34
|
+
| Skills grounded in repo files | Drift detection when truth sources change | **Adopt Skill Graph** (drift sentinel) |
|
|
35
|
+
| Multi-project workspace | Shared skills + project-specific overlays | **Adopt Skill Graph** (multi-root mode) |
|
|
36
|
+
| Skills shipped externally | Compatibility with `SKILL.md` consumers | **Adopt Skill Graph + use export transform** |
|
|
37
|
+
| Skills with formal evals | Honest routing claims (lint enforces) | **Adopt Skill Graph** (routing-eval check) |
|
|
38
|
+
|
|
39
|
+
## Cost-benefit summary
|
|
40
|
+
|
|
41
|
+
| You pay | Time investment per skill | You get (in outcomes) |
|
|
42
|
+
|---|---|---|
|
|
43
|
+
| 13 required frontmatter fields per skill (vs plain `SKILL.md`'s 2) | ~15-20 min first pass (use template) | Wrong-skill activation becomes debuggable |
|
|
44
|
+
| SHA-256 baselines for grounded skills | ~5 min one-command baseline (`drift-check --record`) | Repo-specific skills stop silently rotting |
|
|
45
|
+
| Cross-skill relation existence checks | ~10 min on day 1 (less afterward as relations stabilise) | Team conventions become auditable rather than tribal |
|
|
46
|
+
| Time-boxed `freshness` claims | <1 min per re-verification | Credibility you can defend in code review |
|
|
47
|
+
| Schema versioning discipline | One-time codemod per major bump | Smooth migration story across breaking schema bumps |
|
|
48
|
+
| One export transform step before publishing externally | ~1 min one command | One-way compatibility with the plain `SKILL.md` format |
|
|
49
|
+
|
|
50
|
+
**Total time per skill on day 1: ~20-30 min. Steady-state after the library settles: ~10-15 min per new skill.**
|
|
51
|
+
|
|
52
|
+
The fields you pay for cluster into 8 semantic purposes (Identity, Classification, Health, Eval Health, Activation & Routing, Relations, Grounding, Portability). The full anatomy is in [`skill-metadata-protocol.md § Anatomy`](skill-metadata-protocol.md).
|
|
53
|
+
|
|
54
|
+
## 5-minute quickstart
|
|
55
|
+
|
|
56
|
+
> **Step 0 — pilot first, do not migrate the whole library.** Choose ONE skill currently most likely to misroute or drift. Add the required Skill Metadata Protocol fields, route a real query against it, record a drift baseline. Pay the contract once on a skill where the payoff is visible, before paying it 20 times across skills where it isn't yet. The 30-minute walkthrough in [`docs/QUICKSTART-30MIN.md`](QUICKSTART-30MIN.md) walks you through this with literal terminal output at every step.
|
|
57
|
+
|
|
58
|
+
For the full conceptual primer read [`PRIMER.md`](PRIMER.md). To migrate your first skill from a valid plain `SKILL.md` file:
|
|
59
|
+
|
|
60
|
+
1. **Copy the template** — `cp examples/skill-metadata-template.md skills/<your-skill>/SKILL.md`. The template is a real, valid, schema-conformant Skill Metadata Protocol skill whose subject is skill authoring itself; adapt by rewriting identity, description, body, and verification.
|
|
61
|
+
2. **Add the 13 required Skill Metadata Protocol fields** — `schema_version: 4`, `version`, `type`, `category`, `scope`, `owner`, `freshness`, `drift_check`, `eval_artifacts`, `eval_state`, `routing_eval`, plus your existing `name` and `description`. The template inline-comments each field.
|
|
62
|
+
3. **Strip the teaching annotations** — every `> **TEMPLATE NOTE:**` blockquote and `# TEMPLATE NOTE:` YAML comment must be removed before commit.
|
|
63
|
+
4. **Validate locally:**
|
|
64
|
+
```bash
|
|
65
|
+
node scripts/skill-lint.js # schema + relations + evals + sections
|
|
66
|
+
node scripts/check-protocol-consistency.js # cross-artifact parity
|
|
67
|
+
node scripts/generate-manifest.js # compile to a deterministic manifest
|
|
68
|
+
node scripts/skill-graph-route.js --query "your test query" # see routing in action
|
|
69
|
+
```
|
|
70
|
+
5. **If the skill is grounded in repo files**, record the drift baseline:
|
|
71
|
+
```bash
|
|
72
|
+
node scripts/skill-graph-drift.js --record --apply skills/<your-skill>
|
|
73
|
+
```
|
|
74
|
+
6. **If you need to publish externally**, project back to plain `SKILL.md` shape:
|
|
75
|
+
```bash
|
|
76
|
+
node scripts/export-skill.js skills/<your-skill>
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If any step fails, the error message names the rule and the file. Lint output is the primary debugging surface; it's deliberately verbose.
|
|
80
|
+
|
|
81
|
+
## When to revisit your adoption decision
|
|
82
|
+
|
|
83
|
+
Re-evaluate the cost-benefit when:
|
|
84
|
+
|
|
85
|
+
- **Your library exceeds 20 skills.** Implicit graph density is hitting; explicit relations start paying back the authoring cost.
|
|
86
|
+
- **You hit a routing failure** that descriptions alone can't fix. `relations.boundary` and `relations.disjoint_with` exist for exactly this.
|
|
87
|
+
- **An eval reveals a quality gradient** you want to express in metadata. `eval_state` + `eval_artifacts` + `routing_eval` are the three orthogonal axes.
|
|
88
|
+
- **A grounded skill claims something the codebase no longer supports.** The drift sentinel will surface this — but only if you adopted it before the drift accumulated.
|
|
89
|
+
- **You start authoring skills for a second project** that shares some and diverges on others. Multi-root workspace mode + `workspace_tags` is built for this.
|
|
90
|
+
|
|
91
|
+
## What Skill Graph is *not*
|
|
92
|
+
|
|
93
|
+
To set expectations honestly:
|
|
94
|
+
|
|
95
|
+
- **Not a router.** Skill Graph ships a *reference* router (`scripts/skill-graph-route.js`) to demonstrate why the metadata exists. Production routers should consume the manifest and apply their own scoring. The reference router is intentionally simple.
|
|
96
|
+
- **Not a runtime.** Skill Graph defines the contract and ships the validators. It does not load skills into an agent at request time — that's the consumer's job.
|
|
97
|
+
- **Not a full ontology framework.** The relations are typed (boundary, related, broader, narrower, depends_on, verify_with) but Skill Graph does not implement OWL inference, satisfiability checking, or formal class subsumption. Use `ontology-modeling` if you need that.
|
|
98
|
+
- **Not a proprietary format.** The schema is JSON Schema; code and docs are Apache-2.0 and reusable skill content is CC-BY-4.0. The export transform projects protocol skills to the plain `SKILL.md` format.
|
|
99
|
+
|
|
100
|
+
## Where to go next
|
|
101
|
+
|
|
102
|
+
| You want to… | Read |
|
|
103
|
+
|---|---|
|
|
104
|
+
| Understand the conceptual model | [`PRIMER.md`](PRIMER.md) |
|
|
105
|
+
| Choose an adoption level | [`CONFORMANCE.md`](CONFORMANCE.md) |
|
|
106
|
+
| Verify `SKILL.md` export compatibility | [`SKILL-MD-FORMAT-COMPATIBILITY.md`](SKILL-MD-FORMAT-COMPATIBILITY.md) |
|
|
107
|
+
| Measure routing quality | [`ROUTING-METRICS.md`](ROUTING-METRICS.md) |
|
|
108
|
+
| Look up a specific field's semantics | [`field-reference.md`](field-reference.md) |
|
|
109
|
+
| See a worked authoring example | [`../examples/skill-metadata-template.md`](../examples/skill-metadata-template.md) |
|
|
110
|
+
| Read the architecture and authority tiers | [`SKILL_GRAPH.md`](../SKILL_GRAPH.md) |
|
|
111
|
+
| See which skills are recommended for a starter library | [`recommended-skills.md`](recommended-skills.md) |
|
|
112
|
+
| Set up CI integration | [`integrations/github-actions.md`](integrations/github-actions.md) |
|
|
113
|
+
| Decide between four overlapping taxonomy axes | [`field-decision-guide.md`](field-decision-guide.md) |
|
|
114
|
+
|
|
115
|
+
## Compatibility direction (one-paragraph honesty)
|
|
116
|
+
|
|
117
|
+
A Skill-Metadata-Protocol-enriched `SKILL.md` is **not** the same as the plain export shape. The `compatibility` shape is structured, and protocol fields live at the top level while the export puts extension fields under `metadata:` as strings. Skill Metadata Protocol -> plain `SKILL.md` is automated via `scripts/export-skill.js`. Plain `SKILL.md` -> Skill Metadata Protocol is a manual rewrite: you must add the additional required fields. See [`SKILL-MD-FORMAT-COMPATIBILITY.md`](SKILL-MD-FORMAT-COMPATIBILITY.md) for the verifier contract.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Skill Graph Conformance
|
|
2
|
+
|
|
3
|
+
> Read this if you need to decide how much Skill Metadata Protocol structure a
|
|
4
|
+
> skill library should adopt, or if you need to explain compatibility with base
|
|
5
|
+
> `SKILL.md`-compatible runtimes.
|
|
6
|
+
|
|
7
|
+
Skill Metadata Protocol is an authoring and operations superset. Plain
|
|
8
|
+
`SKILL.md` remains the runtime portability floor. Conformance is therefore layered:
|
|
9
|
+
adopt the smallest level that pays for itself, then move up only when routing,
|
|
10
|
+
grounding, evals, or team maintenance need the extra contract.
|
|
11
|
+
|
|
12
|
+
## Format Map
|
|
13
|
+
|
|
14
|
+
| Format | Purpose | Valid where |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| Plain `SKILL.md` skill | Portable runtime package | `SKILL.md`-compatible runtimes |
|
|
17
|
+
| Skill Metadata Protocol skill | Authoring, routing, grounding, and governance | Skill Graph tooling |
|
|
18
|
+
| Exported `SKILL.md` skill | Runtime artifact generated from Skill Metadata Protocol | `SKILL.md`-compatible runtimes |
|
|
19
|
+
|
|
20
|
+
## Levels
|
|
21
|
+
|
|
22
|
+
| Level | Name | Contract | Typical proof command |
|
|
23
|
+
|---|---|---|---|
|
|
24
|
+
| L0 | Portable Skill | Valid plain `SKILL.md`: `name`, `description`, optional base fields. | `skills-ref validate <skill-dir>` |
|
|
25
|
+
| L1 | Routable Skill | Valid Skill Metadata Protocol frontmatter with enough activation metadata to route and explain selection. | `node scripts/skill-lint.js <skill-dir>` |
|
|
26
|
+
| L2 | Grounded Skill | L1 plus `grounding.truth_sources`, `scope: codebase` when appropriate, and a drift baseline. | `node scripts/skill-graph-drift.js <skill-dir>` |
|
|
27
|
+
| L3 | Audited Skill | L2 plus eval artifacts, routing examples / anti-examples, and receipts for claimed passing state. | `node scripts/skill-graph-routing-eval.js --skill <name>` |
|
|
28
|
+
| L4 | Managed Skill | L3 plus CI, ownership, lifecycle cadence, workspace project mapping, and export verification. | `npm run verify` |
|
|
29
|
+
|
|
30
|
+
## What Each Level Is For
|
|
31
|
+
|
|
32
|
+
**L0 - Portable Skill.** Use this for small libraries, personal skills, and
|
|
33
|
+
skills that need no cross-skill graph. Do not add protocol fields just to look
|
|
34
|
+
complete.
|
|
35
|
+
|
|
36
|
+
**L1 - Routable Skill.** Use this when descriptions alone are not enough:
|
|
37
|
+
overlapping skills, ambiguous prompts, path-based activation, or explicit
|
|
38
|
+
`relations.boundary` handoff.
|
|
39
|
+
|
|
40
|
+
**L2 - Grounded Skill.** Use this when a skill makes claims about real repo
|
|
41
|
+
files, APIs, schemas, or operational behavior. The drift hash proves evidence
|
|
42
|
+
changed or did not change; it does not prove the skill is semantically correct.
|
|
43
|
+
|
|
44
|
+
**L3 - Audited Skill.** Use this when `eval_state: passing`,
|
|
45
|
+
`routing_eval: present`, or public reuse would otherwise be an unsupported
|
|
46
|
+
claim. Lint should be able to find the artifact or receipt behind the metadata.
|
|
47
|
+
|
|
48
|
+
**L4 - Managed Skill.** Use this for maintained team libraries. L4 is a library
|
|
49
|
+
posture, not a requirement that every individual skill carry every optional
|
|
50
|
+
field.
|
|
51
|
+
|
|
52
|
+
## Adoption Rule
|
|
53
|
+
|
|
54
|
+
Start with one painful skill: the one that misroutes most often, cites repo
|
|
55
|
+
truth, or gets reused across projects. Bring that skill to L2 or L3 before
|
|
56
|
+
migrating the whole library. The protocol is useful when the metadata changes a
|
|
57
|
+
decision a tool can make.
|
|
58
|
+
|
|
59
|
+
## Related Docs
|
|
60
|
+
|
|
61
|
+
| Need | Read |
|
|
62
|
+
|---|---|
|
|
63
|
+
| Base-standard mapping and export rules | [`SKILL-MD-FORMAT-COMPATIBILITY.md`](SKILL-MD-FORMAT-COMPATIBILITY.md) |
|
|
64
|
+
| First-skill decision tree | [`ADOPTION.md`](ADOPTION.md) |
|
|
65
|
+
| Field-level authoring rules | [`field-reference.md`](field-reference.md) |
|
|
66
|
+
| Routing metrics and scaling limits | [`ROUTING-METRICS.md`](ROUTING-METRICS.md) |
|