skill-family-engineering-kit 0.1.3 → 0.2.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/README.md +26 -3
- package/docs/architecture/index.html +56 -9
- package/docs/integration/audit/index.html +2 -1
- package/docs/integration/audit/version-compatibility/index.html +5 -2
- package/docs/public/status/index.html +8 -8
- package/docs/search/search_index.json +1 -1
- package/docs/setup/index.html +3 -2
- package/package.json +3 -3
- package/src/cli.mjs +185 -4
- package/src/errors.mjs +8 -0
- package/src/host-drivers.mjs +24 -0
- package/src/host-profiles.mjs +51 -0
- package/src/host.mjs +108 -0
- package/src/index.mjs +22 -2
- package/src/report.mjs +335 -0
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
## 使用
|
|
16
16
|
|
|
17
17
|
```sh
|
|
18
|
-
npm install --save-dev skill-family-engineering-kit@0.
|
|
18
|
+
npm install --save-dev skill-family-engineering-kit@0.2.0
|
|
19
19
|
npm exec -- skill-family-kit --help
|
|
20
20
|
npm exec -- skill-family-kit scaffold --root <empty-dir> --project-id my-project
|
|
21
21
|
npm exec -- skill-family-kit adopt-plan --root <repo>
|
|
@@ -23,10 +23,33 @@ npm exec -- skill-family-kit projection --root <repo>
|
|
|
23
23
|
npm exec -- skill-family-kit check --root <repo>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
+
### 报告子动作
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npm exec -- skill-family-kit projection report --root <repo> --model <report-model.json> --result <operation-result.json> --out <report.md> --binding <binding.json>
|
|
30
|
+
npm exec -- skill-family-kit check report --root <repo> --report <report.md> --model <report-model.json> --result <operation-result.json> --binding <binding.json>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
调用方必须先构造合法 report model;Kit 不从开放的业务 `outputs` 推导事实。所有事实文本按字面转义,失败结果的
|
|
34
|
+
完整 errors 必须出现在 model 和中性报告中。
|
|
35
|
+
|
|
36
|
+
### 宿主子动作
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
npm exec -- skill-family-kit adopt-plan host-describe --host <id> --hosts-root <dir>
|
|
40
|
+
npm exec -- skill-family-kit adopt-plan host-probe --host <id> --hosts-root <dir>
|
|
41
|
+
npm exec -- skill-family-kit scaffold host-build --root <workspace> --host <id> --path-category <id> --input <relpath> --out <relpath> --hosts-root <dir>
|
|
42
|
+
npm exec -- skill-family-kit adopt-plan host-plan --root <workspace> --host <id> --path-category <id> --build-manifest <relpath> --probe-facts <relpath> --hosts-root <dir>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Profile 必须显式提供,Kit 不默认绑定具体宿主。probe 默认不启动进程;只有同时给出
|
|
46
|
+
`--allow-host-spawn --host-executable <绝对路径>` 才执行冻结版本向量。`host-apply` 稳定拒绝,未实现安装、更新或卸载。
|
|
47
|
+
Codex 的技能目标路径固定为 `.agents/skills`;其他受支持宿主只按已登记 Profile 提供;Qoder 为 `unsupported`,本版只参考其结构,不提供完整 driver,也不声称已在 Qoder 运行。adapter source 只接受已声明的文本闭包,不支持二进制投影;精确宿主支持矩阵见本版本 CHANGELOG 与已登记 Profile。
|
|
48
|
+
|
|
26
49
|
零安装形式(不修改 package.json):
|
|
27
50
|
|
|
28
51
|
```sh
|
|
29
|
-
npm exec --package=skill-family-engineering-kit@0.
|
|
52
|
+
npm exec --package=skill-family-engineering-kit@0.2.0 -- skill-family-kit --help
|
|
30
53
|
```
|
|
31
54
|
|
|
32
55
|
## 边界机制
|
|
@@ -73,7 +96,7 @@ projection 只写同时满足两个条件的路径:manifest 列出,且目标
|
|
|
73
96
|
## 安装
|
|
74
97
|
|
|
75
98
|
```sh
|
|
76
|
-
npm install skill-family-engineering-kit@0.
|
|
99
|
+
npm install skill-family-engineering-kit@0.2.0
|
|
77
100
|
```
|
|
78
101
|
|
|
79
102
|
## 故障诊断
|
|
@@ -433,6 +433,17 @@
|
|
|
433
433
|
</span>
|
|
434
434
|
</a>
|
|
435
435
|
|
|
436
|
+
</li>
|
|
437
|
+
|
|
438
|
+
<li class="md-nav__item">
|
|
439
|
+
<a href="#下一阶段能力线架构-hand-off" class="md-nav__link">
|
|
440
|
+
<span class="md-ellipsis">
|
|
441
|
+
|
|
442
|
+
下一阶段能力线(架构 hand-off)
|
|
443
|
+
|
|
444
|
+
</span>
|
|
445
|
+
</a>
|
|
446
|
+
|
|
436
447
|
</li>
|
|
437
448
|
|
|
438
449
|
<li class="md-nav__item">
|
|
@@ -722,6 +733,17 @@
|
|
|
722
733
|
</span>
|
|
723
734
|
</a>
|
|
724
735
|
|
|
736
|
+
</li>
|
|
737
|
+
|
|
738
|
+
<li class="md-nav__item">
|
|
739
|
+
<a href="#下一阶段能力线架构-hand-off" class="md-nav__link">
|
|
740
|
+
<span class="md-ellipsis">
|
|
741
|
+
|
|
742
|
+
下一阶段能力线(架构 hand-off)
|
|
743
|
+
|
|
744
|
+
</span>
|
|
745
|
+
</a>
|
|
746
|
+
|
|
725
747
|
</li>
|
|
726
748
|
|
|
727
749
|
<li class="md-nav__item">
|
|
@@ -798,11 +820,35 @@
|
|
|
798
820
|
|
|
799
821
|
<h1 id="架构边界">架构边界<a class="headerlink" href="#架构边界" title="Permanent link">¶</a></h1>
|
|
800
822
|
<h2 id="分层">分层<a class="headerlink" href="#分层" title="Permanent link">¶</a></h2>
|
|
801
|
-
<
|
|
802
|
-
|
|
803
|
-
|
|
823
|
+
<p>2026-08-09 架构 hand-off(FND-ADR-001~007,active,见 <code>artifacts/decisions/</code>)确立的分层:纵向依赖链四层,横向能力挂接,不新增纵层。</p>
|
|
824
|
+
<pre><code class="language-text">技能族业务(各产品仓:release-skill、loop-agent、skill-eval 等)
|
|
825
|
+
│ 依赖
|
|
826
|
+
▼
|
|
827
|
+
Engineering Kit(scaffold / adopt-plan / projection / check)
|
|
828
|
+
│ 依赖
|
|
829
|
+
▼
|
|
830
|
+
Harness Node(Contracts 机制协议实现)
|
|
831
|
+
│ 依赖
|
|
832
|
+
▼
|
|
833
|
+
Contracts(结构、协议、错误码、协议名登记)
|
|
834
|
+
▲
|
|
835
|
+
└---------------- independent Audit consumer
|
|
836
|
+
|
|
837
|
+
横向(挂接面,不新增纵层):
|
|
838
|
+
- profiles/ 宿主与项目形态差异声明,只实现稳定 SPI
|
|
839
|
+
- 宿主 外部 AI 编码运行环境:拥有语义,Foundation 统一结构性差异
|
|
840
|
+
- release-skill 发布状态与全部远端写入,不进入 Foundation
|
|
841
|
+
- Artifact Graph `artifacts/` 架构制品体系,门禁为 check:artifacts
|
|
804
842
|
</code></pre>
|
|
805
|
-
<p
|
|
843
|
+
<p>箭头指向被依赖方。公共核心不得反向依赖具体 Profile 或具体技能族;新能力的依赖方向落位见 <code>artifacts/design/FND-DES-001.md</code>,逐资产归属见 FND-ADR-002。</p>
|
|
844
|
+
<h2 id="下一阶段能力线架构-hand-off">下一阶段能力线(架构 hand-off)<a class="headerlink" href="#下一阶段能力线架构-hand-off" title="Permanent link">¶</a></h2>
|
|
845
|
+
<p>三条能力线均经 FND-ADR-001 能力纳入门(宿主差异轴/跨技能族共性轴两主轴判定、业务语义一票否决、七项进入门)裁决纳入,全部在上图既有分层内落位:</p>
|
|
846
|
+
<ul>
|
|
847
|
+
<li><strong>宿主接入线</strong>(FND-FR-001/FND-FR-002,FND-ADR-003):Contracts 登记 descriptor/source/manifest/probe/plan/receipt;Harness 实现通用 source closure、原子 build/materialize 和 probe 分类;Kit 注入具体 Profile 与受信 driver。当前只支持 describe/build/probe/plan,<code>apply</code> 稳定拒绝,安装/卸载/更新均未实现。</li>
|
|
848
|
+
<li><strong>持久状态底座线</strong>(FND-FR-003,FND-ADR-004):append-only 事件、hash chain、快照与校验恢复;只提供状态底座,状态机、任务节点、重试、终态、记忆等业务语义不纳入 Foundation。</li>
|
|
849
|
+
<li><strong>人类报告线</strong>(FND-FR-004,FND-ADR-005):双层合同——机器结果是唯一真源,人类报告由机器结果确定性渲染(Markdown + digest 绑定 + 分级检查),不自由撰写。</li>
|
|
850
|
+
</ul>
|
|
851
|
+
<p>三包结构保持、不拆第四包(FND-ADR-007);制品治理采用 artifact-graph CLI 与版本锁(FND-ADR-006,体系说明见 <code>artifacts/README.md</code>)。</p>
|
|
806
852
|
<h2 id="唯一权威">唯一权威<a class="headerlink" href="#唯一权威" title="Permanent link">¶</a></h2>
|
|
807
853
|
<ul>
|
|
808
854
|
<li>Contracts:结构、协议、错误码和协议名登记;</li>
|
|
@@ -810,16 +856,17 @@
|
|
|
810
856
|
<li>Kit:四个工程命令及其只读/受限写入边界;</li>
|
|
811
857
|
<li>Profile:项目形态差异;</li>
|
|
812
858
|
<li>Audit:独立 fixture、预期值和裁决;</li>
|
|
813
|
-
<li>Release
|
|
859
|
+
<li>Release:发布状态和全部远端写入;</li>
|
|
860
|
+
<li>Artifacts:<code>artifacts/</code> 架构制品体系的关系合同与版本锁由 artifact-graph 机械验证(<code>check:artifacts</code>),体系说明见 <code>artifacts/README.md</code>(FND-ADR-006)。</li>
|
|
814
861
|
</ul>
|
|
815
862
|
<h2 id="首版预算">首版预算<a class="headerlink" href="#首版预算" title="Permanent link">¶</a></h2>
|
|
816
863
|
<ul>
|
|
817
|
-
<li>顶层 Contracts 对象:
|
|
864
|
+
<li>顶层 Contracts 对象:18 类(完整清单以 <code>packages/skill-family-contracts/src/registry.json</code> 为唯一真源):project-manifest、profile-descriptor、managed-file-lock、operation-request、operation-result、migration-manifest、adapter-source、report-model、report-binding、host-descriptor、host-registry、host-capability-fact、host-probe-result、adapter-build-manifest、host-operation-plan、host-operation-receipt、state-event-envelope、state-snapshot-metadata;</li>
|
|
818
865
|
<li>Kit 顶层命令:4 个(scaffold、adopt-plan、projection、check);</li>
|
|
819
|
-
<li>强制机械规则:当前
|
|
866
|
+
<li>强制机械规则:当前 9 条,预算不超过 20 条,绝对上限 30 条;CR-001 对登记表内全部 Schema 做统一编译;</li>
|
|
820
867
|
<li>叶子包:3 个(skill-family-contracts、skill-family-harness-node、skill-family-engineering-kit);</li>
|
|
821
868
|
<li>Schema 校验器:Ajv 8.20.0(精确版本 pin),支持 draft-07 与 2020-12 双方言;</li>
|
|
822
|
-
<li>kernel 协议:skill-family.kernel.operation(stable),Contracts 版本 1.
|
|
869
|
+
<li>kernel 协议:skill-family.kernel.operation(stable),Contracts 版本 1.4.0;</li>
|
|
823
870
|
<li>默认运行时语言:Node;第二语言实现首版为 0。</li>
|
|
824
871
|
</ul>
|
|
825
872
|
<p>任何新增组件必须说明删除它会导致的两个以上真实消费者重复实现,并通过独立 fixture 验证。</p>
|
|
@@ -870,7 +917,7 @@
|
|
|
870
917
|
</ol>
|
|
871
918
|
<p>两个检查脚本都可直接 <code>node scripts/docs/<name>.mjs</code> 运行:<code>fact-check.mjs</code> 是 Node 脚本,经仓内模块(<code>scripts/engine-floor-check.mjs</code>)消费根目录精确锁定的 <code>semver@7.8.5</code>,运行前必须先完成 <code>pnpm install --frozen-lockfile</code>;<code>link-check.mjs</code> 为纯 Node 实现(无第三方依赖)。职责说明见 <code>scripts/docs/README.md</code>。</p>
|
|
872
919
|
<h2 id="稳定产品门禁">稳定产品门禁<a class="headerlink" href="#稳定产品门禁" title="Permanent link">¶</a></h2>
|
|
873
|
-
<p>根 <code>pnpm check</code> 只编排
|
|
920
|
+
<p>根 <code>pnpm check</code> 只编排 11 个稳定产品 gate ID(<code>check:structure</code>~<code>check:artifacts</code>,逐 ID 见 当前产品状态),不再锁死原始命令清单;每个稳定 ID 在自己的 package script 内组合少量产品检查。门禁事实由 <code>node scripts/docs/fact-check.mjs</code> 从根 <code>package.json</code> 的 <code>scripts.check</code> 机械推导并逐字核对(setup 投影区块与 <code>scripts.check</code> 逐字一致)。文档与 setup 只调用或列出 11 个稳定 ID 或根 <code>pnpm check</code>,不复制底层命令列表。</p>
|
|
874
921
|
<p>仓内检查的诚实边界:结构检查只证明“字节/结构一致性(仓内可证)”;一次性迁移完整性、普通正文语义与最终接受/拒绝结论属于外部审阅职责,不在目标仓内维护第二份门禁 registry、baseline 或命令比较器。</p>
|
|
875
922
|
|
|
876
923
|
|
|
@@ -770,7 +770,8 @@
|
|
|
770
770
|
isolation-and-lockfile.md 隔离安装与包锁验证设计
|
|
771
771
|
independence.md 独立性声明与机械证明
|
|
772
772
|
schemas/audit-evidence.schema.json 证据文档的 JSON Schema(审计自有)
|
|
773
|
-
baseline/contracts-1.
|
|
773
|
+
baseline/contracts-1.4.0.pin.json Contracts 1.4.0 现行基线 pin(摘要+事实)
|
|
774
|
+
baseline/contracts-1.1.1.pin.json Contracts 1.1.1 只读兼容存档 pin
|
|
774
775
|
baseline/contracts-1.1.0.pin.json Contracts 1.1.0 只读兼容存档 pin
|
|
775
776
|
baseline/contracts-1.0.0.pin.json Contracts 1.0.0 只读兼容存档 pin
|
|
776
777
|
baseline/audit-codes.json AUD 码登记表(append-only)
|
|
@@ -743,7 +743,7 @@
|
|
|
743
743
|
<tbody>
|
|
744
744
|
<tr>
|
|
745
745
|
<td><code>contractsVersion</code></td>
|
|
746
|
-
<td>Contracts 冻结版本(当前 <code>1.
|
|
746
|
+
<td>Contracts 冻结版本(当前 <code>1.4.0</code>)</td>
|
|
747
747
|
<td>机器契约内容的版本</td>
|
|
748
748
|
</tr>
|
|
749
749
|
<tr>
|
|
@@ -758,7 +758,7 @@
|
|
|
758
758
|
</tr>
|
|
759
759
|
</tbody>
|
|
760
760
|
</table>
|
|
761
|
-
<p>三者都由 <code>describeAuditSurface()</code> 一次性给出,审计侧把它们与基线 pin(当前为 <code>baseline/contracts-1.
|
|
761
|
+
<p>三者都由 <code>describeAuditSurface()</code> 一次性给出,审计侧把它们与基线 pin(当前为 <code>baseline/contracts-1.4.0.pin.json</code>)比对。</p>
|
|
762
762
|
<h2 id="兼容规则">兼容规则<a class="headerlink" href="#兼容规则" title="Permanent link">¶</a></h2>
|
|
763
763
|
<p>一个被消费的 Contracts 包与某个基线 pin <strong>兼容</strong>,当且仅当同时满足:</p>
|
|
764
764
|
<ol>
|
|
@@ -811,6 +811,9 @@
|
|
|
811
811
|
<li>pin 由产品侧在冻结时刻构造(provenance <code>product-compatibility-fixture</code>):摘要来自对已冻结产物的 <code>digestAuditSurface()</code> 机械计算,事实清单直接对照合同文档推导,不取自生成器或 oracle;本仓库不存在独立的第二审阅会话,pin 不作任何独立角色声称;</li>
|
|
812
812
|
<li><strong>诚实性修正(2026-08-05)</strong>:旧 pin(1.0.0、1.1.0)曾携带 <code>independent-r2</code> provenance 与独立重签叙事,该声称与本仓事实不符,已就地修正 provenance 与 note;修正只触及 provenance/note 两处诚实性字段,不改变任何 digest 或 facts 字段,旧 pin 继续作为只读兼容存档;</li>
|
|
813
813
|
<li><strong>Contracts 1.1.1(2026-08-05)</strong>:仅描述补丁(migration-manifest schema 三处 description 改写为稳定产品语义;无任何校验关键字、公开 API、错误码、规则或引擎参数变化)。按本生命周期新增 <code>contracts-1.1.1.pin.json</code> 为现行基线,<code>contracts-1.1.0.pin.json</code> 转为只读兼容存档。1.1.1 pin 相对 1.1.0 pin 的准确事实:<strong>校验语义和事实清单不变</strong>(<code>facts</code> 逐项一致);四个 Contracts 文档(registry、error-codes、rules、kernel-protocol)因内嵌 <code>contractsVersion</code> 从 <code>1.1.0</code> 更新到 <code>1.1.1</code> 而改变摘要;migration-manifest Schema 因上述三处 description 更新而改变摘要;其余五个 Schema(project-manifest、profile-descriptor、managed-file-lock、operation-request、operation-result)摘要不变。<code>proof-independence.mjs</code> 的 P5 强制这套如实声明的 provenance 词汇(pin:<code>product-compatibility-fixture</code>;变异夹具:<code>product-fixture</code>);</li>
|
|
814
|
+
<li><strong>Contracts 1.2.0(2026-08-09)</strong>:报告能力线增量,不是描述补丁:新增 <code>report-model</code>、<code>report-binding</code> 两个顶层契约和 SFC3001~SFC3003 报告错误码,改变了公开机器合同与审计事实。</li>
|
|
815
|
+
<li><strong>Contracts 1.3.0(2026-08-09)</strong>:宿主接入能力线增量,不是描述补丁:新增 <code>host-descriptor</code>、<code>host-capability-fact</code>、<code>adapter-build-manifest</code>、<code>host-operation-plan</code>、<code>host-operation-receipt</code> 五个顶层契约,改变了公开机器合同与审计事实。</li>
|
|
816
|
+
<li><strong>Contracts 1.4.0(2026-08-09)</strong>:持久状态能力线增量,不是描述补丁:新增 <code>state-event-envelope</code>、<code>state-snapshot-metadata</code> 两个顶层契约,改变了公开机器合同与审计事实。<code>contracts-1.4.0.pin.json</code> 是当前现行基线;1.1.x 及更早 pin 保留为只读兼容存档。该 pin 的摘要与事实均从当前 <code>describeAuditSurface()/digestAuditSurface()</code> 机械投影,provenance 仍为 <code>product-compatibility-fixture</code>。</li>
|
|
814
817
|
<li>审计运行时先做包锁验证(见 isolation-and-lockfile.md),再做变异重放;pin 不匹配时,变异重放结果不得被采信。</li>
|
|
815
818
|
</ul>
|
|
816
819
|
|
|
@@ -766,30 +766,30 @@
|
|
|
766
766
|
<tbody>
|
|
767
767
|
<tr>
|
|
768
768
|
<td><code>skill-family-contracts</code></td>
|
|
769
|
-
<td>0.
|
|
770
|
-
<td>ifoohoo/skill-family-contracts
|
|
769
|
+
<td>0.2.0</td>
|
|
770
|
+
<td><a href="https://github.com/ifoohoo/skill-family-contracts">ifoohoo/skill-family-contracts</a></td>
|
|
771
771
|
</tr>
|
|
772
772
|
<tr>
|
|
773
773
|
<td><code>skill-family-harness-node</code></td>
|
|
774
|
-
<td>0.
|
|
775
|
-
<td>ifoohoo/skill-family-harness-node
|
|
774
|
+
<td>0.2.0</td>
|
|
775
|
+
<td><a href="https://github.com/ifoohoo/skill-family-harness-node">ifoohoo/skill-family-harness-node</a></td>
|
|
776
776
|
</tr>
|
|
777
777
|
<tr>
|
|
778
778
|
<td><code>skill-family-engineering-kit</code></td>
|
|
779
|
-
<td>0.
|
|
780
|
-
<td>ifoohoo/skill-family-engineering-kit
|
|
779
|
+
<td>0.2.0</td>
|
|
780
|
+
<td><a href="https://github.com/ifoohoo/skill-family-engineering-kit">ifoohoo/skill-family-engineering-kit</a></td>
|
|
781
781
|
</tr>
|
|
782
782
|
</tbody>
|
|
783
783
|
</table>
|
|
784
784
|
<h2 id="文档">文档<a class="headerlink" href="#文档" title="Permanent link">¶</a></h2>
|
|
785
785
|
<ul>
|
|
786
|
-
<li
|
|
786
|
+
<li><a href="https://ifoohoo.github.io/skill-family-engineering-kit/">公开文档站</a></li>
|
|
787
787
|
</ul>
|
|
788
788
|
<h2 id="验证入口">验证入口<a class="headerlink" href="#验证入口" title="Permanent link">¶</a></h2>
|
|
789
789
|
<ul>
|
|
790
790
|
<li>本页:<code>node scripts/render-public-status.mjs --check</code>(零写入重算,与已提交页面逐字节一致)</li>
|
|
791
791
|
<li>静态站与基线:<code>node scripts/render-public-site.mjs --check</code>(冻结 MkDocs 环境重算,与已提交基线逐项一致)</li>
|
|
792
|
-
<li>工作区根门禁:<code>pnpm check</code>(
|
|
792
|
+
<li>工作区根门禁:<code>pnpm check</code>(11 个稳定产品门禁按固定顺序串联)</li>
|
|
793
793
|
<li>registry、Pages 与 Release 的实时远端状态:由发布后验证报告证明,不在本页记录</li>
|
|
794
794
|
</ul>
|
|
795
795
|
<h2 id="说明">说明<a class="headerlink" href="#说明" title="Permanent link">¶</a></h2>
|