release-skill 0.4.2 → 0.5.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 (91) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +44 -0
  7. package/INSTALL.md +2 -2
  8. package/INSTALL.zh-CN.md +2 -2
  9. package/README.md +10 -7
  10. package/README.zh-CN.md +10 -7
  11. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/error-codes.json +154 -0
  14. package/adapters/claude/bin/kernel-protocol.json +60 -0
  15. package/adapters/claude/bin/registry.json +179 -0
  16. package/adapters/claude/bin/release-skill.bundle.mjs +37609 -23014
  17. package/adapters/claude/bin/rules.json +104 -0
  18. package/adapters/claude/skills/release-assess/SKILL.md +2 -0
  19. package/adapters/claude/skills/release-help/SKILL.md +3 -1
  20. package/adapters/claude/skills/release-prepare/SKILL.md +2 -2
  21. package/adapters/claude/skills/release-verify/SKILL.md +2 -0
  22. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  23. package/adapters/codex/bin/error-codes.json +154 -0
  24. package/adapters/codex/bin/kernel-protocol.json +60 -0
  25. package/adapters/codex/bin/registry.json +179 -0
  26. package/adapters/codex/bin/release-skill.bundle.mjs +37609 -23014
  27. package/adapters/codex/bin/rules.json +104 -0
  28. package/adapters/codex/skills/release-assess/SKILL.md +2 -0
  29. package/adapters/codex/skills/release-help/SKILL.md +3 -1
  30. package/adapters/codex/skills/release-prepare/SKILL.md +2 -2
  31. package/adapters/codex/skills/release-verify/SKILL.md +2 -0
  32. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  33. package/adapters/kimi/bin/error-codes.json +154 -0
  34. package/adapters/kimi/bin/kernel-protocol.json +60 -0
  35. package/adapters/kimi/bin/registry.json +179 -0
  36. package/adapters/kimi/bin/release-skill.bundle.mjs +37609 -23014
  37. package/adapters/kimi/bin/rules.json +104 -0
  38. package/adapters/kimi/skills/release-assess/SKILL.md +2 -0
  39. package/adapters/kimi/skills/release-help/SKILL.md +3 -1
  40. package/adapters/kimi/skills/release-prepare/SKILL.md +2 -2
  41. package/adapters/kimi/skills/release-verify/SKILL.md +2 -0
  42. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  43. package/adapters/workbuddy/bin/error-codes.json +154 -0
  44. package/adapters/workbuddy/bin/kernel-protocol.json +60 -0
  45. package/adapters/workbuddy/bin/registry.json +179 -0
  46. package/adapters/workbuddy/bin/release-skill.bundle.mjs +37609 -23014
  47. package/adapters/workbuddy/bin/rules.json +104 -0
  48. package/adapters/workbuddy/skills/release-assess/SKILL.md +2 -0
  49. package/adapters/workbuddy/skills/release-help/SKILL.md +3 -1
  50. package/adapters/workbuddy/skills/release-prepare/SKILL.md +2 -2
  51. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -0
  52. package/bin/error-codes.json +154 -0
  53. package/bin/kernel-protocol.json +60 -0
  54. package/bin/registry.json +179 -0
  55. package/bin/release-skill.bundle.mjs +37609 -23014
  56. package/bin/rules.json +104 -0
  57. package/package.json +3 -1
  58. package/scripts/build-bundle.mjs +159 -5
  59. package/scripts/sync-public-files.mjs +5 -0
  60. package/skills/release-assess/SKILL.md +2 -0
  61. package/skills/release-help/SKILL.md +3 -1
  62. package/skills/release-prepare/SKILL.md +2 -2
  63. package/skills/release-verify/SKILL.md +2 -0
  64. package/skills-src/release-assess/SKILL.md +2 -0
  65. package/skills-src/release-help/SKILL.md +3 -1
  66. package/skills-src/release-prepare/SKILL.md +2 -2
  67. package/skills-src/release-verify/SKILL.md +2 -0
  68. package/src/adapters/contract.mjs +10 -10
  69. package/src/adapters/plugin-marketplace.mjs +48 -4
  70. package/src/adapters/push-snapshot.mjs +12 -4
  71. package/src/artifacts/entry.mjs +4 -1
  72. package/src/artifacts/producer-registry.mjs +9 -6
  73. package/src/artifacts/project-lock.mjs +324 -214
  74. package/src/commands/assess.mjs +231 -2
  75. package/src/commands/attest.mjs +11 -0
  76. package/src/commands/hooks.mjs +6 -1
  77. package/src/commands/prepare.mjs +83 -1
  78. package/src/core/approval.mjs +5 -2
  79. package/src/core/baseline.mjs +11 -1
  80. package/src/core/digest.mjs +47 -12
  81. package/src/core/foundation-inflight.mjs +46 -0
  82. package/src/core/hook-cache.mjs +3 -0
  83. package/src/core/installation-contract.mjs +4 -2
  84. package/src/core/plan.mjs +42 -29
  85. package/src/core/run.mjs +22 -36
  86. package/src/core/skill-resource-closure.mjs +6 -4
  87. package/src/core/trusted-resource.mjs +64 -15
  88. package/src/producers/build-adapters.mjs +27 -9
  89. package/src/producers/render-public-assets.mjs +12 -7
  90. package/src/producers/sync-skills.mjs +12 -7
  91. package/src/snapshot/public-map.mjs +10 -2
