skill-family-engineering-kit 0.26.0 → 0.27.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,23 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release-skill:changelog:start version=0.27.0 locale=en baseline=sha256:788200e7009ed97f33b3b4d407854f84ca89240b9a9ee02043413898ba95a66c -->
4
+ ## [0.27.0] - 2026-10-21
5
+
6
+ Engineering Kit 0.27.0 adds the public function `runRegisterExisting` and the CLI sub-action `skill-family-kit check register-existing` under the existing `check` command. The four top-level commands remain `scaffold`, `adopt-plan`, `projection`, and `check`. The sub-action is the only legal first write of `.foundation/file-registry.json`, `skill-family.project-manifest.json`, and `skill-family.managed-file-lock.json` into a nonempty root that already has a valid `profile.json`. Relock never seeds. Scaffold still refuses nonempty directories. Adopt-plan remains read-only. Projection still requires an existing legal registry.
7
+
8
+ ### Changed
9
+
10
+ - Add the public function `runRegisterExisting` and the CLI `skill-family-kit check register-existing`. The API `root` must be an absolute project working directory; the CLI resolves the current directory or a relative path to an absolute path first. `--handwritten` is required and non-empty.
11
+ - Missing all three closed-world documents yields exclusive create. All three present and byte-identical yields idempotent success with zero write. Any other combination, class overlap, or drifted bytes refuses with zero overwrite.
12
+ - Relock still never seeds a missing registry. Scaffold still refuses nonempty directories. Adopt-plan remains strictly read-only. Projection and later relock still require an existing legal registry.
13
+ - The package moves to 0.27.0 with the other three units. Contracts specification remains 1.20.0. Published 0.26.0 capabilities are unchanged and are not redone.
14
+
15
+ ### Upgrade Notes
16
+
17
+ Pin the three Foundation npm packages to exactly 0.27.0 and keep the independent Plugin at that release version. Contracts specification 1.20.0 remains a separate coordinate from npm package versions. Consume the actual published version's public interfaces and sources. First nonempty registration does not prove business qualification or completed initialization. This note does not replace post-publish verification.
18
+ <!-- release-skill:changelog:end version=0.27.0 locale=en -->
19
+
20
+
3
21
  <!-- release-skill:changelog:start version=0.26.0 locale=en baseline=sha256:f92651ad31301672d84ced913199520f2f7868c15881a51766064a9a2b11922c -->
4
22
  ## [0.26.0] - 2026-10-17
5
23
 
@@ -1,5 +1,23 @@
1
1
  # 变更日志
2
2
 
3
+ <!-- release-skill:changelog:start version=0.27.0 locale=zh-CN baseline=sha256:1a04833defa7c8007013debe70f397bb051a7cfc4d22a1eac0a11cfe0fe4fe63 -->
4
+ ## [0.27.0] - 2026-10-21
5
+
6
+ Engineering Kit 0.27.0 在既有 `check` 下新增公共函数 `runRegisterExisting` 与 CLI 子动作 `skill-family-kit check register-existing`。四个顶层命令仍为 `scaffold`、`adopt-plan`、`projection`、`check`。该子动作是已有有效 `profile.json` 的非空根首次写入 `.foundation/file-registry.json`、`skill-family.project-manifest.json`、`skill-family.managed-file-lock.json` 的唯一合法入口。`relock` 不为缺锁工程播种。`scaffold` 仍拒绝非空目录。`adopt-plan` 仍只读。`projection` 仍要求已有合法登记。
7
+
8
+ ### 变更
9
+
10
+ - 新增公共函数 `runRegisterExisting` 与 CLI `skill-family-kit check register-existing`。API 的 `root` 必须是绝对项目工作目录;CLI 会把当前目录或相对路径先解析成绝对路径。`--handwritten` 必填且非空。
11
+ - 三份闭域文件均不存在时排他创建;三份均在且字节一致时幂等成功且零写入;任一其他组合、分类重叠或字节漂移均拒绝且零覆盖。
12
+ - `relock` 仍不为缺锁工程播种。`scaffold` 仍拒绝非空目录。`adopt-plan` 仍严格只读。`projection` 与后续 `relock` 仍要求已有合法登记。
13
+ - 包版本与其他三单元锁步到 0.27.0。Contracts 规格仍为 1.20.0。已发布的 0.26.0 能力保持原样,本版本不重做。
14
+
15
+ ### 升级说明
16
+
17
+ 三个 Foundation npm 包须精确锁定 0.27.0,独立插件与三包保持相同发布版本。Contracts 规格仍为 1.20.0,与 npm 包版本分别处理。消费以实际发布版本的公开接口和源码为准。首次非空登记不证明业务资格或初始化完成。本说明不替代发布后验证。
18
+ <!-- release-skill:changelog:end version=0.27.0 locale=zh-CN -->
19
+
20
+
3
21
  <!-- release-skill:changelog:start version=0.26.0 locale=zh-CN baseline=sha256:3437859b22ecdad6bc0766dccf3d8b3ed7f1eb9240a9b898f1a2628a092f7143 -->
