skill-family-engineering-kit 0.17.0 → 0.19.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release-skill:changelog:start version=0.19.0 locale=en baseline=sha256:d3b79ce1564df3e0dc0f0abc1af616817550044de73f9b05b57a5dd65fd47dae -->
4
+ ## [0.19.0] - 2026-09-07
5
+
6
+ Engineering Kit 0.19.0 projects the new batch transport into the official offline Bundle and registers the mechanism-batch capability in the built-in catalog.
7
+
8
+ ### Added
9
+
10
+ - The official Bundle projection now carries runMechanismCliBatch, the --batch CLI mode, the two mechanism-batch Schemas, and the frozen batch capacity policy with unchanged source identity, digest, and integrity handling.
11
+ - The capability catalog adds foundation.harness.mechanism-batch with since 0.19.0 and stability candidate, together with intent, failure semantics, and direct test references.
12
+
13
+ ### Changed
14
+
15
+ - Adoption guidance documents batch selection rules: same-process calls keep the existing object entry; independent cross-process canonical-json requests within capacity are batch candidates; dependent or oversized requests keep the original path.
16
+
17
+ ### Upgrade Notes
18
+
19
+ Pin all three Foundation packages to exactly 0.19.0 and rebuild official Bundles after upgrading per the existing package identity and provenance rules. The catalog entry is candidate: a catalog match is not a stable adoption declaration.
20
+ <!-- release-skill:changelog:end version=0.19.0 locale=en -->
21
+
22
+
23
+ <!-- release-skill:changelog:start version=0.18.0 locale=en baseline=sha256:9c6fe9859fb75316937790054ae7d45bfc21d38ce97d8e650d7da18757a462c5 -->
24
+ ## [0.18.0] - 2026-09-05
25
+
26
+ Engineering Kit 0.18.0 projects the stable Harness replaceFixedSetAtomic export into the existing offline Quickstart Bundle.
27
+
28
+ ### Added
29
+
30
+ - The existing candidate Bundle now carries the stable fixed-set replacement source, loader, native closure, and replaceFixedSetAtomic export without adding a parallel implementation or a new Kit command.
31
+
32
+ ### Changed
33
+
34
+ - Moves the package version to 0.18.0 together with Contracts and Harness while preserving runProjection as the Bundle write and authorization boundary.
35
+
36
+ ### Upgrade Notes
37
+
38
+ Pin all three Foundation packages to exactly 0.18.0 and rebuild managed Bundles from those exact installed package bytes. Bundle consumers receive the same non-idempotent replacement semantics and must not retry post-commit or indeterminate outcomes blindly.
39
+ <!-- release-skill:changelog:end version=0.18.0 locale=en -->
40
+
41
+
3
42
  <!-- release-skill:changelog:start version=0.17.0 locale=en baseline=sha256:c09a3edaeab4e9f29527900bff5baaa7f7be185a9270ce81f450fab8ec9fb16f -->
4
43
  ## [0.17.0] - 2026-09-01
5
44
 
@@ -1,5 +1,44 @@
1
1
  # 变更日志
2
2
 
3
+ <!-- release-skill:changelog:start version=0.19.0 locale=zh-CN baseline=sha256:f000b13d13ce11660aaa4c5a1b450af39f99cb62a5177467783d863e7f411296 -->
4
+ ## [0.19.0] - 2026-09-07
5
+
6
+ Engineering Kit 0.19.0 把新批量传输投影进官方离线 Bundle,并在内置能力目录登记 mechanism-batch 能力。
7
+
8
+ ### 新增
9
+
10
+ - 官方 Bundle 投影携带 runMechanismCliBatch、--batch CLI 模式、两个机制批量 Schema 与冻结的批量容量政策,来源身份、摘要与完整性处理不变。
11
+ - 能力目录新增 foundation.harness.mechanism-batch:since 0.19.0、stability candidate,并登记意图、失败语义与直接测试引用。
12
+
13
+ ### 变更
14
+
15
+ - 采用指导补充批量选择规则:同进程调用保留既有对象入口;跨进程、相互独立且容量允许的 canonical-json 请求可作为批量候选;有依赖或超限请求保留原路径。
16
+
17
+ ### 升级说明
18
+
19
+ 三个 Foundation 包须一起精确锁定到 0.19.0,升级后按既有包身份与 provenance 规则重建官方 Bundle。该目录条目为候选能力:目录命中不构成稳定采用声明。
20
+ <!-- release-skill:changelog:end version=0.19.0 locale=zh-CN -->
21
+
22
+
23
+ <!-- release-skill:changelog:start version=0.18.0 locale=zh-CN baseline=sha256:c8c2891b64fc31e1fb3754715da04d6ec0727b31e36e011d38735e45795cdd53 -->
24
+ ## [0.18.0] - 2026-09-05
25
+
26
+ Engineering Kit 0.18.0 将 Harness 稳定的 replaceFixedSetAtomic 导出投影到既有离线 Quickstart Bundle。
27
+
28
+ ### 新增
29
+
30
+ - 既有 candidate Bundle 携带稳定的固定集合替换源码、加载器、原生闭包与 replaceFixedSetAtomic 导出;不新增平行实现,也不增加 Kit 命令。
31
+
32
+ ### 变更
33
+
34
+ - 包版本与 Contracts、Harness 一同升至 0.18.0,runProjection 继续作为 Bundle 的写入与授权边界。
35
+
36
+ ### 升级说明
37
+
38
+ 三个 Foundation 包须一起精确锁定到 0.18.0,并从这些已安装包的精确字节重建受管 Bundle。Bundle 消费者获得相同的非幂等替换语义,不得盲目重试提交后或不确定结果。
39
+ <!-- release-skill:changelog:end version=0.18.0 locale=zh-CN -->
40
+
41
+
3
42
  <!-- release-skill:changelog:start version=0.17.0 locale=zh-CN baseline=sha256:7c413da3ad02837bdd63a1b49a5dc78cefe15a9779a05ce070876f817d09ae65 -->
