skill-family-engineering-kit 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/CHANGELOG.zh-CN.md +43 -0
  3. package/README.md +19 -10
  4. package/README.zh-CN.md +19 -10
  5. package/docs/agents/capability-catalog.en.json +243 -17
  6. package/docs/agents/capability-catalog.json +179 -13
  7. package/docs/agents/capability-catalog.zh-CN.json +243 -17
  8. package/docs/architecture/index.html +3 -3
  9. package/docs/en/migration/index.html +32 -87
  10. package/docs/en/reference/failure-and-side-effect-matrix/index.html +1 -1
  11. package/docs/integration/audit/index.html +2 -1
  12. package/docs/integration/audit/version-compatibility/index.html +66 -3
  13. package/docs/migration/index.html +32 -87
  14. package/docs/public/status/index.html +3 -3
  15. package/docs/reference/api/engineering-kit/index.html +117 -12
  16. package/docs/reference/api/harness/index.html +83 -3
  17. package/docs/reference/failure-and-side-effect-matrix/index.html +1 -1
  18. package/docs/search/search_index.json +1 -1
  19. package/package.json +6 -4
  20. package/profile-spi/extension-spi.json +162 -0
  21. package/profile-spi/index.mjs +574 -0
  22. package/profile-spi/profile-adoption.schema.json +120 -0
  23. package/profile-spi/profile-descriptor.schema.json +99 -0
  24. package/profile-spi/rule-baseline-catalog.json +50 -0
  25. package/release-notes/0.6.0.yaml +25 -0
  26. package/release-notes/0.7.0.yaml +23 -0
  27. package/src/adopt-plan.mjs +81 -159
  28. package/src/check.mjs +443 -19
  29. package/src/cli.mjs +80 -1
  30. package/src/core-check.mjs +8 -4
  31. package/src/entry-check.mjs +384 -0
  32. package/src/errors.mjs +21 -0
  33. package/src/index.mjs +36 -6
  34. package/src/projection.mjs +298 -45
  35. package/src/relock.mjs +397 -0
  36. package/src/skeleton.mjs +162 -4
@@ -1194,22 +1194,22 @@
1194
1194
  </li>
1195
1195
 
1196
1196
  <li class="md-nav__item">
1197
- <a href="#Ten-Field-Hand-off-Draft" class="md-nav__link">
1197
+ <a href="#Profile-Draft" class="md-nav__link">
1198
1198
  <span class="md-ellipsis">
1199
1199
 
1200
- Ten-Field Hand-off Draft
1200
+ Profile Draft
1201
1201
 
1202
1202
  </span>
1203
1203
  </a>
1204
1204
 
1205
- <nav class="md-nav" aria-label="Ten-Field Hand-off Draft">
1205
+ <nav class="md-nav" aria-label="Profile Draft">
1206
1206
  <ul class="md-nav__list">
1207
1207
 
1208
1208
  <li class="md-nav__item">
1209
- <a href="#INCOMPLETE-Blocking-Rules" class="md-nav__link">
1209
+ <a href="#Incompleteness-Blocking-Rules" class="md-nav__link">
1210
1210
  <span class="md-ellipsis">
1211
1211
 
1212
- INCOMPLETE Blocking Rules
1212
+ Incompleteness Blocking Rules
1213
1213
 
1214
1214
  </span>
1215
1215
  </a>
@@ -1228,10 +1228,10 @@
1228
1228
  </li>
1229
1229
 
1230
1230
  <li class="md-nav__item">
1231
- <a href="#Rendering-Boundary" class="md-nav__link">
1231
+ <a href="#Boundary" class="md-nav__link">
1232
1232
  <span class="md-ellipsis">
1233
1233
 
1234
- Rendering Boundary
1234
+ Boundary
1235
1235
 
1236
1236
  </span>
1237
1237
  </a>
@@ -1923,22 +1923,22 @@
1923
1923
  </li>
1924
1924
 
1925
1925
  <li class="md-nav__item">
1926
- <a href="#Ten-Field-Hand-off-Draft" class="md-nav__link">
1926
+ <a href="#Profile-Draft" class="md-nav__link">
1927
1927
  <span class="md-ellipsis">
1928
1928
 
1929
- Ten-Field Hand-off Draft
1929
+ Profile Draft
1930
1930
 
1931
1931
  </span>
1932
1932
  </a>
1933
1933
 
1934
- <nav class="md-nav" aria-label="Ten-Field Hand-off Draft">
1934
+ <nav class="md-nav" aria-label="Profile Draft">
1935
1935
  <ul class="md-nav__list">
1936
1936
 
1937
1937
  <li class="md-nav__item">
1938
- <a href="#INCOMPLETE-Blocking-Rules" class="md-nav__link">
1938
+ <a href="#Incompleteness-Blocking-Rules" class="md-nav__link">
1939
1939
  <span class="md-ellipsis">
1940
1940
 
1941
- INCOMPLETE Blocking Rules
1941
+ Incompleteness Blocking Rules
1942
1942
 
1943
1943
  </span>
1944
1944
  </a>