4
22
  ## [0.26.0] - 2026-10-17
5
23
 
package/README.md CHANGED
@@ -4,29 +4,25 @@
4
4
 
5
5
  # skill-family-engineering-kit
6
6
 
7
- <!-- release-skill:release-version: 0.26.0 -->
7
+ <!-- release-skill:release-version: 0.27.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.26.0** (2026-10-17)
12
+ **0.27.0** (2026-10-21)
13
13
 
14
- Version 0.26.0 extends shared read-only static loading checks to seven hosts through the existing runHostLoadingCheck function and skill-family-kit check host-loading CLI action. The four top-level commands scaffold, adopt-plan, projection, and check remain unchanged; no new top-level command or public API is added. Checks do not start hosts, models, hooks, or scripts, access the network, or write files.
14
+ Engineering Kit 0.27.0 adds the public function `runRegisterExisting` and the CLI sub-action `skill-family-kit check register-existing` under the existing `check` command. The four top-level commands remain `scaffold`, `adopt-plan`, `projection`, and `check`. The sub-action is the only legal first write of `.foundation/file-registry.json`, `skill-family.project-manifest.json`, and `skill-family.managed-file-lock.json` into a nonempty root that already has a valid `profile.json`. Relock never seeds. Scaffold still refuses nonempty directories. Adopt-plan remains read-only. Projection still requires an existing legal registry.
15
15
 
16
16
  **Changed**
17
17
 
18
- - Add shared static loading checks for seven hosts. The exact host versions, categories, and project directories are listed in the authoritative [NATIVE_HOSTS table](src/host-loading-native.mjs); this internal table is not a package-root public export.
19
- - Retain Codex CLI 0.154.0 project .agents/skills support and its existing activationRules mechanism.
20
- - Apply each host’s own discovery, parsing, ignore, name-competition, and local-file flag rules. Report Cursor menu, completion, and model metadata separately.
21
- - Only modelMetadata.* for Cursor CLI 2026.09.10-fd3934a may use source-reviewed-unexecuted, labeled “源码核实、未作原生运行校准” (source reviewed; not calibrated through native execution). This is not native runtime calibration and does not mean the check starts the host.
22
- - Other native-observed markers mean the check uses previously calibrated native rules; they do not mean this check starts the host.
23
- - The API project root must be an absolute working directory; the CLI resolves relative input to an absolute path first. A missing or unbindable project root returns 2. A missing, non-directory, or empty skill container within an existing project returns 1. Proven local loading blockers return 1; specific uncovered behavior or unknown competition returns 2 and takes precedence over 1. A fully covered static scope without blockers returns 0; normal skills cannot mask blockers or uncovered behavior. Only Codex supports activationRules; the seven other hosts accept only omission or null, and any other value, including an empty array, returns 2.
24
- - Retain link-containment and read boundaries. Uncalibrated actual competition, uncalibrated WorkBuddy optional metadata or version-source forms and icon resolution, Cursor completion string false, and CodeBuddy block scalars without proven equivalence remain specifically uncovered. Do not guess success or return 2 permanently for all ordinary input.
25
- - Exit 0 proves only static-check success. It does not prove final activation, installation, update, session selection, real triggering, or business execution. Codex evidence cannot establish calibration for other hosts.
18
+ - Add the public function `runRegisterExisting` and the CLI `skill-family-kit check register-existing`. The API `root` must be an absolute project working directory; the CLI resolves the current directory or a relative path to an absolute path first. `--handwritten` is required and non-empty.
19
+ - Missing all three closed-world documents yields exclusive create. All three present and byte-identical yields idempotent success with zero write. Any other combination, class overlap, or drifted bytes refuses with zero overwrite.
20
+ - Relock still never seeds a missing registry. Scaffold still refuses nonempty directories. Adopt-plan remains strictly read-only. Projection and later relock still require an existing legal registry.
21
+ - The package moves to 0.27.0 with the other three units. Contracts specification remains 1.20.0. Published 0.26.0 capabilities are unchanged and are not redone.
26
22
 
27
23
  **Upgrade Notes**
28
24
 
29
- Pin skill-family-engineering-kit, skill-family-contracts, skill-family-harness-node, and the independent Plugin to exactly 0.26.0 in lockstep. Contracts specification 1.20.0 remains separate from package versions and does not advance with Kit. Consume actual published public interfaces for the exact host version and category. Release notes do not replace post-publish verification or formal consumer acceptance. Exit 0 is not an upgrade-safety guarantee or evidence of production validation.
25
+ Pin the three Foundation npm packages to exactly 0.27.0 and keep the independent Plugin at that release version. Contracts specification 1.20.0 remains a separate coordinate from npm package versions. Consume the actual published version's public interfaces and sources. First nonempty registration does not prove business qualification or completed initialization. This note does not replace post-publish verification.
30
26
  <!-- release-skill:managed:end id=latest-release -->
31
27
 
32
28
  ## Governance Check (0.22.0)
