@skill-graph/cli 0.5.6 → 0.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +27 -3
  2. package/README.md +103 -31
  3. package/SKILL_GRAPH.md +2 -2
  4. package/bin/skill-graph.js +150 -10
  5. package/docs/ADOPTION.md +1 -1
  6. package/docs/PRIMER.md +6 -5
  7. package/docs/QUICKSTART-30MIN.md +2 -2
  8. package/docs/SKILL_AUDIT_CHECKLIST.md +1 -1
  9. package/docs/SKILL_METADATA_PROTOCOL.md +2 -2
  10. package/docs/_archived/marketplace-publication-priority-2026-05-18.md +1 -1
  11. package/docs/_drafts/0.5.8-release-prep.md +164 -0
  12. package/docs/adr/0009-sibling-repo-deprecation.md +48 -0
  13. package/docs/diagrams/skill-graph-ecosystem.mmd +17 -0
  14. package/docs/field-reference.generated.md +22 -2
  15. package/docs/field-reference.md +53 -2
  16. package/docs/images/skill-graph-ecosystem.svg +1 -0
  17. package/docs/manifest-field-mapping.md +3 -3
  18. package/docs/marketplace-publication-queue.generated.md +2 -2
  19. package/docs/plans/scripts-roadmap.md +2 -2
  20. package/docs/positioning.md +88 -0
  21. package/docs/research/skill-comprehension-eval-research.md +5 -5
  22. package/docs/research/skill-demand-gap-roadmap-2026-05-16.md +215 -0
  23. package/docs/status.generated.md +48 -0
  24. package/examples/audits/context-graph/findings.md +59 -0
  25. package/examples/audits/context-graph/scorecard.md +22 -0
  26. package/examples/audits/context-graph/verdict.md +33 -0
  27. package/examples/evals/a11y.json +45 -13
  28. package/examples/evals/api-design.json +18 -5
  29. package/examples/evals/code-review.json +18 -5
  30. package/examples/evals/data-modeling.json +18 -5
  31. package/examples/evals/database-migration.json +18 -5
  32. package/examples/evals/debugging.json +37 -11
  33. package/examples/evals/dependency-architecture.json +18 -5
  34. package/examples/evals/design-system-architecture.json +18 -5
  35. package/examples/evals/error-tracking.json +18 -5
  36. package/examples/evals/event-contract-design.json +18 -5
  37. package/examples/evals/form-ux-architecture.json +18 -5
  38. package/examples/evals/framework-fit-analysis.json +18 -5
  39. package/examples/evals/graph-audit.json +55 -13
  40. package/examples/evals/information-architecture.json +18 -5
  41. package/examples/evals/interaction-feedback.json +18 -5
  42. package/examples/evals/interaction-patterns.json +18 -5
  43. package/examples/evals/layout-composition.json +18 -5
  44. package/examples/evals/lint-overlay.json +38 -11
  45. package/examples/evals/microcopy.json +18 -5
  46. package/examples/evals/observability-modeling.json +18 -5
  47. package/examples/evals/pattern-recognition.json +32 -9
  48. package/examples/evals/performance-engineering.json +18 -5
  49. package/examples/evals/refactor.json +41 -12
  50. package/examples/evals/semiotics.json +18 -5
  51. package/examples/evals/skill-infrastructure.json +32 -9
  52. package/examples/evals/skill-router.json +42 -13
  53. package/examples/evals/system-interface-contracts.json +18 -5
  54. package/examples/evals/task-analysis.json +18 -5
  55. package/examples/evals/testing-strategy.json +36 -11
  56. package/examples/evals/type-safety.json +251 -66
  57. package/examples/evals/visual-design-foundations.json +18 -5
  58. package/examples/evals/webhook-integration.json +18 -5
  59. package/examples/fixture-skills/README.md +47 -0
  60. package/examples/fixture-skills/comprehension-full/SKILL.md +79 -0
  61. package/examples/fixture-skills/minimal-capability/SKILL.md +51 -0
  62. package/examples/fixture-skills/with-grounding/SKILL.md +78 -0
  63. package/examples/fixture-skills/with-relations/SKILL.md +87 -0
  64. package/examples/skills.manifest.sample.json +1722 -446
  65. package/marketplace/README.md +1 -1
  66. package/marketplace/skills/a11y/SKILL.md +1 -1
  67. package/marketplace/skills/best-practice/SKILL.md +211 -0
  68. package/marketplace/skills/context-graph/SKILL.md +1 -1
  69. package/marketplace/skills/debugging/SKILL.md +1 -1
  70. package/marketplace/skills/graph-audit/SKILL.md +3 -1
  71. package/marketplace/skills/postgres-rls/SKILL.md +284 -0
  72. package/marketplace/skills/refactor/SKILL.md +1 -1
  73. package/marketplace/skills/skill-infrastructure/SKILL.md +2 -0
  74. package/marketplace/skills/skill-router/SKILL.md +3 -1
  75. package/marketplace/skills/testing-strategy/SKILL.md +1 -1
  76. package/package.json +3 -1
  77. package/schemas/manifest.schema.json +8 -0
  78. package/schemas/manifest.v6.schema.json +8 -0
  79. package/schemas/skill.context.jsonld +5 -0
  80. package/schemas/skill.schema.json +27 -0
  81. package/scripts/__tests__/test-marketplace-export.js +6 -2
  82. package/scripts/__tests__/test-v3-1-alias-contract.js +3 -3
  83. package/scripts/build-status-doc.js +177 -0
  84. package/scripts/check-doc-drift.js +224 -0
  85. package/scripts/check-markdown-links.js +34 -4
  86. package/scripts/check-mirror-freeze.js +270 -0
  87. package/scripts/export-marketplace-skills.js +35 -6
  88. package/scripts/lib/audit-prompt-builder.js +3 -3
  89. package/scripts/lib/parse-frontmatter.js +2 -2
  90. package/scripts/skill-audit.js +7 -9
package/CHANGELOG.md CHANGED
@@ -8,23 +8,47 @@ Skill Graph versions describe the contract at each checkpoint in the git history
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [0.5.8] — 2026-05-19
12
+
13
+ The "Karpathy-loop Phase 2" release. Ships the Phase 2 deterministic-drift sentinels, mirror-freeze linter, generated status doc, `doctor` subcommand, first hermetic test fixtures, and positioning + onboarding rework. Also absorbs the accumulated `[Unreleased]` backlog from 0.5.0 → 0.5.7 (publication-classification ledger, npm publish pipeline, stability-promotion lint check, schema_version 4 → 5 → 6 migrations, cross-repo version reconciliation, and the skill audit loop re-grounding reframe). The 33 Phase 1 truth-repair commits landed under 0.5.7 and are not re-listed here.
14
+
11
15
  ### Added
