@skill-map/spec 0.13.1 → 0.14.1

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,56 @@
1
1
  # Spec changelog
2
2
 
3
+ ## 0.14.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 34d57db: Doc-only fix to remove a misleading reading of "built-in kinds" in the Node schema and one test, plus a small batch of internal CLI refactors and tightened null checks. No external surface change.
8
+
9
+ Spec / docs:
10
+
11
+ - `spec/schemas/node.schema.json` — the top-level `description` previously read "built-in kinds today are skill, agent, command, hook, note", which suggested those kinds were a kernel-level concept. They are not — the kernel treats `kind` as an open string, and the five names are emitted by the **built-in Claude Provider**. Re-worded to attribute the catalog to the Claude Provider, matching the wording already used on the `kind` field, in `spec/README.md`, in `src/kernel/types.ts`, and in `src/kernel/adapters/sqlite/schema.ts`.
12
+ - `src/test/extractor-applicable-kinds.test.ts` — three comments tightened from "built-in kind" to "built-in Claude Provider kind" for consistency.
13
+
14
+ Internal CLI refactors (no behaviour change):
15
+
16
+ - `src/cli/commands/config.ts` — extracted an `isPlainObject` predicate (replaces the duplicated `!!v && typeof v === 'object' && !Array.isArray(v)` check inside `enumerateConfigPaths`) and a `safeGetAtPath` helper that wraps `getAtPath` + `ForbiddenSegmentError` handling so each read verb's `run()` no longer repeats the try/catch + instanceof shape.
17
+ - `src/cli/commands/db.ts` — pulled the SQL number serialiser into `formatSqlNumber` (NaN / ±Infinity collapse to NULL) so `formatSqlValue` reads as a flat dispatcher.
18
+ - `src/cli/util/parse-error.ts` — moved the verb-scoped error formatting (incl. the missing-positionals special case) into a `formatVerbScopedError` helper so the top-level dispatcher in `formatParseError` stays flat. Removed the now-stale "dispatcher pattern" eslint-disable comment.
19
+ - `src/kernel/adapters/sqlite/scan-load.ts` — tightened `parseJsonObject` / `parseJsonArray` null checks from `s == null` to `s === null || s === undefined` to remove the implicit-coercion pattern flagged by lint.
20
+
21
+ No contract change (no field/type/required edits). `spec/index.json` regenerated.
22
+
23
+ ## 0.14.0
24
+
25
+ ### Minor Changes
26
+
27
+ - 8f2a66d: Bare `sm` defaults to `sm serve` instead of printing help
28
+
29
+ `sm` invoked with no arguments now starts the Web UI server when a
30
+ `.skill-map/` project exists in the current working directory
31
+ (equivalent to `sm serve`). When no project is found, it prints a
32
+ one-line hint pointing to `sm init` and `sm --help` on stderr and
33
+ exits with code `2`. `sm --help` and `sm -h` continue to print
34
+ top-level help — help is now reserved for explicit flags.
35
+
36
+ **Spec change** (`spec/cli-contract.md` §Binary): the prior wording —
37
+ _"`sm`, `sm --help`, `sm -h` MUST all print top-level help"_ — is
38
+ replaced by two separate clauses. Help invocation requires `--help` or
39
+ `-h`; bare invocation routes to the server with the hint-and-exit
40
+ fallback when no project exists.
41
+
42
+ **CLI change** (`src/cli/entry.ts`): empty argv is intercepted before
43
+ Clipanion sees it. If `defaultProjectDbPath(cwd)` exists, the args
44
+ are rewritten to `['serve']`. Otherwise the hint is printed via the
45
+ `tx()` i18n shim and the process exits `2`. `RootHelpCommand` no
46
+ longer carries `Command.Default`; it remains the handler for `--help`
47
+ and `-h` only.
48
+
49
+ **Why pre-1.0 minor instead of major**: `spec/` and `src/` are both
50
+ in `0.Y.Z`. Per `spec/versioning.md` §Pre-1.0, breaking changes ship
51
+ as minor bumps until the deliberate 1.0 stabilization. The conformance
52
+ suite required no updates (no case asserted bare-sm = help).
53
+
3
54
  ## 0.13.1
4
55
 
5
56
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # skill-map spec
2
2
 