@@ -69,7 +65,7 @@ Kit is the "engineering stage" layer, depending on the Harness and Contracts. It
69
65
 
70
66
  ## Installation and Minimal Example
71
67
 
72
- This package version is 0.26.0; version 0.24.1 has been formally published. To verify a working tree before formal publication, build all three tarballs into one temporary directory and install those exact files:
68
+ This package version is 0.27.0; version 0.24.1 has been formally published. To verify a working tree before formal publication, build all three tarballs into one temporary directory and install those exact files:
73
69
 
74
70
  ```sh
75
71
  pack_dir="$(mktemp -d)"
@@ -77,21 +73,21 @@ pack_dir="$(mktemp -d)"
77
73
  (cd packages/skill-family-harness-node && pnpm pack --pack-destination "$pack_dir")
78
74
  (cd packages/skill-family-engineering-kit && pnpm pack --pack-destination "$pack_dir")
79
75
  mkdir "$pack_dir/consumer" && (cd "$pack_dir/consumer" && npm init -y)
80
- (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.26.0.tgz" "$pack_dir/skill-family-harness-node-0.26.0.tgz" "$pack_dir/skill-family-engineering-kit-0.26.0.tgz")
76
+ (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.27.0.tgz" "$pack_dir/skill-family-harness-node-0.27.0.tgz" "$pack_dir/skill-family-engineering-kit-0.27.0.tgz")
81
77
  ```
82
78
 
83
- The registry installation below requires exact version 0.26.0 to be formally available:
79
+ The registry installation below requires exact version 0.27.0 to be formally available:
84
80
 
85
81
  ```sh
86
- npm install --save-dev skill-family-engineering-kit@0.26.0
87
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit --help
88
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
89
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale en --uses ./uses.json
90
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit projection --root <repo>
91
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit check --root <repo>
82
+ npm install --save-dev skill-family-engineering-kit@0.27.0
83
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit --help
84
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
85
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale en --uses ./uses.json
86
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit projection --root <repo>
87
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit check --root <repo>
92
88
  ```
93
89
 
94
- 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.26.0 -- skill-family-kit --help`.
90
+ 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.27.0 -- skill-family-kit --help`.
95
91
 
96
92
  ### Engineering declarations (available since 0.24.0)
97
93
 
package/README.zh-CN.md CHANGED
@@ -5,29 +5,25 @@
5
5
 
6
6
  # skill-family-engineering-kit
7
7
 
8
- <!-- release-skill:release-version: 0.26.0 -->
8
+ <!-- release-skill:release-version: 0.27.0 -->
9
9
 
10
10
  开发与 CI 阶段使用的工程工具包。**恰好四个**顶层命令,没有第五个:
11
11
 
12
12
  <!-- release-skill:managed:start id=latest-release -->
13
- **0.26.0** (2026-10-17)
13
+ **0.27.0** (2026-10-21)
14
14
 
15
- 0.26.0 版本通过既有公共函数 `runHostLoadingCheck` 与 CLI 子动作 `skill-family-kit check host-loading`,扩展对七宿主的共享只读静态加载检查能力。四顶层命令 `scaffold`、`adopt-plan`、`projection`、`check` 保持不变,未新增顶层命令或公共 API。检查不启动宿主、模型、hook 或脚本,不联网、不写文件。
15
+ Engineering Kit 0.27.0 在既有 `check` 下新增公共函数 `runRegisterExisting` 与 CLI 子动作 `skill-family-kit check register-existing`。四个顶层命令仍为 `scaffold`、`adopt-plan`、`projection`、`check`。该子动作是已有有效 `profile.json` 的非空根首次写入 `.foundation/file-registry.json`、`skill-family.project-manifest.json`、`skill-family.managed-file-lock.json` 的唯一合法入口。`relock` 不为缺锁工程播种。`scaffold` 仍拒绝非空目录。`adopt-plan` 仍只读。`projection` 仍要求已有合法登记。
16
16
 
17
17
  **变更**
18
18
 