16
+
17
+ - **`scripts/check-doc-drift.js`** — schema_version drift sentinel that scans active docs for stale `schema_version: N` references and refuses to teach an old contract as current. Reads the active version from `schemas/skill.schema.json`; allowlists `_archived/`, `docs/migrations/`, `examples/`, `CHANGELOG.md`, and `vN → vM` migration sections. Flags: `--json`, `--quiet`, `--include-warn`.
18
+ - **`scripts/check-mirror-freeze.js`** — fails on active-source / active-package claims in the two docs-only deprecation mirrors (`skill-metadata-protocol`, `skill-audit-loop`). Detects `@skill-graph/protocol`, `@skill-graph/audit`, `src/`, `lib/schemas/`, `schemas/skill.v*.schema.json`, and `evals/` references that contradict the post-ADR-0009 docs-only status. File-level banner detection skips files explicitly stamped as historical / frozen / deprecation-mirror snapshots.
19
+ - **`scripts/build-status-doc.js` + `docs/status.generated.md`** — single-source-of-truth status snapshot that pulls live values from `package.json`, the schema, the manifest, and the four deterministic check scripts. Replaces hand-maintained "Latest release" lines and ad-hoc skill-count claims. Flags: `--check`, `--stdout`, `--no-checks`.
20
+ - **`skill-graph doctor`** — new CLI subcommand grouping all six deterministic checks (links, protocol, drift, mirror-freeze, lint, manifest) into one pass with a single summary table. Recommended first command for bug reports. Flags: `--json`, `--bail`, `--skip <name>`.
21
+ - **`examples/fixture-skills/`** — hermetic test fixtures for `@skill-graph/cli` package tests. Ships `minimal-capability` (bare-minimum v6 frontmatter), `with-grounding` (4-sub-field `grounding` object for `scope: codebase`), `with-relations` (all four `relations.*` edges), and `comprehension-full` (flat Understanding fields + Health Block). Each demonstrates a different fixture archetype; `minimal-capability`, `with-grounding`, and `comprehension-full` lint clean against the active schema.
22
+ - **`docs/positioning.md`** — explicit positioning of Skill Graph in the agent-skills ecosystem. Names what Skill Graph is **not** (a runtime, a marketplace, a tool platform) before naming what it **is** (an authoring + audit-time contract with a Karpathy keep-or-revert loop). Compares against Anthropic Skills, the Agent Skills spec, MCP, A2A, Smithery, Composio, and AGENTS.md. Includes the "60-second pitch", the "what this is not" matrix, the "when to reach for Skill Graph" gate, and the layered ecosystem map.
23
+ - **README hero rework** — three new sections above the ecosystem diagram: "Is this for me?" (yes-if / no-if qualifying signals for a 30-second visitor), "What makes this different" (Karpathy keep-or-revert loop applied to skill libraries, with explicit citation), and a surfacing of `docs/quality-doctrine.md` as the codified quality bar.
24
+ - **README two-onboarding-paths framing** — explicit routing of authors to `docs/QUICKSTART-30MIN.md` for hands-on first-skill authoring and to `docs/PRIMER.md` for the conceptual model first. Synthesis Item 48 resolved as "link, do not merge" because they serve different reader genres.
12
25
  - **`data/publication-classification.json`** — hand-edited ledger of per-skill marketplace publication classification (`publishable` / `sales-hub-bound` / `personal-infra`) plus market-state attributes (`tier`, `pop_score`, `source`, `needs_sanitization`, `demand_signal`, `rename_to`, `notes`). Seeds the `publicationQueue` in the unified `.opencode/progress/skill-audit-worklist.json` (consumed by `skill-audit-loop@0.3.0`). 218 skills classified at seed (136 publishable, 55 sales-hub-bound, 27 personal-infra). Seeded by `scripts/seed-publication-classification.js` from the now-archived 2026-05-18 priority doc; hand-edited going forward.
13
26
  - **`scripts/seed-publication-classification.js`** — one-off seeder script that parses the priority doc tables into the ledger. Re-runnable; preserves first-classification-wins semantics.
14
27
  - **`docs/marketplace-publication-queue.generated.md`** — auto-generated by `skill-audit-loop@0.3.0` from the ledger. Tier-grouped publication queue with conflict and orphan tracking. Replaces the hand-curated priority doc as the living source of marketplace publication priority.
15
28
  - **npm publish pipeline (SH-6111).** Added `.github/workflows/publish.yml` — CI publishes `@skill-graph/cli` to npm on `v*.*.*` tag push after `npm test` passes. Uses `NPM_TOKEN` secret and npm provenance attestation (`--provenance`). Manual prereqs before first publish: (1) create the `@skill-graph` npm org at https://www.npmjs.com/org/create (the npm CLI does NOT support org creation; the org must be created via the website), (2) add `NPM_TOKEN` as a GitHub repo secret. First publish is pending Jacob's `npm version patch && git push --tags`. See [README.md § Releasing](README.md#releasing-maintainers).
16
29
  - **Lint check 14 — stability promotion gate (SH-6109).** `scripts/skill-lint.js` now includes a WARN-level check that fires when a skill declares `stability: stable` without meeting five promotion criteria: (1) `eval_state` is `passing` or `monitored`, (2) `eval_score` ≥ 4.0 on the 0.0–5.0 scale, (3) `routing_eval: present`, (4) `drift_check.last_verified` within the last 90 days, (5) `grounding.truth_sources` is populated for `scope: codebase` and `scope: reference` skills (`scope: portable` is exempt). All five criteria are evaluated independently — all failures are reported, never short-circuited. WARN level only (never ERROR), so the 140 currently-experimental skills are unaffected. Implemented in `scripts/lint/check-stability-promotion.js`; 8 tests in `scripts/__tests__/test-stability-promotion.js` (6 required cases + 2 edge cases). Promotion criteria documented in `docs/skill-metadata-protocol.md § Stability Promotion Criteria`. Status: 0/140 library skills currently declare `stability: stable`.
17
30
 
18
- ### Removed
19
- - **`docs/marketplace-publication-priority-2026-05-18.md`** — archived to `docs/_archived/marketplace-publication-priority-2026-05-18.md` and superseded by `docs/marketplace-publication-queue.generated.md`. The hand-curated priority doc lived for one day before being merged into the auto-generated queue (via `skill-graph/data/publication-classification.json` + `skill-audit-loop@0.3.0`). Reasoning preserved in the archived copy for audit-trail grep.
20
-
21
31
  ### Changed
32
+
33
+ - **`scripts/check-markdown-links.js`** — broken links in `_archived/` paths now emit warnings instead of failing the build. Active docs remain strict. New `--strict-archived` flag elevates archived warnings to errors (useful when migrating an archive batch). Synthesis Item 49.
34
+ - **README "External Context"** — replaced 5-bullet list of tangential references with a "Where Skill Graph fits" section that links directly to `docs/positioning.md` and surfaces the unique angle in one line.
35
+ - **`bin/skill-graph.js`** — `evolve` subcommand labeled `[PREVIEW · monorepo-only]` in both the README quickstart and the CLI `--help`. Aligns the discoverability surface with the dispatcher's existing not-standalone-compatible error message.
22
36
  - **Cross-repo version reconciliation (SH-6124).** README and CHANGELOG references to `schema_version: 4` updated to `schema_version: 6` (the actual current contract owned by `skill-metadata-protocol`). Repository Map updated to mention v6 in `schemas/`. The local `schemas/` directory still pins v4 and v5 alongside v6 for tooling that consumes the schemas directly; the unversioned mirror tracks v6.