@@ -1957,10 +1957,10 @@
1957
1957
  </li>
1958
1958
 
1959
1959
  <li class="md-nav__item">
1960
- <a href="#Rendering-Boundary" class="md-nav__link">
1960
+ <a href="#Boundary" class="md-nav__link">
1961
1961
  <span class="md-ellipsis">
1962
1962
 
1963
- Rendering Boundary
1963
+ Boundary
1964
1964
 
1965
1965
  </span>
1966
1966
  </a>
@@ -2196,83 +2196,28 @@
2196
2196
  <li><strong>Rollback relies on evidence</strong>: before adoption writes to disk, a dual-digest binding of <code>adoptionProof</code> and <code>foundationPlanDigest</code> must exist first; on rollback, the plan write set's <code>expect.sha256</code> pre-state is used to restore; an overwrite action that does not declare its pre-state is refused at the <code>projection</code> stage.</li>
2197
2197
  <li><strong>fail-closed default</strong>: any unparseable, out-of-bounds, identity-mismatched, or evidence-missing input makes the corresponding judgment unproven; success is not assumed.</li>
2198
2198
  </ul>
2199
- <h2 id="Ten-Field-Hand-off-Draft">Ten-Field Hand-off Draft<a class="headerlink" href="#Ten-Field-Hand-off-Draft" title="Permanent link">&para;</a></h2>
2200
- <p><code>adopt-plan</code> output carries a <code>handoffDraft</code> sub-block (kind=<code>skill-family.handoff-draft</code>, schemaVersion=1), providing structured data draft for the planner-side ten-field hand-off. Field sources are only two kinds: <code>derived</code> (mechanically derivable from read-only evidence) and <code>INCOMPLETE</code> (not mechanically derivable, never guessed). The ten fields correspond one-to-one with the source constant <code>HANDOFF_FIELDS</code>:</p>
2201
- <table>
2202
- <thead>
2203
- <tr>
2204
- <th>id</th>
2205
- <th>Field name</th>
2206
- <th>Source</th>
2207
- </tr>
2208
- </thead>
2209
- <tbody>
2210
- <tr>
2211
- <td>1</td>
2212
- <td><code>project-identity</code></td>
2213
- <td>derived</td>
2214
- </tr>
2215
- <tr>
2216
- <td>2</td>
2217
- <td><code>repository-state</code></td>
2218
- <td>derived</td>
2219
- </tr>
2220
- <tr>
2221
- <td>3</td>
2222
- <td><code>foundation-binding</code></td>
2223
- <td>derived (manifest declared binding) / INCOMPLETE (no manifest declared)</td>
2224
- </tr>
2225
- <tr>
2226
- <td>4</td>
2227
- <td><code>write-set-policy</code></td>
2228
- <td>derived</td>
2229
- </tr>
2230
- <tr>
2231
- <td>5</td>
2232
- <td><code>legacy-exits</code></td>
2233
- <td>derived</td>
2234
- </tr>
2235
- <tr>
2236
- <td>6</td>
2237
- <td><code>business-logic-to-keep</code></td>
2238
- <td>always INCOMPLETE</td>
2239
- </tr>
2240
- <tr>
2241
- <td>7</td>
2242
- <td><code>plan-summary</code></td>
2243
- <td>derived</td>
2244
- </tr>
2245
- <tr>
2246
- <td>8</td>
2247
- <td><code>verification-entries</code></td>
2248
- <td>derived (all four classes of evidence proven) / INCOMPLETE (any unproven)</td>
2249
- </tr>
2250
- <tr>
2251
- <td>9</td>
2252
- <td><code>legacy-removal-recovery</code></td>
2253
- <td>always INCOMPLETE</td>
2254
- </tr>
2255
- <tr>
2256
- <td>10</td>
2257
- <td><code>authorization-status</code></td>
2258
- <td>derived (commit/push/tag/publish always false)</td>
2259
- </tr>
2260
- </tbody>
2261
- </table>
2262
- <h3 id="INCOMPLETE-Blocking-Rules">INCOMPLETE Blocking Rules<a class="headerlink" href="#INCOMPLETE-Blocking-Rules" title="Permanent link">&para;</a></h3>
2199
+ <h2 id="Profile-Draft">Profile Draft<a class="headerlink" href="#Profile-Draft" title="Permanent link">&para;</a></h2>
2200
+ <p><code>adopt-plan</code> output carries a <code>profileDraft</code> sub-block (kind=<code>skill-family.profile-draft</code>, schemaVersion=1): a pre-filled profile.json descriptor draft (<code>descriptorRelPath</code>=<code>profile.json</code>). The adoption-lock concept and its artifact form are deprecated (remediation handoff D-8): the lightweight adoption proof is the descriptor's own adoption declaration, machine-verified by <code>verifyProfile</code> (Profile SPI v2) — field completeness and pin format are schema-checked at the descriptor step (SPE1001), pin digests are compared against the real artifact bytes inside the write set per GK-4 discipline (SPE1006), and the tightening-only overrides policy is adjudicated separately (SPE1007).</p>
2201
+ <p>The draft pre-fills everything mechanically derivable from read-only facts:</p>
2202
+ <ul>
2203
+ <li>Descriptor identity and base: <code>profile.id</code>/<code>profile.name</code> come from the plan inputs, <code>base.contractsVersion</code> is the loaded frozen contracts version; <code>differences</code>/<code>spi</code> start as empty arrays.</li>
2204
+ <li>The adoption declaration (D-8 minimal field set, authoritative definition in <code>adoptionDeclaration</code> of <code>profiles/spi/extension-spi.json</code>):</li>
2205
+ <li><code>foundation_profile.id</code> is the adopted foundation profile id from the plan inputs; <code>version</code>/<code>stability</code> are human decisions and stay null.</li>
2206
+ <li><code>foundation_pin.algorithm</code> is always <code>sha256</code>; the three foundation packages' <code>version</code> values are pre-filled manifest-declaration-first, then from loaded constants; <code>path</code>/<code>sha256</code> stay null until real artifacts are placed in the profile write set (a digest comes only from real bytes, never guessed).</li>
2207
+ <li><code>adopted_at</code> is fixed at adoption time, never at planning time, and stays null.</li>
2208
+ <li><code>overrides</code> is an empty array (the empty example): overrides are opt-in self-tightening declarations, and the kit never enumerates rule examples (the core never imports the profile layer); the draft carries <code>overridesGuidance</code> explaining the tightening-only semantics.</li>
2209
+ </ul>
2210
+ <h3 id="Incompleteness-Blocking-Rules">Incompleteness Blocking Rules<a class="headerlink" href="#Incompleteness-Blocking-Rules" title="Permanent link">&para;</a></h3>
2263
2211
  <ul>