19
- - 新增七宿主共享静态加载检查;精确宿主版本、类别与项目目录见权威 [NATIVE_HOSTS 表](src/host-loading-native.mjs)。该内部表不是包根公共导出。
20
- - **兼容性保留**:Codex CLI 0.154.0 的 `.agents/skills` 项目结构继续支持,其 `activationRules` 机制保持可用。
21
- - **检查逻辑**:各宿主独立执行发现、解析、忽略、名称竞争与局部文件标志判断。Cursor 的菜单、补全与模型元数据三类行为分别报告。
22
- - **证据例外**:仅当 `modelMetadata.*` 字段来自 Cursor CLI 2026.09.10-fd3934a 版本时,允许标注 `source-reviewed-unexecuted`,文字为“源码核实、未作原生运行校准”。该标记不表示原生运行已校准,也不代表本次检查启动宿主。
23
- - **标记语义**:其余 `native-observed` 标记仅表示采用已有原生校准规则,不表示本次检查启动宿主。
24
- - **边界与退出码**: 项目 root 必须为绝对工作目录,CLI 先将相对输入解析为绝对路径。 项目根不存在或不可绑定 → 退出码 2。 项目存在但技能容器缺失、非目录或为空 → 退出码 1。 已证明本地加载阻断 → 退出码 1。 具体未覆盖或未知竞争 → 退出码 2,且优先于 1。 普通完整静态范围无阻断 → 退出码 0;已有正常技能不能掩盖阻断或未覆盖。 Codex 支持原有 `activationRules`;其余七宿主仅接受省略或 `null`,其他值(包括空数组)返回 2。
25
- - **数据边界**:保留链接收容与读取边界。未校准的实际竞争、WorkBuddy 尚未校准的可选元信息或版本来源形态及图标解析、Cursor 补全字符串 `false`、CodeBuddy 未证明等价的块标量等,均按具体未覆盖处理,不猜测成功,也不将所有普通输入永久返回 2。
26
- - **静态通过不等于业务成功**:退出码 0 仅表示静态检查通过,不证明最终启用、安装、更新、会话选择、真实触发或业务执行成功。不得复用 Codex 证据宣称其他宿主已校准。
19
+ - 新增公共函数 `runRegisterExisting` 与 CLI `skill-family-kit check register-existing`。API 的 `root` 必须是绝对项目工作目录;CLI 会把当前目录或相对路径先解析成绝对路径。`--handwritten` 必填且非空。
20
+ - 三份闭域文件均不存在时排他创建;三份均在且字节一致时幂等成功且零写入;任一其他组合、分类重叠或字节漂移均拒绝且零覆盖。
21
+ - `relock` 仍不为缺锁工程播种。`scaffold` 仍拒绝非空目录。`adopt-plan` 仍严格只读。`projection` 与后续 `relock` 仍要求已有合法登记。
22
+ - 包版本与其他三单元锁步到 0.27.0。Contracts 规格仍为 1.20.0。已发布的 0.26.0 能力保持原样,本版本不重做。
27
23
 
28
24
  **升级说明**
29
25
 
30
- 三个 Foundation npm 包(`skill-family-engineering-kit`、`skill-family-contracts`、`skill-family-harness-node`)及独立 Plugin 均需精确锁定至 0.26.0 版本,实现四单元锁步。 Contracts 规格保持 1.20.0,与包版本为独立坐标,不随 Kit 升级。 消费方应按精确宿主版本与类别,使用实际已发布的公共接口。 发布说明不替代发布后验证或正式消费者验收。 退出码 0 不构成升级安全保证,不等同于可安全升级或已通过生产验证。
26
+ 三个 Foundation npm 包须精确锁定 0.27.0,独立插件与三包保持相同发布版本。Contracts 规格仍为 1.20.0,与 npm 包版本分别处理。消费以实际发布版本的公开接口和源码为准。首次非空登记不证明业务资格或初始化完成。本说明不替代发布后验证。
31
27
  <!-- release-skill:managed:end id=latest-release -->
32
28
 
33
29
  ## 治理检查(0.22.0)
@@ -68,7 +64,7 @@ Kit 是「工程阶段」层,依赖 Harness 与 Contracts。它只做四件事
68
64
 
69
65
  ## 安装和最小示例
70
66
 
71
- 本包版本为 0.26.0;0.24.1 已正式发布。验证尚未正式发布的工作树时,先把三个包分别打入同一个临时目录,再安装这三个精确 tarball:
67
+ 本包版本为 0.27.0;0.24.1 已正式发布。验证尚未正式发布的工作树时,先把三个包分别打入同一个临时目录,再安装这三个精确 tarball:
72
68
 
73
69
  ```sh
74
70
  pack_dir="$(mktemp -d)"
@@ -76,21 +72,21 @@ pack_dir="$(mktemp -d)"
76
72
  (cd packages/skill-family-harness-node && pnpm pack --pack-destination "$pack_dir")
77
73
  (cd packages/skill-family-engineering-kit && pnpm pack --pack-destination "$pack_dir")
78
74
  mkdir "$pack_dir/consumer" && (cd "$pack_dir/consumer" && npm init -y)
79
- (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.26.0.tgz" "$pack_dir/skill-family-harness-node-0.26.0.tgz" "$pack_dir/skill-family-engineering-kit-0.26.0.tgz")
75
+ (cd "$pack_dir/consumer" && npm install "$pack_dir/skill-family-contracts-0.27.0.tgz" "$pack_dir/skill-family-harness-node-0.27.0.tgz" "$pack_dir/skill-family-engineering-kit-0.27.0.tgz")
80
76
  ```
81
77
 
82
- 以下 registry 安装方式以精确版本 0.26.0 已正式可用为前提:
78
+ 以下 registry 安装方式以精确版本 0.27.0 已正式可用为前提:
83
79
 
