@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,609 @@
|
|
|
1
|
+
# Skill Metadata Protocol
|
|
2
|
+
|
|
3
|
+
> **Version:** 1.3.0 (schema_version 6, Skill Graph 0.6.0)
|
|
4
|
+
> **Machine-readable schema:** `schemas/skill.v6.schema.json` (v4 and v5 schemas remain for back-compat reads via `normalizeFrontmatter()`)
|
|
5
|
+
> **Migration from v5:** `docs/migrations/v5-to-v6.md`
|
|
6
|
+
> **Migration from v4:** `docs/migrations/v4-to-v5.md`
|
|
7
|
+
> **Detailed field reference:** `docs/field-reference.md`
|
|
8
|
+
> **Full semantics + design rationale:** `docs/skill-metadata-protocol.md`
|
|
9
|
+
|
|
10
|
+
This document is the top-level public contract for the Skill Metadata Protocol frontmatter format — the **normative spec**. It defines which fields are required, what each field means in operational terms, which fields are authored by humans vs computed by tooling, and how to migrate from older schema versions. Skill Graph is the library-level system that consumes this contract. The prose is terse and boundary-aware: every clause is a rule a consumer or author can verify against the schema and against `scripts/skill-lint.js`.
|
|
11
|
+
|
|
12
|
+
**Companion docs by genre.** This contract is the *what*. The *why* — design rationale, archetype semantics, OntoClean rigidity, the eval-health triple's orthogonality, the JSON-LD W3C mappings, and the philosophical posture behind the field choices — lives in [`skill-metadata-protocol.md`](skill-metadata-protocol.md). The two docs are coordinated and grow together: a normative rule that lacks a "why" is fragile; a "why" that lacks a normative rule is vapourware. If you are authoring a SKILL.md, you read this file. If you are deciding whether to add a field to the schema, you read both.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Contents
|
|
17
|
+
|
|
18
|
+
1. [Overview](#overview)
|
|
19
|
+
2. [Required vs Optional Fields](#required-vs-optional-fields)
|
|
20
|
+
3. [Semantic Rules by Field Group](#semantic-rules-by-field-group)
|
|
21
|
+
- [Identity](#identity)
|
|
22
|
+
- [Classification](#classification)
|
|
23
|
+
- [Health and Drift](#health-and-drift)
|
|
24
|
+
- [Eval Health](#eval-health)
|
|
25
|
+
- [Activation and Routing](#activation-and-routing)
|
|
26
|
+
- [Relations](#relations)
|
|
27
|
+
- [Grounding](#grounding)
|
|
28
|
+
- [Portability and Standards](#portability-and-standards)
|
|
29
|
+
4. [Authored vs Generated Fields](#authored-vs-generated-fields)
|
|
30
|
+
5. [Migration Notes](#migration-notes)
|
|
31
|
+
6. [Design Constraints](#design-constraints)
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Overview
|
|
36
|
+
|
|
37
|
+
Every skill is a single `SKILL.md` file with a YAML frontmatter block. The frontmatter is validated by `skill-lint.js` against `schemas/skill.v6.schema.json`. The `generate-manifest.js` script reads frontmatter from all skill files and emits a single `skills.manifest.json`.
|
|
38
|
+
|
|
39
|
+
The contract has one runtime model: one `SKILL.md` per skill, one manifest, one lint pass. There is no closed/open split, no private control plane, and no enterprise-only fields.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Required vs Optional Fields
|
|
44
|
+
|
|
45
|
+
### Required for all skills
|
|
46
|
+
|
|
47
|
+
All thirteen fields in this group are required. A skill missing any of them fails lint with an error.
|
|
48
|
+
|
|
49
|
+
| Field | Type | Purpose |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `schema_version` | integer `6` | Signals the contract version. Must be `6` for all v6 skills. See `docs/migrations/v5-to-v6.md`. |
|
|
52
|
+
| `name` | string | Stable identifier. Used for routing and `relations.*` targets. |
|
|
53
|
+
| `description` | string (≥20 chars) | Routing contract — tells the router when to activate this skill. |
|
|
54
|
+
| `version` | semver string | Skill content version (e.g. `1.2.0`). Bumped by the author. |
|
|
55
|
+
| `type` | enum | One of: `capability`, `workflow`, `router`, `overlay`. |
|
|
56
|
+
| `category` | enum | Browse facet. One of: `foundations`, `engineering`, `design`, `quality`, `agent`, `product`. See § Classification for the foundations-gate. |
|
|
57
|
+
| `scope` | enum | One of: `codebase`, `reference`, `portable`. |
|
|
58
|
+
| `owner` | string | Team, username, or tool that is responsible for keeping this skill current. |
|
|
59
|
+
| `freshness` | ISO date | Date the skill body was last reviewed or updated. |
|
|
60
|
+
| `drift_check` | object | Contains `last_verified` (ISO date) and optional `truth_source_hashes`. |
|
|
61
|
+
| `eval_artifacts` | enum | One of: `none`, `planned`, `present`. |
|
|
62
|
+
| `eval_state` | enum | One of: `unverified`, `passing`, `monitored`. |
|
|
63
|
+
| `routing_eval` | enum | One of: `absent`, `present`. |
|
|
64
|
+
|
|
65
|
+
### Conditionally required
|
|
66
|
+
|
|
67
|
+
These fields are required only when a specific condition is met. The first three are enforced by JSON-Schema `allOf` rules; the `keywords` rule is enforced by `scripts/skill-lint.js` (lint check R1) rather than the schema, since the schema cannot reason about routability intent.
|
|
68
|
+
|
|
69
|
+
| Field | Required when | Enforced by |
|
|
70
|
+
|---|---|---|
|
|
71
|
+
| `extends` | `type: overlay` | schema `allOf` |
|
|
72
|
+
| `grounding` | `scope: codebase` | schema `allOf` |
|
|
73
|
+
| `superseded_by` | `stability: deprecated` | schema `allOf` |
|
|
74
|
+
| `keywords` | `scope: codebase` OR `routing_bundles` is set | `scripts/skill-lint.js` (lint check R1) |
|
|
75
|
+
|
|
76
|
+
### Optional (strongly recommended)
|
|
77
|
+
|
|
78
|
+
Not schema-required, but most useful skills include these:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
stability # experimental | stable | frozen | deprecated
|
|
82
|
+
license # SPDX identifier (e.g. MIT, Apache-2.0)
|
|
83
|
+
keywords # string[] — semantic phrases for discovery
|
|
84
|
+
triggers # string[] — exact match activation phrases
|
|
85
|
+
relations # typed edges to sibling skills
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Optional (enrichment)
|
|
89
|
+
|
|
90
|
+
These improve portability, discoverability, and health tracking but are not required for a valid skill.
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
urn # globally unique URN
|
|
94
|
+
domain # hierarchical domain path (e.g. "ecommerce/integrations/shopify")
|
|
95
|
+
paths # glob[] — code surfaces this skill governs
|
|
96
|
+
examples # string[] — positive activation prompts
|
|
97
|
+
anti_examples # string[] — negative activation prompts (wrong-skill training)
|
|
98
|
+
workspace_tags # string[] — project handles or semantic tags
|
|
99
|
+
routing_bundles # string[] — routing group memberships
|
|
100
|
+
portability # { readiness, targets }
|
|
101
|
+
lifecycle # { stale_after_days, review_cadence }
|
|
102
|
+
runtime_telemetry # { feedback_source, metrics }
|
|
103
|
+
comprehension_state # absent | present
|
|
104
|
+
# Understanding fields (v6+, flat) — required when comprehension_state: present
|
|
105
|
+
mental_model # string — primitives and their relationships
|
|
106
|
+
purpose # string — the problem this concept solves
|
|
107
|
+
boundary # string — what this concept is NOT (with mechanism, not just label)
|
|
108
|
+
analogy # string — one-sentence metaphor preserving the core mechanism
|
|
109
|
+
misconception # string — the wrong mental model people bring
|
|
110
|
+
concept # DEPRECATED in v6 — legacy v5 nested block; back-compat only
|
|
111
|
+
# Health Block (v6+, flat) — written by the audit loop, not hand-authored
|
|
112
|
+
last_audited # ISO date — when `audit` last ran
|
|
113
|
+
last_changed # ISO date — when the SKILL.md was last edited
|
|
114
|
+
audit_verdict # PASS | PASS_WITH_FIXES | PARTIAL | FAIL | UNKNOWN
|
|
115
|
+
eval_score # number 0.0–5.0 — latest aggregate eval grade
|
|
116
|
+
eval_failed_ids # string[] — failing eval IDs (empty when clean)
|
|
117
|
+
lint_verdict # PASS | FAIL | UNKNOWN
|
|
118
|
+
drift_status # OK | DRIFT | BROKEN | STALE | NO_BASELINE | EXTERNAL_UNHASHED | UNKNOWN
|
|
119
|
+
eval_last_run # { at, status, runner?, model?, receipt?, receipt_hash? }
|
|
120
|
+
compatibility # { runtimes, node, notes }
|
|
121
|
+
allowed-tools # space-separated tool allowlist
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Semantic Rules by Field Group
|
|
127
|
+
|
|
128
|
+
### Identity
|
|
129
|
+
|
|
130
|
+
**`name`**
|
|
131
|
+
- Pattern: `^[a-z0-9][a-z0-9-/:]*$` — lowercase alphanumerics, hyphens, forward slashes, and colons.
|
|
132
|
+
- Must match the parent directory name when possible so plain `SKILL.md` export can use the directory as the canonical identifier.
|
|
133
|
+
- Other skills reference this skill using the `name` value in their `relations.*` arrays.
|
|
134
|
+
|
|
135
|
+
**`description`**
|
|
136
|
+
- The routing contract, not a summary. Write for the router, not for a human reader.
|
|
137
|
+
- Lead with a trigger clause: `"Use when…"` or `"Activates for…"`.
|
|
138
|
+
- Include an explicit negative boundary: `"Do NOT use for…"`.
|
|
139
|
+
- Keep this focused on routing. The `## Coverage` section inside the body carries the full scope detail.
|
|
140
|
+
|
|
141
|
+
**`version`**
|
|
142
|
+
- Semver format: `x.y.z`. Bumped when the skill's instructional content changes.
|
|
143
|
+
- Independent of `schema_version` — the schema version signals the contract shape; the skill version signals the content revision.
|
|
144
|
+
|
|
145
|
+
**`owner`**
|
|
146
|
+
- A team handle, GitHub username, or tool name (e.g. `skill-bot`).
|
|
147
|
+
- Consumers use this to route review requests and alert on stale skills.
|
|
148
|
+
|
|
149
|
+
### Classification
|
|
150
|
+
|
|
151
|
+
**`type`**
|
|
152
|
+
- `capability` — a skill that describes knowledge or a repeatable technique.
|
|
153
|
+
- `workflow` — a skill that describes a step-by-step process or procedure.
|
|
154
|
+
- `router` — a skill that describes routing logic (which skill to activate for which query).
|
|
155
|
+
- `overlay` — a skill that specialises another skill. Must have `extends: <parent-skill-name>`. Non-overlay types must NOT have `extends`.
|
|
156
|
+
|
|
157
|
+
**`scope`**
|
|
158
|
+
- `codebase` — repo-specific; requires the `grounding` block so consumers know which files anchor the skill's claims.
|
|
159
|
+
- `reference` — general-purpose reference knowledge not tied to a specific codebase.
|
|
160
|
+
- `portable` — cross-repo knowledge, intended for distribution via `portability.targets`.
|
|
161
|
+
|
|
162
|
+
**`category`**
|
|
163
|
+
- A browse facet — answers the single question: *Where should a human browse to find this skill first?*
|
|
164
|
+
- Renamed from v3 `browse_category`; use `category` in all v4+ skills.
|
|
165
|
+
- For hierarchical taxonomy, use the optional `domain` field with slash-delimited segments.
|
|
166
|
+
- **Closed enum as of schema_version 5** (retained in v6); enforced at the schema level by `enum` constraint in `schemas/skill.v6.schema.json` AND at the lint level by `scripts/lint/check-category-enum.js`. Framed as a browse facet, not ontology truth. Cross-cutting truth lives in `relations.related`. The six values:
|
|
167
|
+
|
|
168
|
+
| Value | Definition |
|
|
169
|
+
|---|---|
|
|
170
|
+
| `foundations` | Epistemics, grounding, verification, context engineering, reasoning — preconditions of competent agent or engineering work. Reserved category — must justify membership against the foundations gate; cannot default here. Target size 8–15 skills. |
|
|
171
|
+
| `engineering` | Building software systems: APIs, data, infra, runtime, integrations. |
|
|
172
|
+
| `design` | Visual, interaction, IA, content, motion — design as a discipline. |
|
|
173
|
+
| `quality` | Cross-cutting non-functional properties: a11y, performance, security, type-safety, testing, observability. Properties of any artifact. |
|
|
174
|
+
| `agent` | Agent-specific concepts: tool design, prompt design, agent state, orchestration, eval-driven dev. |
|
|
175
|
+
| `product` | Prioritization, scope, MVP, PRDs, customer journey, positioning. |
|
|
176
|
+
|
|
177
|
+
**Disambiguation rules** (apply in order):
|
|
178
|
+
1. *Primary surface* — what the skill is *about*, not what it *enables*.
|
|
179
|
+
2. *Property vs subject* — properties (a11y, perf, security, testing, type-safety) → `quality`. How-to-build → `engineering` / `design` / `agent`.
|
|
180
|
+
3. *Cross-pollination* — multi-fit skills list secondary categories via `relations.related` (max 5). Never via the `category` field itself.
|
|
181
|
+
4. *`foundations` gate* — anti-junk-drawer. Membership requires (a) the skill teaches an epistemic precondition AND (b) it cannot be plausibly assigned to `agent`/`engineering`/`quality`/`design`. If `foundations` exceeds 20 entries, the gate has failed and the migration is misrouted.
|
|
182
|
+
|
|
183
|
+
**`domain`**
|
|
184
|
+
- Optional slash-delimited domain path (e.g. `design/ux`, `architecture/events`).
|
|
185
|
+
- Renamed from v3 `category` / `category_path`; values are unchanged.
|
|
186
|
+
- Complements `category`. Do not use it as a second flat shelf.
|
|
187
|
+
|
|
188
|
+
**`stability`**
|
|
189
|
+
- `experimental` — may change without notice; use with caution.
|
|
190
|
+
- `stable` — follows semver; breaking changes bump `schema_version` or `version`.
|
|
191
|
+
- `frozen` — no longer evolving; pinned for historical reference.
|
|
192
|
+
- `deprecated` — replaced by another skill; `superseded_by` is required when this value is set.
|
|
193
|
+
|
|
194
|
+
### Health and Drift
|
|
195
|
+
|
|
196
|
+
**`freshness`**
|
|
197
|
+
- ISO date of the last review or content update.
|
|
198
|
+
- Not computed; the author sets it. It is an authored claim, not a hash.
|
|
199
|
+
|
|
200
|
+
**`drift_check`**
|
|
201
|
+
- Object with `last_verified` (ISO date, required) and `truth_source_hashes` (optional).
|
|
202
|
+
- `last_verified`: when the skill was last verified against its truth sources.
|
|
203
|
+
- `truth_source_hashes`: a map of normalized truth-source key -> SHA-256 hex digest at the time of last verification. Keys are `path` for whole-file sources, `path#Lstart-Lend` for line ranges, and `path#anchor` for anchor-only sources. Computed by `node scripts/skill-graph-drift.js --record --apply <skill-dir>` for local truth sources. The drift sentinel (`skill-graph drift`) reports `DRIFT` when a live hash differs from the recorded hash, `BROKEN` when a local truth source file is missing, `STALE` when today exceeds `last_verified + lifecycle.stale_after_days`, `NO_BASELINE` when local truth sources are declared but no hashes are recorded, and `EXTERNAL_UNHASHED` when a URL truth source is valid but is not fetched by the zero-dependency sentinel.
|
|
204
|
+
|
|
205
|
+
**`lifecycle`**
|
|
206
|
+
- Optional object: `{ stale_after_days, review_cadence }`.
|
|
207
|
+
- `stale_after_days`: integer days after `drift_check.last_verified` at which the skill is flagged stale. Integration skills that wrap external APIs typically need shorter windows (30–90 days) than pure concept skills (180+ days).
|
|
208
|
+
- `review_cadence`: one of `per-commit`, `weekly`, `quarterly`, `on-truth-source-change`.
|
|
209
|
+
|
|
210
|
+
### Eval Health
|
|
211
|
+
|
|
212
|
+
The three eval-health fields are orthogonal — they measure different dimensions.
|
|
213
|
+
|
|
214
|
+
**`eval_artifacts`** — Does an evaluation artifact exist?
|
|
215
|
+
- `none`: no evals defined.
|
|
216
|
+
- `planned`: evals are planned but not yet written.
|
|
217
|
+
- `present`: at least one eval file exists.
|
|
218
|
+
|
|
219
|
+
**`eval_state`** — What is the current evaluation result?
|
|
220
|
+
- `unverified`: evals exist but have not been run against a grader.
|
|
221
|
+
- `passing`: evals have been run and pass.
|
|
222
|
+
- `monitored`: evals are integrated into CI and are tracked.
|
|
223
|
+
|
|
224
|
+
**`routing_eval`** — Does a routing-specific eval exist?
|
|
225
|
+
- `absent`: no routing eval.
|
|
226
|
+
- `present`: a routing eval exists (typically `evals/routing.json` or similar).
|
|
227
|
+
|
|
228
|
+
**`comprehension_state`**
|
|
229
|
+
- Optional comprehension-grading axis.
|
|
230
|
+
- `absent` or omitted: no comprehension grading is declared.
|
|
231
|
+
- `present`: the skill has comprehension grading and must populate either the **five flat Understanding fields** (`mental_model`, `purpose`, `boundary`, `analogy`, `misconception` — preferred in v6) OR the legacy nested `concept` block (v5 back-compat).
|
|
232
|
+
- The v6 schema's `allOf` rule enforces this via an `anyOf` clause: at least one of the two shapes must be present. When both are present, the flat fields win.
|
|
233
|
+
|
|
234
|
+
### Understanding (v6+, flat)
|
|
235
|
+
|
|
236
|
+
Five flat top-level fields that teach the agent what the skill's subject *is*. They replace the v5 nested `concept` block (which retired the `definition` and `taxonomy` sub-fields: `definition` is now covered by `description`, `taxonomy` by `category` + `relations.broader`). The body's `## Concept Card` section is retired in v6 — the flat frontmatter fields are the canonical location.
|
|
237
|
+
|
|
238
|
+
Required when `comprehension_state: present`. No protocol length cap on any of these — author each field as deeply as the concept requires.
|
|
239
|
+
|
|
240
|
+
**`mental_model`**
|
|
241
|
+
- Primitives and their relationships. Name the primitives. Name the relationships between them. Markdown permitted inside the string.
|
|
242
|
+
- Graded by the comprehension grader's `mental_model` dimension (weight 1.5).
|
|
243
|
+
- Distinct from `## Philosophy` in the body, which explains *why this skill file exists in this repo*; `mental_model` explains *what the subject is, universally*.
|
|
244
|
+
|
|
245
|
+
**`purpose`**
|
|
246
|
+
- What problem the concept solves AND the alternative it replaced. Concrete pain point + prior alternative.
|
|
247
|
+
- Graded by the comprehension grader's `purpose` dimension (weight 1.0).
|
|
248
|
+
|
|
249
|
+
**`boundary`** (the Understanding field — distinct from `relations.boundary`)
|
|
250
|
+
- Things commonly confused with the concept but that are NOT it. Express each difference as a *mechanism* (different primitives, different purpose, different scope) — not just different names.
|
|
251
|
+
- Graded by the comprehension grader's `boundary` dimension (weight 1.5).
|
|
252
|
+
- Field-name collision with `relations.boundary` is intentional and disambiguated by nesting depth: top-level `boundary` is a string teaching the concept's edges; `relations.boundary` is an array of skill-name handoff targets.
|
|
253
|
+
|
|
254
|
+
**`analogy`**
|
|
255
|
+
- One-sentence analogy that preserves the core mechanism. Translate for a non-expert without breaking the structural relationship between primitives.
|
|
256
|
+
- Graded by the comprehension grader's `analogy` dimension (weight 0.5).
|
|
257
|
+
|
|
258
|
+
**`misconception`**
|
|
259
|
+
- The wrong mental model people bring and why it misleads. Authored hint to inoculate the agent against the common error trap.
|
|
260
|
+
- Not directly graded; complements `boundary`.
|
|
261
|
+
|
|
262
|
+
**`concept`** (DEPRECATED in v6 — accepted for v5 back-compat)
|
|
263
|
+
- Legacy nested teaching block with seven sub-fields: `definition`, `mental_model`, `purpose`, `boundary`, `taxonomy`, `analogy`, `misconception`.
|
|
264
|
+
- Remains accepted for v5 skills not yet migrated. Lint emits a warning when `concept` is populated but the flat Understanding fields are absent and `schema_version: 6` is set.
|
|
265
|
+
- The comprehension grader reads either location; flat fields win when both are present.
|
|
266
|
+
|
|
267
|
+
**`eval_last_run`**
|
|
268
|
+
- Optional evidence receipt for the most recent eval run.
|
|
269
|
+
- Required sub-fields when present: `at` (ISO date-time) and `status` (`pass`, `fail`, or `mixed`).
|
|
270
|
+
- Optional sub-fields: `runner`, `model`, `receipt`, `receipt_hash`.
|
|
271
|
+
- Use this to support `eval_state: passing` or `eval_state: monitored` with a concrete scorecard, grader history, or CI receipt.
|
|
272
|
+
|
|
273
|
+
### Health Block (v6+, flat — written by the audit loop)
|
|
274
|
+
|
|
275
|
+
Seven flat top-level fields that record a skill's audit fingerprint in its own frontmatter, replacing the scattered log-file model of v5 (`eval-history.jsonl`, `routing-misses.jsonl`, `.opencode/progress/skill-audit-*`, `health-ledger.jsonl`, `findings/*.md`). The Skill Audit Loop reads these directly; no log-file crawl required.
|
|
276
|
+
|
|
277
|
+
**Do not hand-author these fields.** They are stamped by `scripts/skill/skill-audit.js`, `scripts/skill/evaluate-skill.js`, and `scripts/skill-graph-drift.js` as the audit loop runs. Hand-edits will be overwritten on the next `audit` run.
|
|
278
|
+
|
|
279
|
+
**`last_audited`**
|
|
280
|
+
- ISO date (YYYY-MM-DD) the `audit` command last ran against this skill.
|
|
281
|
+
- Loop priority uses this to pick the stalest skill next.
|
|
282
|
+
- Distinct from `freshness` (the author's claim of content-level review) and `drift_check.last_verified` (the truth-source verification timestamp).
|
|
283
|
+
|
|
284
|
+
**`last_changed`**
|
|
285
|
+
- ISO date (YYYY-MM-DD) the SKILL.md body or frontmatter was last edited.
|
|
286
|
+
- Written automatically by `improve` operations.
|
|
287
|
+
- Distinct from `freshness` (review claim) — `last_changed` is the editor's footprint, `freshness` is the reviewer's footprint.
|
|
288
|
+
|
|
289
|
+
**`audit_verdict`**
|
|
290
|
+
- Aggregate result of the most recent `audit` run.
|
|
291
|
+
- Enum: `PASS` | `PASS_WITH_FIXES` | `PARTIAL` | `FAIL` | `UNKNOWN`.
|
|
292
|
+
- Combines `lint_verdict`, `drift_status`, and (when run with `--graded`) the seven dimension scores.
|
|
293
|
+
- `UNKNOWN` is the initial state before any audit has run.
|
|
294
|
+
|
|
295
|
+
**`eval_score`**
|
|
296
|
+
- Latest aggregate eval grade on a 0.0–5.0 scale.
|
|
297
|
+
- Written by `scripts/skill/evaluate-skill.js`.
|
|
298
|
+
- When `evals/comprehension.json` exists, the comprehension grader's score lands here; otherwise the standard eval-suite score.
|
|
299
|
+
|
|
300
|
+
**`eval_failed_ids`**
|
|
301
|
+
- String array of eval IDs that failed in the most recent run. Empty array when clean.
|
|
302
|
+
- Populated alongside `eval_score` by the eval runner.
|
|
303
|
+
|
|
304
|
+
**`lint_verdict`**
|
|
305
|
+
- Result of the most recent deterministic-lint pass.
|
|
306
|
+
- Enum: `PASS` | `FAIL` | `UNKNOWN`.
|
|
307
|
+
- `PASS` means zero lint errors; warnings do not flip the verdict.
|
|
308
|
+
|
|
309
|
+
**`drift_status`**
|
|
310
|
+
- Current truth-source drift status, mirroring `scripts/skill-graph-drift.js` sentinel verdicts.
|
|
311
|
+
- Enum: `OK` | `DRIFT` | `BROKEN` | `STALE` | `NO_BASELINE` | `EXTERNAL_UNHASHED` | `UNKNOWN`.
|
|
312
|
+
- Written by the drift sentinel; read by the loop to prioritise re-grounding work.
|
|
313
|
+
|
|
314
|
+
### Activation and Routing
|
|
315
|
+
|
|
316
|
+
**`keywords`**
|
|
317
|
+
- Semantic phrases used by fuzzy/embedding-based routers.
|
|
318
|
+
- Required when `routing_eval: present` — if you assert that routing evals pass, the skill must declare what it should activate on.
|
|
319
|
+
|
|
320
|
+
**`triggers`**
|
|
321
|
+
- Exact match strings. A router that supports exact triggers activates this skill when the user input exactly matches one of these strings.
|
|
322
|
+
- Complement `keywords` (semantic) and `examples` (full prompts).
|
|
323
|
+
|
|
324
|
+
**`paths`**
|
|
325
|
+
- Glob patterns identifying the code surfaces this skill governs.
|
|
326
|
+
- Patterns prefixed with `!` are negations (gitignore-style).
|
|
327
|
+
- A list consisting only of negations matches nothing and is rejected by lint.
|
|
328
|
+
|
|
329
|
+
**`examples`**
|
|
330
|
+
- Positive-class activation examples — realistic user prompts this skill SHOULD activate for.
|
|
331
|
+
- 2–5 entries recommended. Used as few-shot signal for embedding-based routers.
|
|
332
|
+
|
|
333
|
+
**`anti_examples`**
|
|
334
|
+
- Negative-class activation examples — realistic prompts that look related but a DIFFERENT skill should handle.
|
|
335
|
+
- Pair with `relations.disjoint_with` to name the skill that should activate instead.
|
|
336
|
+
|
|
337
|
+
**`workspace_tags`**
|
|
338
|
+
- Literal project handles or semantic tags identifying which projects this skill is relevant to.
|
|
339
|
+
- Absent means the skill is ambient (applies across all projects).
|
|
340
|
+
- A workspace config at `.skill-graph/config.json` can map literal project handles to semantic tag sets.
|
|
341
|
+
|
|
342
|
+
**`routing_bundles`**
|
|
343
|
+
- String array of routing group memberships. Used by routers that dispatch to groups of skills rather than individual skills.
|
|
344
|
+
|
|
345
|
+
### Relations
|
|
346
|
+
|
|
347
|
+
The `relations` block contains typed edges to sibling skills. All targets are validated by lint — a broken target (skill that does not exist) is an error.
|
|
348
|
+
|
|
349
|
+
```yaml
|
|
350
|
+
relations:
|
|
351
|
+
related: # symmetric co-read relation (skos:related). v3.1 preferred name.
|
|
352
|
+
boundary: # routing-layer anti-ownership handoff (sg:disjointOwnership).
|
|
353
|
+
disjoint_with: # formal class-disjointness assertion (owl:disjointWith).
|
|
354
|
+
verify_with: # skills to co-load for verification (prov:wasInformedBy).
|
|
355
|
+
depends_on: # skills this skill requires operationally or conceptually.
|
|
356
|
+
broader: # this skill is a specialisation of the target skill (skos:broader).
|
|
357
|
+
narrower: # this skill is a generalisation of the target (skos:narrower).
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
**`related`** (preferred) / `adjacent` (deprecated alias)
|
|
361
|
+
- Symmetric associative relation. Use when two skills should be co-read because they cover the same surface from different angles.
|
|
362
|
+
- Maximum 5 entries recommended to avoid hub-and-spoke clutter.
|
|
363
|
+
- `adjacent` is a deprecated alias from v3.0. Use `related` in all new skills. Lint emits a warning on `adjacent`.
|
|
364
|
+
|
|
365
|
+
**`boundary`** (the routing-layer field — distinct from the top-level Understanding `boundary` field)
|
|
366
|
+
- Routing-layer anti-ownership handoff. Use to make explicit that this skill does NOT own the target concern and should hand near-miss prompts to another skill.
|
|
367
|
+
- Items may be bare skill names or `{ skill, reason }` objects. Reasons are strongly recommended.
|
|
368
|
+
- This is a Skill-Graph-specific routing predicate, not formal OWL class disjointness.
|
|
369
|
+
|
|
370
|
+
**Runtime semantic — score-aware exclusion-on-tie.** The runtime router applies `relations.boundary[]` as `if (target.score >= declarer.score) skip target` — i.e. the declarer can exclude the target only when the declarer is *currently outscoring* it on the query. The semantic INVERTS the surface reading "I am NOT B; defer to B" — boundary entries protect the declarer's wins, not the target's wins. (Source: `skill-graph/scripts/skill-graph-route.js:548`.)
|
|
371
|
+
|
|
372
|
+
**Cross-domain boundary doctrine — SAME-DOMAIN ONLY.** Codified 2026-05-17 after the Tier C″ empirical sweep across 8 Wave 6 skills:
|
|
373
|
+
|
|
374
|
+
1. `boundary[]` entries should declare SAME-DOMAIN handoffs only (same `category` AND same `domain` sub-tree). Example: `engineering/frontend` ↔ `engineering/frontend` is fine; `engineering/frontend` ↔ `design/component-systems` is not.
|
|
375
|
+
2. Cross-category or cross-sub-domain handoffs belong in `anti_examples` + `relations.related`, NOT in `boundary[]`. The `anti_examples` array preserves routing-visible documentation as wrong-use phrases; `relations.related` signals the semantic adjacency without invoking the score-aware exclusion mechanic.
|
|
376
|
+
3. Empirical justification: removing 16 cross-domain `boundary[]` entries across 8 skills caused **0 top-1 routing changes** on the 30-query baseline; only 3/30 low-confidence unmaskings of legitimate alternatives at score 3 surfaced. The cross-domain entries were performing silent low-confidence exclusion only — exactly the silent-failure risk the doctrine prevents.
|
|
377
|
+
|
|
378
|
+
Authors who introduce a cross-domain `boundary[]` entry must move it to `anti_examples` + `relations.related` instead. Lint (planned, not yet implemented) will warn on cross-domain boundary declarations.
|
|
379
|
+
|
|
380
|
+
**`disjoint_with`**
|
|
381
|
+
- Formal class-disjointness assertion. Use only when the two skill concepts are genuinely disjoint in the ontology sense.
|
|
382
|
+
- Items may be bare skill names or `{ skill, reason }` objects.
|
|
383
|
+
- Do not use it as a replacement for routing-layer `boundary`.
|
|
384
|
+
|
|
385
|
+
**`verify_with`**
|
|
386
|
+
- Skills to co-load when verifying claims in this skill. Maps to `prov:wasInformedBy`.
|
|
387
|
+
- Keep to 1–3 high-signal verifiers.
|
|
388
|
+
|
|
389
|
+
**`depends_on`**
|
|
390
|
+
- Skills this skill requires. Items may be bare skill names or `{ skill, min_version }` objects for version-constrained dependencies.
|
|
391
|
+
|
|
392
|
+
**`broader` / `narrower`**
|
|
393
|
+
- Cross-skill generalisation/specialisation edges (SKOS). Use `broader` when this skill is a specialisation of another skill that is not its overlay parent. `narrower` is the inverse; tooling can infer it from other skills' `broader` edges.
|
|
394
|
+
|
|
395
|
+
### Grounding
|
|
396
|
+
|
|
397
|
+
Required when `scope: codebase`. Describes where the skill's claims are anchored in the codebase.
|
|
398
|
+
|
|
399
|
+
```yaml
|
|
400
|
+
grounding:
|
|
401
|
+
domain_object: string # What the skill is about (e.g. "Shopify order sync")
|
|
402
|
+
grounding_mode: repo_specific | universal | hybrid
|
|
403
|
+
truth_sources: # Files whose content the skill depends on
|
|
404
|
+
- path: src/path/to/file.ts
|
|
405
|
+
line_range: { start: 10, end: 80 }
|
|
406
|
+
note: "Primary implementation surface"
|
|
407
|
+
failure_modes: # What goes wrong when the skill is applied incorrectly
|
|
408
|
+
- "Misapplied to a different integration"
|
|
409
|
+
evidence_priority: repo_code_first | general_knowledge_first | equal
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
- `grounding_mode: repo_specific` — the skill's claims are only valid in this repo.
|
|
413
|
+
- `grounding_mode: universal` — the skill's claims are general and not repo-specific.
|
|
414
|
+
- `grounding_mode: hybrid` — some claims are repo-specific, some are general.
|
|
415
|
+
- `evidence_priority` — tells consumers how to resolve conflicts between the skill body and external knowledge.
|
|
416
|
+
|
|
417
|
+
`truth_sources` accepts legacy string entries for whole resources and object entries with `path`, optional `line_range`, optional `anchor`, and optional `note`. Object entries are preferred for repo-backed claims because the drift sentinel can hash the exact source slice.
|
|
418
|
+
|
|
419
|
+
### Portability and Standards
|
|
420
|
+
|
|
421
|
+
**`portability`**
|
|
422
|
+
- Declares the skill's export readiness.
|
|
423
|
+
- `readiness`: `declared` (intent only), `scripted` (a transform exists), or `verified` (the export has been tested).
|
|
424
|
+
- `targets`: array of export targets. Only `skill-md` is valid today.
|
|
425
|
+
|
|
426
|
+
**`urn`**
|
|
427
|
+
- Optional in v3; required in v4.
|
|
428
|
+
- Format: `urn:skill:<repo-slug>:<skill-name>`. Example: `urn:skill:skill-graph:debugging`.
|
|
429
|
+
- The `<skill-name>` segment must equal the `name` field exactly.
|
|
430
|
+
- Consumers treat the URN as the stable identity across repos and federated registries.
|
|
431
|
+
|
|
432
|
+
**`license`**
|
|
433
|
+
- SPDX identifier (e.g. `MIT`, `Apache-2.0`).
|
|
434
|
+
- Strongly recommended for any skill intended for distribution.
|
|
435
|
+
|
|
436
|
+
**`compatibility`**
|
|
437
|
+
- Object: `{ runtimes?, node?, notes? }`.
|
|
438
|
+
- `runtimes`: array of target agent runtimes with optional version constraints (e.g. `claude-code>=2.0`).
|
|
439
|
+
- `node`: Node.js version constraint (e.g. `>=18`).
|
|
440
|
+
- `notes`: free-text notes. No protocol length cap.
|
|
441
|
+
|
|
442
|
+
**`allowed-tools`**
|
|
443
|
+
- Space-separated string of tool names the skill is authorized to invoke.
|
|
444
|
+
- Inherited from the plain `SKILL.md` format.
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Authored vs Generated Fields
|
|
449
|
+
|
|
450
|
+
### Authored in `SKILL.md` (human-written)
|
|
451
|
+
|
|
452
|
+
The canonical fields in the frontmatter are authored by humans, with two exceptions: `drift_check.truth_source_hashes` is computed by the drift sentinel (`skill-graph drift --record --apply`), and the seven **Health Block** fields (`last_audited`, `last_changed`, `audit_verdict`, `eval_score`, `eval_failed_ids`, `lint_verdict`, `drift_status`) are stamped automatically by the Skill Audit Loop's `audit`, `improve`, and `evaluate` operations. Do not hand-author the Health Block — those values are owned by the loop.
|
|
453
|
+
|
|
454
|
+
**Human-authored fields:**
|
|
455
|
+
|
|
456
|
+
```
|
|
457
|
+
schema_version, name, urn, description, version, type, category,
|
|
458
|
+
domain, scope, owner, freshness, drift_check, eval_artifacts, eval_state,
|
|
459
|
+
routing_eval, comprehension_state, eval_last_run, stability,
|
|
460
|
+
superseded_by, license, compatibility, allowed-tools, extends, triggers,
|
|
461
|
+
keywords, examples, anti_examples, paths, workspace_tags, routing_bundles,
|
|
462
|
+
relations, grounding, portability, lifecycle, runtime_telemetry,
|
|
463
|
+
# Understanding (v6+) — author these when comprehension_state: present
|
|
464
|
+
mental_model, purpose, boundary, analogy, misconception,
|
|
465
|
+
# Legacy v5 — accepted for back-compat
|
|
466
|
+
concept
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Loop-written fields (v6+, Health Block):**
|
|
470
|
+
|
|
471
|
+
```
|
|
472
|
+
# Stamped by `audit` / `improve` / `evaluate` — do not hand-author
|
|
473
|
+
last_audited, last_changed, audit_verdict, eval_score, eval_failed_ids,
|
|
474
|
+
lint_verdict, drift_status
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
### Generated in `skills.manifest.json` (tooling-computed)
|
|
478
|
+
|
|
479
|
+
The manifest generator (`scripts/generate-manifest.js`) reads the authored frontmatter and emits computed fields that do not exist in the source `SKILL.md`:
|
|
480
|
+
|
|
481
|
+
- `id` — derived from the skill's path relative to `skills/` (e.g. `task-execution`, or `<project>/design-review` in a multi-root workspace).
|
|
482
|
+
- `path` — relative path to the `SKILL.md` file.
|
|
483
|
+
- `summary` — aggregate counts (`total_skills`, `by_type`, `by_category`, `by_scope`, `by_stability`).
|
|
484
|
+
- `generated_at` — ISO timestamp of when the manifest was generated.
|
|
485
|
+
- `activation` — compiled block merging `triggers`, `keywords`, `paths`, `examples`, and `anti_examples` from frontmatter.
|
|
486
|
+
- `health` — compiled block merging `eval_artifacts`, `eval_state`, `routing_eval`, `comprehension_state`, `eval_last_run`, `freshness`, and `drift_check`.
|
|
487
|
+
|
|
488
|
+
The manifest schema is at `schemas/manifest.schema.json`. For the complete authored-to-generated field rename map and loss policy, see `docs/manifest-field-mapping.md`.
|
|
489
|
+
|
|
490
|
+
### Normalized during manifest generation
|
|
491
|
+
|
|
492
|
+
Some legacy scope and type values are normalized by the manifest generator to the schema-valid enum. The normalization is deterministic and logged:
|
|
493
|
+
|
|
494
|
+
| Legacy value | Normalized to | Reason |
|
|
495
|
+
|---|---|---|
|
|
496
|
+
| `operational` (scope) | `codebase` | Operational = repo-specific |
|
|
497
|
+
| `overlay` (scope) | `portable` | Overlay skills are cross-repo |
|
|
498
|
+
| `generic` (scope) | `portable` | Generic = cross-repo applicable |
|
|
499
|
+
| `doctrine` (type) | `capability` | A doctrine skill is a capability |
|
|
500
|
+
| `domain` (type) | `capability` | Domain knowledge is a capability |
|
|
501
|
+
| `framework` (type) | `workflow` | Frameworks describe workflows |
|
|
502
|
+
| `feedback` (type) | `overlay` | Feedback modifies other skills |
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
|
|
506
|
+
## Migration Notes
|
|
507
|
+
|
|
508
|
+
### v5 -> v6 (current)
|
|
509
|
+
|
|
510
|
+
Detailed migration guide: [`migrations/v5-to-v6.md`](migrations/v5-to-v6.md).
|
|
511
|
+
|
|
512
|
+
The codemod for the schema_version bump (after authoring the flat Understanding fields):
|
|
513
|
+
|
|
514
|
+
```bash
|
|
515
|
+
cd /Users/jacobbalslev/Development/skills
|
|
516
|
+
find skills -name SKILL.md -exec sed -i '' 's/schema_version: "5"/schema_version: "6"/g' {} +
|
|
517
|
+
```
|
|
518
|
+
|
|
519
|
+
| What changed | v5 form | v6 form |
|
|
520
|
+
|---|---|---|
|
|
521
|
+
| Schema version | `schema_version: 5` | `schema_version: 6` |
|
|
522
|
+
| Schema file | `schemas/skill.v5.schema.json` | `schemas/skill.v6.schema.json` (v5 schema retained for back-compat reads) |
|
|
523
|
+
| Concept teaching block | nested `concept: { definition, mental_model, purpose, boundary, taxonomy, analogy, misconception }` | five flat top-level fields: `mental_model`, `purpose`, `boundary`, `analogy`, `misconception`. `definition` is covered by `description`; `taxonomy` is covered by `category` + `relations.broader`. Body `## Concept Card` section retired. |
|
|
524
|
+
| Health Block | absent — audit fingerprint scattered across `eval-history.jsonl`, `routing-misses.jsonl`, `health-ledger.jsonl`, `.opencode/progress/skill-audit-*`, `findings/*.md` | seven flat top-level fields stamped by the audit loop: `last_audited`, `last_changed`, `audit_verdict`, `eval_score`, `eval_failed_ids`, `lint_verdict`, `drift_status` |
|
|
525
|
+
| `comprehension_state: present` rule | required nested `concept` block | requires EITHER the five flat Understanding fields OR (for v5 back-compat) the nested `concept` block — enforced via `anyOf` clause in v6 schema's `allOf` rule |
|
|
526
|
+
| Cross-domain `relations.boundary[]` | implicit "I am NOT B; defer to B" reading | codified as silent-failure risk; cross-domain entries belong in `anti_examples` + `relations.related` (see § Relations § `boundary`) |
|
|
527
|
+
|
|
528
|
+
The legacy nested `concept` block remains accepted in v6 for v5 skills not yet migrated. The comprehension grader reads either location; flat fields win when both are present.
|
|
529
|
+
|
|
530
|
+
### v4 -> v5 (previous)
|
|
531
|
+
|
|
532
|
+
Detailed migration guide: [`migrations/v4-to-v5.md`](migrations/v4-to-v5.md).
|
|
533
|
+
|
|
534
|
+
The codemod for the schema_version bump (after re-routing categories):
|
|
535
|
+
|
|
536
|
+
```bash
|
|
537
|
+
cd /Users/jacobbalslev/Development/skills
|
|
538
|
+
find skills -name SKILL.md -exec sed -i '' 's/schema_version: "4"/schema_version: "5"/g' {} +
|
|
539
|
+
```
|
|
540
|
+
|
|
541
|
+
| What changed | v4 form | v5 form |
|
|
542
|
+
|---|---|---|
|
|
543
|
+
| Schema version | `schema_version: 4` | `schema_version: 5` |
|
|
544
|
+
| Schema file | `schemas/skill.v4.schema.json` (open-ended `category` string) | `schemas/skill.v5.schema.json` (closed `category` enum of 6 values) |
|
|
545
|
+
| `category` enum | open-ended string; values included `knowledge`, `frontend`, `ai-engineering`, `integration`, `integrations`, `data`, `workflow`, `security` | closed enum: `foundations` \| `engineering` \| `design` \| `quality` \| `agent` \| `product` |
|
|
546
|
+
| `foundations` gate | implicit | explicit anti-junk-drawer rule: target 8–15 skills; cannot default here; must clear epistemic-precondition test |
|
|
547
|
+
| `quality` framing | one of several categories | promoted to 6th category for property-as-category (a11y, perf, security, testing, type-safety, observability) per A′ Rule 2 |
|
|
548
|
+
| `agent` naming | also seen as `ai-engineering` | canonical `agent` |
|
|
549
|
+
| Concept-shape adoption | "social recognition" criterion | 4-condition evidence-based: scope ∈ {portable, reference} AND type = capability AND ≥2 external grounding sources AND concept block contains no repo-specific nouns |
|
|
550
|
+
| Skill name policy | banned-verb-prefix lint | head-noun glossary (`docs/head-noun-glossary.md`) + `allowed_exceptions` registry (`docs/name-exceptions.yaml`) with citations |
|
|
551
|
+
|
|
552
|
+
The v5 category enum was already applied across 137 live skills in skill-graph commit `210ac69` (2026-05-16). The Phase 0b sample-migration review at `skill-graph/docs/migration-sample-review.md` (2026-05-16) recorded 86.67% reviewer-agreement, passing the 85% gate.
|
|
553
|
+
|
|
554
|
+
### v3 -> v4 (historical)
|
|
555
|
+
|
|
556
|
+
Run the codemod to migrate in place: `node scripts/migrate-skill-v3-to-v4.js <path>`
|
|
557
|
+
|
|
558
|
+
| What changed | v3 form | v4 form |
|
|
559
|
+
|---|---|---|
|
|
560
|
+
| Schema version | `schema_version: 3` | `schema_version: 4` |
|
|
561
|
+
| Flat browse shelf | `browse_category: engineering` | `category: engineering` |
|
|
562
|
+
| Hierarchical path | `category: engineering/api-design` or `category_path: engineering/api-design` | `domain: engineering/api-design` |
|
|
563
|
+
| Workspace relevance tags | `project_tags: [...]` | `workspace_tags: [...]` |
|
|
564
|
+
| Activation bundles | `routing_groups: [...]` | `routing_bundles: [...]` |
|
|
565
|
+
|
|
566
|
+
The generated manifest keeps `skills[].project` as generated project-root ownership from `.skill-graph/config.json`. Do not author `project` in portable skill frontmatter; use `workspace_tags` for semantic relevance.
|
|
567
|
+
|
|
568
|
+
### v2 -> v3 (historical)
|
|
569
|
+
|
|
570
|
+
Run the codemod to migrate in place: `node scripts/migrate-skill-v2-to-v3.js <path>`
|
|
571
|
+
|
|
572
|
+
| What changed | v2 form | v3 form |
|
|
573
|
+
|---|---|---|
|
|
574
|
+
| `drift_check` shape | scalar ISO date string | object `{ last_verified, truth_source_hashes? }` |
|
|
575
|
+
| `compatibility` shape | free-text string | object `{ runtimes?, node?, notes? }` |
|
|
576
|
+
| `family` field name | `family: engineering` | `browse_category: engineering` |
|
|
577
|
+
| New optional fields | (none) | `category`, `project_tags`, `lifecycle`, `runtime_telemetry` |
|
|
578
|
+
| Relation predicate names | `adjacent` canonical | `related` preferred; `adjacent` remains valid with lint warning. `boundary` stays canonical for routing-layer asymmetric handoff; `disjoint_with` is a separate formal OWL class-disjointness relation. |
|
|
579
|
+
|
|
580
|
+
### v1 -> v2 (historical)
|
|
581
|
+
|
|
582
|
+
| What changed | v1 form | v2 form |
|
|
583
|
+
|---|---|---|
|
|
584
|
+
| `scope` enum | `generic` / `operational` | `portable` / `codebase` |
|
|
585
|
+
| Eval health | single `eval_status` field | `eval_artifacts`, `eval_state`, `routing_eval` |
|
|
586
|
+
| `portability` shape | `portability.level`, `portability.exports` | `portability.readiness`, `portability.targets` |
|
|
587
|
+
| Route groups | `route_groups` | `routing_groups` |
|
|
588
|
+
|
|
589
|
+
### Compatibility aliases
|
|
590
|
+
|
|
591
|
+
Some preferred v3.1 aliases remain accepted in v4 for compatibility: `archetype`, `reviewed_at`, `allowed_tools`, nested `eval.*`, `grounding.subject`, `grounding.claim_scope`, `compatibility.agent_runtimes`, `compatibility.node_version`, `portability.export_targets`, and `drift_check.verified_at`. When both forms are present, values must match.
|
|
592
|
+
|
|
593
|
+
---
|
|
594
|
+
|
|
595
|
+
## Design Constraints
|
|
596
|
+
|
|
597
|
+
The contract enforces the following invariants. Any change to the schema or tooling that violates these invariants is a breaking change requiring a `schema_version` bump.
|
|
598
|
+
|
|
599
|
+
1. **One file, one skill.** Each skill lives in one `SKILL.md`. No split-source format. No per-environment variants.
|
|
600
|
+
2. **One manifest.** All skills aggregate into one `skills.manifest.json`. No closed/open split manifest.
|
|
601
|
+
3. **No private-only fields.** Every field in the schema is part of the public contract. There are no fields reserved for specific organisations or runtime environments.
|
|
602
|
+
4. **No second runtime model.** The same frontmatter shape serves local development, CI, and federated registry export. Export to plain `SKILL.md` is a transform (`scripts/export-skill.js`), not a separate authoring format.
|
|
603
|
+
5. **Strict schema.** `additionalProperties: false` on both the skill and manifest schemas. Unknown fields fail lint rather than being silently ignored.
|
|
604
|
+
6. **Additive evolution only within a version.** New optional fields, new enum values that extend (not replace) an existing enum, and new lint warnings are non-breaking. Renamed fields, removed fields, retyped fields, tightened required-ness, and removed enum values require a `schema_version` bump.
|
|
605
|
+
7. **Migration tooling ships with every breaking change.** The v3 bump ships `scripts/migrate-skill-v2-to-v3.js`; the v4 bump ships `scripts/migrate-skill-v3-to-v4.js`. Future bumps follow the same pattern.
|
|
606
|
+
|
|
607
|
+
---
|
|
608
|
+
|
|
609
|
+
*See `docs/skill-metadata-protocol.md` for full design rationale, overlay composition precedence, and schema versioning policy. See `docs/field-reference.md` for one section per field with examples. See `schemas/skill.v6.schema.json` for the machine-enforceable version of this contract.*
|