@@ -0,0 +1,104 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "skill-family.contracts.rules",
4
+ "contractsVersion": "1.5.0",
5
+ "budget": {
6
+ "firstVersionMax": 20,
7
+ "absoluteMax": 30,
8
+ "note": "Mechanical gate: runChecks fails with SFC1008 when the mandatory rule count exceeds firstVersionMax, and fails harder when it exceeds absoluteMax. The count includes every rule with severity mandatory, including budget rules themselves."
9
+ },
10
+ "checkTypes": [
11
+ {
12
+ "type": "schema.compile",
13
+ "description": "Each registered schema must compile under its declared dialect; an uncompilable schema fails with SFC1012."
14
+ },
15
+ {
16
+ "type": "schema.unique-id",
17
+ "description": "No two registered schemas may share a $id; duplicates fail with SFC1003."
18
+ },
19
+ {
20
+ "type": "protocol.unique-name",
21
+ "description": "No two registered protocols may share the same name and version; duplicates fail with SFC1004."
22
+ },
23
+ {
24
+ "type": "schema.ref-resolves",
25
+ "description": "Every $ref in registered schemas must resolve within the registered schema set; unresolved targets fail with SFC1005."
26
+ },
27
+ {
28
+ "type": "schema.dialect-declared",
29
+ "description": "Every registered schema must declare a dialect from the supported set, consistent with its $schema URI; violations fail with SFC1006."
30
+ },
31
+ {
32
+ "type": "fixture.positive-passes",
33
+ "description": "Every fixture expecting validity must validate against its target schema under its declared dialect and policy; mismatches fail with SFC1010."
34
+ },
35
+ {
36
+ "type": "fixture.negative-coded",
37
+ "description": "Every fixture expecting invalidity must fail with exactly its declared stable error code; mismatches fail with SFC1010."
38
+ },
39
+ {
40
+ "type": "error-code.registered",
41
+ "description": "Every error code declared in fixture expectations must exist in the frozen error registry; unknown codes fail with SFC1009."
42
+ },
43
+ {
44
+ "type": "rules.budget",
45
+ "description": "The mandatory rule count must stay within the first-version budget (and never exceed the absolute cap); excess fails with SFC1008."
46
+ }
47
+ ],
48
+ "rules": [
49
+ {
50
+ "ruleId": "CR-001",
51
+ "severity": "mandatory",
52
+ "checkType": "schema.compile",
53
+ "target": { "registry": "schemas" }
54
+ },
55
+ {
56
+ "ruleId": "CR-006",
57
+ "severity": "mandatory",
58
+ "checkType": "schema.unique-id",
59
+ "target": { "registry": "schemas" }
60
+ },
61
+ {
62
+ "ruleId": "CR-007",
63
+ "severity": "mandatory",
64
+ "checkType": "protocol.unique-name",
65
+ "target": { "registry": "protocols" }
66
+ },
67
+ {
68
+ "ruleId": "CR-008",
69
+ "severity": "mandatory",
70
+ "checkType": "schema.ref-resolves",
71
+ "target": { "registry": "schemas" }
72
+ },
73
+ {
74
+ "ruleId": "CR-009",
75
+ "severity": "mandatory",
76
+ "checkType": "schema.dialect-declared",
77
+ "target": { "registry": "schemas" }
78
+ },
79
+ {
80
+ "ruleId": "CR-010",
81
+ "severity": "mandatory",
82
+ "checkType": "fixture.positive-passes",
83
+ "target": { "fixtures": "expect-valid" }
84
+ },
85
+ {
86
+ "ruleId": "CR-011",
87
+ "severity": "mandatory",
88
+ "checkType": "fixture.negative-coded",
89
+ "target": { "fixtures": "expect-invalid" }
90
+ },
91
+ {
92
+ "ruleId": "CR-012",
93
+ "severity": "mandatory",
94
+ "checkType": "error-code.registered",
95
+ "target": { "references": "fixture-expectations" }
96
+ },
97
+ {
98
+ "ruleId": "CR-013",
99
+ "severity": "mandatory",
100
+ "checkType": "rules.budget",
101
+ "target": { "budget": "firstVersionMax" }
102
+ }
103
+ ]
104
+ }
@@ -44,6 +44,8 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offlin
44
44
 
