release-skill 0.4.2 → 0.5.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.
Files changed (86) 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 +26 -0
  7. package/INSTALL.md +2 -2
  8. package/INSTALL.zh-CN.md +2 -2
  9. package/README.md +17 -6
  10. package/README.zh-CN.md +16 -5
  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 +165 -0
  16. package/adapters/claude/bin/release-skill.bundle.mjs +3838 -1445
  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 +165 -0
  26. package/adapters/codex/bin/release-skill.bundle.mjs +3838 -1445
  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 +165 -0
  36. package/adapters/kimi/bin/release-skill.bundle.mjs +3838 -1445
  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 +165 -0
  46. package/adapters/workbuddy/bin/release-skill.bundle.mjs +3838 -1445
  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 +165 -0
  55. package/bin/release-skill.bundle.mjs +3838 -1445
  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/artifacts/entry.mjs +4 -1
  70. package/src/artifacts/producer-registry.mjs +9 -6
  71. package/src/artifacts/project-lock.mjs +324 -214
  72. package/src/commands/assess.mjs +60 -2
  73. package/src/commands/attest.mjs +11 -0
  74. package/src/core/approval.mjs +5 -2
  75. package/src/core/digest.mjs +47 -12
  76. package/src/core/foundation-inflight.mjs +39 -0
  77. package/src/core/hook-cache.mjs +3 -0
  78. package/src/core/installation-contract.mjs +4 -2
  79. package/src/core/plan.mjs +30 -27
  80. package/src/core/run.mjs +22 -36
  81. package/src/core/skill-resource-closure.mjs +6 -4
  82. package/src/core/trusted-resource.mjs +64 -15
  83. package/src/producers/build-adapters.mjs +27 -9
  84. package/src/producers/render-public-assets.mjs +12 -7
  85. package/src/producers/sync-skills.mjs +12 -7
  86. package/src/snapshot/public-map.mjs +10 -2
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "release-skill",
11
11
  "source": "./",
12
- "version": "0.4.2",
12
+ "version": "0.5.0",
13
13
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
14
14
  "author": {
15
15
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
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.0.",
23
23
  "Help me understand the release workflow."
24
24
  ]
25
25
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release-skill:changelog:start version=0.5.0 locale=en baseline=sha256:e59bef4bd7bc6e0809d1f415d7ff3d342e45a7e77075f66d6ffa48cfd9b71932 -->
4
+ ## [0.5.0] - 2026-08-16
5
+
6
+ v0.5.0 adopts the released Skill Family Foundation 0.4.0 packages (skill-family-contracts / skill-family-harness-node) for digest computation, atomic writes, contained file reads, and project locking; migrates the project lock domain to a single-file token lock with fail-closed legacy detection; hardens the online assess npm check against fail-open; and documents the hooks authorization contract as config-time authorization.
7
+
8
+ ### Added
9
+
10
+ - **Negative test coverage**: 12 additional tests covering exclusive publication, token-lock migration, and the assess npm-check behavior.
11
+
12
+ ### Changed
13
+
14
+ - **Foundation adoption**: digest computation, atomic writes, contained-path reads and project locking now delegate to the published `skill-family-contracts@0.4.0` / `skill-family-harness-node@0.4.0` packages instead of local implementations; dependencies bumped from 0.3.0 to 0.4.0.
15
+ - **Token lock domain**: project locks migrated from a directory-based domain to a single `.release-skill/lock` file (0600, token record). Legacy directory-form locks are detected and fail closed with `LOCK_MIGRATION_REQUIRED`; no automatic conversion or deletion is performed.
16
+ - **Exclusive plan/run publication**: immutable plan and run records are published via `publishFileExclusive` — identical bytes are idempotent, divergent bytes fail with `GATE_FAILED`.
17
+ - **Assess npm check semantics**: the online `assess` npm check no longer treats every registry error as version-not-found; only E404/ETARGET mean a missing version, other failures surface as an `NPM_VERSION_CHECK_FAILED` warning.
18
+ - **Hooks authorization contract**: release-prepare/release-help now document the explicit contract that configuring a hook in project configuration IS the authorization (hooks are arbitrary local processes with no sandbox, no filesystem/network isolation, and no pre-trigger confirmation point); restoring a mandatory pre-trigger confirmation gate is a future hardening item.
19
+ - **Audit-scope ruling**: the bundled-family marketplace configuration is recorded as not applicable to the `release_artifact` target type (G3 target-side T4 ruling); T3/T5/T6 deferred to independent tasks.
20
+ - **Plan schema**: production plans carry the resolved codebuddy marketplace coordinates so approval and publish review the exact marketplace target.
21
+
22
+ ### Fixed
23
+
24
+ - **Configurable CodeBuddy marketplace**: codebuddy-plugin distributions accept `marketplace` and `marketplaceSource` in project configuration, and prepare threads both values into the consumer install action instead of assuming a fixed marketplace.
25
+ - **Assess fail-open**: an online `assess` no longer silently reports no gaps when the npm registry check fails for reasons other than a missing version.
26
+ <!-- release-skill:changelog:end version=0.5.0 locale=en -->
27
+
28
+
3
29
  <!-- release-skill:changelog:start version=0.4.2 locale=en baseline=sha256:b8676f90eb68c93e40f84ff16de18a8c472e6a06e321bcc25895799e9e6f3896 -->
