@skill-map/spec 0.9.0 → 0.10.0

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 CHANGED
@@ -1,5 +1,32 @@
1
1
  # Spec changelog
2
2
 
3
+ ## 0.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - f8a7125: Open `Node.kind` to any Provider-declared string (Phase A — spec only).
8
+
9
+ The kernel always documented `IProvider.kinds` as "open by design" so future Cursor / Obsidian / Roo Providers can declare their own kinds. The spec, however, had three layers underneath that closed it back to the original five-value Claude Provider catalog (`skill` / `agent` / `command` / `hook` / `note`):
10
+
11
+ - `node.schema.json#/properties/kind` carried `enum: [<5 values>]` — AJV-rejected anything else.
12
+ - `db-schema.md` § `scan_nodes` and § `state_summaries` mandated `CHECK in (<5 values>)` SQL constraints.
13
+ - `extensions/action.schema.json#/.../filter/kind` had the same closed list for the per-action applicability filter.
14
+
15
+ This phase opens the spec end:
16
+
17
+ - `node.schema.json#/properties/kind` → `{ "type": "string", "minLength": 1 }` with a description naming the built-in Claude catalog so consumers know the default contract.
18
+ - `db-schema.md` drops both `CHECK in (...)` constraint rows. Both columns stay `TEXT NOT NULL`.
19
+ - `extensions/action.schema.json#/.../filter/kind` widens to `{ items: { "type": "string", "minLength": 1 } }`.
20
+
21
+ The TS side (`Node.kind: string`, `IProvider.classify(...): { kind: string; ... }`, Kysely `TNodeKind = string`) and the SQL `002_open_node_kinds` migration that drops the live CHECK constraints land in follow-up phases under `@skill-map/cli`. Phase A is a safe checkpoint: shipping the spec change alone changes nothing at runtime (the kernel still emits closed kinds, the live DB still enforces the existing CHECK), but it unblocks the rest of the refactor and aligns the source-of-truth artifact with the design intent.
22
+
23
+ Migration for consumers:
24
+
25
+ - Anyone validating an exported `Node` JSON against `node.schema.json` now accepts external-Provider kinds.
26
+ - Any UI / dashboard / script that hard-coded the closed enum elsewhere (filter chips, assertion sets) needs to widen to `string` and accept whatever an enabled Provider declares.
27
+
28
+ Pre-1.0 minor bump per `spec/versioning.md` § Pre-1.0 (this is breaking for consumers that relied on the enum, but pre-1.0 breakings ship as minor).
29
+
3
30
  ## 0.9.0
4
31
 
5
32
  ### Minor Changes
@@ -78,6 +105,29 @@ list`, `sm plugins doctor`, `sm db prune` plugin filter, runtime
78
105
 
79
106
  ### Minor (breaking, pre-1.0)
80
107
 
108
+ - **`Node.kind` opens to any non-empty string (was the closed enum
109
+ `skill` / `agent` / `command` / `hook` / `note`).** The kernel always
110
+ permitted external Providers — `IProvider.kinds` is documented as
111
+ "open by design" so a future Cursor / Obsidian / Roo Provider can
112
+ declare its own kinds — but the `node.schema.json` enum + the
113
+ `scan_nodes.kind` SQL CHECK + the closed TS `NodeKind` union closed
114
+ three layers underneath. Effects:
115
+ - `node.schema.json#/properties/kind` switches from `enum: [...5
116
+ values]` to `{ "type": "string", "minLength": 1 }`. The
117
+ description still names the built-in Claude Provider catalog so
118
+ consumers know what to expect from the default install.
119
+ - `db-schema.md` drops the `CHECK in (...)` constraint on
120
+ `scan_nodes.kind` and `state_summaries.kind`. Both columns stay
121
+ `TEXT NOT NULL`.
122
+ - `extensions/action.schema.json#/.../filter/kind` (the per-kind
123
+ filter for action applicability) widens the same way: `items:
124
+ { type: 'string', minLength: 1 }` instead of the closed enum.
125
+ Migration: consumers who validate exported `Node` JSON against
126
+ `node.schema.json` will now accept external-Provider kinds. Any
127
+ consumer that hard-coded the closed enum elsewhere (UI filter chip
128
+ set, scripted assertions) needs to widen to "string". The TS +
129
+ SQL counterpart lands in `@skill-map/cli` (kernel TS contract +
130
+ migration `002_open_node_kinds`).
81
131
  - **`conformance-case.schema.json` — rename `setup.disableAllDetectors`