2264
- <li>Any INCOMPLETE field makes <code>ready=false</code>: a draft with gaps must not enter the hand-off.</li>
2265
- <li>The tool never guesses mechanically-undeterminable fields:</li>
2266
- <li><code>business-logic-to-keep</code> and <code>legacy-removal-recovery</code> are <strong>always INCOMPLETE</strong> and must be provided by a human owner; the tool has no basis to derive them;</li>
2267
- <li><code>foundation-binding</code> is INCOMPLETE when no migration manifest declares (<code>foundationPackages</code>) it, counting only the manifest-declared binding;</li>
2268
- <li><code>verification-entries</code> is INCOMPLETE when any of the four classes of evidence (unit/integration/consumer/independentAudit) is not proven.</li>
2212
+ <li>Any non-derivable field stays null and is listed in <code>incompleteFields</code>; as long as <code>incompleteFields</code> is non-empty, <code>ready=false</code>: a draft with gaps must not be written as an adoption declaration as-is.</li>
2213
+ <li>The tool never guesses: a human completes <code>foundation_profile.version</code>/<code>stability</code>, each package artifact's <code>path</code>/<code>sha256</code>, <code>adopted_at</code>, and <code>profile.version</code>.</li>
2269
2214
  </ul>
2270
2215
  <h3 id="Binding">Binding<a class="headerlink" href="#Binding" title="Permanent link">&para;</a></h3>
2271
- <p>The draft carries a dual sha256 digest (the <code>binding</code> block): <code>targetSetDigest</code> summarizes the target repository's file set, and <code>foundationPlanDigest</code> summarizes the Foundation plan write set. Two plans for the same target yield the same digest, precisely binding the draft and the target state at plan time.</p>
2272
- <h3 id="Rendering-Boundary">Rendering Boundary<a class="headerlink" href="#Rendering-Boundary" title="Permanent link">&para;</a></h3>
2216
+ <p>The draft carries a dual sha256 digest (the <code>binding</code> block): <code>targetSetDigest</code> summarizes the target repository's file set, and <code>foundationPlanDigest</code> summarizes the Foundation plan write set. Two plans for the same target yield the same digest, precisely binding the draft to the target state at plan time.</p>
2217
+ <h3 id="Boundary">Boundary<a class="headerlink" href="#Boundary" title="Permanent link">&para;</a></h3>
2273
2218
  <ul>
2274
- <li>The renderer writes only the planner-side hand-off draft, <strong>never the consumer repository</strong>;</li>
2275
- <li>No fifth Kit top-level command is added: Kit top-level commands are permanently the four — scaffold, adopt-plan, projection, check — and <code>handoffDraft</code> is only a sub-block of <code>adopt-plan</code> output.</li>
2219
+ <li><code>adopt-plan</code> is strictly read-only: the draft is only printed with the plan to stdout, <strong>never written into the consumer repository</strong>;</li>
2220
+ <li>No fifth Kit top-level command is added: Kit top-level commands are permanently the four — scaffold, adopt-plan, projection, check — and <code>profileDraft</code> is only a sub-block of <code>adopt-plan</code> output.</li>
2276
2221
  </ul>
2277
2222
  <h2 id="Hazard-Class-Fixtures">Hazard-Class Fixtures<a class="headerlink" href="#Hazard-Class-Fixtures" title="Permanent link">&para;</a></h2>