84
80
  ```sh
85
- npm install --save-dev skill-family-engineering-kit@0.26.0
86
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit --help
87
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
88
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json
89
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit projection --root <repo>
90
- npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit check --root <repo>
81
+ npm install --save-dev skill-family-engineering-kit@0.27.0
82
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit --help
83
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
84
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit adopt-plan --root <repo> --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json
85
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit projection --root <repo>
86
+ npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit check --root <repo>
91
87
  ```
92
88
 
93
- 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.26.0 -- skill-family-kit --help`。
89
+ 以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.27.0 -- skill-family-kit --help`。
94
90
 
95
91
  ### 工程声明调用(自 0.24.0 提供)
96
92
 
@@ -1507,6 +1507,57 @@
1507
1507
  "Foundation entry contract: check entries"
1508
1508
  ]
1509
1509
  },
1510
+ {
1511
+ "id": "foundation.kit.register-existing",
1512
+ "intent": "Seed the three official closed-world documents for a nonempty project that already has a valid profile.json and does not yet have a legal registry",
1513
+ "useWhen": [
1514
+ "Need the only legal first write of .foundation/file-registry.json, skill-family.project-manifest.json, and skill-family.managed-file-lock.json into a nonempty root",
1515
+ "Need an official first-nonempty registration that is exclusive-create, idempotent on identical bytes, and refuse-with-zero-overwrite otherwise"
1516
+ ],
1517
+ "doNotUseWhen": [
1518
+ "The target is empty (use scaffold)",
1519
+ "The three official documents already exist and a later handwritten file must be admitted (use check relock)",
1520
+ "Need a read-only inventory of an existing project (use adopt-plan)",
1521
+ "Need to overwrite drifted closed-world bytes"
1522
+ ],
1523
+ "prerequisites": [
1524
+ "Caller supplies an absolute project working directory",
1525
+ "profile.json exists at the target root and is contract-valid, including profile.adoption.foundation_profile.id",
1526
+ "handwritten classification list is non-empty"
1527
+ ],
1528
+ "inputs": [
1529
+ "Absolute project working directory root",
1530
+ "Non-empty handwritten globs or relative paths",
1531
+ "Optional engineering JSON, trackedToolLocks paths, and gitignore-style artifacts patterns"
1532
+ ],
1533
+ "outputs": [
1534
+ "register-existing report (kind skill-family.register-existing-report)",
1535
+ "On first create: exclusive publication of the three closed-world documents; on identical bytes: idempotent success with zero write; otherwise refuse with zero overwrite"
1536
+ ],
1537
+ "sideEffects": [
1538
+ "Writes at most the three closed-world documents; never overwrites mismatched existing bytes; does not scaffold, apply adopt-plan, or seed via relock"
1539
+ ],
1540
+ "failureSemantics": [
1541
+ "Missing or invalid profile.json refuses",
1542
+ "Empty handwritten list refuses",
1543
+ "Class overlap among handwritten, artifacts, and trackedToolLocks refuses",
1544
+ "Any incomplete or drifted combination of the three documents refuses with zero overwrite"
1545
+ ],
1546
+ "invariants": [
1547
+ "Adds no fifth top-level command; it runs as the check register-existing sub-action",
1548
+ "Relock never seeds; this sub-action is the only legal first write of the three documents into a nonempty root",
1549
+ "Scaffold still refuses nonempty directories; adopt-plan remains read-only"
1550
+ ],
1551
+ "ownedByCaller": [
1552
+ "Choosing handwritten, artifacts, and trackedToolLocks classifications",
1553
+ "Remediation after a refuse-with-zero-overwrite result"
1554
+ ],
1555
+ "routeElsewhere": [
1556
+ "Empty target: scaffold",
1557
+ "Existing legal registry plus new handwritten files: check relock",
1558
+ "Read-only nonempty inventory: adopt-plan"
1559
+ ]
1560
+ },
1510
1561
  {
1511
1562
  "id": "foundation.kit.relock",
1512
1563
  "intent": "Run the controlled relock transaction: register new handwritten files by default, or persistent tool-lock paths with explicit trackedToolLocks selection; update the registry and managed-file lock in the existing transaction without hashing tool-lock contents.",
@@ -996,6 +996,32 @@
996
996
  "packages/skill-family-engineering-kit/test/cli.test.mjs"
997
997
  ]
998
998
  },
999
+ {
1000
+ "id": "foundation.kit.register-existing",
1001
+ "package": "skill-family-engineering-kit",
1002
+ "layer": "engineering-kit",
1003
+ "since": "0.27.0",
1004
+ "stability": "candidate",
1005
+ "migration": "none",
1006
+ "promotionPolicy": "consumer-transparent",
1007
+ "adoptionScopes": ["engineering-kit"],
1008
+ "entrypoints": [
1009
+ "runRegisterExisting (packages/skill-family-engineering-kit/src/register-existing.mjs)",
1010
+ "registerExistingAction (packages/skill-family-engineering-kit/src/register-existing.mjs)",
1011
+ "REGISTER_EXISTING_REPORT_KIND (packages/skill-family-engineering-kit/src/register-existing.mjs)"
1012
+ ],
1013
+ "sourceRefs": [
1014
+ "packages/skill-family-engineering-kit/src/register-existing.mjs",
1015
+ "packages/skill-family-engineering-kit/src/cli.mjs",
1016
+ "packages/skill-family-engineering-kit/src/index.mjs"
1017
+ ],
1018
+ "positiveTestRefs": [
1019
+ "packages/skill-family-engineering-kit/test/register-existing.test.mjs"
1020
+ ],
1021
+ "negativeTestRefs": [
1022
+ "packages/skill-family-engineering-kit/test/register-existing.test.mjs"
1023
+ ]
1024
+ },
999
1025
  {
1000
1026
  "id": "foundation.kit.relock",
1001
1027
  "package": "skill-family-engineering-kit",
@@ -1506,6 +1506,57 @@
1506
1506
  "Foundation 入口契约:check entries"
1507
1507
  ]
