@skill-map/spec 0.7.0 → 0.7.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +116 -27
  2. package/index.json +2 -2
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,94 @@
1
1
  # Spec changelog
2
2
 
3
+ ## 0.7.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0463a0f: Step 9.4 — plugin author guide + reference plugin + diagnostics polish.
8
+ **Step 9 fully closed** with this changeset.
9
+
10
+ ### Spec — plugin author guide (additive prose)
11
+
12
+ New document at `spec/plugin-author-guide.md` covering:
13
+
14
+ - Discovery roots (`<project>/.skill-map/plugins/`,
15
+ `~/.skill-map/plugins/`, `--plugin-dir <path>`).
16
+ - Manifest fields with the normative schema reference.
17
+ - `specCompat` strategy — narrow ranges pre-`v1.0.0`, `^1.0.0`
18
+ recommendation post-`v1.0.0`.
19
+ - The six extension kinds with one minimal worked example each
20
+ (detector, rule, renderer in full; adapter / audit / action flagged
21
+ for later expansion alongside Step 10).
22
+ - Storage choice (KV vs Dedicated) cross-linking `plugin-kv-api.md`
23
+ and the Step 9.2 triple-protection rule.
24
+ - Execution modes (deterministic / probabilistic) cross-linking
25
+ `architecture.md`.
26
+ - Testkit usage with `runDetectorOnFixture`, `runRuleOnGraph`,
27
+ `runRendererOnGraph`, `makeFakeRunner`.
28
+ - The five plugin statuses (`loaded` / `disabled` / `incompatible-spec`
29
+ / `invalid-manifest` / `load-error`) and how to read them.
30
+ - Stability section (document is stable; widening additions are minor
31
+ bumps; breaking edits are major).
32
+
33
+ `spec/package.json#files` updated to ship the new doc; `spec/index.json`
34
+ regenerated (57 → 58 hashed files). `coverage.md` unchanged because the
35
+ guide is prose, not a schema.
36
+
37
+ ### Reference plugin — `examples/hello-world/`
38
+
39
+ Smallest viable plugin in the principal repo (Arquitecto's pick: in
40
+ the main repo, not separate). One detector (`hello-world-greet`)
41
+ emitting `references` links per `@greet:<name>` token in node bodies.
42
+ Includes:
43
+
44
+ - `plugin.json` declaring one extension and pinning `specCompat: ^1.0.0`.
45
+ - `extensions/greet-detector.mjs` — runtime instance with both
46
+ manifest fields and the `detect` method.
47
+ - `README.md` — what it does, file layout, three-step "try it
48
+ locally" recipe, what's intentionally missing (storage,
49
+ multi-extension, probabilistic mode), pointers for production-grade
50
+ patterns.
51
+ - `test/greet-detector.test.mjs` — four-assertion test using
52
+ `@skill-map/testkit`, runnable via `node --test` with no build step.
53
+
54
+ Verified end-to-end: the example plugin loads cleanly under
55
+ `sm plugins list`, scans contribute its links to the persisted graph,
56
+ and the testkit-based test passes. The example is **not** registered
57
+ as a workspace — it's intentionally standalone so users can copy it.
58
+
59
+ ### CLI — diagnostics polish on `PluginLoader.reason`
60
+
61
+ Each failure-mode reason string now carries an actionable hint:
62
+
63
+ - `invalid-manifest` (JSON parse): names the manifest path, suggests
64
+ validating the JSON.
65
+ - `invalid-manifest` (AJV): names the manifest path AND points at
66
+ `spec/schemas/plugins-registry.schema.json#/$defs/PluginManifest`.
67
+ - `invalid-manifest` (specCompat not a valid range): suggests a range
68
+ shape (`"^1.0.0"`).
69
+ - `incompatible-spec`: suggests two remediations (update the plugin's
70
+ `specCompat`, or pin sm to a compatible spec version).
71
+ - `load-error` (extension file not found): includes the absolute
72
+ resolved path, pointer to `plugin.json#/extensions`.
73
+ - `load-error` (default export missing kind): lists the valid kinds.
74
+ - `load-error` (unknown kind): lists the valid kinds.
75
+ - `load-error` (extension manifest schema fails): names the
76
+ per-kind schema (`spec/schemas/extensions/<kind>.schema.json`).
77
+
78
+ 6 new tests under `test/plugin-loader.test.ts` (`Step 9.4 diagnostics
79
+ polish` describe block) assert each hint shape is present without
80
+ pinning the full text. Test count 437 → **443 cli + 30 testkit = 473**.
81
+
82
+ ### Step 9 closed
83
+
84
+ The four sub-steps — 9.1 (plugin runtime wiring), 9.2 (plugin
85
+ migrations + triple protection), 9.3 (`@skill-map/testkit` workspace),
86
+ 9.4 (author guide + reference plugin + diagnostics polish) — together
87
+ turn `skill-map` plugins from "discovered but inert" into a
88
+ first-class authoring surface with documentation, tests, and a
89
+ working reference. Next step: **Step 10 — job subsystem + first
90
+ probabilistic extension** (wave 2 begins).
91
+
3
92
  ## 0.7.0