2278
2223
  <p><code>fixtures/adoption/cases/</code> covers seven hazard classes: dirty repository, nested repository, tracked-but-ignored, symlink placeholder, generated-artifact drift, legacy-implementation exit gate, and temporary-exception fields. Each case proves the plan is read-only via byte-level before/after snapshots; see the in-repo <code>fixtures/adoption/README.md</code> for case descriptions.</p>
@@ -2050,7 +2050,7 @@
2050
2050
  <td><code>SFC2004</code> (<code>target-not-empty</code>)</td>
2051
2051
  </tr>
2052
2052
  <tr>
2053
- <td><code>planAdoption</code> / <code>buildHandoffDraft</code></td>
2053
+ <td><code>planAdoption</code> / <code>buildProfileDraft</code></td>
2054
2054
  <td>yes</td>
2055
2055
  <td>no</td>
2056
2056
  <td>no</td>
@@ -1796,7 +1796,8 @@
1796
1796
  isolation-and-lockfile.md 隔离安装与包锁验证设计
1797
1797
  independence.md 独立性声明与机械证明
1798
1798
  schemas/audit-evidence.schema.json 证据文档的 JSON Schema(审计自有)
1799
- baseline/contracts-1.5.0.pin.json Contracts 1.5.0 现行基线 pin(摘要+事实)
1799
+ baseline/contracts-1.6.0.pin.json Contracts 1.6.0 现行基线 pin(摘要+事实)
1800
+ baseline/contracts-1.5.0.pin.json Contracts 1.5.0 只读兼容存档 pin
1800
1801
  baseline/contracts-1.1.1.pin.json Contracts 1.1.1 只读兼容存档 pin
1801
1802
  baseline/contracts-1.1.0.pin.json Contracts 1.1.0 只读兼容存档 pin
1802
1803
  baseline/contracts-1.0.0.pin.json Contracts 1.0.0 只读兼容存档 pin
@@ -1643,6 +1643,17 @@
1643
1643
  </span>
1644
1644
  </a>
1645
1645
 
1646
+ </li>
1647
+
1648
+ <li class="md-nav__item">
1649
+ <a href="#profile-行为变更纪律2026-08-19D6" class="md-nav__link">
1650
+ <span class="md-ellipsis">
1651
+
1652
+ profile 行为变更纪律(2026-08-19,D6)
1653
+
1654
+ </span>
1655
+ </a>
1656
+
1646
1657
  </li>
1647
1658
 
1648
1659
  </ul>
@@ -1737,6 +1748,17 @@
1737
1748
  </span>
1738
1749
  </a>
1739
1750
 
1751
+ </li>
1752
+
1753
+ <li class="md-nav__item">
1754
+ <a href="#profile-行为变更纪律2026-08-19D6" class="md-nav__link">
1755
+ <span class="md-ellipsis">
1756
+
1757
+ profile 行为变更纪律(2026-08-19,D6)
1758
+
1759
+ </span>
1760
+ </a>
1761
+
1740
1762
  </li>
1741
1763
 
1742
1764
  </ul>
@@ -1769,7 +1791,7 @@
1769
1791
  <tbody>
1770
1792
  <tr>
1771
1793
  <td><code>contractsVersion</code></td>
1772
- <td>Contracts 冻结版本(当前 <code>1.5.0</code>)</td>
1794
+ <td>Contracts 冻结版本(当前 <code>1.6.0</code>)</td>
1773
1795
  <td>机器契约内容的版本</td>
1774
1796
  </tr>
1775
1797
  <tr>
@@ -1784,7 +1806,7 @@
1784
1806
  </tr>
1785
1807
  </tbody>
1786
1808
  </table>
1787
- <p>三者都由 <code>describeAuditSurface()</code> 一次性给出,审计侧把它们与基线 pin(当前为 <code>baseline/contracts-1.5.0.pin.json</code>)比对。</p>
1809
+ <p>三者都由 <code>describeAuditSurface()</code> 一次性给出,审计侧把它们与基线 pin(当前为 <code>baseline/contracts-1.6.0.pin.json</code>)比对。</p>
1788
1810
  <h2 id="兼容规则">兼容规则<a class="headerlink" href="#兼容规则" title="Permanent link">&para;</a></h2>
1789
1811
  <p>一个被消费的 Contracts 包与某个基线 pin <strong>兼容</strong>,当且仅当同时满足:</p>
1790
1812
  <ol>
@@ -1840,9 +1862,50 @@
1840
1862
  <li><strong>Contracts 1.2.0(2026-08-09)</strong>:报告能力线增量,不是描述补丁:新增 <code>report-model</code>、<code>report-binding</code> 两个顶层契约和 SFC3001~SFC3003 报告错误码,改变了公开机器合同与审计事实。</li>
1841
1863
  <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>
1842
1864
  <li><strong>Contracts 1.4.0(2026-08-09)</strong>:持久状态能力线增量,不是描述补丁:新增 <code>state-event-envelope</code>、<code>state-snapshot-metadata</code> 两个顶层契约,改变了公开机器合同与审计事实。</li>