82
132
  → `setup.disableAllExtractors`.** Finishes the kind rename Detector →
83
133
  Extractor introduced in 0.8.0 (Phase 2 of the plug-in model
@@ -376,13 +426,13 @@ the`CamelCasePlugin`; raw SQL fragments must use snake_case to
376
426
  failure / guard / summary templates, plus the `sm scan
377
427
 
378
428
  compare-with`dump-load errors.
379
- -`cli/i18n/watch.texts.ts`—`sm watch`lifecycle templates.
380
- -`cli/i18n/init.texts.ts`—`sm init`templates including
381
- the`--dry-run`previews and the singular/plural pair for
382
- gitignore updates.
383
- -`cli/i18n/db.texts.ts`—`sm db reset`/`sm db restore` templates including their`--dry-run`previews.
384
- -`cli/i18n/cli-progress-emitter.texts.ts`— the
385
- `extension.error: ...` stderr line.
429
+ -`cli/i18n/watch.texts.ts`—`sm watch`lifecycle templates.
430
+ -`cli/i18n/init.texts.ts`—`sm init`templates including
431
+ the`--dry-run`previews and the singular/plural pair for
432
+ gitignore updates.
433
+ -`cli/i18n/db.texts.ts`—`sm db reset`/`sm db restore` templates including their`--dry-run`previews.
434
+ -`cli/i18n/cli-progress-emitter.texts.ts`— the
435
+ `extension.error: ...` stderr line.
386
436
 
387
437
  String content moved verbatim — every existing test that
388
438
  matches on stderr / stdout content keeps passing. Trivial
@@ -1042,9 +1092,9 @@ kind, normalizedTrigger)` and prints one row per group with the
1042
1092
  (`Links out (12, 9 unique)`). When N > 1 detector emits the same
1043
1093
  logical link, the row also gets a `(×N)` suffix.
1044
1094
 
1045
- `--json` output is byte-identical to before — raw rows, no merge.
1046
- Storage is byte-identical to before. The grouping is purely a
1047
- read-time presentation choice for human eyes.
1095
+ `--json` output is byte-identical to before — raw rows, no merge.
1096
+ Storage is byte-identical to before. The grouping is purely a
1097
+ read-time presentation choice for human eyes.
1048
1098
 
1049
1099
  **Spec changes (patch)**:
1050
1100
 
package/db-schema.md CHANGED
@@ -72,7 +72,7 @@ One row per detected node, matching [`schemas/node.schema.json`](./schemas/node.
72
72
  | Column | Type | Constraint | Notes |
73
73
  |---|---|---|---|
74
74
  | `path` | TEXT | PRIMARY KEY | Relative path from scope root. Canonical node identifier. |
75
- | `kind` | TEXT | NOT NULL, CHECK in (`skill`, `agent`, `command`, `hook`, `note`) | |
75
+ | `kind` | TEXT | NOT NULL | Open-by-design (`node.schema.json#/properties/kind`): the value is whatever the classifying Provider declares. Built-in Claude Provider catalog: `skill` / `agent` / `command` / `hook` / `note`. External Providers MAY emit their own. |
76
76
  | `provider` | TEXT | NOT NULL | Provider extension id. |
77
77
  | `title` | TEXT | NULL | |
78
78
  | `description` | TEXT | NULL | |