1508
1508
  },
1509
+ {
1510
+ "id": "foundation.kit.register-existing",
1511
+ "intent": "为已有有效 profile.json、尚未具备合法登记的非空工程,播种三份官方闭域文件",
1512
+ "useWhen": [
1513
+ "需要把 .foundation/file-registry.json、skill-family.project-manifest.json、skill-family.managed-file-lock.json 合法地首次写入非空根",
1514
+ "需要官方首次非空登记:三份皆无则排他创建,字节一致则幂等零写入,其余情况拒绝且零覆盖"
1515
+ ],
1516
+ "doNotUseWhen": [
1517
+ "目标为空(走 scaffold)",
1518
+ "三份官方文件已存在、只需纳入后来的手写文件(走 check relock)",
1519
+ "只需只读盘点既有工程(走 adopt-plan)",
1520
+ "需要覆盖已漂移的闭域字节"
1521
+ ],
1522
+ "prerequisites": [
1523
+ "调用方给出绝对项目工作目录",
1524
+ "目标根已有合同有效的 profile.json,且含 profile.adoption.foundation_profile.id",
1525
+ "手写分类清单非空"
1526
+ ],
1527
+ "inputs": [
1528
+ "绝对项目工作目录 root",
1529
+ "非空手写 glob 或相对路径",
1530
+ "可选 engineering JSON、trackedToolLocks 路径,以及 gitignore 风格的 artifacts 模式"
1531
+ ],
1532
+ "outputs": [
1533
+ "register-existing 报告(kind skill-family.register-existing-report)",
1534
+ "首次创建时排他写入三份闭域文件;字节一致时幂等成功且零写入;否则拒绝且零覆盖"
1535
+ ],
1536
+ "sideEffects": [
1537
+ "最多写入三份闭域文件;从不覆盖不匹配的既有字节;不 scaffold、不 apply adopt-plan、不经 relock 播种"
1538
+ ],
1539
+ "failureSemantics": [
1540
+ "缺少或无效的 profile.json 拒绝",
1541
+ "空手写清单拒绝",
1542
+ "handwritten、artifacts、trackedToolLocks 分类重叠拒绝",
1543
+ "三份文件任一不完整或字节漂移时拒绝且零覆盖"
1544
+ ],
1545
+ "invariants": [
1546
+ "不新增第五个顶层命令,落在 check register-existing 子动作",
1547
+ "relock 不为缺锁工程播种;本子动作是非空根首次写入三份文件的唯一合法入口",
1548
+ "scaffold 仍拒绝非空目录;adopt-plan 仍只读"
1549
+ ],
1550
+ "ownedByCaller": [
1551
+ "选择 handwritten、artifacts、trackedToolLocks 分类",
1552
+ "拒绝且零覆盖之后的整改"
1553
+ ],
1554
+ "routeElsewhere": [
1555
+ "空目标:scaffold",
1556
+ "已有合法登记且需纳入新手写文件:check relock",
1557
+ "非空只读盘点:adopt-plan"
1558
+ ]
1559
+ },
1509
1560
  {
1510
1561
  "id": "foundation.kit.relock",
1511
1562
  "intent": "运行受控 relock 事务:默认登记新增手写文件;显式选择 trackedToolLocks 时登记持久工具锁路径,并在原事务中同步 registry 与受管文件锁。工具锁内容不纳入受管摘要。",
@@ -1507,6 +1507,57 @@
1507
1507
  "Foundation entry contract: check entries"
1508
1508
  ]
1509
1509
  },