45
45
  offline assess 不访问 GitHub/npm 认证,因此不会以顶层 `AUTH_MISSING` 作为正常诊断结果;生产认证缺口由 help 的 `readiness.productionPublish` 和发布前在线门禁报告。
46
46
 
47
+ 在线模式下 npm 版本检查区分两种失败:registry 明确返回 E404/ETARGET 才算「版本不存在,无 gap」;网络、认证、超时等检查失败会以 `NPM_VERSION_CHECK_FAILED`(warning 级 gap)显式报告,不得把检查失败当作「版本未发布」。
48
+
47
49
  重试时只保留最新结构化错误码和失败门,不沿用早期猜测。
48
50
 
49
51
  ## 后续引导
@@ -38,9 +38,11 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offlin
38
38
  # 日常发布快速路径:仅在发布前确认一次可读计划摘要,状态文件可恢复
39
39
  node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> --target-version <version> --json
40
40
  # 开发阶段执行声明 hooks 并生成 prepare 可复用的内容绑定收据
41
+ # 配置时刻即授权(FM-16 处置 A):hook 是任意本地进程、无隔离、触发前无确认点,
41
42
  # 命令调用本身即授权执行配置中的 hooks
42
43
  node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" hooks validate --root <path> --json
43
44
  # 仅旧冻结计划兼容:记录历史 Kimi/CodeBuddy 人工证明
45
+ # (本地自声明收据,证明力弱:--actor 仅非空字符串校验、无外部签名核验;新计划不适用)
44
46
  node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" attest --root <path> \
45
47
  --platform <kimi|codebuddy> --plugin <id> --result <passed|failed> --actor <person> --json
46
48
  # 发布文档刷新:默认只读演练
@@ -59,7 +61,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
59
61
  - **只读演练**:`docs refresh --unit <id> --json` 输出逐文件相对路径、locale、新旧摘要、`version`、`locales`、`inputDigest`、`refreshDigest` 和 `nextCommand.argv`;候选无变化时 `status: "clean"`。
60
62
  - **确认写入**:必须同时提供 `--write`、精确 `--confirm-refresh <refreshDigest>` 和 `--ack-local-document-write`,全部目标作为一个事务提交;成功后立即复演必须为 `clean`。
61
63
 
62
- **授权边界**:本地发布文档写入授权只覆盖声明的本地文档目标,不是 Git 提交、push、publish 或安装的授权。hook/gate 由对应命令调用直接授权。写入后必须审阅、提交,再重新 prepare。
64
+ **授权边界**:本地发布文档写入授权只覆盖声明的本地文档目标,不是 Git 提交、push、publish 或安装的授权。hook/gate 由对应命令调用直接授权——在 project.yaml 配置 hook 即完成授权(配置时刻即授权契约,FM-16 处置 A):hook 是任意本地进程、无文件系统/网络隔离、触发前无确认点,配置者须对其内容负责;恢复触发前强制确认门为后续加固项。写入后必须审阅、提交,再重新 prepare。
63
65
 