@@ -274,7 +274,7 @@ One row per `(node_id, summarizer_action_id)`. See [`schemas/summaries/`](./sche
274
274
  | Column | Type | Constraint |
275
275
  |---|---|---|
276
276
  | `node_id` | TEXT | NOT NULL |
277
- | `kind` | TEXT | NOT NULL, CHECK in kind enum |
277
+ | `kind` | TEXT | NOT NULL |
278
278
  | `summarizer_action_id` | TEXT | NOT NULL |
279
279
  | `summarizer_version` | TEXT | NOT NULL |
280
280
  | `body_hash_at_generation` | TEXT | NOT NULL |
package/index.json CHANGED
@@ -166,11 +166,11 @@
166
166
  }
167
167
  ]
168
168
  },
169
- "specPackageVersion": "0.9.0",
169
+ "specPackageVersion": "0.10.0",
170
170
  "integrity": {
171
171
  "algorithm": "sha256",
172
172
  "files": {
173
- "CHANGELOG.md": "d793bcd3df7ffde80f5ad66c245d50d38aedf0a6a10146858877afbabe1ebf09",
173
+ "CHANGELOG.md": "a7712801b4513c3212cbefb8b1e7540accd40e22c4aa09234b98f6b044bd42c9",
174
174
  "README.md": "bd30780525e75379eaeb5f8a903bdc601daf3862f3ec69dffc96c437e8d476fc",
175
175
  "architecture.md": "c69a50e3e9b7d091799bd19cd9efe854a924c83bc2c8e79e0fcb727196151f6c",
176
176
  "cli-contract.md": "1d09d047e07fd8793968259660012ebf64ab136967afead2d2666a59a40a020a",
@@ -178,7 +178,7 @@
178
178
  "conformance/cases/kernel-empty-boot.json": "ad4bbe9d637537625025c8bdb61285b1433568a2544b1ce0248f304ccff8c350",
179
179
  "conformance/coverage.md": "eb57cd979bca59a252e3cd49796e068ac601169f859f32cdf37634486574c44c",
180
180
  "conformance/fixtures/preamble-v1.txt": "1e0aeef224b64477bdc13a949c3ad402e68249caf499ecdba1302371677c068b",
181
- "db-schema.md": "f570b7ec123a1bbe8936e111a3e3b0597855b2aff0cac82b89fa88d4233a4d73",
181
+ "db-schema.md": "6542311118d2e74bdb7c7a48c208eccd5e55cf574f7cb38e976d6d7c3c666745",
182
182
  "interfaces/security-scanner.md": "4a982667008f233656f44c61ce9948e062432d3debdcbf7a134da03bd4139d7d",
183
183
  "job-events.md": "831501bd696a2801e2d160b314eb49794d0ba553da4487e15c7dcc72a1c230f6",
184
184
  "job-lifecycle.md": "1fe88b1a2ed204e41bb41ac172fbb3e912dccd0dd8a1f8ea8e21a681b336d6ee",
@@ -187,7 +187,7 @@
187
187
  "prompt-preamble.md": "23a8eff0477fbbc46192a27781bc781bda4202bb9c669b7a7a002b0d668146b0",
188
188
  "schemas/conformance-case.schema.json": "7cd0f3aae5124f24be57cddb213d002d0466f79d06fd3da896075c8b28650410",
189
189
  "schemas/execution-record.schema.json": "607e939bfcac4e18385ef93e27bbe28987ba35d5a7c67f3d6e4377ca819a9425",
190
- "schemas/extensions/action.schema.json": "ec4c2fd74b73a140744c195da91d287a88bfecac206d029910ae0dcb0ab9ce35",
190
+ "schemas/extensions/action.schema.json": "262272175c06a2e33c08f819a45c3ef8260276c91a9d0542fdffc932aeb32db7",
191
191
  "schemas/extensions/base.schema.json": "e5c3406b88b0496a89791890b05083929429319d96b1f8cea0bec3ec9e3de8af",
192
192
  "schemas/extensions/extractor.schema.json": "122d3f81ef91edcde9798e7dc8fcbf442a2996deea65aa4b03c9d5cb01ba2519",
193
193
  "schemas/extensions/formatter.schema.json": "2ab092aa37ae349c69b93071ed4f0e131affb7bb5799516ca82c721262631b36",
@@ -199,7 +199,7 @@
199
199
  "schemas/issue.schema.json": "40f6f8abadcce0fd8eac9df27ffcc20b2fc9fda6970142ddb8e7e56b1760b9b1",
200
200
  "schemas/job.schema.json": "582999899f8846f70c4d745d2813e53b97a4f5ccd3d8d163eeb68b201e7124e4",
201
201
  "schemas/link.schema.json": "0a95a24849a38b9ef5bad5361519a9f9e012b5bc3001289fad29d0851fceff6b",
202
- "schemas/node.schema.json": "ef80251524ed8a295eb7e98e4399b36cdd1daf3eacd605cacd1ba25edd6f39fc",
202
+ "schemas/node.schema.json": "f9a0cc5d5a7f581915719e91ae401e46a82688e0865fd3a2eb64bd42798a6b2b",
203
203
  "schemas/plugins-registry.schema.json": "5ca1d4970ae64f064f05c237a649d9f82d5edbeb7c121ec50cb4aaca13f4bc51",
204
204
  "schemas/project-config.schema.json": "4f5b1ce01446d78ebf524d11c36e0a3ae101e69008c922a2b3f53fccfd1cb87f",
205
205
  "schemas/report-base.schema.json": "a1021e9a59b4df9f99cd92454d797e88469766e7d49f52d231c4645ffdfdad8f",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skill-map/spec",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "description": "JSON Schemas, prose contracts, and conformance suite for the skill-map specification.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,8 +33,8 @@
33
33
  "properties": {
34
34
  "kind": {
35
35
  "type": "array",
36
- "items": { "type": "string", "enum": ["skill", "agent", "command", "hook", "note"] },
37
- "description": "Node kinds this action accepts. Omitted → any kind."
36
+ "items": { "type": "string", "minLength": 1 },
37
+ "description": "Node kinds this action accepts. Open-by-design (matches `node.schema.json#/properties/kind`): an action declared with `kind: ['cursorRule']` is valid as long as some Provider classifies into `cursorRule`. Omitted → any kind."
38
38
  },
39
39
  "provider": {
40
40
  "type": "array",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
3
  "$id": "https://skill-map.dev/spec/v0/node.schema.json",
4
4
  "title": "Node",
5
- "description": "A single markdown file in the graph (skill, agent, command, hook, note). Identified by its relative path from the scope root.",
5
+ "description": "A single markdown file in the graph. Identified by its relative path from the scope root. The `kind` is whatever the classifying Provider declares; built-in kinds today are `skill`, `agent`, `command`, `hook`, `note`, but external Providers (Cursor, Obsidian, …) MAY emit their own.",
6
6
  "type": "object",
7
7
  "required": ["path", "kind", "provider", "bodyHash", "frontmatterHash", "bytes", "linksOutCount", "linksInCount", "externalRefsCount"],
8
8
  "additionalProperties": false,
@@ -13,8 +13,8 @@
13
13
  },
14
14
  "kind": {
15
15
  "type": "string",
16
- "enum": ["skill", "agent", "command", "hook", "note"],
17
- "description": "Category assigned by the Provider. Stability: stable. New kinds may be added in a minor bump."
16
+ "minLength": 1,
17
+ "description": "Category assigned by the Provider. Open-by-design — any non-empty string an enabled Provider declares is valid (built-in Claude Provider catalog: `skill` / `agent` / `command` / `hook` / `note`; external Providers MAY declare their own). Per-kind frontmatter schemas live with the Provider that emits the kind. Stability: stable."
18
18
  },
19
19
  "provider": {
20
20
  "type": "string",