@skill-map/spec 0.1.2 → 0.2.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 +20 -0
- package/README.md +4 -4
- package/architecture.md +2 -2
- package/cli-contract.md +1 -1
- package/db-schema.md +1 -1
- package/index.json +11 -11
- package/{dispatch-lifecycle.md → job-lifecycle.md} +1 -1
- package/package.json +2 -2
- package/prompt-preamble.md +1 -1
- package/schemas/job.schema.json +1 -1
- package/versioning.md +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Spec changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b827431: Clarify the comment in `spec/README.md` §"Use — load a schema": `specIndex.specVersion` is the payload shape version baked into `index.json`, not the npm package version. The two may drift — bumping the npm package does not bump `specVersion` unless the shape of `index.json` itself changes.
|
|
8
|
+
|
|
9
|
+
## 0.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 79aed4d: **Breaking**: rename `dispatch-lifecycle.md` → `job-lifecycle.md`.
|
|
14
|
+
|
|
15
|
+
ROADMAP decision #30 renamed the domain term "dispatch" to "job" (tables `state_jobs`, artifact "job file"). The spec prose filename had lagged behind; this change closes that gap.
|
|
16
|
+
|
|
17
|
+
All internal references updated: `architecture.md`, `cli-contract.md`, `db-schema.md`, `prompt-preamble.md`, `versioning.md`, `schemas/job.schema.json`, `README.md`, and `package.json` `files` list. `index.json` regenerated.
|
|
18
|
+
|
|
19
|
+
**Migration**: any external consumer that links to `spec/dispatch-lifecycle.md` (by URL or filename) MUST update to `spec/job-lifecycle.md`. The canonical URL becomes `https://skill-map.dev/spec/v0/job-lifecycle.md`.
|
|
20
|
+
|
|
21
|
+
Classification: breaking change on a normative prose doc. Per `versioning.md` §Pre-1.0, minor bumps MAY contain breaking changes while the spec is `0.Y.Z`.
|
|
22
|
+
|
|
3
23
|
## 0.1.2
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ This document is the **source of truth**. The reference implementation under `..
|
|
|
10
10
|
- The **extension contract**: six extension kinds (detector, adapter, rule, action, audit, renderer) with their input/output shapes.
|
|
11
11
|
- The **CLI contract**: verb set, flags, exit codes, JSON introspection.
|
|
12
12
|
- The **persistence contract**: table catalog owned by the kernel, plugin key-value API.
|
|
13
|
-
- The **job contract**: lifecycle states, event stream, prompt preamble,
|
|
13
|
+
- The **job contract**: lifecycle states, event stream, prompt preamble, submit/claim/record semantics.
|
|
14
14
|
- The **frontmatter standard**: base fields and per-kind extensions.
|
|
15
15
|
- The **summary standard**: shape of action-produced summaries per kind.
|
|
16
16
|
- The **plugin manifest**: metadata, spec-compat range, storage mode, security declarations.
|
|
@@ -47,7 +47,7 @@ spec/
|
|
|
47
47
|
├── prompt-preamble.md ← canonical injection-mitigation preamble (Step 0a phase 3)
|
|
48
48
|
├── db-schema.md ← table catalog (kernel-owned) (Step 0a phase 3)
|
|
49
49
|
├── plugin-kv-api.md ← ctx.store contract for storage mode A (Step 0a phase 3)
|
|
50
|
-
├──
|
|
50
|
+
├── job-lifecycle.md ← queued → running → completed | failed (Step 0a phase 3)
|
|
51
51
|
├── schemas/ ← JSON Schemas (Step 0a phase 2)
|
|
52
52
|
│ ├── node.schema.json
|
|
53
53
|
│ ├── link.schema.json
|
|
@@ -84,7 +84,7 @@ spec/
|
|
|
84
84
|
- **Building a custom detector, rule, or renderer?** Read `architecture.md`, then the relevant schema.
|
|
85
85
|
- **Building an alternative CLI implementation?** Read `cli-contract.md` and run `conformance/`.
|
|
86
86
|
- **Integrating a new platform (adapter)?** Read `architecture.md` §adapters, then the Claude adapter source in `../src/extensions/adapters/claude/` as a worked example.
|
|
87
|
-
- **Shipping a job-running runner?** Read `job-events.md`, `
|
|
87
|
+
- **Shipping a job-running runner?** Read `job-events.md`, `job-lifecycle.md`, `prompt-preamble.md`.
|
|
88
88
|
|
|
89
89
|
## Relationship to the reference implementation
|
|
90
90
|
|
|
@@ -110,7 +110,7 @@ npm i @skill-map/spec
|
|
|
110
110
|
import specIndex from '@skill-map/spec';
|
|
111
111
|
import nodeSchema from '@skill-map/spec/schemas/node.schema.json' with { type: 'json' };
|
|
112
112
|
|
|
113
|
-
console.log(specIndex.specVersion); // → "0.0.1" (payload version
|
|
113
|
+
console.log(specIndex.specVersion); // → "0.0.1" (payload shape version; distinct from the npm package version)
|
|
114
114
|
console.log(specIndex.integrity.algorithm); // → "sha256"
|
|
115
115
|
console.log(nodeSchema.$id); // → "https://skill-map.dev/spec/v0/node.schema.json"
|
|
116
116
|
```
|
package/architecture.md
CHANGED
|
@@ -47,7 +47,7 @@ An implementation MUST expose these five ports. Each is an interface (TypeScript
|
|
|
47
47
|
|
|
48
48
|
Persistence for all kernel tables in all three zones (`scan_*`, `state_*`, `config_*`). Exposes typed repositories, not raw SQL. Implementations MAY back this with SQLite, Postgres, in-memory, or anything else, as long as:
|
|
49
49
|
|
|
50
|
-
- Transactional semantics for atomic claim (see `
|
|
50
|
+
- Transactional semantics for atomic claim (see `job-lifecycle.md`).
|
|
51
51
|
- Migration application with `PRAGMA user_version`-equivalent tracking.
|
|
52
52
|
- Read isolation sufficient to avoid phantom reads across a single scan write.
|
|
53
53
|
|
|
@@ -77,7 +77,7 @@ Two reference implementations:
|
|
|
77
77
|
- `ClaudeCliRunner` — subprocess `claude -p < jobfile`.
|
|
78
78
|
- `MockRunner` — deterministic fake for tests.
|
|
79
79
|
|
|
80
|
-
The Skill runner does NOT implement this port: it runs inside an agent session and closes jobs via `sm record` callback. See `
|
|
80
|
+
The Skill runner does NOT implement this port: it runs inside an agent session and closes jobs via `sm record` callback. See `job-lifecycle.md`.
|
|
81
81
|
|
|
82
82
|
### `ProgressEmitterPort`
|
|
83
83
|
|
package/cli-contract.md
CHANGED
|
@@ -186,7 +186,7 @@ Actions are not invoked via `sm actions`; invocation is via `sm job submit` (see
|
|
|
186
186
|
|
|
187
187
|
### Jobs
|
|
188
188
|
|
|
189
|
-
See `
|
|
189
|
+
See `job-lifecycle.md` for the state machine; this table is the CLI surface.
|
|
190
190
|
|
|
191
191
|
| Command | Purpose |
|
|
192
192
|
|---|---|
|
package/db-schema.md
CHANGED
|
@@ -4,7 +4,7 @@ Normative catalog of tables owned by the kernel. Plugins MAY add their own table
|
|
|
4
4
|
|
|
5
5
|
The spec assumes a relational, SQL-like store but is **engine-agnostic**. The reference implementation uses SQLite (`node:sqlite`) + Kysely + `CamelCasePlugin`. Alternative backends (Postgres, DuckDB, in-memory) are permitted as long as:
|
|
6
6
|
|
|
7
|
-
- Atomic single-statement transitions are available for the job claim (see `
|
|
7
|
+
- Atomic single-statement transitions are available for the job claim (see `job-lifecycle.md`).
|
|
8
8
|
- Migrations track applied versions per scope.
|
|
9
9
|
- Read isolation avoids phantom reads inside a single scan write.
|
|
10
10
|
|
package/index.json
CHANGED
|
@@ -116,8 +116,8 @@
|
|
|
116
116
|
"title": "CLI contract"
|
|
117
117
|
},
|
|
118
118
|
{
|
|
119
|
-
"file": "
|
|
120
|
-
"title": "
|
|
119
|
+
"file": "job-lifecycle.md",
|
|
120
|
+
"title": "Job lifecycle"
|
|
121
121
|
},
|
|
122
122
|
{
|
|
123
123
|
"file": "job-events.md",
|
|
@@ -159,10 +159,10 @@
|
|
|
159
159
|
"integrity": {
|
|
160
160
|
"algorithm": "sha256",
|
|
161
161
|
"files": {
|
|
162
|
-
"CHANGELOG.md": "
|
|
163
|
-
"README.md": "
|
|
164
|
-
"architecture.md": "
|
|
165
|
-
"cli-contract.md": "
|
|
162
|
+
"CHANGELOG.md": "b5c886cb988ff7469081642cf63d030387f23465a07856b5d4dcd483e944035a",
|
|
163
|
+
"README.md": "69394fcbe362ae3c04bd4fbf4bfda8d06d9626fcedb5d789dda671e76e760e80",
|
|
164
|
+
"architecture.md": "6c25d25eabee7473fa25aa7884f1d3e3e8bed70eda3d688f7755ae9d5d4b0fd1",
|
|
165
|
+
"cli-contract.md": "321f625a9fbfdccf16f226dc76ca158bfb3392da5f96fc7b8faab4aa952a284a",
|
|
166
166
|
"conformance/README.md": "4e41ff823b55ce3c274a033c5152ae0b2759fc714a714d7815593d8be84c8a4c",
|
|
167
167
|
"conformance/cases/basic-scan.json": "24623da0cad8c8c54b3ff9b09820ea1276fe8b8f0fc680bf6e8abeb4edb8e424",
|
|
168
168
|
"conformance/cases/kernel-empty-boot.json": "175524674b14d993d29f10080d7697074b3a2eee25b359ff903344d73c6acc98",
|
|
@@ -172,12 +172,12 @@
|
|
|
172
172
|
"conformance/fixtures/minimal-claude/notes/architecture.md": "5a7e6fdbb1556733dacebad63758057dc1e19090b5a983292c0c65e90b98bcf1",
|
|
173
173
|
"conformance/fixtures/minimal-claude/skills/hello.md": "8598074020430f294ff1eac39876302448f004b6c48446d453092159319bcbee",
|
|
174
174
|
"conformance/fixtures/preamble-v1.txt": "1e0aeef224b64477bdc13a949c3ad402e68249caf499ecdba1302371677c068b",
|
|
175
|
-
"db-schema.md": "
|
|
176
|
-
"dispatch-lifecycle.md": "e2367bb51c638a9fbb20eec35c0603b2c4adb3668add50fec7be676521798f16",
|
|
175
|
+
"db-schema.md": "d2dfd52c2bc2a6b00ec6c89acc09240b409a6cfe29a06394351e6de5bc1de651",
|
|
177
176
|
"interfaces/security-scanner.md": "468f8ee412594b14b389c36cefa9ca75a5dec652adbf03ab8bbc7f57ca980253",
|
|
178
177
|
"job-events.md": "947d2124acc29f78df8f493549f0d1bdff8159caf621fe8307423c90d7d05f58",
|
|
178
|
+
"job-lifecycle.md": "ef3e96357784088e253c5b47ea4e1d4b04a5fdd1b3efb7ab55d70d006ed7e09f",
|
|
179
179
|
"plugin-kv-api.md": "fb7cbaea6e18ad696e108fd6ec7a118dc9be6ffef4cf08cc92e511feafa9be30",
|
|
180
|
-
"prompt-preamble.md": "
|
|
180
|
+
"prompt-preamble.md": "9b7478ddce0a77043983f35932677d702319348048fe5d6b1c60257bd1c9f605",
|
|
181
181
|
"schemas/conformance-case.schema.json": "2740874e00269de6d8121300339401d0283197b6d97dcd77538ec5d108b14de2",
|
|
182
182
|
"schemas/execution-record.schema.json": "ec0f3acf1d0ce099c059d73eb434936bfd1bcf12023693bd572efb2a7352faa6",
|
|
183
183
|
"schemas/frontmatter/agent.schema.json": "3c7ff5e485c1edd40d643ba0e0669fb920a511dfc174b91caff63473585b993d",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"schemas/frontmatter/note.schema.json": "9806b371193c802803638682f9a625f8277152ad3ef68939eb5f05fff2ef65f4",
|
|
188
188
|
"schemas/frontmatter/skill.schema.json": "b99b8ab23bee01333b4a04946cd9fc13d373d827ef6ddfc7d058daf637f2f80b",
|
|
189
189
|
"schemas/issue.schema.json": "40f6f8abadcce0fd8eac9df27ffcc20b2fc9fda6970142ddb8e7e56b1760b9b1",
|
|
190
|
-
"schemas/job.schema.json": "
|
|
190
|
+
"schemas/job.schema.json": "582999899f8846f70c4d745d2813e53b97a4f5ccd3d8d163eeb68b201e7124e4",
|
|
191
191
|
"schemas/link.schema.json": "3e92f5c9def61a857a2c7b22846d82b988157de083463615144ddc92403a489e",
|
|
192
192
|
"schemas/node.schema.json": "14f345fac450f5728c895d1b878e0015eabb9d72ba9da4a8d2236c82933d3fcf",
|
|
193
193
|
"schemas/plugins-registry.schema.json": "69388548a51496f2597145154911a208bef12d5c805ed71901e236525dccadf9",
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
"schemas/summaries/hook.schema.json": "36f876f3b1a60d45be97a0848c79fd18744b434dfdcefc366f033b253d56268c",
|
|
200
200
|
"schemas/summaries/note.schema.json": "ae510f3ee1b6092c1061625e425c9bb7de9c9caa3f3774770c148f658d505753",
|
|
201
201
|
"schemas/summaries/skill.schema.json": "f01bab92c51d64ee23e61587e42cf0dc5b37a2f518f5b12b3d1d456390338aa8",
|
|
202
|
-
"versioning.md": "
|
|
202
|
+
"versioning.md": "37e42e323d0bfed647b72a3bd4ffc1ddd3f71b74dda1ba56025762518f070ccb"
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skill-map/spec",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "JSON Schemas, prose contracts, and conformance suite for the skill-map specification.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"versioning.md",
|
|
34
34
|
"architecture.md",
|
|
35
35
|
"cli-contract.md",
|
|
36
|
-
"
|
|
36
|
+
"job-lifecycle.md",
|
|
37
37
|
"job-events.md",
|
|
38
38
|
"prompt-preamble.md",
|
|
39
39
|
"db-schema.md",
|
package/prompt-preamble.md
CHANGED
|
@@ -102,7 +102,7 @@ The preamble establishes a promise from the model:
|
|
|
102
102
|
- `safety` MUST conform to `schemas/report-base.schema.json#/properties/safety`.
|
|
103
103
|
- `confidence` MUST be a number in `[0.0, 1.0]`.
|
|
104
104
|
|
|
105
|
-
The kernel validates every report against the action's declared schema (which MUST extend `report-base.schema.json`). A report that lacks `safety` or `confidence`, or whose values are of the wrong shape, is rejected; the job transitions to `failed` with reason `report-invalid` (see `
|
|
105
|
+
The kernel validates every report against the action's declared schema (which MUST extend `report-base.schema.json`). A report that lacks `safety` or `confidence`, or whose values are of the wrong shape, is rejected; the job transitions to `failed` with reason `report-invalid` (see `job-lifecycle.md`).
|
|
106
106
|
|
|
107
107
|
Implementations MUST NOT tolerate the absence of `safety`. If a model returns a report without it, the failure is the runner's problem to surface, not the kernel's to tolerate.
|
|
108
108
|
|
package/schemas/job.schema.json
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"status": {
|
|
41
41
|
"type": "string",
|
|
42
42
|
"enum": ["queued", "running", "completed", "failed"],
|
|
43
|
-
"description": "Lifecycle state. See `
|
|
43
|
+
"description": "Lifecycle state. See `job-lifecycle.md` for allowed transitions."
|
|
44
44
|
},
|
|
45
45
|
"failureReason": {
|
|
46
46
|
"type": ["string", "null"],
|
package/versioning.md
CHANGED
|
@@ -28,7 +28,7 @@ Rule of thumb: if a strict v1 implementation could fail a v1.X conformance run,
|
|
|
28
28
|
All of the following are normative and governed by this policy:
|
|
29
29
|
|
|
30
30
|
- Every JSON Schema in `schemas/` (fields, types, required, enums, defaults, `additionalProperties`).
|
|
31
|
-
- Every MUST / SHOULD / MAY statement in prose documents (`architecture.md`, `cli-contract.md`, `job-events.md`, `prompt-preamble.md`, `db-schema.md`, `plugin-kv-api.md`, `
|
|
31
|
+
- Every MUST / SHOULD / MAY statement in prose documents (`architecture.md`, `cli-contract.md`, `job-events.md`, `prompt-preamble.md`, `db-schema.md`, `plugin-kv-api.md`, `job-lifecycle.md`).
|
|
32
32
|
- Exit codes, verb names, required flags, canonical error messages marked "normative".
|
|
33
33
|
- Conformance fixtures and cases — removing or tightening a case is major.
|
|
34
34
|
|