1510
+ {
1511
+ "id": "foundation.kit.register-existing",
1512
+ "intent": "Seed the three official closed-world documents for a nonempty project that already has a valid profile.json and does not yet have a legal registry",
1513
+ "useWhen": [
1514
+ "Need the only legal first write of .foundation/file-registry.json, skill-family.project-manifest.json, and skill-family.managed-file-lock.json into a nonempty root",
1515
+ "Need an official first-nonempty registration that is exclusive-create, idempotent on identical bytes, and refuse-with-zero-overwrite otherwise"
1516
+ ],
1517
+ "doNotUseWhen": [
1518
+ "The target is empty (use scaffold)",
1519
+ "The three official documents already exist and a later handwritten file must be admitted (use check relock)",
1520
+ "Need a read-only inventory of an existing project (use adopt-plan)",
1521
+ "Need to overwrite drifted closed-world bytes"
1522
+ ],
1523
+ "prerequisites": [
1524
+ "Caller supplies an absolute project working directory",
1525
+ "profile.json exists at the target root and is contract-valid, including profile.adoption.foundation_profile.id",
1526
+ "handwritten classification list is non-empty"
1527
+ ],
1528
+ "inputs": [
1529
+ "Absolute project working directory root",
1530
+ "Non-empty handwritten globs or relative paths",
1531
+ "Optional engineering JSON, trackedToolLocks paths, and gitignore-style artifacts patterns"
1532
+ ],
1533
+ "outputs": [
1534
+ "register-existing report (kind skill-family.register-existing-report)",
1535
+ "On first create: exclusive publication of the three closed-world documents; on identical bytes: idempotent success with zero write; otherwise refuse with zero overwrite"
1536
+ ],
1537
+ "sideEffects": [
1538
+ "Writes at most the three closed-world documents; never overwrites mismatched existing bytes; does not scaffold, apply adopt-plan, or seed via relock"
1539
+ ],
1540
+ "failureSemantics": [
1541
+ "Missing or invalid profile.json refuses",
1542
+ "Empty handwritten list refuses",
1543
+ "Class overlap among handwritten, artifacts, and trackedToolLocks refuses",
1544
+ "Any incomplete or drifted combination of the three documents refuses with zero overwrite"
1545
+ ],
1546
+ "invariants": [
1547
+ "Adds no fifth top-level command; it runs as the check register-existing sub-action",
1548
+ "Relock never seeds; this sub-action is the only legal first write of the three documents into a nonempty root",
1549
+ "Scaffold still refuses nonempty directories; adopt-plan remains read-only"
1550
+ ],
1551
+ "ownedByCaller": [
1552
+ "Choosing handwritten, artifacts, and trackedToolLocks classifications",
1553
+ "Remediation after a refuse-with-zero-overwrite result"
1554
+ ],
1555
+ "routeElsewhere": [
1556
+ "Empty target: scaffold",
1557
+ "Existing legal registry plus new handwritten files: check relock",
1558
+ "Read-only nonempty inventory: adopt-plan"
1559
+ ]
1560
+ },
1510
1561
  {
1511
1562
  "id": "foundation.kit.relock",
1512
1563
  "intent": "Run the controlled relock transaction: register new handwritten files by default, or persistent tool-lock paths with explicit trackedToolLocks selection; update the registry and managed-file lock in the existing transaction without hashing tool-lock contents.",
@@ -996,6 +996,32 @@
996
996
  "packages/skill-family-engineering-kit/test/cli.test.mjs"
997
997
  ]
998
998
  },
999
+ {
1000
+ "id": "foundation.kit.register-existing",
1001
+ "package": "skill-family-engineering-kit",
1002
+ "layer": "engineering-kit",
1003
+ "since": "0.27.0",
1004
+ "stability": "candidate",
1005
+ "migration": "none",
1006
+ "promotionPolicy": "consumer-transparent",
1007
+ "adoptionScopes": ["engineering-kit"],
1008
+ "entrypoints": [
1009
+ "runRegisterExisting (packages/skill-family-engineering-kit/src/register-existing.mjs)",
1010
+ "registerExistingAction (packages/skill-family-engineering-kit/src/register-existing.mjs)",
1011
+ "REGISTER_EXISTING_REPORT_KIND (packages/skill-family-engineering-kit/src/register-existing.mjs)"
1012
+ ],
1013
+ "sourceRefs": [
1014
+ "packages/skill-family-engineering-kit/src/register-existing.mjs",
1015
+ "packages/skill-family-engineering-kit/src/cli.mjs",
1016
+ "packages/skill-family-engineering-kit/src/index.mjs"
1017
+ ],
1018
+ "positiveTestRefs": [
1019
+ "packages/skill-family-engineering-kit/test/register-existing.test.mjs"
1020
+ ],
1021
+ "negativeTestRefs": [
1022
+ "packages/skill-family-engineering-kit/test/register-existing.test.mjs"
1023
+ ]
1024
+ },
999
1025
  {
1000
1026
  "id": "foundation.kit.relock",
1001
1027
  "package": "skill-family-engineering-kit",
@@ -1506,6 +1506,57 @@
1506
1506
  "Foundation 入口契约:check entries"
1507
1507
  ]
1508
1508
  },