4
43
  ## [0.17.0] - 2026-09-01
5
44
 
package/README.md CHANGED
@@ -4,29 +4,27 @@
4
4
 
5
5
  # skill-family-engineering-kit
6
6
 
7
- <!-- release-skill:release-version: 0.17.0 -->
7
+ <!-- release-skill:release-version: 0.19.0 -->
8
8
 
9
9
  An engineering toolkit used in development and CI. There are **exactly four** top-level commands, and no fifth:
10
10
 
11
11
  <!-- release-skill:managed:start id=latest-release -->
12
- **0.17.0** (2026-09-01)
12
+ **0.19.0** (2026-09-07)
13
13
 
14
- Engineering Kit 0.17.0 separates CodeBuddy from WorkBuddy host verification and adds an opt-in structural comparison against a provider-owned engineering baseline.
14
+ Engineering Kit 0.19.0 projects the new batch transport into the official offline Bundle and registers the mechanism-batch capability in the built-in catalog.
15
15
 
16
16
  **Added**
17
17
 
18
- - Adds the codebuddy-print-v1 driver for CodeBuddy project discovery under .codebuddy/skills while preserving the existing workbuddy-codebuddy-print-v1 driver and WorkBuddy layout.
19
- - Adds describeSkeletonReferenceImplementation and returns its identity from scaffoldTarget.
20
- - Adds the paired adopt-plan options --engineering-baseline and --compare-skeleton. The result reports reference-only, target-only, entry-type, and file-class differences without declaring compliance, equivalence, severity, or waivers.
18
+ - The official Bundle projection now carries runMechanismCliBatch, the --batch CLI mode, the two mechanism-batch Schemas, and the frozen batch capacity policy with unchanged source identity, digest, and integrity handling.
19
+ - The capability catalog adds foundation.harness.mechanism-batch with since 0.19.0 and stability candidate, together with intent, failure semantics, and direct test references.
21
20
 
22
21
  **Changed**
23
22
 
24
- - Adds skill-family-kit check entries --root . to the generated public-plugin check script; other profiles keep their existing check command.
25
- - Keeps host-managed login state, domain acceptance, and real-host qualification under consumer ownership.
23
+ - Adoption guidance documents batch selection rules: same-process calls keep the existing object entry; independent cross-process canonical-json requests within capacity are batch candidates; dependent or oversized requests keep the original path.
26
24
 
27
25
  **Upgrade Notes**
28
26
 
29
- Pin all three Foundation packages to exactly 0.17.0. CodeBuddy and WorkBuddy are separate host routes even when they consume the same plugin payload. Baseline comparison is read-only and opt-in; the baseline provider still owns rule semantics and publication.
27
+ Pin all three Foundation packages to exactly 0.19.0 and rebuild official Bundles after upgrading per the existing package identity and provenance rules. The catalog entry is candidate: a catalog match is not a stable adoption declaration.
30
28
  <!-- release-skill:managed:end id=latest-release -->
31
29
 
32
30
  ### Foundation 0.15.0 candidate qualification entries
@@ -56,7 +54,7 @@ Kit is the "engineering stage" layer, depending on the Harness and Contracts. It
56
54
 
57
55
  ## Installation and Minimal Example
58
56
 
59
- Version 0.17.0 is a local candidate. Build all three tarballs into one temporary directory and install those exact files for a candidate check:
57
+ Version 0.18.0 is a local candidate. Build all three tarballs into one temporary directory and install those exact files for a candidate check:
60
58
 
61
59
  ```sh
62
60
  pack_dir="$(mktemp -d)"
@@ -64,21 +62,21 @@ pack_dir="$(mktemp -d)"
64
62
  (cd packages/skill-family-harness-node && pnpm pack --pack-destination "$pack_dir")
65
63
  (cd packages/skill-family-engineering-kit && pnpm pack --pack-destination "$pack_dir")
66
64
  mkdir "$pack_dir/consumer" && (cd "$pack_dir/consumer" && npm init -y)
67
- (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.17.0.tgz" "$pack_dir/skill-family-harness-node-0.17.0.tgz" "$pack_dir/skill-family-engineering-kit-0.17.0.tgz")
65
+ (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.18.0.tgz" "$pack_dir/skill-family-harness-node-0.18.0.tgz" "$pack_dir/skill-family-engineering-kit-0.18.0.tgz")
68
66
  ```
69
67
 
70
68
  After publication, use the registry coordinate:
71
69
 
72
70
  ```sh
73
- npm install --save-dev skill-family-engineering-kit@0.17.0
74
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit --help
75
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
76
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale en --uses ./uses.json
77
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit projection --root <repo>
78
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit check --root <repo>
71
+ npm install --save-dev skill-family-engineering-kit@0.19.0
72
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit --help
73
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
74
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale en --uses ./uses.json
75
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit projection --root <repo>
76
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit check --root <repo>
79
77
  ```
80
78
 
81
- The four commands above cover skeleton generation, read-only inventory, managed projection, and diagnostics respectively; a zero-install form is available via `npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit --help`.
79
+ The four commands above cover skeleton generation, read-only inventory, managed projection, and diagnostics respectively; a zero-install form is available via `npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit --help`.
82
80
 
83
81
  ### Three adoption journeys
84
82
 