4
30
  ## [0.4.2] - 2026-08-12
5
31
 
package/INSTALL.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [简体中文](INSTALL.zh-CN.md)
4
4
 
5
- <!-- release-skill:release-version: 0.4.2 -->
5
+ <!-- release-skill:release-version: 0.5.0 -->
6
6
  ## Prerequisites
7
7
 
8
8
  - Node.js 22.0.0 or later
@@ -114,7 +114,7 @@ tag pinned to the exact version (never the bare repository URL, which installs
114
114
  the latest release or default branch), confirm the trust prompt, then reload:
115
115
 
116
116
  ```
117
- /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.4.2
117
+ /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.5.0
118
118
  /plugins reload
119
119
  ```
120
120
 
package/INSTALL.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](INSTALL.md)
4
4
 
5
- <!-- release-skill:release-version: 0.4.2 -->
5
+ <!-- release-skill:release-version: 0.5.0 -->
6
6
  ## 前置条件
7
7
 
8
8
  - Node.js 22.0.0 或更高版本
@@ -104,7 +104,7 @@ Kimi Code 有交互式插件市场,但**没有可脚本化的非交互安装
104
104
  (切勿使用裸仓库地址,它会安装最新 release 或默认分支),确认信任提示后重新加载:
105
105
 
106
106
  ```
107
- /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.4.2
107
+ /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.5.0
108
108
  /plugins reload
109
109
  ```
110
110
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [简体中文](README.zh-CN.md) · Installation: [English](INSTALL.md) / [简体中文](INSTALL.zh-CN.md)
4
4
 
5
- <!-- release-skill:release-version: 0.4.2 -->
5
+ <!-- release-skill:release-version: 0.5.0 -->
6
6
  Release preparation for Claude Code, CodeBuddy, WorkBuddy, Codex, and Kimi Code, with human-edited files kept intact.
7
7
 
8
8
  release-skill helps a maintainer answer three questions: what will be released,
@@ -14,21 +14,32 @@ Setup surfaces only the deterministic `compactSummary` review view; the full
14
14
  report stays in a temporary session directory.
15
15
 
16
16
  <!-- release-skill:managed:start id=latest-release -->
17
- **0.4.2** (2026-08-12)
17
+ **0.5.0** (2026-08-16)
18
18
 
19
- v0.4.2 makes the CodeBuddy consumer marketplace configurable per distribution instead of hardcoding a single marketplace, so CodeBuddy plugin distributions can target a project-declared marketplace source.
19
+ v0.5.0 adopts the released Skill Family Foundation 0.4.0 packages (skill-family-contracts / skill-family-harness-node) for digest computation, atomic writes, contained file reads, and project locking; migrates the project lock domain to a single-file token lock with fail-closed legacy detection; hardens the online assess npm check against fail-open; and documents the hooks authorization contract as config-time authorization.
20
+
21
+ **Added**
22
+
23
+ - **Negative test coverage**: 12 additional tests covering exclusive publication, token-lock migration, and the assess npm-check behavior.
20
24
 
21
25
  **Changed**
22
26
 