3
- The **skill-map specification** defines a vendor-neutral standard for mapping, inspecting, and managing collections of interrelated Markdown files — skills, agents, commands, hooks, and notes that compose AI-agent ecosystems (Claude Code, Codex, Gemini, Obsidian vaults, docs sites, and any future platform).
3
+ The **skill-map specification** defines a vendor-neutral standard for mapping, inspecting, and managing collections of interrelated Markdown files — skills, agents, commands, hooks, and notes that compose AI-agent ecosystems (Claude Code, Codex, Gemini, docs sites, and any future platform).
4
4
 
5
5
  This document is the **source of truth**. The reference implementation under `../src/` conforms to this spec. Third parties can build alternative implementations (any language, any UI, any CLI) using only `spec/`, without reading the reference source.
6
6
 
@@ -31,7 +31,7 @@ These are implementation decisions. The reference impl picks them (see [`../AGEN
31
31
  - **Machine-readable**: all domain shapes are JSON Schemas. Validate from any language that has a JSON Schema validator.
32
32
  - **Human-readable**: prose documents for each subsystem, with examples.
33
33
  - **Independently versioned**: spec `v1.0.0` can be implemented by CLI `v0.3.2`. See [`versioning.md`](./versioning.md).
34
- - **Platform-neutral**: no platform (Claude Code, Obsidian, …) is privileged. Each is expressed as an adapter extension.
34
+ - **Platform-neutral**: no platform is privileged. Each is expressed as an adapter extension.
35
35
  - **Conformance-tested**: every conforming implementation passes the suite under [`conformance/`](./conformance/README.md). Pass/fail is binary.
36
36
 
37
37
  ## Naming conventions
package/cli-contract.md CHANGED
@@ -8,7 +8,8 @@ Normative description of the `sm` CLI surface: verbs, flags, exit codes, machine
8
8
 
9
9
  - Primary: `sm`.
10
10
  - Long alias: `skill-map`. MUST resolve to the same binary. A symlink, shim, or alias in `bin` field of `package.json` is acceptable.
11
- - Help invocation: `sm`, `sm --help`, `sm -h` MUST all print top-level help and exit with code 0.
11
+ - Help invocation: `sm --help` and `sm -h` MUST print top-level help and exit with code 0.
12
+ - Bare invocation: `sm` with no arguments starts the Web UI server (equivalent to `sm serve`) when a `.skill-map/` project is initialized in the current working directory. When no project is found in the cwd, it MUST print a one-line hint to stderr pointing the user to `sm init` and `sm --help`, then exit with code `2`.
12
13
 
13
14
  ---
14
15
 
@@ -103,6 +104,19 @@ Flags: `--no-scan` (skip the first scan), `--force` (rewrite an existing config)
103
104
 
104
105
  Exit: 0 on success, 2 on failure.
105
106
 
107
+ #### `sm guide`
108
+
109
+ Materialize the interactive tester guide as `sm-guide.md` in the current working directory. Companion to the `sm-guide` Claude Code skill: a tester drops into an empty directory, runs `sm guide` to seed the guide source, then opens Claude Code there and triggers the skill (which reads the file as its onboarding payload).
110
+
111
+ - Writes `<cwd>/sm-guide.md` (single file, top-level — no subdirectory).
112
+ - Content is the canonical `SKILL.md` shipped with the implementation. Any conforming implementation MUST embed an equivalent guide source (the prose itself is informative; what is normative is that `sm guide` produces a single readable file at `<cwd>/sm-guide.md` that a Claude Code skill can consume).
113
+ - Does NOT require an initialized project — runs in any directory, including empty ones, and never reads or writes `.skill-map/`.
114
+ - Is NOT scope-aware: `-g` is accepted (inherited global flag) but has no effect; the file is always written under the cwd.
115
+
116
+ Flags: `--force` (overwrite an existing `sm-guide.md` without prompting).
117
+
118
+ Exit: `0` on success; `2` if `<cwd>/sm-guide.md` already exists and `--force` was not passed (operational error — refusing to clobber); `2` on any I/O failure.
119
+
106
120
  #### `sm version`
107
121
 
108
122
  Prints version matrix:
@@ -1,6 +1,6 @@
1
1
  # Conformance coverage
2
2
 
3
- Authoritative map of JSON Schemas in [`../schemas/`](../schemas/) to the conformance cases that exercise them. Every schema MUST have at least one case before spec v1.0.0 ships — missing case → missing release ([`../../AGENTS.md`](../../AGENTS.md) §Rules for AI agents editing spec/).
3
+ Authoritative map of JSON Schemas in [`../schemas/`](../schemas/) to the conformance cases that exercise them. Every schema MUST have at least one case before spec v1.0.0 ships — missing case → missing release ([`../../context/spec.md`](../../context/spec.md) §Rules for AI agents editing spec/).
4
4
 
5
5
  This file is hand-maintained. A CI check before spec release compares the schema inventory against this table and fails if any schema lacks a case.
6
6
 
package/index.json CHANGED
@@ -166,18 +166,18 @@
166
166
  }
167
167
  ]
168
168
  },
169
- "specPackageVersion": "0.13.1",
169
+ "specPackageVersion": "0.14.1",
170
170
  "integrity": {
171
171
  "algorithm": "sha256",
172
172
  "files": {
173
- "CHANGELOG.md": "e99ca15631aa9ce6392612d055379d5cb2f2757df2008c8c184acc059a4178c3",
174
- "README.md": "bd30780525e75379eaeb5f8a903bdc601daf3862f3ec69dffc96c437e8d476fc",
173
+ "CHANGELOG.md": "4581c812b7314799af60df5c4d87f8f8ef7eeeff86a5436838f77b058e93a327",
174
+ "README.md": "97fd3079092182c677669c25f44e08b0f6579faaa3406d8cb5a884e37e9eef97",
175
175
  "architecture.md": "c14e69faa7ce7f657d6a2790762daaea8a5ff350375de8c254cd870b5494b896",
176
- "cli-contract.md": "1aa9349ef1a8db94236a8057ed77dd2802b561eec382451be9a2afdbbbdc6f91",
176
+ "cli-contract.md": "0000fa2079a5dd2c44317612969bafbd6dab0a5031389a3ba0e9157377a1d36e",
177
177
  "conformance/README.md": "5f94a6ac637b7c992fcd7e53d32eed1b8887eeef05eb6ca3b5ec8a0b5045cd21",
178
178
  "conformance/cases/kernel-empty-boot.json": "ad4bbe9d637537625025c8bdb61285b1433568a2544b1ce0248f304ccff8c350",
179
179
  "conformance/cases/plugin-missing-ui-rejected.json": "c6ce8f62a430d662aea33dec8ebf6493be6455037be3114e0d93d0eb57777287",
180
- "conformance/coverage.md": "a06b650c5b5684aec9b508181b3e091bf1aaa0cb45a0f8e76fdfb8f2a9c7b9a7",
180
+ "conformance/coverage.md": "35bac01af3a922ce580deb1f83fc890c668d3d3cf93747f5097340a09303eb43",
181
181
  "conformance/fixtures/plugin-missing-ui/.skill-map/plugins/bad-provider/plugin.json": "4d78af6f12faa9d131e2a19f1dbb8f250baacc525978f3a8c858932b95da4ff6",
182
182
  "conformance/fixtures/plugin-missing-ui/.skill-map/plugins/bad-provider/provider.js": "da40b134d70f8bc8175cfa9c380ecb55d26b2240c8b467f22f3fcfab750c8747",
183
183
  "conformance/fixtures/plugin-missing-ui/notes/example.md": "55767f0aa1b6774546a99f28c58e7b732aa9cfa5dfce8d0326470f7f622f577e",
@@ -204,7 +204,7 @@
204
204
  "schemas/issue.schema.json": "40f6f8abadcce0fd8eac9df27ffcc20b2fc9fda6970142ddb8e7e56b1760b9b1",
205
205
  "schemas/job.schema.json": "ffbdd51c54b487c44eb57fabd07f624ac1030c14ef69b46933c154092853a84c",
206
206
  "schemas/link.schema.json": "0a95a24849a38b9ef5bad5361519a9f9e012b5bc3001289fad29d0851fceff6b",
207
- "schemas/node.schema.json": "f9a0cc5d5a7f581915719e91ae401e46a82688e0865fd3a2eb64bd42798a6b2b",
207
+ "schemas/node.schema.json": "646f2b2c266b5bf1c61b9933c6defdb05565db044a766c4c575c0dcd1e68df57",
208
208
  "schemas/plugins-registry.schema.json": "5ca1d4970ae64f064f05c237a649d9f82d5edbeb7c121ec50cb4aaca13f4bc51",
209
209
  "schemas/project-config.schema.json": "4f5b1ce01446d78ebf524d11c36e0a3ae101e69008c922a2b3f53fccfd1cb87f",
210
210
  "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.13.1",
3
+ "version": "0.14.1",
4
4
  "description": "JSON Schemas, prose contracts, and conformance suite for the skill-map specification.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -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. 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.",
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 — open by design; the **built-in Claude Provider** emits `skill` / `agent` / `command` / `hook` / `note` today, 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,