1843
- <li><strong>Contracts 1.5.0(2026-08-16)</strong>:FND-ADR-010/011 能力线增量,不是描述补丁:新增 <code>declared-read-surface-result</code>、<code>structured-scan-policy</code> 两个顶层契约(顶层对象集合 20 → 22),改变了公开机器合同与审计事实。<code>contracts-1.5.0.pin.json</code> 是当前现行基线;1.4.0 及更早 pin 保留为只读兼容存档。该 pin 的摘要与事实均从当前 <code>describeAuditSurface()/digestAuditSurface()</code> 机械投影,provenance 仍为 <code>product-compatibility-fixture</code>。</li>
1865
+ <li><strong>Contracts 1.5.0(2026-08-16)</strong>:FND-ADR-010/011 能力线增量,不是描述补丁:新增 <code>declared-read-surface-result</code>、<code>structured-scan-policy</code> 两个顶层契约(顶层对象集合 20 → 22),改变了公开机器合同与审计事实。该 pin 的摘要与事实均从当前 <code>describeAuditSurface()/digestAuditSurface()</code> 机械投影,provenance 仍为 <code>product-compatibility-fixture</code>。</li>
1866
+ <li><strong>Contracts 1.6.0(2026-08-18)</strong>:审计整改 C5 能力线增量,不是描述补丁:新增 <code>public-boundary-declaration</code>、<code>platform-difference-registry</code>、<code>observation-scope</code>、<code>profile-adoption-declaration</code>、<code>audit-baseline-pin</code>、<code>token-estimate-record</code> 六个顶层契约(顶层对象集合 24 → 30),改变了公开机器合同与审计事实;未新增 SFC 错误码,规则与 kernel 协议仅随 <code>contractsVersion</code> 字段更新。<code>contracts-1.6.0.pin.json</code> 是当前现行基线(经 <code>scripts/baseline-pin-gen.mjs --update</code> 由 <code>describeAuditSurface()/describeBaselinePin()</code> 机械生成,落盘前经 audit-baseline-pin 合同校验与 <code>verifyBaselinePin()</code> 自校验);1.5.0 及更早 pin 保留为只读兼容存档。pin 合同本身(<code>audit-baseline-pin</code>)与消费面校验函数 <code>verifyBaselinePin()</code>(AUD-BASE-001 / AUD-LOCK-001 编码)在本版本落地(GAP-5 / SG-28)。</li>
1844
1867
  <li>审计运行时先做包锁验证(见 isolation-and-lockfile.md),再做变异重放;pin 不匹配时,变异重放结果不得被采信。</li>
1845
1868
  </ul>
1869
+ <h2 id="profile-行为变更纪律2026-08-19D6">profile 行为变更纪律(2026-08-19,D6)<a class="headerlink" href="#profile-行为变更纪律2026-08-19D6" title="Permanent link">&para;</a></h2>
1870
+ <p>Foundation 对外暴露的 profile 机制面是消费方 pin 的行为契约,包括 <code>FOUNDATION_MECHANISM_OPERATIONS</code> 8 个 operations 与 <code>runner.mjs</code> 直接导出(含 <code>publishFileExclusive</code> 等函数的选项面)。<strong>profile 行为变更 = profile 版本变更</strong>:行为语义漂移不得在不升版本的前提下发生。stability 维持 candidate-only(D6)期间同样适用——candidate profile 的字节一致性由 pin digest 约束,行为语义变更必须走版本坐标,不因 candidate 状态而豁免。</p>
1871
+ <table>
1872
+ <thead>
1873
+ <tr>
1874
+ <th>变更</th>
1875
+ <th>分级</th>
1876
+ <th>需要的动作</th>
1877
+ </tr>
1878
+ </thead>
1879
+ <tbody>
1880
+ <tr>
1881
+ <td>8 个 operations 之一的分派语义变化(参数、结果、错误 kind)</td>
1882
+ <td>profile 行为变更</td>
1883
+ <td>包版本递增(candidate 阶段为 candidate 版本递增)+ 本文件更新</td>
1884
+ </tr>
1885
+ <tr>
1886
+ <td>runner 直接导出面变化(新增/删除/改变导出,含 publish 函数族)</td>
1887
+ <td>profile 行为变更</td>
1888
+ <td>包版本递增 + 本文件更新</td>
1889
+ </tr>
1890
+ <tr>
1891
+ <td>publish 选项面变化(2026-08-19 D5 为 <code>publishFileExclusive</code> 新增 <code>createParents</code> 选项即此类;选项是 Foundation 侧契约,消费面只传参)</td>
1892
+ <td>profile 行为变更</td>
1893
+ <td>包版本递增 + 本文件更新</td>
1894
+ </tr>
1895
+ <tr>
1896
+ <td>不改变行为的字节变更(注释、格式化)</td>
1897
+ <td>无影响</td>
1898
+ <td>无需版本动作(pin digest 仍按既有机制变化)</td>
1899
+ </tr>
1900
+ </tbody>
1901
+ </table>
1902
+ <p>消费方响应动作:</p>
1903
+ <ol>
1904
+ <li><strong>pin 升级</strong>:消费方把 foundation-pin(或等价钉扎)升级到含该行为变更的版本;禁止在旧 pin 上假设新行为。</li>
1905
+ <li><strong>adoption-lock 重生成</strong>:受影响消费方重新生成 adoption-lock(或等价声明载体),使 <code>declared_foundation_surface</code> 与 <code>foundation_versions</code> 反映新 pin 字节。</li>
1906
+ <li><strong>先建后删</strong>:行为变更以 Foundation 侧行为测试(含 bundle 字节对象测试)落地为先,消费方删除自身重验测试在后(D2 顺序)。</li>
1907
+ </ol>
1908
+ <p><strong>行为归属记录(2026-08-19)</strong>:「宿主运行时(node)不可用 → 无回退、fail-closed」的触发面(node 解析/env 检查)属于消费方调用边界(SFA 侧为 D3 已裁决接受的残余风险,仅保留调用点声明检查);Foundation 侧等价语义 = 写入环节失败时 fail-closed(无部分产物、错误码正确、无本地回退),由 atomic 行为测试承接,不在 Foundation 建宿主 spawn 测试。</p>
1846
1909
 
