skill-family-engineering-kit 0.3.0 → 0.4.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 +21 -0
- package/CHANGELOG.zh-CN.md +21 -0
- package/README.md +11 -12
- package/README.zh-CN.md +11 -12
- package/candidate/adoption-cli.mjs +67 -0
- package/candidate/adoption-mechanisms.mjs +69 -0
- package/candidate/index.mjs +3 -0
- package/candidate/profile-bundle.mjs +464 -15
- package/candidate/projection-bundle-cli.mjs +18 -0
- package/docs/agents/capability-catalog.en.json +1746 -1562
- package/docs/agents/capability-catalog.json +1029 -930
- package/docs/agents/capability-catalog.zh-CN.json +1746 -1562
- package/docs/architecture/index.html +10 -3
- package/docs/en/architecture/index.html +12 -3
- package/docs/public/status/index.html +3 -3
- package/docs/reference/api/harness/index.html +396 -1
- package/docs/search/search_index.json +1 -1
- package/package.json +3 -3
- package/release-notes/0.4.0.yaml +23 -0
- package/src/adopt-plan.mjs +26 -1
- package/src/index.mjs +5 -2
- package/src/migration.mjs +121 -1
- package/src/projection.mjs +1152 -266
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
<!-- release-skill:changelog:start version=0.4.0 locale=en baseline=sha256:b75bcca6a62cddc63d0a8d88faf268415aec803bcf00e04aacd797907d1ea6e8 -->
|
|
4
|
+
## [0.4.0] - 2026-08-16
|
|
5
|
+
|
|
6
|
+
This release adds the candidate adoption CLI and adoption mechanisms to the Engineering Kit while preserving the stable four-command surface and the 0.3.0 offline bundle.
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Adds the adoption-cli candidate, a stdin/stdout CLI that assesses adoption bindings, legacy exit lists, and legacy references through the migration manifest, and verifies managed-bundle identity and harness surface inventory.
|
|
11
|
+
- Adds the adoption-mechanisms candidate module as the shared implementation behind the adoption CLI.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Keeps the stable scaffold, adopt-plan, projection, and check commands unchanged.
|
|
16
|
+
- Carries forward the 0.3.0 Quickstart Profile v2 offline bundle (standalone validators selected by schema $id, full provenance recording) and the candidate plugin skill naming checker.
|
|
17
|
+
|
|
18
|
+
### Upgrade Notes
|
|
19
|
+
|
|
20
|
+
Version 0.4.0 is released on npm and the public mirror. The adoption CLI is a candidate entry point; invoke it through its explicit candidate subpath and pin the package to exactly 0.4.0.
|
|
21
|
+
<!-- release-skill:changelog:end version=0.4.0 locale=en -->
|
|
22
|
+
|
|
23
|
+
|
|
3
24
|
<!-- release-skill:changelog:start version=0.3.0 locale=en baseline=sha256:4c017d6121ff888f90ad9a4ef958b4fee3e25c8d1b69be61cc1ba1f79d527163 -->
|
|
4
25
|
## [0.3.0] - 2026-08-12
|
|
5
26
|
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# 变更日志
|
|
2
2
|
|
|
3
|
+
<!-- release-skill:changelog:start version=0.4.0 locale=zh-CN baseline=sha256:0305934fb2f833eff10b17014f551533bfca9e9e51d3820a5a1e62613a3edb6a -->
|
|
4
|
+
## [0.4.0] - 2026-08-16
|
|
5
|
+
|
|
6
|
+
本版为 Engineering Kit 新增候选 adoption CLI 与 adoption mechanisms,同时保持稳定四命令边界与 0.3.0 的离线 Bundle 不变。
|
|
7
|
+
|
|
8
|
+
### 新增
|
|
9
|
+
|
|
10
|
+
- 新增 adoption-cli 候选:基于 stdin/stdout 的 CLI,通过 migration manifest 评估 adoption 绑定、遗留 exit list 与遗留引用,并校验 managed-bundle 身份与 harness 表面清单。
|
|
11
|
+
- 新增 adoption-mechanisms 候选模块,作为 adoption CLI 的共享实现。
|
|
12
|
+
|
|
13
|
+
### 变更
|
|
14
|
+
|
|
15
|
+
- 稳定四命令(scaffold、adopt-plan、projection、check)保持不变。
|
|
16
|
+
- 延续 0.3.0 的 Quickstart Profile v2 离线 Bundle(按 schema $id 选择的 standalone validator、完整 provenance 记录)与候选插件技能命名检查器。
|
|
17
|
+
|
|
18
|
+
### 升级说明
|
|
19
|
+
|
|
20
|
+
0.4.0 已发布到 npm 与 public 镜像仓。adoption CLI 是候选入口,须经显式 candidate 子路径调用,并把包精确锁定为 0.4.0。
|
|
21
|
+
<!-- release-skill:changelog:end version=0.4.0 locale=zh-CN -->
|
|
22
|
+
|
|
23
|
+
|
|
3
24
|
<!-- release-skill:changelog:start version=0.3.0 locale=zh-CN baseline=sha256:ddb48e61ef87de545348880216ee283b5d0165305dd5dfd8e044929b93ec4673 -->
|
|
4
25
|
## [0.3.0] - 2026-08-12
|
|
5
26
|
|
package/README.md
CHANGED
|
@@ -4,29 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
# skill-family-engineering-kit
|
|
6
6
|
|
|
7
|
-
<!-- release-skill:release-version: 0.
|
|
7
|
+
<!-- release-skill:release-version: 0.4.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.
|
|
12
|
+
**0.4.0** (2026-08-16)
|
|
13
13
|
|
|
14
|
-
This
|
|
14
|
+
This release adds the candidate adoption CLI and adoption mechanisms to the Engineering Kit while preserving the stable four-command surface and the 0.3.0 offline bundle.
|
|
15
15
|
|
|
16
16
|
**Added**
|
|
17
17
|
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
- Adds a candidate plugin skill naming checker (policy JSON plus build-time CLI) that scans a plugin skills root and reports per-rule PASS/FAIL for the prefixed-name, description-signal, and routing-scope rules.
|
|
18
|
+
- Adds the adoption-cli candidate, a stdin/stdout CLI that assesses adoption bindings, legacy exit lists, and legacy references through the migration manifest, and verifies managed-bundle identity and harness surface inventory.
|
|
19
|
+
- Adds the adoption-mechanisms candidate module as the shared implementation behind the adoption CLI.
|
|
21
20
|
|
|
22
21
|
**Changed**
|
|
23
22
|
|
|
24
|
-
-
|
|
25
|
-
-
|
|
23
|
+
- Keeps the stable scaffold, adopt-plan, projection, and check commands unchanged.
|
|
24
|
+
- Carries forward the 0.3.0 Quickstart Profile v2 offline bundle (standalone validators selected by schema $id, full provenance recording) and the candidate plugin skill naming checker.
|
|
26
25
|
|
|
27
26
|
**Upgrade Notes**
|
|
28
27
|
|
|
29
|
-
Version 0.
|
|
28
|
+
Version 0.4.0 is released on npm and the public mirror. The adoption CLI is a candidate entry point; invoke it through its explicit candidate subpath and pin the package to exactly 0.4.0.
|
|
30
29
|
<!-- release-skill:managed:end id=latest-release -->
|
|
31
30
|
|
|
32
31
|
| Command | Purpose | Side effects |
|
|
@@ -47,7 +46,7 @@ Kit is the "engineering stage" layer, depending on the Harness and Contracts. It
|
|
|
47
46
|
## Installation and Minimal Example
|
|
48
47
|
|
|
49
48
|
```sh
|
|
50
|
-
npm install --save-dev skill-family-engineering-kit@0.
|
|
49
|
+
npm install --save-dev skill-family-engineering-kit@0.4.0
|
|
51
50
|
npm exec -- skill-family-kit --help
|
|
52
51
|
npm exec -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
|
|
53
52
|
npm exec -- skill-family-kit adopt-plan --root <repo>
|
|
@@ -55,7 +54,7 @@ npm exec -- skill-family-kit projection --root <repo>
|
|
|
55
54
|
npm exec -- skill-family-kit check --root <repo>
|
|
56
55
|
```
|
|
57
56
|
|
|
58
|
-
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.
|
|
57
|
+
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.4.0 -- skill-family-kit --help`.
|
|
59
58
|
|
|
60
59
|
### Report sub-action
|
|
61
60
|
|
|
@@ -79,7 +78,7 @@ import {
|
|
|
79
78
|
|
|
80
79
|
The generated Bundle selects standalone validators by schema `$id` and runs offline without Foundation packages, `node_modules`, or runtime Ajv. Its provenance binds Foundation sources, consumer schemas, payload bytes, tool versions, and the licenses of code that actually enters the Bundle.
|
|
81
80
|
|
|
82
|
-
Pass the returned `manifest` to the stable `runProjection` API; the helper does not write files or add a fifth top-level command. This subpath is public but **not stable**. Pin exactly `0.
|
|
81
|
+
Pass the returned `manifest` to the stable `runProjection` API; the helper does not write files or add a fifth top-level command. This subpath is public but **not stable**. Pin exactly `0.4.0` for v2; integrations that still require the v1 dependency-closure Bundle must stay pinned to exactly `0.2.1`.
|
|
83
82
|
|
|
84
83
|
### Host sub-action
|
|
85
84
|
|
package/README.zh-CN.md
CHANGED
|
@@ -5,29 +5,28 @@
|
|
|
5
5
|
|
|
6
6
|
# skill-family-engineering-kit
|
|
7
7
|
|
|
8
|
-
<!-- release-skill:release-version: 0.
|
|
8
|
+
<!-- release-skill:release-version: 0.4.0 -->
|
|
9
9
|
|
|
10
10
|
开发与 CI 阶段使用的工程工具包。**恰好四个**顶层命令,没有第五个:
|
|
11
11
|
|
|
12
12
|
<!-- release-skill:managed:start id=latest-release -->
|
|
13
|
-
**0.
|
|
13
|
+
**0.4.0** (2026-08-16)
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
本版为 Engineering Kit 新增候选 adoption CLI 与 adoption mechanisms,同时保持稳定四命令边界与 0.3.0 的离线 Bundle 不变。
|
|
16
16
|
|
|
17
17
|
**新增**
|
|
18
18
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
- 新增候选插件技能命名检查器(policy JSON 加构建期 CLI):扫描插件 skills 根目录,对前缀命名、description 领域信号与路由入口范围三条规则逐项输出 PASS/FAIL。
|
|
19
|
+
- 新增 adoption-cli 候选:基于 stdin/stdout 的 CLI,通过 migration manifest 评估 adoption 绑定、遗留 exit list 与遗留引用,并校验 managed-bundle 身份与 harness 表面清单。
|
|
20
|
+
- 新增 adoption-mechanisms 候选模块,作为 adoption CLI 的共享实现。
|
|
22
21
|
|
|
23
22
|
**变更**
|
|
24
23
|
|
|
25
|
-
-
|
|
26
|
-
-
|
|
24
|
+
- 稳定四命令(scaffold、adopt-plan、projection、check)保持不变。
|
|
25
|
+
- 延续 0.3.0 的 Quickstart Profile v2 离线 Bundle(按 schema $id 选择的 standalone validator、完整 provenance 记录)与候选插件技能命名检查器。
|
|
27
26
|
|
|
28
27
|
**升级说明**
|
|
29
28
|
|
|
30
|
-
0.
|
|
29
|
+
0.4.0 已发布到 npm 与 public 镜像仓。adoption CLI 是候选入口,须经显式 candidate 子路径调用,并把包精确锁定为 0.4.0。
|
|
31
30
|
<!-- release-skill:managed:end id=latest-release -->
|
|
32
31
|
|
|
33
32
|
| 命令 | 用途 | 副作用 |
|
|
@@ -48,7 +47,7 @@ Kit 是「工程阶段」层,依赖 Harness 与 Contracts。它只做四件事
|
|
|
48
47
|
## 安装和最小示例
|
|
49
48
|
|
|
50
49
|
```sh
|
|
51
|
-
npm install --save-dev skill-family-engineering-kit@0.
|
|
50
|
+
npm install --save-dev skill-family-engineering-kit@0.4.0
|
|
52
51
|
npm exec -- skill-family-kit --help
|
|
53
52
|
npm exec -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
|
|
54
53
|
npm exec -- skill-family-kit adopt-plan --root <repo>
|
|
@@ -56,7 +55,7 @@ npm exec -- skill-family-kit projection --root <repo>
|
|
|
56
55
|
npm exec -- skill-family-kit check --root <repo>
|
|
57
56
|
```
|
|
58
57
|
|
|
59
|
-
以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.
|
|
58
|
+
以上四条命令分别覆盖生成骨架、只读盘点、受管投影与诊断;零安装形式可用 `npm exec --package=skill-family-engineering-kit@0.4.0 -- skill-family-kit --help`。
|
|
60
59
|
|
|
61
60
|
### 报告子动作
|
|
62
61
|
|
|
@@ -80,7 +79,7 @@ import {
|
|
|
80
79
|
|
|
81
80
|
生成的 Bundle 按 Schema `$id` 选择 standalone validator,离线运行时不依赖 Foundation 包、`node_modules` 或 Ajv。provenance 绑定 Foundation 来源、消费者 Schema、payload 字节、工具版本,以及实际进入 Bundle 的代码许可证。
|
|
82
81
|
|
|
83
|
-
以上辅助函数不写文件,也不增加第五个顶层命令。调用方需要把返回的 `manifest` 交给稳定的 `runProjection` API。该子路径公开但**不稳定**;使用 v2 时应精确锁定 `0.
|
|
82
|
+
以上辅助函数不写文件,也不增加第五个顶层命令。调用方需要把返回的 `manifest` 交给稳定的 `runProjection` API。该子路径公开但**不稳定**;使用 v2 时应精确锁定 `0.4.0`,仍依赖 v1 依赖闭包 Bundle 的接入必须继续精确锁定 `0.2.1`。
|
|
84
83
|
|
|
85
84
|
### 宿主子动作
|
|
86
85
|
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
3
|
+
import { stdin, stdout, stderr } from "node:process";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import {
|
|
6
|
+
invokeFoundationAdoption,
|
|
7
|
+
verifyManagedBundleIdentity,
|
|
8
|
+
} from "./adoption-mechanisms.mjs";
|
|
9
|
+
|
|
10
|
+
const CLI_NAME = "adoption-cli.mjs";
|
|
11
|
+
|
|
12
|
+
async function readRequest(input) {
|
|
13
|
+
const chunks = [];
|
|
14
|
+
for await (const chunk of input) chunks.push(Buffer.from(chunk));
|
|
15
|
+
const text = new TextDecoder("utf-8", { fatal: true }).decode(Buffer.concat(chunks));
|
|
16
|
+
return JSON.parse(text);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function errorResponse(cause) {
|
|
20
|
+
return {
|
|
21
|
+
ok: false,
|
|
22
|
+
error: {
|
|
23
|
+
name: typeof cause?.name === "string" ? cause.name : "Error",
|
|
24
|
+
message: cause?.message ?? String(cause),
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** One-request/one-response transport for the fixed adoption operation set. */
|
|
30
|
+
export async function runAdoptionCli({
|
|
31
|
+
input = stdin,
|
|
32
|
+
output = stdout,
|
|
33
|
+
error = stderr,
|
|
34
|
+
invoke = invokeFoundationAdoption,
|
|
35
|
+
} = {}) {
|
|
36
|
+
try {
|
|
37
|
+
const request = await readRequest(input);
|
|
38
|
+
const result = request?.operation === "self-check"
|
|
39
|
+
? await runSelfCheck(request)
|
|
40
|
+
: await invoke(request);
|
|
41
|
+
output.write(`${JSON.stringify(result)}\n`);
|
|
42
|
+
return 0;
|
|
43
|
+
} catch (cause) {
|
|
44
|
+
error.write(`${JSON.stringify(errorResponse(cause))}\n`);
|
|
45
|
+
return 2;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
async function runSelfCheck(request) {
|
|
50
|
+
if (
|
|
51
|
+
request === null ||
|
|
52
|
+
typeof request !== "object" ||
|
|
53
|
+
Array.isArray(request) ||
|
|
54
|
+
Object.keys(request).sort().join(",") !== "operation,params" ||
|
|
55
|
+
request.params === null ||
|
|
56
|
+
typeof request.params !== "object" ||
|
|
57
|
+
Array.isArray(request.params) ||
|
|
58
|
+
Object.keys(request.params).length !== 0
|
|
59
|
+
) {
|
|
60
|
+
throw new TypeError("adoption CLI self-check requires exactly operation and empty params");
|
|
61
|
+
}
|
|
62
|
+
return verifyManagedBundleIdentity({ cliUrl: import.meta.url, cliName: CLI_NAME });
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if (process.argv[1] && realpathSync(fileURLToPath(import.meta.url)) === realpathSync(process.argv[1])) {
|
|
66
|
+
process.exitCode = await runAdoptionCli();
|
|
67
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import {
|
|
2
|
+
assessAdoptionBinding,
|
|
3
|
+
assessLegacyExitList,
|
|
4
|
+
assessLegacyReferences,
|
|
5
|
+
loadMigrationManifestState,
|
|
6
|
+
} from "../src/migration.mjs";
|
|
7
|
+
import {
|
|
8
|
+
verifyHarnessSurfaceInventory,
|
|
9
|
+
verifyManagedBundleIdentity,
|
|
10
|
+
} from "skill-family-harness-node/candidate/quickstart-profile";
|
|
11
|
+
|
|
12
|
+
export { verifyManagedBundleIdentity };
|
|
13
|
+
|
|
14
|
+
const ADOPTION_OPERATIONS = Object.freeze([
|
|
15
|
+
"load-migration-manifest-state",
|
|
16
|
+
"assess-adoption-binding",
|
|
17
|
+
"assess-legacy-exit-list",
|
|
18
|
+
"assess-legacy-references",
|
|
19
|
+
"verify-harness-surface-inventory",
|
|
20
|
+
]);
|
|
21
|
+
|
|
22
|
+
const FORBIDDEN_ROUTING_KEYS = new Set(["entry", "module", "export", "pathToFileURL"]);
|
|
23
|
+
|
|
24
|
+
function assertNoRoutingKeys(value, path = "params") {
|
|
25
|
+
if (value === null || typeof value !== "object") return;
|
|
26
|
+
if (Array.isArray(value)) {
|
|
27
|
+
value.forEach((item, index) => assertNoRoutingKeys(item, `${path}/${index}`));
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
for (const [key, child] of Object.entries(value)) {
|
|
31
|
+
if (FORBIDDEN_ROUTING_KEYS.has(key)) {
|
|
32
|
+
throw new TypeError(`invokeFoundationAdoption: caller routing key is forbidden at ${path}/${key}`);
|
|
33
|
+
}
|
|
34
|
+
assertNoRoutingKeys(child, `${path}/${key}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Fixed, read-only adoption bridge; callers cannot select code or exports. */
|
|
39
|
+
export async function invokeFoundationAdoption(request) {
|
|
40
|
+
if (request === null || typeof request !== "object" || Array.isArray(request)) {
|
|
41
|
+
throw new TypeError("invokeFoundationAdoption: request must be an object");
|
|
42
|
+
}
|
|
43
|
+
const requestKeys = Object.keys(request).sort();
|
|
44
|
+
if (requestKeys.length !== 2 || requestKeys[0] !== "operation" || requestKeys[1] !== "params") {
|
|
45
|
+
throw new TypeError("invokeFoundationAdoption: request must contain exactly operation and params");
|
|
46
|
+
}
|
|
47
|
+
const { operation, params } = request;
|
|
48
|
+
if (!ADOPTION_OPERATIONS.includes(operation)) {
|
|
49
|
+
throw new TypeError(`invokeFoundationAdoption: unknown operation: ${String(operation)}`);
|
|
50
|
+
}
|
|
51
|
+
if (params === null || typeof params !== "object" || Array.isArray(params)) {
|
|
52
|
+
throw new TypeError("invokeFoundationAdoption: params must be an object");
|
|
53
|
+
}
|
|
54
|
+
assertNoRoutingKeys(params);
|
|
55
|
+
switch (operation) {
|
|
56
|
+
case "load-migration-manifest-state":
|
|
57
|
+
return loadMigrationManifestState(params.root);
|
|
58
|
+
case "assess-adoption-binding":
|
|
59
|
+
return assessAdoptionBinding(params.manifest, params.profileId);
|
|
60
|
+
case "assess-legacy-exit-list":
|
|
61
|
+
return assessLegacyExitList(params.root, params.legacyItems);
|
|
62
|
+
case "assess-legacy-references":
|
|
63
|
+
return assessLegacyReferences(params.root, params.legacyReferences);
|
|
64
|
+
case "verify-harness-surface-inventory":
|
|
65
|
+
return verifyHarnessSurfaceInventory(params);
|
|
66
|
+
default:
|
|
67
|
+
throw new TypeError("invokeFoundationAdoption: unreachable operation");
|
|
68
|
+
}
|
|
69
|
+
}
|
package/candidate/index.mjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
buildQuickstartProfileProjection,
|
|
3
|
+
buildQuickstartProfileProjectionFromInventory,
|
|
3
4
|
QUICKSTART_PROFILE_TARGET_PREFIX,
|
|
4
5
|
} from "./profile-bundle.mjs";
|
|
6
|
+
export { invokeFoundationAdoption } from "./adoption-mechanisms.mjs";
|
|
7
|
+
export { runAdoptionCli } from "./adoption-cli.mjs";
|