@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
package/SKILL_GRAPH.md
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
# Skill Graph
|
|
2
|
+
|
|
3
|
+
> **Read this if:** you want to understand the library-level Skill Graph system: the tools, generated artifacts, authority tiers, and maintenance loops that operate on Skill Metadata Protocol records.
|
|
4
|
+
|
|
5
|
+
Skill Graph is the library-level system around the [Skill Metadata Protocol](https://github.com/jacob-balslev/skill-metadata-protocol). The protocol defines what one `SKILL.md` must declare; Skill Graph supplies the manifest compiler, validator, router, drift sentinel, and export pipeline that make those declarations useful across many skills. The repo is organised in five authority tiers: each tier derives from the one above it, and tooling enforces the derivation automatically. When any two files appear to contradict each other, the tier with higher authority wins; the lower-tier file is a bug.
|
|
6
|
+
|
|
7
|
+
The three layers divide the work cleanly. The [Skill Metadata Protocol](https://github.com/jacob-balslev/skill-metadata-protocol) declares what each skill is grounded against — its `truth_sources`, `grounding_mode`, and `failure_modes`. Skill Graph operates across the whole library of those declarations, compiling, routing, clustering, and checking them. The [Skill Audit Loop](https://github.com/jacob-balslev/skill-audit-loop) is the separate repo that re-grounds each skill against its declared sources on a cadence, so the declarations the protocol captured stay true to the reality they point at.
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## System Model — how the pieces fit together
|
|
12
|
+
|
|
13
|
+
> **The question this diagram answers:** "What are the moving parts of Skill Graph, and who talks to whom?"
|
|
14
|
+
|
|
15
|
+
Before drilling into the five authority tiers, orient yourself on the five runtime entities you will actually interact with as an author or adopter. Every other diagram in the docs zooms into one of these boxes.
|
|
16
|
+
|
|
17
|
+
```mermaid
|
|
18
|
+
flowchart LR
|
|
19
|
+
Skill["<b>SKILL.md</b><br/>authored file<br/>frontmatter + body"]
|
|
20
|
+
Linter["<b>skill-lint.js</b><br/>deterministic validator"]
|
|
21
|
+
Manifest["<b>skills.manifest.json</b><br/>compiled artifact"]
|
|
22
|
+
Auditor["<b>skill-audit.js</b><br/>stub · graded"]
|
|
23
|
+
Artifacts["<b>audits/<skill>/</b><br/>findings · verdict · scorecard"]
|
|
24
|
+
|
|
25
|
+
Skill -->|validated by| Linter
|
|
26
|
+
Skill -->|compiled into| Manifest
|
|
27
|
+
Linter -->|seeds findings for| Auditor
|
|
28
|
+
Auditor -->|emits| Artifacts
|
|
29
|
+
|
|
30
|
+
classDef author fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
|
|
31
|
+
classDef tool fill:#ecfdf5,stroke:#047857,color:#064e3b
|
|
32
|
+
classDef artifact fill:#fef3c7,stroke:#d97706,color:#78350f
|
|
33
|
+
class Skill author
|
|
34
|
+
class Linter,Auditor,Manifest tool
|
|
35
|
+
class Artifacts artifact
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
<!-- Rendered copy for non-Mermaid viewers. Regenerate via: npx @mermaid-js/mermaid-cli -i <source> -o docs/images/system-model.png -->
|
|
39
|
+
<img src="docs/images/system-model.png" alt="System model — SKILL.md is validated by skill-lint.js, compiled into skills.manifest.json, and audited by skill-audit.js which emits findings/verdict/scorecard artifacts" width="900" />
|
|
40
|
+
|
|
41
|
+
**Legend.** Blue = authored input. Green = tooling. Yellow = output artifact. Solid arrows are the data flow. Every entity in this diagram has its own deep-dive diagram: [§ Anatomy](docs/skill-metadata-protocol.md#anatomy) for `SKILL.md`, [§ Loop at a Glance](https://github.com/jacob-balslev/skill-audit-loop/blob/main/SKILL_AUDIT_LOOP.md#loop-at-a-glance) for `skill-audit.js`, [§ Manifest Field Mapping](docs/manifest-field-mapping.md) for `skills.manifest.json`.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## The five tiers at a glance
|
|
46
|
+
|
|
47
|
+
| Tier | Role | When it's truth | What enforces the derivation |
|
|
48
|
+
|---|---|---|---|
|
|
49
|
+
| **1. Schema** | `schemas/*.json` | Always. These are the machine-enforced rules. | — |
|
|
50
|
+
| **2. Explanation** | `docs/*.md` describing the schema | Until the schema disagrees. | `check-protocol-consistency.js` C1, C2 |
|
|
51
|
+
| **3. Enforcement** | `scripts/*.js` that police + compile + transform | Run-time only; their output must match Tier 1 | `skill-lint.js` checks 6, 7, 8 |
|
|
52
|
+
| **4. Consumer** | `skill-graph-route`, `skill-graph-drift` | They USE Tier 1 to make decisions; they don't redefine anything | — |
|
|
53
|
+
| **5. Specimens** | `examples/` + `skills/` starters | Illustrative only. If they break the schema, they're wrong. | `skill-lint.js` checks 1–4 |
|
|
54
|
+
|
|
55
|
+
A sixth set of files — `README.md`, `CHANGELOG.md`, `CONTRIBUTING.md`, `LICENSE`, `.github/` — is **governance**, not a tier. These govern *the repo*, not the protocol shape.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Tier 1 — Schema (binding, machine-enforceable)
|
|
60
|
+
|
|
61
|
+
**If Tier 1 disagrees with anything below it, Tier 1 wins. Always.**
|
|
62
|
+
|
|
63
|
+
| File | Role |
|
|
64
|
+
|---|---|
|
|
65
|
+
| `schemas/skill.schema.json` | The frontmatter schema. Unversioned — tracks latest (v4 today). |
|
|
66
|
+
| `schemas/manifest.schema.json` | The compiled-manifest schema. Unversioned — tracks latest (v3 today). |
|
|
67
|
+
| `schemas/skill.v4.schema.json` | Pinned v4 copy. Consumers that want the current contract validate against this file. |
|
|
68
|
+
| `schemas/skill.v3.schema.json` | Frozen pinned v3 copy for consumers still migrating to v4. |
|
|
69
|
+
| `schemas/manifest.v4.schema.json` | Pinned v4 manifest copy. |
|
|
70
|
+
| `schemas/manifest.v3.schema.json` | Frozen pinned v3 manifest copy. |
|
|
71
|
+
| `schemas/skill.v2.schema.json` | **Frozen.** Retained for consumers still on v2. Never updated. |
|
|
72
|
+
| `schemas/manifest.v2.schema.json` | **Frozen.** Same rationale. |
|
|
73
|
+
|
|
74
|
+
Two rules govern this tier:
|
|
75
|
+
|
|
76
|
+
1. **Pinned copies must match the unversioned file modulo `$id` and `title`.** Enforced by C6 in `check-protocol-consistency.js`. Drift is a CI failure.
|
|
77
|
+
2. **Frozen prior-version schemas must exist** but are not parity-checked. Freezing is the whole point of pinning.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Tier 2 — Explanation (human-readable reflection of Tier 1)
|
|
82
|
+
|
|
83
|
+
Public docs that define or explain the protocol in prose. If a Tier 2 file disagrees with Tier 1, Tier 2 is the bug — fix the doc, not the schema.
|
|
84
|
+
|
|
85
|
+
| File | Role |
|
|
86
|
+
|---|---|
|
|
87
|
+
| [`skill-metadata-protocol`](https://github.com/jacob-balslev/skill-metadata-protocol) | Normative public spec (separate repo): required fields, semantic rules, authored vs generated fields, migration notes. |
|
|
88
|
+
| `docs/skill-metadata-protocol.md` | Rationale and deep explanation: archetype section map, requiredness groups, strictness rules, schema versioning policy, design tradeoffs. |
|
|
89
|
+
| `docs/field-reference.md` | One section per authored field. All 40 current v4 top-level fields with purpose, rules, allowed values, examples. |
|
|
90
|
+
| `docs/field-decision-guide.md` | Decision tables for the hard choices: `scope`, `relations.*`, eval-health triple, `portability`, `workspace_tags`, and the "tag vs. category vs. routing_bundles" question. |
|
|
91
|
+
| `docs/manifest-field-mapping.md` | The authored → generated bridge: rename map, loss policy, per-version migration notes, worked example. |
|
|
92
|
+
|
|
93
|
+
Three rules govern this tier:
|
|
94
|
+
|
|
95
|
+
1. **Section headers in `field-reference.md` must exactly match the top-level properties of `skill.schema.json`.** Enforced by C1. A missing section or an orphan one is a CI failure.
|
|
96
|
+
2. **Every authored field must be covered in `manifest-field-mapping.md`** (either in the rename map or the dropped-field list). Enforced by C2.
|
|
97
|
+
3. **The v2→v3 migration note in `manifest-field-mapping.md`** must be accurate enough that an author running `migrate-skill-v2-to-v3.js` gets the same result the doc describes. Checked at release time via the worked example.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Tier 3 — Enforcement and transformation tooling
|
|
102
|
+
|
|
103
|
+
Scripts that police Tier 1 (lint, consistency) or compile Tier 1's output (manifest, exports). These are Tier 1's automated watchdogs; their own output must agree with Tier 1.
|
|
104
|
+
|
|
105
|
+
### Authoring-time enforcement (runs per skill)
|
|
106
|
+
|
|
107
|
+
| File | Role |
|
|
108
|
+
|---|---|
|
|
109
|
+
| `scripts/skill-lint.js` | Eleven-check per-skill validator. Schema validation, parent-directory check, relation-target existence, eval coherence, archetype sections, routing quality, cross-schema parity, sample manifest conformance, generator parity, migration warnings. |
|
|
110
|
+
| `scripts/lint/check-archetype-sections.js` | Archetype-aware H2 section validator. Errors on missing required sections per archetype. |
|
|
111
|
+
| `scripts/lint/check-routing-quality.js` | Routing quality heuristics. R1: keywords required for codebase-scope or routing_bundles skills. R2: description must not be duplicated verbatim in `## Coverage`. |
|
|
112
|
+
| `scripts/lint/format-code-frame.js` | Babel/Rust-style diagnostic formatter. |
|
|
113
|
+
| `scripts/lib/parse-frontmatter.js` | Minimal YAML parser. Handles quoted keys, block sequences, nested objects, block sequences of objects (v3 `boundary` / `depends_on` shape). |
|
|
114
|
+
|
|
115
|
+
### Cross-artifact enforcement (runs once per commit)
|
|
116
|
+
|
|
117
|
+
| File | Role |
|
|
118
|
+
|---|---|
|
|
119
|
+
| `scripts/check-protocol-consistency.js` | Eight checks (C1–C8): field-set parity, authored-to-generated parity, artifact-root convention, sample manifest correctness, example truth invariants, versioned schema parity, generated field-reference parity, JSON-LD context coverage. |
|
|
120
|
+
|
|
121
|
+
### Compilation and transformation
|
|
122
|
+
|
|
123
|
+
| File | Role |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `scripts/generate-manifest.js` | Authored -> compiled manifest compiler. Multi-root workspace aware via `.skill-graph/config.json`. Computes SHA-256 on normalized truth-source keys for drift detection. |
|
|
126
|
+
| `scripts/export-skill.js` | Plain `SKILL.md` export transform. Flattens the v3 `compatibility` object to a single string for the portable export shape. |
|
|
127
|
+
| `scripts/migrate-skill-v2-to-v3.js` | v2 → v3 codemod. Line-based — preserves author YAML style (comments, quoting, indentation). |
|
|
128
|
+
|
|
129
|
+
#### Pipeline — how a SKILL.md becomes a manifest entry
|
|
130
|
+
|
|
131
|
+
> **The question this diagram answers:** "How does `generate-manifest.js` project authored frontmatter into `skills.manifest.json`?"
|
|
132
|
+
|
|
133
|
+
```mermaid
|
|
134
|
+
flowchart LR
|
|
135
|
+
Skills["<b>skills/*/SKILL.md</b><br/>+ examples/skill-metadata-template.md<br/>authored frontmatter"]
|
|
136
|
+
Config[".skill-graph/config.json<br/>workspace roots + projects<br/><i>optional — falls back to skills/</i>"]
|
|
137
|
+
Parse["<b>parse-frontmatter.js</b><br/>YAML → object"]
|
|
138
|
+
Rename["<b>generate-manifest.js</b><br/>apply rename map<br/>group under activation / health"]
|
|
139
|
+
Hash["<b>SHA-256</b><br/>hash each grounding.truth_sources<br/>compute health.drift_detected"]
|
|
140
|
+
Validate{{"<b>ajv + manifest.schema.json</b><br/>additionalProperties: false"}}
|
|
141
|
+
Manifest["<b>skills.manifest.json</b><br/>compiled artifact"]
|
|
142
|
+
|
|
143
|
+
Skills --> Parse
|
|
144
|
+
Config -.-> Rename
|
|
145
|
+
Parse --> Rename --> Hash --> Validate
|
|
146
|
+
Validate -->|pass| Manifest
|
|
147
|
+
Validate -->|fail| Error((("exit 1")))
|
|
148
|
+
|
|
149
|
+
classDef input fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
|
|
150
|
+
classDef tool fill:#ecfdf5,stroke:#047857,color:#064e3b
|
|
151
|
+
classDef gate fill:#fce7f3,stroke:#db2777,color:#831843
|
|
152
|
+
classDef artifact fill:#fef3c7,stroke:#d97706,color:#78350f
|
|
153
|
+
classDef err fill:#fee2e2,stroke:#b91c1c,color:#7f1d1d
|
|
154
|
+
class Skills,Config input
|
|
155
|
+
class Parse,Rename,Hash tool
|
|
156
|
+
class Validate gate
|
|
157
|
+
class Manifest artifact
|
|
158
|
+
class Error err
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
<!-- Rendered copy for non-Mermaid viewers. Source: docs/diagrams/manifest-pipeline.mmd. Regenerate via: npx @mermaid-js/mermaid-cli -i docs/diagrams/manifest-pipeline.mmd -o docs/images/manifest-pipeline.png -b white --width 1600 -->
|
|
162
|
+
<img src="docs/images/manifest-pipeline.png" alt="Manifest pipeline — authored SKILL.md files plus optional workspace config flow through parse-frontmatter, rename/group, SHA-256 hashing, and ajv validation against manifest.schema.json before becoming skills.manifest.json" width="960" />
|
|
163
|
+
|
|
164
|
+
**Legend.** Blue = authored input. Green = tooling step. Pink = validation gate (hard-fail on additionalProperties). Yellow = the compiled artifact. Red = exit-1 on schema mismatch. The rename map this pipeline applies is the one documented in [`docs/manifest-field-mapping.md § Rename Map`](docs/manifest-field-mapping.md#rename-map) — the diagram shows the topology, the manifest field mapping shows the field-level fates.
|
|
165
|
+
|
|
166
|
+
### Audit (hybrid enforcement/consumption)
|
|
167
|
+
|
|
168
|
+
| File | Role |
|
|
169
|
+
|---|---|
|
|
170
|
+
| `scripts/skill-audit.js` | Two-mode audit runner: stub mode (lint-seeded TODO findings) and `--graded` mode (external model CLI for per-dimension verdicts). |
|
|
171
|
+
| `scripts/lib/audit-prompt-builder.js` | Seven-dimension prompt composer for graded mode. |
|
|
172
|
+
| `scripts/lib/mock-grader.js` | Deterministic stand-in grader for CI smoke-tests without an API key. |
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Tier 4 — Reference consumer tooling
|
|
177
|
+
|
|
178
|
+
**This is the tentpole tier.** Every other skill format in the ecosystem stops at Tier 3 — they define a contract and ship a linter. Skill Graph is the only format that also ships tools that *use* the metadata to make visible decisions. These two files are the argument for why the extra metadata pays rent.
|
|
179
|
+
|
|
180
|
+
| File | Role |
|
|
181
|
+
|---|---|
|
|
182
|
+
| `scripts/skill-graph-route.js` | Graph-aware selector. Uses every unique Skill Graph field: `relations.depends_on` transitive closure, `relations.verify_with` co-loading, `relations.boundary` anti-ownership exclusion, `eval_state` quality gate, `lifecycle.stale_after_days` staleness annotation, `workspace_tags` filtering with workspace semantic-tag expansion. Emits per-skill reasons. |
|
|
183
|
+
| `scripts/skill-graph-drift.js` | Drift sentinel. Hashes every `grounding.truth_sources` entry with SHA-256, including line-range and anchor object entries; compares against the recorded `drift_check.truth_source_hashes` baseline; reports DRIFT / BROKEN / STALE / NO_BASELINE. `--record --apply` updates the SKILL.md in place with fresh hashes. |
|
|
184
|
+
|
|
185
|
+
These tools are the *proof* that Tier 1's schema earns its complexity. If you ever doubt whether `boundary` or `grounding.truth_sources` or `lifecycle` is worth the field count, run these scripts against a real skill library and watch them change routing decisions.
|
|
186
|
+
|
|
187
|
+
### Drift sentinel — state machine
|
|
188
|
+
|
|
189
|
+
> **The question this diagram answers:** "What state can `skill-graph-drift.js` put a skill in, and what transitions it?"
|
|
190
|
+
|
|
191
|
+
This is the single highest-leverage argument for the v3 `drift_check.truth_source_hashes` + `lifecycle.stale_after_days` fields. Without them the sentinel has nothing to compare against and nothing to time-box. With them every grounded skill sits in one of five states with explicit transitions.
|
|
192
|
+
|
|
193
|
+
```mermaid
|
|
194
|
+
stateDiagram-v2
|
|
195
|
+
direction LR
|
|
196
|
+
[*] --> NO_BASELINE: skill declares<br/>grounding.truth_sources<br/>but truth_source_hashes absent
|
|
197
|
+
NO_BASELINE --> OK: --record --apply<br/>writes SHA-256 hashes
|
|
198
|
+
OK --> STALE: today − last_verified<br/>> lifecycle.stale_after_days
|
|
199
|
+
OK --> DRIFT: any live SHA-256<br/>≠ recorded hash
|
|
200
|
+
OK --> BROKEN: truth_source file<br/>missing on disk
|
|
201
|
+
STALE --> OK: author re-verifies<br/>bumps last_verified
|
|
202
|
+
STALE --> DRIFT: detected during re-verify
|
|
203
|
+
DRIFT --> OK: content re-verified<br/>--record --apply rewrites hashes
|
|
204
|
+
BROKEN --> OK: truth source restored<br/>--record --apply rewrites hashes
|
|
205
|
+
DRIFT --> BROKEN: truth source deleted<br/>before re-verify
|
|
206
|
+
|
|
207
|
+
note right of OK
|
|
208
|
+
Hashes match
|
|
209
|
+
within lifecycle window
|
|
210
|
+
end note
|
|
211
|
+
note right of NO_BASELINE
|
|
212
|
+
schema-valid but
|
|
213
|
+
unverifiable — fix first
|
|
214
|
+
end note
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
<!-- Rendered copy for non-Mermaid viewers. Source: docs/diagrams/drift-states.mmd. Regenerate via: npx @mermaid-js/mermaid-cli -i docs/diagrams/drift-states.mmd -o docs/images/drift-states.png -b white --width 1400 -->
|
|
218
|
+
<img src="docs/images/drift-states.png" alt="Drift sentinel state machine — NO_BASELINE, OK, STALE, DRIFT, BROKEN states with transitions driven by --record --apply, lifecycle.stale_after_days, live SHA-256 comparison, and truth-source file availability" width="900" />
|
|
219
|
+
|
|
220
|
+
**Legend.** Five states; arrows are transitions with the trigger printed on them. `OK` is the only green state — every other state signals something the author must act on. `--record --apply` is the only author action that can write hashes back into the skill's frontmatter; every other transition is observed, not commanded. The `DRIFT → BROKEN` edge is the one nobody wants — a drifted claim silently outlives the file it was grounded in.
|
|
221
|
+
|
|
222
|
+
### Routing harness — per-skill decision path
|
|
223
|
+
|
|
224
|
+
> **The question this diagram answers:** "How does `skill-graph-routing-eval.js` decide whether a skill's `routing_eval: present` claim holds?"
|
|
225
|
+
|
|
226
|
+
This is the rent-proof for the v0.5.0 `examples`, `anti_examples`, and `relations.boundary.{skill, reason}` fields. Without this harness those fields sit unverified in every SKILL.md — the router's retrieval behavior against them is asserted but never checked. With this harness every authored positive prompt and every authored negative prompt produces a concrete routing decision that the manifest can be graded against. Lint check 12 (`scripts/lint/check-routing-eval.js`) calls into `evaluateSkill()` per-file and refuses `routing_eval: present` unless every case is `PASS` or `COVERAGE_GAP`.
|
|
227
|
+
|
|
228
|
+
```mermaid
|
|
229
|
+
flowchart LR
|
|
230
|
+
Start(["For each skill S<br/>in manifest"])
|
|
231
|
+
HasCases{{"S has examples[]<br/>or anti_examples[]?"}}
|
|
232
|
+
Skip(["SKIP<br/>no cases"])
|
|
233
|
+
Pos["Positive cases<br/>S.examples[]"]
|
|
234
|
+
Neg["Negative cases<br/>S.anti_examples[]"]
|
|
235
|
+
Route1["skill-graph-route<br/>top-1 winner"]
|
|
236
|
+
Route2["skill-graph-route<br/>top-1 winner"]
|
|
237
|
+
WinEq{{"winner === S?"}}
|
|
238
|
+
WinBound{{"winner === S?<br/>winner ∈ S.boundary?<br/>winner === null?"}}
|
|
239
|
+
PosPass(["PASS<br/>positive"])
|
|
240
|
+
PosFail(["FAIL<br/>positive"])
|
|
241
|
+
NegPass(["PASS<br/>negative"])
|
|
242
|
+
NegFail(["FAIL<br/>negative"])
|
|
243
|
+
Gap(["COVERAGE_GAP<br/>informational"])
|
|
244
|
+
|
|
245
|
+
Start --> HasCases
|
|
246
|
+
HasCases -->|no| Skip
|
|
247
|
+
HasCases -->|yes| Pos
|
|
248
|
+
HasCases -->|yes| Neg
|
|
249
|
+
Pos --> Route1 --> WinEq
|
|
250
|
+
Neg --> Route2 --> WinBound
|
|
251
|
+
WinEq -->|yes| PosPass
|
|
252
|
+
WinEq -->|no| PosFail
|
|
253
|
+
WinBound -->|winner === S| NegFail
|
|
254
|
+
WinBound -->|winner ∈ boundary| NegPass
|
|
255
|
+
WinBound -->|winner === null| Gap
|
|
256
|
+
WinBound -->|winner ∉ boundary<br/>and non-null| NegFail
|
|
257
|
+
|
|
258
|
+
classDef start fill:#ecfdf5,stroke:#047857,color:#064e3b
|
|
259
|
+
classDef gate fill:#fce7f3,stroke:#db2777,color:#831843
|
|
260
|
+
classDef work fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
|
|
261
|
+
classDef pass fill:#ecfdf5,stroke:#047857,color:#064e3b,font-weight:bold
|
|
262
|
+
classDef fail fill:#fee2e2,stroke:#b91c1c,color:#7f1d1d,font-weight:bold
|
|
263
|
+
classDef skip fill:#f5f3ff,stroke:#7c3aed,color:#4c1d95,stroke-dasharray:4 2
|
|
264
|
+
class Start,Skip start
|
|
265
|
+
class HasCases,WinEq,WinBound gate
|
|
266
|
+
class Pos,Neg,Route1,Route2 work
|
|
267
|
+
class PosPass,NegPass pass
|
|
268
|
+
class PosFail,NegFail fail
|
|
269
|
+
class Gap skip
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
<!-- Rendered copy for non-Mermaid viewers. Source: docs/diagrams/routing-harness.mmd. Regenerate via: npx @mermaid-js/mermaid-cli -i docs/diagrams/routing-harness.mmd -o docs/images/routing-harness.png -b white --width 1600 -->
|
|
273
|
+
<img src="docs/images/routing-harness.png" alt="Routing harness decision path — per skill, positive examples must route to the skill itself; negative anti-examples must route elsewhere (ideally to a skill named in relations.boundary[]) or nowhere (COVERAGE_GAP, informational)" width="960" />
|
|
274
|
+
|
|
275
|
+
**Legend.** Green = pass state or loop endpoint. Red = FAIL state — the verdict that keeps `routing_eval: absent`. Pink = decision gate. Blue = work node. Purple-dashed = `COVERAGE_GAP` (not a FAIL — the anti-example correctly avoids the skill but no other skill absorbs it; surfaces a `relations.boundary` gap worth tightening in the next pass). The asymmetry between the positive and negative gates is the whole point: positive cases must uniquely identify the skill (tight gate); negative cases must only avoid the skill (loose gate with boundary confirmation as the quality signal). Lint check 12 refuses `routing_eval: present` when any red terminal is reached; a skill with only green + purple terminals earns `present`.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Tier 5 — Specimens (worked examples that illustrate)
|
|
280
|
+
|
|
281
|
+
Concrete artifacts that show adopters what "good" looks like. Every specimen is derivable from the tiers above — but without them, the tiers above are abstract.
|
|
282
|
+
|
|
283
|
+
### Canonical specimen
|
|
284
|
+
|
|
285
|
+
| File | Role |
|
|
286
|
+
|---|---|
|
|
287
|
+
| `examples/skill-metadata-template.md` | Self-referential authoring template. Its subject is skill authoring itself. Demonstrates the v4 field shape including object-shaped `drift_check`, `compatibility`, `boundary[{skill, reason}]`, and `lifecycle`. |
|
|
288
|
+
| `examples/skills.manifest.sample.json` | Generator-produced sample. Drift-checked against live generator output by `skill-lint.js` check 8. |
|
|
289
|
+
|
|
290
|
+
### Starter skills
|
|
291
|
+
|
|
292
|
+
The repo currently ships a larger `skills/` library. The eight starters below are the canonical specimen subset chosen to cover every archetype × scope combination that the schema permits:
|
|
293
|
+
|
|
294
|
+
| Skill | `type` | `scope` | Unique thing it demonstrates |
|
|
295
|
+
|---|---|---|---|
|
|
296
|
+
| `skills/a11y` | capability | portable | Minimal routable capability, eval artifact present |
|
|
297
|
+
| `skills/debugging` | workflow | portable | `## Workflow` section with numbered steps |
|
|
298
|
+
| `skills/documentation` | capability | portable | Eval artifact + worked audit both shipped |
|
|
299
|
+
| `skills/refactor` | workflow | portable | `relations.depends_on: [testing-strategy]` |
|
|
300
|
+
| `skills/testing-strategy` | capability | portable | `routing_bundles: [quality]` |
|
|
301
|
+
| `skills/skill-router` | router | portable | Router archetype with `## Routing Rules` |
|
|
302
|
+
| `skills/lint-overlay` | overlay | portable | Overlay archetype with `extends` + `## Overlay Rules` |
|
|
303
|
+
| `skills/graph-audit` | capability | codebase | **The only starter with a full `grounding` block and recorded `truth_source_hashes`.** |
|
|
304
|
+
|
|
305
|
+
### Supporting artifacts
|
|
306
|
+
|
|
307
|
+
| Directory | Role |
|
|
308
|
+
|---|---|
|
|
309
|
+
| `examples/audits/` | Worked audit outputs (findings/verdict/scorecard) for `a11y`, `debugging`, `documentation`. |
|
|
310
|
+
| `examples/evals/` | Eval fixtures for starter skills plus expanded routing and content-verification surfaces. |
|
|
311
|
+
| `examples/exports/` | Five plain `SKILL.md` exports demonstrating Tier 3's `export-skill.js` transform. |
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## The starter graph — how the eight starters relate
|
|
316
|
+
|
|
317
|
+
> **The question this diagram answers:** "Who verifies whom, depends on whom, and boundaries whom out across the eight starter skills?"
|
|
318
|
+
|
|
319
|
+
The relations graph cuts across all five tiers — declared in Tier 5 SKILL.md frontmatter, validated by Tier 3 lint, and consumed by Tier 4 routing. This is the worst failure mode when it drifts silently: the router fails *confidently* because a dangling target looks like a valid one. The diagram below indexes every relation edge in the starters without duplicating any L1 data. The authoritative relation data lives once, in each SKILL.md's frontmatter; this diagram reads it.
|
|
320
|
+
|
|
321
|
+
```mermaid
|
|
322
|
+
flowchart LR
|
|
323
|
+
A11Y["a11y<br/><i>capability · portable</i>"]
|
|
324
|
+
DBG["debugging<br/><i>workflow · portable</i>"]
|
|
325
|
+
DOC["documentation<br/><i>capability · portable</i>"]
|
|
326
|
+
GA["graph-audit<br/><i>capability · codebase</i>"]
|
|
327
|
+
LO["lint-overlay<br/><i>overlay · portable</i>"]
|
|
328
|
+
RF["refactor<br/><i>workflow · portable</i>"]
|
|
329
|
+
SR["skill-router<br/><i>router · portable</i>"]
|
|
330
|
+
TS["testing-strategy<br/><i>capability · portable</i>"]
|
|
331
|
+
ST(["skill-metadata-template<br/><i>specimen · reference</i>"])
|
|
332
|
+
|
|
333
|
+
%% depends_on — thick solid, load-bearing
|
|
334
|
+
RF ==>|depends_on<br/>^1.0.0| TS
|
|
335
|
+
LO ==>|extends| TS
|
|
336
|
+
|
|
337
|
+
%% verify_with — dashed, co-load for confidence
|
|
338
|
+
A11Y -.->|verify_with| TS
|
|
339
|
+
DBG -.->|verify_with| TS
|
|
340
|
+
GA -.->|verify_with| TS
|
|
341
|
+
RF -.->|verify_with| TS
|
|
342
|
+
TS -.->|verify_with| DBG
|
|
343
|
+
SR -.->|verify_with| GA
|
|
344
|
+
ST -.->|verify_with| DOC
|
|
345
|
+
|
|
346
|
+
%% adjacent — thin undirected, suggested co-reading
|
|
347
|
+
DBG --- TS
|
|
348
|
+
DBG --- RF
|
|
349
|
+
|
|
350
|
+
%% boundary — red, anti-ownership
|
|
351
|
+
A11Y -. boundary .-x RF
|
|
352
|
+
DBG -. boundary .-x DOC
|
|
353
|
+
DOC -. boundary .-x DBG
|
|
354
|
+
DOC -. boundary .-x A11Y
|
|
355
|
+
DOC -. boundary .-x RF
|
|
356
|
+
GA -. boundary .-x DOC
|
|
357
|
+
LO -. boundary .-x DBG
|
|
358
|
+
RF -. boundary .-x DOC
|
|
359
|
+
SR -. boundary .-x DOC
|
|
360
|
+
ST -. boundary .-x RF
|
|
361
|
+
TS -. boundary .-x DOC
|
|
362
|
+
|
|
363
|
+
classDef capability fill:#dbeafe,stroke:#2563eb,color:#1e3a8a
|
|
364
|
+
classDef workflow fill:#ecfdf5,stroke:#047857,color:#064e3b
|
|
365
|
+
classDef router fill:#fce7f3,stroke:#db2777,color:#831843
|
|
366
|
+
classDef overlay fill:#fef3c7,stroke:#d97706,color:#78350f,stroke-dasharray:4 2
|
|
367
|
+
classDef specimen fill:#f5f3ff,stroke:#7c3aed,color:#4c1d95
|
|
368
|
+
classDef codebase stroke-width:3px
|
|
369
|
+
class A11Y,DOC,GA,TS capability
|
|
370
|
+
class DBG,RF workflow
|
|
371
|
+
class SR router
|
|
372
|
+
class LO overlay
|
|
373
|
+
class ST specimen
|
|
374
|
+
class GA codebase
|
|
375
|
+
```
|
|
376
|
+
|
|
377
|
+
<!-- Rendered copy for non-Mermaid viewers. Source: docs/diagrams/starter-graph.mmd. Regenerate via: npx @mermaid-js/mermaid-cli -i docs/diagrams/starter-graph.mmd -o docs/images/starter-graph.png -b white --width 1600 -->
|
|
378
|
+
<img src="docs/images/starter-graph.png" alt="Starter-skill relations graph — eight starters plus the template, with depends_on/extends (thick solid), verify_with (dashed), adjacent (thin undirected), and boundary (red anti-ownership) edges between them" width="1100" />
|
|
379
|
+
|
|
380
|
+
**Legend.** Node fill encodes archetype: blue = capability, green = workflow, pink = router, yellow-dashed = overlay, purple = specimen. A thick node stroke marks `scope: codebase` — only `graph-audit`; every other starter is `portable` and the template is `reference`. Edge styles: `==>` thick solid = `depends_on` (load-bearing) or `extends` (overlay inheritance — semantically stronger than `depends_on`); `-.->` dashed = `verify_with` (co-load for confidence); `---` thin = `adjacent` (suggested co-reading, no dependency); `-. boundary .-x` red-dashed = `boundary` (anti-ownership — the router must route elsewhere).
|
|
381
|
+
|
|
382
|
+
Every edge is verifiable. `node scripts/skill-lint.js` rejects dangling targets (see `skills/graph-audit/SKILL.md § Relation Integrity`); `node scripts/skill-graph-route.js` uses these edges at request time to decide which skill wins, which co-loads via `verify_with` or `depends_on`, and which is excluded via `boundary`. Regenerate the PNG when a starter is added or a relation block changes — the source is `docs/diagrams/starter-graph.mmd`.
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Governance (not a tier — sits outside the authority hierarchy)
|
|
387
|
+
|
|
388
|
+
| File | Role |
|
|
389
|
+
|---|---|
|
|
390
|
+
| `README.md` | Entry point; status; tiered tour (this document). |
|
|
391
|
+
| `CHANGELOG.md` | Keep-a-Changelog release history. |
|
|
392
|
+
| `CONTRIBUTING.md` | How to contribute. The tier a new file belongs to goes in the PR description. |
|
|
393
|
+
| `LICENSE` | MIT. |
|
|
394
|
+
| `.github/workflows/skill-graph-lint.yml` | CI: runs Tier 3 enforcement on every PR. |
|
|
395
|
+
| `docs/integrations/github-actions.md` | Copy-paste CI snippet for adopters. |
|
|
396
|
+
| [`skill-audit-loop` (separate repo)](https://github.com/jacob-balslev/skill-audit-loop) | 5-phase audit procedure and checklist — moved to its own repo. |
|
|
397
|
+
| `docs/plans/multi-root-workspace.md` | Shipped v0.4.0 design doc. |
|
|
398
|
+
| `docs/plans/scripts-roadmap.md` | Forward-looking script plan. |
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
|
|
402
|
+
## The invariants this structure guards
|
|
403
|
+
|
|
404
|
+
Because the tiers are ordered, a tiny set of invariants holds the whole repo together:
|
|
405
|
+
|
|
406
|
+
- **Tier 1 → Tier 2:** Every top-level property in `skill.schema.json` has a matching section in `field-reference.md`. (`check-protocol-consistency.js` C1.)
|
|
407
|
+
- **Tier 1 → Tier 1 (pinned):** The current pinned schema is byte-identical to the unversioned schema modulo `$id` and `title`. (C6.)
|
|
408
|
+
- **Tier 1 → Tier 3 (generator):** Every authored field has a documented projection into the manifest — copied, grouped, or dropped. No silent drops. (C2.)
|
|
409
|
+
- **Tier 1 ↔ Tier 5 (sample manifest):** The committed sample manifest matches live generator output. (`skill-lint.js` check 8.)
|
|
410
|
+
- **Tier 5 → Tier 1:** Every starter skill validates against the schema; every relation target exists; every eval_artifact declaration is backed by a real file. (`skill-lint.js` checks 1–5.)
|
|
411
|
+
|
|
412
|
+
Break any one of these invariants and CI fails. That's why the tiering works: the enforcement tier (Tier 3) is literally the set of scripts that prove the upper and lower tiers agree.
|
|
413
|
+
|
|
414
|
+
---
|
|
415
|
+
|
|
416
|
+
## Adding something new — which tier does it go in?
|
|
417
|
+
|
|
418
|
+
| You want to add | Tier | Also touch |
|
|
419
|
+
|---|---|---|
|
|
420
|
+
| A new required field | 1 (schema) | 2 (field-reference.md, skill-metadata-protocol.md, manifest-field-mapping.md rename map), 3 (generator if grouped; lint deprecation warning if renaming), 5 (template + at least one starter) |
|
|
421
|
+
| A new optional field | 1 (schema) | 2 (field-reference.md entry), 3 (generator flow-through), 5 (template if it demonstrates the new field) |
|
|
422
|
+
| A new lint rule | 3 (skill-lint.js or scripts/lint/) | — |
|
|
423
|
+
| A new tool that uses the manifest | 4 | README Reference consumer section |
|
|
424
|
+
| A new starter skill | 5 | Regenerate sample manifest |
|
|
425
|
+
| A new worked audit | 5 | — |
|
|
426
|
+
| A new integration guide | Governance | — |
|
|
427
|
+
|
|
428
|
+
When in doubt: if the file *defines* a constraint, it's Tier 1. If it *describes* a constraint, it's Tier 2. If it *enforces* a constraint, it's Tier 3. If it *uses* a constraint to make a decision, it's Tier 4. If it *illustrates* a constraint, it's Tier 5. If none of those fit, it's Governance.
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## Further reading
|
|
433
|
+
|
|
434
|
+
- [`README.md`](README.md) — the project overview; now structured by these same tiers.
|
|
435
|
+
- [`docs/skill-metadata-protocol.md`](docs/skill-metadata-protocol.md) — the authoritative field-semantics doc; § Anatomy carries the Mermaid diagram of the SKILL.md three-layer composition (frontmatter × body × teaching layer).
|
|
436
|
+
- [`docs/manifest-field-mapping.md`](docs/manifest-field-mapping.md) — the authored → generated bridge.
|
|
437
|
+
- [`docs/field-decision-guide.md`](docs/field-decision-guide.md) — decision tables for hard field choices.
|
|
438
|
+
- [`skill-audit-loop` repo](https://github.com/jacob-balslev/skill-audit-loop) — the repeatable audit loop (separate repo); `SKILL_AUDIT_LOOP.md` carries the Mermaid diagram of the five-phase flow (deterministic → graded → aggregate → fix → re-verify).
|
|
439
|
+
- [§ Tier 3 — Pipeline](#pipeline--how-a-skillmd-becomes-a-manifest-entry) — how `generate-manifest.js` projects authored frontmatter into the compiled manifest.
|
|
440
|
+
- [§ Tier 4 — Drift sentinel state machine](#drift-sentinel--state-machine) — the five states a grounded skill sits in and what transitions them.
|
|
441
|
+
- [§ Tier 4 — Routing harness](#routing-harness--per-skill-decision-path) — per-skill decision path that turns `routing_eval: present` from self-assertion into a lint-enforced claim.
|
|
442
|
+
- [§ The starter graph](#the-starter-graph--how-the-eight-starters-relate) — Layer 7 indexed visually across all eight starters plus the template.
|
|
443
|
+
- [`CHANGELOG.md`](CHANGELOG.md) — what shipped in each version.
|