1847
1910
 
1848
1911
 
@@ -573,22 +573,22 @@
573
573
  </li>
574
574
 
575
575
  <li class="md-nav__item">
576
- <a href="#十字段-hand-off-草案" class="md-nav__link">
576
+ <a href="#Profile-草稿" class="md-nav__link">
577
577
  <span class="md-ellipsis">
578
578
 
579
- 十字段 hand-off 草案
579
+ Profile 草稿
580
580
 
581
581
  </span>
582
582
  </a>
583
583
 
584
- <nav class="md-nav" aria-label="十字段 hand-off 草案">
584
+ <nav class="md-nav" aria-label="Profile 草稿">
585
585
  <ul class="md-nav__list">
586
586
 
587
587
  <li class="md-nav__item">
588
- <a href="#INCOMPLETE-阻断规则" class="md-nav__link">
588
+ <a href="#不完整阻断规则" class="md-nav__link">
589
589
  <span class="md-ellipsis">
590
590
 
591
- INCOMPLETE 阻断规则
591
+ 不完整阻断规则
592
592
 
593
593
  </span>
594
594
  </a>
@@ -607,10 +607,10 @@
607
607
  </li>
608
608
 
609
609
  <li class="md-nav__item">
610
- <a href="#渲染边界" class="md-nav__link">
610
+ <a href="#边界" class="md-nav__link">
611
611
  <span class="md-ellipsis">
612
612
 
613
- 渲染边界
613
+ 边界
614
614
 
615
615
  </span>
616
616
  </a>
@@ -1923,22 +1923,22 @@
1923
1923
  </li>
1924
1924
 
1925
1925
  <li class="md-nav__item">
1926
- <a href="#十字段-hand-off-草案" class="md-nav__link">
1926
+ <a href="#Profile-草稿" class="md-nav__link">
1927
1927
  <span class="md-ellipsis">
1928
1928
 
1929
- 十字段 hand-off 草案
1929
+ Profile 草稿
1930
1930
 
1931
1931
  </span>
1932
1932
  </a>
1933
1933
 
1934
- <nav class="md-nav" aria-label="十字段 hand-off 草案">
1934
+ <nav class="md-nav" aria-label="Profile 草稿">
1935
1935
  <ul class="md-nav__list">
1936
1936
 
1937
1937
  <li class="md-nav__item">
1938
- <a href="#INCOMPLETE-阻断规则" class="md-nav__link">
1938
+ <a href="#不完整阻断规则" class="md-nav__link">
1939
1939
  <span class="md-ellipsis">
1940
1940
 
1941
- INCOMPLETE 阻断规则
1941
+ 不完整阻断规则
1942
1942
 
1943
1943
  </span>
1944
1944
  </a>
@@ -1957,10 +1957,10 @@
1957
1957
  </li>
1958
1958
 
1959
1959
  <li class="md-nav__item">
1960
- <a href="#渲染边界" class="md-nav__link">
1960
+ <a href="#边界" class="md-nav__link">
1961
1961
  <span class="md-ellipsis">
1962
1962
 
1963
- 渲染边界
1963
+ 边界
1964
1964
 
1965
1965
  </span>
1966
1966
  </a>
@@ -2196,83 +2196,28 @@
2196
2196
  <li><strong>回滚以证据为准</strong>:采用落盘前必须先有 <code>adoptionProof</code> 与 <code>foundationPlanDigest</code> 双摘要绑定;回滚时以计划写集的 <code>expect.sha256</code> 前置状态还原,未声明前置状态的覆盖动作在 <code>projection</code> 阶段即拒绝。</li>
2197
2197
  <li><strong>fail-closed 默认</strong>:任何不可解析、越界、身份不符或证据缺失的输入,都使对应判定为未证明,不假设成功。</li>
2198
2198
  </ul>