64
66
  ## 故障路由
65
67
 
@@ -11,9 +11,9 @@ description: Freeze an immutable release plan with local configuration, document
11
11
 
12
12
  ## 职责与边界
13
13
 
14
- 运行项目构建/测试 hook,生成公开快照并扫描泄漏,冻结不可变发布计划。prepare 自身不调用发布 adapter,但会执行用户配置的 hook。hook 是任意本地进程,不受文件系统/网络隔离,可能产生项目目录外的副作用或远端写入。
14
+ 运行项目构建/测试 hook,生成公开快照并扫描泄漏,冻结不可变发布计划。prepare 自身不调用发布 adapter,但会执行用户配置的 hook。
15
15
 
16
- **Hook Gate 执行**: 命令调用本身即授权执行已配置的 hook 和 gate,不再设置额外人工授权环节。
16
+ **Hook 授权契约(配置时刻即授权,FM-16 处置 A)**: hook 是任意本地进程——在 `.release-skill/project.yaml` 中配置 hook 命令即完成授权,构成「配置时刻即授权」的显式契约。hook 不提供沙箱、无文件系统/网络隔离、触发前无确认点,命令调用本身即授权执行已配置的 hook 和 gate,不再设置额外人工授权环节;hook 可能产生项目目录外的副作用或远端写入,配置者须对其内容负责。恢复「触发前强制确认门」属于后续加固项(属设计变更,需随新版本引入),当前版本不提供该确认门。
17
17
 
18
18
  **阶段通过规则**: 本阶段的通过只能由 CLI exit code 0 和结构化状态码 `PREPARED` 确认。Agent 无权自行宣布计划冻结成功。
19
19
 
@@ -19,6 +19,8 @@ verify 只接受 `PUBLISHED` 状态的源 run;`VERIFIED` 是终态,不会再
19
19
 
20
20
  验证远端所有自动化 action 的实际状态与冻结计划一致。执行精确 `<package>@<version>` npm 安装到隔离目录,验证包名、版本、静态入口闭包,并在配置时验证 bin 路径安全和 CLI 烟雾输出。对 Claude/Codex marketplace distribution 执行全新隔离消费者安装验证。新计划中的 Kimi/CodeBuddy 安装只返回 `manualFollowUps`,明确标记 `verifiedBySystem: false`,不阻塞 `VERIFIED`;缺少该策略字段的旧冻结计划继续走历史 attestation 兼容路径。
21
21
 
22
+ **attestation 证明力边界**: `attest` 命令记录的旧计划兼容人工证明(`humanConfirmed: true` → `PASSED_MANUAL`)是本地自声明收据,不是签名见证:`--actor` 仅做非空字符串校验,无外部签名或身份核验,任何能运行 CLI 的进程都能自称任意 actor;伪造收据需写 `.release-skill` authority 目录,与直接改写收据文件属同一信任边界。因此旧兼容路径的人工证明只用于旧冻结计划收尾,不构成独立可审计的人工见证。新计划的 Kimi/CodeBuddy 安装一律走 `manualFollowUps`(`verifiedBySystem: false`),不参与 `VERIFIED` 终态判定。
23
+
22
24
  **阶段通过规则**: 只有 CLI exit code 0 和结构化状态码 `VERIFIED` 才是完整终态。
23
25
 
24
26
  **源 run 要求**: `--run` 必需;源 run 的所有 checkpoint 必须为 succeeded 或 skipped。
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "defaultPrompt": [
21
21
  "Assess this project for release readiness.",
22
- "Prepare a release plan for version 0.4.2.",
22
+ "Prepare a release plan for version 0.5.1.",
23
23
  "Help me understand the release workflow."
24
24
  ]
25
25
  }