@@ -297,4 +295,4 @@ The candidate `runPluginVerification({ request, bindings, hostsRoot })` preserve
297
295
 
298
296
  The separate `runSkillFamilyDirectoryVerification({ request, bindings })` entry fixes the Kimi production argv and narrow environment and rejects caller observation. Its raw parser is exercised through the production process path, but no controlled fixture event is promoted to `observed`; without an official typed mapping, the public result remains `indeterminate` and a manual candidate.
299
297
 
300
- Version 0.17.0 is a local source candidate and is not published. Consume the three locally verified tarballs; a version marker, unit test or successful install is not complete contract integration, migration completion, or real-host qualification.
298
+ Version 0.18.0 is a local source candidate and is not published. Consume the three locally verified tarballs; a version marker, unit test or successful install is not complete contract integration, migration completion, or real-host qualification.
package/README.zh-CN.md CHANGED
@@ -5,29 +5,27 @@
5
5
 
6
6
  # skill-family-engineering-kit
7
7
 
8
- <!-- release-skill:release-version: 0.17.0 -->
8
+ <!-- release-skill:release-version: 0.19.0 -->
9
9
 
10
10
  开发与 CI 阶段使用的工程工具包。**恰好四个**顶层命令,没有第五个:
11
11
 
12
12
  <!-- release-skill:managed:start id=latest-release -->
13
- **0.17.0** (2026-09-01)
13
+ **0.19.0** (2026-09-07)
14
14
 
15
- Engineering Kit 0.17.0 CodeBuddy WorkBuddy 的宿主验证分开,并新增按需启用的提供方工程基线结构比较。
15
+ Engineering Kit 0.19.0 把新批量传输投影进官方离线 Bundle,并在内置能力目录登记 mechanism-batch 能力。
16
16
 
17
17
  **新增**
18
18
 
19
- - 新增 codebuddy-print-v1 driver,按 CodeBuddy .codebuddy/skills 项目目录发现技能;既有 workbuddy-codebuddy-print-v1 driver 与 WorkBuddy 布局保持不变。
20
- - 新增 describeSkeletonReferenceImplementation,并由 scaffoldTarget 返回该参考骨架身份。
21
- - adopt-plan 新增须成对使用的 --engineering-baseline 与 --compare-skeleton。结果只报告参考侧独有、目标侧独有、条目类型和文件类别差异,不裁定合规、等价、严重程度或豁免。
19
+ - 官方 Bundle 投影携带 runMechanismCliBatch、--batch CLI 模式、两个机制批量 Schema 与冻结的批量容量政策,来源身份、摘要与完整性处理不变。
20
+ - 能力目录新增 foundation.harness.mechanism-batch:since 0.19.0、stability candidate,并登记意图、失败语义与直接测试引用。
22
21
 
23
22
  **变更**
24
23
 
25
- - public-plugin 骨架生成的 check 脚本新增 skill-family-kit check entries --root .;其他 Profile 的检查命令保持不变。
26
- - 宿主管理的登录态、领域验收和真实宿主资格继续归消费者负责。
24
+ - 采用指导补充批量选择规则:同进程调用保留既有对象入口;跨进程、相互独立且容量允许的 canonical-json 请求可作为批量候选;有依赖或超限请求保留原路径。
27
25
 
28
26
  **升级说明**
29
27
 
30
- 三个 Foundation 包须一起精确锁定到 0.17.0。CodeBuddy WorkBuddy 即使消费同一插件载荷,也必须走独立宿主路由。基线比较只读且按需启用;规则语义与基线发布仍由基线提供方负责。
28
+ 三个 Foundation 包须一起精确锁定到 0.19.0,升级后按既有包身份与 provenance 规则重建官方 Bundle。该目录条目为候选能力:目录命中不构成稳定采用声明。
31
29
  <!-- release-skill:managed:end id=latest-release -->
32
30
 
33
31
  ### Foundation 0.15.0 candidate 资格入口
@@ -57,7 +55,7 @@ Kit 是「工程阶段」层,依赖 Harness 与 Contracts。它只做四件事
57
55
 
58
56
  ## 安装和最小示例
59
57
 
60
- 0.17.0 是本地候选版本。候选验证先把三个包分别打入同一个临时目录,再安装这三个精确 tarball:
58
+ 0.18.0 是本地候选版本。候选验证先把三个包分别打入同一个临时目录,再安装这三个精确 tarball:
61
59
 
62
60
  ```sh
63
61
  pack_dir="$(mktemp -d)"
@@ -65,21 +63,21 @@ pack_dir="$(mktemp -d)"
65
63
  (cd packages/skill-family-harness-node && pnpm pack --pack-destination "$pack_dir")
66
64
  (cd packages/skill-family-engineering-kit && pnpm pack --pack-destination "$pack_dir")
67
65
  mkdir "$pack_dir/consumer" && (cd "$pack_dir/consumer" && npm init -y)
68
- (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.17.0.tgz" "$pack_dir/skill-family-harness-node-0.17.0.tgz" "$pack_dir/skill-family-engineering-kit-0.17.0.tgz")
66
+ (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.18.0.tgz" "$pack_dir/skill-family-harness-node-0.18.0.tgz" "$pack_dir/skill-family-engineering-kit-0.18.0.tgz")
69
67
  ```
70
68
 
71
69
  发布后再使用 registry 坐标:
72
70
 
73
71
  ```sh
74
- npm install --save-dev skill-family-engineering-kit@0.17.0
75
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit --help
76
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
77
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json
78
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit projection --root <repo>
79
- npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit check --root <repo>
72
+ npm install --save-dev skill-family-engineering-kit@0.19.0
73
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit --help
74
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
75
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json
76
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit projection --root <repo>
77
+ npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit check --root <repo>
80
78
  ```