2199
- <h2 id="十字段-hand-off-草案">十字段 hand-off 草案<a class="headerlink" href="#十字段-hand-off-草案" title="Permanent link">&para;</a></h2>
2200
- <p><code>adopt-plan</code> 输出携带 <code>handoffDraft</code> 子块(kind=<code>skill-family.handoff-draft</code>,schemaVersion=1),为 planner 侧的十字段 hand-off 提供结构化数据草案。字段来源只有两种:<code>derived</code>(可由只读证据机械推导)与 <code>INCOMPLETE</code>(不可机械推导,绝不猜测)。十字段与源码常量 <code>HANDOFF_FIELDS</code> 逐一对应:</p>
2201
- <table>
2202
- <thead>
2203
- <tr>
2204
- <th>id</th>
2205
- <th>字段名</th>
2206
- <th>来源</th>
2207
- </tr>
2208
- </thead>
2209
- <tbody>
2210
- <tr>
2211
- <td>1</td>
2212
- <td><code>project-identity</code></td>
2213
- <td>derived</td>
2214
- </tr>
2215
- <tr>
2216
- <td>2</td>
2217
- <td><code>repository-state</code></td>
2218
- <td>derived</td>
2219
- </tr>
2220
- <tr>
2221
- <td>3</td>
2222
- <td><code>foundation-binding</code></td>
2223
- <td>derived(清单已声明绑定)/INCOMPLETE(无清单声明)</td>
2224
- </tr>
2225
- <tr>
2226
- <td>4</td>
2227
- <td><code>write-set-policy</code></td>
2228
- <td>derived</td>
2229
- </tr>
2230
- <tr>
2231
- <td>5</td>
2232
- <td><code>legacy-exits</code></td>
2233
- <td>derived</td>
2234
- </tr>
2235
- <tr>
2236
- <td>6</td>
2237
- <td><code>business-logic-to-keep</code></td>
2238
- <td>恒 INCOMPLETE</td>
2239
- </tr>
2240
- <tr>
2241
- <td>7</td>
2242
- <td><code>plan-summary</code></td>
2243
- <td>derived</td>
2244
- </tr>
2245
- <tr>
2246
- <td>8</td>
2247
- <td><code>verification-entries</code></td>
2248
- <td>derived(四类证据全部 proven)/INCOMPLETE(任一未证明)</td>
2249
- </tr>
2250
- <tr>
2251
- <td>9</td>
2252
- <td><code>legacy-removal-recovery</code></td>
2253
- <td>恒 INCOMPLETE</td>
2254
- </tr>
2255
- <tr>
2256
- <td>10</td>
2257
- <td><code>authorization-status</code></td>
2258
- <td>derived(commit/push/tag/publish 恒为 false)</td>
2259
- </tr>
2260
- </tbody>
2261
- </table>
2262
- <h3 id="INCOMPLETE-阻断规则">INCOMPLETE 阻断规则<a class="headerlink" href="#INCOMPLETE-阻断规则" title="Permanent link">&para;</a></h3>
2199
+ <h2 id="Profile-草稿">Profile 草稿<a class="headerlink" href="#Profile-草稿" title="Permanent link">&para;</a></h2>
2200
+ <p><code>adopt-plan</code> 输出携带 <code>profileDraft</code> 子块(kind=<code>skill-family.profile-draft</code>,schemaVersion=1):一份预填的 profile.json 描述符草稿(<code>descriptorRelPath</code>=<code>profile.json</code>)。adoption-lock 概念与其工件形态已废弃(整改交接 D-8):轻量采用证明就是描述符自身的采用声明,由 <code>verifyProfile</code>(Profile SPI v2)机械核验——字段完整性与 pin 形态在描述符 Schema 步把关(SPE1001),pin 摘要按 GK-4 纪律对写集内真实工件字节逐一比对(SPE1006),overrides 只收紧策略独立裁决(SPE1007)。</p>
2201
+ <p>草稿预填一切可由只读事实机械推导的内容:</p>
2202
+ <ul>
2203
+ <li>描述符身份与基线:<code>profile.id</code>/<code>profile.name</code> 来自计划输入,<code>base.contractsVersion</code> 为已加载的冻结 Contracts 版本;<code>differences</code>/<code>spi</code> 为空数组起点。</li>
2204
+ <li>采用声明(D-8 最小字段集,权威定义在 <code>profiles/spi/extension-spi.json</code> 的 <code>adoptionDeclaration</code>):</li>
2205
+ <li><code>foundation_profile.id</code> 为计划采用的 Foundation Profile id;<code>version</code>/<code>stability</code> 属人类决策,保持 null。</li>
2206
+ <li><code>foundation_pin.algorithm</code> 恒为 <code>sha256</code>;三个 Foundation 包的 <code>version</code> 按「迁移清单声明优先,其次加载常量」预填;<code>path</code>/<code>sha256</code> 在真实工件放入 Profile 写集之前保持 null(摘要只能来自真实字节,绝不猜测)。</li>
2207
+ <li><code>adopted_at</code> 在采用时刻才产生,规划期保持 null。</li>
2208
+ <li><code>overrides</code> 为空数组(空示例):覆盖是可选的自收紧声明,Kit 不枚举规则示例(核心不导入 Profile 层);草稿附带 <code>overridesGuidance</code> 说明只收紧语义。</li>
2209
+ </ul>
2210
+ <h3 id="不完整阻断规则">不完整阻断规则<a class="headerlink" href="#不完整阻断规则" title="Permanent link">&para;</a></h3>
2263
2211
  <ul>