27
+ - **Foundation adoption**: digest computation, atomic writes, contained-path reads and project locking now delegate to the published `skill-family-contracts@0.4.0` / `skill-family-harness-node@0.4.0` packages instead of local implementations; dependencies bumped from 0.3.0 to 0.4.0.
28
+ - **Token lock domain**: project locks migrated from a directory-based domain to a single `.release-skill/lock` file (0600, token record). Legacy directory-form locks are detected and fail closed with `LOCK_MIGRATION_REQUIRED`; no automatic conversion or deletion is performed.
29
+ - **Exclusive plan/run publication**: immutable plan and run records are published via `publishFileExclusive` — identical bytes are idempotent, divergent bytes fail with `GATE_FAILED`.
30
+ - **Assess npm check semantics**: the online `assess` npm check no longer treats every registry error as version-not-found; only E404/ETARGET mean a missing version, other failures surface as an `NPM_VERSION_CHECK_FAILED` warning.
31
+ - **Hooks authorization contract**: release-prepare/release-help now document the explicit contract that configuring a hook in project configuration IS the authorization (hooks are arbitrary local processes with no sandbox, no filesystem/network isolation, and no pre-trigger confirmation point); restoring a mandatory pre-trigger confirmation gate is a future hardening item.
32
+ - **Audit-scope ruling**: the bundled-family marketplace configuration is recorded as not applicable to the `release_artifact` target type (G3 target-side T4 ruling); T3/T5/T6 deferred to independent tasks.
23
33
  - **Plan schema**: production plans carry the resolved codebuddy marketplace coordinates so approval and publish review the exact marketplace target.
24
34
 
25
35
  **Fixed**
26
36
 
27
- - **Configurable CodeBuddy marketplace**: codebuddy-plugin distributions now accept `marketplace` and `marketplaceSource` in project configuration, and prepare threads both values into the consumer install action instead of assuming a fixed marketplace.
37
+ - **Configurable CodeBuddy marketplace**: codebuddy-plugin distributions accept `marketplace` and `marketplaceSource` in project configuration, and prepare threads both values into the consumer install action instead of assuming a fixed marketplace.
38
+ - **Assess fail-open**: an online `assess` no longer silently reports no gaps when the npm registry check fails for reasons other than a missing version.
28
39
  <!-- release-skill:managed:end id=latest-release -->
29
40
 
30
41
  <!-- release-skill:capability:external-write-boundary -->
31
- > **Current boundary:** v0.4.2 is the current source candidate; v0.4.1 remains
42
+ > **Current boundary:** v0.5.0 is the current source candidate; v0.4.1 remains
32
43
  > the latest published release (v0.2.2 previously held
33
44
  > published status before the platform verification convergence fix was added).
34
45
  > v0.1.1 completed a real production release to GitHub and npm — the first
@@ -47,7 +58,7 @@ v0.4.2 makes the CodeBuddy consumer marketplace configurable per distribution in
47
58
  > publish global preflight.
48
59
 
49
60
  <!-- release-skill:capability:safe-first-command -->
50
- > **Production path verified since the v0.1.1 milestone; v0.4.2 is the current
61
+ > **Production path verified since the v0.1.1 milestone; v0.5.0 is the current
51
62
  > source candidate and v0.4.1 is the latest published release.** The npm-installed CLI is the supported user entry. Source checkout
52
63
  > is the development/contributor fallback.
53
64
  >
package/README.zh-CN.md CHANGED
@@ -2,27 +2,38 @@
2
2
 
3
3
  [English](README.md) · 安装指南:[中文](INSTALL.zh-CN.md) / [English](INSTALL.md)
4
4
 
5
- <!-- release-skill:release-version: 0.4.2 -->
5
+ <!-- release-skill:release-version: 0.5.0 -->
6
6
  面向 Claude Code、CodeBuddy、WorkBuddy、Codex 和 Kimi Code 的发布准备工具,完整保留人工维护的文件内容。
7
7
 
8
8
  release-skill 帮助维护者回答三个问题:准备发布什么、还有哪些检查未通过、最终发布的内容是什么。它不重新生成、也不回写项目源文件。`prepare` 把每个配置的公开文件复制到隔离快照并验证字节——先冻结并供人工审阅,再从同一份冻结产物发布。`setup` 只显示确定性的 `compactSummary` 审阅视图,完整报告保留在临时会话目录中。
9
9
 
10
10
  <!-- release-skill:managed:start id=latest-release -->
11
- **0.4.2** (2026-08-12)
11
+ **0.5.0** (2026-08-16)
12
12
 
13
- v0.4.2 CodeBuddy 消费者市场改为按分发渠道可配置,不再硬编码单一市场,CodeBuddy 插件分发可以指向项目声明的市场来源。
13
+ v0.5.0 采用已发布的 Skill Family Foundation 0.4.0 包(skill-family-contracts / skill-family-harness-node)承载摘要计算、原子写、受控读取与项目锁;项目锁域迁移为单文件 token 锁并对旧目录形态 fail-closed;修复在线 assess npm 检查的 fail-open;并把 hooks 授权契约文档化为「配置时刻即授权」。
14
+
15
+ **新增**
16
+
17
+ - **新增负向测试**:新增 12 条测试覆盖排他发布、token 锁迁移与 assess npm 检查行为。
14
18
 