81
79
 
82
- 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.17.0 -- skill-family-kit --help`。
80
+ 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.19.0 -- skill-family-kit --help`。
83
81
 
84
82
  ### 三条采用旅程
85
83
 
@@ -298,4 +296,4 @@ Foundation 本身不发起网络请求,但绑定的 executable 仍可能联网
298
296
 
299
297
  独立入口 `runSkillFamilyDirectoryVerification({ request, bindings })` 固定 Kimi 生产 argv 与窄环境,并拒绝调用方 observation。原始 parser 通过生产进程路径验证,但受控 fixture 事件不会被提升为 `observed`;缺少官方 typed mapping 时,公共结果保持 `indeterminate` 和 manual candidate。
300
298
 
301
- 0.17.0 为本地源码候选,尚未发布。消费本地已验证的三包 tarball;版本标记、单元测试或安装成功都不等于契约接入完成、迁移完成或真实宿主资格。
299
+ 0.18.0 为本地源码候选,尚未发布。消费本地已验证的三包 tarball;版本标记、单元测试或安装成功都不等于契约接入完成、迁移完成或真实宿主资格。
@@ -76,6 +76,16 @@ const ADDITIONAL_FOUNDATION_SCHEMA_FILES = Object.freeze([
76
76
  ["fixed-set-publication-receipt.schema.json", "src/schemas/fixed-set-publication-receipt.schema.json", "schemas/foundation/fixed-set-publication-receipt.schema.json"],
77
77
  ["schema-validation-batch-request.schema.json", "candidate/foundation-mechanisms/schema-validation-batch-request.schema.json", "schemas/foundation/schema-validation-batch-request.schema.json"],
78
78
  ["schema-validation-batch-result.schema.json", "candidate/foundation-mechanisms/schema-validation-batch-result.schema.json", "schemas/foundation/schema-validation-batch-result.schema.json"],
79
+ ["mechanism-batch-request.schema.json", "candidate/foundation-mechanisms/mechanism-batch-request.schema.json", "schemas/foundation/mechanism-batch-request.schema.json"],
80
+ ["mechanism-batch-result.schema.json", "candidate/foundation-mechanisms/mechanism-batch-result.schema.json", "schemas/foundation/mechanism-batch-result.schema.json"],
81
+ ]);
82
+
83
+ // Non-Schema Foundation assets projected verbatim. They are deliberately kept
84
+ // out of ADDITIONAL_FOUNDATION_SCHEMA_FILES: the schema graph claims a
85
+ // document.$id for every schema row, while the capacity policy is a plain
86
+ // JSON authority with no Schema identity.
87
+ const ADDITIONAL_FOUNDATION_ASSET_FILES = Object.freeze([
88
+ ["mechanism-batch-policy.json", "candidate/foundation-mechanisms/mechanism-batch-policy.json", "schemas/foundation/mechanism-batch-policy.json"],
79
89
  ]);
80
90
 