@@ -0,0 +1,154 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "skill-family.contracts.error-codes",
4
+ "contractsVersion": "1.5.0",
5
+ "policy": {
6
+ "format": "^SFC[0-9]{4}$",
7
+ "ranges": [
8
+ {
9
+ "prefix": "SFC1",
10
+ "category": "contract",
11
+ "note": "Contracts authority errors: schemas, registry, dialects, rules, fixtures."
12
+ },
13
+ {
14
+ "prefix": "SFC2",
15
+ "category": "kernel",
16
+ "note": "Kernel protocol operation errors."
17
+ },
18
+ {
19
+ "prefix": "SFC3",
20
+ "category": "report",
21
+ "note": "Report contract errors: digest binding, mandatory elements, fact drift. Style findings are never coded here; they are advisory output of the report check, not errors."
22
+ }
23
+ ],
24
+ "stability": "Codes are append-only. A frozen code is never reused for a different meaning; a deprecated code stays reserved. New codes require a contracts change."
25
+ },
26
+ "codes": [
27
+ {
28
+ "code": "SFC1001",
29
+ "name": "SCHEMA_VALIDATION_FAILED",
30
+ "category": "contract",
31
+ "stableSince": "1.0.0",
32
+ "meaning": "A document failed validation against its registered schema under the declared dialect and policy."
33
+ },
34
+ {
35
+ "code": "SFC1002",
36
+ "name": "UNKNOWN_SCHEMA_ID",
37
+ "category": "contract",
38
+ "stableSince": "1.0.0",
39
+ "meaning": "The referenced $id is not present in the schema registry."
40
+ },
41
+ {
42
+ "code": "SFC1003",
43
+ "name": "DUPLICATE_SCHEMA_ID",
44
+ "category": "contract",
45
+ "stableSince": "1.0.0",
46
+ "meaning": "Two schema registrations share the same $id; the registration is mechanically rejected."
47
+ },
48
+ {
49
+ "code": "SFC1004",
50
+ "name": "DUPLICATE_PROTOCOL_NAME",
51
+ "category": "contract",
52
+ "stableSince": "1.0.0",
53
+ "meaning": "Two protocol registrations share the same name and version; the registration is mechanically rejected."
54
+ },
55
+ {
56
+ "code": "SFC1005",
57
+ "name": "UNRESOLVED_REF",
58
+ "category": "contract",
59
+ "stableSince": "1.0.0",
60
+ "meaning": "A $ref target cannot be resolved within the registered schema set."
61
+ },
62
+ {
63
+ "code": "SFC1006",
64
+ "name": "UNSUPPORTED_DIALECT",
65
+ "category": "contract",
66
+ "stableSince": "1.0.0",
67
+ "meaning": "The declared JSON Schema dialect is not in the frozen supported dialect set."
68
+ },
69
+ {
70
+ "code": "SFC1007",
71
+ "name": "UNKNOWN_CHECK_TYPE",
72
+ "category": "contract",
73
+ "stableSince": "1.0.0",
74
+ "meaning": "A rule uses a check type outside the finite set of nine."
75
+ },
76
+ {
77
+ "code": "SFC1008",
78
+ "name": "RULE_BUDGET_EXCEEDED",
79
+ "category": "contract",
80
+ "stableSince": "1.0.0",
81
+ "meaning": "The mandatory rule count exceeds the first-version budget or the absolute cap."
82
+ },
83
+ {
84
+ "code": "SFC1009",
85
+ "name": "UNKNOWN_ERROR_CODE",
86
+ "category": "contract",
87
+ "stableSince": "1.0.0",
88
+ "meaning": "A fixture expectation references an error code that is not in this frozen registry."
89
+ },
90
+ {
91
+ "code": "SFC1010",
92
+ "name": "FIXTURE_EXPECTATION_MISMATCH",
93
+ "category": "contract",
94
+ "stableSince": "1.0.0",
95
+ "meaning": "A fixture did not behave as declared: a valid-expecting fixture failed, or an invalid-expecting fixture did not fail with the declared stable code."
96
+ },
97
+ {
98
+ "code": "SFC1011",
99
+ "name": "UNKNOWN_PROTOCOL",
100
+ "category": "contract",
101
+ "stableSince": "1.0.0",
102
+ "meaning": "A request references a protocol name/version that is not registered."
103
+ },
104
+ {
105
+ "code": "SFC1012",
106
+ "name": "SCHEMA_COMPILE_FAILED",
107
+ "category": "contract",
108
+ "stableSince": "1.0.0",
109
+ "meaning": "A registered schema does not compile under its declared dialect (the schema document itself is invalid)."
110
+ },
111
+ {
112
+ "code": "SFC2002",
113
+ "name": "UNKNOWN_OPERATION",
114
+ "category": "kernel",
115
+ "stableSince": "1.0.0",
116
+ "meaning": "The requested operation name is not in the frozen operation vocabulary of the referenced protocol version."
117
+ },
118
+ {
119
+ "code": "SFC2003",
120
+ "name": "INVALID_PARAMS",
121
+ "category": "kernel",
122
+ "stableSince": "1.0.0",
123
+ "meaning": "Operation params do not satisfy the frozen params contract of the requested operation."
124
+ },
125
+ {
126
+ "code": "SFC2004",
127
+ "name": "EXECUTION_FAILED",
128
+ "category": "kernel",
129
+ "stableSince": "1.0.0",
130
+ "meaning": "The mechanism runtime failed while executing a well-formed operation; details carry the mechanism evidence. Demonstrable only by a mechanism runtime, not by static contracts checks."
131
+ },
132
+ {
133
+ "code": "SFC3001",
134
+ "name": "REPORT_DIGEST_MISMATCH",
135
+ "category": "report",
136
+ "stableSince": "1.2.0",
137
+ "meaning": "A report binding digest (model, result, or report digest) does not match the recomputed sha256 digest, or the report is not the canonical render of its model; the binding is stale or tampered and is never trusted."
138
+ },
139
+ {
140
+ "code": "SFC3002",
141
+ "name": "REPORT_ELEMENT_MISSING",
142
+ "category": "report",
143
+ "stableSince": "1.2.0",
144
+ "meaning": "A mandatory report element is absent, empty where it must not be, or declared in an unsupported form: the conclusion, non-empty evidence, risks/next-action sections, a supported locale, or a coded outcome for failed/blocked runs. No half report is issued for a missing element."
145
+ },
146
+ {
147
+ "code": "SFC3003",
148
+ "name": "REPORT_FACT_DRIFT",
149
+ "category": "report",
150
+ "stableSince": "1.2.0",
151
+ "meaning": "A report model misstates the bound operation result's terminal state/errors, or rendered report bytes diverge from the deterministic re-render of the bound report model: fact fields rewritten, sections deleted, duplicated, or injected."
152
+ }
153
+ ]
154
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "skill-family.kernel-protocol",
4
+ "name": "skill-family.kernel.operation",
5
+ "version": 1,
6
+ "status": "stable",
7
+ "contractsVersion": "1.5.0",
8
+ "description": "Frozen v1 kernel protocol: request/result envelope, operation lifecycle states, and the operation vocabulary. Extensible only by a new protocol version; v1 content is frozen.",
9
+ "states": ["accepted", "running", "succeeded", "failed", "rejected"],
10
+ "initialStates": ["accepted", "rejected"],
11
+ "terminalStates": ["succeeded", "failed", "rejected"],
12
+ "transitions": [
13
+ { "from": "accepted", "to": "running" },
14
+ { "from": "accepted", "to": "failed" },
15
+ { "from": "running", "to": "succeeded" },
16
+ { "from": "running", "to": "failed" }
17
+ ],
18
+ "stateRules": {
19
+ "intake": "A well-formed request enters accepted; an intake rejection (for example an unregistered protocol) enters rejected directly.",
20
+ "result": "An operation-result carries only terminal states; non-terminal states are never serialized in results.",
21
+ "synchronous": "A synchronous mechanism implementation may move accepted through running to a terminal state without exposing intermediate states."
22
+ },
23
+ "operations": [
24
+ {
25
+ "name": "validate",
26
+ "status": "stable",
27
+ "description": "Validate one document against one registered schema under a declared dialect and policy.",
28
+ "params": {
29
+ "type": "object",
30
+ "additionalProperties": false,
31
+ "required": ["schemaId", "document"],
32
+ "properties": {
33
+ "schemaId": {
34
+ "type": "string",
35
+ "minLength": 1,
36
+ "description": "Registered $id of the target schema."
37
+ },
38
+ "document": {
39
+ "type": "object",
40
+ "description": "The document to validate."
41
+ },
42
+ "dialect": {
43
+ "type": "string",
44
+ "description": "Optional dialect override; must be in the supported dialect set."
45
+ },
46
+ "policy": {
47
+ "type": "string",
48
+ "description": "Optional validation policy name; defaults to strict."
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ],
54
+ "resultContract": {
55
+ "outputs": {
56
+ "validate": "On success, outputs.report is an object with valid (boolean) and errors (array of normalized validation findings)."
57
+ },
58
+ "errors": "Every error entry carries a code from the frozen contracts error registry."
59
+ }
60
+ }
@@ -0,0 +1,179 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "skill-family.contracts.registry",
4
+ "contractsVersion": "1.5.0",
5
+ "note": "Protocol-name and schema-$id registry. Registration mechanically rejects duplicate protocol name/version (SFC1004) and duplicate $id (SFC1003). This file is the single registration surface; adding an entry is a contracts change.",
6
+ "protocols": [
7
+ {
8
+ "name": "skill-family.kernel.operation",
9
+ "version": 1,
10
+ "status": "stable",
11
+ "definition": "src/kernel-protocol.json",
12
+ "description": "Kernel request/result envelope protocol for mechanism operations."
13
+ }
14
+ ],
15
+ "schemas": [
16
+ {
17
+ "$id": "https://contracts.skill-family.example/v1/project-manifest.json",
18
+ "object": "project-manifest",
19
+ "dialect": "2020-12",
20
+ "status": "stable",
21
+ "file": "src/schemas/project-manifest.schema.json"
22
+ },
23
+ {
24
+ "$id": "https://contracts.skill-family.example/v1/profile-descriptor.json",
25
+ "object": "profile-descriptor",
26
+ "dialect": "2020-12",
27
+ "status": "stable",
28
+ "file": "src/schemas/profile-descriptor.schema.json"
29
+ },
30
+ {
31
+ "$id": "https://contracts.skill-family.example/v1/managed-file-lock.json",
32
+ "object": "managed-file-lock",
33
+ "dialect": "2020-12",
34
+ "status": "stable",
35
+ "file": "src/schemas/managed-file-lock.schema.json"
36
+ },
37
+ {
38
+ "$id": "https://contracts.skill-family.example/v1/operation-request.json",
39
+ "object": "operation-request",
40
+ "dialect": "2020-12",
41
+ "status": "stable",
42
+ "file": "src/schemas/operation-request.schema.json"
43
+ },
44
+ {
45
+ "$id": "https://contracts.skill-family.example/v1/operation-result.json",
46
+ "object": "operation-result",
47
+ "dialect": "2020-12",
48
+ "status": "stable",
49
+ "file": "src/schemas/operation-result.schema.json"
50
+ },
51
+ {
52
+ "$id": "https://contracts.skill-family.example/v1/migration-manifest.json",
53
+ "object": "migration-manifest",
54
+ "dialect": "2020-12",
55
+ "status": "stable",
56
+ "file": "src/schemas/migration-manifest.schema.json"
57
+ },
58
+ {
59
+ "$id": "https://contracts.skill-family.example/v1/report-model.json",
60
+ "object": "report-model",
61
+ "dialect": "2020-12",
62
+ "status": "stable",
63
+ "file": "src/schemas/report-model.schema.json"
64
+ },
65
+ {
66
+ "$id": "https://contracts.skill-family.example/v1/report-binding.json",
67
+ "object": "report-binding",
68
+ "dialect": "2020-12",
69
+ "status": "stable",
70
+ "file": "src/schemas/report-binding.schema.json"
71
+ },
72
+ {
73
+ "$id": "https://contracts.skill-family.example/v1/host-descriptor.json",
74
+ "object": "host-descriptor",
75
+ "dialect": "2020-12",
76
+ "status": "stable",
77
+ "file": "src/schemas/host-descriptor.schema.json"
78
+ },
79
+ {
80
+ "$id": "https://contracts.skill-family.example/v1/host-registry.json",
81
+ "object": "host-registry",
82
+ "dialect": "2020-12",
83
+ "status": "stable",
84
+ "file": "src/schemas/host-registry.schema.json"
85
+ },
86
+ {
87
+ "$id": "https://contracts.skill-family.example/v1/adapter-source.json",
88
+ "object": "adapter-source",
89
+ "dialect": "2020-12",
90
+ "status": "stable",
91
+ "file": "src/schemas/adapter-source.schema.json"
92
+ },
93
+ {
94
+ "$id": "https://contracts.skill-family.example/v1/host-capability-fact.json",
95
+ "object": "host-capability-fact",
96
+ "dialect": "2020-12",
97
+ "status": "stable",
98
+ "file": "src/schemas/host-capability-fact.schema.json"
99
+ },
100
+ {
101
+ "$id": "https://contracts.skill-family.example/v1/host-probe-result.json",
102
+ "object": "host-probe-result",
103
+ "dialect": "2020-12",
104
+ "status": "stable",
105
+ "file": "src/schemas/host-probe-result.schema.json"
106
+ },
107
+ {
108
+ "$id": "https://contracts.skill-family.example/v1/adapter-build-manifest.json",
109
+ "object": "adapter-build-manifest",
110
+ "dialect": "2020-12",
111
+ "status": "stable",
112
+ "file": "src/schemas/adapter-build-manifest.schema.json"
113
+ },
114
+ {
115
+ "$id": "https://contracts.skill-family.example/v1/host-operation-plan.json",
116
+ "object": "host-operation-plan",
117
+ "dialect": "2020-12",
118
+ "status": "stable",
119
+ "file": "src/schemas/host-operation-plan.schema.json"
120
+ },
121
+ {
122
+ "$id": "https://contracts.skill-family.example/v1/host-operation-receipt.json",
123
+ "object": "host-operation-receipt",
124
+ "dialect": "2020-12",
125
+ "status": "stable",
126
+ "file": "src/schemas/host-operation-receipt.schema.json"
127
+ },
128
+ {
129
+ "$id": "https://contracts.skill-family.example/v1/state-event-envelope.json",
130
+ "object": "state-event-envelope",
131
+ "dialect": "2020-12",
132
+ "status": "stable",
133
+ "file": "src/schemas/state-event-envelope.schema.json"
134
+ },
135
+ {
136
+ "$id": "https://contracts.skill-family.example/v1/state-snapshot-metadata.json",
137
+ "object": "state-snapshot-metadata",
138
+ "dialect": "2020-12",
139
+ "status": "stable",
140
+ "file": "src/schemas/state-snapshot-metadata.schema.json"
141
+ },
142
+ {
143
+ "$id": "https://contracts.skill-family.example/v1/token-estimate-result.json",
144
+ "object": "token-estimate-result",
145
+ "dialect": "2020-12",
146
+ "status": "stable",
147
+ "file": "src/schemas/token-estimate-result.schema.json"
148
+ },
149
+ {
150
+ "$id": "https://contracts.skill-family.example/v1/surface-scan-policy.json",
151
+ "object": "surface-scan-policy",
152
+ "dialect": "2020-12",
153
+ "status": "stable",
154
+ "file": "src/schemas/surface-scan-policy.schema.json"
155
+ },
156
+ {
157
+ "$id": "https://contracts.skill-family.example/v1/declared-read-surface-result.json",
158
+ "object": "declared-read-surface-result",
159
+ "dialect": "2020-12",
160
+ "status": "stable",
161
+ "file": "src/schemas/declared-read-surface-result.schema.json"
162
+ },
163
+ {
164
+ "$id": "https://contracts.skill-family.example/v1/structured-scan-policy.json",
165
+ "object": "structured-scan-policy",
166
+ "dialect": "2020-12",
167
+ "status": "stable",
168
+ "file": "src/schemas/structured-scan-policy.schema.json"
169
+ }
170
+ ],
171
+ "dialects": {
172
+ "supported": ["draft-07", "2020-12"],
173
+ "metaSchemaUris": {
174
+ "draft-07": "http://json-schema.org/draft-07/schema#",
175
+ "2020-12": "https://json-schema.org/draft/2020-12/schema"
176
+ },
177
+ "note": "Draft detection maps a schema $schema URI to a dialect name via metaSchemaUris; validation is routed to the matching Ajv class."
178
+ }
179
+ }