23
37
  - **schema_version 6 — flat fields + Health Block.** Promotes the seven nested `concept.*` sub-fields to flat top-level fields (`mental_model`, `purpose`, `boundary`, `analogy`, `misconception`; `definition` collapses into `description`; `taxonomy` collapses into `category` + `relations.broader`) and introduces the seven-field flat Health Block (`last_audited`, `last_changed`, `audit_verdict`, `eval_score`, `eval_failed_ids`, `lint_verdict`, `drift_status`). Added `schemas/skill.v6.schema.json` + the v5→v6 migration codemod at `scripts/migrate-skill-v5-to-v6.js`. Full author-facing procedure lives in [`skill-metadata-protocol/docs/migrations/v5-to-v6.md`](https://github.com/jacob-balslev/skill-metadata-protocol/blob/main/docs/migrations/v5-to-v6.md).
24
38
  - **schema_version 5 — closed `category` enum.** Closed the `category` field to a 6-value enum (`foundations | engineering | design | quality | agent | product`) and removed 7 deprecated values. Promoted `quality` from facet to 6th category. Added `schemas/skill.v5.schema.json` and `scripts/migrate-skill-v4-to-v5.js`.
25
39
  - **schema_version 4 naming cleanup.** Renamed `browse_category` to `category`, hierarchical `category` / `category_path` to `domain`, `project_tags` to `workspace_tags`, and `routing_groups` to `routing_bundles`. Added active and pinned v4 skill/manifest schemas, migrated shipped skills, regenerated manifests/exports/marketplace artifacts, and added `scripts/migrate-skill-v3-to-v4.js`.
26
40
  - **Skill Audit Loop reframed as a re-grounding mechanism (docs only, no `schema_version` impact).** The loop was documented mechanics-first — its cadence and outputs without its purpose. `README.md` and `SKILL_AUDIT_LOOP.md` now open with the conceptual frame: a skill is a contract about a subject, and the loop is what re-grounds it against its two moving targets — the codebase it is grounded in and the subject it describes. `README.md` closing line changed "maintenance loop" to "re-grounding loop"; `SKILL_GRAPH.md` gains a three-layer relationship paragraph (protocol declares grounding, graph operates across the library, loop re-grounds each skill on a cadence). Rationale recorded in new `docs/proposals/skill-audit-loop-positioning.md`. Stated entirely in existing protocol vocabulary — no new fields, scripts, or CLI verbs.
27
41
 
42
+ ### Removed
43
+
44
+ - **`docs/marketplace-publication-priority-2026-05-18.md`** — archived to `docs/_archived/marketplace-publication-priority-2026-05-18.md` and superseded by `docs/marketplace-publication-queue.generated.md`. The hand-curated priority doc lived for one day before being merged into the auto-generated queue (via `skill-graph/data/publication-classification.json` + `skill-audit-loop@0.3.0`). Reasoning preserved in the archived copy for audit-trail grep.
45
+
46
+ ### Documented
47
+
48
+ - **`docs/_archived/marketplace-publication-priority-2026-05-18.md`** — the archived plan's broken `./adr/...` link was fixed to `../adr/...` (Phase 1 Item 1).
49
+ - **Mirror governance** — five mirror docs banner-stamped as frozen deprecation snapshots: `skill-metadata-protocol/docs/{concept-map, field-reference, field-reference.generated, skill-metadata-protocol}.md` and `skill-metadata-protocol/CONTRIBUTING.md` + `skill-audit-loop/{CONTRIBUTING, SKILL_AUDIT_LOOP, SKILL_AUDIT_CHECKLIST}.md` (Phase 1 Items 30, 25 + Phase 2 Item 36 follow-ups).
50
+ - **`docs/plans/skill-graph-oss-docs-refresh.md`** (lives in the Development workspace, not this repo) — banner-stamped as superseded by ADR 0009 (Phase 2 Item 41).
51
+
28
52
  ## [0.5.0] — 2026-05-13
29
53
 
30
54
  The "package-ready CLI + contract honesty" release. It keeps the existing zero-dependency scripts as the implementation surface, exposes them through one npm-ready `skill-graph` binary, closes the v3.1 alias pass-through gap, and tightens router/path behavior that made the contract look stronger than the implementation.
package/README.md CHANGED
@@ -1,23 +1,84 @@
1
1
  # Skill Graph
2
2
 
3
- [![Version 0.5.0](https://img.shields.io/badge/version-0.5.0-blue?style=flat-square)](CHANGELOG.md) [![Protocol v1.1.0](https://img.shields.io/badge/protocol-v1.1.0-blueviolet?style=flat-square)](https://github.com/jacob-balslev/skill-metadata-protocol) [![License Apache-2.0 + CC-BY-4.0](https://img.shields.io/badge/license-Apache--2.0%20%2B%20CC--BY--4.0-green?style=flat-square)](LICENSE) [![Exports SKILL.md](https://img.shields.io/badge/exports-SKILL.md-orange?style=flat-square)](https://agentskills.io/specification)
3
+ [![npm version](https://img.shields.io/npm/v/@skill-graph/cli?style=flat-square&logo=npm&color=cb3837)](https://www.npmjs.com/package/@skill-graph/cli) [![Schema v6](https://img.shields.io/badge/schema-v6-blueviolet?style=flat-square)](docs/SKILL_METADATA_PROTOCOL.md) [![License Apache-2.0 + CC-BY-4.0](https://img.shields.io/badge/license-Apache--2.0%20%2B%20CC--BY--4.0-green?style=flat-square)](LICENSE) [![Exports SKILL.md](https://img.shields.io/badge/exports-SKILL.md-orange?style=flat-square)](https://agentskills.io/specification) [![CI](https://img.shields.io/github/actions/workflow/status/jacob-balslev/skill-graph/publish.yml?style=flat-square&label=CI)](https://github.com/jacob-balslev/skill-graph/actions) [![GitHub stars](https://img.shields.io/github/stars/jacob-balslev/skill-graph?style=flat-square&logo=github)](https://github.com/jacob-balslev/skill-graph/stargazers)
4
4
 
5
- **The library-level system for structured `SKILL.md` libraries. Lint, manifest compiler, router, drift sentinel, and export pipeline.**
5
+ **The canonical home for structured `SKILL.md` libraries.** Skill spec, JSON schemas, lint, manifest compiler, router, drift sentinel, audit loop, and the export pipeline — all shipped as a single CLI.
6
6
 
7
- Skill Graph operates across a library of [Skill Metadata Protocol](https://github.com/jacob-balslev/skill-metadata-protocol) records. A plain `SKILL.md` gives an agent a procedure to load. Skill Metadata Protocol adds the structured frontmatter contract. Skill Graph turns those declarations into a compiled manifest, routing map, drift sentinel, overlap detector, and export path back to the plain `SKILL.md` format.
7
+ A plain `SKILL.md` gives an agent a procedure to load. The Skill Metadata Protocol adds the structured frontmatter contract. Skill Graph turns those declarations into a compiled manifest, routing map, drift sentinel, overlap detector, audit loop, and export path back to the plain `SKILL.md` format.
8
8
 
9
- ## Ecosystem
9
+ ## Is this for me?
10
10
 
11
- | Repo | npm | Purpose |
12
- |------|-----|---------|
13
- | **[skill-metadata-protocol](https://github.com/jacob-balslev/skill-metadata-protocol)** | `@skill-graph/protocol` | Normative spec + JSON schemas |
14
- | **skill-graph** *(this repo)* | `@skill-graph/cli` | Library tooling: lint, manifest, router, drift |
15
- | **[skill-audit-loop](https://github.com/jacob-balslev/skill-audit-loop)** | `@skill-graph/audit` | 5-phase audit procedure |
16
- | **[skills](https://github.com/jacob-balslev/skills)** | — | Public open-source skill library |
11
+ **Yes, if** you have **more than ~5 skills** that have started to depend on, verify, or exclude one another; you want **deterministic checks** for skill correctness (schema, paths, eval health) rather than only LLM-as-grader; you want a **single audit loop** that produces a per-skill fingerprint (`audit_verdict`, `eval_score`, `drift_status`) you ship in the skill's own frontmatter; or you want **graph queries** over the library ("what depends on this?", "what's the boundary between X and Y?", "which skills verify this one?").
12
+
13
+ **No, if** you have 1–3 skills and a plain folder is enough; you want a hosted skill marketplace ([Smithery](https://smithery.ai), [agentskills.io](https://agentskills.io)); you want an agent runtime (Claude Code, Cursor, Codex); or you want a tool-execution platform ([Composio](https://docs.composio.dev), your runtime's tool layer).
14
+
15
+ Full positioning vs. MCP, A2A, Anthropic Skills, Smithery, and Composio: [`docs/positioning.md`](docs/positioning.md).
16
+
17
+ ## What makes this different
18
+
19
+ The mechanism is a **Karpathy-style keep-or-revert audit loop** ([autoresearch](https://github.com/karpathy/autoresearch)) applied to skill libraries instead of training scripts:
20
+
21
+ - **One field, one commit, one keep-or-revert decision.**
22
+ - Every change has a hard pass/fail gate — a deterministic check script that turns red or green.
23
+ - Failed changes auto-revert. The lesson is recorded; the field's truth is preserved.
24
+
25
+ The protocol's typed fields are the substrate that makes deterministic gates possible. The audit loop ([`docs/SKILL_AUDIT_LOOP.md`](docs/SKILL_AUDIT_LOOP.md)) is the mechanism. The quality bar that governs every change — what "improve" means, when it's safe to remove, how to enrich without dropping coverage — is codified in [`docs/quality-doctrine.md`](docs/quality-doctrine.md). Together they produce a library that drifts less, even as it grows.
26
+
27
+ ## The ecosystem
28
+
29
+ <p align="center">
30
+ <img src="docs/images/skill-graph-ecosystem.svg" alt="Skill Graph ecosystem — skill-graph is the canonical monolith that exports SKILL.md into the skills library; skill-metadata-protocol and skill-audit-loop are docs-only mirrors." width="640">
31
+ </p>
32
+
33
+ ```mermaid
34
+ %%{init: {'theme':'neutral','flowchart':{'curve':'basis','padding':20}}}%%
35
+ graph TD
36
+ G["<b>skill-graph</b><br/><i>canonical monolith: spec, schemas, tooling, audit</i><br/>@skill-graph/cli — npm install -g"]
37
+ L["<b>skills</b><br/><i>public open-source skill library</i><br/>npx skills add jacob-balslev/skills"]
38
+ P["<b>skill-metadata-protocol</b><br/><i>deprecated · docs-only mirror</i><br/>SKILL_METADATA_PROTOCOL.md preserved"]
39
+ A["<b>skill-audit-loop</b><br/><i>deprecated · docs-only mirror</i><br/>SKILL_AUDIT_LOOP.md preserved"]
40
+ G -->|exports SKILL.md| L
41
+ G -. mirrors protocol spec to .-> P
42
+ G -. mirrors audit procedure to .-> A
43
+ classDef active fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d;
44
+ classDef tool fill:#fef3c7,stroke:#d97706,stroke-width:2px,color:#78350f;
45
+ classDef mirror fill:#f3f4f6,stroke:#9ca3af,stroke-width:1px,color:#4b5563,stroke-dasharray:4 3;
46
+ class G tool;
47
+ class L active;
48
+ class P,A mirror;
49
+ ```
50
+
51
+ | Repo | npm | Status | Purpose |
52
+ |------|-----|--------|---------|
53
+ | **skill-graph** *(this repo)* | [`@skill-graph/cli`](https://www.npmjs.com/package/@skill-graph/cli) | **active** | Canonical home — protocol spec, schemas, CLI, lint, manifest, router, drift, audit loop, export |
54
+ | **[skills](https://github.com/jacob-balslev/skills)** | — | **active** | Public open-source skill library (consumed via `npx skills add jacob-balslev/skills`) |
55
+ | [skill-metadata-protocol](https://github.com/jacob-balslev/skill-metadata-protocol) | _(consolidated)_ | mirror | Historical docs-only mirror of the normative spec — content lives [here](docs/SKILL_METADATA_PROTOCOL.md) |
56
+ | [skill-audit-loop](https://github.com/jacob-balslev/skill-audit-loop) | _(consolidated)_ | mirror | Historical docs-only mirror of the audit procedure — content lives [here](docs/SKILL_AUDIT_LOOP.md) |
17
57
 
18
- [Skill Graph system](SKILL_GRAPH.md) | [Full template](examples/skill-metadata-template.md) | [Primer](docs/PRIMER.md) | [Field reference](docs/field-reference.md) | [Adoption guide](docs/ADOPTION.md) | [Conformance](docs/CONFORMANCE.md)
58
+ > **Recent consolidation (2026-05-18):** Per [SH-6137](https://linear.app/sales-hub/issue/SH-6137) and [ADR 0009](docs/adr/0009-sibling-repo-deprecation.md), `@skill-graph/protocol` and `@skill-graph/audit` were merged into `@skill-graph/cli@0.5.6`. Schemas, audit scripts, graders, eval fixtures, examples, and the protocol/audit canonical docs now all live in this repo. The sibling repos are preserved as read-only mirrors so existing inbound links remain valid; they are not archived on GitHub.
19
59
 
20
- > **Surface scope:** The OSS-portable canonical library lives at `skills/skills/` (141 v6-compliant skills). A separate personal/Sales Hub surface at `skills/` (263 pre-v6) is frozen — new skills are curated into the OSS surface only when non-PII, non-Sales-Hub, and generalizable. See [ADR 0008](docs/adr/0008-skill-surface-split-and-curation-policy.md).
60
+ ### Pick the right doc
61
+
62
+ Two onboarding paths, by need:
63
+
64
+ - **"I want to author my first skill in 30 minutes."** → [`docs/QUICKSTART-30MIN.md`](docs/QUICKSTART-30MIN.md) — literal terminal walkthrough: clone, install, fill in the template, lint, route a query, record the drift baseline. Use this when you'd rather try the tooling than read about it.
65
+ - **"I want to understand the model before I commit."** → [`docs/PRIMER.md`](docs/PRIMER.md) — conceptual primer: what the protocol is, when to adopt it, the four orthogonal classification axes, the routing model, and what Skill Graph is *not*. Use this when you'd rather build the mental model first.
66
+
67
+ The QUICKSTART points at the PRIMER for the "why"; the PRIMER points at the QUICKSTART for the "how". Read either first, then loop back.
68
+
69
+ For everything else:
70
+
71
+ | If you want to… | Start here |
72
+ |---|---|
73
+ | **Install the CLI** | [Quick Start](#quick-start) below — `npm install -g @skill-graph/cli` |
74
+ | **Install the public skill library** | [`jacob-balslev/skills`](https://github.com/jacob-balslev/skills) — `npx skills add jacob-balslev/skills` |
75
+ | **Understand the `SKILL.md` frontmatter contract** | [`docs/SKILL_METADATA_PROTOCOL.md`](docs/SKILL_METADATA_PROTOCOL.md) — the normative spec |
76
+ | **Audit an existing skill library** | [`docs/SKILL_AUDIT_LOOP.md`](docs/SKILL_AUDIT_LOOP.md) — the audit procedure |
77
+ | **Look up a specific field** | [`docs/field-reference.md`](docs/field-reference.md) |
78
+ | **Plan adoption in a new repo** | [`docs/ADOPTION.md`](docs/ADOPTION.md) and [`docs/CONFORMANCE.md`](docs/CONFORMANCE.md) |
79
+ | **Migrate from an older `schema_version`** | [`docs/migrations/`](docs/migrations/) |
80
+
81
+ > **Surface scope:** The OSS-portable canonical library lives at `skills/skills/` (145 v6-compliant skills). A separate personal/Sales Hub surface at `skills/` (263 pre-v6) is frozen — new skills are curated into the OSS surface only when non-PII, non-Sales-Hub, and generalizable. See [ADR 0008](docs/adr/0008-skill-surface-split-and-curation-policy.md).
21
82
 
22
83
  ## How SKILL.md, Skill Metadata Protocol, and Skill Graph Differ
23
84
 
@@ -235,7 +296,7 @@ The public, ready-to-install skill library lives at [`jacob-balslev/skills`](htt
235
296
  npx skills add jacob-balslev/skills
236
297
  ```
237
298
 
238
- That repo holds 141+ canonical skills in plain Agent-Skills shape, indexed on `skills.sh`. You do not need to clone this `skill-graph` tooling repo to consume the skills.
299
+ That repo holds 145+ canonical skills in plain Agent-Skills shape, indexed on `skills.sh`. You do not need to clone this `skill-graph` tooling repo to consume the skills.
239
300
 
240
301
  ### Running the tooling (authors and maintainers)
241
302
 
@@ -246,7 +307,7 @@ npm install --global @skill-graph/cli
246
307
  skill-graph --help
247
308
  ```
248
309
 
249
- The tooling operates against a skill library configured via [`.skill-graph/config.json`](.skill-graph/config.json) → `workspace.skill_roots`. Post-2026-05-16 monorepo split, the shipped config points at the sibling [`jacob-balslev/skills`](https://github.com/jacob-balslev/skills) repo (canonical 141-skill library). Clone the canonical skills as a sibling of this repo and the tooling resolves automatically — no env-vars needed:
310
+ The tooling operates against a skill library configured via [`.skill-graph/config.json`](.skill-graph/config.json) → `workspace.skill_roots`. Post-2026-05-18 consolidation, the shipped config points at the public [`jacob-balslev/skills`](https://github.com/jacob-balslev/skills) repo (canonical 145-skill library). Clone the canonical skills as a sibling of this repo and the tooling resolves automatically — no env-vars needed:
250
311
 
251
312
  ```bash
252
313
  git clone https://github.com/jacob-balslev/skills.git ~/Development/skills
@@ -284,11 +345,13 @@ skill-graph audit my-skill # Seed or run a single-skill audit
284
345
  skill-graph route "schema drift" # Select skills for a query
285
346
  skill-graph drift # Check truth-source hashes
286
347
  skill-graph export # Generate marketplace export surface
287
- skill-graph evolve --top 5 # Run the continuous improvement loop
348
+ skill-graph evolve --top 5 # PREVIEW: continuous improvement loop (monorepo-only — see Note below)
288
349
  ```
289
350
 
290
351
  Run `skill-graph --help` to see all commands (including legacy aliases).
291
352
 
353
+ > **Note on `evolve` (PREVIEW, not standalone-compatible).** `skill-graph evolve` depends on `lib/audit-shared/auto-improve.js` and several parent-repo scripts (`scripts/run-skill-improvement-loop.js`, `scripts/skill-auto-create.js`, `scripts/dispatch-solver.js`, `agent-orchestration/logs/`) that ship only in the source Development monorepo, not in the published `@skill-graph/cli` package. The CLI prints a clear error and exits when those deps are missing. Standalone refactor tracked in [SH-6138](https://linear.app/sales-hub/issue/SH-6138) (parent EPIC SH-6132). Until then, run from the source repo where the deps are available. Use `audit`, `lint`, `route`, and `drift` (all standalone) for the read-only Karpathy operations.
354
+
292
355
  ## What You Get
293
356
 
294
357
  | Tool | Purpose |
@@ -309,7 +372,10 @@ Run `skill-graph --help` to see all commands (including legacy aliases).
309
372
  | Path | Purpose |
310
373
  |---|---|
311
374
  | [`SKILL_GRAPH.md`](SKILL_GRAPH.md) | Library-level system model and authority tiers. |
312
- | [`schemas/`](schemas/) | Skill and manifest JSON Schemas, including pinned v4, v5, and v6 copies; the unversioned mirror tracks v6. |
375
+ | [`docs/SKILL_METADATA_PROTOCOL.md`](docs/SKILL_METADATA_PROTOCOL.md) | **Canonical** normative spec for the `SKILL.md` frontmatter contract. |
376
+ | [`docs/SKILL_AUDIT_LOOP.md`](docs/SKILL_AUDIT_LOOP.md) | **Canonical** audit procedure (4 operations: audit, improve, evaluate, evolve). |
377
+ | [`docs/SKILL_AUDIT_CHECKLIST.md`](docs/SKILL_AUDIT_CHECKLIST.md) | Per-skill audit checklist used during `audit`. |
378
+ | [`schemas/`](schemas/) | Skill and manifest JSON Schemas, including pinned v2 through v6; the unversioned mirror tracks v6. |
313
379
  | [`examples/skill-metadata-template.md`](examples/skill-metadata-template.md) | Copyable authoring template. |
314
380
  | [`examples/projects/markdown-static-site/`](examples/projects/markdown-static-site/) | Specimen project showing codebase-grounded skills. |
315
381
  | [`docs/field-reference.md`](docs/field-reference.md) | Field-by-field reference. |
@@ -317,14 +383,16 @@ Run `skill-graph --help` to see all commands (including legacy aliases).
317
383
  | [`docs/quality-doctrine.md`](docs/quality-doctrine.md) | Quality bar for preserving scope, readable names, organization-over-trimming, compression, and verification. |
318
384
  | [`docs/SKILL-MD-FORMAT-COMPATIBILITY.md`](docs/SKILL-MD-FORMAT-COMPATIBILITY.md) | How export maps protocol-enriched skills back to plain `SKILL.md`. |
319
385
  | [`docs/marketplace-syndication.md`](docs/marketplace-syndication.md) | How to syndicate the full library to public `SKILL.md` marketplaces and mine gaps for new skills. |
386
+ | [`docs/adr/`](docs/adr/) | Architecture Decision Records, including [ADR 0009 — sibling repo deprecation](docs/adr/0009-sibling-repo-deprecation.md). |
387
+ | [`docs/migrations/`](docs/migrations/) | Per-bump author migration procedures (v4→v5, v5→v6). |
320
388
 
321
- **Sibling repos** (post-2026-05-16 monorepo split — content moved out of this tooling repo):
389
+ **Related repos:**
322
390
 
323
- | Repo | Purpose |
324
- |---|---|
325
- | [`jacob-balslev/skill-metadata-protocol`](https://github.com/jacob-balslev/skill-metadata-protocol) | Normative protocol contract (formerly `SKILL_METADATA_PROTOCOL.md` here). |
326
- | [`jacob-balslev/skills`](https://github.com/jacob-balslev/skills) | Canonical 141-skill library (formerly `skills/` here). |
327
- | [`jacob-balslev/skill-audit-loop`](https://github.com/jacob-balslev/skill-audit-loop) | Repeatable audit workflow (formerly `SKILL_AUDIT_LOOP.md` + `SKILL_AUDIT_CHECKLIST.md` here). |
391
+ | Repo | Status | Purpose |
392
+ |---|---|---|
393
+ | [`jacob-balslev/skills`](https://github.com/jacob-balslev/skills) | **active** | Public open-source 145-skill library. Distributed via `npx skills add jacob-balslev/skills`. |
394
+ | [`jacob-balslev/skill-metadata-protocol`](https://github.com/jacob-balslev/skill-metadata-protocol) | mirror | Historical docs-only mirror of the protocol spec (kept for inbound-link stability). Canonical doc now in [`docs/SKILL_METADATA_PROTOCOL.md`](docs/SKILL_METADATA_PROTOCOL.md). |
395
+ | [`jacob-balslev/skill-audit-loop`](https://github.com/jacob-balslev/skill-audit-loop) | mirror | Historical docs-only mirror of the audit workflow. Canonical doc now in [`docs/SKILL_AUDIT_LOOP.md`](docs/SKILL_AUDIT_LOOP.md). |
328
396
 
329
397
  ## Releasing (Maintainers)
330
398
 
@@ -381,18 +449,22 @@ Skill Graph is not:
381
449
 
382
450
  It is a structured protocol and reference toolchain for making skills easier to route, cluster, verify, maintain, and port.
383
451
 
384
- ## External Context
452
+ ## Where Skill Graph fits
453
+
454
+ Skill Graph sits **above** plain `SKILL.md` files and **beside** runtime protocols like MCP and A2A. It is an **authoring + audit-time** project, not a runtime. Full positioning with explicit comparisons against [Anthropic Skills](https://docs.anthropic.com/en/docs/claude-code/skills), [the Agent Skills spec](https://agentskills.io/specification), [MCP](https://modelcontextprotocol.io), [A2A](https://google.github.io/A2A/latest/specification/), [Smithery](https://smithery.ai), [Composio](https://docs.composio.dev), and [AGENTS.md](https://agents.md/) lives in [**`docs/positioning.md`**](docs/positioning.md) — it names what Skill Graph is **not** before naming what it **is**.
385
455
 
386
- Skill Metadata Protocol is designed to sit next to existing agent-context conventions, not replace them:
456
+ One-line summary: most agent-skills projects answer *"how does the agent find / load / call / dispatch / publish a skill?"* Skill Graph answers *"how do you keep a library of skills correct over time?"* The unique mechanism is the **Karpathy keep-or-revert audit loop** applied to skill libraries instead of training scripts (see [Skill Audit Loop](#skill-audit-loop) below and [`docs/quality-doctrine.md`](docs/quality-doctrine.md) for the quality bar that doctrine enforces).
387
457
 
388
- - [SKILL.md format reference](https://agentskills.io/specification) describes the portable base skill layout used by multiple agent runtimes.
389
- - [AGENTS.md](https://agents.md/) and [Codex AGENTS.md docs](https://developers.openai.com/codex/guides/agents-md) define always-on repository instructions.
390
- - [Claude Code memory docs](https://code.claude.com/docs/en/memory) document one memory model for persistent context.
391
- - [Model Context Protocol](https://github.com/modelcontextprotocol/modelcontextprotocol) and [OpenTelemetry Specification](https://github.com/open-telemetry/opentelemetry-specification) are useful examples of protocol-first repos that separate spec, schema, docs, and reference tooling.
392
- - The project framing was also discussed in [GitHub Discussion #1](https://github.com/jacob-balslev/skill-graph/discussions/1) and the linked [Bluesky thread](https://bsky.app/profile/did:plc:dydxbat6yyyhjfaln22sx66t/post/3mln2lefdi22u).
458
+ For project framing context, see [GitHub Discussion #1](https://github.com/jacob-balslev/skill-graph/discussions/1) and the linked [Bluesky thread](https://bsky.app/profile/did:plc:dydxbat6yyyhjfaln22sx66t/post/3mln2lefdi22u).
393
459
 
394
460
  ## Status
395
461
 
396
- Latest release checkpoint: **0.5.0 (2026-05-13)**. The current contract is `schema_version: 6` — see [`skill-metadata-protocol/schemas/skill.v6.schema.json`](https://github.com/jacob-balslev/skill-metadata-protocol/blob/main/schemas/skill.v6.schema.json) for the authoritative shape and [`skill-metadata-protocol/docs/migrations/v5-to-v6.md`](https://github.com/jacob-balslev/skill-metadata-protocol/blob/main/docs/migrations/v5-to-v6.md) for the migration procedure. The local `schemas/` directory pins v4, v5, and v6 copies for tooling that consumes the schemas directly.
462
+ Latest release: **`@skill-graph/cli@0.5.7`** (2026-05-18) — see [`CHANGELOG.md`](CHANGELOG.md). The current contract is `schema_version: 6` — see [`schemas/skill.v6.schema.json`](schemas/skill.v6.schema.json) for the authoritative shape and [`docs/migrations/v5-to-v6.md`](docs/migrations/v5-to-v6.md) for the migration procedure. The `schemas/` directory pins v2 through v6 for tooling that consumes the schemas directly. The unversioned `skill.schema.json` tracks v6.
463
+
464
+ ## Contributing & Trust
397
465
 
398
- Code is licensed under Apache-2.0. Skill content and documentation are licensed under CC-BY-4.0 where noted. See [`LICENSE`](LICENSE) and [`NOTICE`](NOTICE).
466
+ - **Contributing** see [`CONTRIBUTING.md`](CONTRIBUTING.md). Issues and PRs welcome via the structured templates in [`.github/`](.github/).
467
+ - **Security** — report vulnerabilities privately via the [security policy](SECURITY.md), not as public issues.
468
+ - **Code of Conduct** — this project follows the [Contributor Covenant 2.1](CODE_OF_CONDUCT.md).
469
+ - **License** — code is licensed under [Apache-2.0](LICENSE). Skill content and documentation under CC-BY-4.0 where noted in [`NOTICE`](NOTICE).
470
+ - **Discussions** — open-ended questions and ideas welcome in [GitHub Discussions](https://github.com/jacob-balslev/skill-graph/discussions).
package/SKILL_GRAPH.md CHANGED
@@ -62,8 +62,8 @@ A sixth set of files — `README.md`, `CHANGELOG.md`, `CONTRIBUTING.md`, `LICENS
62
62
 
63
63
  | File | Role |
64
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). |
65
+ | `schemas/skill.schema.json` | The frontmatter schema. Unversioned — tracks latest (v6 today). |
66
+ | `schemas/manifest.schema.json` | The compiled-manifest schema. Unversioned — tracks latest (v4 today; manifest contract shape has not advanced since v4 even as the skill schema moved to v6). |
67
67
  | `schemas/skill.v4.schema.json` | Pinned v4 copy. Consumers that want the current contract validate against this file. |
68
68
  | `schemas/skill.v3.schema.json` | Frozen pinned v3 copy for consumers still migrating to v4. |
69
69
  | `schemas/manifest.v4.schema.json` | Pinned v4 manifest copy. |
@@ -181,14 +181,62 @@ Note: skill-graph evolve is not yet standalone-compatible. It depends on
181
181
  },
182
182
 
183
183
  // ─── Legacy / additional subcommands (backward compat) ───────────────────
184
- manifest: { script: 'scripts/generate-manifest.js' },
185
- overlap: { script: 'scripts/skill-overlap.js' },
186
- 'routing-eval': { script: 'scripts/skill-graph-routing-eval.js' },
187
- 'export-verify': { script: 'scripts/verify-skill-md-export.js' },
188
- 'export:verify-skill-md': { script: 'scripts/verify-skill-md-export.js' },
189
- 'marketplace-export': { script: 'scripts/export-marketplace-skills.js' },
190
- 'marketplace:export': { script: 'scripts/export-marketplace-skills.js' },
191
- 'protocol-check': { script: 'scripts/check-protocol-consistency.js' },
184
+ manifest: {
185
+ script: 'scripts/generate-manifest.js',
186
+ help: `Usage: skill-graph manifest [options]\n\nGenerate or validate a skills.manifest.json from the skill library.\n\nOptions:\n --validate-only Validate only, do not write. Exits non-zero on invalid manifest.\n --output <path> Output path (default: skills.manifest.json).\n\nSee also: skill-graph protocol-check (cross-artifact consistency)\n`,
187
+ },
188
+ overlap: {
189
+ script: 'scripts/skill-overlap.js',
190
+ help: `Usage: skill-graph overlap [options]\n\nDetect duplicate activation signals (keywords, paths, triggers) across skills.\n\nFlags activation collisions where two or more skills would compete for the same routing query.\n`,
191
+ },
192
+ 'routing-eval': {
193
+ script: 'scripts/skill-graph-routing-eval.js',
194
+ help: `Usage: skill-graph routing-eval [options]\n\nRun the routing examples and anti_examples from each skill's frontmatter through the live router.\n\nOptions:\n --manifest <path> Pre-built manifest to use (default: generate one).\n --only-asserted Only run examples with asserted expected skills.\n`,
195
+ },
196
+ 'export-verify': {
197
+ script: 'scripts/verify-skill-md-export.js',
198
+ help: `Usage: skill-graph export-verify [path]\n\nVerify exported skills under marketplace/skills/ against the plain SKILL.md export shape contract.\n\nDefault path: marketplace/skills\n`,
199
+ },
200
+ 'export:verify-skill-md': {
201
+ script: 'scripts/verify-skill-md-export.js',
202
+ help: `Usage: skill-graph export:verify-skill-md [path]\n\nAlias for 'export-verify'. Verify exported skills against the plain SKILL.md export shape.\n`,
203
+ },
204
+ 'marketplace-export': {
205
+ script: 'scripts/export-marketplace-skills.js',
206
+ help: `Usage: skill-graph marketplace-export [options]\n\nGenerate and validate the public marketplace export surface (marketplace/ tree).\n\nOptions:\n --output <dir> Marketplace output root (default: marketplace).\n --check Validate only; fail if generated files are stale.\n`,
207
+ },
208
+ 'marketplace:export': {
209
+ script: 'scripts/export-marketplace-skills.js',
210
+ help: `Usage: skill-graph marketplace:export [options]\n\nAlias for 'marketplace-export'. Generate and validate the public marketplace surface.\n`,
211
+ },
212
+ 'protocol-check': {
213
+ script: 'scripts/check-protocol-consistency.js',
214
+ help: `Usage: skill-graph protocol-check [options]\n\nCheck cross-artifact protocol consistency across the C1-C8 invariants:\n\n C1 — Field-set parity (field-reference.md vs skill.schema.json)\n C2 — Authored-to-generated parity (skill.schema.json -> manifest.schema.json)\n C3 — Artifact-root convention\n C4 — Sample manifest correctness\n C5 — Example truth invariants\n C6 — Versioned schema parity (skill.schema.json vs skill.v6.schema.json)\n C7 — Generated field-reference parity\n C8 — JSON-LD context coverage (schema fields vs skill.context.jsonld)\n\nOptions:\n --verbose Print per-field diagnostics for each failed check.\n\nExit codes: 0 on PASS; non-zero on any FAIL.\n`,
215
+ },
216
+ doctor: {
217
+ inline: true,
218
+ help: `Usage: skill-graph doctor [options]
219
+
220
+ Run every deterministic check in one pass and print a single summary table.
221
+ This is the recommended first command when filing a bug report or onboarding
222
+ a new install — it surfaces the project's complete trust surface at a glance.
223
+
224
+ Checks executed (in order):
225
+ links scripts/check-markdown-links.js
226
+ protocol scripts/check-protocol-consistency.js
227
+ drift scripts/check-doc-drift.js
228
+ mirror-freeze scripts/check-mirror-freeze.js
229
+ lint scripts/skill-lint.js
230
+ manifest scripts/generate-manifest.js --validate-only
231
+
232
+ Options:
233
+ --json Emit a JSON summary instead of the human table.
234
+ --bail Stop at the first failure instead of running every check.
235
+ --skip <name> Skip a check by short name (repeatable). Example: --skip lint
236
+
237
+ Exit codes: 0 if every check PASS; 1 if any check FAIL.
238
+ `,
239
+ },
192
240
  };
193
241
 
194
242
  function printHelp() {
@@ -202,7 +250,10 @@ Commands:
202
250
  route <query> Select and explain skills for a natural-language query
203
251
  drift Check or record grounding truth-source hashes (drift sentinel)
204
252
  export Generate and validate the public marketplace export surface
205
- evolve Run the continuous skill-improvement loop (Karpathy-style)
253
+ evolve [PREVIEW · monorepo-only] Continuous Karpathy-style improvement loop (depends on parent-repo scripts; see SH-6138)
254
+
255
+ Diagnostics:
256
+ doctor Run every deterministic check in one pass (recommended for bug reports)
206
257
 
207
258
  Additional commands (retained for backward compatibility):
208
259
  manifest Generate or validate a skills.manifest.json
@@ -221,6 +272,7 @@ Examples:
221
272
  skill-graph route "audit my skills for schema conformance"
222
273
  skill-graph drift --record --apply skills/graph-audit
223
274
  skill-graph export
275
+ skill-graph doctor
224
276
  skill-graph evolve --top 5 --max-cycles 3
225
277
  `);
226
278
  }
@@ -302,6 +354,93 @@ Examples:
302
354
  process.exit(0);
303
355
  }
304
356
 
357
+ // ---------------------------------------------------------------------------
358
+ // `doctor` — run every deterministic check in one pass
359
+ // ---------------------------------------------------------------------------
360
+ // Aggregates the project's trust-surface checks behind one command so a
361
+ // reader (or bug-report filer) has a single number to verify.
362
+
363
+ const DOCTOR_CHECKS = [
364
+ { name: 'links', script: 'scripts/check-markdown-links.js' },
365
+ { name: 'protocol', script: 'scripts/check-protocol-consistency.js' },
366
+ { name: 'drift', script: 'scripts/check-doc-drift.js' },
367
+ { name: 'mirror-freeze', script: 'scripts/check-mirror-freeze.js' },
368
+ { name: 'lint', script: 'scripts/skill-lint.js' },
369
+ { name: 'manifest', script: 'scripts/generate-manifest.js', args: ['--validate-only'] },
370
+ ];
371
+
372
+ function runDoctor(args) {
373
+ if (args.includes('--help') || args.includes('-h')) {
374
+ process.stdout.write(COMMANDS.doctor.help);
375
+ process.exit(0);
376
+ }
377
+
378
+ const asJson = args.includes('--json');
379
+ const bail = args.includes('--bail');
380
+ const skipList = [];
381
+ for (let i = 0; i < args.length; i++) {
382
+ if (args[i] === '--skip' && args[i + 1]) skipList.push(args[i + 1]);
383
+ }
384
+
385
+ const results = [];
386
+ for (const check of DOCTOR_CHECKS) {
387
+ if (skipList.includes(check.name)) {
388
+ results.push({ ...check, status: 'SKIP', exit_code: null, duration_ms: 0, tail: '' });
389
+ continue;
390
+ }
391
+ const scriptPath = path.join(REPO_ROOT, check.script);
392
+ if (!fs.existsSync(scriptPath)) {
393
+ results.push({ ...check, status: 'MISSING', exit_code: null, duration_ms: 0, tail: 'script not found' });
394
+ if (bail) break;
395
+ continue;
396
+ }
397
+ const t0 = Date.now();
398
+ const r = spawnSync('node', [scriptPath, ...(check.args || [])], {
399
+ cwd: REPO_ROOT,
400
+ encoding: 'utf8',
401
+ timeout: 120_000,
402
+ });
403
+ const duration_ms = Date.now() - t0;
404
+ const combined = (r.stdout || '') + (r.stderr || '');
405
+ const tail = combined.trim().split('\n').slice(-1)[0] || '';
406
+ const status = r.error ? 'ERROR' : r.status === 0 ? 'PASS' : 'FAIL';
407
+ results.push({
408
+ ...check,
409
+ status,
410
+ exit_code: r.status,
411
+ duration_ms,
412
+ tail: tail.slice(0, 240),
413
+ });
414
+ if (bail && status !== 'PASS' && status !== 'SKIP') break;
415
+ }
416
+
417
+ if (asJson) {
418
+ process.stdout.write(JSON.stringify({ checks: results }, null, 2) + '\n');
419
+ } else {
420
+ const namePad = Math.max(...DOCTOR_CHECKS.map(c => c.name.length));
421
+ process.stdout.write(`\nskill-graph doctor — ${results.length} check(s)\n\n`);
422
+ for (const r of results) {
423
+ const badge = r.status === 'PASS'
424
+ ? 'PASS'
425
+ : r.status === 'SKIP'
426
+ ? 'SKIP'
427
+ : `${r.status}`;
428
+ const padded = r.name.padEnd(namePad);
429
+ const time = r.duration_ms ? `${r.duration_ms}ms`.padStart(6) : ' —';
430
+ process.stdout.write(` ${badge} ${padded} ${time} ${r.tail}\n`);
431
+ }
432
+ const failed = results.filter(r => r.status !== 'PASS' && r.status !== 'SKIP');
433
+ process.stdout.write(
434
+ failed.length === 0
435
+ ? `\nAll ${results.length - results.filter(r => r.status === 'SKIP').length} check(s) PASS.\n`
436
+ : `\n${failed.length} check(s) failed: ${failed.map(f => f.name).join(', ')}\n`
437
+ );
438
+ }
439
+
440
+ const anyFail = results.some(r => r.status !== 'PASS' && r.status !== 'SKIP');
441
+ process.exit(anyFail ? 1 : 0);
442
+ }
443
+
305
444
  // ---------------------------------------------------------------------------
306
445
  // Main dispatcher
307
446
  // ---------------------------------------------------------------------------
@@ -324,7 +463,8 @@ function main() {
324
463
 
325
464
  // Inline subcommands run in-process.
326
465
  if (entry.inline) {
327
- if (command === 'init') { runInit(args); }
466
+ if (command === 'init') { runInit(args); return; }
467
+ if (command === 'doctor') { runDoctor(args); return; }
328
468
  // (future inline commands added here)
329
469
  return;
330
470
  }
package/docs/ADOPTION.md CHANGED
@@ -58,7 +58,7 @@ The fields you pay for cluster into 8 semantic purposes (Identity, Classificatio
58
58
  For the full conceptual primer read [`PRIMER.md`](PRIMER.md). To migrate your first skill from a valid plain `SKILL.md` file:
59
59
 
60
60
  1. **Copy the template** — `cp examples/skill-metadata-template.md skills/<your-skill>/SKILL.md`. The template is a real, valid, schema-conformant Skill Metadata Protocol skill whose subject is skill authoring itself; adapt by rewriting identity, description, body, and verification.
61
- 2. **Add the 13 required Skill Metadata Protocol fields** — `schema_version: 4`, `version`, `type`, `category`, `scope`, `owner`, `freshness`, `drift_check`, `eval_artifacts`, `eval_state`, `routing_eval`, plus your existing `name` and `description`. The template inline-comments each field.
61
+ 2. **Add the 13 required Skill Metadata Protocol fields** — `schema_version: 6`, `version`, `type`, `category`, `scope`, `owner`, `freshness`, `drift_check`, `eval_artifacts`, `eval_state`, `routing_eval`, plus your existing `name` and `description`. The template inline-comments each field.
62
62
  3. **Strip the teaching annotations** — every `> **TEMPLATE NOTE:**` blockquote and `# TEMPLATE NOTE:` YAML comment must be removed before commit.
63
63
  4. **Validate locally:**
64
64
  ```bash
package/docs/PRIMER.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Read this if:** you author SKILL.md and your library is large enough that skills have started to depend on, verify, or exclude one another. This primer is the conceptual introduction to Skill Metadata Protocol and Skill Graph. It is *explanation* documentation — it answers *what* and *why*. For reference material see `docs/field-reference.md`; for procedures see `CONTRIBUTING.md` and `SKILL_AUDIT_LOOP.md`; for decision tables see `docs/field-decision-guide.md`.
4
4
 
5
- **Status.** Stable for `schema_version: 4`.
5
+ **Status.** Stable for `schema_version: 6`.
6
6
  **Audience.** Skill authors who need skills to declare their relevance: which area they cover, which angle they take, which project or stack they fit, which taxonomy / semantic cluster they belong to, and how they should be tested or reverified. Library size is a proxy for this — these questions usually start around 5 skills, sometimes earlier if you have multiple projects, sometimes later for a single small project.
7
7
  **Prerequisites.** Working familiarity with the [SKILL.md specification](https://agentskills.io/specification), including `SKILL.md` layout and the progressive-disclosure loading model.
8
8
 
@@ -10,11 +10,12 @@
10
10
 
11
11
  | Document | Purpose |
12
12
  |---|---|
13
- | `docs/PRIMER.md` (this file) | Conceptual introduction: what Skill Graph is, when to adopt it, how the metadata composes |
13
+ | `docs/PRIMER.md` (this file) | Conceptual introduction: what Skill Graph is, when to adopt it, how the metadata composes (Diátaxis: *explanation*) |
14
+ | [`docs/QUICKSTART-30MIN.md`](QUICKSTART-30MIN.md) | Hands-on tutorial: author your first skill in 30 minutes — clone, install, fill in the template, lint, route, record the drift baseline (Diátaxis: *tutorial*). Read this if you'd rather try the tooling first; the PRIMER is the *why* behind the *how* the QUICKSTART teaches. |
14
15
  | [`README.md`](../README.md) | Project overview, quick start, five-authority-tier tour |
15
16
  | [`SKILL_GRAPH.md`](../SKILL_GRAPH.md) | Repo organisation: five **authority tiers** (schema / explanation / enforcement / consumer / specimen) and the invariants CI enforces |
16
17
  | [`docs/skill-metadata-protocol.md`](skill-metadata-protocol.md) | Archetype section map, requiredness groups, schema strictness rules |
17
- | [`docs/field-reference.md`](field-reference.md) | Per-field semantics for all 40 current v4 top-level fields |
18
+ | [`docs/field-reference.md`](field-reference.md) | Per-field semantics for all current v6 top-level fields |
18
19
  | [`docs/field-decision-guide.md`](field-decision-guide.md) | Decision tables for `scope`, `relations.*`, eval-health, `portability`, `workspace_tags` |
19
20
  | [`docs/manifest-field-mapping.md`](manifest-field-mapping.md) | The authored → generated bridge: rename map, loss policy, migration notes |
20
21
  | [SKILL.md specification](https://agentskills.io/specification) | The base standard Skill Metadata Protocol extends |
@@ -259,7 +260,7 @@ The claim that authored edges buy the consumer something needs proof. This secti
259
260
 
260
261
  ```yaml
261
262
  ---
262
- schema_version: 4
263
+ schema_version: 6
263
264
  name: my-skill
264
265
  description: "Use when <concrete situation>. Covers <A, B, C>. Do NOT use for <D, E>."
265
266
  ---
@@ -276,7 +277,7 @@ The `refactor` starter skill reduced to its load-bearing fields:
276
277
 
277
278
  ```yaml
278
279
  ---
279
- schema_version: 4
280
+ schema_version: 6
280
281
  name: refactor
281
282
  description: "Use when reorganizing existing code without changing external behavior..."
282
283
  type: workflow
@@ -70,7 +70,7 @@ The 13 required v4 fields are: `schema_version`, `name`, `description`, `version
70
70
  For `markdown-post-frontmatter-review`, the values look like:
71
71
 
72
72
  ```yaml
73
- schema_version: 4
73
+ schema_version: 6
74
74
  name: markdown-post-frontmatter-review
75
75
  description: "Use when authoring or reviewing the YAML frontmatter of a markdown post — checking required fields (title, date, slug, tags), validating against the content schema, catching ambiguous date formats, and ensuring the slug matches the file path. Activate this skill whenever the task touches files under `content/posts/**/*.md` or the `parsePostFrontmatter()` helper — even if the user just says 'the post'. Do NOT use for general YAML schema design (use a different skill) or for chasing a specific build-time validation failure (use debugging)."
76
76
  version: 0.1.0
@@ -151,7 +151,7 @@ cp examples/skill-metadata-template.md skills/post-archive-rebuild/SKILL.md
151
151
  Edit `skills/post-archive-rebuild/SKILL.md` to set:
152
152
 
153
153
  ```yaml
154
- schema_version: 4
154
+ schema_version: 6
155
155
  name: post-archive-rebuild
156
156
  description: "Use when re-indexing the post archive after one or more frontmatter fields have changed — walking every post, re-extracting the indexed fields, and writing the updated archive page. Activate this skill whenever the task says 'rebuild the archive' or mentions a post-index regeneration after a content edit. Do NOT use for routine authoring of a single post (use markdown-post-frontmatter-review)."
157
157
  version: 0.1.0
@@ -87,7 +87,7 @@ Required dimension rows:
87
87
 
88
88
  ### 1. Frontmatter validity
89
89
 
90
- - [ ] `schema_version` exists and equals `5` (integer; the string `"5"` is tolerated for hand-rolled YAML for back-compat — see `schemas/skill.v5.schema.json`)
90
+ - [ ] `schema_version` exists and equals `6` (integer; the string `"6"` is tolerated for hand-rolled YAML for back-compat — see `schemas/skill.v6.schema.json`)
91
91
  - [ ] `name` exists and matches the intended skill identifier
92
92
  - [ ] `description` exists and is specific enough to route from
93
93
  - [ ] `version` exists
@@ -540,7 +540,7 @@ find skills -name SKILL.md -exec sed -i '' 's/schema_version: "4"/schema_version
540
540
 
541
541
  | What changed | v4 form | v5 form |
542
542
  |---|---|---|
543
- | Schema version | `schema_version: 4` | `schema_version: 5` |
543
+ | Schema version | `schema_version` was `4` | `schema_version` is `5` |
544
544
  | Schema file | `schemas/skill.v4.schema.json` (open-ended `category` string) | `schemas/skill.v5.schema.json` (closed `category` enum of 6 values) |
545
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
546
  | `foundations` gate | implicit | explicit anti-junk-drawer rule: target 8–15 skills; cannot default here; must clear epistemic-precondition test |
@@ -557,7 +557,7 @@ Run the codemod to migrate in place: `node scripts/migrate-skill-v3-to-v4.js <pa
557
557
 
558
558
  | What changed | v3 form | v4 form |
559
559
  |---|---|---|
560
- | Schema version | `schema_version: 3` | `schema_version: 4` |
560
+ | Schema version | `schema_version` was `3` | `schema_version` was bumped to `4` |
561
561
  | Flat browse shelf | `browse_category: engineering` | `category: engineering` |
562
562
  | Hierarchical path | `category: engineering/api-design` or `category_path: engineering/api-design` | `domain: engineering/api-design` |
563
563
  | Workspace relevance tags | `project_tags: [...]` | `workspace_tags: [...]` |
@@ -9,7 +9,7 @@
9
9
  > **Purpose:** prioritized publication queue for `github.com/jacob-balslev/skills` / `skills.sh/jacob-balslev/skills/`,
10
10
  > ranked by **expected popularity** given current marketplace demand signals.
11
11
  >
12
- > **Scope filter (per [ADR 0008](./adr/0008-skill-surface-split-and-curation-policy.md)):**
12
+ > **Scope filter (per [ADR 0008](../adr/0008-skill-surface-split-and-curation-policy.md)):**
13
13
  > Sales-Hub-bound, customer-data-bearing, and personal/PII-bound skills are listed in the
14
14
  > "Excluded" sections so the decision is auditable — none are recommended for publication
15
15
  > in this pass.