81
91
  const HARNESS_IMPORT_MAP = new Map([
@@ -96,6 +106,7 @@ const HARNESS_STRICT_READ_IMPORT_MAP = new Map([
96
106
 
97
107
  const HARNESS_CLI_IMPORT_MAP = new Map([
98
108
  ["./quickstart-profile.mjs", "./runner.mjs"],
109
+ ["skill-family-contracts/quickstart-profile", "./runtime/contracts-candidate/index.mjs"],
99
110
  ]);
100
111
 
101
112
  const HARNESS_ATOMIC_IMPORT_MAP = new Map([
@@ -980,13 +991,22 @@ function projectContractsCandidateIndex(sourceText) {
980
991
  `schema load path ${fileName}`,
981
992
  );
982
993
  }
983
- for (const [fileName] of ADDITIONAL_FOUNDATION_SCHEMA_FILES.filter(([name]) => name.startsWith("schema-validation-batch-"))) {
994
+ for (const [fileName] of ADDITIONAL_FOUNDATION_SCHEMA_FILES.filter(
995
+ ([name]) => name.startsWith("schema-validation-batch-") || name.startsWith("mechanism-batch-"),
996
+ )) {
984
997
  applyOnce(
985
998
  `load(new URL("../foundation-mechanisms/${fileName}", import.meta.url))`,
986
999
  `load(new URL("../../schemas/foundation/${fileName}", import.meta.url))`,
987
1000
  `schema load path ${fileName}`,
988
1001
  );
989
1002
  }
1003
+ for (const [fileName] of ADDITIONAL_FOUNDATION_ASSET_FILES) {
1004
+ applyOnce(
1005
+ `load(new URL("../foundation-mechanisms/${fileName}", import.meta.url))`,
1006
+ `load(new URL("../../schemas/foundation/${fileName}", import.meta.url))`,
1007
+ `asset load path ${fileName}`,
1008
+ );
1009
+ }
990
1010
 
991
1011
  const getCollectionMarker = "function getCollection(";
992
1012
  const getCollectionHits = projected.split(getCollectionMarker).length - 1;
@@ -1124,7 +1144,7 @@ function runnerSource() {
1124
1144
  'export { validateQuickstartProfileDocument } from "./runtime/contracts-candidate/index.mjs";',
1125
1145
  'export { validateBySchemaId } from "./validators.mjs";',
1126
1146
  'export { createFilesystemRootBinding, readFileBound } from "./runtime/harness/bound-read.mjs";',
1127
- 'export { createFixedSetPublicationManifest, publishFixedSet } from "./runtime/harness/fixed-set-publication.mjs";',
1147
+ 'export { createFixedSetPublicationManifest, publishFixedSet, replaceFixedSetAtomic } from "./runtime/harness/fixed-set-publication.mjs";',
1128
1148
  'export { publishFileExclusive, publishFileOrReplace, replaceFileAtomic } from "./runtime/harness/atomic.mjs";',
1129
1149
  'export { acquireFilesystemLock, inspectFilesystemLock, releaseFilesystemLock, recoverFilesystemLock } from "./runtime/harness/token-lock.mjs";',
1130
1150
  'import { invokeFoundationMechanism as invokeHarnessMechanism } from "./runtime/harness/quickstart-profile.mjs";',
@@ -1238,6 +1258,10 @@ export async function buildQuickstartProfileProjection({
1238
1258
  for (const [fileName, sourcePath] of ADDITIONAL_FOUNDATION_SCHEMA_FILES) {
1239
1259
  additionalSchemaTexts[fileName] = await readSourceText(contractsRoot, sourcePath);
1240
1260
  }
1261
+ const additionalAssetTexts = {};
1262
+ for (const [fileName, sourcePath] of ADDITIONAL_FOUNDATION_ASSET_FILES) {
1263
+ additionalAssetTexts[fileName] = await readSourceText(contractsRoot, sourcePath);
1264
+ }
1241
1265
  sources.harnessIndex = await readSourceText(harnessRoot, "src/index.mjs");
1242
1266
  sources.harnessCandidate = await readSourceText(harnessRoot, "candidate/quickstart-profile.mjs");
1243
1267
  sources.harnessMechanismsCli = await readSourceText(harnessRoot, "candidate/mechanisms-cli.mjs");
@@ -1453,6 +1477,9 @@ export async function buildQuickstartProfileProjection({
1453
1477
  for (const [fileName, , bundlePath] of ADDITIONAL_FOUNDATION_SCHEMA_FILES) {
1454
1478
  setText(bundlePath, additionalSchemaTexts[fileName]);
1455
1479
  }
1480
+ for (const [fileName, , bundlePath] of ADDITIONAL_FOUNDATION_ASSET_FILES) {
1481
+ setText(bundlePath, additionalAssetTexts[fileName]);
1482
+ }
1456
1483
  setText("schemas/foundation/operation-request.schema.json", sources.operationRequest);
1457
1484
  setText("schemas/foundation/operation-result.schema.json", sources.operationResult);
1458
1485
  setText("schemas/foundation/migration-manifest.schema.json", sources.migrationManifestSchema);
@@ -1591,6 +1618,11 @@ export async function buildQuickstartProfileProjection({
1591
1618
  additionalSchemaTexts[fileName],
1592
1619
  "projected",
1593
1620
  ]),
1621
+ ...ADDITIONAL_FOUNDATION_ASSET_FILES.map(([fileName, sourcePath]) => [
1622
+ `packages/skill-family-contracts/${sourcePath}`,
1623
+ additionalAssetTexts[fileName],
1624
+ "projected",
1625
+ ]),
1594
1626
  ["packages/skill-family-contracts/candidate/quickstart-profile/index.mjs", sources.candidateIndex, "extraction-input"],
1595
1627
  ["packages/skill-family-harness-node/package.json", harnessPackageJsonText, "identity"],
1596
1628
  ["packages/skill-family-harness-node/src/index.mjs", sources.harnessIndex, "imported-surface"],
@@ -2128,6 +2128,53 @@
2128
2128
  "Return malicious-concurrency threats to Foundation as a minimal capability gap; do not copy a walker, native addon, Harness, schema, Registry, runner or receipt chain locally"
2129
2129
  ]
2130
2130
  },
2131
+ {
2132
+ "id": "foundation.harness.fixed-set-publication",
2133
+ "intent": "Publish one complete fixed set without replacement, or atomically exchange one complete staged sibling with an existing target directory",
2134
+ "useWhen": [
2135
+ "Need to publish a complete directory only when the target is absent",
2136
+ "Need to replace one existing directory with a complete staged sibling under the same canonical parent"
2137
+ ],
2138
+ "doNotUseWhen": [
2139
+ "Source and target cannot be real sibling directories under one canonical parent",
2140
+ "Need a copy, merge, backup, automatic rollback or retry workflow"
2141
+ ],
2142
+ "prerequisites": [
2143
+ "Install exact matching versions of all three Foundation packages on a packaged Darwin or Linux GNU platform",
2144
+ "Source and target trees contain only real directories and single-link regular files",
2145
+ "The caller exclusively controls both directory names for the duration of the call"
2146
+ ],
2147
+ "inputs": [
2148
+ "createFixedSetPublicationManifest and publishFixedSet take a complete source, target parent, safe target segment and frozen manifest",
2149
+ "replaceFixedSetAtomic takes { sourceRoot, targetParent, targetSegment } for an existing target sibling"
2150
+ ],
2151
+ "outputs": [
2152
+ "No-replace publication returns a structured publication receipt",
2153
+ "Verified replacement returns both paths, published and displaced closure digests, and published, committed, verified, namespace-synced state"
2154
+ ],
2155
+ "sideEffects": [
2156
+ "No-replace publication moves the source directory to an absent target after verification",
2157
+ "Replacement performs one native directory exchange and leaves the displaced target at sourceRoot; Foundation deletes neither side"
2158
+ ],
2159
+ "failureSemantics": [
2160
+ "Supported pre-commit replacement failure preserves the original target path and bytes",
2161
+ "Replacement mechanism failures use SFC2004 with atomic-replace-failed and a phase, publication, commit, verification and durability tuple",
2162
+ "Unsupported replacement platforms use SFC2004 with unsupported-platform"
2163
+ ],
2164
+ "invariants": [
2165
+ "Neither path falls back to a JavaScript check-then-rename sequence",
2166
+ "Replacement commits through one Darwin RENAME_SWAP or Linux RENAME_EXCHANGE under one verified parent handle",
2167
+ "Replacement is not idempotent; the same call exchanges the directories back"
2168
+ ],
2169
+ "ownedByCaller": [
2170
+ "Meaning and acceptance of the directory contents",
2171
+ "Staging lifecycle, cleanup of the displaced target after verified success, and recovery decisions after post-commit or indeterminate failure"
2172
+ ],
2173
+ "routeElsewhere": [
2174
+ "Remote release authorization and publication: route to release-skill",
2175
+ "Directory rendering and payload selection: keep in the consuming product"
2176
+ ]
2177
+ },
2131
2178
  {
2132
2179
  "id": "foundation.harness.executable-identity-observation",
2133
2180
  "intent": "Observe an explicitly bound executable entry, symlink chain, interpreter and launch bytes as a read-only point-in-time fact for an immediately pre-launch re-observation",
@@ -2170,6 +2217,49 @@
2170
2217
  "Malicious-concurrency, kernel-image or signature-proof gaps return to Foundation; do not copy a walker, native addon, Harness, schema, Registry, runner or receipt chain locally"
2171
2218
  ]
2172
2219
  },
2220
+ {
2221
+ "id": "foundation.harness.mechanism-batch",
2222
+ "intent": "Combine mutually independent canonical-json requests that would otherwise need one cross-process invocation each into a single bounded, same-operation, ordered batch transport, reducing repeated process starts and transfer overhead",
2223
+ "useWhen": [
2224
+ "Multiple mutually independent canonical-json requests need per-item cross-process invocation (one process start and transfer each) and item count plus request/response bytes fit the capacity recorded in the capability catalog",
2225
+ "The caller has the same-version official Bundle with a verified source and takes on the caller responsibility of domain grouping and batch splitting"
2226
+ ],
2227
+ "doNotUseWhen": [
2228
+ "Requests already live in the same Node process (reuse the existing invokeFoundationMechanism object entry point; do not introduce a wrapper with no benefit)",
2229
+ "A later item depends on an earlier item's result, or concurrency, caching, retry, automatic splitting, or cross-item references are needed",
2230
+ "The request exceeds the batch capacity, or contains operations outside this batch (such as schema batch validation, self-check, or fixed-set publication writes)"
2231
+ ],
2232
+ "prerequisites": [
2233
+ "Contracts, Harness, and Engineering Kit are pinned to exactly the same version; the official Bundle is generated from same-version packages and keeps source identity, digest, and integrity checks",
2234
+ "The caller supplies the input/output/error streams (process standard streams by default); domain grouping, capacity splitting, and stream acceptance stay with the caller"
2235
+ ],
2236
+ "inputs": [
2237
+ "One JSON document with exactly operation (canonical-json) and inputs (non-empty ordered array; each item is {document}); NDJSON, session protocols, and automatic array detection are unsupported"
2238
+ ],
2239
+ "outputs": [
2240
+ "{results:[{inputIndex,exitCode,response}]}; successful items carry the original mechanism response and failed items the original CLI error object, in input order"
2241
+ ],
2242
+ "sideEffects": [
2243
+ "None (items execute through the existing pure-function dispatcher; only the caller-provided output/error streams are written; no file, network, process, or residual-state side effects)"
2244
+ ],
2245
+ "failureSemantics": [
2246
+ "Whole-batch shape or capacity refusals write one batch error object to the error stream and exit 2 (TypeError projection; details.kind is closed to batch-structure-invalid, batch-item-limit, batch-input-limit, batch-output-limit)",
2247
+ "Per-item mechanism failures are projected into that item's response and later items still run; at least one failure exits 2; partial batch results are never delivered"
2248
+ ],
2249
+ "invariants": [
2250
+ "Outer shape checks for every item complete before the first item runs; item order, duplicates, and the per-item invocation count stay unchanged",
2251
+ "The complete response bytes are not sent until confirmed within the output limit; error objects are neither reordered nor normalized"
2252
+ ],
2253
+ "ownedByCaller": [
2254
+ "Domain grouping and capacity splitting, and judging dependencies between requests",
2255
+ "Version availability and maturity judgment (since 0.19.0 and candidate status live in the catalog and API documentation), the exact pin, and source-identity binding",
2256
+ "Batch adoption completion and domain acceptance judgment"
2257
+ ],
2258
+ "routeElsewhere": [
2259
+ "Concurrency, caching, retry, cross-item references, or automatic splitting: keep them on the original consumer path, or return a real common gap to Foundation as a minimal capability contract",
2260
+ "Mechanisms outside this batch (schema batch validation, self-check, fixed-set publication writes, and so on) keep their existing public entry points"
2261
+ ]
2262
+ },
2173
2263
  {
2174
2264
  "id": "foundation.kit.plugin-verification",
2175
2265
  "intent": "Preserve the complete plugin layout and add dedicated Qoder and WorkBuddy production lifecycle drivers while keeping structure and host semantics separate",
@@ -1395,6 +1395,32 @@
1395
1395
  "migration": "none",
1396
1396
  "promotionPolicy": "consumer-transparent"
1397
1397
  },
1398
+ {
1399
+ "id": "foundation.harness.fixed-set-publication",
1400
+ "package": "skill-family-harness-node",
1401
+ "layer": "harness",
1402
+ "since": "0.9.0",
1403
+ "stability": "stable",
1404
+ "adoptionScopes": ["harness", "engineering-kit"],
1405
+ "entrypoints": [
1406
+ "skill-family-harness-node: createFixedSetPublicationManifest, publishFixedSet, replaceFixedSetAtomic (packages/skill-family-harness-node/src/fixed-set-publication.mjs)",
1407
+ "skill-family-harness-node/fixed-set-publication: createFixedSetPublicationManifest, publishFixedSet, replaceFixedSetAtomic (packages/skill-family-harness-node/src/fixed-set-publication.mjs)"
1408
+ ],
1409
+ "sourceRefs": [
1410
+ "packages/skill-family-harness-node/src/fixed-set-publication.mjs",
1411
+ "packages/skill-family-harness-node/src/fixed-set-publication-loader.mjs",
1412
+ "packages/skill-family-harness-node/src/native/bound_read.c",
1413
+ "packages/skill-family-engineering-kit/candidate/profile-bundle.mjs"
1414
+ ],
1415
+ "positiveTestRefs": [
1416
+ "packages/skill-family-harness-node/test/stable-filesystem-operations.test.mjs",
1417
+ "packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs"
1418
+ ],
1419
+ "negativeTestRefs": [
1420
+ "packages/skill-family-harness-node/test/stable-filesystem-operations.test.mjs",
1421
+ "packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs"
1422
+ ]
1423
+ },
1398
1424
  {
1399
1425
  "id": "foundation.harness.executable-identity-observation",
1400
1426
  "package": "skill-family-harness-node",
@@ -1418,6 +1444,39 @@
1418
1444
  "migration": "none",
1419
1445
  "promotionPolicy": "consumer-transparent"
1420
1446
  },
1447
+ {
1448
+ "id": "foundation.harness.mechanism-batch",
1449
+ "package": "skill-family-harness-node",
1450
+ "layer": "harness",
1451
+ "since": "0.19.0",
1452
+ "stability": "candidate",
1453
+ "adoptionScopes": ["harness"],
1454
+ "entrypoints": [
1455
+ "runMechanismCliBatch (packages/skill-family-harness-node/candidate/mechanisms-cli.mjs)",
1456
+ "mechanisms-cli.mjs --batch (packages/skill-family-harness-node/candidate/mechanisms-cli.mjs)"
1457
+ ],
1458
+ "sourceRefs": [
1459
+ "packages/skill-family-contracts/candidate/foundation-mechanisms/mechanism-batch-policy.json",
1460
+ "packages/skill-family-contracts/candidate/foundation-mechanisms/mechanism-batch-request.schema.json",
1461
+ "packages/skill-family-contracts/candidate/foundation-mechanisms/mechanism-batch-result.schema.json",
1462
+ "packages/skill-family-harness-node/candidate/mechanisms-cli.mjs",
1463
+ "packages/skill-family-engineering-kit/candidate/profile-bundle.mjs"
1464
+ ],
1465
+ "positiveTestRefs": [
1466
+ "packages/skill-family-contracts/test/quickstart-profile.test.mjs",
1467
+ "packages/skill-family-harness-node/test/quickstart-profile.test.mjs",
1468
+ "packages/skill-family-engineering-kit/test/candidate-mechanisms-cli.test.mjs",
1469
+ "packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs"
1470
+ ],
1471
+ "negativeTestRefs": [
1472
+ "packages/skill-family-contracts/test/quickstart-profile.test.mjs",
1473
+ "packages/skill-family-harness-node/test/quickstart-profile.test.mjs",
1474
+ "packages/skill-family-engineering-kit/test/candidate-mechanisms-cli.test.mjs",
1475
+ "packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs"
1476
+ ],
1477
+ "migration": "none",
1478
+ "promotionPolicy": "consumer-transparent"
1479
+ },
1421
1480
  {
1422
1481
  "id": "foundation.kit.plugin-verification",
1423
1482
  "package": "skill-family-engineering-kit",
@@ -2127,6 +2127,53 @@
2127
2127
  "恶意并发威胁交回 Foundation 形成最小能力缺口;不得本地复制 walker、native addon、Harness、schema、Registry、runner 或 receipt 链"
2128
2128
  ]
2129
2129
  },
2130
+ {
2131
+ "id": "foundation.harness.fixed-set-publication",
2132
+ "intent": "在目标缺失时发布一个完整固定集合,或把一个完整暂存兄弟目录与既有目标目录原子交换",
2133
+ "useWhen": [
2134
+ "只在目标缺失时发布一棵完整目录树",
2135
+ "用同一规范父目录下的完整暂存兄弟目录替换一个既有目录"
2136
+ ],
2137
+ "doNotUseWhen": [
2138
+ "源目录和目标目录无法成为同一规范父目录下的真实兄弟目录",
2139
+ "需要复制、合并、备份、自动回滚或重试流程"
2140
+ ],
2141
+ "prerequisites": [
2142
+ "在带有固定预构建闭包的 Darwin 或 Linux GNU 平台安装精确匹配的三个 Foundation 包版本",
2143
+ "源树和目标树只含真实目录与单链接普通文件",
2144
+ "调用期间由调用方独占两个目录名称"
2145
+ ],
2146
+ "inputs": [
2147
+ "createFixedSetPublicationManifest 与 publishFixedSet 接收完整源目录、目标父目录、安全目标段和冻结 manifest",
2148
+ "replaceFixedSetAtomic 为既有兄弟目标接收 { sourceRoot, targetParent, targetSegment }"
2149
+ ],
2150
+ "outputs": [
2151
+ "不替换发布返回结构化 publication receipt",
2152
+ "确认替换成功后返回两个路径、发布与被置换闭包摘要,以及 published、committed、verified、namespace-synced 状态"
2153
+ ],
2154
+ "sideEffects": [
2155
+ "不替换发布经验证后,把源目录移动到不存在的目标路径",
2156
+ "替换执行一次原生目录交换,被置换的旧目标留在 sourceRoot;Foundation 不删除任一侧"
2157
+ ],
2158
+ "failureSemantics": [
2159
+ "受支持的提交前替换失败保留原目标路径和字节",
2160
+ "替换机制失败使用 SFC2004 与 atomic-replace-failed,并携带阶段、发布、提交、验证和持久化状态 tuple",
2161
+ "不支持替换的平台使用 SFC2004 与 unsupported-platform"
2162
+ ],
2163
+ "invariants": [
2164
+ "两条路径都不降级到 JavaScript 检查后改名序列",
2165
+ "替换在一个已验证父目录句柄下,通过一次 Darwin RENAME_SWAP 或 Linux RENAME_EXCHANGE 提交",
2166
+ "替换不是幂等操作;相同调用会把两个目录交换回去"
2167
+ ],
2168
+ "ownedByCaller": [
2169
+ "目录内容的含义与接受策略",
2170
+ "暂存目录生命周期、确认成功后的旧目标清理,以及提交后或不确定失败的恢复决定"
2171
+ ],
2172
+ "routeElsewhere": [
2173
+ "远程发布授权与发布动作交给 release-skill",
2174
+ "目录渲染与载荷选择留在消费产品"
2175
+ ]
2176
+ },
2130
2177
  {
2131
2178
  "id": "foundation.harness.executable-identity-observation",
2132
2179
  "intent": "逐次只读观察显式绑定根中的可执行入口、符号链接链、脚本解释器与启动字节,供消费者在启动前紧邻重观察",
@@ -2169,6 +2216,49 @@
2169
2216
  "恶意并发、内核映像或签名证明缺口交回 Foundation;不得复制 walker、native addon、Harness、schema、Registry、runner 或 receipt 链"
2170
2217
  ]
2171
2218
  },
2219
+ {
2220
+ "id": "foundation.harness.mechanism-batch",
2221
+ "intent": "把相互独立、需逐项跨进程调用的 canonical-json 请求合并为一次有界、同操作、顺序执行的批量传输,减少重复进程启动与传输开销",
2222
+ "useWhen": [
2223
+ "多个相互独立的 canonical-json 请求需要逐项跨进程调用(每项一次进程启动与传输),且项数与请求/响应字节落在能力目录登记的容量内",
2224
+ "调用方已安装来源明确的同版本官方 Bundle,并承担领域分组与批次切分的调用方责任"
2225
+ ],
2226
+ "doNotUseWhen": [
2227
+ "请求已位于同一 Node 进程内(优先复用既有 invokeFoundationMechanism 对象入口,不引入无收益的流包装)",
2228
+ "后项输入依赖前项结果,或需要并发、缓存、重试、自动拆批或跨项引用",
2229
+ "请求超过批次容量,或包含本批未支持的操作(如 schema 批量校验、self-check、固定集合写入)"
2230
+ ],
2231
+ "prerequisites": [
2232
+ "Contracts、Harness 与 Engineering Kit 精确锁定同一版本;官方 Bundle 由同版本三包生成并保留来源身份、摘要与完整性检查",
2233
+ "调用方提供 input/output/error 流(默认进程标准流);领域分组、容量切分与流接收责任归调用方"
2234
+ ],
2235
+ "inputs": [
2236
+ "恰好包含 operation(canonical-json)与 inputs(非空有序数组,每项 {document})的一个 JSON 文档;不支持 NDJSON、会话协议或数组自动探测"
2237
+ ],
2238
+ "outputs": [
2239
+ "{results:[{inputIndex,exitCode,response}]};成功项 response 为原机制结果,失败项为原 CLI 错误对象,顺序与输入一致"
2240
+ ],
2241
+ "sideEffects": [
2242
+ "无(逐项经既有纯函数分派器执行;只写调用方提供的 output/error 流;无文件、网络、进程或残余状态副作用)"
2243
+ ],
2244
+ "failureSemantics": [
2245
+ "整批结构或容量拒绝向 error 流写一个批次错误对象并整体退出 2(TypeError 投影;details.kind 封闭为 batch-structure-invalid、batch-item-limit、batch-input-limit、batch-output-limit)",
2246
+ "单项机制失败按原 CLI 错误投影写入该项 response 并继续执行后续项;至少一项失败整体退出 2;不交付部分批次结果"
2247
+ ],
2248
+ "invariants": [
2249
+ "全部项的外层形状检查先于第一项执行;项顺序、重复项与逐项调用次数保持不变",
2250
+ "完整响应字节在确认未超输出上限前不发送;错误对象不重新排序或规范化"
2251
+ ],
2252
+ "ownedByCaller": [
2253
+ "领域分组与容量切分、请求间依赖关系的判断",
2254
+ "版本可用性与成熟度判断(since 0.19.0、candidate 由目录与 API 文档携带)、精确 pin 与来源身份绑定",
2255
+ "批次采用完成与领域验收判定"
2256
+ ],
2257
+ "routeElsewhere": [
2258
+ "需要并发、缓存、重试、跨项引用或自动拆分:由消费者保留原路径处理,或把真实共性缺口交回 Foundation 形成最小能力合同",
2259
+ "本批未支持的机制(schema 批量校验、self-check、固定集合写入等)保留各自既有公共入口"
2260
+ ]
2261
+ },
2172
2262
  {
2173
2263
  "id": "foundation.kit.plugin-verification",
2174
2264
  "intent": "保留完整插件布局,增加 Qoder 与 WorkBuddy 专属生产生命周期 driver,并把结构合同与宿主语义分开",