1509
+ {
1510
+ "id": "foundation.kit.register-existing",
1511
+ "intent": "为已有有效 profile.json、尚未具备合法登记的非空工程,播种三份官方闭域文件",
1512
+ "useWhen": [
1513
+ "需要把 .foundation/file-registry.json、skill-family.project-manifest.json、skill-family.managed-file-lock.json 合法地首次写入非空根",
1514
+ "需要官方首次非空登记:三份皆无则排他创建,字节一致则幂等零写入,其余情况拒绝且零覆盖"
1515
+ ],
1516
+ "doNotUseWhen": [
1517
+ "目标为空(走 scaffold)",
1518
+ "三份官方文件已存在、只需纳入后来的手写文件(走 check relock)",
1519
+ "只需只读盘点既有工程(走 adopt-plan)",
1520
+ "需要覆盖已漂移的闭域字节"
1521
+ ],
1522
+ "prerequisites": [
1523
+ "调用方给出绝对项目工作目录",
1524
+ "目标根已有合同有效的 profile.json,且含 profile.adoption.foundation_profile.id",
1525
+ "手写分类清单非空"
1526
+ ],
1527
+ "inputs": [
1528
+ "绝对项目工作目录 root",
1529
+ "非空手写 glob 或相对路径",
1530
+ "可选 engineering JSON、trackedToolLocks 路径,以及 gitignore 风格的 artifacts 模式"
1531
+ ],
1532
+ "outputs": [
1533
+ "register-existing 报告(kind skill-family.register-existing-report)",
1534
+ "首次创建时排他写入三份闭域文件;字节一致时幂等成功且零写入;否则拒绝且零覆盖"
1535
+ ],
1536
+ "sideEffects": [
1537
+ "最多写入三份闭域文件;从不覆盖不匹配的既有字节;不 scaffold、不 apply adopt-plan、不经 relock 播种"
1538
+ ],
1539
+ "failureSemantics": [
1540
+ "缺少或无效的 profile.json 拒绝",
1541
+ "空手写清单拒绝",
1542
+ "handwritten、artifacts、trackedToolLocks 分类重叠拒绝",
1543
+ "三份文件任一不完整或字节漂移时拒绝且零覆盖"
1544
+ ],
1545
+ "invariants": [
1546
+ "不新增第五个顶层命令,落在 check register-existing 子动作",
1547
+ "relock 不为缺锁工程播种;本子动作是非空根首次写入三份文件的唯一合法入口",
1548
+ "scaffold 仍拒绝非空目录;adopt-plan 仍只读"
1549
+ ],
1550
+ "ownedByCaller": [
1551
+ "选择 handwritten、artifacts、trackedToolLocks 分类",
1552
+ "拒绝且零覆盖之后的整改"
1553
+ ],
1554
+ "routeElsewhere": [
1555
+ "空目标:scaffold",
1556
+ "已有合法登记且需纳入新手写文件:check relock",
1557
+ "非空只读盘点:adopt-plan"
1558
+ ]
1559
+ },
1509
1560
  {
1510
1561
  "id": "foundation.kit.relock",
1511
1562
  "intent": "运行受控 relock 事务:默认登记新增手写文件;显式选择 trackedToolLocks 时登记持久工具锁路径,并在原事务中同步 registry 与受管文件锁。工具锁内容不纳入受管摘要。",
@@ -1814,24 +1814,24 @@
1814
1814
  <tbody>
1815
1815
  <tr>
1816
1816
  <td><code>skill-family-contracts</code></td>
1817
- <td>0.26.0</td>
1817
+ <td>0.27.0</td>
1818
1818
  <td><a href="https://github.com/ifoohoo/skill-family-contracts">ifoohoo/skill-family-contracts</a></td>
1819
1819
  </tr>
1820
1820
  <tr>
1821
1821
  <td><code>skill-family-harness-node</code></td>
1822
- <td>0.26.0</td>
1822
+ <td>0.27.0</td>
1823
1823
  <td><a href="https://github.com/ifoohoo/skill-family-harness-node">ifoohoo/skill-family-harness-node</a></td>
1824
1824
  </tr>
1825
1825
  <tr>
1826
1826
  <td><code>skill-family-engineering-kit</code></td>
1827
- <td>0.26.0</td>
1827
+ <td>0.27.0</td>
1828
1828
  <td><a href="https://github.com/ifoohoo/skill-family-engineering-kit">ifoohoo/skill-family-engineering-kit</a></td>
1829
1829
  </tr>
1830
1830
  </tbody>
1831
1831
  </table>
1832
1832
  <h2 id="独立-Plugin">独立 Plugin<a class="headerlink" href="#独立-Plugin" title="Permanent link">&para;</a></h2>
1833
1833
  <ul>
1834
- <li><code>foundation-adoption-review</code>:0.26.0,公开镜像 <a href="https://github.com/ifoohoo/foundation-adoption-review">ifoohoo/foundation-adoption-review</a></li>
1834
+ <li><code>foundation-adoption-review</code>:0.27.0,公开镜像 <a href="https://github.com/ifoohoo/foundation-adoption-review">ifoohoo/foundation-adoption-review</a></li>
1835
1835
  <li><code>foundation-adoption-review</code>:只读采用诊断</li>
1836
1836
  <li><code>foundation-engineering-check</code>:只读静态工程审阅与证明读取</li>
1837
1837
  <li><code>foundation-initialize</code>:在明确授权下初始化目标工程,保留业务和人工判断</li>