2264
- <li>任何 INCOMPLETE 字段都使 <code>ready=false</code>:草案带缺口就不得进入 hand-off。</li>
2265
- <li>工具绝不猜测不可机械推导的字段:</li>
2266
- <li><code>business-logic-to-keep</code> 与 <code>legacy-removal-recovery</code> <strong>恒 INCOMPLETE</strong>,必须由人类负责人给出,工具无推导依据;</li>
2267
- <li><code>foundation-binding</code> 在无迁移清单声明(<code>foundationPackages</code>)时 INCOMPLETE,只计清单声明的绑定;</li>
2268
- <li><code>verification-entries</code> 在四类证据(unit/integration/consumer/independentAudit)任一未达 proven 时 INCOMPLETE。</li>
2212
+ <li>任何不可机械推导的字段保持 null 并列入 <code>incompleteFields</code>;只要 <code>incompleteFields</code> 非空即 <code>ready=false</code>:带缺口的草稿不得直接落盘为采用声明。</li>
2213
+ <li>工具绝不猜测:人工需补齐 <code>foundation_profile.version</code>/<code>stability</code>、各包工件的 <code>path</code>/<code>sha256</code>、<code>adopted_at</code> 与 <code>profile.version</code>。</li>
2269
2214
  </ul>
2270
2215
  <h3 id="绑定">绑定<a class="headerlink" href="#绑定" title="Permanent link">&para;</a></h3>
2271
- <p>草案携带双 sha256 摘要(<code>binding</code> 块):<code>targetSetDigest</code> 汇总目标仓文件集合,<code>foundationPlanDigest</code> 汇总 Foundation 计划写集。同一目标两次计划得到相同摘要,草案与计划时刻的目标状态精确绑定。</p>
2272
- <h3 id="渲染边界">渲染边界<a class="headerlink" href="#渲染边界" title="Permanent link">&para;</a></h3>
2216
+ <p>草稿携带双 sha256 摘要(<code>binding</code> 块):<code>targetSetDigest</code> 汇总目标仓文件集合,<code>foundationPlanDigest</code> 汇总 Foundation 计划写集。同一目标两次计划得到相同摘要,草稿与计划时刻的目标状态精确绑定。</p>
2217
+ <h3 id="边界">边界<a class="headerlink" href="#边界" title="Permanent link">&para;</a></h3>
2273
2218
  <ul>
2274
- <li>渲染器只写 planner 侧的 hand-off 草案,<strong>绝不写消费者仓</strong>;</li>
2275
- <li>不新增第五个 Kit 顶层命令:Kit 顶层命令恒为 scaffold、adopt-plan、projection、check 四个,<code>handoffDraft</code> 只是 <code>adopt-plan</code> 输出的子块。</li>
2219
+ <li><code>adopt-plan</code> 严格只读:草稿只随计划输出到 stdout,<strong>绝不写消费者仓</strong>;</li>
2220
+ <li>不新增第五个 Kit 顶层命令:Kit 顶层命令恒为 scaffold、adopt-plan、projection、check 四个,<code>profileDraft</code> 只是 <code>adopt-plan</code> 输出的子块。</li>
2276
2221
  </ul>
2277
2222
  <h2 id="危害类-fixture">危害类 fixture<a class="headerlink" href="#危害类-fixture" title="Permanent link">&para;</a></h2>
2278
2223
  <p><code>fixtures/adoption/cases/</code> 覆盖七个危害类:dirty 仓、嵌套仓、tracked-but-ignored、符号链接占位、生成物漂移、旧实现退出门禁、临时例外字段。每个案例以字节级前后快照证明计划只读;案例说明见仓内 <code>fixtures/adoption/README.md</code>。</p>
@@ -1792,17 +1792,17 @@
1792
1792
  <tbody>
1793
1793
  <tr>
1794
1794
  <td><code>skill-family-contracts</code></td>
1795
- <td>0.5.0</td>
1795
+ <td>0.7.0</td>
1796
1796
  <td><a href="https://github.com/ifoohoo/skill-family-contracts">ifoohoo/skill-family-contracts</a></td>
1797
1797
  </tr>
1798
1798
  <tr>
1799
1799
  <td><code>skill-family-harness-node</code></td>
1800
- <td>0.5.0</td>
1800
+ <td>0.7.0</td>
1801
1801
  <td><a href="https://github.com/ifoohoo/skill-family-harness-node">ifoohoo/skill-family-harness-node</a></td>
1802
1802
  </tr>
1803
1803
  <tr>
1804
1804
  <td><code>skill-family-engineering-kit</code></td>
1805
- <td>0.5.0</td>
1805
+ <td>0.7.0</td>
1806
1806
  <td><a href="https://github.com/ifoohoo/skill-family-engineering-kit">ifoohoo/skill-family-engineering-kit</a></td>
1807
1807
  </tr>
1808
1808
  </tbody>