4
93
 
5
94
  ### Minor Changes
@@ -165,34 +254,34 @@ job prune` + retention enforcement.
165
254
 
166
255
  Two pieces:
167
256
 
168
- 1. **New built-in rule `link-conflict`** (`src/extensions/rules/link-conflict/`).
169
- Surfaces detector disagreement. Groups links by `(source, target)` and
170
- emits one `warn` Issue per pair where the set of distinct `kind` values
171
- has size ≥ 2. Agreement (single kind across multiple detectors) is
172
- silent — by design, to avoid massive noise on real graphs.
173
- Issue payload (`data`) carries `{ source, target, variants }` where
174
- each `variant` is `{ kind, sources: detectorId[], confidence }`. Variant
175
- sources are deduped + sorted; confidence is the highest across rows
176
- of the same kind (`high` > `medium` > `low`).
177
-
178
- This is the kernel piece of Decision #90 read-time "consumers that
179
- need uniqueness aggregate at read time" — the rule is one such
180
- consumer, on the alarming side. Storage stays untouched (one row
181
- per detector, no merge, no dedup). Severity is `warn`, not `error`:
182
- the rule cannot pick which kind is correct, so per `cli-contract.md`
183
- §Exit codes the verb stays exit 0.
184
-
185
- 2. **`sm show` pretty link aggregation** (`src/cli/commands/show.ts`).
186
- The human renderer now groups `linksOut` / `linksIn` by `(endpoint,
257
+ 1. **New built-in rule `link-conflict`** (`src/extensions/rules/link-conflict/`).
258
+ Surfaces detector disagreement. Groups links by `(source, target)` and
259
+ emits one `warn` Issue per pair where the set of distinct `kind` values
260
+ has size ≥ 2. Agreement (single kind across multiple detectors) is
261
+ silent — by design, to avoid massive noise on real graphs.
262
+ Issue payload (`data`) carries `{ source, target, variants }` where
263
+ each `variant` is `{ kind, sources: detectorId[], confidence }`. Variant
264
+ sources are deduped + sorted; confidence is the highest across rows
265
+ of the same kind (`high` > `medium` > `low`).
266
+
267
+ This is the kernel piece of Decision #90 read-time "consumers that
268
+ need uniqueness aggregate at read time" — the rule is one such
269
+ consumer, on the alarming side. Storage stays untouched (one row
270
+ per detector, no merge, no dedup). Severity is `warn`, not `error`:
271
+ the rule cannot pick which kind is correct, so per `cli-contract.md`
272
+ §Exit codes the verb stays exit 0.
273
+
274
+ 2. **`sm show` pretty link aggregation** (`src/cli/commands/show.ts`).
275
+ The human renderer now groups `linksOut` / `linksIn` by `(endpoint,
187
276
  kind, normalizedTrigger)` and prints one row per group with the
188
- union of detector ids in a `sources:` field. The section header
189
- reports both the raw row count and the unique-after-grouping count
190
- (`Links out (12, 9 unique)`). When N > 1 detector emits the same
191
- logical link, the row also gets a `(×N)` suffix.
192
-
193
- `--json` output is byte-identical to before — raw rows, no merge.
194
- Storage is byte-identical to before. The grouping is purely a
195
- read-time presentation choice for human eyes.
277
+ union of detector ids in a `sources:` field. The section header
278
+ reports both the raw row count and the unique-after-grouping count
279
+ (`Links out (12, 9 unique)`). When N > 1 detector emits the same
280
+ logical link, the row also gets a `(×N)` suffix.
281
+
282
+ `--json` output is byte-identical to before — raw rows, no merge.
283
+ Storage is byte-identical to before. The grouping is purely a
284
+ read-time presentation choice for human eyes.
196
285
 
197
286
  **Spec changes (patch)**:
198
287
 
package/index.json CHANGED
@@ -190,11 +190,11 @@
190
190
  }
191
191
  ]
192
192
  },
193
- "specPackageVersion": "0.7.0",
193
+ "specPackageVersion": "0.7.1",
194
194
  "integrity": {
195
195
  "algorithm": "sha256",
196
196
  "files": {
197
- "CHANGELOG.md": "a6a7a44f05e2344c2a5eb3a3369bc615b86fe0d1825c72309a93bf8fa090f1ce",
197
+ "CHANGELOG.md": "11a026e881126ac96703de9e3e4e3ddd9ebf7b776ba4d2197ed8c68dce5e6d98",
198
198
  "README.md": "8bd57e02d9a9d3f0a4efd18c0f0bd1f4bbe13eb206add0317659e48eab435e7e",
199
199
  "architecture.md": "0ebaacef9e57206bc0dde27ff44a02e0a7def9ae9ceba2f27053b31ff708708b",
200
200
  "cli-contract.md": "12ca455496d48a61fc83888808433acf1470f09c261cf1161375b01f0f3f85c4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skill-map/spec",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "JSON Schemas, prose contracts, and conformance suite for the skill-map specification.",
5
5
  "license": "MIT",
6
6
  "type": "module",