15
19
  **变更**
16
20
 
21
+ - **Foundation 采用**:摘要计算、原子写、受控路径读取与项目锁改为委托已发布的 `skill-family-contracts@0.4.0` / `skill-family-harness-node@0.4.0` 包,依赖由 0.3.0 提升至 0.4.0。
22
+ - **Token 锁域**:项目锁由目录形态迁移为单文件 `.release-skill/lock`(0600、token 记录);旧目录形态锁被检测后 fail-closed(`LOCK_MIGRATION_REQUIRED`),不自动转换或删除。
23
+ - **排他发布**:不可变计划与运行记录经 `publishFileExclusive` 发布——同字节幂等,异字节以 `GATE_FAILED` 失败。
24
+ - **assess npm 检查语义**:在线 `assess` 的 npm 检查不再把一切 registry 错误当作「版本不存在」;仅 E404/ETARGET 视为缺失,其余失败以 `NPM_VERSION_CHECK_FAILED` 告警呈现。
25
+ - **Hooks 授权契约**:release-prepare/release-help 现把「配置时刻即授权」写为显式契约——hook 是任意本地进程、无沙箱、无文件系统/网络隔离、触发前无确认点;恢复触发前强制确认门列为后续加固项。
26
+ - **审计范围裁决**:bundled-family 市场型配置记录为不适用 `release_artifact` 目标类型(G3 目标侧 T4 裁决);T3/T5/T6 延后为独立任务。
17
27
  - **计划模式**:生产计划携带解析后的 CodeBuddy 市场坐标,审批与发布时可核对确切的市场目标。
18
28
 
19
29
  **修复**
20
30
 
21
31
  - **CodeBuddy 市场可配置**:codebuddy-plugin 分发在项目配置中接受 `marketplace` 与 `marketplaceSource`,prepare 将两个值透传进消费者安装动作,不再假定固定市场。
32
+ - **assess fail-open 修复**:在线 `assess` 不再因版本缺失以外的 npm registry 检查失败而静默报告无缺口。
22
33
  <!-- release-skill:managed:end id=latest-release -->
23
34
 
24
35
  <!-- release-skill:capability:external-write-boundary -->
25
- > **当前边界:** v0.4.2 是当前源码候选,v0.4.1 仍是最新已发布版本(v0.2.2 曾处于已发布状态,后因平台验证收敛修复而更新)。
36
+ > **当前边界:** v0.5.0 是当前源码候选,v0.4.1 仍是最新已发布版本(v0.2.2 曾处于已发布状态,后因平台验证收敛修复而更新)。
26
37
  > v0.1.1 已完成 GitHub 与 npm 的
27
38
  > 真实生产发布,是首次生产验证的历史里程碑,并从冻结 Git ref 完成精确 npm
28
39
  > 安装及 Claude/Codex 消费者安装验证;"当前发布版本"与"首次生产验证里程碑"
@@ -35,7 +46,7 @@ v0.4.2 将 CodeBuddy 消费者市场改为按分发渠道可配置,不再硬
35
46
  > 远端唯一性检查在 `publish` 全局预检执行。
36
47
 
37
48
  <!-- release-skill:capability:safe-first-command -->
38
- > **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.4.2 是当前源码候选,v0.4.1 是最新已发布版本。**
49
+ > **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.5.0 是当前源码候选,v0.4.1 是最新已发布版本。**
39
50
  > npm 安装的 CLI 是受支持的用户入口;源码 checkout 保留为开发/贡献者路径。
40
51
  >
41
52
  > **第一条命令:**
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "release-skill",
11
11
  "source": "./",
12
- "version": "0.4.2",
12
+ "version": "0.5.0",
13
13
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
14
14
  "author": {
15
15
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.4.2",
3
+ "version": "0.5.0",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -0,0 +1,154 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "skill-family.contracts.error-codes",
4
+ "contractsVersion": "1.4.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.4.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,165 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "kind": "skill-family.contracts.registry",
4
+ "contractsVersion": "1.4.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
+ "dialects": {
158
+ "supported": ["draft-07", "2020-12"],
159
+ "metaSchemaUris": {
160
+ "draft-07": "http://json-schema.org/draft-07/schema#",
161
+ "2020-12": "https://json-schema.org/draft/2020-12/schema"
162
+ },
163
+ "note": "Draft detection maps a schema $schema URI to a dialect name via metaSchemaUris; validation is routed to the matching Ajv class."
164
+ }
165
+ }