skill-family-engineering-kit 0.19.2 → 0.19.3

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.
@@ -1 +1 @@
1
- {"config":{"lang":["en"],"separator":"[\\s\\u200b\\u3000\\-\u3001\u3002\uff0c\uff0e\uff1f\uff01\uff1b]+","pipeline":["stemmer"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"\u4e2d\u6587 \u00b7 \u9996\u9875","text":"<p>English</p>"},{"location":"#Skill-Family-Foundation-Workspace","title":"Skill Family Foundation Workspace","text":"<p>Skill Family \u751f\u547d\u5468\u671f\u7684\u516c\u5171\u5de5\u7a0b\u57fa\u7840\u8bbe\u65bd\u7236\u5de5\u4f5c\u533a\u3002\u672c\u4ed3\u63d0\u4f9b\u673a\u5668\u5951\u7ea6\uff08Contracts\uff09\u3001Node \u8584\u8fd0\u884c\u65f6\uff08Harness\uff09\u3001\u5de5\u7a0b\u5de5\u5177\u5305\uff08Engineering Kit\uff09\u3001Profile SPI\u3001\u5b8c\u5168\u865a\u6784\u7684\u901a\u7528\u6837\u4f8b\uff08fixture\uff09\u548c\u5de5\u7a0b\u6587\u6863\u9aa8\u67b6\u3002</p>"},{"location":"#\u5f53\u524d\u72b6\u6001","title":"\u5f53\u524d\u72b6\u6001","text":"<p>\u672c\u4ed3\u662f\u4e00\u5957\u5f00\u53d1\u4e2d\u7684\u9996\u7248\u9aa8\u67b6\u3002\u7248\u672c\u3001\u53d1\u5e03\u3001Pages \u4e0e Git \u7b49\u52a8\u6001\u72b6\u6001\u552f\u4e00\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff1b\u8bb8\u53ef\u8bc1\u5df2\u6279\u51c6\u4e3a Apache License 2.0\uff0c\u7248\u6743\u4e3b\u4f53\u4e3a\u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8\uff0c\u89c4\u8303\u5168\u6587\u89c1\u6839\u7ea7 <code>LICENSE</code>\u3002</p> <p>\u672c\u5de5\u4f5c\u533a\u6c38\u4e45 private\uff0c\u662f\u552f\u4e00\u5f00\u53d1\u771f\u6e90\uff1b\u516c\u5f00\u8fb9\u754c\u53ea\u6709\u4e09\u4e2a\u7248\u672c\u5316\u53d1\u5e03\u955c\u50cf\u4e0e npm tarball\uff0c\u9489\u4f4f\u7684\u6d88\u8d39\u5750\u6807\u4e0e\u53d1\u5e03\u72b6\u6001\u552f\u4e00\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u3002</p> <p>\u4ea7\u54c1\u7ea7\u7684\u552f\u4e00\u72b6\u6001\u9875\u662f \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff0c\u7531 <code>node scripts/docs/fact-check.mjs</code> \u5bf9\u7167\u673a\u5668\u771f\u6e90\u673a\u68b0\u6821\u9a8c\uff1b\u5176\u4ed6\u9875\u9762\u4e0d\u627f\u8f7d\u7b2c\u4e8c\u5957\u72b6\u6001\u53e3\u5f84\u3002</p>"},{"location":"#\u9996\u7248\u7ec4\u6210","title":"\u9996\u7248\u7ec4\u6210","text":"\u7ec4\u6210 \u8def\u5f84 \u804c\u8d23 Contracts <code>packages/skill-family-contracts</code> \u673a\u5668\u53ef\u6267\u884c\u5de5\u7a0b\u7ed3\u6784\u548c\u673a\u5236\u534f\u8bae\u7684\u552f\u4e00\u6743\u5a01 Harness <code>packages/skill-family-harness-node</code> \u53ea\u5b9e\u73b0 Contracts \u5b9a\u4e49\u7684\u673a\u5236\u534f\u8bae\uff0c\u4e0d\u62e5\u6709\u4e1a\u52a1\u8bed\u4e49 Engineering Kit <code>packages/skill-family-engineering-kit</code> \u53ea\u63d0\u4f9b <code>scaffold</code>\u3001<code>adopt-plan</code>\u3001<code>projection</code>\u3001<code>check</code> \u56db\u4e2a\u9876\u5c42\u547d\u4ee4 Profile \u79cd\u5b50 <code>profiles/public-plugin</code> \u516c\u5f00\u63d2\u4ef6\u5f62\u6001\u7684 Profile \u79cd\u5b50 \u865a\u6784\u6837\u4f8b <code>fixtures/generic-profile-extension-conformance</code> \u5b8c\u5168\u865a\u6784\u7684\u6269\u5c55\u4e00\u81f4\u6027\u6837\u4f8b <p>\u5305\u6e05\u5355\u3001Profile\u3001fixture \u4e0e\u9876\u5c42\u547d\u4ee4\u4ee5 <code>.foundation/skeleton-manifest.json</code> \u4e3a\u673a\u5668\u771f\u6e90\uff1b\u5de5\u5177\u7248\u672c\u9501\u5b9a\u89c1 <code>.foundation/version-lock.json</code>\u3002</p>"},{"location":"#\u6587\u6863\u5730\u56fe","title":"\u6587\u6863\u5730\u56fe","text":"<ul> <li>\u5b89\u88c5\u4e0e\u73af\u5883\u2014\u2014\u5de5\u5177\u7248\u672c pin\u3001\u5b89\u88c5\u4e0e\u6587\u6863\u7ad9\u70b9\u6784\u5efa</li> <li>\u5feb\u901f\u5f00\u59cb\u2014\u2014\u4ece\u672c\u5730\u9a8c\u8bc1\u5230\u8bd5\u8fd0\u884c\u7684\u6700\u77ed\u8def\u5f84</li> <li>\u80fd\u529b\u4e0e\u8bca\u65ad\u2014\u2014Kit \u56db\u547d\u4ee4\u3001\u9000\u51fa\u7801\u4e0e\u6545\u969c\u6392\u67e5</li> <li>\u67b6\u6784\u8fb9\u754c\u2014\u2014\u5206\u5c42\u3001\u552f\u4e00\u6743\u5a01\u3001\u9884\u7b97\u4e0e\u6587\u6863\u4e8b\u5b9e\u68c0\u67e5</li> <li>\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u2014\u2014\u552f\u4e00\u4ea7\u54c1\u72b6\u6001\u9875</li> <li>Git \u751f\u547d\u5468\u671f\u6307\u5357\u2014\u2014\u5206\u652f\u3001\u63d0\u4ea4\u3001\u63a8\u9001\u4e0e\u53d1\u5e03\u7684\u6388\u6743\u8fb9\u754c</li> </ul>"},{"location":"#\u5199\u4f5c\u8fb9\u754c","title":"\u5199\u4f5c\u8fb9\u754c","text":"<p>\u6587\u6863\u53ea\u6d88\u8d39\u673a\u5668\u771f\u6e90\u6784\u6210\u7684\u51bb\u7ed3\u4e8b\u5b9e\u5305\uff08manifest\u3001package.json\u3001Contracts \u767b\u8bb0\u7b49\uff09\uff0c\u7531 <code>node scripts/docs/fact-check.mjs</code> \u673a\u68b0\u6821\u9a8c\u3002\u6a21\u578b\u540d\u3001\u51ed\u636e\u548c\u8c03\u5ea6\u4fe1\u606f\u4e0d\u8fdb\u5165\u6587\u6863\uff0c\u4e5f\u4e0d\u8fdb\u5165 Contracts\uff1b\u8be6\u89c1 \u67b6\u6784\u8fb9\u754c\u3002</p>"},{"location":"architecture/","title":"\u4e2d\u6587 \u00b7 \u67b6\u6784\u8fb9\u754c","text":"<p>English</p>"},{"location":"architecture/#\u67b6\u6784\u8fb9\u754c","title":"\u67b6\u6784\u8fb9\u754c","text":"<p>\u672c\u9875\u662f Skill Family Foundation \u9762\u5411\u4f7f\u7528\u8005\u7684\u7a33\u5b9a\u67b6\u6784\u6295\u5f71\u3002\u5b83\u53ea\u89e3\u91ca\u7ed3\u6784\u3001\u804c\u8d23\u3001\u8fb9\u754c\u4e0e\u8def\u7531\uff0c\u4e0d\u627f\u8f7d\u52a8\u6001\u53d1\u5e03\u72b6\u6001\uff08\u53d1\u5e03\u72b6\u6001\u53ea\u7531 <code>docs/status/current.md</code> \u8bb0\u5f55\uff0c\u4e14\u7ecf <code>scripts/docs/fact-check.mjs</code> \u673a\u68b0\u6821\u9a8c\uff09\u3002\u6240\u6709\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\u3001\u652f\u6301\u72b6\u6001\u90fd\u4ece\u673a\u5668\u771f\u6e90\u590d\u7b97\u3002</p>"},{"location":"architecture/#\u5206\u5c42","title":"\u5206\u5c42","text":"<p>2026-08-09 \u67b6\u6784 hand-off\uff08FND-ADR-001\uff5e007\uff0cactive\uff0c\u89c1 <code>artifacts/decisions/</code>\uff09\u786e\u7acb\u7684\u5206\u5c42\uff1a\u7eb5\u5411\u4f9d\u8d56\u94fe\u56db\u5c42\uff0c\u6a2a\u5411\u80fd\u529b\u6302\u63a5\uff0c\u4e0d\u65b0\u589e\u7eb5\u5c42\u3002</p> <pre><code>\u6280\u80fd\u65cf\u4e1a\u52a1\uff08\u5404\u4ea7\u54c1\u4ed3\uff1arelease-skill\u3001loop-agent\u3001skill-eval \u7b49\uff09\n \u2502 \u4f9d\u8d56\n \u25bc\nEngineering Kit\uff08scaffold / adopt-plan / projection / check\uff09\n \u2502 \u4f9d\u8d56\n \u25bc\nHarness Node\uff08Contracts \u673a\u5236\u534f\u8bae\u5b9e\u73b0\uff09\n \u2502 \u4f9d\u8d56\n \u25bc\nContracts\uff08\u7ed3\u6784\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001\u534f\u8bae\u540d\u767b\u8bb0\uff09\n \u25b2\n \u2514---------------- independent Audit consumer\n\n\u6a2a\u5411\uff08\u6302\u63a5\u9762\uff0c\u4e0d\u65b0\u589e\u7eb5\u5c42\uff09\uff1a\n- profiles/ \u5bbf\u4e3b\u4e0e\u9879\u76ee\u5f62\u6001\u5dee\u5f02\u58f0\u660e\uff0c\u53ea\u5b9e\u73b0\u7a33\u5b9a SPI\n- \u5bbf\u4e3b \u5916\u90e8 AI \u7f16\u7801\u8fd0\u884c\u73af\u5883\uff1a\u62e5\u6709\u8bed\u4e49\uff0cFoundation \u7edf\u4e00\u7ed3\u6784\u6027\u5dee\u5f02\n- release-skill \u53d1\u5e03\u72b6\u6001\u4e0e\u5168\u90e8\u8fdc\u7aef\u5199\u5165\uff0c\u4e0d\u8fdb\u5165 Foundation\n- Artifact Graph `artifacts/` \u67b6\u6784\u5236\u54c1\u4f53\u7cfb\uff0c\u95e8\u7981\u4e3a check:artifacts\n</code></pre> <p>\u540c\u4e00 Git workspace \u8fd8\u5305\u542b <code>packages/foundation-adoption-review/</code>\u3002\u5b83\u662f\u72ec\u7acb\u7684 Plugin release unit \u548c\u516c\u5f00\u955c\u50cf\u6e90\uff0c\u4ece 0.17.0 \u8d77\u4e0e Foundation \u6570\u503c\u5bf9\u9f50\uff0c\u5386\u53f2 0.1.0 \u53d1\u5e03\u4fdd\u6301\u4e0d\u53d8\u3002\u5b83\u4f7f\u7528 Foundation \u7684\u516c\u5f00\u4e8b\u5b9e\uff0c\u4f46\u4e0d\u5c5e\u4e8e Contracts \u2192 Harness \u2192 Engineering Kit \u4f9d\u8d56\u94fe\uff0c\u4e5f\u4e0d\u8ba1\u4f5c Foundation \u7684\u7b2c\u56db\u4e2a\u673a\u5236\u5305\u3002\u8be5 Plugin \u7684\u516c\u5f00\u95ed\u5305\u7531\u81ea\u5df1\u7684 release unit \u767d\u540d\u5355\u9650\u5b9a\uff1b\u6839\u76ee\u5f55\u7684\u8ba1\u5212\u3001\u5236\u54c1\u3001\u6d4b\u8bd5\u548c\u5176\u4ed6\u79c1\u6709\u6587\u6863\u4e0d\u4f1a\u8fdb\u5165 Plugin \u955c\u50cf\u3002</p> <p>\u7bad\u5934\u6307\u5411\u88ab\u4f9d\u8d56\u65b9\u3002\u516c\u5171\u6838\u5fc3\u4e0d\u5f97\u53cd\u5411\u4f9d\u8d56\u5177\u4f53 Profile \u6216\u5177\u4f53\u6280\u80fd\u65cf\uff1b\u65b0\u80fd\u529b\u7684\u4f9d\u8d56\u65b9\u5411\u843d\u4f4d\u89c1 <code>artifacts/design/FND-DES-001.md</code>\uff0c\u9010\u8d44\u4ea7\u5f52\u5c5e\u89c1 FND-ADR-002\u3002</p>"},{"location":"architecture/#\u804c\u8d23\u77e9\u9635","title":"\u804c\u8d23\u77e9\u9635","text":"<p>\u6bcf\u4e2a\u5206\u5c42\u53ea\u627f\u62c5\u4e0b\u8868\u5217\u51fa\u7684\u804c\u8d23\uff0c\u8d8a\u754c\u80fd\u529b\u4e00\u5f8b\u7531\u5916\u90e8\u9879\u76ee\u6216\u6d88\u8d39\u8005\u62e5\u6709\u3002</p> \u5206\u5c42 \u62e5\u6709 \u4e0d\u62e5\u6709\uff08\u843d\u5728\u522b\u5904\uff09 Contracts \u7ed3\u6784\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001\u534f\u8bae\u540d\u767b\u8bb0\uff1b46 \u7c7b\u9876\u5c42\u5bf9\u8c61\uff1b9 \u6761 mandatory rule \u4e1a\u52a1\u5b57\u6bb5\u8bed\u4e49\u3001\u9886\u57df\u5ba1\u8ba1\u3001\u8fdc\u7aef\u5199\u5165\u3001\u6a21\u578b\u751f\u6210 Harness Contracts \u7684 Node \u673a\u5236\u5b9e\u73b0\uff1b\u8def\u5f84\u6536\u5bb9\u3001\u539f\u5b50\u5199\u3001\u95ed\u5305\u3001\u8bf7\u6c42\u5904\u7406\u3001\u62a5\u544a\u6e32\u67d3\u3001\u5bbf\u4e3b\u63a5\u5165\u673a\u5236\u3001\u72b6\u6001\u5e95\u5ea7 \u4e1a\u52a1\u8bed\u4e49\u3001workflow \u7f16\u6392\u3001\u6a21\u578b\u8c03\u7528\u3001git \u5199\u3001\u7f51\u7edc\u8fdc\u7aef Engineering Kit \u56db\u4e2a\u5de5\u7a0b\u547d\u4ee4\u53ca\u5176\u53ea\u8bfb/\u53d7\u9650\u5199\u5165\u8fb9\u754c\uff1bhost \u5b50\u52a8\u4f5c\u6ce8\u5165\u5177\u4f53 Profile \u81ea\u52a8\u4fee\u590d\u3001\u81ea\u52a8\u8fc1\u79fb\u3001\u8fdc\u7aef\u53d1\u5e03\u3001\u7b2c 5 \u4e2a\u547d\u4ee4 Profile \u5bbf\u4e3b\u4e0e\u9879\u76ee\u5f62\u6001\u5dee\u5f02\u7684\u58f0\u660e\u5f0f SPI\uff1b\u53ea\u5b9e\u73b0\u7a33\u5b9a SPI \u4e1a\u52a1\u8bed\u4e49\u3001\u53ef\u6267\u884c\u811a\u672c\u5165\u53e3\u3001\u516c\u5171\u6838\u5fc3\u53d8\u66f4 release-skill \u53d1\u5e03\u72b6\u6001\u4e0e\u5168\u90e8\u8fdc\u7aef\u5199\u5165 Foundation \u4e0d\u542b\u4efb\u4f55 publish/remote-write \u5165\u53e3 loop-agent \u4efb\u52a1\u3001\u91cd\u8bd5\u3001\u8fd4\u5de5\u3001\u9a8c\u6536\u3001\u81ea\u8fed\u4ee3 Foundation \u4e0d\u5b9a\u4e49 workflow \u72b6\u6001\u673a Artifact Graph \u5236\u54c1\u5173\u7cfb\u3001context\u3001packet\u3001version-lock Foundation \u4e0d\u62e5\u6709\u5236\u54c1\u56fe Audit \u72ec\u7acb fixture\u3001\u9884\u671f\u503c\u3001\u88c1\u51b3 \u9886\u57df\u8bed\u4e49\u7ed3\u8bba\u7531\u5916\u90e8\u5ba1\u9605\u62e5\u6709"},{"location":"architecture/#\u80fd\u529b\u5f52\u5c5e\u7b97\u6cd5","title":"\u80fd\u529b\u5f52\u5c5e\u7b97\u6cd5","text":"<p>\u7ed9\u4e00\u4e2a\u67b6\u6784\u9700\u6c42\uff0c\u6309\u4e0b\u9762\u987a\u5e8f\u5224\u5b9a\u5f52\u5c5e\uff0c\u547d\u4e2d\u5373\u505c\uff1a</p> <ol> <li>\u542b\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1 oracle \u2192 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u53ea\u63a5\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\u3002</li> <li>\u662f\u7ed3\u6784\u3001\u534f\u8bae\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u6216\u5bf9\u8c61 Schema \u2192 Contracts\u3002</li> <li>\u662f\u8de8\u6280\u80fd\u65cf\u53ef\u590d\u7528\u7684 Node \u673a\u5236 \u2192 Harness\u3002</li> <li>\u662f scaffold/adopt-plan/projection/check \u6216\u5177\u4f53 host Profile \u6ce8\u5165 \u2192 Kit / Profile\u3002</li> <li>\u6d89\u53ca\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001 \u2192 release-skill\u3002</li> <li>\u6d89\u53ca\u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5/\u9a8c\u6536 \u2192 loop-agent\u3002</li> <li>\u6d89\u53ca\u5236\u54c1\u5173\u7cfb/\u7248\u672c\u9501 \u2192 artifact-graph\u3002</li> <li>\u53ea\u6709\u4e00\u4e2a\u6d88\u8d39\u8005\u6216\u5c1a\u672a\u8bc1\u660e\u8de8\u4e24\u4e2a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d \u2192 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u6269\u5f20 Foundation\u3002</li> </ol> <p>\u7b2c 8 \u6b65\u662f\u6269\u5f20\u95f8\u95e8\uff1a\u65b0\u589e\u7ec4\u4ef6\u5fc5\u987b\u8bf4\u660e\u5220\u9664\u5b83\u4f1a\u8ba9\u4e24\u4e2a\u4ee5\u4e0a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\u5b9e\u73b0\uff0c\u5e76\u7ecf\u72ec\u7acb fixture \u9a8c\u8bc1\uff1b\u8fdb\u5165\u95e8 1 \u53e6\u8981\u6c42\u81f3\u5c11\u4e00\u4e2a\u73b0\u6709\u771f\u5b9e\u6d88\u8d39\u8005\u52a0\u4e00\u4e2a\u7ed3\u6784\u540c\u578b\u7684\u53ef\u9884\u89c1\u6d88\u8d39\u8005\uff08\u7b2c\u4e8c\u6d88\u8d39\u8005\u4e0d\u8981\u6c42\u5df2\u4e0a\u7ebf\uff0c\u4f46\u9700\u6c42\u5fc5\u987b\u80fd\u7528\u540c\u4e00\u7ed3\u6784\u8868\u8fbe\uff0c\u8c03\u6574\u8bb0\u5f55\u89c1 FND-ADR-009\uff09\u3002\u7b2c 9 \u6b65\u662f\u6709\u9650\u5c01\u95ed\u8bed\u4e49\u95f8\u95e8\uff08\u5bf9\u5e94 FND-ADR-001 \u95e8 8\uff09\uff1a\u80fd\u529b\u82e5\u643a\u5e26\u5c11\u91cf\u9886\u57df\u8bed\u4e49\uff0c\u5fc5\u987b\u6ee1\u8db3\u8bed\u4e49\u80fd\u88ab\u5c11\u6570\u7a33\u5b9a\u5c01\u95ed\u679a\u4e3e\u8986\u76d6\uff0c\u6216\u4e3a\u786e\u5b9a\u6027\u4f30\u7b97\u539f\u8bed\u2014\u2014\u7b97\u6cd5\u3001\u9002\u7528\u8303\u56f4\u4e0e\u504f\u5dee\u65b9\u5411\u5df2\u5728\u5951\u7ea6\u4e2d\u58f0\u660e\uff1b\u672c\u95f8\u95e8\u4e0d\u53d6\u6d88\u95e8 2\u300c\u8bed\u4e49\u65e0\u5173\u300d\u4e00\u7968\u5426\u51b3\u3002\u673a\u5668\u53ef\u8bfb\u7248\u89c1 <code>docs/agents/architecture-routing.md</code>\u3002</p>"},{"location":"architecture/#\u4fe1\u4efb\u4e0e\u526f\u4f5c\u7528\u8fb9\u754c","title":"\u4fe1\u4efb\u4e0e\u526f\u4f5c\u7528\u8fb9\u754c","text":"<p>Foundation \u7684\u4fe1\u4efb\u524d\u63d0\u4e0e\u526f\u4f5c\u7528\u7ea6\u5b9a\u6309\u5c42\u56fa\u5316\uff0c\u8c03\u7528\u65b9\u636e\u6b64\u5224\u65ad\u98ce\u9669\uff1a</p> <ul> <li>Contracts\uff1a\u7eaf\u51fd\u6570\uff0c\u65e0\u6587\u4ef6/Git/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff1b\u9519\u8bef\u7801\u51bb\u7ed3\u4e0d\u6f02\u79fb\uff08<code>foundation.contracts.error-codes</code>\uff09\u3002</li> <li>Harness\uff1a\u673a\u5236\u5c42\u53ea\u5728\u53d7\u6536\u5bb9\u8def\u5f84\u5185\u8bfb\u5199\uff1b<code>HARNESS_EXCLUSIONS</code> \u6392\u9664 release-state\u3001remote-network-access\u3001business-semantics\u3001workflow-orchestration\u3001model-calls\u3001git-writes\uff08<code>foundation.harness.errors</code>\uff09\u3002</li> <li>Engineering Kit\uff1a<code>FORBIDDEN_SIDE_EFFECTS</code> \u542b git-init/commit/push/tag\u3001publish\u3001remote-write\uff1b<code>REFUSED_MUTATION_FLAGS</code> \u5728 CLI \u5165\u53e3\u5373\u62d2\uff08<code>foundation.kit.cli</code>\uff09\u3002</li> <li>Profile\uff1a\u58f0\u660e\u5f0f\u5dee\u5f02\uff0c\u5165\u53e3\u5fc5\u987b\u4e3a JSON \u6570\u636e\u8d44\u6e90\uff1b<code>coreOwned</code>\uff08packages/commands/namespacePrefixes\uff09\u4e3a\u7981\u5165\u76ee\u6807\uff08<code>foundation.profile.extension-spi</code>\uff09\u3002</li> <li>\u72b6\u6001\u5e95\u5ea7\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u662f\u552f\u4e00\u6743\u5a01\uff0csnapshot \u662f\u6d3e\u751f\u7f13\u5b58\uff1b<code>confirmOwnerTerminated</code> \u662f\u8c03\u7528\u65b9\u63d0\u4f9b\u7684\u5916\u90e8\u4fe1\u4efb\u951a\uff0c\u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\uff08<code>foundation.harness.state-store</code>\uff09\u3002</li> </ul>"},{"location":"architecture/#\u67b6\u6784\u51b3\u7b56\u6811","title":"\u67b6\u6784\u51b3\u7b56\u6811","text":"<pre><code>\u9700\u6c42\u542b\u9886\u57df\u8bed\u4e49/\u72b6\u6001\u673a/\u5ba1\u8ba1? \u2500\u2500\u662f\u2500\u2500\u25b6 \u7559\u5728\u6d88\u8d39\u8005\n \u2502\u5426\n\u662f\u7ed3\u6784/\u534f\u8bae/\u9519\u8bef\u7801/Schema? \u2500\u2500\u662f\u2500\u2500\u25b6 Contracts\n \u2502\u5426\n\u662f\u8de8\u6280\u80fd\u65cf Node \u673a\u5236? \u2500\u2500\u662f\u2500\u2500\u25b6 Harness\n \u2502\u5426\n\u662f scaffold/adopt/projection/check \u6216 Profile \u6ce8\u5165? \u2500\u2500\u662f\u2500\u2500\u25b6 Kit / Profile\n \u2502\u5426\n\u6d89\u53ca\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001? \u2500\u2500\u662f\u2500\u2500\u25b6 release-skill\n \u2502\u5426\n\u6d89\u53ca\u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5/\u9a8c\u6536? \u2500\u2500\u662f\u2500\u2500\u25b6 loop-agent\n \u2502\u5426\n\u6d89\u53ca\u5236\u54c1\u5173\u7cfb/\u7248\u672c\u9501? \u2500\u2500\u662f\u2500\u2500\u25b6 artifact-graph\n \u2502\u5426\n\u53ea\u6709\u4e00\u4e2a\u6d88\u8d39\u8005/\u672a\u8bc1\u660e\u8de8\u4e24\u4e2a\u771f\u5b9e\u6d88\u8d39\u8005? \u2500\u2500\u662f\u2500\u2500\u25b6 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u6269\u5f20\n \u2502\u5426\n\u643a\u5e26\u5c11\u91cf\u9886\u57df\u8bed\u4e49? \u2500\u2500\u662f\u2500\u2500\u25b6 \u6709\u9650\u5c01\u95ed\u8bed\u4e49\uff1a\u7a33\u5b9a\u95ed\u679a\u4e3e\u53ef\u8986\u76d6\uff0c\u6216\u4e3a\u786e\u5b9a\u6027\n \u2502 \u4f30\u7b97\u539f\u8bed\uff08\u7b97\u6cd5/\u9002\u7528\u8303\u56f4/\u504f\u5dee\u65b9\u5411\u5df2\u5951\u7ea6\u58f0\u660e\uff09\u2192 \u53ef\u7eb3\u5165\uff1b\n \u2502 \u5426\u5219\u7559\u5728\u6d88\u8d39\u8005\uff08FND-ADR-001 \u95e8 8\uff0c\u4e0d\u53d6\u6d88\u95e8 2 \u4e00\u7968\u5426\u51b3\uff09\n \u2502\u5426\n \u2500\u2500\u25b6 \u53ef\u7eb3\u5165\n</code></pre>"},{"location":"architecture/#\u4e0e\u5916\u90e8\u9879\u76ee\u7684\u8def\u7531\u5173\u7cfb","title":"\u4e0e\u5916\u90e8\u9879\u76ee\u7684\u8def\u7531\u5173\u7cfb","text":"<p>Foundation \u4e0d\u662f\u5168\u80fd\u5e95\u5ea7\u3002\u4e0b\u5217\u804c\u8d23\u660e\u786e\u5728 Foundation \u4e4b\u5916\uff1a</p> <ul> <li>\u53d1\u5e03\u4e0e\u8fdc\u7aef\u5199\u5165\uff1arelease-skill \u62e5\u6709\uff1bFoundation \u4e0d\u63d0\u4f9b\u4efb\u4f55 publish/remote-write \u5165\u53e3\uff08<code>foundation.unsupported.remote-publish</code>\uff09\u3002</li> <li>\u4efb\u52a1\u751f\u547d\u5468\u671f\uff1aloop-agent \u62e5\u6709\u4efb\u52a1\u3001\u91cd\u8bd5\u3001\u8fd4\u5de5\u3001\u9a8c\u6536\uff1bFoundation \u4e0d\u542b workflow \u72b6\u6001\u673a\uff08<code>foundation.unsupported.business-state-machine</code>\uff09\u3002</li> <li>\u5236\u54c1\u6cbb\u7406\uff1aartifact-graph \u62e5\u6709 <code>artifacts/</code> \u5173\u7cfb\u5408\u540c\u4e0e\u7248\u672c\u9501\uff0c\u95e8\u7981\u4e3a <code>check:artifacts</code>\u3002</li> <li>\u9886\u57df\u5ba1\u8ba1\uff1a\u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\u62e5\u6709\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\uff1bFoundation \u53ea\u63d0\u4f9b\u786e\u5b9a\u6027\u5ba1\u8ba1\u8868\u9762\uff08<code>foundation.unsupported.domain-audit-semantics</code>\uff09\u3002</li> <li>\u5bbf\u4e3b\u5e94\u7528\u4e0e\u751f\u547d\u5468\u671f\uff1a\u5bbf\u4e3b\u62e5\u6709\u81ea\u8eab\u8bed\u4e49\u4e0e\u751f\u547d\u5468\u671f\u884c\u4e3a\uff1bFoundation \u53ea\u7edf\u4e00\u7ed3\u6784\u6027\u5dee\u5f02\uff0c\u63d0\u4f9b\u6709\u9650 host identity/alias \u89e3\u6790\u3001\u53d7\u6536\u5bb9\u672c\u5730\u6295\u5f71\u3001\u7ed1\u5b9a\u8bfb\u53d6\u3001\u539f\u5b50\u5199\u5165\u548c\u56fa\u5b9a driver \u7684\u53d7\u7ea6\u675f\u9a8c\u8bc1\u3002\u53ea\u6709 Descriptor \u7684 <code>support=supported</code> \u65f6\uff0c<code>planHost</code> \u624d\u53ef\u80fd\u4ea7\u51fa <code>status=planned</code> \u7684 install/update \u8ba1\u5212\uff1bQoder \u7b49 <code>support=manual</code> \u5bbf\u4e3b\u8fd4\u56de\u7a7a\u7684 <code>status=manual</code> \u8ba1\u5212\uff0c<code>applyHostPlan</code> \u5bf9\u8be5\u8ba1\u5212\u8fd4\u56de <code>rejected</code> \u4e0e <code>publicationState=not-attempted</code>\u3002<code>applyHostPlan</code> \u53ea\u6267\u884c <code>status=planned</code> \u7684\u8ba1\u5212\uff1binstall/update \u4ecd\u987b\u6458\u8981\u7ed1\u5b9a\u3001\u5df2\u9a8c\u8bc1 build \u548c\u663e\u5f0f\u6388\u6743\uff0cuninstall \u8fd4\u56de <code>manual-recovery-required</code> \u4e14\u4e0d\u5220\u9664\u6587\u4ef6\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u4f7f\u7528\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e driver\uff0c\u6309\u56fa\u5b9a\u53c2\u6570\u6267\u884c fresh\u3001\u53d7\u7ea6\u675f\u8c03\u7528\uff0c\u5e76\u590d\u7528 <code>existing-user-state + host-managed</code>\u3002\u6280\u80fd\u65cf\uff08\u8c03\u7528\u65b9\uff09\u6839\u636e\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u548c\u4e1a\u52a1\u7b54\u6848\u89e3\u91ca\u4e1a\u52a1\u7ed3\u679c\u5e76\u4f5c\u6700\u7ec8\u9886\u57df\u9a8c\u6536\u3002Qoder \u7684 Descriptor \u4e3a <code>manual</code>\uff0c<code>qodercli-print-v1</code> \u662f <code>candidate</code> \u771f\u5b9e\u9a8c\u8bc1 driver\uff1bWorkBuddy \u4e0e CodeBuddy \u5404\u7528\u72ec\u7acb driver \u548c\u53d1\u73b0\u5e03\u5c40\u3002\u771f\u5b9e\u7528\u6237\u73af\u5883\u4e2d\u7684\u53d1\u5e03\u540e\u63d2\u4ef6\u53d1\u73b0\u3001\u5b89\u88c5\u3001\u66f4\u65b0\u3001marketplace \u4e0e\u53d1\u5e03\u72b6\u6001\u7531 release-skill \u7ba1\u7406\u3002</li> <li>\u540c\u7ea7\u9002\u914d\u5668\u53ea\u8bfb\u9a8c\u8bc1\uff1aContracts 1.10.0 \u589e\u52a0\u6210\u719f\u5ea6\u4e2d\u7acb\u7684 request/result\uff1bHarness \u590d\u7528\u771f\u5b9e\u6839\u7ed1\u5b9a\u3001\u8def\u5f84\u6536\u5bb9\u3001\u8bfb\u53d6\u3001\u95ed\u5305\u548c manifest\uff0c\u6309 peer \u5f52\u4e00\u5316\u540e\u9a8c\u8bc1\u5171\u540c\u6765\u6e90\u4e0e\u552f\u4e00 <code>SKILL.md</code> mapping\uff1bKit \u53ea\u63d0\u4f9b\u8584\u5165\u53e3\u3002Foundation \u4e0d\u62e5\u6709 canonical source\uff0c\u4e0d\u5199\u76ee\u5f55\uff0c\u4e0d\u4ea7\u751f receipt\uff0c\u4e5f\u4e0d\u63a5\u7ba1\u65e7 manifest \u7684\u4e1a\u52a1\u8fc1\u79fb\u3002</li> <li>\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\uff1aContracts 1.11.0 \u589e\u52a0 <code>host-verification-request</code> \u4e0e <code>host-verification-result</code>\uff1bHarness \u5728\u65e2\u6709 <code>superviseProcess</code> \u4e0a\u63d0\u4f9b\u539f\u59cb\u5b57\u8282 sink\uff0cKit \u7ef4\u62a4\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e candidate driver\uff1a\u5176\u4e2d\u5305\u542b <code>qodercli-print-v1</code>\u3001WorkBuddy \u4e0e CodeBuddy \u5404\u81ea\u72ec\u7acb\u7684 driver\uff0c\u4ee5\u53ca\u53e6\u5916\u4e09\u4e2a\u5df2\u767b\u8bb0 driver\u3002\u8c03\u7528\u65b9\u521b\u5efa\u3001\u63d0\u4f9b\u5e76\u72ec\u5360\u672c\u6b21\u9a8c\u8bc1\u6240\u9700\u7684 fresh roots\uff0c\u5b8c\u6210\u68c0\u67e5\u540e\u6e05\u7406\u5176\u72ec\u5360\u7684\u5916\u5c42 <code>temporaryRoot</code>\uff1bFoundation \u53ea\u5728\u8be5\u6839\u4e0b\u521b\u5efa\u5e76\u4fdd\u7559\u53d7\u8ddf\u8e2a\u7684 session root\u3002Foundation \u6821\u9a8c canonical/fresh \u8def\u5f84\u3001\u8def\u5f84\u6536\u5bb9\u3001\u6839\u91cd\u53e0\u9694\u79bb\u3001\u6458\u8981\u4e0e Descriptor/driver \u7ed1\u5b9a\uff0c\u518d\u6309\u56fa\u5b9a\u53c2\u6570\u6267\u884c\u53d7\u7ea6\u675f\u8c03\u7528\uff1b\u8fd9\u4e9b\u8def\u5f84\u68c0\u67e5\u662f\u8def\u5f84\u8fb9\u754c\uff0c\u4e0d\u662f OS sandbox\u3002\u8c03\u7528\u65b9\u6839\u636e\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u548c\u4e1a\u52a1\u7b54\u6848\u4f5c\u6700\u7ec8\u9886\u57df\u9a8c\u6536\u3002WorkBuddy \u4e0e CodeBuddy \u7684 driver\u3001\u53d1\u73b0\u76ee\u5f55\u548c\u5de5\u4f5c\u76ee\u5f55\u4fdd\u6301\u72ec\u7acb\u3002Foundation \u8fd4\u56de\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u7ed3\u679c\uff0c\u4e0d\u62e5\u6709\u9886\u57df\u8f93\u51fa\u3001\u53d1\u5e03\u72b6\u6001\u6216\u771f\u5b9e\u7528\u6237\u73af\u5883\u4e2d\u7684\u63d2\u4ef6\u53d1\u5e03\u540e\u884c\u4e3a\uff0c\u4e5f\u4e0d\u5ba3\u79f0\u8ba4\u8bc1\u72b6\u6001\u9694\u79bb\u3001\u51ed\u8bc1\u672a\u53d8\u5316\u3001\u6a21\u578b\u8eab\u4efd\u56fa\u5b9a\u6216\u5bbf\u4e3b\u5de5\u5177\u80fd\u529b\u5df2\u5173\u95ed\u3002</li> </ul>"},{"location":"architecture/#\u80fd\u529b\u8eab\u4efd\u4e0e\u6210\u719f\u5ea6","title":"\u80fd\u529b\u8eab\u4efd\u4e0e\u6210\u719f\u5ea6","text":"<p>\u80fd\u529b\u8eab\u4efd\u548c\u6210\u719f\u5ea6\u662f\u4e24\u4e2a\u7ef4\u5ea6\uff08FND-ADR-016\uff09\u3002\u5386\u53f2 <code>./candidate/**</code> \u6d88\u8d39\u8005\u8fc1\u79fb\u4e00\u6b21\u5230 0.10.0 \u63d0\u4f9b\u7684\u89c4\u8303\u5165\u53e3\uff1b\u65e7\u5165\u53e3 \u53ea\u4f5c\u4e3a\u540c\u6e90\u517c\u5bb9\u9762\u8fdb\u5165\u5f03\u7528\u7a97\u53e3\u30020.10.0 \u4ee5\u540e\u65b0\u589e\u80fd\u529b\u4ece\u7b2c\u4e00\u4e2a candidate \u7248\u672c\u8d77\u5c31\u4f7f\u7528\u6700\u7ec8\u89c4\u8303\u5165\u53e3\u3001Schema <code>$id</code> \u548c operation\u3002\u540e\u7eed\u664b\u5347 stable \u53ea\u63d0\u9ad8\u517c\u5bb9\u627f\u8bfa\uff0c\u4e0d\u518d\u89e6\u53d1\u6d88\u8d39\u8005\u6e90\u7801\u6216\u5408\u540c\u8eab\u4efd\u6539\u9020\u3002\u6d88\u8d39\u8005\u8981\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\u4ecd\u9700 \u66f4\u65b0\u4e09\u5305\u7cbe\u786e pin\uff1bBundle \u662f\u5426\u91cd\u5efa\u7531\u65e2\u6709 package identity\u3001\u6765\u6e90\u6458\u8981\u4e0e provenance \u7ed1\u5b9a\u8f93\u5165\u51b3\u5b9a\uff0c\u800c\u975e\u6210\u719f\u5ea6\u6807\u7b7e\u51b3\u5b9a\u3002</p> <p>\u7269\u7406 <code>candidate/</code> \u76ee\u5f55\u4e0d\u662f\u65b0\u7684\u67b6\u6784\u5c42\uff0c\u4e5f\u4e0d\u51b3\u5b9a\u516c\u5f00\u7a33\u5b9a\u6027\u3002Contracts \u7684\u673a\u5668\u653f\u7b56\u548c\u80fd\u529b\u76ee\u5f55 <code>stability</code> \u5b57\u6bb5\u624d\u662f\u6210\u719f\u5ea6 \u771f\u6e90\uff1b\u5220\u9664\u5386\u53f2\u5165\u53e3\u9700\u8981\u72ec\u7acb\u4e3b\u7248\u672c\u51b3\u7b56\u548c\u6d88\u8d39\u8005\u9000\u51fa\u8bc1\u636e\uff0c\u4e0d\u80fd\u5939\u5e26\u5728\u664b\u5347\u4e2d\u3002</p>"},{"location":"architecture/#\u4e0b\u4e00\u9636\u6bb5\u80fd\u529b\u7ebf\u67b6\u6784-hand-off","title":"\u4e0b\u4e00\u9636\u6bb5\u80fd\u529b\u7ebf\uff08\u67b6\u6784 hand-off\uff09","text":"<p>\u4e09\u6761\u80fd\u529b\u7ebf\u5747\u7ecf FND-ADR-001 \u80fd\u529b\u7eb3\u5165\u95e8\u88c1\u51b3\u7eb3\u5165\uff0c\u5168\u90e8\u5728\u65e2\u6709\u5206\u5c42\u5185\u843d\u4f4d\uff1a</p> <ul> <li>\u5bbf\u4e3b\u63a5\u5165\u7ebf\uff08FND-FR-001/FND-FR-002\uff0cFND-ADR-003\uff0cFND-ADR-017\uff09\uff1aContracts 1.10.0 \u5728\u65e2\u6709 stable descriptor/probe/plan/receipt \u5408\u540c\u4e0a\u8865\u8db3\u6709\u9650\u6210\u719f\u5ea6\u3001\u624b\u52a8\u4e8b\u5b9e\u4e0e digest \u7ed1\u5b9a\u7684\u64cd\u4f5c\u7ea6\u675f\uff1bHarness \u590d\u7528 source closure\u3001\u53d7\u6536\u5bb9\u672c\u5730\u6295\u5f71\u3001\u7ed1\u5b9a\u8bfb\u53d6\u3001\u4e25\u683c\u53d1\u5e03\u548c\u539f\u5b50\u66ff\u6362\uff1bKit \u6ce8\u5165\u6709\u9650 Profile \u4e0e\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e driver\u3002\u53ea\u6709 <code>support=supported</code> \u7684 Descriptor \u624d\u80fd\u8ba9 <code>planHost</code> \u4ea7\u51fa <code>status=planned</code> \u7684 install/update \u8ba1\u5212\uff1bmanual \u5bbf\u4e3b\u5f97\u5230\u7a7a\u7684 <code>status=manual</code> \u8ba1\u5212\uff0c<code>applyHostPlan</code> \u8fd4\u56de <code>rejected</code> / <code>not-attempted</code>\u3002\u73b0\u6709\u516c\u5171 API \u4fdd\u7559 <code>planHost</code> / <code>applyHostPlan</code>\uff0cplanned \u8ba1\u5212\u4ecd\u987b\u6458\u8981\u7ed1\u5b9a\u3001\u5df2\u9a8c\u8bc1 build \u548c\u663e\u5f0f\u6388\u6743\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u7531\u8c03\u7528\u65b9\u521b\u5efa\u5e76\u72ec\u5360 fresh roots\uff0cFoundation \u6821\u9a8c canonical/fresh\u3001\u6536\u5bb9\u3001\u91cd\u53e0\u9694\u79bb\u3001\u6458\u8981\u4e0e Descriptor/driver \u7ed1\u5b9a\u5e76\u6309\u56fa\u5b9a\u53c2\u6570\u8c03\u7528\uff1b\u8c03\u7528\u65b9\u6839\u636e\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u548c\u4e1a\u52a1\u7b54\u6848\u4f5c\u6700\u7ec8\u9886\u57df\u9a8c\u6536\u3002Qoder \u7684 Descriptor \u4e3a <code>manual</code>\uff0c<code>qodercli-print-v1</code> \u4e3a <code>candidate</code> \u771f\u5b9e\u9a8c\u8bc1 driver\uff1bWorkBuddy \u4e0e CodeBuddy \u4f7f\u7528\u72ec\u7acb driver \u548c\u53d1\u73b0\u5e03\u5c40\u3002\u771f\u5b9e\u7528\u6237\u73af\u5883\u7684\u53d1\u5e03\u540e\u63d2\u4ef6\u53d1\u73b0\u3001\u5b89\u88c5\u3001\u66f4\u65b0\u3001marketplace \u4e0e\u53d1\u5e03\u72b6\u6001\u7531 release-skill \u7ba1\u7406\u3002</li> <li>\u6301\u4e45\u72b6\u6001\u5e95\u5ea7\u7ebf\uff08FND-FR-003\uff0cFND-ADR-004\uff09\uff1aappend-only \u4e8b\u4ef6\u3001hash chain\u3001\u5feb\u7167\u4e0e\u6821\u9a8c\u6062\u590d\uff1b\u53ea\u63d0\u4f9b\u72b6\u6001\u5e95\u5ea7\uff0c\u72b6\u6001\u673a\u3001\u4efb\u52a1\u8282\u70b9\u3001\u91cd\u8bd5\u3001\u7ec8\u6001\u3001\u8bb0\u5fc6\u7b49\u4e1a\u52a1\u8bed\u4e49\u4e0d\u7eb3\u5165 Foundation\u3002</li> <li>\u4eba\u7c7b\u62a5\u544a\u7ebf\uff08FND-FR-004\uff0cFND-ADR-005\uff09\uff1a\u53cc\u5c42\u5408\u540c\u2014\u2014\u673a\u5668\u7ed3\u679c\u662f\u552f\u4e00\u771f\u6e90\uff0c\u4eba\u7c7b\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\uff08Markdown + digest \u7ed1\u5b9a + \u5206\u7ea7\u68c0\u67e5\uff09\uff0c\u4e0d\u81ea\u7531\u64b0\u5199\u3002</li> <li>\u6709\u9650\u5c01\u95ed\u8bed\u4e49\u5de5\u5177\u7ebf\uff08FND-ADR-009\uff09\uff1a\u57fa\u7ebf\u7269\u5316 + contentGuard\uff08\u6458\u8981\u4e0d\u7b26\u3001\u7269\u5316\u4e2d\u9014\u53d8\u5316\u3001\u5b88\u536b\u68c0\u51fa\u5747\u5931\u8d25\u5173\u95ed\uff09\u3001\u901a\u7528\u53ea\u8bfb chokepoint\uff08\u5141\u8bb8\u6839\u96c6\u5408 + \u53ef\u9009\u8eab\u4efd\u8c13\u8bcd\uff09\u3001\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf\uff08\u7b56\u7565\u5951\u7ea6 + \u6ce8\u5165\u5f0f\u81ea\u6d4b\uff09\u3001token \u4e0a\u754c\u4f30\u7b97\uff08\u786e\u5b9a\u6027\u9886\u57df\u4f30\u7b97\u539f\u8bed\uff0c\u65e0\u6a21\u578b/\u7f51\u7edc/tokenizer \u4f9d\u8d56\uff09\u3001\u901a\u7528\u4e0a\u9650\u5b88\u536b\uff08\u590d\u7528 state-store \u4e8b\u4ef6\u8d26\u4e0e token-lock\uff0c\u4e0a\u9650\u4e0e\u8d85\u9650\u7b56\u7565\u7531\u6d88\u8d39\u8005\u914d\u7f6e\uff09\u3002</li> </ul> <p>\u4e09\u5305\u673a\u5236\u7ed3\u6784\u4fdd\u6301\u3001\u4e0d\u62c6\u7b2c\u56db\u4e2a\u673a\u5236\u5305\uff08FND-ADR-007\uff09\uff1b\u540c\u4e00 workspace \u5185\u7684\u72ec\u7acb Plugin release unit \u4e0d\u6539\u53d8\u8fd9\u6761\u4f9d\u8d56\u94fe\u3002\u5236\u54c1\u6cbb\u7406\u91c7\u7528 artifact-graph CLI \u4e0e\u7248\u672c\u9501\uff08FND-ADR-006\uff09\u3002</p>"},{"location":"architecture/#\u9996\u7248\u9884\u7b97","title":"\u9996\u7248\u9884\u7b97","text":"<ul> <li>\u9876\u5c42 Contracts \u5bf9\u8c61\uff1a46 \u7c7b\uff08\u5b8c\u6574\u6e05\u5355\u4ee5 <code>packages/skill-family-contracts/src/registry.json</code> \u4e3a\u552f\u4e00\u771f\u6e90\uff09\uff1aproject-manifest\u3001profile-descriptor\u3001project-profile\uff08FND-ADR-013\uff0c1.7.0 \u7eb3\u5165\uff09\u3001managed-file-lock\u3001operation-request\u3001operation-result\u3001migration-manifest\u3001adapter-source\u3001report-model\u3001report-binding\u3001host-descriptor\u3001host-registry\u3001host-capability-fact\u3001host-probe-result\u3001adapter-build-manifest\u3001host-operation-plan\u3001host-operation-receipt\u3001state-event-envelope\u3001state-snapshot-metadata\u3001token-estimate-result\u3001surface-scan-policy\u3001declared-read-surface-result\u3001structured-scan-policy\uff08FND-ADR-010/011\uff09\u3001timeout-policy\u3001watchdog-termination-envelope\uff08FND-ADR-012\uff0cappend-only \u4fdd\u6301 1.5.0\uff09\u3001public-boundary-declaration\u3001platform-difference-registry\u3001observation-scope\u3001profile-adoption-declaration\u3001audit-baseline-pin\u3001token-estimate-record\uff08\u5ba1\u8ba1\u89c4\u5219\u88c1\u51b3\u4e0e\u6574\u6539 1.6.0 \u7eb3\u5165\uff09\u3001source-authority-receipt\uff081.8.0 \u7eb3\u5165\uff09\u3001filesystem-root-binding\u3001fixed-set-publication-manifest\u3001fixed-set-publication-receipt\uff081.9.0 \u7eb3\u5165\uff09\u3001adapter-peer-verification-request\u3001adapter-peer-verification-result\uff08FND-ADR-018\uff0c1.10.0 \u7eb3\u5165\uff09\u3001host-verification-request\u3001host-verification-result\uff08FND-ADR-019\uff0c1.11.0 \u7eb3\u5165\uff09\u3001plugin-verification-request\u3001plugin-verification-result\u3001filesystem-tree-observation\uff08FND-ADR-021\uff0c1.13.0 \u7eb3\u5165\uff09\u3001executable-identity-observation\u3001skill-family-directory-verification-request\u3001skill-family-directory-verification-result\u3001engineering-baseline\uff1b</li> <li>Kit \u9876\u5c42\u547d\u4ee4\uff1a4 \u4e2a\uff08scaffold\u3001adopt-plan\u3001projection\u3001check\uff09\uff1b</li> <li>\u5f3a\u5236\u673a\u68b0\u89c4\u5219\uff1a\u5f53\u524d 9 \u6761\uff0c\u9884\u7b97\u4e0d\u8d85\u8fc7 20 \u6761\uff0c\u7edd\u5bf9\u4e0a\u9650 30 \u6761\uff1bCR-001 \u5bf9\u767b\u8bb0\u8868\u5185\u5168\u90e8 Schema \u505a\u7edf\u4e00\u7f16\u8bd1\uff1b</li> <li>\u53f6\u5b50\u5305\uff1a3 \u4e2a\uff08skill-family-contracts\u3001skill-family-harness-node\u3001skill-family-engineering-kit\uff09\uff1b</li> <li>Schema \u6821\u9a8c\u5668\uff1aAjv 8.20.0\uff08\u7cbe\u786e\u7248\u672c pin\uff09\uff0c\u652f\u6301 draft-07 \u4e0e 2020-12 \u53cc\u65b9\u8a00\uff1b</li> <li>kernel \u534f\u8bae\uff1askill-family.kernel.operation\uff08stable\uff09\uff0cContracts \u89c4\u683c\u7248\u672c 1.14.0\uff1bKernel \u6587\u6863\u4ecd\u4fdd\u6301 1.8.0 \u751f\u547d\u5468\u671f\u5750\u6807\u548c\u5b57\u8282\u57fa\u7ebf\uff1b</li> <li>\u9ed8\u8ba4\u8fd0\u884c\u65f6\u8bed\u8a00\uff1aNode\uff1b\u7b2c\u4e8c\u8bed\u8a00\u5b9e\u73b0\u9996\u7248\u4e3a 0\u3002</li> </ul> <p>\u4efb\u4f55\u65b0\u589e\u7ec4\u4ef6\u5fc5\u987b\u8bf4\u660e\u5220\u9664\u5b83\u4f1a\u5bfc\u81f4\u7684\u4e24\u4e2a\u4ee5\u4e0a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\u5b9e\u73b0\uff0c\u5e76\u901a\u8fc7\u72ec\u7acb fixture \u9a8c\u8bc1\u3002</p>"},{"location":"architecture/#\u673a\u5668\u771f\u6e90\u4e0e\u6587\u4ef6\u5206\u7c7b","title":"\u673a\u5668\u771f\u6e90\u4e0e\u6587\u4ef6\u5206\u7c7b","text":"\u771f\u6e90 \u5185\u5bb9 <code>.foundation/skeleton-manifest.json</code> \u5305\u6e05\u5355\u3001Profile\u3001fixture\u3001\u9876\u5c42\u547d\u4ee4 <code>.foundation/version-lock.json</code> projen\u3001pnpm\u3001Node \u7684\u7cbe\u786e\u7248\u672c\u4e0e\u9501\u5b9a\u70b9 <code>.foundation/file-registry.json</code> managed / handwritten / artifact \u4e09\u7c7b\u6587\u4ef6\u767b\u8bb0 <code>package.json</code> \u4e0e <code>packages/*/package.json</code> \u7248\u672c\u3001\u547d\u4ee4\u3001\u4f9d\u8d56\uff08\u5168\u90e8 projen \u53d7\u7ba1\uff09 <code>packages/skill-family-contracts/src/registry.json</code> \u534f\u8bae\u540d\u4e0e Schema $id \u767b\u8bb0 <code>scripts/release-artifact-contract.json</code> \u56fa\u5b9a\u4e09\u5305\u53d1\u5e03\u5b57\u8282\u5408\u540c\uff08\u6210\u5458\u3001\u5fc5\u9700\u9879\u4e0e\u5185\u5bb9\u6458\u8981\u89c4\u5219\uff09 <p>\u53d7\u7ba1\u6587\u4ef6\u53ea\u80fd\u901a\u8fc7 <code>.projenrc.js</code> \u4fee\u6539\u5e76\u8fd0\u884c <code>pnpm synth</code> \u518d\u751f\u6210\uff1b\u624b\u5199\u6587\u4ef6\uff08\u542b\u5168\u90e8\u6587\u6863\uff09\u4e0d\u4f1a\u88ab synth \u8986\u76d6\u3002\u5206\u7c7b\u6743\u5a01\u89c1 <code>.foundation/file-registry.json</code>\u3002</p>"},{"location":"architecture/#\u6587\u6863\u7cfb\u7edf\u4e0e\u4e8b\u5b9e\u68c0\u67e5","title":"\u6587\u6863\u7cfb\u7edf\u4e0e\u4e8b\u5b9e\u68c0\u67e5","text":"<p>\u6587\u6863\u4f53\u7cfb\u7684\u76ee\u6807\u662f\u7528\u786e\u5b9a\u6027\u68c0\u67e5\u6d88\u9664\u624b\u5de5\u6f02\u79fb\uff1a</p> <ol> <li>\u51bb\u7ed3\u4e8b\u5b9e\u5305\uff1a\u6587\u6863\u5199\u4f5c\u53ea\u6d88\u8d39\u4e0a\u8868\u6240\u5217\u673a\u5668\u771f\u6e90\u3002\u6a21\u578b\u6216\u4f5c\u8005\u4e0d\u5f97\u51ed\u8bb0\u5fc6\u5199\u5165\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\uff1b\u6a21\u578b\u540d\u3001\u51ed\u636e\u548c\u8c03\u5ea6\u4fe1\u606f\u4e0d\u8fdb\u5165\u6587\u6863\uff0c\u4e5f\u4e0d\u8fdb\u5165 Contracts\u3002</li> <li>\u4e8b\u5b9e\u68c0\u67e5\uff1a<code>node scripts/docs/fact-check.mjs</code> \u5bf9\u7167\u771f\u6e90\u6821\u9a8c\u6587\u6863\u4e2d\u7684\u5305\u540d\u3001\u547d\u4ee4\u3001\u95e8\u7981\u4e8b\u5b9e\u3001\u7248\u672c pin \u4e0e\u5173\u952e\u6570\u5b57\uff0c\u5e76\u4ea4\u53c9\u6821\u9a8c\u771f\u6e90\u4e4b\u95f4\u7684\u4e00\u81f4\u6027\uff08manifest \u4e0e package.json\u3001version-lock \u4e0e packageManager\u3001\u89c4\u5219\u6570\u4e0e\u9884\u7b97\u7b49\uff09\u3002</li> <li>\u94fe\u63a5\u68c0\u67e5\uff1a<code>node scripts/docs/link-check.mjs</code> \u89e3\u6790 README \u4e0e\u5168\u90e8 <code>docs/**/*.md</code> \u7684\u7ad9\u5185\u76f8\u5bf9\u94fe\u63a5\u548c\u6807\u9898\u951a\u70b9\uff0c\u5e76\u6821\u9a8c <code>mkdocs.yml</code> nav \u6536\u5f55\u5b8c\u6574\u3002</li> <li>\u65e0\u5de5\u4f5c\u6d41\u8fb9\u754c\u4e0e\u516c\u5f00\u8fb9\u754c\u9a8c\u8bc1\uff1a\u672c\u4ed3\u6ca1\u6709\u4efb\u4f55 CI/CD workflow\uff08\u65e7\u62d3\u6251\u7684 ci/docs/docs-deploy \u4e09\u4e2a Actions \u5df2\u6574\u4f53\u5220\u9664\uff09\uff0c\u5168\u90e8\u95e8\u7981\u5728\u79c1\u6709\u5de5\u4f5c\u533a\u5185\u8fd0\u884c\uff08<code>pnpm check</code>\uff09\uff1b\u516c\u5f00\u8fb9\u754c\u7531 <code>check:public-snapshots</code> \u4e0e\u53d1\u5e03\u5b57\u8282\u5408\u540c\u673a\u68b0\u9a8c\u8bc1\u3002\u516c\u5f00\u9759\u6001\u7ad9\u7531 <code>scripts/render-public-site.mjs</code> \u6e32\u67d3\uff08\u552f\u4e00\u8f93\u51fa <code>docs/public/site/**</code> \u4e0e\u786e\u5b9a\u6027\u57fa\u7ebf <code>docs/public/site-baseline.json</code>\uff09\u3002</li> <li>\u7248\u672c\u9501\u5b9a\uff1a\u7ad9\u70b9\u5de5\u5177\u94fe\u9501\u5b9a\u5728 <code>scripts/docs/toolchain.json</code> \u4e0e <code>scripts/docs/requirements.txt</code>\uff0c\u6784\u5efa\u53ea\u4f7f\u7528\u4ed3\u5e93\u5916\u90e8\u7684 Python \u865a\u62df\u73af\u5883\uff0c\u4e0d\u505a\u7cfb\u7edf\u7ea7 pip install\u3002</li> </ol> <p>\u4e24\u4e2a\u68c0\u67e5\u811a\u672c\u90fd\u53ef\u76f4\u63a5 <code>node scripts/docs/&lt;name&gt;.mjs</code> \u8fd0\u884c\uff1a<code>fact-check.mjs</code> \u7ecf\u4ed3\u5185\u6a21\u5757\u6d88\u8d39\u6839\u76ee\u5f55\u7cbe\u786e\u9501\u5b9a\u7684 <code>semver@7.8.5</code>\uff0c\u8fd0\u884c\u524d\u5fc5\u987b\u5148\u5b8c\u6210 <code>pnpm install --frozen-lockfile</code>\uff1b<code>link-check.mjs</code> \u4e3a\u7eaf Node \u5b9e\u73b0\u3002\u804c\u8d23\u8bf4\u660e\u89c1 <code>scripts/docs/README.md</code>\u3002</p>"},{"location":"architecture/#\u7a33\u5b9a\u4ea7\u54c1\u95e8\u7981","title":"\u7a33\u5b9a\u4ea7\u54c1\u95e8\u7981","text":"<p>\u6839 <code>pnpm check</code> \u53ea\u7f16\u6392 11 \u4e2a\u7a33\u5b9a\u4ea7\u54c1 gate ID\uff08<code>check:structure</code>\uff5e<code>check:artifacts</code>\uff0c\u9010 ID \u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff09\uff0c\u4e0d\u518d\u9501\u6b7b\u539f\u59cb\u547d\u4ee4\u6e05\u5355\uff1b\u6bcf\u4e2a\u7a33\u5b9a ID \u5728\u81ea\u5df1\u7684 package script \u5185\u7ec4\u5408\u5c11\u91cf\u4ea7\u54c1\u68c0\u67e5\u3002\u95e8\u7981\u4e8b\u5b9e\u7531 <code>node scripts/docs/fact-check.mjs</code> \u4ece\u6839 <code>package.json</code> \u7684 <code>scripts.check</code> \u673a\u68b0\u63a8\u5bfc\u5e76\u9010\u5b57\u6838\u5bf9\u3002\u6587\u6863\u4e0e setup \u53ea\u8c03\u7528\u6216\u5217\u51fa 11 \u4e2a\u7a33\u5b9a ID \u6216\u6839 <code>pnpm check</code>\uff0c\u4e0d\u590d\u5236\u5e95\u5c42\u547d\u4ee4\u5217\u8868\u3002</p> <p>\u4ed3\u5185\u68c0\u67e5\u7684\u8bda\u5b9e\u8fb9\u754c\uff1a\u7ed3\u6784\u68c0\u67e5\u53ea\u8bc1\u660e\u201c\u5b57\u8282/\u7ed3\u6784\u4e00\u81f4\u6027\uff08\u4ed3\u5185\u53ef\u8bc1\uff09\u201d\uff1b\u4e00\u6b21\u6027\u8fc1\u79fb\u5b8c\u6574\u6027\u3001\u666e\u901a\u6b63\u6587\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\u7ed3\u8bba\u5c5e\u4e8e\u5916\u90e8\u5ba1\u9605\u804c\u8d23\uff0c\u4e0d\u5728\u76ee\u6807\u4ed3\u5185\u7ef4\u62a4\u7b2c\u4e8c\u4efd\u95e8\u7981 registry\u3001baseline \u6216\u547d\u4ee4\u6bd4\u8f83\u5668\u3002</p>"},{"location":"examples-and-fixtures/","title":"\u6837\u4f8b\u4e0e Fixture","text":"<p>\u672c\u9875\u8bf4\u660e Foundation \u4e2d fixture \u7684\u76ee\u7684\u3001\u8fd0\u884c\u5165\u53e3\uff0c\u4ee5\u53ca\u5b83\u80fd\u5426\u4f5c\u4e3a\u4e1a\u52a1 oracle\uff08\u5224\u5b9a\u4f9d\u636e\uff09\u3002\u7ed3\u8bba\u5148\u884c\uff1afixture \u53ea\u8bc1\u660e\u7ed3\u6784\u5951\u7ea6\uff0c\u4e0d\u8bc1\u660e\u4e1a\u52a1\u8bed\u4e49\u3002</p>"},{"location":"examples-and-fixtures/#fixture-\u7684\u76ee\u7684","title":"fixture \u7684\u76ee\u7684","text":"<p>fixture \u56de\u7b54\u4e00\u4e2a\u95ee\u9898\u2014\u2014\u300c\u8fd9\u4efd\u5951\u7ea6\u5bf9\u8c61/SPI \u5728\u7ed9\u5b9a\u8f93\u5165\u4e0b\u662f\u5426\u4ea7\u751f\u58f0\u660e\u7684\u884c\u4e3a\u300d\u3002\u5b83\u5206\u4e09\u7c7b\uff1a</p> <ul> <li>\u6b63\u4f8b\uff08positive\uff09\uff1a\u7ed9\u5b9a\u5408\u6cd5\u8f93\u5165\uff0c\u6821\u9a8c/\u673a\u5236\u5e94\u901a\u8fc7\u3002</li> <li>\u53cd\u4f8b\uff08negative\uff09\uff1a\u7ed9\u5b9a\u975e\u6cd5\u8f93\u5165\uff0c\u5fc5\u987b\u4ea7\u751f\u7a33\u5b9a\u5931\u8d25\u7801\uff08\u5982 <code>SFC1001</code>/<code>SFC1010</code>\uff09\u3002</li> <li>\u65b9\u8a00\u8fb9\u754c\uff08dialect-boundary\uff09\uff1a\u5728 draft-07 \u4e0e 2020-12 \u53cc\u65b9\u8a00\u4ea4\u754c\u5904\u7684\u9884\u671f\u884c\u4e3a\u3002</li> </ul> <p>fixture \u662f\u5b8c\u5168\u865a\u6784\u6570\u636e\uff0c\u4e0d\u542b\u771f\u5b9e\u4e1a\u52a1\u3001\u79c1\u6709 Profile\u3001\u7528\u6237\u8def\u5f84\u6216\u51ed\u636e\u3002</p>"},{"location":"examples-and-fixtures/#\u8fd0\u884c\u5165\u53e3","title":"\u8fd0\u884c\u5165\u53e3","text":"<ul> <li>Contracts fixture\uff1a<code>packages/skill-family-contracts/test/fixtures.test.mjs</code> \u673a\u68b0\u91cd\u653e <code>src/fixtures/&lt;contract&gt;/</code> \u7684\u671f\u671b\uff0c\u884c\u4e3a\u4e0d\u7b26\u62a5 <code>SFC1010</code>\u3002</li> <li>Profile SPI \u7b26\u5408\u6027\uff1a<code>fixtures/generic-profile-extension-conformance/verify.mjs</code>\uff08\u53ea\u8bfb\u6821\u9a8c\uff09\u4e0e <code>leak-scan.mjs</code>\uff08\u6cc4\u6f0f\u626b\u63cf\uff09\u3002</li> <li>\u9aa8\u67b6\u7cbe\u786e\u5408\u540c\uff1a<code>fixtures/scaffold-conformance/verify.mjs</code>\u3002</li> <li>\u91c7\u7528\u5371\u5bb3\u7c7b\uff1a<code>fixtures/adoption/cases/</code> \u4ee5\u5b57\u8282\u7ea7\u524d\u540e\u5feb\u7167\u8bc1\u660e <code>adopt-plan</code> \u53ea\u8bfb\u3002</li> </ul> <p>\u4ee5\u4e0a\u5165\u53e3\u5747\u4e3a\u53ea\u8bfb\u6216\u81ea\u542b\uff0c\u4e0d\u5199\u8c03\u7528\u65b9\u4ed3\u3001\u4e0d\u89e6\u78b0\u8fdc\u7aef\u3002</p>"},{"location":"examples-and-fixtures/#fixture-\u80fd\u5426\u4f5c\u4e3a\u4e1a\u52a1-oracle","title":"fixture \u80fd\u5426\u4f5c\u4e3a\u4e1a\u52a1 oracle","text":"<p>\u4e0d\u80fd\u3002\u539f\u56e0\uff1a</p> <ul> <li>fixture \u53ea\u8986\u76d6\u7ed3\u6784\u5951\u7ea6\u4e0e\u673a\u5236\u8fb9\u754c\uff0c\u4e0d\u8986\u76d6\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1\u7ed3\u8bba\u3002</li> <li>\u5ba1\u8ba1\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\u5c5e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff0cFoundation \u53ea\u63d0\u4f9b\u5ba1\u8ba1\u8868\u9762\uff08canonical JSON + sha256 \u6458\u8981\uff0c\u89c1 <code>foundation.contracts.audit-surface</code>\uff09\u3002</li> <li>\u6587\u6863\u4f53\u7cfb\u660e\u786e\uff1a\u666e\u901a\u6b63\u6587\u8bed\u4e49\u6b63\u786e\u6027\u7531\u5916\u90e8\u5ba1\u9605\u8d1f\u8d23\uff0c\u4ed3\u5185\u95e8\u7981\u53ea\u8bc1\u660e\u673a\u5668\u4e8b\u5b9e\u4e0e\u5b57\u8282/\u7ed3\u6784\u4e00\u81f4\u6027\u3002</li> </ul> <p>\u56e0\u6b64\uff0c\u628a fixture \u5f53\u4f5c\u4e1a\u52a1\u6b63\u786e\u6027\u7684\u5224\u636e\u662f\u8bef\u7528\u3002\u5b83\u8bc1\u660e\u300c\u5951\u7ea6\u88ab\u6ee1\u8db3\u300d\uff0c\u4e0d\u8bc1\u660e\u300c\u4e1a\u52a1\u662f\u5bf9\u7684\u300d\u3002</p>"},{"location":"examples-and-fixtures/#\u516c\u5f00\u8303\u56f4","title":"\u516c\u5f00\u8303\u56f4","text":"<ul> <li>Profile\uff1a<code>profiles/public-plugin</code>\uff08\u516c\u5f00\u6216\u5b8c\u5168\u865a\u6784\u6837\u4f8b\uff09\u3002</li> <li>fixture\uff1a<code>fixtures/generic-profile-extension-conformance</code>\u3001<code>fixtures/scaffold-conformance</code>\u3001<code>fixtures/licensing-profile-conformance</code>\u3001<code>fixtures/adoption</code>\u3001<code>fixtures/m0-consumer</code>\u3002</li> </ul> <p>\u5176\u4f59\u79c1\u6709\u6216\u6d88\u8d39\u8005 fixture \u4e0d\u8fdb\u5165\u516c\u5f00\u6587\u6863\uff1b\u79c1\u6709 Profile\u3001\u4ea7\u54c1\u6570\u636e\u3001\u7528\u6237\u8def\u5f84\u3001\u8d26\u53f7\u3001token \u6216\u8fd0\u884c\u65e5\u5fd7\u4e00\u5f8b\u4e0d\u5199\u5165\u516c\u5f00 fixture\u3002</p>"},{"location":"git-lifecycle/","title":"Git \u751f\u547d\u5468\u671f\u6307\u5357","text":"<p>\u672c\u6587\u662f Skill Family \u5404\u5de5\u4f5c\u533a Git \u751f\u547d\u5468\u671f\u89c4\u5219\u7684\u552f\u4e00\u6743\u5a01\u6587\u6863\u3002\u65b0\u5efa\u9879\u76ee\u9aa8\u67b6 \uff08<code>npx skill-family-engineering-kit scaffold</code>\uff09\u4e2d\u7684 AGENTS.md\u300cMinimal Git lifecycle\u300d\u533a\u5757\u4e0e <code>docs/git-lifecycle.md</code> \u9875\u9762\u90fd\u662f\u5bf9\u672c\u6307\u5357\u540c\u53e3\u5f84\u7684\u6295\u5f71\u4e0e\u6307\u9488\u2014\u2014 \u4efb\u4f55\u5de5\u4f5c\u533a\u90fd\u4e0d\u5f97\u518d\u7ef4\u62a4\u7b2c\u4e8c\u5957 Git \u89c4\u5219\u3002\u6240\u6709\u5de5\u5177\u94fe\uff08projen\u3001engineering kit\u3001 CI \u811a\u672c\uff09\u90fd\u4e0d\u6267\u884c Git \u5199\u64cd\u4f5c\uff1b\u4e0b\u8ff0\u6bcf\u4e00\u7c7b\u5199\u64cd\u4f5c\u90fd\u53ea\u6765\u81ea\u4eba\u7684\u663e\u5f0f\u51b3\u5b9a\u3002</p>"},{"location":"git-lifecycle/#\u5206\u652f\u547d\u540d\u4e0e\u5bff\u547d","title":"\u5206\u652f\u547d\u540d\u4e0e\u5bff\u547d","text":"<ul> <li>\u5206\u652f\u6a21\u578b\uff1a\u4e00\u6761\u957f\u671f\u5206\u652f <code>main</code>\uff0c\u52a0\u77ed\u5bff\u547d\u4efb\u52a1\u5206\u652f <code>task/&lt;\u4efb\u52a1\u53f7&gt;-&lt;\u77ed\u6a2a\u7ebf\u6458\u8981&gt;</code> \uff08\u4f8b\u5982 <code>task/0050-git-lifecycle</code>\uff09\u3002</li> <li>\u4efb\u52a1\u5206\u652f\u53ea\u627f\u8f7d\u4e00\u4e2a\u4efb\u52a1\u7684\u4e00\u7ec4\u76f8\u5173\u53d8\u66f4\uff1b\u4efb\u52a1\u9a8c\u6536\u901a\u8fc7\u540e\u5408\u5e76\uff1b\u786e\u8ba4\u6ca1\u6709\u672a\u5408\u5e76 \u63d0\u4ea4\u540e\u53ef\u5220\u9664\u672c\u5730\u5206\u652f\u3002\u8fdc\u7aef\u5206\u652f\u5220\u9664\u5c5e\u4e8e push \u7c7b\u5916\u90e8\u5199\u5165\uff0c\u5fc5\u987b\u53e6\u884c\u53d6\u5f97\u663e\u5f0f \u6388\u6743\uff08\u89c1\u4e0b\u6587\u9010\u9879\u6388\u6743\u8282\uff09\uff0c\u5408\u5e76\u672c\u8eab\u4e0d\u81ea\u52a8\u6388\u6743\u8fdc\u7aef\u5220\u9664\u3002\u4e0d\u5b58\u5728\u957f\u671f\u5b58\u6d3b\u7684 \u7279\u6027\u5206\u652f\uff0c\u4e5f\u4e0d\u5141\u8bb8\u5728\u4efb\u52a1\u5206\u652f\u4e0a\u5806\u79ef\u4e0e\u4efb\u52a1\u65e0\u5173\u7684\u53d8\u66f4\u3002</li> <li><code>main</code> \u6c38\u8fdc\u53ea\u63a5\u6536\u5df2\u901a\u8fc7\u95e8\u7981\u7684\u5408\u5e76\uff1b\u4efb\u4f55\u60c5\u51b5\u4e0b\u90fd\u4e0d\u5f97\u5bf9 <code>main</code> \u76f4\u63a5\u63d0\u4ea4\u6216 force-push\u3002</li> </ul>"},{"location":"git-lifecycle/#\u4fee\u6539\u524d\u72b6\u6001\u68c0\u67e5","title":"\u4fee\u6539\u524d\u72b6\u6001\u68c0\u67e5","text":"<ul> <li>\u63d0\u4ea4\u3001\u8fdc\u7aef\u7b49\u5b9e\u65f6 Git \u72b6\u6001\u4e0d\u5199\u8fdb\u4efb\u4f55\u7248\u672c\u5316\u6587\u6863\uff08\u5305\u62ec\u4ea7\u54c1\u72b6\u6001\u9875\uff09\uff1b\u6267\u884c\u4efb\u4f55 Git \u52a8\u4f5c\u524d\uff0c\u5148\u73b0\u573a\u8fd0\u884c\u4e0b\u5217\u53ea\u8bfb\u547d\u4ee4\u53d1\u73b0\u5f53\u524d\u72b6\u6001\uff1a</li> </ul> <p><code>bash git status --short --branch git rev-parse --verify HEAD git remote -v</code></p> <p>\u8fd9\u4e09\u6761\u547d\u4ee4\u53ea\u662f\u53ea\u8bfb\u63a2\u6d4b\uff1a\u8f93\u51fa\u53ea\u53cd\u6620\u672c\u673a\u5de5\u4f5c\u533a\u5f53\u4e0b\u7684\u72b6\u6001\uff0c\u4e0d\u6388\u4e88\u4efb\u4f55\u5199\u6743\u9650\uff1b \u6267\u884c stage/commit/push/tag/release \u4ecd\u5fc5\u987b\u6309\u4e0b\u6587\u9010\u9879\u6388\u6743\u8282\u5355\u72ec\u53d6\u5f97\u6388\u6743\u3002 - \u5f00\u59cb\u4efb\u4f55\u4fee\u6539\u4e4b\u524d\uff0c\u5148\u8fd0\u884c <code>git status --short --branch</code>\uff0c\u786e\u8ba4\u5f53\u524d\u5206\u652f\u3001\u672a\u63d0\u4ea4 \u53d8\u66f4\u4e0e\u8fdc\u7aef\u8ddf\u8e2a\u72b6\u6001\uff1b\u5de5\u4f5c\u533a\u91cc\u51fa\u73b0\u4e0d\u8ba4\u8bc6\u7684\u5206\u652f\u3001\u672a\u6682\u5b58\u53d8\u66f4\u6216\u964c\u751f\u6587\u4ef6\u65f6\uff0c\u5148 \u8c03\u67e5\u6765\u6e90\u518d\u52a8\u624b\uff0c\u90a3\u662f\u522b\u4eba\u6b63\u5728\u8fdb\u884c\u7684\u5de5\u4f5c\uff0c\u4e0d\u662f\u53ef\u4ee5\u968f\u624b\u6e05\u7406\u7684\u566a\u58f0\u3002 - \u7981\u6b62\u7528 <code>git checkout .</code>\u3001<code>git restore .</code>\u3001<code>git clean -f</code>\u3001<code>git reset --hard</code> \u4e4b\u7c7b\u7684\u7834\u574f\u6027\u547d\u4ee4\u201c\u987a\u624b\u201d\u6e05\u7a7a\u5de5\u4f5c\u533a\u6765\u7ed5\u8fc7\u969c\u788d\uff1b\u786e\u9700\u4e22\u5f03\u672a\u63d0\u4ea4\u53d8\u66f4\u65f6\uff0c\u5fc5\u987b \u9010\u6761\u5217\u51fa\u5c06\u88ab\u4e22\u5f03\u7684\u5185\u5bb9\u5e76\u83b7\u5f97\u663e\u5f0f\u786e\u8ba4\u3002</p>"},{"location":"git-lifecycle/#\u539f\u5b50-commit-\u6761\u4ef6","title":"\u539f\u5b50 commit \u6761\u4ef6","text":"<p>\u4e00\u4e2a commit \u5fc5\u987b\u540c\u65f6\u6ee1\u8db3\uff1a</p> <ol> <li>\u53ea\u5305\u542b\u4e00\u4e2a\u903b\u8f91\u53d8\u66f4\uff08\u4e00\u4e2a\u4efb\u52a1\u7684\u63a8\u8fdb\uff0c\u6216\u4e00\u6b21\u660e\u786e\u62c6\u5206\u7684\u4fee\u6b63\uff09\uff1b</li> <li>\u53d7\u7ba1\u751f\u6210\u7269\u4e0e\u5176\u6e90\uff08<code>.projenrc.js</code>\u3001\u6295\u5f71\u811a\u672c\uff09\u5728\u540c\u4e00\u6b21\u63d0\u4ea4\u5185\u6210\u5bf9\u51fa\u73b0\uff1b</li> <li>\u63d0\u4ea4\u524d <code>pnpm check</code>\uff08\u6216\u4efb\u52a1\u6307\u5b9a\u7684\u6700\u5c0f\u9a8c\u8bc1\u5165\u53e3\uff09\u9000\u51fa\u7801\u4e3a 0\u2014\u2014\u4e0d\u5f97\u628a\u7ea2\u7684 \u72b6\u6001\u63d0\u4ea4\u8fdb\u4efb\u4f55\u5206\u652f\u540e\u518d\u201c\u56de\u5934\u4fee\u201d\uff1b</li> <li>\u63d0\u4ea4\u4fe1\u606f\u8bf4\u660e\u201c\u4e3a\u4ec0\u4e48\u201d\uff0c\u5f15\u7528\u4efb\u52a1\u53f7\uff1b\u4e0d\u5f97\u5305\u542b\u51ed\u636e\u3001\u79c1\u6709\u6570\u636e\u6216\u4e0d\u53ef\u516c\u5f00\u7684 \u5185\u90e8\u6807\u8bc6\u3002</li> </ol> <p>\u4e0d\u6ee1\u8db3\u4ee5\u4e0a\u4efb\u4e00\u6761\u4ef6\u7684\u53d8\u66f4\u4e0d\u5f97\u63d0\u4ea4\uff1b\u5b81\u53ef\u62c6\u6210\u591a\u4e2a commit\uff0c\u4e5f\u4e0d\u5408\u5e76\u6210\u4e00\u4e2a\u6df7\u5408 \u53d8\u66f4\u3002</p>"},{"location":"git-lifecycle/#stagecommitpushtagrelease-\u7684\u9010\u9879\u6388\u6743","title":"stage\u3001commit\u3001push\u3001tag\u3001release \u7684\u9010\u9879\u6388\u6743","text":"<ul> <li>\u4fee\u6539\u6388\u6743\u4e0d\u5305\u542b stage \u4e0e commit\uff1a\u83b7\u5f97\u67d0\u4efb\u52a1\u7684\u4fee\u6539\u6388\u6743\uff0c\u53ea\u8868\u793a\u53ef\u4ee5\u5728\u5de5\u4f5c\u533a \u91cc\u6539\u52a8\u6587\u4ef6\uff1bstage\uff08<code>git add</code>\uff09\u4e0e commit \u4ecd\u662f\u4e24\u4e2a\u72ec\u7acb\u7684\u5199\u64cd\u4f5c\uff0c\u5fc5\u987b\u5206\u522b \u6309\u98ce\u9669\u9010\u9879\u53d6\u5f97\u660e\u786e\u6388\u6743\uff0c\u4e0d\u5b58\u5728\u201c\u6388\u6743\u4fee\u6539\u5373\u9ed8\u8ba4\u6388\u6743\u63d0\u4ea4\u201d\u3002</li> <li>stage \u4e0e commit\uff1a\u9ed8\u8ba4\u53ea\u5728\u672c\u5730\u3001\u6309\u539f\u5b50\u6761\u4ef6\u6267\u884c\uff1b\u4e00\u6b21 commit \u6388\u6743\u53ea\u8986\u76d6\u88ab \u660e\u786e\u58f0\u660e\u7684\u90a3\u4e00\u6b21\u672c\u5730\u63d0\u4ea4\uff0c\u4e0d\u8986\u76d6\u4efb\u52a1\u4e4b\u5916\u7684\u6e05\u7406\u3001\u6539\u5199\uff08\u542b amend/rebase \u6539\u5199\u5df2\u63d0\u4ea4\u5185\u5bb9\uff09\u6216\u540e\u7eed\u63d0\u4ea4\u3002</li> <li>push\uff1a\u628a\u4efb\u52a1\u5206\u652f\u63a8\u9001\u5230\u8fdc\u7aef\u3001\u5f00 PR\uff0c\u4ee5\u53ca\u5220\u9664\u8fdc\u7aef\u5206\u652f \uff08<code>git push --delete</code> / <code>git push origin :&lt;branch&gt;</code>\uff09\u540c\u5c5e push \u7c7b\u5916\u90e8 \u5199\u5165\uff0c\u90fd\u9700\u8981\u5728\u5f53\u524d\u4efb\u52a1\u91cc\u5355\u72ec\u6388\u6743\uff1b\u7981\u6b62\u76f4\u63a5 push <code>main</code>\u3002\u5408\u5e76\u540e\u7684\u6e05\u7406\u8bf4\u660e \u4e0d\u6784\u6210\u5bf9\u8fdc\u7aef\u5220\u9664\u7684\u81ea\u52a8\u6388\u6743\u3002</li> <li>tag \u4e0e release\uff1a\u6bcf\u4e00\u6b21\u6253 tag\u3001\u53d1\u5e03 release\uff08\u5305\u62ec npm publish\u3001Pages \u90e8\u7f72\u3001 \u5efa\u8fdc\u7aef\u4ed3\u5e93\uff09\u90fd\u662f\u72ec\u7acb\u7684\u9ad8\u98ce\u9669\u52a8\u4f5c\uff0c\u5fc5\u987b\u9010\u9879\u5355\u72ec\u6388\u6743\uff1b\u4e00\u6b21 push \u6388\u6743\u4e0d\u6784\u6210 \u4efb\u4f55 tag/release \u6388\u6743\u3002</li> <li>\u81ea\u52a8\u5316\u5de5\u5177\uff08\u542b AI \u52a9\u624b\u4e0e CI\uff09\u5728\u672a\u83b7\u5f97\u9488\u5bf9\u5f53\u524d\u4efb\u52a1\u7684\u663e\u5f0f\u4eba\u5de5\u6388\u6743\u524d\uff0c\u4e0d\u5f97 \u6267\u884c <code>git add</code>\uff08stage\uff09\u3001<code>git commit</code>\u3001<code>git push</code>\u3001<code>git tag</code> \u6216\u4efb\u4f55\u5efa \u8fdc\u7aef/\u53d1\u5e03/\u5220\u9664\u8fdc\u7aef\u5f15\u7528\u7684\u547d\u4ee4\u3002</li> <li>\u6388\u6743\u53ea\u5bf9\u58f0\u660e\u8005\u7684\u90a3\u4e00\u6b21\u64cd\u4f5c\u6709\u6548\uff0c\u4e0d\u6784\u6210\u5bf9\u540c\u7c7b\u540e\u7eed\u64cd\u4f5c\u7684\u957f\u671f\u653e\u884c\u3002</li> </ul>"},{"location":"git-lifecycle/#\u53d7\u7ba1\u6295\u5f71\u4e0e\u6e90\u540c\u63d0\u4ea4","title":"\u53d7\u7ba1\u6295\u5f71\u4e0e\u6e90\u540c\u63d0\u4ea4","text":"<ul> <li>projen \u53d7\u7ba1\u6587\u4ef6\u53ea\u80fd\u901a\u8fc7\u4fee\u6539 <code>.projenrc.js</code> \u540e\u8fd0\u884c <code>pnpm synth</code> \u4ea7\u751f\uff1b\u751f\u6210\u7269 \u5fc5\u987b\u4e0e\u5176\u6e90\u53d8\u66f4\u5728\u540c\u4e00\u4e2a commit \u5185\u63d0\u4ea4\uff0c\u4e0d\u5f97\u5148\u63d0\u4ea4\u6e90\u3001\u540e\u8865\u751f\u6210\u7269\uff0c\u66f4\u4e0d\u5f97\u53ea \u63d0\u4ea4\u5176\u4e2d\u4e00\u4fa7\u3002</li> <li>\u6587\u6863\u53d7\u7ba1\u6295\u5f71\uff08\u5982 setup.md \u7684\u7a33\u5b9a\u95e8\u7981\u9636\u6bb5\u533a\u5757\uff09\u540c\u7406\uff1a\u6295\u5f71\u811a\u672c\u91cd\u8dd1 \u7684\u8f93\u51fa\u4e0e\u89e6\u53d1\u5b83\u7684\u771f\u6e90\u53d8\u66f4\u540c\u63d0\u4ea4\uff1bCI \u7684\u6f02\u79fb\u68c0\u67e5\uff08synth-drift / synth-idempotency\uff09 \u4f1a\u673a\u68b0\u62e6\u622a\u53ea\u63d0\u4ea4\u4e00\u4fa7\u7684\u53d8\u66f4\u3002</li> </ul>"},{"location":"git-lifecycle/#gitignore-\u5206\u7c7b","title":".gitignore \u5206\u7c7b","text":"<ul> <li>\u6bcf\u4e2a\u88ab\u5ffd\u7565\u7684\u8def\u5f84\u90fd\u5fc5\u987b\u5f52\u5165 <code>.foundation/file-registry.json</code> \u7684\u4e00\u4e2a\u7c7b\u522b\uff1a \u5de5\u5177\u751f\u6210\u7269\uff08artifacts\uff0c\u5982 <code>node_modules/</code>\u3001<code>site/</code>\u3001<code>.cache/</code>\u3001\u65e5\u5fd7\uff09\u8d70 <code>.gitignore</code>\uff1b\u4f9d\u8d56\u9501\u6587\u4ef6\uff08trackedToolLocks\uff0c\u5982 <code>pnpm-lock.yaml</code>\uff09\u88ab\u663e\u5f0f\u8ddf\u8e2a\u3001 \u4e0d\u5f97\u5ffd\u7565\uff1b\u624b\u5199\u6e90\u4e8b\u5b9e\u4e0e\u53d7\u7ba1\u6587\u4ef6\u4e00\u5f8b\u8ddf\u8e2a\u3002</li> <li><code>.gitignore</code> \u7684\u5ffd\u7565\u6a21\u5f0f\u96c6\u5408\u4e0e file-registry \u7684 artifacts \u6a21\u5f0f\u96c6\u5408\u5fc5\u987b\u9010\u5b57 \u4e00\u81f4\uff08<code>scripts/check-structure.mjs</code> \u673a\u68b0\u6838\u5bf9\uff09\uff1b\u65b0\u589e\u5ffd\u7565\u9879\u5fc5\u987b\u5148\u767b\u8bb0\u7c7b\u522b\uff0c \u4e0d\u5141\u8bb8\u51fa\u73b0\u201c\u8ddf\u8e2a\u4f46\u88ab\u5ffd\u7565\u201d\u6216\u201c\u5ffd\u7565\u4f46\u672a\u767b\u8bb0\u201d\u7684\u4e2d\u95f4\u6001\u3002</li> </ul>"},{"location":"git-lifecycle/#\u5220\u9664\u524d\u6838\u5bf9\u4e0e\u53ef\u6062\u590d\u5904\u7f6e","title":"\u5220\u9664\u524d\u6838\u5bf9\u4e0e\u53ef\u6062\u590d\u5904\u7f6e","text":"<ul> <li>\u5220\u9664\u4efb\u4f55\u6587\u4ef6\u3001\u5206\u652f\u6216\u5386\u53f2\u5185\u5bb9\u4e4b\u524d\uff0c\u5148\u6838\u5bf9\u5176\u662f\u5426\u4ecd\u88ab\u5f15\u7528\uff08\u95e8\u7981\u3001\u6587\u6863\u94fe\u63a5\u3001 \u51bb\u7ed3\u8bc1\u636e\u5f15\u7528\uff09\uff1b\u88ab\u51bb\u7ed3\u9a8c\u6536\u8f93\u5165\u5f15\u7528\u7684\u8bc1\u636e\u4e00\u5f8b\u4e0d\u5f97\u5220\u9664\u3002</li> <li>\u4f18\u5148\u53ef\u6062\u590d\u5904\u7f6e\uff1a\u80fd\u6539\u5c31\u4e0d\u5220\uff0c\u80fd\u505c\u7528\uff08\u5982 <code>if: false</code> \u786c\u95e8\u7981\uff09\u5c31\u4e0d\u79fb\u9664\uff1b\u786e\u9700 \u5220\u9664\u65f6\u4fdd\u7559\u53ef\u8ffd\u6eaf\u7684\u66ff\u4ee3\u7269\uff08\u7eed\u63a5\u8bb0\u5f55\u3001\u51b3\u5b9a\u8bb0\u5f55\u3001\u5f52\u6863\u9875\uff09\u3002</li> <li>\u5206\u652f\u9000\u51fa\uff1a\u4efb\u52a1\u5206\u652f\u5408\u5e76\u540e\uff0c\u5148\u786e\u8ba4\u6ca1\u6709\u672a\u5408\u5e76\u7684\u63d0\u4ea4\uff0c\u518d\u5220\u9664\u672c\u5730\u5206\u652f\uff1b\u8fdc\u7aef \u5206\u652f\u5220\u9664\u5c5e\u4e8e push \u7c7b\u5916\u90e8\u5199\u5165\uff0c\u5408\u5e76\u540e\u7684\u6e05\u7406\u8bf4\u660e\u4e0d\u5f97\u81ea\u52a8\u6388\u6743\u8fdc\u7aef\u5220\u9664\uff0c\u987b\u6309 \u9010\u9879\u6388\u6743\u8282\u53e6\u884c\u53d6\u5f97\u663e\u5f0f\u6388\u6743\u3002</li> <li>\u4efb\u4f55\u201c\u5220\u9664\u540e\u91cd\u653e\u201d\u90fd\u5fc5\u987b\u6709\u5148\u7ea2\u540e\u7eff\u7684\u673a\u5668\u8bc1\u636e\uff0c\u8bc1\u660e\u5220\u9664\u4e0d\u662f\u9759\u9ed8\u4e22\u5931\u3002</li> </ul>"},{"location":"git-lifecycle/#\u751f\u6210\u7269\u7981\u6b62\u624b\u6539","title":"\u751f\u6210\u7269\u7981\u6b62\u624b\u6539","text":"<ul> <li>\u5e26 projen \u751f\u6210\u6807\u8bb0\u7684\u6587\u4ef6\u3001\u6295\u5f71\u811a\u672c\u5199\u5165\u7684\u53d7\u7ba1\u533a\u5757\u3001<code>.foundation/</code> \u4e0b\u7684\u673a\u5668 \u771f\u6e90\u4e00\u5f8b\u7981\u6b62\u624b\u6539\uff1b\u624b\u6539\u4f1a\u88ab synth \u6f02\u79fb\u68c0\u67e5\u68c0\u51fa\u5e76\u62e6\u622a\u3002</li> <li>\u9700\u8981\u53d8\u66f4\u53d7\u7ba1\u5185\u5bb9\u65f6\uff0c\u552f\u4e00\u5408\u6cd5\u8def\u5f84\u662f\u4fee\u6539\u5bf9\u5e94\u7684\u6e90\uff08<code>.projenrc.js</code> \u6216\u6295\u5f71\u811a\u672c \u7684\u771f\u6e90\u8f93\u5165\uff09\u518d\u91cd\u65b0\u751f\u6210\uff1b\u201c\u624b\u6539\u540e\u518d\u91cd\u65b0\u751f\u6210\u628a\u5dee\u5f02\u6d17\u767d\u201d\u5c5e\u4e8e\u88ab\u95e8\u7981\u660e\u786e\u62d2\u7edd \u7684\u7be1\u6539\u6a21\u5f0f\u3002</li> </ul>"},{"location":"help/","title":"\u4e2d\u6587 \u00b7 \u80fd\u529b\u4e0e\u8bca\u65ad","text":"<p>English</p>"},{"location":"help/#\u5e2e\u52a9\u4e0e\u5206\u8bca","title":"\u5e2e\u52a9\u4e0e\u5206\u8bca","text":"<p>\u672c\u9875\u6309\u9519\u8bef\u7801\u3001\u8fdb\u7a0b\u9000\u51fa\u7801\u4e0e\u73b0\u8c61\u7ed9\u5206\u8bca\u8def\u5f84\u3002Foundation \u7684\u9519\u8bef\u7801\u4f53\u7cfb\u51bb\u7ed3\u5728 Contracts\uff08<code>src/error-codes.json</code>\uff09\uff0c\u4e0d\u6f02\u79fb\uff1b\u673a\u5236\u5931\u8d25\u7edf\u4e00\u4e3a <code>SFC2004</code> \u52a0\u7a33\u5b9a <code>details.kind</code>\u3002</p>"},{"location":"help/#\u6309\u7a33\u5b9a\u9519\u8bef\u7801\u5206\u8bca","title":"\u6309\u7a33\u5b9a\u9519\u8bef\u7801\u5206\u8bca","text":"\u9519\u8bef\u7801 \u540d\u79f0 \u542b\u4e49 \u5904\u7f6e SFC1001 SCHEMA_VALIDATION_FAILED \u6587\u6863\u672a\u901a\u8fc7\u76ee\u6807 Schema \u9a8c\u8bc1 \u68c0\u67e5\u6587\u6863\u5fc5\u586b\u5b57\u6bb5\u4e0e\u7c7b\u578b\u7ea6\u675f SFC1002 UNKNOWN_SCHEMA_ID <code>$id</code> \u672a\u5728\u767b\u8bb0\u8868\u6ce8\u518c \u786e\u8ba4 <code>$id</code> \u62fc\u5199\u4e0e Contracts \u7248\u672c SFC1003 DUPLICATE_SCHEMA_ID \u91cd\u590d <code>$id</code> \u6ce8\u518c\u88ab\u62d2 \u4e0d\u91cd\u590d\u6ce8\u518c\uff0c\u590d\u7528\u5df2\u6709\u767b\u8bb0 SFC1004 DUPLICATE_PROTOCOL_NAME \u91cd\u590d\u534f\u8bae\u540d/\u7248\u672c\u88ab\u62d2 \u4e0d\u91cd\u590d\u767b\u8bb0\u534f\u8bae SFC1005 UNRESOLVED_REF <code>$ref</code> \u76ee\u6807\u65e0\u6cd5\u89e3\u6790 \u68c0\u67e5 <code>$ref</code> \u6307\u5411 SFC1006 UNSUPPORTED_DIALECT \u65b9\u8a00\u4e0d\u5728\u652f\u6301\u96c6 \u4ec5\u7528 draft-07 / 2020-12 SFC1007 UNKNOWN_CHECK_TYPE \u89c4\u5219\u7528\u4e5d\u7c7b\u5916\u68c0\u67e5\u7c7b\u578b \u4e0d\u81ea\u5b9a\u4e49\u68c0\u67e5\u7c7b\u578b SFC1008 RULE_BUDGET_EXCEEDED \u5f3a\u5236\u89c4\u5219\u8d85\u9884\u7b97/\u4e0a\u9650 \u4e0d\u8d85 20\uff08\u7edd\u5bf9 30\uff09 SFC1009 UNKNOWN_ERROR_CODE \u5f15\u7528\u672a\u767b\u8bb0\u9519\u8bef\u7801 \u53ea\u5f15\u7528\u51bb\u7ed3\u767b\u8bb0\u8868 SFC1010 FIXTURE_EXPECTATION_MISMATCH fixture \u884c\u4e3a\u4e0e\u671f\u671b\u4e0d\u7b26 \u67e5 fixture \u58f0\u660e SFC1011 UNKNOWN_PROTOCOL \u5f15\u7528\u672a\u767b\u8bb0\u534f\u8bae \u786e\u8ba4\u534f\u8bae\u540d/\u7248\u672c SFC1012 SCHEMA_COMPILE_FAILED Schema \u672c\u8eab\u65e0\u6cd5\u7f16\u8bd1 \u67e5 Schema \u8bed\u6cd5 SFC2002 UNKNOWN_OPERATION \u64cd\u4f5c\u540d\u4e0d\u5728\u51bb\u7ed3\u8bcd\u6c47\u8868 \u53ea\u7528 <code>validate</code> SFC2003 INVALID_PARAMS \u53c2\u6570\u4e0d\u6ee1\u8db3 params \u5408\u540c \u68c0\u67e5\u53c2\u6570 SFC2004 EXECUTION_FAILED \u673a\u5236\u6267\u884c\u5931\u8d25 \u770b <code>details.kind</code> \u7ec6\u5206 SFC3001 REPORT_DIGEST_MISMATCH \u62a5\u544a/\u7ed3\u679c\u6458\u8981\u4e0e\u7ed1\u5b9a\u4e0d\u4e00\u81f4 \u91cd\u7b97 model/result SFC3002 REPORT_ELEMENT_MISSING \u62a5\u544a\u7f3a\u5f3a\u5236\u5143\u7d20 \u8865\u5168\u62a5\u544a\u5b57\u6bb5 SFC3003 REPORT_FACT_DRIFT \u62a5\u544a\u5b57\u8282\u504f\u79bb\u786e\u5b9a\u6027\u91cd\u6e32\u67d3 \u7528\u673a\u5668\u7ed3\u679c\u91cd\u6e32\u67d3"},{"location":"help/#\u6309\u8fdb\u7a0b\u9000\u51fa\u7801\u5206\u8bcaEngineering-Kit","title":"\u6309\u8fdb\u7a0b\u9000\u51fa\u7801\u5206\u8bca\uff08Engineering Kit\uff09","text":"\u9000\u51fa\u7801 \u542b\u4e49 \u5904\u7f6e 0 \u6210\u529f / \u65e0\u53d1\u73b0 \u65e0\u9700\u5904\u7f6e 1 <code>check</code> \u6709\u53d1\u73b0 \u5904\u7f6e\u53d1\u73b0\u9879\uff0cKit \u4e0d\u81ea\u52a8\u4fee\u590d 2 \u62d2\u7edd / \u7528\u6cd5 / \u673a\u5236\u9519\u8bef \u68c0\u67e5\u547d\u4ee4\u540d\u3001\u53c2\u6570\u4e0e <code>--fix</code> \u7b49\u88ab\u62d2\u65d7\u6807"},{"location":"help/#\u6309\u73b0\u8c61\u5206\u8bca","title":"\u6309\u73b0\u8c61\u5206\u8bca","text":"<ul> <li>\u6821\u9a8c\u4e00\u76f4\u62a5 SFC1002\uff1a<code>$id</code> \u672a\u6ce8\u518c\uff0c\u5148\u786e\u8ba4 Contracts \u7248\u672c\u4e0e <code>$id</code> \u547d\u540d\u7a7a\u95f4\u3002</li> <li>\u8def\u5f84\u64cd\u4f5c\u62a5 SFC2004 + <code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>\uff1a\u8def\u5f84\u8d8a\u51fa\u53d7\u6536\u5bb9\u6839\uff0c\u786e\u8ba4\u6839\u76ee\u5f55\u8fb9\u754c\uff0c\u4e0d\u8981\u628a\u4e1a\u52a1\u9009\u62e9\u89c4\u5219\u585e\u8fdb Foundation\u3002</li> <li>\u539f\u5b50\u5199\u62a5 SFC2004 + <code>atomic-write-failed</code>\uff1a\u76ee\u6807\u8d8a\u754c\u6216\u5185\u5bb9\u7c7b\u578b\u975e\u6cd5\uff0c\u68c0\u67e5\u8def\u5f84\u6536\u5bb9\u4e0e\u5185\u5bb9\u7c7b\u578b\u3002</li> <li>\u72b6\u6001\u5b58\u50a8\u62a5 <code>store-locked</code>\uff1a\u65e7\u5199\u8005\u53ef\u80fd\u4ecd\u6301\u6709\u9501\uff1b\u5728 Foundation \u5916\u786e\u8ba4\u65e7\u5199\u8005\u5df2\u7ec8\u6b62\uff0c\u518d\u7528\u7cbe\u786e owner/fencing \u8c03\u7528 <code>recoverStateStoreLock</code>\u3002</li> <li>CLI host apply \u76f4\u63a5\u5931\u8d25\uff1aEngineering Kit \u7684 <code>adopt-plan host-apply</code>\u3001\u901a\u7528\u6216\u8fdc\u7aef apply \u4ecd\u7a33\u5b9a\u62d2\u7edd\u3002\u5305 API <code>applyHostPlan</code> \u53ea\u6267\u884c\u5df2\u767b\u8bb0\u5bbf\u4e3b\u7684\u6458\u8981\u7ed1\u5b9a\u672c\u5730 install/update\uff1b\u6267\u884c uninstall \u8ba1\u5212\u4f1a\u8fd4\u56de <code>manual-recovery-required</code>\uff0c\u4e0d\u5220\u9664\u6587\u4ef6\u3002Qoder \u5b8c\u6574 driver \u4ecd\u4e3a unsupported\u3002</li> <li>\u540c\u7ea7 adapter \u9a8c\u8bc1\u5931\u8d25\uff1a<code>verifyHostPeers</code> \u53ea\u63a5\u53d7\u7531\u5df2\u767b\u8bb0 Profile \u8bc1\u660e\u7684\u5bbf\u4e3b\u548c\u8def\u5f84\u7c7b\u522b\uff1b\u4efb\u4e00 peer \u7684\u8def\u5f84\u3001\u95ed\u5305\u3001\u5b57\u8282\u6216 <code>logicalMappings</code> \u4e0d\u4e00\u81f4\u90fd\u4f1a\u5931\u8d25\u5173\u95ed\uff0c\u4e0d\u4f1a\u6388\u4e88\u5b89\u88c5\u6216\u53d1\u5e03\u72b6\u6001\u3002</li> <li>\u6587\u6863\u7248\u672c/\u547d\u4ee4\u5bf9\u4e0d\u4e0a\u771f\u6e90\uff1a\u4ee5 <code>scripts/docs/fact-check.mjs</code> \u590d\u7b97\u7ed3\u679c\u4e3a\u51c6\uff0c\u4e0d\u51ed\u8bb0\u5fc6\u4fee\u8ba2\u3002</li> </ul>"},{"location":"help/#\u9879\u76ee\u8def\u7531","title":"\u9879\u76ee\u8def\u7531","text":"<ul> <li>\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001 / npm \u53d1\u5e03 \u2192 release-skill\u3002</li> <li>\u4efb\u52a1 / \u91cd\u8bd5 / \u8fd4\u5de5 / \u9a8c\u6536 \u2192 loop-agent\u3002</li> <li>\u5236\u54c1\u5173\u7cfb / \u7248\u672c\u9501 \u2192 artifact-graph\u3002</li> <li>\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49 \u2192 \u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\u3002</li> <li>\u901a\u7528\u7ed3\u6784 / \u673a\u5236\u95ee\u9898 \u2192 \u672c\u4ed3 <code>docs/architecture.md</code> \u4e0e <code>docs/agents/</code>\u3002</li> </ul>"},{"location":"help/#\u547d\u4ee4\u901f\u67e5\u4e0e\u6743\u5a01\u4e8b\u5b9e","title":"\u547d\u4ee4\u901f\u67e5\u4e0e\u6743\u5a01\u4e8b\u5b9e","text":"<p>Engineering Kit \u53ea\u6709\u56db\u4e2a\u9876\u5c42\u547d\u4ee4\uff1a<code>scaffold</code>\u3001<code>adopt-plan</code>\u3001<code>projection</code>\u3001<code>check</code>\u3002\u5176\u4e2d <code>check</code> \u53ea\u8bca\u65ad\u4e0d\u4fee\u590d\uff0c\u53d1\u73b0\u9879\u4ea4\u8c03\u7528\u65b9\u5904\u7f6e\u3002</p> <ul> <li>\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u7248\u672c\u3001\u5305\u96c6\u5408\u3001\u955c\u50cf\u5750\u6807\u3001\u95e8\u7981\uff09\uff1a\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u552f\u4e00\u72b6\u6001\u9875\uff09\u3002</li> <li>\u5f00\u53d1\u4e0e\u63d0\u4ea4\u89c4\u8303\uff1aGit \u751f\u547d\u5468\u671f\u6307\u5357\u3002</li> </ul>"},{"location":"licensing/","title":"\u4e2d\u6587 \u00b7 \u8bb8\u53ef\u4e0e\u7f72\u540d","text":"<p>English</p>"},{"location":"licensing/#\u8bb8\u53ef\u8bc1\u4e0e\u8eab\u4efd\u8bf4\u660e","title":"\u8bb8\u53ef\u8bc1\u4e0e\u8eab\u4efd\u8bf4\u660e","text":"<p>\u672c\u9875\u8bf4\u660e Skill Family Foundation \u7684\u8bb8\u53ef\u8bc1\u91c7\u7528\u65b9\u5f0f\u3001\u5404\u8eab\u4efd\u4e3b\u4f53\u7684\u533a\u522b\uff0c\u4ee5\u53ca NOTICE \u4e0e\u7b2c\u4e09\u65b9\u7f72\u540d\u7684\u5f53\u524d\u72b6\u6001\u3002\u5b83\u4e0d\u662f Apache License 2.0 \u7684\u5b98\u65b9\u8bd1\u6587\uff1bApache-2.0 \u7684\u6cd5\u5f8b\u6b63\u6587\u4ee5\u4ed3\u5e93\u6839\u76ee\u5f55\u7684 <code>LICENSE</code> \u4e3a\u51c6\uff0c\u5982\u6709\u6b67\u4e49\u4ee5\u8be5\u82f1\u6587\u6b63\u672c\u4e3a\u51c6\u3002</p>"},{"location":"licensing/#\u8bb8\u53ef\u8bc1","title":"\u8bb8\u53ef\u8bc1","text":"<ul> <li>\u8bb8\u53ef\u8bc1\uff1a<code>Apache-2.0</code>\uff08SPDX \u6807\u8bc6\u4fdd\u6301\u4e0d\u53d8\uff09\u3002</li> <li>\u6cd5\u5f8b\u6b63\u6587\uff1a\u6839\u76ee\u5f55 <code>LICENSE</code> \u4e3a Apache License 2.0 \u5168\u6587\uff08\u82f1\u6587\u6743\u5a01\uff09\u3002\u672c\u9875\u4e0e\u4efb\u4f55\u4e2d\u6587\u6750\u6599\u53ea\u89e3\u91ca\u91c7\u7528\u65b9\u5f0f\uff0c\u4e0d\u66ff\u4ee3\u3001\u4e0d\u91cd\u8ff0\u6cd5\u5f8b\u6b63\u6587\uff0c\u4e5f\u4e0d\u58f0\u79f0\u5177\u6709\u540c\u7b49\u6cd5\u5f8b\u6548\u529b\u3002</li> <li>\u4e09\u4e2a\u53f6\u5b50\u5305\u968f\u5305\u5206\u53d1\u6839 <code>LICENSE</code> \u526f\u672c\u3002</li> </ul>"},{"location":"licensing/#\u8eab\u4efd\u4e3b\u4f53\u533a\u5206","title":"\u8eab\u4efd\u4e3b\u4f53\u533a\u5206","text":"<p>\u4ee5\u4e0b\u56db\u7c7b\u8eab\u4efd\u76f8\u4e92\u72ec\u7acb\uff0c\u4e0d\u5f97\u76f8\u4e92\u63a8\u5bfc\u6216\u5408\u5e76\uff1a</p> \u8eab\u4efd \u53d6\u503c \u8bf4\u660e \u4f5c\u8005 / \u7248\u6743\u4e3b\u4f53\uff08author / copyright holder\uff09 \u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8 \u7248\u6743\u5f52\u5c5e\u65b9\uff0c\u5199\u5165 <code>package.json</code> \u7684 <code>author</code> \u4e0e <code>LICENSE</code> \u9644\u5f55\u7f72\u540d \u4ed3\u5e93 owner\uff08GitHub owner\uff09 <code>ifoohoo</code> GitHub \u7ec4\u7ec7/\u8d26\u53f7\uff0c\u4e0e\u4f5c\u8005\u65e0\u63a8\u5bfc\u5173\u7cfb npm \u53d1\u5e03\u8005\uff08npm publisher\uff09 \u5f53\u524d\u53d1\u5e03\u914d\u7f6e\u4e2d\u7684\u8d26\u53f7 npm \u53d1\u5e03\u8eab\u4efd\uff0c\u4e0e\u4f5c\u8005/owner \u65e0\u63a8\u5bfc\u5173\u7cfb \u8d21\u732e\u8005\u7248\u6743\u884c \u6839 <code>LICENSE</code> \u9644\u5f55\u4e2d\u7684 contributors \u7f72\u540d \u4fdd\u7559\u7684\u5386\u53f2/\u8d21\u732e\u8005\u7f72\u540d\uff0c\u4e0d\u4f5c\u4e3a\u9879\u76ee\u4f5c\u8005\u6216\u7248\u6743\u4e3b\u4f53 <p><code>author</code>\u3001<code>repository.owner</code>\u3001<code>npm publisher</code> \u4e09\u8005\u5206\u522b\u8bb0\u5f55\uff0c\u4e0d\u5f97\u4ece\u4efb\u4e00\u63a8\u5bfc\u5176\u4f59\u3002</p>"},{"location":"licensing/#\u9879\u76ee\u7ea7-NOTICE","title":"\u9879\u76ee\u7ea7 NOTICE","text":"<p>FND-ADR-008 \u5df2\u6839\u636e 2026-08-10 \u7684\u7528\u6237\u88c1\u51b3\u91c7\u7528\u65b9\u6848 B\u3002Foundation \u73b0\u5728\u7ef4\u62a4\u6839 <code>NOTICE</code>\uff0c\u5176\u4e2d\u8bb0\u5f55\u9879\u76ee\u540d\u79f0\u3001\u5e74\u4efd 2026 \u548c\u7248\u6743\u4e3b\u4f53\u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8\u3002\u4ece 0.2.1 \u8d77\uff0c\u4e09\u4e2a public unit \u7684\u955c\u50cf\u3001\u51bb\u7ed3\u5feb\u7167\u4e0e npm tarball \u90fd\u5fc5\u987b\u5206\u53d1\u8be5\u6587\u4ef6\u3002</p> <p><code>open-source</code> Profile \u7ee7\u7eed\u58f0\u660e <code>noticeRequired: true</code>\u3002Engineering Kit \u7ee7\u7eed\u628a Apache-2.0 \u4e0e NOTICE \u8981\u6c42\u7ed1\u5b9a\u4e3a\u673a\u5236\u4e0d\u53d8\u91cf\uff1b<code>checkIdentityDrift</code> \u5728 NOTICE \u7f3a\u5931\u65f6\u7ee7\u7eed\u62a5\u544a <code>notice-missing</code>\u3002\u8fd9\u9879\u6536\u53e3\u53ea\u6539\u53d8 Foundation \u7684\u53d1\u5e03\u6210\u5458\uff0c\u4e0d\u6539 Kit \u5bf9\u5176\u4ed6\u6d88\u8d39\u8005\u7684\u884c\u4e3a\u3002</p> <p>\u6839\u636e\u6839 <code>LICENSE</code> \u4e2d Apache License 2.0 \u7684\u7b2c 4(d) \u6761\uff0cNOTICE \u4e2d\u7684\u5185\u5bb9\u7528\u4e8e\u4fe1\u606f\u4e0e\u7f72\u540d\uff0c\u4e0d\u4fee\u6539 Apache License 2.0 \u7684\u8bb8\u53ef\u6761\u6b3e\u3002</p>"},{"location":"licensing/#\u7b2c\u4e09\u65b9\u7f72\u540dTHIRD_PARTY_NOTICES","title":"\u7b2c\u4e09\u65b9\u7f72\u540d\uff08THIRD_PARTY_NOTICES\uff09","text":"<p>Engineering Kit \u7684 public unit \u5206\u53d1 MkDocs Material\u3001lunr \u4e0e lunr-languages \u8d44\u4ea7\uff0c\u5df2\u5305\u542b <code>packages/skill-family-engineering-kit/THIRD_PARTY_NOTICES</code> \u4e0e\u5bf9\u5e94\u7b2c\u4e09\u65b9\u8bb8\u53ef\u8bc1\u6750\u6599\u3002\u7b2c\u4e09\u65b9\u7f72\u540d\u7531 <code>THIRD_PARTY_NOTICES</code> \u4e0e\u5bf9\u5e94\u8bb8\u53ef\u8bc1\u95ed\u5305\u8986\u76d6\uff0c\u4e0d\u5f97\u7528\u9879\u76ee\u7ea7 <code>NOTICE</code> \u66ff\u4ee3\u3002<code>NOTICE</code> \u53ea\u627f\u8f7d Foundation \u81ea\u8eab\u7684\u9879\u76ee\u7f72\u540d\uff0c\u4e0d\u590d\u5236\u7b2c\u4e09\u65b9\u8bb8\u53ef\u8bc1\u5168\u6587\u3002</p>"},{"location":"licensing/#private-\u5de5\u4f5c\u533a\u4e0e-public-\u955c\u50cf\u7684\u8bb8\u53ef\u8bc1\u8fb9\u754c","title":"private \u5de5\u4f5c\u533a\u4e0e public \u955c\u50cf\u7684\u8bb8\u53ef\u8bc1\u8fb9\u754c","text":"<ul> <li>\u672c\u5de5\u4f5c\u533a\u6c38\u4e45 private\uff0c\u662f\u552f\u4e00\u5f00\u53d1\u771f\u6e90\uff1b\u672c\u4f53\u4e0d\u8fdb\u5165\u516c\u5f00\u8fb9\u754c\u3002</li> <li>\u516c\u5f00\u8fb9\u754c\u53ea\u6709\u4e09\u4e2a\u7248\u672c\u5316\u53d1\u5e03\u955c\u50cf\u4e0e npm tarball\uff1b\u5b83\u4eec\u5206\u53d1\u6839 <code>LICENSE</code>\uff08Apache-2.0\uff09\u4e0e <code>NOTICE</code>\u3002Engineering Kit \u8fd8\u5206\u53d1 <code>THIRD_PARTY_NOTICES</code> \u53ca\u5bf9\u5e94\u7b2c\u4e09\u65b9\u8bb8\u53ef\u8bc1\u6750\u6599\u3002</li> <li>\u79c1\u6709\u5de5\u4f5c\u533a\u5185\u7684 Profile\u3001fixture\u3001\u5185\u90e8\u6587\u6863\u4e0e\u8fd0\u884c\u8bc1\u636e\u4e0d\u8fdb\u5165\u516c\u5f00\u5305\uff1b\u516c\u5f00\u6587\u6863\u53ea\u6d88\u8d39\u7ecf allowlist \u4e0e\u53d1\u5e03\u5408\u540c\u673a\u68b0\u9a8c\u8bc1\u7684\u53d1\u5e03\u7269\u3002</li> <li>\u53d1\u5e03\u72b6\u6001\u4e0e\u5168\u90e8\u8fdc\u7aef\u5199\u5165\u5f52 release-skill\uff1b\u672c\u6587\u4e0d\u590d\u5236\u5b9e\u65f6\u53d1\u5e03\u72b6\u6001\u3002</li> </ul>"},{"location":"quickstart/","title":"\u4e2d\u6587 \u00b7 \u5feb\u901f\u5f00\u59cb","text":"<p>English</p>"},{"location":"quickstart/#\u5feb\u901f\u5f00\u59cb","title":"\u5feb\u901f\u5f00\u59cb","text":"<p>\u672c\u9875\u7ed9\u666e\u901a\u5f00\u53d1\u8005\u4e09\u6761\u53ef\u6267\u884c\u65c5\u7a0b\uff1a\u65b0\u9879\u76ee\u80fd\u529b\u53d1\u73b0\u4e0e\u9aa8\u67b6\u751f\u6210\u3001\u5b58\u91cf\u9879\u76ee\u91c7\u7528\u4e0e\u8fc1\u79fb\u3001\u65e5\u5e38\u5355\u9700\u6c42\u67e5\u8be2\u3002\u6bcf\u6761\u8def\u5f84\u90fd\u7ed9\u51fa\u7cbe\u786e\u547d\u4ee4\uff1b\u67b6\u6784\u8def\u7531\u4e0e API \u7ec6\u8282\u8f6c\u5230\u5bf9\u5e94\u6587\u6863\u3002</p>"},{"location":"quickstart/#\u516c\u5171\u5b89\u88c5\u524d\u63d0","title":"\u516c\u5171\u5b89\u88c5\u524d\u63d0","text":"<p>\u672c\u5730\u5019\u9009\u9a8c\u8bc1\u4ece\u5de5\u4f5c\u533a\u6253\u51fa\u4e09\u4efd\u5f53\u524d\u7248\u672c tarball\uff0c\u5e76\u628a\u5b83\u4eec\u5b89\u88c5\u5230\u4e34\u65f6 consumer\uff1b\u5f53\u524d\u7248\u672c\u89c1\u552f\u4e00\u72b6\u6001\u9875 <code>docs/status/current.md</code>\u3002\u4ee5\u4e0b\u547d\u4ee4\u4ece Foundation \u5de5\u4f5c\u533a\u6839\u76ee\u5f55\u8fd0\u884c\uff1a</p> <pre><code>pack_dir=\"$(mktemp -d)\"\n(cd packages/skill-family-contracts &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-harness-node &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-engineering-kit &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\nmkdir \"$pack_dir/consumer\" &amp;&amp; (cd \"$pack_dir/consumer\" &amp;&amp; npm init -y)\n(cd \"$pack_dir/consumer\" &amp;&amp; npm install \"$pack_dir/skill-family-contracts-&lt;version&gt;.tgz\" \"$pack_dir/skill-family-harness-node-&lt;version&gt;.tgz\" \"$pack_dir/skill-family-engineering-kit-&lt;version&gt;.tgz\")\n</code></pre> <p>\u53d1\u5e03\u540e\u5b89\u88c5\u72b6\u6001\u9875\u6240\u5217\u7684\u7cbe\u786e\u5750\u6807\uff0c\u518d\u8fd0\u884c\u4e0b\u6587\u7684 <code>npm exec</code> \u547d\u4ee4\u3002</p>"},{"location":"quickstart/#\u65b0\u9879\u76ee\u53d1\u73b0\u80fd\u529b\u5e76\u751f\u6210\u9aa8\u67b6","title":"\u65b0\u9879\u76ee\uff1a\u53d1\u73b0\u80fd\u529b\u5e76\u751f\u6210\u9aa8\u67b6","text":"<p>\u5148\u7528\u7528\u9014\u6587\u4ef6\u67e5\u770b\u6574\u4e2a\u9879\u76ee\u53ef\u7528\u7684\u80fd\u529b\uff0c\u518d\u663e\u5f0f\u9009\u62e9\u7a33\u5b9a\u80fd\u529b\u751f\u6210\u9aa8\u67b6\u3002<code>--list-capabilities</code> \u53ea\u8bfb\uff0c\u4e0d\u5199\u9879\u76ee\uff1b<code>--uses</code> \u6587\u4ef6\u53ea\u4fdd\u7559\u95ee\u9898\u3001\u7ea6\u675f\u3001\u4fdd\u7559\u4fdd\u8bc1\u548c\u53ef\u9009\u7b5b\u9009\u8bcd\uff0c\u4e0d\u8981\u5199\u51ed\u636e\u6216\u79c1\u5bc6\u4e1a\u52a1\u6570\u636e\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json\nnpm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project --capability foundation.contracts.object-validation --capability foundation.harness.atomic-write\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p><code>supportedMatches</code> \u53ea\u662f\u5019\u9009\u53d1\u73b0\uff0c<code>needsDecision</code> \u8868\u793a\u4ecd\u9700\u7531\u9879\u76ee\u786e\u8ba4\u7528\u9014\uff1b\u5b83\u4e0d\u4f1a\u5199 Profile \u6216\u5ba3\u79f0\u91c7\u7528\u5b8c\u6210\u3002<code>scaffold</code> \u6210\u529f\u53ea\u8868\u793a\u9aa8\u67b6\u548c\u5951\u7ea6\u6d4b\u8bd5\u63a5\u7ebf\u5df2\u5199\u5165\uff0c\u9002\u914d\u5668\u3001\u9886\u57df\u4fdd\u8bc1\u548c\u6d88\u8d39\u8005\u6d4b\u8bd5\u4ecd\u9700\u8865\u9f50\u3002</p>"},{"location":"quickstart/#\u5b58\u91cf\u9879\u76ee\u91c7\u7528\u5e76\u5b8c\u6210\u8fc1\u79fb","title":"\u5b58\u91cf\u9879\u76ee\uff1a\u91c7\u7528\u5e76\u5b8c\u6210\u8fc1\u79fb","text":"<p>\u5148\u8fd0\u884c\u53ea\u8bfb <code>adopt-plan</code>\uff0c\u518d\u5728 migration manifest \u4e2d\u8bb0\u5f55\u7528\u9014\u548c\u56db\u7c7b decision\u3002<code>direct-adoption</code> \u4e0e <code>compatibility-layer</code> \u624d\u80fd\u6307\u5411 Foundation \u80fd\u529b\uff1b<code>keep-business</code> \u548c <code>foundation-gap</code> \u4fdd\u7559\u5728\u6d88\u8d39\u8005\u4fa7\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> \u4e0d\u5199\u6587\u4ef6\uff0c\u4e5f\u4e0d\u81ea\u52a8\u8fc1\u79fb\u3002\u8fc1\u79fb\u72b6\u6001 <code>complete</code> \u53ea\u8868\u793a Profile\u3001\u53d7\u7ba1\u6587\u4ef6\u3001\u65e7\u5b9e\u73b0\u9000\u51fa\u3001check \u548c\u56db\u7c7b\u8bc1\u636e\u90fd\u6ee1\u8db3\uff1b\u5b83\u4e0d\u7b49\u4e8e\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u3002\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u8981\u7531\u6d88\u8d39\u8005\u81ea\u5df1\u7684\u9002\u914d\u5668\u6d4b\u8bd5\u4e0e\u9886\u57df\u95e8\u7981\u58f0\u660e\u3002</p>"},{"location":"quickstart/#\u65e5\u5e38\u5de5\u4f5c\u67e5\u8be2\u5355\u9879\u9700\u6c42","title":"\u65e5\u5e38\u5de5\u4f5c\uff1a\u67e5\u8be2\u5355\u9879\u9700\u6c42","text":"<p>\u4e0d\u786e\u5b9a capability ID \u65f6\uff0c\u7528\u5f53\u524d\u8bed\u8a00\u505a\u786e\u5b9a\u6027\u5b50\u4e32\u67e5\u8be2\u3002\u7ed3\u679c\u4e3a\u7a7a\u662f <code>no-text-match</code>\uff0c\u53ea\u547d\u4e2d unsupported \u80fd\u529b\u662f <code>boundary-found</code>\uff1b\u8fd9\u4e24\u79cd\u7ed3\u679c\u90fd\u4e0d\u662f <code>foundation-gap</code> decision\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --locale zh-CN --filter \"\u5199\u6587\u4ef6\u5931\u8d25\u65f6\u4e0d\u80fd\u7559\u4e0b\u6b8b\u7f3a\u6587\u4ef6\"\n</code></pre> <p>\u9700\u8981\u8bc1\u660e\u771f\u5b9e\u5bbf\u4e3b\u65f6\uff0c\u5fc5\u987b\u53e6\u884c\u63d0\u4f9b\u5b8c\u6574 request\u3001bindings \u548c <code>--native</code>\uff0c\u5e76\u4f7f\u7528\u80fd\u529b\u76ee\u5f55\u58f0\u660e\u7684\u8d44\u683c\u5165\u53e3\uff1a</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p>\u8be5\u547d\u4ee4\u7684\u771f\u5b9e\u8d44\u683c\u7ed3\u8bba\u53ea\u6765\u81ea\u4e00\u6b21\u663e\u5f0f\u3001\u53d7\u7ea6\u675f\u7684\u5bbf\u4e3b\u6267\u884c\uff1b\u5019\u9009\u53d1\u73b0\u3001\u8fc1\u79fb <code>complete</code> \u548c\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u90fd\u4e0d\u80fd\u66ff\u4ee3\u5b83\u3002</p>"},{"location":"quickstart/#\u65e7\u7248\u6700\u77ed\u8def\u5f84\u751f\u6210\u9aa8\u67b6","title":"\u65e7\u7248\u6700\u77ed\u8def\u5f84\uff1a\u751f\u6210\u9aa8\u67b6","text":"<p>\u82e5\u9879\u76ee\u5df2\u786e\u8ba4\u4e0d\u9700\u8981\u5148\u505a\u7528\u9014\u8bc4\u4f30\uff0c\u4ecd\u53ef\u76f4\u63a5\u4ece\u96f6\u751f\u6210\u7b26\u5408 Foundation \u5951\u7ea6\u7684\u9aa8\u67b6\u3002</p> <pre><code>npm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p>\u4ee5\u4e0a\u547d\u4ee4\u5148\u751f\u6210\u9aa8\u67b6\uff0c\u518d\u5bf9\u751f\u6210\u7ed3\u679c\u505a\u5de5\u7a0b\u8bca\u65ad\u3002<code>scaffold</code> \u53ea\u5199\u7a7a\u76ee\u6807\u76ee\u5f55\uff0c\u975e\u7a7a\u6216\u51b2\u7a81\u76ee\u6807\u4f1a\u88ab\u62d2\u7edd\u4e14\u4e0d\u88ab\u89e6\u78b0\uff1b<code>check</code> \u53ea\u8bca\u65ad\u4e0d\u4fee\u590d\u3002\u9a8c\u8bc1\u4ee5 <code>check</code> \u9000\u51fa\u7801 0 \u4e3a\u901a\u8fc7\u3002</p>"},{"location":"quickstart/#\u5b58\u91cf\u9879\u76ee\u53ea\u8bfb\u76d8\u70b9\u517c\u5bb9\u5165\u53e3","title":"\u5b58\u91cf\u9879\u76ee\uff1a\u53ea\u8bfb\u76d8\u70b9\uff08\u517c\u5bb9\u5165\u53e3\uff09","text":"<p>\u76ee\u6807\u662f\u5148\u770b\u6e05\u5b58\u91cf\u4ed3\u80fd\u5426\u91c7\u7528\uff0c\u4e0d\u6539\u52a8\u4efb\u4f55\u5b57\u8282\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> \u8f93\u51fa\u73b0\u72b6\u3001\u76ee\u6807 Profile\u3001\u7cbe\u786e\u5199\u96c6\u3001\u51b2\u7a81\u4e0e\u65e7\u5b9e\u73b0\u9000\u51fa\u6e05\u5355\uff0c\u4e14\u5bf9\u8f93\u5165\u4ed3\u5b57\u8282\u96f6\u53d8\u5316\u3002<code>check</code> \u53ea\u505a\u53ea\u8bfb\u8bca\u65ad\u3002\u786e\u8ba4\u76d8\u70b9\u7ed3\u679c\u540e\u518d\u51b3\u5b9a\u662f\u5426\u6267\u884c\u5199\u5165\u3002</p>"},{"location":"quickstart/#\u67b6\u6784\u8bbe\u8ba1\u8005\u5224\u5b9a\u5f52\u5c5e","title":"\u67b6\u6784\u8bbe\u8ba1\u8005\uff1a\u5224\u5b9a\u5f52\u5c5e","text":"<p>\u76ee\u6807\u662f\u5224\u65ad\u4e00\u4e2a\u67b6\u6784\u9700\u6c42\u8be5\u843d\u5728 Foundation \u54ea\u4e00\u5c42\uff0c\u8fd8\u662f\u7559\u5728\u6d88\u8d39\u8005\u3002</p> <ol> <li>\u8bfb <code>docs/agents/architecture-routing.md</code> \u7684\u516b\u6b65\u51b3\u7b56\u987a\u5e8f\u3002</li> <li>\u5728 <code>docs/agents/capability-catalog.json</code> \u6309 <code>layer</code> \u4e0e <code>intent</code> \u627e\u5230\u80fd\u529b\uff0c\u8bfb\u5b83\u7684 <code>entrypoints</code>\u3001<code>sideEffects</code>\u3001<code>failureSemantics</code>\u3001<code>ownedByCaller</code>\u3002</li> <li>\u9700\u8981\u53d1\u5e03\u3001\u4efb\u52a1\u751f\u547d\u5468\u671f\u6216\u5236\u54c1\u5173\u7cfb\u65f6\uff0c\u5206\u522b\u8f6c release-skill\u3001loop-agent\u3001artifact-graph\u3002</li> </ol> <p>\u8def\u7531\u7684\u786c\u8fb9\u754c\uff1aFoundation \u4e0d\u62e5\u6709\u8fdc\u7aef\u5199\u5165\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u4e0e\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\u3002\u843d\u5165 <code>keep-business</code> \u6216 <code>foundation-gap</code> \u7684\u80fd\u529b\u4e0d\u5f3a\u884c\u6269\u5f20 Foundation\u3002</p>"},{"location":"quickstart/#\u6743\u5a01\u4e8b\u5b9e\u4e0e\u89c4\u8303","title":"\u6743\u5a01\u4e8b\u5b9e\u4e0e\u89c4\u8303","text":"<ul> <li>\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u7248\u672c\u3001\u5305\u96c6\u5408\u3001\u955c\u50cf\u5750\u6807\u3001\u95e8\u7981\uff09\uff1a\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u552f\u4e00\u72b6\u6001\u9875\uff0c\u672c\u9875\u4e0d\u590d\u5236\uff09\u3002</li> <li>\u5f00\u53d1\u4e0e\u63d0\u4ea4\u89c4\u8303\uff1aGit \u751f\u547d\u5468\u671f\u6307\u5357\u3002</li> </ul>"},{"location":"quickstart/#\u8def\u5f84\u5bf9\u7167","title":"\u8def\u5f84\u5bf9\u7167","text":"\u8bfb\u8005 \u8d77\u70b9 \u4e0b\u4e00\u6b65 \u65b0\u9879\u76ee <code>scaffold</code> <code>check</code> \u2192 \u63a5\u5165 Profile \u5b58\u91cf\u9879\u76ee <code>adopt-plan</code> \u5206\u7c7b\uff08direct-adoption / compatibility-layer / keep-business / foundation-gap\uff09\u2192 \u91c7\u7528 \u67b6\u6784\u8bbe\u8ba1\u8005 \u8def\u7531\u51b3\u7b56 \u80fd\u529b\u76ee\u5f55 \u2192 \u771f\u5b9e\u5bfc\u51fa\u4e0e\u6d4b\u8bd5"},{"location":"setup/","title":"\u5b89\u88c5\u4e0e\u73af\u5883","text":""},{"location":"setup/#\u5fc5\u9700\u73af\u5883","title":"\u5fc5\u9700\u73af\u5883","text":"\u5de5\u5177 \u7248\u672c \u9501\u5b9a\u70b9 Node.js 22.22.2\uff08\u9501\u5b9a major 22 \u5e76\u7cbe\u786e\u63d0\u9ad8 floor\uff1a<code>&gt;=22.22.2 &lt;23</code>\uff09 <code>.node-version</code>\uff08\u53d6\u7cbe\u786e floor\uff09\u3001\u6839\u4e0e\u5404\u53f6\u5b50\u5305 <code>package.json</code> \u7684 <code>engines.node</code>\uff1bfloor \u7531 <code>scripts/engine-floor-check.mjs</code> \u4ece\u56fa\u5b9a\u6839 devDependencies \u7684 engines \u5b9e\u65f6\u91cd\u7b97\uff0cfact-check J \u8282\u7ed1\u5b9a\u6587\u6863\u8868\u9762 pnpm 10.30.0 <code>package.json</code> \u7684 <code>packageManager</code> projen 0.101.23 <code>package.json</code> \u7684 <code>devDependencies.projen</code>\uff08\u7cbe\u786e\u7248\u672c\uff0c\u65e0\u8303\u56f4\u7b26\u53f7\uff09 Git \u8fd1\u5e74\u7248\u672c\u5373\u53ef \u4ec5\u5f00\u53d1\u8005\u81ea\u884c\u7ba1\u7406\u7248\u672c\uff1b\u672c\u4ed3\u811a\u672c\u4e0d\u6267\u884c Git \u5199\u64cd\u4f5c <p>\u5de5\u5177\u7248\u672c\u4e0e\u9501\u5b9a\u70b9\u767b\u8bb0\u5728 <code>.foundation/version-lock.json</code>\uff08projen \u751f\u6210\u7684\u673a\u5668\u771f\u6e90\uff0c\u7981\u6b62\u624b\u6539\uff09\u3002\u5347\u7ea7\u6d41\u7a0b\u89c1 <code>scripts/README.md</code>\u3002</p>"},{"location":"setup/#\u5b89\u88c5\u4f9d\u8d56","title":"\u5b89\u88c5\u4f9d\u8d56","text":"<pre><code>pnpm install\n</code></pre> <p><code>.npmrc</code> \u542f\u7528 <code>save-exact=true</code>\uff0c\u65b0\u589e\u4f9d\u8d56\u4e5f\u4f1a\u4ee5\u7cbe\u786e\u7248\u672c\u5199\u5165\u3002</p>"},{"location":"setup/#\u5408\u6210\u4e0e\u68c0\u67e5","title":"\u5408\u6210\u4e0e\u68c0\u67e5","text":"<pre><code>pnpm synth\npnpm check\n</code></pre> <ul> <li><code>pnpm synth</code> \u518d\u751f\u6210 projen \u53d7\u7ba1\u6587\u4ef6\u3002\u53d7\u7ba1\u6587\u4ef6\u53ea\u80fd\u901a\u8fc7\u4fee\u6539 <code>.projenrc.js</code> \u95f4\u63a5\u53d8\u66f4\uff1b\u624b\u5199\u6e90\u7801\u3001\u6587\u6863\u548c fixture \u4e0d\u4f1a\u88ab synth \u8986\u76d6\u3002</li> <li><code>pnpm check</code> \u662f\u5f53\u524d\u7edf\u4e00\u6839\u95e8\u7981\uff1a11 \u4e2a\u7a33\u5b9a\u95e8\u7981 ID \u6309\u56fa\u5b9a\u987a\u5e8f\u4e32\u8054\u6267\u884c\uff0c\u4efb\u4e00\u6b65\u9aa4\u975e 0 \u5373\u6574\u4f53\u5931\u8d25\uff1b\u672c\u4ed3\u6ca1\u6709\u4efb\u4f55 CI/CD workflow\uff0c\u5168\u90e8\u95e8\u7981\u90fd\u5728\u79c1\u6709\u5de5\u4f5c\u533a\u5185\u8fd0\u884c\u3002\u4e0b\u65b9\u533a\u5757\u7531\u6839 <code>package.json</code> \u7684 <code>scripts.check</code> \u673a\u68b0\u6295\u5f71\uff08<code>node scripts/docs/fact-check.mjs</code> \u9010\u5b57\u6838\u5bf9\uff0c\u7981\u6b62\u624b\u5199\u6e05\u5355\u518d\u6b21\u6ede\u540e\uff09\uff1a</li> </ul> <ol> <li>pnpm run check:structure</li> <li>pnpm run check:packages</li> <li>pnpm run check:profiles</li> <li>pnpm run check:public-boundary</li> <li>pnpm run check:scaffold</li> <li>pnpm run check:docs</li> <li>pnpm run check:public-snapshots</li> <li>pnpm run check:release-artifacts</li> <li>pnpm run check:projen</li> <li>pnpm run check:integration</li> <li>pnpm run check:artifacts</li> </ol> <ul> <li>\u53d1\u5e03\u5b57\u8282\u5408\u540c\u7531\u4e24\u4e2a\u56fa\u5b9a\u5165\u53e3\u627f\u8f7d\uff1a<code>pnpm run release-artifacts:build</code>\uff08\u6784\u5efa\u5019\u9009\u4ea7\u7269\uff09\u4e0e <code>pnpm run release-artifacts:verify</code>\uff08\u6309\u5408\u540c\u6821\u9a8c\uff09\uff0c\u63a5\u53e3\u4e0e\u62d2\u7edd\u77e9\u9635\u8be6\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u3002</li> <li>\u8017\u65f6\u7684 Python \u6587\u6863\u77e9\u9635\u4e0d\u5c5e\u4e8e <code>pnpm check</code>\uff1a\u5b83\u6709\u72ec\u7acb\u5165\u53e3 <code>node scripts/docs/verify-matrix.mjs</code>\uff08\u77e9\u9635\u7248\u672c\u8986\u76d6\u7531\u8be5\u811a\u672c\u5bf9\u7167 <code>scripts/docs/toolchain.json</code> \u673a\u68b0\u6838\u5bf9\uff1b\u672c\u4ed3\u65e0 CI\uff0c\u77e9\u9635\u4e0d\u58f0\u660e\u5728\u4efb\u4f55\u5de5\u4f5c\u6d41\u91cc\uff09\u3002</li> </ul> <p>\u5176\u4f59\u547d\u4ee4\uff1a<code>pnpm test</code>\uff08\u4ec5\u6d4b\u8bd5\uff09\u3001<code>pnpm drift</code>\uff08\u53ea\u8bfb synth \u6f02\u79fb\u68c0\u67e5\uff09\u3001<code>pnpm synth-idempotency</code>(\u5e42\u7b49\u6027\u9a8c\u8bc1)\u3001<code>pnpm fixtures-projen</code>\uff08projen \u53cd\u4f8b fixture\uff09\u3002</p>"},{"location":"setup/#\u6587\u6863\u7ad9\u70b9Material-for-MkDocs","title":"\u6587\u6863\u7ad9\u70b9\uff08Material for MkDocs\uff09","text":"<p>\u6587\u6863\u7ad9\u70b9\u9501\u5b9a mkdocs 1.6.1 \u4e0e Material for MkDocs 9.7.7\u3002\u4f9d\u8d56\u9501\u662f <code>pip-compile --generate-hashes</code> \u751f\u6210\u7684\u5b8c\u6574\u5185\u5bb9\u9501\uff08\u5168\u90e8\u9876\u5c42\u4e0e\u4f20\u9012\u4f9d\u8d56\u90fd\u5e26 SHA-256 hash\uff09\uff0c\u89c1 <code>scripts/docs/requirements.txt</code>\uff08\u4eba\u5de5\u8f93\u5165\u53ea\u6709\u540c\u76ee\u5f55\u7684 <code>requirements.in</code>\uff09\uff1b\u5de5\u5177\u94fe\u771f\u6e90\u89c1 <code>scripts/docs/toolchain.json</code>\u3002Python 3.10 \u6216\u66f4\u9ad8\u5373\u53ef\uff08<code>node scripts/docs/verify-matrix.mjs</code> \u5728\u6700\u4f4e\u7248 3.10 \u4e0e tested 3.14 \u4e0a\u90fd\u4f1a\u7528\u5168\u65b0\u865a\u62df\u73af\u5883\u590d\u73b0\u5b89\u88c5\u4e0e\u4e25\u683c\u6784\u5efa\uff09\u3002</p> <p>\u7ea6\u5b9a\uff1a\u4e0d\u505a\u7cfb\u7edf\u7ea7 pip install\uff0c\u865a\u62df\u73af\u5883\u5fc5\u987b\u5efa\u5728\u4ed3\u5e93\u5916\u90e8\u3002\u539f\u56e0\u662f\u6839 <code>pnpm check</code> \u4f1a\u5bf9\u5168\u4ed3\u505a\u672c\u5730\u7edd\u5bf9\u8def\u5f84\u5b57\u8282\u626b\u63cf\uff08\u89c1 <code>node scripts/check-structure.mjs</code>\uff09\uff0c\u800c macOS/Windows \u4e0a\u7684\u865a\u62df\u73af\u5883\u5185\u90e8\u5d4c\u6709\u672c\u673a\u7edd\u5bf9\u8def\u5f84\uff0c\u653e\u8fdb\u4ed3\u5e93\u4f1a\u9020\u6210\u8bef\u62a5\u3002</p> <p>\u5b89\u88c5\u547d\u4ee4\u7edf\u4e00\u4f7f\u7528 <code>--require-hashes</code>\uff08\u5185\u5bb9\u9501\u8981\u6c42\u9010\u6761\u6821\u9a8c hash\uff09\uff1a</p> <pre><code># \u5728\u4ed3\u5e93\u5916\u90e8\u521b\u5efa\u865a\u62df\u73af\u5883\uff08\u8def\u5f84\u53ef\u6309\u9700\u66ff\u6362\uff0c\u793a\u4f8b\u7528\u7236\u76ee\u5f55\uff09\npython3 -m venv ../docs-site-venv\n\n# \u7528\u54c8\u5e0c\u9501\u5b89\u88c5\u9501\u5b9a\u7248\u672c\uff08\u5b57\u8282\u4e0d\u7b26\u4f1a\u76f4\u63a5\u5931\u8d25\uff09\n../docs-site-venv/bin/pip install --require-hashes -r scripts/docs/requirements.txt\n\n# \u4e25\u683c\u6a21\u5f0f\u6784\u5efa\uff08\u4efb\u4f55\u8b66\u544a\u90fd\u4f1a\u5931\u8d25\uff09\uff0c\u8f93\u51fa\u5230 site/\uff08\u5df2\u88ab .gitignore \u5ffd\u7565\uff09\n../docs-site-venv/bin/mkdocs build --strict\n\n# \u672c\u5730\u9884\u89c8\uff08\u53ef\u9009\uff09\n../docs-site-venv/bin/mkdocs serve\n</code></pre> <p>\u79bb\u7ebf\u73af\u5883\u5b89\u88c5\uff08\u56fa\u5b9a\u6d41\u7a0b\uff09\uff1a\u5728\u7ebf\u673a\u5668\u53ea\u4e0b\u8f7d wheelhouse\uff0c\u79bb\u7ebf\u5b89\u88c5\u5fc5\u987b\u8fdb\u5165\u4e00\u4e2a\u4ece\u672a\u5728\u7ebf\u5b89\u88c5\u8fc7\u7684\u65b0 offline venv\u2014\u2014\u590d\u7528\u5728\u7ebf venv \u65e0\u6cd5\u8bc1\u660e\u79bb\u7ebf\u94fe\u8def\u53ef\u7528\uff1a</p> <pre><code># 1. \u5728\u7ebf\u673a\u5668\uff1a\u4e0b\u8f7d wheelhouse\uff08\u4e0b\u8f7d\u540c\u6837\u9010\u6761\u6821\u9a8c hash\uff1b\u672c\u6b65\u4e0d\u5b89\u88c5\u5230\u4efb\u4f55 venv\uff09\npython3 -m pip download --require-hashes -r scripts/docs/requirements.txt -d ../docs-wheels\n\n# 2. \u79bb\u7ebf\u673a\u5668\uff1a\u65b0\u5efa\u4e00\u4e2a\u4ece\u672a\u5728\u7ebf\u5b89\u88c5\u8fc7\u7684 offline venv\uff08\u8def\u5f84\u53ef\u6309\u9700\u66ff\u6362\uff0c\u4e0d\u5f97\u590d\u7528 ../docs-site-venv\uff09\npython3 -m venv ../docs-site-offline-venv\n\n# 3. \u5b8c\u5168\u79bb\u7ebf\u5b89\u88c5\uff1a\u4e0d\u8bbf\u95ee\u4efb\u4f55\u7d22\u5f15\uff0c\u53ea\u4ece wheelhouse \u89e3\u6790\uff0c\u7ee7\u7eed\u9010\u6761\u6821\u9a8c hash\uff08\u5b57\u8282\u4e0d\u7b26\u76f4\u63a5\u5931\u8d25\uff09\n../docs-site-offline-venv/bin/pip install --no-index --find-links ../docs-wheels --require-hashes -r scripts/docs/requirements.txt\n\n# 4. \u4e25\u683c\u6a21\u5f0f\u6784\u5efa\uff08\u4efb\u4f55\u8b66\u544a\u90fd\u4f1a\u5931\u8d25\uff09\n../docs-site-offline-venv/bin/mkdocs build --strict\n</code></pre>"},{"location":"setup/#\u516c\u5f00\u9759\u6001\u7ad9render-public-sitemjs","title":"\u516c\u5f00\u9759\u6001\u7ad9\uff08render-public-site.mjs\uff09","text":"<p>\u516c\u5f00\u9759\u6001\u7ad9\u662f\u672c\u4ed3\u6587\u6863\u7ad9\u7684\u516c\u5f00\u5b50\u96c6\uff0c\u552f\u4e00\u7531 <code>scripts/render-public-site.mjs</code> \u7528\u4e0a\u8ff0\u51bb\u7ed3 MkDocs \u73af\u5883\u6e32\u67d3\uff1a</p> <ul> <li>\u811a\u672c\u53ea\u53d1\u73b0\u5e76\u6821\u9a8c\u51bb\u7ed3\u865a\u62df\u73af\u5883\uff08<code>SKILL_FAMILY_DOCS_VENV</code>\uff0c\u6216\u6309\u672c\u8282\u6b65\u9aa4\u5efa\u7684 <code>../docs-site-venv</code> / <code>../docs-site-offline-venv</code>\uff09\uff0c\u81ea\u8eab\u4e0d\u505a\u4efb\u4f55\u5b89\u88c5\uff1b</li> <li>\u6267\u884c\u4e24\u6b21 strict \u6784\u5efa\u5e76\u8981\u6c42\u6811\u54c8\u5e0c\u4e00\u81f4\uff08\u786e\u5b9a\u6027\uff09\uff0c\u968f\u540e\u590d\u7528 <code>scripts/leak-scan.mjs</code> \u6838\u5fc3\u4e0e <code>scripts/leak-policy.json</code> \u505a\u5185\u5bb9\u6cc4\u6f0f\u626b\u63cf\uff1b</li> <li><code>--write</code> \u53ea\u5199 <code>docs/public/site/**</code> \u4e0e <code>docs/public/site-baseline.json</code>\uff1b<code>--check</code> \u96f6\u5199\u5165\u91cd\u7b97\u5e76\u6bd4\u5bf9\u57fa\u7ebf\uff1b<code>--self-test</code> \u8fd0\u884c\u4e3b\u52a8\u53cd\u4f8b\u81ea\u6d4b\uff1b</li> <li>symlink\u3001\u7279\u6b8a\u6587\u4ef6\u3001\u8d8a\u754c realpath\u3001\u5355\u6587\u4ef6\u8d85\u9650\u4e0e\u4e0d\u786e\u5b9a\u8f93\u51fa\u4e00\u5f8b\u62d2\u7edd\uff1b\u57fa\u7ebf\u7981\u6b62\u624b\u6539\uff08\u6e32\u67d3\u5668\u662f\u552f\u4e00\u5199\u5165\u9762\uff09\u3002</li> </ul> <pre><code>node scripts/render-public-site.mjs --write\nnode scripts/render-public-site.mjs --check\n</code></pre> <p>\u7ad9\u70b9\u6587\u4ef6\u4e0e engineering-kit public \u53d1\u5e03\u955c\u50cf\u4ed3\u7684 <code>docs/**</code> \u9010\u6587\u4ef6\u5bf9\u5e94\uff08\u6620\u5c04\u7531\u53d1\u5e03\u914d\u7f6e\u6267\u884c\uff0c\u672c\u4ed3\u4e0d\u76f4\u63a5\u5199\u955c\u50cf\uff09\uff1bPages \u5b9e\u4f8b\u662f\u5426\u5728\u7ebf\u662f\u53d1\u5e03\u540e\u9a8c\u8bc1\u4e8b\u5b9e\uff0c\u53e3\u5f84\u552f\u4e00\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u3002</p>"},{"location":"setup/#\u6587\u6863\u4e8b\u5b9e\u4e0e\u94fe\u63a5\u68c0\u67e5","title":"\u6587\u6863\u4e8b\u5b9e\u4e0e\u94fe\u63a5\u68c0\u67e5","text":"<p>\u6587\u6863\u4e2d\u7684\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\u4e0e\u95e8\u7981\u4e8b\u5b9e\u7531\u786e\u5b9a\u6027\u811a\u672c\u5bf9\u7167\u673a\u5668\u771f\u6e90\u6821\u9a8c\uff0c\u94fe\u63a5\u7531\u72ec\u7acb\u811a\u672c\u89e3\u6790\uff1a</p> <pre><code>node scripts/docs/fact-check.mjs\nnode scripts/docs/link-check.mjs\n</code></pre> <p><code>fact-check.mjs</code> \u662f Node \u811a\u672c\uff0c\u7ecf\u4ed3\u5185\u6a21\u5757\uff08<code>scripts/engine-floor-check.mjs</code>\uff09\u6d88\u8d39\u6839\u76ee\u5f55\u7cbe\u786e\u9501\u5b9a\u7684 <code>semver@7.8.5</code>\uff0c\u8fd0\u884c\u524d\u5fc5\u987b\u5148\u5b8c\u6210 <code>pnpm install --frozen-lockfile</code>\uff1b<code>link-check.mjs</code> \u4e3a\u7eaf Node \u5b9e\u73b0\uff08\u65e0\u7b2c\u4e09\u65b9\u4f9d\u8d56\uff09\u3002\u4e24\u8005\u9000\u51fa\u7801 0 \u8868\u793a\u901a\u8fc7\u3002\u811a\u672c\u804c\u8d23\u89c1 <code>scripts/docs/README.md</code>\u3002</p>"},{"location":"agents/","title":"\u4e2d\u6587 \u00b7 \u667a\u80fd\u4f53\u5165\u53e3","text":"<p>English</p>"},{"location":"agents/#\u9762\u5411\u667a\u80fd\u4f53\u7684\u6587\u6863\u5165\u53e3","title":"\u9762\u5411\u667a\u80fd\u4f53\u7684\u6587\u6863\u5165\u53e3","text":"<p>\u672c\u76ee\u5f55\u662f Skill Family Foundation \u7ed9\u667a\u80fd\u4f53\uff08Agent\uff09\u7528\u7684\u51b3\u7b56\u5165\u53e3\u3002\u4eba\u7c7b\u8bfb\u8005\u4ece\u6839 <code>README.md</code> \u8fdb\u5165\uff1b\u667a\u80fd\u4f53\u5728\u6709\u9650\u4e0a\u4e0b\u6587\u91cc\u5148\u8bfb\u8fd9\u91cc\uff0c\u518d\u6309\u610f\u56fe\u8df3\u5230\u5177\u4f53\u80fd\u529b\uff0c\u907f\u514d\u901a\u8bfb\u5168\u90e8\u6e90\u7801\u3002</p> <p>Foundation \u4e0d\u62e5\u6709\u4e1a\u52a1\u8bed\u4e49\u3002\u5b83\u53ea\u63d0\u4f9b\u4e09\u4ef6\u4e8b\uff1a\u673a\u5668\u5951\u7ea6\uff08Contracts\uff09\u3001Node \u8584\u673a\u5236\u8fd0\u884c\u65f6\uff08Harness\uff09\u3001\u5de5\u7a0b\u9636\u6bb5\u7684\u56db\u4e2a\u547d\u4ee4\uff08Engineering Kit\uff09\uff0c\u4ee5\u53ca\u6a2a\u5411\u58f0\u660e\u5dee\u5f02\u7684 Profile\u3002\u9886\u57df\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u3001\u53d1\u5e03\u8fdc\u7aef\u5199\u5165\u3001\u5ba1\u8ba1\u8bed\u4e49\u90fd\u7559\u5728\u8c03\u7528\u65b9\u6216\u5176\u4ed6\u9879\u76ee\u3002</p>"},{"location":"agents/#\u9605\u8bfb\u987a\u5e8f","title":"\u9605\u8bfb\u987a\u5e8f","text":"<p>\u667a\u80fd\u4f53\u6309\u4e0b\u9762\u7684\u987a\u5e8f\u53d6\u7528\uff0c\u4e0d\u5fc5\u4ece\u5934\u8bfb\u5230\u5c3e\uff1a</p> <ol> <li><code>capability-catalog.json</code> \u2014\u2014 \u5168\u90e8\u7a33\u5b9a\u4e0e candidate \u80fd\u529b\u7684\u673a\u5668\u4e8b\u5b9e\u76ee\u5f55\uff0c\u662f\u5224\u65ad\u300c\u8be5\u9700\u6c42\u662f\u5426\u5c5e\u4e8e Foundation\u3001\u843d\u5728\u54ea\u4e00\u5c42\u3001\u7528\u54ea\u4e2a\u5165\u53e3\u300d\u7684\u8d77\u70b9\u3002</li> <li><code>architecture-routing.md</code> \u2014\u2014 \u4ece\u67b6\u6784\u610f\u56fe\u5230\u5c42/\u80fd\u529b/\u5165\u53e3/\u5916\u90e8\u9879\u76ee\u7684\u51b3\u7b56\u8868\u4e0e\u51b3\u7b56\u6811\u3002</li> <li><code>capability-catalog.schema.json</code> \u2014\u2014 \u76ee\u5f55\u81ea\u8eab\u7684\u7ed3\u6784\u5408\u540c\uff0c\u6821\u9a8c\u5668\u4e0e\u6295\u5f71\u90fd\u4f9d\u8d56\u5b83\u3002</li> <li>\u6839 <code>README.md</code> \u7684 Agent Quick Reference \u2014\u2014 \u53ea\u505a\u8def\u7531\uff0c\u4e0d\u590d\u5236 API\u3002</li> <li>\u4e09\u4e2a\u5305 README \u7684 Agent Quick Reference \u2014\u2014 \u7cbe\u786e\u5230\u5305\u7ea7\u80fd\u529b\u548c\u5931\u8d25\u8fb9\u754c\u3002</li> <li><code>../reference/failure-and-side-effect-matrix.md</code> \u2014\u2014 \u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u7684\u8bfb\u5199/spawn/Git/\u7f51\u7edc/\u6b8b\u4f59\u72b6\u6001/\u9519\u8bef\u7801\u3002</li> <li><code>../reference/api/README.md</code> \u2014\u2014 \u4e09\u5305\u516c\u5171 API \u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\uff0c\u6309\u5165\u53e3\u7ed9\u51fa\u7b7e\u540d\u3001\u8f93\u5165/\u8f93\u51fa\u3001\u7eaf\u51fd\u6570\u6027\u3001\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code>/<code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1b\u4e0e catalog \u80fd\u529b ID \u4e92\u94fe\u3002</li> </ol> <p>\u4e8b\u5b9e\u4f18\u5148\u7ea7\uff1a\u672c\u6587\u6863\u53ea\u6d88\u8d39\u673a\u5668\u771f\u6e90\uff08package.json\u3001src/index.mjs\u3001CLI\u3001registry.json\u3001profile descriptor\uff09\u3002\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\u3001\u652f\u6301\u72b6\u6001\u90fd\u4ece\u771f\u6e90\u590d\u7b97\uff0c\u4e0d\u4ece\u8bb0\u5fc6\u6216\u65e7\u6587\u6863\u7167\u642c\u3002</p>"},{"location":"agents/#\u76ee\u5f55\u5408\u540c","title":"\u76ee\u5f55\u5408\u540c","text":"<p><code>docs/agents/</code> \u4e0b\u7684\u6587\u4ef6\u627f\u62c5\u4e0d\u540c\u804c\u8d23\uff0c\u4e0d\u4e92\u76f8\u91cd\u590d\uff1a</p> \u6587\u4ef6 \u89d2\u8272 \u8c01\u8be5\u6539 <code>capability-catalog.json</code> \u673a\u5668\u53ef\u8bfb\u7684\u80fd\u529b\u4e8b\u5b9e\uff0c\u6587\u6863\u5c42\u552f\u4e00\u4e8b\u5b9e\u9762 \u80fd\u529b\u53d8\u5316\u65f6\u6539\uff0c\u5e76\u7ecf <code>capability-catalog-check.mjs</code> \u6821\u9a8c <code>capability-catalog.schema.json</code> \u76ee\u5f55\u7ed3\u6784\u5408\u540c \u7ed3\u6784\u53d8\u5316\u65f6\u624d\u6539 <code>architecture-routing.md</code> \u610f\u56fe \u2192 \u5c42/\u80fd\u529b/\u5165\u53e3/\u5916\u90e8\u9879\u76ee\u7684\u51b3\u7b56 \u8def\u7531\u88c1\u51b3\u53d8\u5316\u65f6\u6539 <code>README.md</code>\uff08\u672c\u6587\u4ef6\uff09 \u667a\u80fd\u4f53\u603b\u5165\u53e3\u4e0e\u9605\u8bfb\u987a\u5e8f \u5165\u53e3\u7ed3\u6784\u53d8\u5316\u65f6\u6539 <code>../reference/api/README.md</code> \u53ca\u4e09\u5305\u9875 \u516c\u5171 API \u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\uff0ccatalog \u80fd\u529b\u7684\u7b7e\u540d\u7ea7\u5c55\u5f00 \u771f\u5b9e\u5bfc\u51fa\u53d8\u5316\u65f6\u6539\uff0c\u5e76\u4e0e <code>capability-catalog-check.mjs</code> \u540c\u6b65 <p>capability catalog \u4e0d\u662f Contracts \u7684\u65b0\u516c\u5171\u5bf9\u8c61\uff0c\u4e5f\u4e0d\u662f\u7b2c\u56db\u7c7b\u767b\u8bb0\u8868\u3002\u5b83\u53ea\u662f\u6587\u6863\u5c42\u7684\u673a\u5668\u4e8b\u5b9e\uff0c\u907f\u514d README \u5f62\u6210\u7b2c\u4e8c\u5957\u4f1a\u6f02\u79fb\u7684\u624b\u5199\u6743\u5a01\u3002</p>"},{"location":"agents/#\u67b6\u6784\u8bbe\u8ba1\u5de5\u4f5c\u6cd5","title":"\u67b6\u6784\u8bbe\u8ba1\u5de5\u4f5c\u6cd5","text":"<p>\u667a\u80fd\u4f53\u5904\u7406\u4e00\u4e2a Foundation \u76f8\u5173\u9700\u6c42\u65f6\uff0c\u6309\u4e0b\u9762\u56db\u6b65\u63a8\u8fdb\uff1a</p> <ol> <li>\u5148\u5224\u5f52\u5c5e\u3002\u8be5\u9700\u6c42\u662f\u5426\u542b\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1 oracle\uff1f\u82e5\u662f\uff0c\u7559\u5728\u6d88\u8d39\u8005\uff0c\u53ea\u628a\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\u63a5 Foundation\u3002</li> <li>\u518d\u5224\u5206\u5c42\u3002\u7ed3\u6784/\u534f\u8bae/\u7a33\u5b9a\u9519\u8bef\u7801/\u5bf9\u8c61 Schema \u843d Contracts\uff1b\u8de8\u6280\u80fd\u65cf\u53ef\u590d\u7528\u7684 Node \u673a\u5236\u843d Harness\uff1bscaffold/adopt/projection/check \u6216\u5177\u4f53 Profile \u6ce8\u5165\u843d Kit/Profile\u3002</li> <li>\u67e5\u76ee\u5f55\u5b9a\u5165\u53e3\u3002\u5728 <code>capability-catalog.json</code> \u6309 <code>layer</code> \u4e0e <code>intent</code> \u627e\u5230\u80fd\u529b\uff0c\u8bfb\u5b83\u7684 <code>entrypoints</code>\u3001<code>sideEffects</code>\u3001<code>failureSemantics</code>\u3001<code>ownedByCaller</code>\u3001<code>routeElsewhere</code>\u3002</li> <li>\u9a8c\u8bc1\u636e\u518d\u4e0b\u7ed3\u8bba\u3002\u76ee\u5f55\u6bcf\u6761\u80fd\u529b\u90fd\u5e26 <code>sourceRefs</code> \u4e0e <code>positiveTestRefs</code>/<code>negativeTestRefs</code>\uff0c\u6539\u52a8\u5224\u65ad\u524d\u5148\u56de\u5230\u8fd9\u4e9b\u771f\u6e90\u786e\u8ba4\uff0c\u4e0d\u51ed\u76ee\u5f55\u6563\u6587\u63a8\u65ad\u3002</li> </ol> <p>\u8def\u7531\u8fb9\u754c\u7684\u786c\u89c4\u5219\uff1aFoundation \u4e0d\u62e5\u6709\u8fdc\u7aef\u5199\u5165\uff08\u5f52 release-skill\uff09\u3001\u4e0d\u62e5\u6709\u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5\uff08\u5f52 loop-agent\uff09\u3001\u4e0d\u62e5\u6709\u5236\u54c1\u5173\u7cfb\u4e0e context\uff08\u5f52 artifact-graph\uff09\u3001\u4e0d\u62e5\u6709\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\uff08\u5f52\u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\uff09\u3002\u8be6\u60c5\u89c1 <code>architecture-routing.md</code> \u7684\u8def\u7531\u8868\u3002</p> <p>candidate \u9879\u7684 <code>entrypoints</code> \u59cb\u7ec8\u7ed9\u51fa\u89c4\u8303\u5165\u53e3\u3002\u82e5\u540c\u65f6\u5b58\u5728 <code>legacyEntrypoints</code>\uff0c\u8868\u793a\u8fd9\u662f 0.10.0 \u4ee5\u524d\u5f62\u6210\u7684\u5386\u53f2\u503a\u52a1\uff0c \u6d88\u8d39\u8005\u9700\u8fc1\u79fb\u4e00\u6b21\uff1b\u8fc1\u79fb\u540e\u4ec5\u664b\u5347 stable \u4e0d\u518d\u6539\u5408\u540c\u8eab\u4efd\u3002\u6d88\u8d39\u8005\u4ecd\u9700\u66f4\u65b0\u7cbe\u786e pin \u624d\u80fd\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\u3002 0.10.0 \u4ee5\u540e\u65b0 candidate \u7684\u80fd\u529b ID\u3001\u5165\u53e3\u3001Schema <code>$id</code> \u4e0e operation \u90fd\u4e0d\u5f97\u7f16\u7801\u6210\u719f\u5ea6\u3002</p>"},{"location":"agents/#\u4e0e\u673a\u68b0\u95e8\u7981\u7684\u5173\u7cfb","title":"\u4e0e\u673a\u68b0\u95e8\u7981\u7684\u5173\u7cfb","text":"<p>\u4e24\u4e2a\u68c0\u67e5\u811a\u672c\u5b88\u62a4\u76ee\u5f55\u4e0e README \u4e0d\u6f02\u79fb\uff1a</p> <ul> <li><code>scripts/docs/capability-catalog-check.mjs</code> \u6821\u9a8c\u7ed3\u6784\u3001\u552f\u4e00 ID\u3001\u6e90/\u6d4b\u8bd5\u5f15\u7528\u5b58\u5728\u3001unsupported \u8fb9\u754c\u3001Kit \u56db\u547d\u4ee4\u672a\u6269\u5f20\u3002</li> <li><code>scripts/docs/agent-section-check.mjs</code> \u6821\u9a8c\u6839 README \u4e0e\u4e09\u4e2a\u5305 README \u7684\u56fa\u5b9a Agent Quick Reference \u7ae0\u8282\u3001\u5fc5\u542b\u5b50\u6807\u9898\u4e0e\u80fd\u529b ID \u94fe\u63a5\u3002</li> </ul> <p>\u4e8c\u8005\u90fd\u53ea\u62a5\u5f62\u72b6\u4e0d\u81ea\u52a8\u6539\u6587\uff1b\u8b66\u544a\u9879\u9700\u56de\u5230\u771f\u6e90\u4e0e\u58f0\u97f3\u4eba\u5de5\u5224\u65ad\u3002</p>"},{"location":"agents/architecture-routing/","title":"\u4e2d\u6587 \u00b7 \u67b6\u6784\u8def\u7531","text":"<p>English</p>"},{"location":"agents/architecture-routing/#\u67b6\u6784\u8def\u7531\u4ece\u610f\u56fe\u5230\u5c42\u80fd\u529b\u4e0e\u5916\u90e8\u9879\u76ee","title":"\u67b6\u6784\u8def\u7531\uff1a\u4ece\u610f\u56fe\u5230\u5c42\u3001\u80fd\u529b\u4e0e\u5916\u90e8\u9879\u76ee","text":"<p>\u672c\u9875\u628a\u300c\u4e00\u4e2a\u67b6\u6784\u9700\u6c42\u8be5\u843d\u5728\u54ea\u91cc\u300d\u6536\u655b\u6210\u53ef\u673a\u68b0\u590d\u7528\u7684\u51b3\u7b56\u987a\u5e8f\u4e0e\u8def\u7531\u8868\u3002\u5b83\u670d\u52a1\u4e8e\u65b0\u667a\u80fd\u4f53\u5728\u4e0d\u901a\u8bfb\u6e90\u7801\u7684\u524d\u63d0\u4e0b\uff0c\u5feb\u901f\u5f97\u5230\u53ef\u9a8c\u8bc1\u7b54\u6848\uff1a\u8be5\u9700\u6c42\u662f\u5426\u5c5e\u4e8e Foundation\u3001\u5e94\u843d\u5728 Contracts/Harness/Kit/Profile \u54ea\u4e00\u5c42\u3001\u7528\u54ea\u4e2a\u7a33\u5b9a\u5165\u53e3\u3001\u4ec0\u4e48\u8bed\u4e49\u4ecd\u7531\u8c03\u7528\u65b9\u62e5\u6709\u3001\u4f55\u65f6\u5e94\u8f6c\u4ea4\u5916\u90e8\u9879\u76ee\u3002</p>"},{"location":"agents/architecture-routing/#\u51b3\u7b56\u987a\u5e8f","title":"\u51b3\u7b56\u987a\u5e8f","text":"<p>\u6309\u7f16\u53f7\u4f9d\u6b21\u5224\u65ad\uff0c\u547d\u4e2d\u5373\u505c\uff1a</p> <ol> <li>\u662f\u5426\u542b\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1 oracle\uff1f \u82e5\u662f\uff0c\u7559\u5728\u6d88\u8d39\u8005\uff1bFoundation \u53ea\u63a5\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\u3002</li> <li>\u662f\u5426\u662f\u7ed3\u6784\u3001\u534f\u8bae\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u6216\u5bf9\u8c61 Schema\uff1f \u843d Contracts\uff08\u5951\u7ea6\u6743\u5a01\uff09\u3002</li> <li>\u662f\u5426\u662f\u8de8\u6280\u80fd\u65cf\u53ef\u590d\u7528\u7684 Node \u673a\u5236\uff1f \u843d Harness\uff08Contracts \u673a\u5236\u534f\u8bae\u7684 Node \u5b9e\u73b0\uff09\u3002</li> <li>\u662f\u5426\u662f\u5de5\u7a0b\u9636\u6bb5\u7684 scaffold/adopt-plan/projection/check\uff0c\u6216\u5177\u4f53 host Profile \u6ce8\u5165\uff1f \u843d Kit / Profile\u3002</li> <li>\u662f\u5426\u6d89\u53ca\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001\uff1f \u8f6c release-skill\u3002</li> <li>\u662f\u5426\u6d89\u53ca\u4efb\u52a1\u3001\u91cd\u8bd5\u3001\u8fd4\u5de5\u3001\u9a8c\u6536\u6216\u81ea\u8fed\u4ee3\uff1f \u8f6c loop-agent\u3002</li> <li>\u662f\u5426\u6d89\u53ca\u5236\u54c1\u5173\u7cfb\u3001context\u3001packet \u6216 version-lock\uff1f \u8f6c artifact-graph\u3002</li> <li>\u662f\u5426\u53ea\u6709\u4e00\u4e2a\u6d88\u8d39\u8005\uff0c\u6216\u5c1a\u672a\u8bc1\u660e\u8de8\u4e24\u4e2a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\uff1f \u9ed8\u8ba4\u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u6269\u5f20 Foundation\u3002</li> </ol> <p>\u7b2c 8 \u6b65\u662f\u6269\u5f20\u95f8\u95e8\u3002\u4efb\u4f55\u65b0\u589e\u7ec4\u4ef6\u90fd\u5fc5\u987b\u8bf4\u660e\uff1a\u5220\u9664\u5b83\u4f1a\u8ba9\u4e24\u4e2a\u4ee5\u4e0a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\u5b9e\u73b0\uff0c\u5e76\u7ecf\u72ec\u7acb fixture \u9a8c\u8bc1\u3002\u5426\u5219\u7559\u5728\u6d88\u8d39\u8005\u4fa7\u3002</p>"},{"location":"agents/architecture-routing/#\u8def\u7531\u8868","title":"\u8def\u7531\u8868","text":"<p>\u4e0b\u8868\u7ed9\u51fa\u5e38\u89c1\u67b6\u6784\u610f\u56fe\u7684\u9996\u9009\u80fd\u529b\u4e0e\u7981\u6b62\u8bef\u7528\u3002\u6bcf\u6761\u9996\u9009\u80fd\u529b\u90fd\u53ef\u5728 <code>capability-catalog.json</code> \u6309 id \u67e5\u5230\u5165\u53e3\u3001\u526f\u4f5c\u7528\u4e0e\u5931\u8d25\u8bed\u4e49\u3002</p> \u67b6\u6784\u610f\u56fe \u9996\u9009\u80fd\u529b \u7981\u6b62\u8bef\u7528 \u9a8c\u8bc1 Foundation \u5408\u540c\u5bf9\u8c61 Contracts / Harness validation\uff08<code>foundation.contracts.object-validation</code>\u3001<code>foundation.harness.contract-validation</code>\uff09 \u4e0d\u53d6\u4ee3\u6d88\u8d39\u8005\u4e1a\u52a1 Schema \u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u548c\u539f\u5b50\u5199 Harness path / atomic API\uff08<code>foundation.harness.path-containment</code>\u3001<code>foundation.harness.atomic-write</code>\uff09 \u4e0d\u628a\u6587\u4ef6\u9009\u62e9\u4e1a\u52a1\u89c4\u5219\u653e\u5165 Harness \u751f\u6210\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a Harness report \u6216 Kit report \u5b50\u52a8\u4f5c\uff08<code>foundation.harness.report</code>\u3001<code>foundation.kit.report</code>\uff09 \u4e0d\u4ece\u5f00\u653e\u4e1a\u52a1 outputs \u81ea\u7531\u7f16\u62a5\u544a \u6301\u4e45\u4e8b\u4ef6\u548c\u6d3e\u751f snapshot Harness state-store\uff08<code>foundation.harness.state-store</code>\uff09 \u4e0d\u5728 Foundation \u5b9a\u4e49 workflow \u72b6\u6001\u673a \u65b0\u9879\u76ee\u9aa8\u67b6 Kit scaffold\uff08<code>foundation.kit.scaffold</code>\uff09 \u4e0d\u8986\u76d6\u975e\u7a7a\u5b58\u91cf\u4ed3 \u5b58\u91cf\u91c7\u7528\u76d8\u70b9 Kit adopt-plan\uff08<code>foundation.kit.adopt-plan</code>\uff09 \u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u81ea\u52a8\u8fc1\u79fb \u53d7\u7ba1\u6295\u5f71 Kit projection + Profile\uff08<code>foundation.kit.projection</code>\uff09 \u4e0d\u8986\u76d6 handwritten \u6587\u4ef6 \u5de5\u7a0b\u8bca\u65ad Kit check\uff08<code>foundation.kit.check</code>\uff09 \u4e0d\u81ea\u52a8\u4fee\u590d \u53d1\u5e03 release-skill Foundation \u4e0d\u62e5\u6709\u8fdc\u7aef\u5199\u5165 \u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5 loop-agent Foundation \u4e0d\u62e5\u6709\u4e1a\u52a1\u72b6\u6001\u673a \u5236\u54c1\u5173\u7cfb/\u7248\u672c\u9501 artifact-graph Foundation \u4e0d\u62e5\u6709\u5236\u54c1\u56fe"},{"location":"agents/architecture-routing/#\u5206\u5c42\u5b9a\u4f4d\u901f\u67e5","title":"\u5206\u5c42\u5b9a\u4f4d\u901f\u67e5","text":"<p>\u4f9d\u8d56\u65b9\u5411\u56fa\u5b9a\u4e3a Contracts \u2192 Harness \u2192 Engineering Kit\uff1bProfile \u6a2a\u5411\u58f0\u660e\uff0c\u516c\u5171\u6838\u5fc3\u4e0d\u53cd\u5411\u4f9d\u8d56\u5177\u4f53 Profile\u3002</p> <ul> <li>Contracts\uff1a\u7ed3\u6784\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001\u534f\u8bae\u540d\u767b\u8bb0\uff1b18 \u7c7b\u9876\u5c42\u5bf9\u8c61\u30019 \u6761 mandatory rule\u3002</li> <li>Harness\uff1aContracts \u7684 Node \u8584\u673a\u5236\u8fd0\u884c\u65f6\uff1b\u53ea\u5b9e\u73b0\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\uff0c\u4e0d\u62e5\u6709\u8bed\u4e49\u3002</li> <li>Engineering Kit\uff1a\u56db\u4e2a\u5de5\u7a0b\u547d\u4ee4\uff08scaffold\u3001adopt-plan\u3001projection\u3001check\uff09\u53ca\u5176\u53ea\u8bfb/\u53d7\u9650\u5199\u5165\u8fb9\u754c\u3002</li> <li>Profile\uff1a\u5bbf\u4e3b\u4e0e\u9879\u76ee\u5f62\u6001\u5dee\u5f02\u7684\u58f0\u660e\u5f0f SPI\uff1b\u53ea\u5b9e\u73b0\u7a33\u5b9a SPI\uff0c\u4e0d\u6ce8\u5165\u4e1a\u52a1\u8bed\u4e49\u3002</li> <li>\u5916\u90e8\u9879\u76ee\uff1arelease-skill\uff08\u53d1\u5e03\uff09\u3001loop-agent\uff08\u4efb\u52a1\u751f\u547d\u5468\u671f\uff09\u3001artifact-graph\uff08\u5236\u54c1\u5173\u7cfb\uff09\u3001\u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\uff08\u9886\u57df\u8bed\u4e49\uff09\u3002</li> </ul>"},{"location":"agents/architecture-routing/#\u5178\u578b\u8bef\u8def\u7531\u4e0e\u7ea0\u6b63","title":"\u5178\u578b\u8bef\u8def\u7531\u4e0e\u7ea0\u6b63","text":"<ul> <li>\u8bef\u628a\u9886\u57df Schema \u8def\u7531\u5230 Foundation\uff1a\u9886\u57df Schema \u7531\u6d88\u8d39\u8005\u62e5\u6709\uff0cFoundation \u53ea\u63d0\u4f9b\u901a\u7528\u6821\u9a8c\u673a\u5236\uff08<code>foundation.contracts.object-validation</code>\uff09\u3002</li> <li>\u8bef\u628a workflow \u72b6\u6001\u673a\u8def\u7531\u5230 Foundation\uff1astate-store \u53ea\u63d0\u4f9b\u4e8b\u4ef6\u65e5\u5fd7\u4e0e\u5feb\u7167\u5e95\u5ea7\uff0creducer \u8f6c\u79fb\u4e0e\u7ec8\u6001\u7531\u8c03\u7528\u65b9\u62e5\u6709\uff08<code>foundation.unsupported.business-state-machine</code>\uff09\u3002</li> <li>\u8bef\u628a\u53d1\u5e03\u5199\u5165\u8def\u7531\u5230 Foundation\uff1a\u8fdc\u7aef\u5199\u5165\u5f52 release-skill\uff0cFoundation \u4e0d\u542b\u4efb\u4f55 publish/remote-write \u5165\u53e3\uff08<code>foundation.unsupported.remote-publish</code>\uff09\u3002</li> <li>\u8bef\u628a\u5ba1\u8ba1 oracle \u8def\u7531\u5230 Foundation\uff1a\u5ba1\u8ba1\u8868\u9762\u53ea\u505a\u786e\u5b9a\u6027\u5e8f\u5217\u5316\uff0c\u9886\u57df\u7ed3\u8bba\u5c5e\u5916\u90e8\u5ba1\u9605\uff08<code>foundation.unsupported.domain-audit-semantics</code>\uff09\u3002</li> </ul> <p>\u8def\u7531\u5224\u65ad\u7684\u8bda\u5b9e\u8fb9\u754c\uff1a\u7ed3\u6784\u68c0\u67e5\u53ea\u8bc1\u660e\u5b57\u8282/\u7ed3\u6784\u4e00\u81f4\u6027\uff08\u4ed3\u5185\u53ef\u8bc1\uff09\uff1b\u666e\u901a\u6b63\u6587\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\u7ed3\u8bba\u5c5e\u4e8e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff0c\u4e0d\u5728\u76ee\u6807\u4ed3\u5185\u7ef4\u62a4\u7b2c\u4e8c\u4efd\u95e8\u7981\u3002</p>"},{"location":"en/","title":"English \u00b7 Home","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/#Skill-Family-Foundation-Workspace","title":"Skill Family Foundation Workspace","text":"<p>The shared engineering-infrastructure parent workspace for the Skill Family lifecycle. This repository provides the machine contracts (Contracts), the thin Node runtime (Harness), the engineering kit (Engineering Kit), the Profile SPI, fully fictional generic sample fixtures, and the engineering documentation skeleton.</p>"},{"location":"en/#Current-Status","title":"Current Status","text":"<p>This repository is a first-version skeleton under development. Dynamic state such as versions, releases, Pages, and Git is recorded solely in Current Product Status; the license is approved as Apache License 2.0, with the copyright holder being \u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8 (Guangzhou Fenghe Technology Co., Ltd.). The full text is in the root-level <code>LICENSE</code>.</p> <p>This workspace is permanently private and is the single source of truth for development; the only public boundary consists of three versioned release mirrors and the npm tarball. The pinned consumer coordinates and release status are recorded solely in Current Product Status.</p> <p>The single product-level status page is Current Product Status, mechanically verified by <code>node scripts/docs/fact-check.mjs</code> against the machine source of truth; other pages do not carry a second status caliber.</p>"},{"location":"en/#First-Version-Composition","title":"First-Version Composition","text":"Component Path Responsibility Contracts <code>packages/skill-family-contracts</code> Sole authority for machine-executable engineering structure and mechanism protocols Harness <code>packages/skill-family-harness-node</code> Implements only the mechanism protocols defined by Contracts; owns no business semantics Engineering Kit <code>packages/skill-family-engineering-kit</code> Provides only the four top-level commands <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, <code>check</code> Profile seed <code>profiles/public-plugin</code> Profile seed in the form of a public plugin Fictional sample <code>fixtures/generic-profile-extension-conformance</code> A fully fictional extension-conformance sample <p>The package manifest, Profiles, fixtures, and top-level commands use <code>.foundation/skeleton-manifest.json</code> as the machine source of truth; tool version locks are in <code>.foundation/version-lock.json</code>.</p>"},{"location":"en/#Documentation-Map","title":"Documentation Map","text":"<ul> <li>Setup and Environment \u2014 tool version pinning, installation, and documentation site build</li> <li>Quickstart \u2014 the shortest path from local verification to a trial run</li> <li>Capabilities and Diagnostics \u2014 the Kit's four commands, exit codes, and troubleshooting</li> <li>Architecture Boundaries \u2014 layering, single source of truth, budget, and documentation fact-check</li> <li>Current Product Status \u2014 the single product status page</li> <li>Git Lifecycle Guide \u2014 authorized boundaries for branches, commits, pushes, and releases</li> </ul>"},{"location":"en/#Writing-Boundaries","title":"Writing Boundaries","text":"<p>Documentation consumes only a frozen fact package composed of the machine source of truth (manifest, package.json, Contracts registry, etc.), mechanically verified by <code>node scripts/docs/fact-check.mjs</code>. Model names, credentials, and scheduling information do not enter documentation, nor do they enter Contracts; see Architecture Boundaries.</p>"},{"location":"en/architecture/","title":"English \u00b7 Architecture","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/architecture/#Architecture-Boundaries","title":"Architecture Boundaries","text":"<p>This page is the stable architecture projection of Skill Family Foundation for users. It explains only structure, responsibilities, boundaries, and routing; it does not carry dynamic release state (release state is recorded solely in <code>docs/status/current.md</code> and mechanically verified by <code>scripts/docs/fact-check.mjs</code>). All versions, commands, package counts, and support states are recomputed from the machine source of truth.</p>"},{"location":"en/architecture/#Layers","title":"Layers","text":"<p>The layering established by the 2026-08-09 architecture hand-off (FND-ADR-001~007, active, see <code>artifacts/decisions/</code>): a vertical dependency chain of four layers, with horizontal capability attachments, and no new vertical layers added.</p> <pre><code>Skill Family business (per-product repositories: release-skill, loop-agent, skill-eval, etc.)\n \u2502 depends on\n \u25bc\nEngineering Kit (scaffold / adopt-plan / projection / check)\n \u2502 depends on\n \u25bc\nHarness Node (Contracts mechanism-protocol implementation)\n \u2502 depends on\n \u25bc\nContracts (structure, protocols, error codes, protocol-name registry)\n \u25b2\n \u2514---------------- independent Audit consumer\n\nHorizontal (attachment surfaces, no new vertical layers):\n- profiles/ declarations of host and project-shape differences; implements only the stable SPI\n- host external AI coding runtime environment: owns semantics; Foundation unifies structural differences\n- release-skill release state and all remote writes; does not enter Foundation\n- Artifact Graph the `artifacts/` architecture artifact system; its gate is check:artifacts\n</code></pre> <p>The same Git workspace also contains <code>packages/foundation-adoption-review/</code>. It is an independent Plugin release unit and public-mirror source. Starting with 0.17.0, its version number aligns with Foundation while the historical 0.1.0 release remains unchanged. It consumes Foundation's public facts, but it is not part of the Contracts \u2192 Harness \u2192 Engineering Kit dependency chain and does not count as a fourth Foundation mechanism package. Its public closure is restricted by that release unit's own allowlist; the root's private plans, artifacts, tests, and other documents do not enter the Plugin mirror.</p> <p>Arrows point to the depended-upon party. The public core must not depend in reverse on a concrete Profile or a concrete skill family; where a new capability's dependency direction lands is specified in <code>artifacts/design/FND-DES-001.md</code>, and asset-by-asset ownership is in FND-ADR-002.</p>"},{"location":"en/architecture/#Responsibility-Matrix","title":"Responsibility Matrix","text":"<p>Each layer assumes only the responsibilities listed below; out-of-scope capabilities are owned by external projects or consumers.</p> Layer Owns Does not own (lands elsewhere) Contracts Structure, protocols, error codes, protocol-name registry; 46 top-level object kinds; 9 mandatory rules Business-field semantics, domain auditing, remote writes, model generation Harness Node mechanism implementation of Contracts; path containment, atomic write, closures, request handling, report rendering, host-access mechanism, state substrate Business semantics, workflow orchestration, model invocation, git writes, network remotes Engineering Kit The four engineering commands and their read-only / restricted-write boundaries; host sub-action injection of concrete Profiles Auto-fix, auto-migration, remote release, a fifth command Profile Declarative SPI for host and project-shape differences; implements only the stable SPI Business semantics, executable-script entry points, public-core changes release-skill Release state and all remote writes Foundation contains no publish/remote-write entry point loop-agent Tasks, retries, rework, acceptance, self-iteration Foundation does not define a workflow state machine Artifact Graph Artifact relationships, context, packet, version-lock Foundation does not own the artifact graph Audit Independent fixtures, expected values, adjudication Domain-semantic conclusions are owned by external review"},{"location":"en/architecture/#Capability-Ownership-Algorithm","title":"Capability Ownership Algorithm","text":"<p>Given an architecture requirement, decide ownership in the following order, stopping at the first match:</p> <ol> <li>Contains domain semantics, a business state machine, or an audit oracle \u2192 keep it with the consumer; connect only business-neutral mechanisms.</li> <li>Is structure, a protocol, a stable error code, or an object Schema \u2192 Contracts.</li> <li>Is a Node mechanism reusable across skill families \u2192 Harness.</li> <li>Is scaffold/adopt-plan/projection/check or a concrete host Profile injection \u2192 Kit / Profile.</li> <li>Involves publishing remote state \u2192 release-skill.</li> <li>Involves tasks/retries/rework/acceptance \u2192 loop-agent.</li> <li>Involves artifact relationships / version-lock \u2192 artifact-graph.</li> <li>Has only one consumer, or has not been proven to repeat across two real consumers \u2192 keep it with the consumer; do not expand Foundation.</li> </ol> <p>Step 8 is the expansion gate: a new component must justify that deleting it would force two or more real consumers to re-implement it, and this must be verified by an independent fixture; admission gate 1 additionally requires at least one existing real consumer plus one structurally isomorphic foreseeable consumer (the second consumer need not be live, but its need must be expressible with the same structure; adjustment record in FND-ADR-009). Step 9 is the finite-closed-semantics gate (FND-ADR-001 gate 8): a capability carrying limited domain semantics must satisfy either \u2014 its semantics are covered by a small stable closed enumeration, or it is a deterministic estimation primitive whose algorithm, scope, and bias direction are declared in the contract; this gate does not cancel gate 2's \"semantics-free\" veto. The machine-readable version is in <code>docs/agents/architecture-routing.md</code>.</p>"},{"location":"en/architecture/#Trust-and-Side-Effect-Boundaries","title":"Trust and Side-Effect Boundaries","text":"<p>Foundation's trust assumptions and side-effect conventions are solidified per layer; callers judge risk accordingly:</p> <ul> <li>Contracts: pure functions, no file/Git/network/process side effects; error codes are frozen and do not drift (<code>foundation.contracts.error-codes</code>).</li> <li>Harness: the mechanism layer reads and writes only within contained paths; <code>HARNESS_EXCLUSIONS</code> excludes release-state, remote-network-access, business-semantics, workflow-orchestration, model-calls, git-writes (<code>foundation.harness.errors</code>).</li> <li>Engineering Kit: <code>FORBIDDEN_SIDE_EFFECTS</code> includes git-init/commit/push/tag, publish, remote-write; <code>REFUSED_MUTATION_FLAGS</code> are refused at the CLI entry point (<code>foundation.kit.cli</code>).</li> <li>Profile: declarative differences; the entry point must be a JSON data resource; <code>coreOwned</code> (packages/commands/namespacePrefixes) is a forbidden target (<code>foundation.profile.extension-spi</code>).</li> <li>State substrate: the event log is the sole authority, and the snapshot is a derived cache; <code>confirmOwnerTerminated</code> is an external trust anchor provided by the caller, and does not promise resistance against same-privilege malicious processes (<code>foundation.harness.state-store</code>).</li> </ul>"},{"location":"en/architecture/#Architecture-Decision-Tree","title":"Architecture Decision Tree","text":"<pre><code>Requirement contains domain semantics/state machine/audit? \u2500\u2500yes\u2500\u2500\u25b6 keep with consumer\n \u2502no\nIs it structure/protocol/error code/Schema? \u2500\u2500yes\u2500\u2500\u25b6 Contracts\n \u2502no\nIs it a Node mechanism across skill families? \u2500\u2500yes\u2500\u2500\u25b6 Harness\n \u2502no\nIs it scaffold/adopt/projection/check or Profile injection? \u2500\u2500yes\u2500\u2500\u25b6 Kit / Profile\n \u2502no\nInvolves publishing remote state? \u2500\u2500yes\u2500\u2500\u25b6 release-skill\n \u2502no\nInvolves tasks/retries/rework/acceptance? \u2500\u2500yes\u2500\u2500\u25b6 loop-agent\n \u2502no\nInvolves artifact relationships/version-lock? \u2500\u2500yes\u2500\u2500\u25b6 artifact-graph\n \u2502no\nOnly one consumer / not proven across two real consumers? \u2500\u2500yes\u2500\u2500\u25b6 keep with consumer, do not expand\n \u2502no\nCarries limited domain semantics? \u2500\u2500yes\u2500\u2500\u25b6 finite closed semantics: covered by a\n \u2502 stable closed enumeration, or a deterministic estimation\n \u2502 primitive (algorithm/scope/bias declared in the contract)\n \u2502 \u2192 admissible; otherwise keep with consumer\n \u2502 (FND-ADR-001 gate 8; does not cancel gate 2's veto)\n \u2502no\n \u2500\u2500\u25b6 admissible\n</code></pre>"},{"location":"en/architecture/#Routing-Relationships-with-External-Projects","title":"Routing Relationships with External Projects","text":"<p>Foundation is not an all-powerful base. The following responsibilities are explicitly outside Foundation:</p> <ul> <li>Release and remote writes: owned by release-skill; Foundation provides no publish/remote-write entry point (<code>foundation.unsupported.remote-publish</code>).</li> <li>Task lifecycle: owned by loop-agent (tasks, retries, rework, acceptance); Foundation contains no workflow state machine (<code>foundation.unsupported.business-state-machine</code>).</li> <li>Artifact governance: artifact-graph owns the <code>artifacts/</code> relationship contract and version-lock; its gate is <code>check:artifacts</code>.</li> <li>Domain auditing: an independent audit consumer owns the semantics and final accept/reject; Foundation provides only a deterministic audit surface (<code>foundation.unsupported.domain-audit-semantics</code>).</li> <li>Host application and lifecycle: Hosts own their semantics and lifecycle behavior. Foundation only unifies structural differences through bounded host identity/alias resolution, contained local projection, bound reads, atomic writes, and fixed-driver constrained verification. Only a Descriptor with <code>support=supported</code> can make <code>planHost</code> produce an install/update plan with <code>status=planned</code>; a <code>support=manual</code> host such as Qoder receives an empty <code>status=manual</code> plan, and <code>applyHostPlan</code> returns <code>rejected</code> with <code>publicationState=not-attempted</code> for it. <code>applyHostPlan</code> executes only <code>status=planned</code> plans; install/update still requires digest binding, a verified build, and explicit authorization, while uninstall returns <code>manual-recovery-required</code> without deleting files. Real-host verification uses six closed built-in drivers with fixed-argument, fresh, constrained calls and <code>existing-user-state + host-managed</code>. The skill family (caller) interprets business results and performs final domain acceptance from infrastructure observations and business answers. Qoder's Descriptor is <code>manual</code>, and <code>qodercli-print-v1</code> is a <code>candidate</code> real-verification driver. WorkBuddy and CodeBuddy use separate drivers and discovery layouts. Post-publish plugin discovery, installation, updates, marketplace operations, and release state in real user environments are managed by release-skill.</li> </ul>"},{"location":"en/architecture/#Capability-Identity-and-Maturity","title":"Capability Identity and Maturity","text":"<p>Capability identity and maturity are separate dimensions (FND-ADR-016). Consumers of historical <code>./candidate/**</code> entrypoints migrate once to the canonical entrypoints introduced in 0.10.0, while the old entrypoints remain same-source compatibility surfaces during deprecation. Capabilities introduced from 0.10.0 onward use their final canonical entrypoint, Schema <code>$id</code>, and operation from the first candidate release. Stable promotion changes the compatibility promise only and does not trigger another source or contract-identity migration. A consumer must still update all three exact package pins to obtain a newly published stable promise. Existing package-identity, source-digest, and provenance bindings continue to determine whether a Bundle rebuild is required; the maturity label does not add a separate rebuild condition.</p> <p>The physical <code>candidate/</code> directory is not an architecture layer and does not determine public stability. The Contracts machine policy and capability-catalog <code>stability</code> field are authoritative. Removing a historical entrypoint requires a separate major-version decision and consumer-exit evidence; it cannot be bundled into promotion.</p>"},{"location":"en/architecture/#Next-Phase-Capability-Lines-Architecture-Hand-off","title":"Next-Phase Capability Lines (Architecture Hand-off)","text":"<p>All three capability lines were included via the FND-ADR-001 capability admission-gate adjudication and all land within the existing layers:</p> <ul> <li>Host-access line (FND-FR-001/FND-FR-002/FND-FR-008/FND-FR-009): Contracts registers descriptor/source/manifest/probe/plan/receipt and peer-verification request/result; Harness implements generic source closure, contained local projection, atomic build/materialize, probe classification, and read-only peer verification; Kit injects the concrete Profile and six closed built-in drivers, including <code>qodercli-print-v1</code>, separate WorkBuddy and CodeBuddy drivers, and three other registered drivers. Only a Descriptor with <code>support=supported</code> can yield an install/update plan with <code>status=planned</code>; manual hosts receive an empty <code>status=manual</code> plan, and <code>applyHostPlan</code> returns <code>rejected</code> / <code>not-attempted</code>. The public API retains <code>planHost</code> / <code>applyHostPlan</code>; a planned install/update still requires digest binding, a verified build, and explicit authorization, while uninstall remains non-destructive and requires manual recovery. Callers create, provide, and exclusively own the fresh roots and clean up their outer <code>temporaryRoot</code>; Foundation creates and retains only the tracked session root beneath it. Foundation validates canonical/fresh paths, containment, overlap isolation, digest and Descriptor/driver binding, then runs the fixed-argument constrained call. These path checks are boundaries, not an OS sandbox. Callers use the infrastructure observations and business answers for final domain acceptance. Qoder's Descriptor is <code>manual</code>, and <code>qodercli-print-v1</code> is a <code>candidate</code> real-verification driver; WorkBuddy and CodeBuddy keep separate drivers and discovery layouts. Post-publish plugin discovery, installation, updates, marketplace operations, and release state in real user environments remain release-skill responsibilities.</li> <li>Durable state-substrate line (FND-FR-003, FND-ADR-004): append-only events, hash chain, snapshots, and verification recovery; provides only the state substrate, not business semantics such as state machines, task nodes, retries, terminal states, or memory.</li> <li>Human-report line (FND-FR-004, FND-ADR-005): a two-layer contract \u2014 machine results are the sole source of truth, and the human report is deterministically rendered from machine results (Markdown + digest binding + graded checks), not freely authored.</li> <li>Finite-closed-semantics tools line (FND-ADR-009): baseline materialization + contentGuard (digest mismatch, mid-materialization change, and guard rejection all fail closed), generic read chokepoint (allowed-root set + optional identity predicate), strategy-driven surface scan (policy contract + injection self-test), token upper-bound estimation (deterministic estimation primitive with no model/network/tokenizer dependency), and a generic upper-bound guard (reusing the state-store event ledger and token-lock; the bound and over-limit policy are consumer-configured).</li> </ul> <p>The three mechanism-package structure is preserved and a fourth mechanism package is not split out (FND-ADR-007); the independent Plugin release unit in the same workspace does not change this dependency chain. Artifact governance uses the artifact-graph CLI and version-lock (FND-ADR-006).</p>"},{"location":"en/architecture/#First-Version-Budget","title":"First-Version Budget","text":"<ul> <li>Top-level Contracts objects: 46 kinds, including <code>plugin-verification-request</code>, <code>plugin-verification-result</code>, <code>filesystem-tree-observation</code>, <code>executable-identity-observation</code>, <code>skill-family-directory-verification-request</code>, <code>skill-family-directory-verification-result</code>, and <code>engineering-baseline</code>, with <code>packages/skill-family-contracts/src/registry.json</code> as the sole source of truth;</li> <li>Kit top-level commands: 4 (scaffold, adopt-plan, projection, check);</li> <li>Mandatory mechanical rules: currently 9, budget not exceeding 20, absolute ceiling 30; CR-001 uniformly compiles all Schemas within the registry;</li> <li>Leaf packages: 3 (skill-family-contracts, skill-family-harness-node, skill-family-engineering-kit);</li> <li>Schema validator: Ajv 8.20.0 (exact version pin), supporting both draft-07 and 2020-12 dialects;</li> <li>kernel protocol: skill-family.kernel.operation (stable), Contracts specification 1.14.0; the Kernel document remains at its 1.8.0 lifecycle coordinate and byte baseline;</li> <li>Default runtime language: Node; first-version implementations in a second language: 0.</li> </ul> <p>Any new component must justify the two-or-more real-consumer re-implementation that deleting it would cause, and be verified by an independent fixture.</p>"},{"location":"en/architecture/#Machine-Source-of-Truth-and-File-Classification","title":"Machine Source of Truth and File Classification","text":"Source of truth Content <code>.foundation/skeleton-manifest.json</code> Package manifest, Profiles, fixtures, top-level commands <code>.foundation/version-lock.json</code> Exact versions and lock points for projen, pnpm, Node <code>.foundation/file-registry.json</code> Registration of managed / handwritten / artifact file classes <code>package.json</code> and <code>packages/*/package.json</code> Versions, commands, dependencies (all projen-managed) <code>packages/skill-family-contracts/src/registry.json</code> Protocol-name and Schema $id registry <code>scripts/release-artifact-contract.json</code> Fixed three-package release byte contract (members, required items, and content-digest rules) <p>Managed files can only be modified via <code>.projenrc.js</code> and regenerated by running <code>pnpm synth</code>; handwritten files (including all documentation) are not overwritten by synth. The authoritative classification is in <code>.foundation/file-registry.json</code>.</p>"},{"location":"en/architecture/#Documentation-System-and-Fact-Check","title":"Documentation System and Fact-Check","text":"<p>The documentation system aims to eliminate manual drift through deterministic checks:</p> <ol> <li>Frozen fact package: documentation writing consumes only the machine sources of truth listed in the table above. Models or authors must not write versions, commands, or package counts from memory; model names, credentials, and scheduling information do not enter documentation, nor do they enter Contracts.</li> <li>Fact-check: <code>node scripts/docs/fact-check.mjs</code> verifies package names, commands, gate facts, version pins, and key numbers in the documentation against the source of truth, and cross-checks consistency across sources (manifest vs package.json, version-lock vs packageManager, rule count vs budget, etc.).</li> <li>Link-check: <code>node scripts/docs/link-check.mjs</code> resolves in-repo relative links and heading anchors across the README and all <code>docs/**/*.md</code>, and verifies that <code>mkdocs.yml</code> nav is complete.</li> <li>No-workflow boundary and public-boundary verification: this repository has no CI/CD workflow at all (the old topology's three Actions \u2014 ci/docs/docs-deploy \u2014 have been entirely deleted); all gates run within the private workspace (<code>pnpm check</code>); the public boundary is mechanically verified by <code>check:public-snapshots</code> and the release byte contract. The public static site is rendered by <code>scripts/render-public-site.mjs</code> (with the sole output <code>docs/public/site/**</code> and the deterministic baseline <code>docs/public/site-baseline.json</code>).</li> <li>Version lock: the site toolchain is locked in <code>scripts/docs/toolchain.json</code> and <code>scripts/docs/requirements.txt</code>; the build uses only an out-of-repo Python virtual environment, with no system-level pip install.</li> </ol> <p>Both check scripts can be run directly via <code>node scripts/docs/&lt;name&gt;.mjs</code>: <code>fact-check.mjs</code> consumes the root-pinned <code>semver@7.8.5</code> via in-repo modules and requires <code>pnpm install --frozen-lockfile</code> to be completed first; <code>link-check.mjs</code> is a pure Node implementation. See <code>scripts/docs/README.md</code> for responsibilities.</p>"},{"location":"en/architecture/#Stable-Product-Gates","title":"Stable Product Gates","text":"<p>The root <code>pnpm check</code> orchestrates only the 11 stable product gate IDs (<code>check:structure</code>~<code>check:artifacts</code>, each ID listed in Current Product Status), and no longer hard-pins the original command list; each stable ID composes a few product checks within its own package script. Gate facts are mechanically derived by <code>node scripts/docs/fact-check.mjs</code> from the root <code>package.json</code>'s <code>scripts.check</code> and verified verbatim. Documentation and setup invoke or list only the 11 stable IDs or the root <code>pnpm check</code>, and do not duplicate the underlying command list.</p> <p>The honest boundary of in-repo checks: structural checks only prove \"byte/structural consistency (provable in-repo)\"; one-time migration completeness, ordinary prose semantics, and the final accept/reject conclusion belong to the responsibility of external review; no second gate registry, baseline, or command comparator is maintained within the target repository.</p>"},{"location":"en/examples-and-fixtures/","title":"English \u00b7 Examples and fixtures","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/examples-and-fixtures/#Examples-and-Fixtures","title":"Examples and Fixtures","text":"<p>Foundation fixtures prove structural contracts and mechanism boundaries. They do not serve as an oracle for business correctness.</p>"},{"location":"en/examples-and-fixtures/#Fixture-Classes","title":"Fixture Classes","text":"<ul> <li>Positive fixtures provide valid input and must pass the declared contract or mechanism.</li> <li>Negative fixtures provide invalid input and must produce the stable failure code required by the contract.</li> <li>Dialect-boundary fixtures freeze expected behavior where draft-07 and 2020-12 JSON Schema handling differs.</li> </ul> <p>All published fixtures use fictional data. They must not contain a private Profile, real business data, credentials, user-specific paths, or consumer evidence.</p>"},{"location":"en/examples-and-fixtures/#Verification-Entry-Points","title":"Verification Entry Points","text":"Scope Verification entry point What it proves Contracts fixtures <code>packages/skill-family-contracts/test/fixtures.test.mjs</code> Registered fixture inputs and expected structural results still match; mismatch uses <code>SFC1010</code> Profile SPI conformance <code>fixtures/generic-profile-extension-conformance/verify.mjs</code> and <code>leak-scan.mjs</code> A fictional extension follows the stable SPI and public-data boundary Scaffold contract <code>fixtures/scaffold-conformance/verify.mjs</code> Generated skeleton bytes match the frozen contract Adoption hazards <code>fixtures/adoption/cases/</code> <code>adopt-plan</code> preserves its read-only boundary through before/after byte snapshots <p>These entry points are read-only or self-contained. They do not write a caller repository or access a remote service.</p>"},{"location":"en/examples-and-fixtures/#Oracle-Boundary","title":"Oracle Boundary","text":"<p>A fixture can prove that a contract was satisfied. It cannot prove that a business decision was correct. Domain state transitions, business acceptance, and audit conclusions remain with the consumer or an independent reviewer.</p> <p>The audit surface illustrates this boundary: Foundation can produce canonical JSON and a SHA-256 digest, while the caller still owns the meaning of the evidence and the final accept/reject decision.</p>"},{"location":"en/examples-and-fixtures/#Published-Example-Scope","title":"Published Example Scope","text":"<p>The public example surface includes the fictional <code>profiles/public-plugin</code> Profile and the generic conformance, scaffold, licensing, adoption, and minimal-consumer fixtures listed by the workspace manifest. Any private consumer fixture or real operational evidence remains outside the public release boundary.</p> <p>For capability selection, start with the agent documentation entry. For the exact machine facts behind an example, inspect the core capability catalog and its English overlay.</p>"},{"location":"en/help/","title":"English \u00b7 Capabilities and diagnostics","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/help/#Help-and-Triage","title":"Help and Triage","text":"<p>This page provides triage paths by error code, process exit code, and symptom. Foundation's error-code system is frozen in Contracts (<code>src/error-codes.json</code>) and does not drift; mechanism failures are unified as <code>SFC2004</code> with a stable <code>details.kind</code>.</p>"},{"location":"en/help/#Triage-by-Stable-Error-Code","title":"Triage by Stable Error Code","text":"Error code Name Meaning Handling SFC1001 SCHEMA_VALIDATION_FAILED Document failed target Schema validation Check the document's required fields and type constraints SFC1002 UNKNOWN_SCHEMA_ID <code>$id</code> is not registered in the registry Confirm the <code>$id</code> spelling and Contracts version SFC1003 DUPLICATE_SCHEMA_ID Duplicate <code>$id</code> registration refused Do not re-register; reuse the existing registration SFC1004 DUPLICATE_PROTOCOL_NAME Duplicate protocol name/version refused Do not re-register a protocol SFC1005 UNRESOLVED_REF <code>$ref</code> target cannot be resolved Check the <code>$ref</code> target SFC1006 UNSUPPORTED_DIALECT Dialect is not in the supported set Use only draft-07 / 2020-12 SFC1007 UNKNOWN_CHECK_TYPE Rule uses a check type outside the nine classes Do not define custom check types SFC1008 RULE_BUDGET_EXCEEDED Mandatory rule exceeded budget/ceiling Do not exceed 20 (absolute 30) SFC1009 UNKNOWN_ERROR_CODE Referenced an unregistered error code Reference only the frozen registry SFC1010 FIXTURE_EXPECTATION_MISMATCH Fixture behavior does not match expectation Check the fixture declaration SFC1011 UNKNOWN_PROTOCOL Referenced an unregistered protocol Confirm protocol name/version SFC1012 SCHEMA_COMPILE_FAILED The Schema itself cannot be compiled Check Schema syntax SFC2002 UNKNOWN_OPERATION Operation name is not in the frozen vocabulary Use only <code>validate</code> SFC2003 INVALID_PARAMS Parameters do not satisfy the params contract Check parameters SFC2004 EXECUTION_FAILED Mechanism execution failed See <code>details.kind</code> for the sub-classification SFC3001 REPORT_DIGEST_MISMATCH Report/result digest is inconsistent with the binding Recompute model/result SFC3002 REPORT_ELEMENT_MISSING Report is missing a mandatory element Complete the report fields SFC3003 REPORT_FACT_DRIFT Report bytes deviated from deterministic re-render Re-render from machine results"},{"location":"en/help/#Triage-by-Process-Exit-Code-Engineering-Kit","title":"Triage by Process Exit Code (Engineering Kit)","text":"Exit code Meaning Handling 0 Success / no findings No handling needed 1 <code>check</code> found findings Address the findings; Kit does not auto-fix 2 Refused / usage / mechanism error Check command name, parameters, and refused flags such as <code>--fix</code>"},{"location":"en/help/#Triage-by-Symptom","title":"Triage by Symptom","text":"<ul> <li>Validation keeps reporting SFC1002: <code>$id</code> is unregistered; first confirm the Contracts version and <code>$id</code> namespace.</li> <li>Path operation reports SFC2004 + <code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>: the path escaped the contained root; confirm the root-directory boundary, and do not cram business-selection rules into Foundation.</li> <li>Atomic write reports SFC2004 + <code>atomic-write-failed</code>: the target is out of bounds or the content type is illegal; check path containment and content type.</li> <li>State storage reports <code>store-locked</code>: an old writer may still hold the lock; confirm outside Foundation that the old writer has terminated, then call <code>recoverStateStoreLock</code> with the exact owner/fencing.</li> <li>CLI host apply fails immediately: Engineering Kit's <code>adopt-plan host-apply</code>, generic apply, and remote apply remain stably refused. The package API <code>applyHostPlan</code> is limited to digest-bound local install/update for registered hosts; executing an uninstall plan returns <code>manual-recovery-required</code> without deleting files. The full Qoder driver remains unsupported.</li> <li>Peer-adapter verification fails: <code>verifyHostPeers</code> accepts only hosts and path categories proved by registered Profiles. Any peer path, closure, byte, or <code>logicalMappings</code> mismatch fails closed and does not grant install or release status.</li> <li>Document versions/commands do not match the source of truth: rely on the recomputation result of <code>scripts/docs/fact-check.mjs</code>; do not revise from memory.</li> </ul>"},{"location":"en/help/#Project-Routing","title":"Project Routing","text":"<ul> <li>Publishing remote state / npm publish \u2192 release-skill.</li> <li>Tasks / retries / rework / acceptance \u2192 loop-agent.</li> <li>Artifact relationships / version-lock \u2192 artifact-graph.</li> <li>Domain-audit semantics \u2192 independent audit consumer.</li> <li>General structure / mechanism issues \u2192 this repository's <code>docs/architecture.md</code> and <code>docs/agents/</code>.</li> </ul>"},{"location":"en/help/#Command-Quick-Reference-and-Authoritative-Facts","title":"Command Quick Reference and Authoritative Facts","text":"<p>The Engineering Kit has only four top-level commands: <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, <code>check</code>. Of these, <code>check</code> only diagnoses and does not fix; the caller handles the findings.</p> <ul> <li>Current product status (versions, package set, mirror coordinates, gates): Current Product Status (the single status page).</li> <li>Development and commit specifications: Git Lifecycle Guide.</li> </ul>"},{"location":"en/licensing/","title":"English \u00b7 Licensing","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/licensing/#Licensing-and-identity","title":"Licensing and identity","text":"<p>This page explains how Skill Family Foundation adopts its license, the distinction between identity roles, and the current status of NOTICE and third-party attribution. It is not an official translation of the Apache License 2.0; the legal text of Apache-2.0 is the root-level <code>LICENSE</code>, and in case of any ambiguity the English original prevails.</p>"},{"location":"en/licensing/#License","title":"License","text":"<ul> <li>License: <code>Apache-2.0</code> (the SPDX identifier is unchanged).</li> <li>Legal text: the root-level <code>LICENSE</code> is the full Apache License 2.0 text (authoritative in English). This page and any Chinese material only explain how the license is adopted; they do not replace or restate the legal text and do not claim equal legal effect.</li> <li>The three leaf packages distribute a copy of the root <code>LICENSE</code> with the package.</li> </ul>"},{"location":"en/licensing/#Distinction-between-identity-roles","title":"Distinction between identity roles","text":"<p>The following four identities are independent; none may be inferred from or merged with another:</p> Role Value Notes Author / copyright holder Guangzhou Fenghe Technology Co., Ltd. (\u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8) The copyright owner; written into <code>package.json</code>'s <code>author</code> and the <code>LICENSE</code> appendix attribution Repository owner (GitHub owner) <code>ifoohoo</code> The GitHub organization/account; no inference relationship with the author npm publisher The account in the current publish configuration The npm publish identity; no inference relationship with author/owner Contributor copyright line The contributors attribution in the root <code>LICENSE</code> appendix A retained historical/contributor attribution, not the project author or copyright holder <p><code>author</code>, <code>repository.owner</code>, and <code>npm publisher</code> are recorded separately; none may be derived from another.</p>"},{"location":"en/licensing/#Project-level-NOTICE","title":"Project-level NOTICE","text":"<p>FND-ADR-008 adopts Option B following the user's explicit ruling on 2026-08-10. Foundation now maintains a root <code>NOTICE</code> containing the project name, the year 2026, and the copyright holder, \u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8 (Guangzhou Fenghe Technology Co., Ltd.). Starting with 0.2.1, the three public-unit mirrors, frozen snapshots, and npm tarballs must all distribute that file.</p> <p>The <code>open-source</code> Profile continues to declare <code>noticeRequired: true</code>. Engineering Kit continues to enforce the invariant between Apache-2.0 and the NOTICE requirement, and <code>checkIdentityDrift</code> continues to report <code>notice-missing</code> when the file is absent. This closure changes only Foundation's publish members; it does not alter the Kit's behavior for other consumers.</p> <p>Under Section 4(d) of the Apache License 2.0 in the root <code>LICENSE</code>, NOTICE content is informational and attributional; it does not modify the terms of the Apache License 2.0.</p>"},{"location":"en/licensing/#Third-party-attribution-THIRD_PARTY_NOTICES","title":"Third-party attribution (THIRD_PARTY_NOTICES)","text":"<p>The Engineering Kit public unit distributes MkDocs Material, lunr, and lunr-languages assets and already includes <code>packages/skill-family-engineering-kit/THIRD_PARTY_NOTICES</code> with the corresponding third-party license material. Third-party attribution remains covered by <code>THIRD_PARTY_NOTICES</code> and the corresponding license closure; the project-level <code>NOTICE</code> must not replace them. The <code>NOTICE</code> carries only Foundation's own project attribution and does not copy full third-party license texts.</p>"},{"location":"en/licensing/#License-boundary-between-the-private-workspace-and-public-mirrors","title":"License boundary between the private workspace and public mirrors","text":"<ul> <li>This workspace is permanently private and is the single source of development truth; the workspace itself never enters the public boundary.</li> <li>The public boundary consists only of three versioned publish mirrors and npm tarballs; they distribute the root <code>LICENSE</code> (Apache-2.0) and <code>NOTICE</code>. Engineering Kit additionally distributes <code>THIRD_PARTY_NOTICES</code> and the corresponding third-party license material.</li> <li>Profiles, fixtures, internal docs, and run evidence inside the private workspace do not enter the public packages; public docs only consume artifacts mechanically verified by the allowlist and release contract.</li> <li>Publish state and all remote writes belong to release-skill; this page does not duplicate live publish state.</li> </ul>"},{"location":"en/quickstart/","title":"English \u00b7 Quickstart","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/quickstart/#Quickstart","title":"Quickstart","text":"<p>This page gives ordinary developers three executable journeys: discovering capabilities and generating a new project, adopting an existing project, and querying one requirement during daily work. Each journey includes exact commands; architecture routing and API details live in the linked references.</p>"},{"location":"en/quickstart/#Shared-Installation-Prerequisite","title":"Shared Installation Prerequisite","text":"<p>For local candidate validation, build the three <code>0.14.0</code> tarballs from the Foundation workspace and install them into a temporary consumer. Run these commands from the Foundation workspace root:</p> <pre><code>pack_dir=\"$(mktemp -d)\"\n(cd packages/skill-family-contracts &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-harness-node &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-engineering-kit &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\nmkdir \"$pack_dir/consumer\" &amp;&amp; (cd \"$pack_dir/consumer\" &amp;&amp; npm init -y)\n(cd \"$pack_dir/consumer\" &amp;&amp; npm install \"$pack_dir/skill-family-contracts-0.14.0.tgz\" \"$pack_dir/skill-family-harness-node-0.14.0.tgz\" \"$pack_dir/skill-family-engineering-kit-0.14.0.tgz\")\n</code></pre> <p>After publication, install the exact coordinate <code>skill-family-engineering-kit@0.14.0</code>, then run the <code>npm exec</code> commands below.</p>"},{"location":"en/quickstart/#New-Project-Discover-Capabilities-and-Generate-a-Skeleton","title":"New Project: Discover Capabilities and Generate a Skeleton","text":"<p>Start by evaluating the project's uses, then select stable capabilities explicitly. <code>--list-capabilities</code> is read-only; the <code>--uses</code> file should contain problems, constraints, retained guarantees, and optional filters, never credentials or private business data.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --all --scope all --locale en --uses ./uses.json\nnpm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project --capability foundation.contracts.object-validation --capability foundation.harness.atomic-write\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p><code>supportedMatches</code> is candidate discovery only, and <code>needsDecision</code> means that the project still has to confirm the use. The command does not write a Profile or claim adoption. A successful <code>scaffold</code> means that the skeleton and contract-test wiring were written; the adapter, domain guarantee, and consumer tests remain to be completed.</p>"},{"location":"en/quickstart/#Existing-Project-Adopt-and-Complete-Migration","title":"Existing Project: Adopt and Complete Migration","text":"<p>Run read-only <code>adopt-plan</code> first, then record uses and one of the four decision dispositions in the migration manifest. Only <code>direct-adoption</code> and <code>compatibility-layer</code> may target a Foundation capability; <code>keep-business</code> and <code>foundation-gap</code> stay with the consumer.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale en --uses ./uses.json\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> writes no files and does not migrate automatically. Migration state <code>complete</code> means that the Profile, managed files, legacy exit, checks, and four evidence classes are all satisfied; it does not mean contract integration is complete. The consumer's adapter tests and domain gate must state that conclusion.</p>"},{"location":"en/quickstart/#Daily-Work-Query-One-Requirement","title":"Daily Work: Query One Requirement","text":"<p>When the capability ID is unknown, use a deterministic substring query in the intended language. An empty result is <code>no-text-match</code>; a result containing only unsupported capabilities is <code>boundary-found</code>. Neither result creates a <code>foundation-gap</code> decision.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --locale en --filter \"must not leave a partial file when a write fails\"\n</code></pre> <p>To establish real-host qualification, provide a complete request, bindings, and <code>--native</code> to the explicit qualification sub-action:</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p>The real qualification claim comes only from one explicit, bounded host execution. Candidate discovery, migration <code>complete</code>, and contract integration do not replace it.</p>"},{"location":"en/quickstart/#Legacy-Short-Path-Generate-a-Skeleton","title":"Legacy Short Path: Generate a Skeleton","text":"<p>If the project has already confirmed that a uses assessment is unnecessary, it can still generate a compliant skeleton directly.</p> <pre><code>npm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p>The commands above first generate a skeleton, then run engineering diagnostics on the generated result. <code>scaffold</code> writes only to an empty target directory; a non-empty or conflicting target is refused and not touched; <code>check</code> diagnoses only, it does not fix. Verification passes when <code>check</code> exits with code 0.</p>"},{"location":"en/quickstart/#Existing-Project-Read-Only-Inventory-Compatibility-Entry","title":"Existing Project: Read-Only Inventory (Compatibility Entry)","text":"<p>The goal is to first see whether the existing repository can be adopted, without changing any bytes.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> outputs the current state, target Profile, exact write set, conflicts, and the legacy-implementation exit list, with zero change to the input repository's bytes. <code>check</code> performs read-only diagnostics only. Decide whether to perform a write after confirming the inventory results.</p>"},{"location":"en/quickstart/#Architecture-Designer-Decide-Ownership","title":"Architecture Designer: Decide Ownership","text":"<p>The goal is to determine which Foundation layer an architecture requirement should land in, or whether it should stay with the consumer.</p> <ol> <li>Read the eight-step decision order in <code>docs/agents/architecture-routing.md</code>.</li> <li>In <code>docs/agents/capability-catalog.json</code>, find the capability by <code>layer</code> and <code>intent</code>, and read its <code>entrypoints</code>, <code>sideEffects</code>, <code>failureSemantics</code>, <code>ownedByCaller</code>.</li> <li>When publishing, task lifecycle, or artifact relationships are involved, route to release-skill, loop-agent, and artifact-graph respectively.</li> </ol> <p>The hard boundary of routing: Foundation does not own remote writes, business state machines, model orchestration, or domain-audit semantics. Capabilities that fall into <code>keep-business</code> or <code>foundation-gap</code> do not forcibly expand Foundation.</p>"},{"location":"en/quickstart/#Authoritative-Facts-and-Specifications","title":"Authoritative Facts and Specifications","text":"<ul> <li>Current product status (versions, package set, mirror coordinates, gates): Current Product Status (the single status page; not duplicated here).</li> <li>Development and commit specifications: Git Lifecycle Guide.</li> </ul>"},{"location":"en/quickstart/#Path-Reference","title":"Path Reference","text":"Reader Starting point Next step New project <code>scaffold</code> <code>check</code> \u2192 integrate Profile Existing project <code>adopt-plan</code> classify (direct-adoption / compatibility-layer / keep-business / foundation-gap) \u2192 adopt Architecture designer routing decision capability catalog \u2192 real exports and tests"},{"location":"en/agents/","title":"English \u00b7 Agent entry","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/agents/#Documentation-Entry-for-Agents","title":"Documentation Entry for Agents","text":"<p>This directory is the decision entry point of Skill Family Foundation for agents (Agents). Human readers enter from the root <code>README.md</code>; agents, within a limited context, read here first, then jump to the specific capability by intent, avoiding reading all the source code end-to-end.</p> <p>Foundation does not own business semantics. It provides only three things: machine contracts (Contracts), the thin Node mechanism runtime (Harness), the four engineering-phase commands (Engineering Kit), and the horizontally-declared-difference Profile. Domain state machines, model orchestration, remote publish writes, and audit semantics all stay with the caller or other projects.</p>"},{"location":"en/agents/#Reading-Order","title":"Reading Order","text":"<p>Agents consume the following in order, without needing to read from start to finish:</p> <ol> <li><code>../../agents/capability-catalog.json</code> \u2014 the language-neutral machine-fact catalog of stable and candidate capabilities; the starting point for judging \"does this requirement belong to Foundation, in which layer, and with which entry point.\"</li> <li><code>architecture-routing.md</code> \u2014 the decision table and decision tree from architecture intent to layer/capability/entry-point/external-project.</li> <li><code>../../agents/capability-catalog.en.json</code> \u2014 English intent, use conditions, inputs, outputs, failure semantics, caller ownership, and external routing for exactly the same capability IDs.</li> <li><code>../../agents/capability-catalog.schema.json</code> \u2014 the closed structural contract for the core catalog and locale overlays.</li> <li>The root <code>README.md</code>'s Agent Quick Reference \u2014 routing only, no API duplication.</li> <li>The three packages' README Agent Quick References \u2014 down to package-level capabilities and failure boundaries.</li> <li><code>../reference/failure-and-side-effect-matrix.md</code> \u2014 read/write/spawn/Git/network/residual-state/error-code for each public entry point.</li> <li><code>../reference/api/README.md</code> \u2014 the English API route across the three packages, including key capabilities, failure rules, evidence paths, and caller-owned semantics.</li> </ol> <p>Fact priority: this documentation consumes only the machine source of truth (package.json, src/index.mjs, CLI, registry.json, profile descriptor). Versions, commands, package counts, and support states are recomputed from the source of truth, never copied from memory or old docs.</p>"},{"location":"en/agents/#Catalog-Contract","title":"Catalog Contract","text":"<p>Files under <code>docs/agents/</code> assume different responsibilities and do not duplicate each other:</p> File Role Who should change it <code>../../agents/capability-catalog.json</code> Language-neutral machine-readable capability facts; the documentation layer's sole fact surface Change when capabilities change, validated by <code>capability-catalog-check.mjs</code> <code>../../agents/capability-catalog.en.json</code> English explanation overlay for every core capability ID Change when the English intent or behavior explanation changes <code>../../agents/capability-catalog.zh-CN.json</code> Simplified Chinese explanation overlay for every core capability ID Change when the Chinese intent or behavior explanation changes <code>../../agents/capability-catalog.schema.json</code> Closed catalog and overlay structural contract Change only when structure changes <code>architecture-routing.md</code> Intent \u2192 layer/capability/entry-point/external-project decisions Change when routing adjudication changes <code>README.md</code> (this file) Agent total entry point and reading order Change when entry-point structure changes <code>../reference/api/README.md</code> and the three Chinese package detail pages Human-readable routing and signature-level expansion of catalog capabilities Change when real exports change, and sync with <code>capability-catalog-check.mjs</code> <p>The capability catalog is not a new public object of Contracts, nor a fourth registry class. It is only the documentation layer's machine facts, avoiding the README becoming a second drifting handwritten authority.</p>"},{"location":"en/agents/#Architecture-Design-Method","title":"Architecture Design Method","text":"<p>When an agent handles a Foundation-related requirement, it proceeds in the following four steps:</p> <ol> <li>Decide ownership first. Does this requirement contain domain semantics, a business state machine, or an audit oracle? If so, keep it with the consumer, connecting only business-neutral mechanisms to Foundation.</li> <li>Then decide the layer. Structure/protocol/stable error code/object Schema \u2192 Contracts; cross-skill-family reusable Node mechanism \u2192 Harness; scaffold/adopt/projection/check or concrete Profile injection \u2192 Kit/Profile.</li> <li>Check the catalog to determine the entry point. Find the capability by <code>layer</code> in the core catalog, then read the matching <code>intent</code>, <code>sideEffects</code>, <code>failureSemantics</code>, <code>ownedByCaller</code>, and <code>routeElsewhere</code> in the English overlay.</li> <li>Verify evidence before concluding. Each catalog capability carries <code>sourceRefs</code> and <code>positiveTestRefs</code>/<code>negativeTestRefs</code>; before changing a judgment, return to these sources of truth to confirm, rather than inferring from the catalog's prose.</li> </ol> <p>The hard rule of routing boundaries: Foundation does not own remote writes (\u2192 release-skill), does not own tasks/retries/rework (\u2192 loop-agent), does not own artifact relationships and context (\u2192 artifact-graph), does not own domain-audit semantics (\u2192 independent audit consumer). See the routing table in <code>architecture-routing.md</code> for details.</p> <p>For a candidate capability, <code>entrypoints</code> always lists the canonical identity. A simultaneous <code>legacyEntrypoints</code> field marks pre-0.10.0 debt that consumers migrate once. Stable promotion after that migration does not change the contract identity, although consumers must update their exact pins to obtain the newly published stable promise. Candidate capabilities introduced from 0.10.0 onward must not encode maturity in the capability ID, entrypoint, Schema <code>$id</code>, or operation.</p>"},{"location":"en/agents/#Relationship-with-Mechanical-Gates","title":"Relationship with Mechanical Gates","text":"<p>Two check scripts guard the catalog and README against drift:</p> <ul> <li><code>scripts/docs/capability-catalog-check.mjs</code> validates structure, unique IDs, existence of source/test references, unsupported boundaries, and that the Kit's four commands are not expanded.</li> <li><code>scripts/docs/agent-section-check.mjs</code> validates the fixed Agent Quick Reference sections of the root README and the three packages' READMEs, the required subheadings, and capability-ID links.</li> </ul> <p>Neither only reports shape and does not auto-edit; warnings require returning to the source of truth and human judgment.</p>"},{"location":"en/agents/architecture-routing/","title":"English \u00b7 Architecture routing","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/agents/architecture-routing/#Architecture-Routing-From-Intent-to-Layer-Capability-and-External-Project","title":"Architecture Routing: From Intent to Layer, Capability, and External Project","text":"<p>This page converges \"where should an architecture requirement land\" into a mechanically-reusable decision order and routing table. It serves new agents who, without reading the source code end-to-end, quickly obtain a verifiable answer: does this requirement belong to Foundation, in which layer (Contracts/Harness/Kit/Profile), with which stable entry point, what semantics remain owned by the caller, and when should it be handed off to an external project.</p>"},{"location":"en/agents/architecture-routing/#Decision-Order","title":"Decision Order","text":"<p>Judge in order by number, stopping at the first match:</p> <ol> <li>Does it contain domain semantics, a business state machine, or an audit oracle? If yes, keep it with the consumer; Foundation connects only business-neutral mechanisms.</li> <li>Is it structure, a protocol, a stable error code, or an object Schema? \u2192 Contracts (contract authority).</li> <li>Is it a cross-skill-family reusable Node mechanism? \u2192 Harness (Node implementation of the Contracts mechanism protocol).</li> <li>Is it the engineering-phase scaffold/adopt-plan/projection/check, or a concrete host Profile injection? \u2192 Kit / Profile.</li> <li>Does it involve publishing remote state? \u2192 release-skill.</li> <li>Does it involve tasks, retries, rework, acceptance, or self-iteration? \u2192 loop-agent.</li> <li>Does it involve artifact relationships, context, packet, or version-lock? \u2192 artifact-graph.</li> <li>Does it have only one consumer, or has cross-two-real-consumer duplication not been proven? Keep it with the consumer by default; do not expand Foundation.</li> </ol> <p>Step 8 is the expansion gate. Any new component must justify: deleting it would force two or more real consumers to re-implement it, and this is verified by an independent fixture. Otherwise keep it on the consumer side.</p>"},{"location":"en/agents/architecture-routing/#Routing-Table","title":"Routing Table","text":"<p>The table below gives the preferred capability and the forbidden misuse for common architecture intents. Each preferred capability can be looked up in <code>capability-catalog.json</code> by id for its entry points, side effects, and failure semantics.</p> Architecture intent Preferred capability Forbidden misuse Validate a Foundation contract object Contracts / Harness validation (<code>foundation.contracts.object-validation</code>, <code>foundation.harness.contract-validation</code>) Do not replace the consumer's business Schema Safe file access and atomic write Harness path / atomic API (<code>foundation.harness.path-containment</code>, <code>foundation.harness.atomic-write</code>) Do not put file-selection business rules into Harness Generate a deterministic human report Harness report or Kit report sub-action (<code>foundation.harness.report</code>, <code>foundation.kit.report</code>) Do not freely author reports from open business outputs Durable events and derived snapshot Harness state-store (<code>foundation.harness.state-store</code>) Do not define a workflow state machine in Foundation New-project skeleton Kit scaffold (<code>foundation.kit.scaffold</code>) Do not overwrite a non-empty existing repository Existing-repository adoption inventory Kit adopt-plan (<code>foundation.kit.adopt-plan</code>) Do not write files, do not auto-migrate Managed projection Kit projection + Profile (<code>foundation.kit.projection</code>) Do not overwrite handwritten files Engineering diagnostics Kit check (<code>foundation.kit.check</code>) Do not auto-fix Publishing release-skill Foundation does not own remote writes Tasks/retries/rework loop-agent Foundation does not own a business state machine Artifact relationships/version-lock artifact-graph Foundation does not own the artifact graph"},{"location":"en/agents/architecture-routing/#Layer-Location-Quick-Reference","title":"Layer-Location Quick Reference","text":"<p>The dependency direction is fixed as Contracts \u2192 Harness \u2192 Engineering Kit; Profile declares horizontally, and the public core does not depend in reverse on a concrete Profile.</p> <ul> <li>Contracts: structure, protocols, error codes, protocol-name registry; 18 top-level object kinds, 9 mandatory rules.</li> <li>Harness: the thin Node mechanism runtime of Contracts; implements only business-neutral mechanisms, owning no semantics.</li> <li>Engineering Kit: the four engineering commands (scaffold, adopt-plan, projection, check) and their read-only / restricted-write boundaries.</li> <li>Profile: the declarative SPI for host and project-shape differences; implements only the stable SPI, injecting no business semantics.</li> <li>External projects: release-skill (publishing), loop-agent (task lifecycle), artifact-graph (artifact relationships), independent audit consumer (domain semantics).</li> </ul>"},{"location":"en/agents/architecture-routing/#Typical-Misrouting-and-Correction","title":"Typical Misrouting and Correction","text":"<ul> <li>Misrouting a domain Schema to Foundation: the domain Schema is owned by the consumer; Foundation provides only a generic validation mechanism (<code>foundation.contracts.object-validation</code>).</li> <li>Misrouting a workflow state machine to Foundation: state-store provides only the event-log and snapshot substrate; reducer transitions and terminal states are owned by the caller (<code>foundation.unsupported.business-state-machine</code>).</li> <li>Misrouting a publish write to Foundation: remote writes belong to release-skill; Foundation contains no publish/remote-write entry point (<code>foundation.unsupported.remote-publish</code>).</li> <li>Misrouting an audit oracle to Foundation: the audit surface only performs deterministic serialization; domain conclusions belong to external review (<code>foundation.unsupported.domain-audit-semantics</code>).</li> </ul> <p>The honest boundary of routing judgment: structural checks only prove byte/structural consistency (provable in-repo); ordinary prose semantics and the final accept/reject conclusion belong to external independent review; no second gate is maintained within the target repository.</p>"},{"location":"en/migration/","title":"English \u00b7 Migration","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/migration/#Existing-Repository-Adoption-and-Migration-FND-070","title":"Existing-Repository Adoption and Migration (FND-070)","text":"<p>This page describes how an existing project adopts the Skill Family infrastructure, and the gate for judging migration completion. It serves two reader types: a human owner uses it to judge the adoption path and risks; an agent uses it to run a read-only inventory via <code>adopt-plan</code>, without duplicating write actions on this page.</p> <p>Foundation 0.14.0 records four different conclusions. A capability-catalog query discovers candidates; migration state <code>complete</code> proves only the migration loop; contract integration is stated by the consumer's adapter tests and domain gate; real-host qualification is proved only by an explicit <code>check qualification --native</code> execution. One conclusion cannot substitute for another.</p>"},{"location":"en/migration/#0140-Shortest-Entry","title":"0.14.0 Shortest Entry","text":"<p>Declare uses in the migration manifest, then inspect candidates with the same use matrix. <code>adopt-plan</code> remains read-only and never creates a decision or changes the Profile automatically.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale en --uses ./uses.json\n</code></pre> <p>Each use must choose <code>direct-adoption</code>, <code>compatibility-layer</code>, <code>keep-business</code>, or <code>foundation-gap</code>. Only the first two require <code>targetCapability</code>; the other two retain consumer ownership or record a Foundation gap. A text match for a capability ID never creates an adoption declaration automatically.</p> <p>After migration, the consumer still verifies contract wiring and domain guarantees. For a real host, run the explicit command only when that evidence is required:</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p>The caller supplies the <code>--request</code> and <code>--bindings</code> JSON files. The command preflights exact versions, catalog capability metadata, and complete parameters before touching a host. Missing evidence, a skipped execution, or an indeterminate terminal state cannot produce <code>real-host-qualified</code>.</p>"},{"location":"en/migration/#Classification-Method","title":"Classification Method","text":"<p>Before an existing repository connects to Foundation, classify it into one of the four categories below. The classification determines which path to take, whether files are written, and how the legacy implementation is handled.</p> Category Meaning Handling path Writes files? <code>direct-adoption</code> The repository already has a capability that can be replaced by Foundation as-is, with no business-semantic coupling Direct adoption: <code>adopt-plan</code> inventory \u2192 <code>scaffold</code>/<code>projection</code> writes to disk Yes (contained) <code>compatibility-layer</code> The repository's existing implementation differs from the Foundation interface and needs a compatibility adaptation layer Write a compatibility layer, then adopt; the legacy implementation exits via the compatibility layer Yes (compatibility layer contained) <code>keep-business</code> The capability contains domain semantics or a business state machine, belongs to the caller, and Foundation does not take it Keep with the consumer; connect only business-neutral mechanisms No (on the Foundation side) <code>foundation-gap</code> A needed capability is not yet provided by Foundation (e.g., host apply, Qoder driver) Keep with the consumer or a later version; do not forcibly expand Foundation No <p>Classification is a prerequisite for the adoption decision. Capabilities that fall into <code>keep-business</code> or <code>foundation-gap</code> should not be stuffed into Foundation just to \"complete adoption\"; this is exactly the concrete instantiation of architecture-routing steps 1 and 8.</p>"},{"location":"en/migration/#Principles","title":"Principles","text":"<ol> <li>Plan first: any existing repository first runs the read-only <code>adopt-plan</code>, obtaining the current state, target Profile, exact write set, conflicts, legacy-implementation exit list, and acceptance commands, before deciding whether to perform a write.</li> <li>Read-only plan, zero change: <code>adopt-plan</code> writes no files (including temporary files), runs no git write commands, renames nothing, and touches no remotes; zero change to the input repository's bytes (provable by before/after hash walk-through).</li> <li>Adoption and rename are separate: infrastructure adoption never drags along a repository rename or remote-coordinate change; the two are independent decisions, and the tool provides no rename capability.</li> <li>Dual-track does not count as complete: the migration-completion judgment requires the legacy duplicate implementation to have been deleted; connecting the new infrastructure while the legacy implementation still remains is permanently judged false.</li> </ol>"},{"location":"en/migration/#adopt-plan-Output-Structure","title":"adopt-plan Output Structure","text":"Section Content <code>target</code> Current state: entry-point count, target's own managed declarations <code>project</code> / <code>traceability</code> Target Profile and the source of truth for each write (Contracts version, skeleton generation function, license Profile and variant) <code>git</code> Read-only Git pre-state (repository, HEAD, clean) <code>writeSet</code> Exact write set: per-path action (only <code>create</code>/<code>unchanged</code>), fileClass, sha256 <code>conflicts</code> Handwritten conflicts, managed drift, symlink placeholders, temporary exceptions for missing fields <code>risks</code> dirty, nested repository, tracked-but-ignored, expired exceptions, etc. <code>migration</code> Migration state machine: binding, on-disk proof (adoptionProof), pending-write count, check gate, four-class verification evidence, state and completion judgment <code>verificationPlan</code> Acceptance command sequence (check \u2192 projection \u2192 re-check)"},{"location":"en/migration/#Migration-Manifest-skill-familymigrationjson","title":"Migration Manifest (skill-family.migration.json)","text":"<p>The target repository declares its own migration state in the root directory:</p> <pre><code>{\n \"schemaVersion\": 1,\n \"kind\": \"skill-family.migration-manifest\",\n \"manifestVersion\": 4,\n \"capabilityUseContext\": { \"scope\": \"harness\", \"locale\": \"en\" },\n \"capabilityUses\": [\n {\n \"useId\": \"safe-output-write\",\n \"problemStatement\": \"Write output without leaving a partial file\",\n \"constraints\": [\"Tests must not write a real project directory\"],\n \"retainedGuarantees\": [\"The consumer still chooses the output artifact\"],\n \"catalogFilters\": [\"atomic write\"]\n }\n ],\n \"capabilityDecisions\": [\n {\n \"useId\": \"safe-output-write\",\n \"disposition\": \"direct-adoption\",\n \"targetCapability\": \"foundation.harness.atomic-write\",\n \"reason\": \"The neutral atomic-write mechanism covers the need while artifact selection remains consumer-owned\"\n }\n ],\n \"legacyInfra\": [\n {\n \"path\": \"scripts/old-validator.mjs\",\n \"replacedBy\": null,\n \"useId\": \"safe-output-write\",\n \"recoveryRef\": \"docs/recovery/old-validator.md\"\n }\n ],\n \"legacyReferences\": [\n {\n \"path\": \"src/index.mjs\",\n \"text\": \"legacyWrite()\",\n \"replacedBy\": \"foundation.harness.atomic-write\",\n \"useId\": \"safe-output-write\"\n }\n ],\n \"exceptions\": []\n}\n</code></pre> <p>This example matches the machine fixture <code>positive-04-capability-adoption.json</code>: <code>replacedBy: null</code> means the legacy implementation has not exited, and <code>recoveryRef</code> records the recovery guidance; the tool only read-only evaluates existence and never deletes on its behalf.</p> <p>The Quickstart Profile candidate moves to v2 in 0.3.0. A migration manifest that binds candidate capabilities must pin all three Foundation packages to exactly 0.3.0; an existing integration that still requires v1 must keep all three packages pinned to exactly 0.2.1 and must not mix the two sets.</p> <ul> <li><code>legacyInfra</code>: each entry gives the legacy-implementation path and its replacement; the tool only read-only evaluates existence and never deletes on its behalf.</li> <li><code>exceptions</code> are temporary exceptions: must simultaneously contain all four fields \u2014 owner, reason, deadline, and migrationTarget \u2014 and missing any field counts as a conflict (plan failure); expired exceptions are not auto-renewed and persistently block the completion judgment.</li> <li><code>targetProfile</code> / <code>foundationPackages</code>: adoption binding. The target Profile must be consistent with the plan Profile; the three Foundation packages (contracts, harness-node, engineering-kit) must each bind an exact version number (floating ranges not accepted) and a <code>sha256:</code> digest.</li> <li><code>verification</code>: paths to the four classes of verification-evidence documents (unit, integration, consumer, independentAudit). Each piece of evidence must be parseable JSON whose <code>projectId</code> matches the target project's identity to count as proven; out-of-bounds paths, missing, unparseable, or identity-mismatched evidence are all unproven, fail-closed.</li> </ul>"},{"location":"en/migration/#Migration-State-Machine","title":"Migration State Machine","text":"<p>States advance monotonically and are derived only from read-only evidence; no tool advances state by writing.</p> <pre><code>not-declared \u2192 declared \u2192 adopted \u2192 verified \u2192 complete\n</code></pre> State Meaning <code>not-declared</code> No contract-valid migration manifest exists <code>declared</code> The manifest contract is valid, but the adoption-proof facts are incomplete <code>adopted</code> Foundation bytes are on disk and the legacy implementation has exited, but the check gate is not green <code>verified</code> The check gate is green, but not all verification evidence is proven <code>complete</code> All eight completion conditions are satisfied; <code>complete</code> is true if and only if the state is <code>complete</code>"},{"location":"en/migration/#Completion-Gate","title":"Completion Gate","text":"<p><code>migration.completion.complete</code> is true if and only if all eight hold:</p> <ol> <li>A contract-valid migration manifest has been declared (kind/fields validated by the Contracts schema);</li> <li>The adoption binding is proven: the target Profile is consistent with the plan, and the three Foundation packages each bind an exact version and a sha256 digest;</li> <li>The Project Manifest, managed lock, identity, and all managed skeleton files are on disk and their digests are consistent with the plan (<code>adoptionProof.missing</code>/<code>mismatched</code> are empty);</li> <li>The write set has no pending create/replace/project actions (<code>pendingWrites</code> is 0);</li> <li>The Foundation check gate is green;</li> <li>Each legacy implementation has exited (absent) \u2014 containment refusal or malformed entries fail-closed identically to present;</li> <li>No missing fields, no unparseable deadline, no expired temporary exceptions; no unresolved adoption conflicts;</li> <li>All four classes of verification evidence (unit/integration/consumer/independentAudit) are proven and identity (projectId) matches.</li> </ol> <p>An unevaluated input is equivalent to unproven: the gate advances only on presented evidence. The blocking reason (<code>blockers</code>) is a stable, readable string that can go directly into the migration review record.</p>"},{"location":"en/migration/#Mandatory-Negative-Cases-completion-must-be-false-in-any-scenario","title":"Mandatory Negative Cases (completion must be false in any scenario)","text":"<ul> <li>Empty repository + empty manifest (no contract-valid manifest \u2192 <code>not-declared</code>);</li> <li>Manifest with wrong kind (schema-invalid \u2192 treated as undeclared);</li> <li>9 skeleton files still pending create (<code>declared</code>, all missing paths listed);</li> <li>Managed lock drift (<code>mismatched</code> non-empty);</li> <li>Only the new implementation connected, legacy still present (dual-track \u2192 <code>declared</code>);</li> <li>Consumer verification evidence missing or identity mismatched (<code>verified</code>, must not complete);</li> <li>Temporary exception expired (the tool never renews).</li> </ul>"},{"location":"en/migration/#Legacy-Removal-and-Rollback-Contract","title":"Legacy-Removal and Rollback Contract","text":"<ul> <li>Removal is the caller's responsibility: <code>adopt-plan</code> only evaluates legacy-implementation existence and lists the exit manifest, never deleting on its behalf; <code>foundation-gap</code> and <code>keep-business</code> capabilities do not require removal.</li> <li>Rollback relies on evidence: 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> <li>fail-closed default: any unparseable, out-of-bounds, identity-mismatched, or evidence-missing input makes the corresponding judgment unproven; success is not assumed.</li> </ul>"},{"location":"en/migration/#Profile-Draft","title":"Profile Draft","text":"<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 v3) \u2014 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> <p>The draft pre-fills everything mechanically derivable from read-only facts:</p> <ul> <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> <li>The adoption declaration (D-8 minimal field set, authoritative definition in <code>adoptionDeclaration</code> of <code>profiles/spi/extension-spi.json</code>):</li> <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> <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> <li><code>adopted_at</code> is fixed at adoption time, never at planning time, and stays null.</li> <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> </ul>"},{"location":"en/migration/#Incompleteness-Blocking-Rules","title":"Incompleteness Blocking Rules","text":"<ul> <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> <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> </ul>"},{"location":"en/migration/#Binding","title":"Binding","text":"<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>"},{"location":"en/migration/#Boundary","title":"Boundary","text":"<ul> <li><code>adopt-plan</code> is strictly read-only: the draft is only printed with the plan to stdout, never written into the consumer repository;</li> <li>No fifth Kit top-level command is added: Kit top-level commands are permanently the four \u2014 scaffold, adopt-plan, projection, check \u2014 and <code>profileDraft</code> is only a sub-block of <code>adopt-plan</code> output.</li> </ul>"},{"location":"en/migration/#Hazard-Class-Fixtures","title":"Hazard-Class Fixtures","text":"<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>"},{"location":"en/recipes/","title":"English \u00b7 Recipes","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/#Recipe-Index","title":"Recipe Index","text":"<p>This directory provides the minimal, copy-paste-runnable approach for common architecture requirements. Each recipe follows a fixed nine-section structure: scenario and non-scenario, architecture choice and capability ID, preconditions and trust boundary, minimal code or command, expected output and evidence, safety/failure negative case, copy-paste verification command, business logic the caller continues to own, and upgrade/rollback notes.</p>"},{"location":"en/recipes/#Selection-Rules","title":"Selection Rules","text":"<ul> <li>Requirement contains domain semantics / state machine / audit oracle \u2192 keep with the consumer; do not look for a Foundation capability here.</li> <li>Need structure or protocol validation \u2192 see <code>domain-schema-validation</code>.</li> <li>Need safe file access or atomic write \u2192 see <code>safe-filesystem-and-atomic-write</code>.</li> <li>Need a deterministic human report \u2192 see <code>deterministic-human-report</code>.</li> <li>Need durable events and derived snapshots \u2192 see <code>durable-local-state</code>.</li> <li>Need an existing-repository adoption inventory \u2192 see <code>adopt-existing-repository</code>.</li> <li>Need a text-resource closure or host access \u2192 see <code>adapter-text-closure</code> / <code>host-profile-integration</code>.</li> <li>Need to trial Quickstart Profile v2 \u2192 pin the 0.3.0 candidate subpaths of all three packages exactly; remain on exactly 0.2.1 when v1 is still required.</li> </ul>"},{"location":"en/recipes/#Common-Verification-Conventions","title":"Common Verification Conventions","text":"<ul> <li>All examples run in a new system temp directory, leaving no personal paths or credentials.</li> <li>Examples contain no enterprise identifiers, private Profiles, real business data, or personal paths.</li> <li>Each recipe gives at least one positive case and one negative case; the negative case must produce a stable failure code or refusal.</li> <li>Verification commands can be copied and run directly; when a package is needed, first <code>npm install</code> the corresponding <code>@0.3.0</code>.</li> </ul>"},{"location":"en/recipes/#Capability-ID-Overview","title":"Capability ID Overview","text":"Recipe Preferred capability ID adopt-existing-repository <code>foundation.kit.adopt-plan</code> safe-filesystem-and-atomic-write <code>foundation.harness.path-containment</code>, <code>foundation.harness.atomic-write</code> domain-schema-validation <code>foundation.contracts.object-validation</code> adapter-text-closure <code>foundation.harness.resource-closure</code>, <code>foundation.harness.host-adapter</code> deterministic-human-report <code>foundation.harness.report</code>, <code>foundation.kit.report</code> durable-local-state <code>foundation.harness.state-store</code> host-profile-integration <code>foundation.kit.host</code>, <code>foundation.profile.extension-spi</code>"},{"location":"en/recipes/adapter-text-closure/","title":"English \u00b7 Adapter text closure","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/adapter-text-closure/#Recipe-Text-Resource-Closure-and-Host-Build","title":"Recipe: Text Resource Closure and Host Build","text":""},{"location":"en/recipes/adapter-text-closure/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to normalize a set of text resources into a recomputable closure, and based on it materialize a host-adapter build at a contained location, with the build manifest fully digest-verifiable.</p> <p>Not applicable: needs to include binary resources in the adapter projection (text closure only); needs Kit CLI apply, generic or remote apply, or automatic deleting uninstall.</p>"},{"location":"en/recipes/adapter-text-closure/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.harness.resource-closure</code> (deterministic closure and sha256 digest) and <code>foundation.harness.host-adapter</code> (adapter source closure / build / manifest verification / materialize / read-only peer verification through <code>verifyPeerAdapterDirectories</code>).</p>"},{"location":"en/recipes/adapter-text-closure/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The adapter source is a declared text closure (<code>content</code> accepts only string, utf8).</li> <li>Trust boundary: materialize uses sibling staging + a single rename, and refuses if the target already exists; probe does not spawn by default and does not walk PATH.</li> </ul>"},{"location":"en/recipes/adapter-text-closure/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import {\n computeResourceClosure,\n buildAdapterClosure,\n verifyAdapterBuildManifest,\n materializeAdapterBuild,\n} from \"skill-family-harness-node\";\n\nconst closure = computeResourceClosure([\n { path: \"skill.json\", content: \"{}\" },\n { path: \"readme.md\", content: \"# demo\" },\n]);\nconst built = buildAdapterClosure(closure);\nverifyAdapterBuildManifest(built.manifest); // fully digest-verifiable\nawait materializeAdapterBuild(built, { outDir: \"./out\" }); // contained write to disk\n</code></pre> <p>The code above shows the order of first computing the closure, then verifying the manifest, then atomically materializing.</p>"},{"location":"en/recipes/adapter-text-closure/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>computeResourceClosure</code> returns a deterministic closure object and a sha256 digest; <code>materializeAdapterBuild</code> writes the artifact at the contained target. Evidence: <code>packages/skill-family-harness-node/test/closure.test.mjs</code> and <code>test/host.test.mjs</code>.</p>"},{"location":"en/recipes/adapter-text-closure/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: binary content unsupported -&gt; verification/build refusal\nbuildAdapterClosure({ path: \"x.bin\", content: Buffer.from([0, 1, 2]) });\n// throws HarnessError: adapter source content supports string (utf8) only\n</code></pre> <p>A manifest-digest mismatch, an already-existing target, or a non-trusted executable file also throw.</p>"},{"location":"en/recipes/adapter-text-closure/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/closure.test.mjs \\\n packages/skill-family-harness-node/test/host.test.mjs\n</code></pre>"},{"location":"en/recipes/adapter-text-closure/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>The host's concrete business semantics.</li> <li>Host-difference declarations are injected via Profile + Kit host sub-action.</li> </ul>"},{"location":"en/recipes/adapter-text-closure/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>Harness owns only build and read-only peer verification. The Kit package API <code>applyHostPlan</code> supports registered, digest-bound local install/update; executing an uninstall plan does not delete files. Kit CLI apply, generic apply, and remote apply remain stably refused, and the full Qoder driver is unsupported.</li> <li><code>verifyPeerAdapterDirectories</code> proves only that peer directories have matching closures, bytes, and <code>logicalMappings</code>; it derives no install, release, or domain state.</li> <li>materialize is an atomic sibling + rename, and on failure does not affect the existing target; upgrade follows the <code>skill-family-harness-node</code> version.</li> </ul>"},{"location":"en/recipes/adopt-existing-repository/","title":"English \u00b7 Adopt an existing repository","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/adopt-existing-repository/#Recipe-Existing-Repository-Read-Only-Adoption-Inventory","title":"Recipe: Existing-Repository Read-Only Adoption Inventory","text":""},{"location":"en/recipes/adopt-existing-repository/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to judge whether an existing repository can adopt Foundation, and obtain the exact write set, conflicts, and legacy-implementation exit list, without changing any bytes.</p> <p>Not applicable: needs to auto-rewrite the existing repository (writing files is forbidden, auto-migration is forbidden); needs to publish to a remote (\u2192 release-skill).</p>"},{"location":"en/recipes/adopt-existing-repository/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capability: <code>foundation.kit.adopt-plan</code> (strictly read-only inventory and completion judgment). It only outputs, writes no files, runs no git write commands.</p>"},{"location":"en/recipes/adopt-existing-repository/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The target repository exists and is read-only accessible.</li> <li>Trust boundary: <code>adopt-plan</code> makes zero byte changes to the input repository; legacy-implementation deletion is the caller's responsibility, and the tool never deletes on its behalf.</li> </ul>"},{"location":"en/recipes/adopt-existing-repository/#4-Minimal-Command","title":"4. Minimal Command","text":"<pre><code>npm install --save-dev skill-family-engineering-kit@0.3.0\nnpm exec -- skill-family-kit adopt-plan --root &lt;repo&gt;\n</code></pre>"},{"location":"en/recipes/adopt-existing-repository/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p>The output includes the current state (<code>target</code>), target Profile and traceability (<code>project</code>/<code>traceability</code>), read-only Git pre-state (<code>git</code>), exact write set (<code>writeSet</code>), conflicts (<code>conflicts</code>), risks (<code>risks</code>), migration state machine (<code>migration</code>), and acceptance command sequence (<code>verificationPlan</code>). Evidence from <code>packages/skill-family-engineering-kit/test/adopt-plan.test.mjs</code> and <code>test/migration.test.mjs</code>.</p>"},{"location":"en/recipes/adopt-existing-repository/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<p>Before and after running <code>adopt-plan</code> on a dirty repository, the input repository's bytes must be exactly identical (provable by hash walk-through); the tool writes no temp files and touches no remote. If the migration manifest is missing a required <code>exceptions</code> field, the plan fails directly (completion false), and the tool does not renew.</p>"},{"location":"en/recipes/adopt-existing-repository/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code># Positive case: read-only inventory of a public fixture existing-repository\nnpm exec -- skill-family-kit adopt-plan --root fixtures/m0-consumer\n\n# Read-only diagnostics, no fix\nnpm exec -- skill-family-kit check --root fixtures/m0-consumer\n</code></pre>"},{"location":"en/recipes/adopt-existing-repository/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Whether the legacy implementation exits, and when to delete it (the tool only evaluates existence and lists the exit manifest).</li> <li><code>business-logic-to-keep</code> and <code>legacy-removal-recovery</code> are always INCOMPLETE and must be provided by a human owner.</li> </ul>"},{"location":"en/recipes/adopt-existing-repository/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li><code>adopt-plan</code> is read-only, has no write risk, and needs no rollback.</li> <li>Actual disk writes are performed by <code>scaffold</code>/<code>projection</code>; rollback relies on the dual-digest binding of <code>adoptionProof</code> and <code>foundationPlanDigest</code>; an overwrite action that does not declare the <code>expect.sha256</code> pre-state is refused at the <code>projection</code> stage.</li> <li>When adopting the Quickstart Profile candidate, pin all three packages to one profile: 0.3.0 for v2 or 0.2.1 for v1. Do not mix them.</li> </ul>"},{"location":"en/recipes/deterministic-human-report/","title":"English \u00b7 Deterministic human report","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/deterministic-human-report/#Recipe-Deterministic-Human-Report","title":"Recipe: Deterministic Human Report","text":""},{"location":"en/recipes/deterministic-human-report/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to deterministically render machine results into a human-readable report (Markdown + digest binding + graded checks), writing the paired dual outputs as a group and refusing path aliases and input overwrites.</p> <p>Not applicable: needs to freely author a report from open business outputs (forbidden); needs model invocation or business orchestration.</p>"},{"location":"en/recipes/deterministic-human-report/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.harness.report</code> (validate \u2192 render \u2192 bind \u2192 check, pure functions) and <code>foundation.kit.report</code> (CLI sub-action orchestrating rendering and grading).</p>"},{"location":"en/recipes/deterministic-human-report/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>A Contracts-validated report-model and operation-result already exist.</li> <li>Trust boundary: deterministic Markdown escaping; a three-digest binding of model/result/report; the caller must first construct a valid model, and Kit does not derive facts from business outputs.</li> </ul>"},{"location":"en/recipes/deterministic-human-report/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import {\n validateReportModel,\n renderReportMarkdown,\n buildBinding,\n checkReport,\n} from \"skill-family-harness-node\";\n\nvalidateReportModel(model);\nconst markdown = renderReportMarkdown(model, { locale: \"zh-CN\" });\nconst binding = buildBinding(model, result, markdown);\nconst graded = checkReport(model, result, markdown, binding); // graded check findings\n</code></pre> <p>The code above shows the four-step order of model validation, rendering, binding, and graded check.</p>"},{"location":"en/recipes/deterministic-human-report/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>renderReportMarkdown</code> returns deterministic Markdown; <code>buildBinding</code> produces the three-digest binding; <code>checkReport</code> returns graded check findings. Evidence: <code>packages/skill-family-harness-node/test/report.test.mjs</code> and <code>packages/skill-family-engineering-kit/test/report.test.mjs</code>.</p>"},{"location":"en/recipes/deterministic-human-report/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: report bytes deviate from deterministic re-render -&gt; SFC3003 (REPORT_FACT_DRIFT)\n// after manually editing markdown then bind/check, the digest mismatch fails\ncheckReport(model, result, tamperedMarkdown, binding);\n// throws HarnessError, errorCode = \"SFC3003\"\n</code></pre> <p><code>SFC3001</code> (digest mismatch) and <code>SFC3002</code> (missing mandatory element) are likewise hard failures.</p>"},{"location":"en/recipes/deterministic-human-report/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/report.test.mjs \\\n packages/skill-family-engineering-kit/test/report.test.mjs\n</code></pre>"},{"location":"en/recipes/deterministic-human-report/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Interpretation of the report's business conclusions.</li> <li>The caller must first construct a valid report-model (Kit does not derive facts from business outputs).</li> </ul>"},{"location":"en/recipes/deterministic-human-report/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The report is deterministically rendered from machine results, not freely authored; upgrade follows the <code>skill-family-harness-node</code> and <code>skill-family-engineering-kit</code> versions.</li> <li>The paired dual outputs are written as a group, refusing path aliases and input overwrites; rollback restores from the <code>expect.sha256</code> pre-state written before the write.</li> </ul>"},{"location":"en/recipes/domain-schema-validation/","title":"English \u00b7 Domain Schema validation","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/domain-schema-validation/#Recipe-Domain-Agnostic-Contract-Object-Validation","title":"Recipe: Domain-Agnostic Contract Object Validation","text":""},{"location":"en/recipes/domain-schema-validation/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to validate whether a document conforms to a Foundation-registered contract object (e.g., project-manifest), choosing a validation strategy by dialect.</p> <p>Not applicable: needs to validate the consumer's own business Schema (the consumer should hold it itself; Foundation does not replace it); needs to mix domain-semantic validation into the generic contract.</p> <p>Quickstart Profile v2 is a separate candidate path. The consumer still owns its business schemas; Engineering Kit only compiles an explicit schema collection into offline validators selected by <code>$id</code>, and does not own the method-to-schema choice.</p>"},{"location":"en/recipes/domain-schema-validation/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capability: <code>foundation.contracts.object-validation</code> (<code>validateDocument</code> / <code>compileSchema</code> / <code>detectDialect</code>). A pure Ajv implementation, supporting draft-07 and 2020-12.</p>"},{"location":"en/recipes/domain-schema-validation/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The document to be validated carries the <code>$id</code> of a registered contract object.</li> <li>Trust boundary: <code>validateDocument</code> never modifies the caller's input; a normalized copy is returned only in the result's <code>data</code> field.</li> </ul>"},{"location":"en/recipes/domain-schema-validation/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import { validateDocument } from \"skill-family-contracts\";\n\nconst document = {\n schemaVersion: 1,\n kind: \"skill-family.project-manifest\",\n project: { id: \"my-project\", name: \"My Project\", description: \"Example\" },\n contracts: { version: \"1.0.0\", profile: \"generic\" },\n managedFiles: [\"package.json\"],\n updatedAt: \"2026-01-01T00:00:00Z\",\n};\n\nconst result = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/project-manifest.json\",\n dialect: \"2020-12\",\n});\nif (!result.valid) console.error(result.errorCode);\n</code></pre> <p>The code above shows using <code>$id</code> to specify the target Schema and retrieving <code>{ valid, errorCode, errors, data }</code>.</p>"},{"location":"en/recipes/domain-schema-validation/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p>On successful validation <code>result.valid</code> is true; on failure <code>errorCode</code> is a stable code such as <code>SFC1001</code>. Evidence: <code>packages/skill-family-contracts/test/validator.test.mjs</code> and <code>test/schemas.test.mjs</code>.</p>"},{"location":"en/recipes/domain-schema-validation/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: unknown $id -&gt; returns valid:false, errorCode = SFC1002 (UNKNOWN_SCHEMA_ID)\nconst bad = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/does-not-exist.json\",\n dialect: \"2020-12\",\n});\n// does not throw, returns a structured result:\n// { valid: false, errorCode: \"SFC1002\",\n// errors: [{ message: \"unknown schema $id: https://contracts.skill-family.example/v1/does-not-exist.json\" }] }\nif (!bad.valid) console.error(bad.errorCode); // SFC1002\n</code></pre>"},{"location":"en/recipes/domain-schema-validation/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-contracts/test/validator.test.mjs \\\n packages/skill-family-contracts/test/schemas.test.mjs\n</code></pre>"},{"location":"en/recipes/domain-schema-validation/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Semantic interpretation of specific business fields.</li> <li>Domain-level validation rules (not within the Foundation generic contract).</li> </ul>"},{"location":"en/recipes/domain-schema-validation/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The contract authority version <code>CONTRACTS_VERSION = 1.4.0</code>, and the npm package version <code>0.3.0</code> run in parallel and are not mixed.</li> <li>Error codes are frozen and do not drift; Schema changes are handled as a new contract-version task, not by modifying frozen content in place.</li> <li>Candidate v2 must be pinned to exactly 0.3.0; integrations that still require v1 must remain pinned to exactly 0.2.1.</li> </ul>"},{"location":"en/recipes/durable-local-state/","title":"English \u00b7 Durable local state","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/durable-local-state/#Recipe-Durable-Local-State-Substrate","title":"Recipe: Durable Local State Substrate","text":""},{"location":"en/recipes/durable-local-state/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to persist an event log while guaranteeing order and integrity, rebuild or verify a derived snapshot, and inspect or recover a cooperative single-writer lock.</p> <p>Not applicable: needs to define a workflow state machine in Foundation (forbidden); needs to resist same-privilege malicious processes (fencing does not promise this scenario).</p>"},{"location":"en/recipes/durable-local-state/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capability: <code>foundation.harness.state-store</code> (append-only events, hash chain, snapshot, and lock inspect/recover). Event meaning and reducer transitions are owned by the caller.</p>"},{"location":"en/recipes/durable-local-state/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li><code>STATE_GENESIS_DIGEST</code> as the chain starting point.</li> <li>Trust boundary: the event log is the sole authority, and the snapshot is a derived cache; <code>confirmOwnerTerminated</code> is an external trust anchor provided by the caller and does not promise resistance against same-privilege malicious processes.</li> </ul>"},{"location":"en/recipes/durable-local-state/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport {\n openStateStore,\n appendEvent,\n readEvents,\n writeSnapshot,\n readSnapshot,\n inspectStateStoreLock,\n recoverStateStoreLock,\n} from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-state-\"));\nconst store = openStateStore(root, { owner: \"writer-a\", expectedSchemas: [] });\nappendEvent(store, { eventType: \"demo\", payload: { n: 1 } });\nwriteSnapshot(store, readEvents(store));\nconst snap = readSnapshot(store);\nconst lock = inspectStateStoreLock(root); // { owner, fencing, ageMs, recovering }\nawait recoverStateStoreLock(root, {\n expectedOwner: lock.owner,\n expectedFencing: lock.fencing,\n confirmOwnerTerminated: true,\n});\n</code></pre> <p>The code above shows the order of opening the store, appending events, writing a snapshot, inspecting the lock, and explicitly recovering.</p>"},{"location":"en/recipes/durable-local-state/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>readEvents</code> returns the appended events, <code>readSnapshot</code> returns the derived snapshot, and <code>inspectStateStoreLock</code> returns <code>owner</code>/<code>fencing</code>/<code>ageMs</code>/<code>recovering</code>. Evidence: <code>packages/skill-family-harness-node/test/state-store.test.mjs</code> (with 34 assertions).</p>"},{"location":"en/recipes/durable-local-state/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: a second writer immediately receives store-locked\nconst other = openStateStore(root, { owner: \"writer-b\", expectedSchemas: [] });\n// throws HarnessError: details.kind = \"store-locked\"\n</code></pre> <p>A broken hash chain, a mismatched lock fencing, or recovery missing <code>confirmOwnerTerminated</code> all fail-closed.</p>"},{"location":"en/recipes/durable-local-state/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/state-store.test.mjs\n</code></pre>"},{"location":"en/recipes/durable-local-state/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Event business meaning, reducer transitions.</li> <li>The <code>confirmOwnerTerminated</code> trust anchor (confirm outside Foundation that the old writer has terminated).</li> </ul>"},{"location":"en/recipes/durable-local-state/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The state substrate provides only the mechanism; the business state machine / terminal state belongs to loop-agent.</li> <li>A crash-left lock requires external evidence-gathering before explicit recovery, with no silent lock-stealing; the system stays diagnosable as a lock-out rather than silently overwriting.</li> </ul>"},{"location":"en/recipes/host-profile-integration/","title":"English \u00b7 Host Profile integration","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/host-profile-integration/#Recipe-Host-Access-and-Profile-Injection","title":"Recipe: Host Access and Profile Injection","text":""},{"location":"en/recipes/host-profile-integration/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to describe a registered host (claude/codex), probe or plan host access, verify peer-adapter directories, or use the package API for digest-bound local install/update.</p> <p>Not applicable: needs Kit CLI apply, generic or remote apply, or automatic deleting uninstall; needs the full Qoder driver (that host is unsupported).</p>"},{"location":"en/recipes/host-profile-integration/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.kit.host</code> (<code>describeHost</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>verifyHostPeers</code> / <code>planHost</code> / <code>applyHostPlan</code>) and <code>foundation.profile.extension-spi</code> (<code>verifyProfile</code>). Host-difference declarations are in <code>foundation.profile.hosts</code>.</p>"},{"location":"en/recipes/host-profile-integration/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The host Profile is registered in <code>profiles/hosts</code>; from 0.11.0, the Kit package carries a managed projection of that closure. The only trusted drivers are <code>claude-version-v1</code> / <code>codex-version-v1</code>. Local install/update additionally require a verified build, a digest-consistent plan, a contained <code>targetRoot</code>, and an explicit <code>authorizationRef</code>.</li> <li>Trust boundary: the Profile entry point must be a JSON data resource, and the public core does not import <code>profiles/</code>; <code>coreOwned</code> is a forbidden target.</li> </ul>"},{"location":"en/recipes/host-profile-integration/#4-Minimal-Command-and-Code","title":"4. Minimal Command and Code","text":"<pre><code># Describe a registered host\nnpm exec -- skill-family-kit adopt-plan host-describe --host claude --hosts-root profiles/hosts\n\n# Read-only probe (no spawn by default)\nnpm exec -- skill-family-kit adopt-plan host-probe --host claude --hosts-root profiles/hosts\n</code></pre> <pre><code>import { bundledHostProfilesRoot, buildHostAdapter, describeHost, probeHost, planHost } from \"skill-family-engineering-kit\";\nimport { verifyProfile } from \"profiles/spi/index.mjs\";\n\nconst hostsRoot = bundledHostProfilesRoot();\nconst desc = await describeHost({ hostId: \"claude\", hostsRoot });\nconst facts = await probeHost({ hostId: \"claude\", hostsRoot, allowSpawn: false });\nconst build = await buildHostAdapter({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n input: {\n schemaVersion: 1,\n kind: \"skill-family.adapter-source\",\n skillFamilyId: \"example-family\",\n skills: [{ id: \"demo\", files: [{ path: \"SKILL.md\", content: \"# Demo\\n\" }] }],\n },\n hostsRoot,\n});\nconst plan = await planHost({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n buildManifest: build.manifest,\n probeFacts: facts.facts,\n hostsRoot,\n});\nconst spi = verifyProfile({ profileRoot: \"profiles/public-plugin\" }); // SPE0000\n</code></pre> <p>The commands explicitly select the workspace Profile root. The code resolves the canonical packaged root before describe/probe, in-memory build, and plan, then validates a Profile declaration through <code>verifyProfile</code>; none of these operations executes install/update.</p>"},{"location":"en/recipes/host-profile-integration/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>describeHost</code> returns the host description, <code>probeHost</code> returns read-only probe facts, <code>planHost</code> returns the access plan, and <code>verifyProfile</code> returns result codes such as <code>SPE0000</code>. Evidence: <code>packages/skill-family-engineering-kit/test/host.test.mjs</code> and <code>fixtures/generic-profile-extension-conformance/verify.mjs</code>.</p>"},{"location":"en/recipes/host-profile-integration/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code># Negative case: CLI apply stably refused\nnpm exec -- skill-family-kit adopt-plan host-apply --host claude --hosts-root profiles/hosts\n# exit code 2: host apply is not implemented in the read-only Phase D slice\n</code></pre> <pre><code>// Negative case: qoder is unsupported\ndescribeHost(\"qoder\"); // throws: support = \"unsupported\"\n</code></pre>"},{"location":"en/recipes/host-profile-integration/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-engineering-kit/test/host.test.mjs \\\n fixtures/generic-profile-extension-conformance/verify.mjs\n</code></pre>"},{"location":"en/recipes/host-profile-integration/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>The host's concrete business semantics.</li> <li>Business authorization and completion criteria for local install/update; manual recovery and file deletion for uninstall.</li> </ul>"},{"location":"en/recipes/host-profile-integration/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The package API <code>applyHostPlan</code> supports registered, digest-bound local install/update. Executing an uninstall plan only returns <code>manual-recovery-required</code> and does not delete files. Kit CLI apply, generic apply, and remote apply remain stably refused.</li> <li><code>verifyHostPeers</code> only performs read-only peer-adapter directory verification; it grants no install, release, or domain decision.</li> <li><code>bundledHostProfilesRoot()</code> only exposes the managed Profile root. Host APIs still require an explicit <code>hostsRoot</code>, and callers may select another conforming Profile root.</li> <li>The full Qoder driver is unsupported; only its structure is referenced, and it is not claimed to have been run on Qoder; adding a supported host on upgrade requires registering a descriptor and binding a trusted driver.</li> </ul>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/","title":"English \u00b7 Safe filesystem and atomic write","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#Recipe-Safe-File-Access-and-Atomic-Write","title":"Recipe: Safe File Access and Atomic Write","text":""},{"location":"en/recipes/safe-filesystem-and-atomic-write/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to constrain, within Node, an externally-provided path to within some root directory, and atomically write an ordinary file to a contained path, rolling back on failure without leaving residue.</p> <p>Not applicable: needs to put file-selection business rules into Foundation (business rules are owned by the caller); needs to write to an uncontained path.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.harness.path-containment</code> (path classification and contained resolution) and <code>foundation.harness.atomic-write</code> (atomic write within contained paths). Both implement only the mechanism, owning no semantics.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The caller provides an explicit root directory (containment boundary).</li> <li>Trust boundary: all resolution results must fall within the root directory; out-of-bounds, symlink escape, and realpath escape are all refused.</li> </ul>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { resolveContained, writeFileAtomic } from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-safe-\"));\nconst target = resolveContained(root, \"nested/config.json\"); // contained absolute path\nawait writeFileAtomic(target, JSON.stringify({ ok: true }));\n</code></pre> <p>The code above shows the basic order of first containing the path, then atomically writing; <code>writeFileAtomic</code> uses temp-file + fsync + rename, rolling back on failure.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>resolveContained</code> returns an absolute path within the root; <code>writeFileAtomic</code> writes the completed file, whose bytes are consistent with the input. Evidence: <code>packages/skill-family-harness-node/test/containment.test.mjs</code> and <code>test/atomic.test.mjs</code>.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: attempting to escape the root -&gt; SFC2004 (path-traversal)\nimport { resolveContained } from \"skill-family-harness-node\";\nresolveContained(root, \"../escape.json\"); // throws HarnessError, details.kind = \"path-traversal\"\n</code></pre> <p>Out-of-bounds, symlink-escape, and realpath-escape all map to <code>SFC2004</code> with a stable <code>details.kind</code>; atomic write throws on an out-of-bounds path or illegal data type and rolls back the temp file.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/containment.test.mjs \\\n packages/skill-family-harness-node/test/atomic.test.mjs\n</code></pre>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Which paths are business-allowed selection rules (not within Foundation).</li> <li>The business correctness of the written content.</li> </ul>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>Path containment and atomic write are contained mechanisms; on failure they roll back without leaving half-products, so no external rollback is needed.</li> <li>Upgrade follows the <code>skill-family-harness-node</code> version; <code>HARNESS_EXCLUSIONS</code> introduces no remote or git writes.</li> </ul>"},{"location":"en/reference/compatibility/","title":"English \u00b7 Compatibility","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/reference/compatibility/#Compatibility-and-Support-Matrix","title":"Compatibility and Support Matrix","text":"<p>This page records the current source versions, runtime support, and the one-time migration rule for historical candidate entrypoints. Package manifests, the Contracts registry, and the capability catalog are the machine authorities.</p>"},{"location":"en/reference/compatibility/#Current-Versions","title":"Current Versions","text":"Package Current source version Role <code>skill-family-contracts</code> 0.14.0 Contracts 1.14.0 machine contracts <code>skill-family-harness-node</code> 0.14.0 Node implementation of Contracts mechanisms <code>skill-family-engineering-kit</code> 0.14.0 Four engineering commands and build-time projection Private parent workspace 0.14.0 Sole development source of truth <p>The three leaf packages release in lockstep and must not be mixed. The Contracts specification and npm packages use separate version lines.</p>"},{"location":"en/reference/compatibility/#Two-Generation-Maturity-Rule","title":"Two-Generation Maturity Rule","text":"<p>Historical candidate APIs migrate once to canonical entrypoints. Legacy entrypoints continue to resolve to the same module during the compatibility window. Removing one requires a published deprecation, zero references in known real consumers, at least one release cycle, and a separate major-version decision.</p> <p>APIs introduced from 0.10.0 onward use their final canonical identity from the first candidate release. An active candidate upgrade can still require adaptation. Candidate-to-stable promotion, however, may change only the provider's compatibility promise. It cannot change the entrypoint, capability ID, Schema <code>$id</code>, operation, request, result, or error semantics. A consumer must still update all three exact package pins to obtain the newly published stable promise. Existing package-identity, source-digest, and provenance bindings determine whether a Bundle rebuild is required; the maturity label adds no separate rebuild condition. FND-ADR-016 and <code>CANDIDATE_PROMOTION_POLICY</code> define the machine rule.</p>"},{"location":"en/reference/compatibility/#Historical-Candidate-Migration-Matrix","title":"Historical Candidate Migration Matrix","text":"Historical coordinate or capability 0.10.0 migration target Current treatment <code>skill-family-contracts/candidate/quickstart-profile</code> <code>skill-family-contracts/quickstart-profile</code> Same source module; migrate once <code>skill-family-harness-node/candidate/quickstart-profile</code> <code>skill-family-harness-node/quickstart-profile</code> Same source module; operations unchanged <code>skill-family-harness-node/candidate/rename-directory-no-replace</code> <code>skill-family-harness-node/rename-directory-no-replace</code> Same source module; distinct from high-level fixed-set publication <code>skill-family-engineering-kit/candidate/quickstart-profile</code> <code>skill-family-engineering-kit/quickstart-profile</code> One-time Quickstart builder migration Adoption from the old Quickstart namespace <code>skill-family-engineering-kit/adoption</code> Responsibility-specific canonical entrypoint backed by the same source Package-local or projected skill-naming candidate <code>skill-family-engineering-kit/skill-naming</code> Canonical package entrypoint; no fifth Kit command 0.4.0 fixed-set candidate schemas and primitive 0.9.0 stable Schema <code>$id</code> values and <code>skill-family-harness-node/fixed-set-publication</code> Legacy schemas remain packaged while consumers migrate to the high-level API 0.9.0 <code>validate-many-by-schema-id</code> candidate schemas <code>/foundation-mechanisms/v1/schema-validation-batch-{request,result}.json</code> One canonical Schema copy; legacy and canonical IDs dispatch to the same compiled validator, with no operation or echoed-result change <p>The six Quickstart v2 identities for Resource, Task, Result, consumer inventory, and Harness surface inventory/detectors also migrate once from <code>/candidate/quickstart-profile/v2/</code> to <code>/quickstart-profile/v2/</code>. Contracts loaders return only canonical <code>$id</code> values. During the compatibility window, Bundles accept both old and new IDs without a second Schema set or a general alias registry.</p> <p>Quickstart v1 had already been replaced by v2 before 0.3.0. Consumers that still require v1 must remain pinned to 0.2.1. Version 0.10.0 neither rewrites historical artifacts nor repackages v1.</p>"},{"location":"en/reference/compatibility/#R05-and-legacy-platform-manifest-migration","title":"R05 and legacy platform-manifest migration","text":"<p>The R05 request/result Schemas are the sole structural owners of <code>logicalMappings</code>. A consumer keeps only fields that belong to its own domain, then removes duplicated closure, digest, and file-list structures after real-directory verification. It does not maintain permanent dual writes.</p> Legacy field Migration decision <code>familyId</code> Map to <code>skillFamilyId</code>. <code>platformId</code> Map to canonical <code>hostId</code> only after a registered Descriptor proves the identity. A request declaration is not proof. <code>version</code> Keep as the consumer package version. <code>sourceDigest</code> Map to <code>commonSourceClosure.digest</code>. <code>projectionDigest</code> No automatic equivalence; <code>manifest.digest</code> must not stand in for it. <code>fileCount</code> / <code>files</code> Derive from the standard manifest. The peer root's <code>skills/</code> does not include a legacy manifest in its parent directory; remove the old list after migration. <code>logicalMappings</code> Owned only by request/result. <code>lifecycleStatus</code> / <code>blocked</code> / <code>blockingReasons</code> / <code>advisories</code> Remain in the consumer domain. <code>verified</code> Does not derive product, Audit, or release state."},{"location":"en/reference/compatibility/#Node-and-Toolchain","title":"Node and Toolchain","text":"<ul> <li>Node: <code>&gt;=22.22.2 &lt;23</code>; <code>.node-version</code> fixes the exact floor at <code>22.22.2</code>.</li> <li>pnpm: <code>10.30.0</code>.</li> <li>projen: <code>0.101.23</code>, the sole generator for managed engineering files.</li> <li>Schema validator: Ajv <code>8.20.0</code>, supporting draft-07 and 2020-12.</li> </ul> <p>Results from Node below the floor or above the locked major cannot replace authoritative gate results.</p>"},{"location":"en/reference/compatibility/#Contracts-and-Engineering-Boundaries","title":"Contracts and Engineering Boundaries","text":"<ul> <li>The Contracts registry contains 42 top-level object classes and is the sole authority for that set.</li> <li>The stable kernel protocol is <code>skill-family.kernel.operation</code>; the Contracts specification is 1.14.0, while the kernel document remains byte-pinned at its 1.8.0 lifecycle coordinate.</li> <li>Error codes are append-only and are never reassigned.</li> <li>Kit top-level commands remain <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, and <code>check</code>.</li> <li>Host apply, install/update/uninstall, a full Qoder driver, remote publication, business state machines, model orchestration, and domain-audit semantics are outside the stable support surface. Local install/update remain within the 0.10.0 unstable plan-API boundary; an unsupported host receives no automatic lifecycle capability and no remote-publication guarantee.</li> </ul> <p>Current host support comes from the capability catalog, Profile descriptors, and real drivers. A directory convention or CLI identity alone does not establish a supported lifecycle.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/","title":"English \u00b7 Failures and side effects","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Failure-and-Side-Effect-Matrix","title":"Failure and Side-Effect Matrix","text":"<p>This page lists, per public entry point, read/write, spawn, Git, network, residual state, and stable error codes. It serves callers judging risk before integrating, and is the human-readable projection of the <code>sideEffects</code> and <code>failureSemantics</code> fields in <code>capability-catalog.json</code>. All facts are based on the real implementation and negative tests.</p> <p>Symbol convention: read = reads the filesystem; write = writes the filesystem; spawn = launches a subprocess; Git = reads/writes Git; network = accesses a remote; residual = state still left on disk/in-process after the call ends.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Contracts-Pure-Function-Layer","title":"Contracts (Pure-Function Layer)","text":"Entry read write spawn Git network residual state stable error code <code>validateDocument</code> no no no no no none (compile cache memory-resident only) <code>SFC1001</code>/<code>SFC1002</code>/<code>SFC1006</code> <code>compileSchema</code> / <code>detectDialect</code> no no no no no none <code>SFC1006</code>/<code>SFC1012</code> <code>loadRegistry</code> / <code>findSchemaByObject</code> / <code>findProtocol</code> no no no no no none <code>SFC1003</code>/<code>SFC1004</code> <code>runChecks</code> / <code>collectUnresolvedRefs</code> no no no no no none <code>SFC1002</code>\u2013<code>SFC1010</code> <code>verifyAllFixtures</code> / <code>verifyFixture</code> no no no? no no no none <code>SFC1010</code> <code>ERROR_CODES</code> / <code>stableError</code> no no no no no none frozen registry, no additions <p>Contracts are all pure functions, with no file/Git/network/process side effects; error objects contain <code>stableError</code> and <code>details.kind</code> for easy caller classification.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Harness-Mechanism-Layer-Contained","title":"Harness (Mechanism Layer, Contained)","text":"Entry read write spawn Git network residual state stable error code <code>validateContractDocument</code> no no no no no none (validator cache in memory) <code>SFC</code> validation failure <code>resolveContained</code> / <code>readFileContained</code> yes (read-only) no no no no none <code>SFC2004</code> (<code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>) <code>writeFileAtomic</code> no yes (contained) no no no failed rollback temp file <code>SFC2004</code> (<code>atomic-write-failed</code>) <code>TemporaryWorkspace</code> / <code>withTemporaryWorkspace</code> no yes (temp directory) no no no temp directory cleaned on exit <code>SFC2004</code> (<code>workspace-disposed</code>) <code>computeResourceClosure</code> / <code>digestBytes</code> no no no no no none <code>SFC</code> (declaration/content violation) <code>parseRequest</code> / <code>processRequest</code> no no no no no none (pure-function pipeline) <code>SFC2004</code> <code>validateReportModel</code> / <code>renderReportMarkdown</code> / <code>buildBinding</code> / <code>checkReport</code> no no no no no none (pure function) <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>buildAdapterClosure</code> / <code>verifyAdapterBuildManifest</code> no no no no no none <code>SFC2004</code> (<code>missing-resource</code>) <code>verifyPeerAdapterDirectories</code> yes (bound peer roots) no no no no none <code>SFC2003</code>/<code>SFC2004</code> (identity, mapping, closure, or path failure) <code>materializeAdapterBuild</code> no yes (contained, sibling + rename) no no no none (atomic rename) <code>SFC2004</code> <code>probeVersionVector</code> no no default no (requires explicit <code>--allow-host-spawn</code>) no no none <code>SFC2004</code> <code>openStateStore</code> / <code>appendEvent</code> / <code>readEvents</code> / <code>writeSnapshot</code> yes yes (event/snapshot/lock files) no no no event log + lock file <code>SFC2004</code> (<code>store-locked</code>/chain broken) <code>inspectStateStoreLock</code> / <code>recoverStateStoreLock</code> yes yes (recovery write-lock only) no no no lock file (monotonic fencing) <code>SFC2004</code> <code>runMechanismCliBatch</code> / <code>mechanisms-cli.mjs --batch</code> (since 0.19.0, candidate) no no no no no none (only the caller-provided output/error streams are written) exit code 0 (all succeeded) / 2 (at least one item failed or whole batch refused); <code>details.kind</code> closed to <code>batch-structure-invalid</code>/<code>batch-item-limit</code>/<code>batch-input-limit</code>/<code>batch-output-limit</code> <p>The failure stage determines the observable effects of the batch entry point. Request-byte, item-count, and structure preflight rejection invokes no mechanism and leaves stdout empty. Output capacity can be checked only after the current item returns, so that item may already have executed; later items are not executed and stdout remains empty. An output-channel failure may leave partial bytes sent and returns 2. If the error channel also fails, delivery of the error object is not guaranteed.</p> <p>Harness's <code>HARNESS_EXCLUSIONS</code> explicitly excludes release-state, remote-network-access, business-semantics, workflow-orchestration, model-calls, git-writes.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Engineering-Kit-Engineering-Command-Layer","title":"Engineering Kit (Engineering Command Layer)","text":"Entry read write spawn Git network residual state stable error code / exit code <code>scaffoldTarget</code> no yes (contained skeleton, atomic + contained) no no no none (no half-product on failure) <code>SFC2004</code> (<code>target-not-empty</code>) <code>planAdoption</code> yes no default may spawn one frozen read-only Git status probe (disableable) read-only probe no none (stdout output) <code>SFC</code> completion false <code>buildProfileDraft</code> no no no no no none (stdout output) <code>SFC</code> completion false <code>runProjection</code> yes (reads manifest) yes (managed path, two-phase) no no no none (zero write/rollback on failure) <code>SFC2004</code> (<code>unauthorized-path</code>/<code>handwritten-overwrite</code>/<code>conflict-drift</code>) <code>runChecks</code> (<code>check</code>) yes no default may spawn one frozen read-only Git status probe; <code>--no-git-spawn</code> disables it read-only allowlist no none exit code 1 (findings) / 2 (mechanism) <code>check relock</code> yes yes (explicit controlled write) no no no controlled relock transaction state exit code 0/1/2 <code>check qualification</code> / <code>runQualification</code> reads request and bindings writes private evidence under caller-bound roots yes, after preflight no bound executable may access the network evidence is retained when the end state is indeterminate exit code 0/1/2; four-state result <code>runPluginVerification</code> yes (bound roots) yes (fresh workspace, host state, private evidence) yes, local executable only no bound executable may access the network uncertain evidence is retained four-state <code>plugin-verification-result</code> <code>runSkillFamilyDirectoryVerification</code> yes (bound roots) yes (private raw evidence) yes, local executable only no bound executable may access the network uncertain evidence is retained four-state directory result <code>renderReportAction</code> / <code>checkReportAction</code> yes only <code>--out</code>/<code>--binding</code> no no no default stdout only <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>probeGitState</code> / <code>probeGitFacts</code> yes no default may spawn one frozen read-only Git subprocess; disableable read-only allowlist no none <code>SFC</code> (over-privileged parameter refused) <code>describeHost</code> / <code>resolveHostId</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>verifyHostPeers</code> / <code>planHost</code> yes build writes (contained) probe default no no no none <code>SFC2003</code>/<code>SFC2004</code> <code>applyHostPlan</code> yes bounded local install/update no no no staging is cleaned; result records partial/indeterminate publication <code>SFC2003</code>/<code>SFC2004</code>; uninstall returns <code>manual-recovery-required</code> without deleting <code>loadLicensingProfile</code> / <code>generateLicenseContent</code> etc. no no (pure-function generation) no no no none <code>SFC</code> (illegal Profile) <code>checkIdentityDrift</code> / <code>validateIdentityAgainstProfile</code> yes no no no no none findings <code>cliMain</code> / <code>runCommand</code> per action per action per action per action per action (bound executable may access the network) per action exit code 0/1/2 <p>Kit's <code>FORBIDDEN_SIDE_EFFECTS</code> includes git-init/commit/push/tag, publish, remote-write; <code>REFUSED_MUTATION_FLAGS</code> (including <code>--apply</code>) are refused at the CLI entry point. The package API <code>applyHostPlan</code> does not add a fifth command or grant generic/remote apply.</p> <p>Foundation itself does not issue network requests, but a bound executable may access the network. Foundation provides no sandbox or egress blocking; callers and the execution environment own that isolation. The Qoder, WorkBuddy, and Kimi entries remain <code>manual/candidate</code>; controlled fixtures prove production wiring only and do not grant real-host qualification.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Residual-State-Collection","title":"Residual-State Collection","text":"<ul> <li>Atomic write: on failure, rolls back the temp file, leaving no half-product in the target directory.</li> <li>Temporary workspaces are cleaned on exit, including exception paths.</li> <li>State store: the event log is the sole authority, and the snapshot is a derived cache; a crash-left lock requires the caller, outside Foundation, to confirm the old writer has terminated before explicitly recovering; no silent lock-stealing.</li> <li>Projection: any validation failure rejects wholesale, zero writes; overwriting an existing file requires declaring the <code>expect.sha256</code> pre-state.</li> <li>adopt-plan, ordinary runChecks, and ordinary check are structurally read-only and write no files; by default they may spawn one frozen read-only Git status subprocess, disabled by <code>--no-git-spawn</code> (or API <code>allowGitSpawn: false</code>), with byte-level zero change before and after running. The side effects of check relock and check qualification are listed above.</li> </ul>"},{"location":"en/reference/failure-and-side-effect-matrix/#What-the-Caller-Should-Do-After-Failure","title":"What the Caller Should Do After Failure","text":"<ul> <li>Validation failure (<code>SFC1001</code>/<code>SFC2002</code>/<code>SFC2003</code>): check whether the input satisfies the target Schema or parameter contract; do not retry a registration that has been frozen-refused.</li> <li>Containment failure (<code>SFC2004</code> + <code>path-traversal</code>, etc.): confirm whether the root directory and path are out of bounds; do not cram business-selection rules into Foundation.</li> <li>State-lock conflict (<code>store-locked</code>): outside Foundation, confirm the old writer has terminated, then call recovery with the exactly-matching owner/fencing.</li> <li>check findings (exit code 1): address the findings; Kit does not auto-fix.</li> </ul>"},{"location":"en/reference/api/","title":"English \u00b7 API reference","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/reference/api/#Public-API-Reference","title":"Public API Reference","text":"<p>This page is the English entry point for the public APIs of the three Foundation packages. It is a human-readable route into the machine facts in the capability catalog; package exports, schemas, protocols, and stable error codes remain authoritative.</p>"},{"location":"en/reference/api/#Choose-the-Owning-Layer","title":"Choose the Owning Layer","text":"Package Use it for Start with <code>skill-family-contracts</code> Object schemas, protocol registries, validation, stable error codes, fixtures, and deterministic audit surfaces <code>foundation.contracts.object-validation</code>, <code>foundation.contracts.registry-protocol</code>, <code>foundation.contracts.audit-surface</code> <code>skill-family-harness-node</code> Business-neutral Node mechanisms such as contained paths, atomic writes, subprocess requests, durable local state, and deterministic reports <code>foundation.harness.path-containment</code>, <code>foundation.harness.atomic-write</code>, <code>foundation.harness.state-store</code>, <code>foundation.harness.report</code> <code>skill-family-engineering-kit</code> The four engineering commands and controlled host/Profile integration <code>foundation.kit.scaffold</code>, <code>foundation.kit.adopt-plan</code>, <code>foundation.kit.projection</code>, <code>foundation.kit.check</code>, <code>foundation.kit.host-integration</code> <p>The dependency direction is Contracts \u2192 Harness \u2192 Engineering Kit. A Profile declares host or project-shape differences horizontally; public core code does not depend on a concrete Profile.</p>"},{"location":"en/reference/api/#Verified-Capability-Details","title":"Verified Capability Details","text":"<p>Use the following public data files before selecting an entry point:</p> <ol> <li>Core capability facts contain stable IDs, packages, layers, entry points, stability, source references, and test references.</li> <li>English capability explanations add intent, use and non-use conditions, inputs, outputs, failure semantics, caller ownership, and external routing for the same IDs.</li> <li>Catalog schema defines the closed structure of both files.</li> </ol> <p>The failure and side-effect matrix compares filesystem, process, Git, network, residual-state, and error behavior across public entry points. The architecture routing guide starts from design intent when the package or capability is not yet known.</p>"},{"location":"en/reference/api/#Key-Failure-Rules","title":"Key Failure Rules","text":"<ul> <li>Contracts document validation returns <code>{ valid: false, errorCode, errors }</code> for ordinary validation failures. Callers inspect <code>valid</code>; <code>validateDocument</code> does not turn those failures into exceptions.</li> <li>Harness mechanism failures use <code>SFC2004</code> (<code>EXECUTION_FAILED</code>) and distinguish the failure with a frozen <code>details.kind</code> value.</li> <li>Engineering Kit keeps exactly four top-level commands: <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, and <code>check</code>. Each command retains its documented read-only or controlled-write boundary.</li> <li>Candidate capabilities are marked <code>stability: candidate</code> in the catalog. Their presence in the public package does not promote them to the stable surface.</li> </ul>"},{"location":"en/reference/api/#Quickstart-Profile-v2-Candidate","title":"Quickstart Profile v2 Candidate","text":"<p>All three packages expose v2 through their existing candidate subpaths. Contracts defines the business-neutral <code>execute-method</code> exchange, Harness verifies bytes and bindings, and Kit turns explicit consumer schemas into an offline Bundle with standalone validators selected by schema <code>$id</code>. Version 0.3.0 candidate v2 is incompatible with the 0.2.1 candidate v1; consumers must pin the selected package versions exactly.</p>"},{"location":"en/reference/api/#Detailed-Package-Pages","title":"Detailed Package Pages","text":"<p>The current signature-level package pages are maintained in Chinese because they enumerate every verified export and test reference:</p> <ul> <li>Contracts API details</li> <li>Harness API details</li> <li>Engineering Kit API details</li> </ul> <p>These pages are part of the same public site and link to source and test evidence. The English catalog overlay provides the complete English intent and failure semantics for every capability, so an agent can route and design against Foundation without inferring meaning from the Chinese prose.</p>"},{"location":"en/reference/api/#Boundary","title":"Boundary","text":"<p>Foundation does not own domain schemas, business state machines, audit conclusions, task/retry orchestration, artifact relationships, or remote publishing. Keep those semantics with the caller, or route them to the external project named by the capability catalog.</p>"},{"location":"integration/audit/","title":"\u72ec\u7acb\u5ba1\u8ba1\u96c6\u6210\uff08FND-060\uff09","text":"<p>\u672c\u76ee\u5f55\u662f\u72ec\u7acb\u5ba1\u8ba1\uff08Audit\uff09\u6d88\u8d39\u5df2\u53d1\u5e03 Contracts \u7684\u6700\u5c0f\u96c6\u6210\u9762\u3002\u5ba1\u8ba1\u7684\u804c\u8d23\u662f\uff1a\u4ee5\u72ec\u7acb\u4e8e\u751f\u6210\u5668\u4e0e oracle \u7684 fixture\u3001\u9884\u671f\u503c\u548c\u88c1\u51b3\uff0c\u9a8c\u8bc1\u88ab\u6d88\u8d39\u7684 <code>skill-family-contracts</code> \u5305\u6ca1\u6709\u88ab\u7be1\u6539\u3001\u524a\u5f31\u6216\u6f0f\u68c0\u3002</p>"},{"location":"integration/audit/#\u6743\u5a01\u8fb9\u754c","title":"\u6743\u5a01\u8fb9\u754c","text":"<ul> <li>\u5ba1\u8ba1\u53ea\u6d88\u8d39 Contracts \u7684\u516c\u5f00\u63a5\u53e3\uff08<code>describeAuditSurface</code>\u3001<code>validateDocument</code>\u3001<code>checkOperation</code>\u3001<code>findProtocol</code>\u3001<code>isRegisteredErrorCode</code>\u3001<code>digestDocument</code> \u7b49\uff09\uff0c\u4f9d\u8d56\u65b9\u5411\u6052\u4e3a Audit \u2192 Contracts\uff1b</li> <li>\u5ba1\u8ba1\u4e0d\u4f9d\u8d56 engineering-kit\uff0c\u4e5f\u4e0d\u4f9d\u8d56 harness\uff08\u89c1 independence.md \u7684\u673a\u68b0\u8bc1\u660e\uff09\uff1b</li> <li>Contracts \u4e0d\u53cd\u5411\u4f9d\u8d56\u5ba1\u8ba1\uff1aContracts \u4fa7\u53ea\u65b0\u589e\u4e86\u53ea\u8bfb\u6295\u5f71\u6a21\u5757 <code>src/audit-surface.mjs</code>\uff0c\u4e0d\u63a5\u53d7\u4efb\u4f55\u56de\u8c03\u3001\u6ce8\u518c\u6216\u5ba1\u8ba1\u4fa7\u8f93\u5165\uff1b</li> <li>\u5ba1\u8ba1 fixture\u3001\u9884\u671f\u4e0e\u88c1\u51b3\u5168\u90e8\u7531\u4ea7\u54c1\u4fa7\u7ef4\u62a4\uff08\u5939\u5177 provenance <code>product-fixture</code>\uff0cpin provenance <code>product-compatibility-fixture</code>\uff09\uff0c\u4e0d\u590d\u7528\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\uff0c\u4e5f\u4e0d\u8bfb\u53d6 oracle \u5224\u636e\uff08\u8be5\u9694\u79bb\u7531 independence.md \u7684\u673a\u68b0\u8bc1\u660e\u5f3a\u5236\uff09\u3002</li> </ul>"},{"location":"integration/audit/#\u76ee\u5f55\u7ed3\u6784","title":"\u76ee\u5f55\u7ed3\u6784","text":"<pre><code>docs/integration/audit/\n README.md \u672c\u6587\u4ef6\n mutation-taxonomy.md \u4e94\u7c7b\u53d8\u5f02\u5206\u7c7b\u5b66\uff08\u51bb\u7ed3\uff09\n failure-evidence.md \u5931\u8d25\u8bc1\u636e\u683c\u5f0f\u4e0e AUD \u7801\u767b\u8bb0\u8868\n version-compatibility.md \u7248\u672c\u517c\u5bb9\u5b9a\u4e49\n isolation-and-lockfile.md \u9694\u79bb\u5b89\u88c5\u4e0e\u5305\u9501\u9a8c\u8bc1\u8bbe\u8ba1\n independence.md \u72ec\u7acb\u6027\u58f0\u660e\u4e0e\u673a\u68b0\u8bc1\u660e\n schemas/audit-evidence.schema.json \u8bc1\u636e\u6587\u6863\u7684 JSON Schema\uff08\u5ba1\u8ba1\u81ea\u6709\uff09\n baseline/contracts-1.15.0.pin.json Contracts 1.15.0 \u5f53\u524d\u57fa\u7ebf pin\uff08\u6458\u8981+\u4e8b\u5b9e\uff09\n baseline/contracts-1.14.0.pin.json Contracts 1.14.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.13.0.pin.json Contracts 1.13.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.12.0.pin.json Contracts 1.12.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.11.0.pin.json Contracts 1.11.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.10.0.pin.json Contracts 1.10.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.9.0.pin.json Contracts 1.9.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.8.0.pin.json Contracts 1.8.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.6.0.pin.json Contracts 1.6.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.5.0.pin.json Contracts 1.5.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.1.1.pin.json Contracts 1.1.1 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.1.0.pin.json Contracts 1.1.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.0.0.pin.json Contracts 1.0.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/audit-codes.json AUD \u7801\u767b\u8bb0\u8868\uff08append-only\uff09\n fixtures/{structure,semantics,digest,omission,engine}/ 18 \u4e2a\u53d8\u5f02 fixture\n runner/ \u5ba1\u8ba1\u8fd0\u884c\u5668\uff08\u53ea\u8bfb\uff0c\u8bc1\u636e\u8f93\u51fa\u5230 stdout\uff09\n</code></pre>"},{"location":"integration/audit/#\u8fd0\u884c","title":"\u8fd0\u884c","text":"<pre><code># \u5b8c\u6574\u7ba1\u7ebf\uff1a\u72ec\u7acb\u6027\u8bc1\u660e \u2192 \u5305\u9501\u9a8c\u8bc1 \u2192 \u53d8\u5f02\u91cd\u653e \u2192 \u6f0f\u62a5\u8d1f\u4f8b\u81ea\u68c0\nnode docs/integration/audit/runner/run-all.mjs\n\n# \u5206\u6b65\u8fd0\u884c\nnode docs/integration/audit/runner/proof-independence.mjs # \u72ec\u7acb\u6027\u673a\u68b0\u8bc1\u660e\nnode docs/integration/audit/runner/verify-lock.mjs # \u6d88\u8d39\u5305 pin/\u9501\u9a8c\u8bc1\nnode docs/integration/audit/runner/run-audit.mjs # \u53d8\u5f02\u91cd\u653e + \u8bc1\u636e\nnode docs/integration/audit/runner/selftest-negative.mjs # \u6f0f\u62a5\u8d1f\u4f8b\u63a7\u5236\n</code></pre> <p>\u9000\u51fa\u7801\u7ea6\u5b9a\uff1a<code>0</code> \u901a\u8fc7\uff1b<code>1</code> \u6709\u53d1\u73b0\uff08verdict fail\uff09\uff1b<code>2</code> \u7528\u6cd5\u6216\u673a\u5236\u9519\u8bef\u3002\u6240\u6709\u62a5\u544a\u4ee5 JSON \u8f93\u51fa\u5230 stdout\uff0c\u8fd0\u884c\u5668\u5bf9\u4ed3\u5e93\u96f6\u5199\u5165\u3002</p>"},{"location":"integration/audit/#\u88c1\u51b3\u89c4\u5219","title":"\u88c1\u51b3\u89c4\u5219","text":"<ul> <li>\u4e94\u7c7b\u53d8\u5f02\uff08\u7ed3\u6784\u3001\u8bed\u4e49\u3001\u6458\u8981\u3001\u9057\u6f0f\u3001\u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31\uff09\u6bcf\u7c7b\u81f3\u5c11 3 \u4e2a fixture\uff0c\u4e14\u81f3\u5c11\u68c0\u51fa 1 \u4e2a\uff1b</li> <li>\u4efb\u4e00\u7c7b\u6f0f\u62a5\u5373\u5931\u8d25\uff1a\u8986\u76d6\u95e8\uff08AUD-MISS-001\uff09\u673a\u68b0\u5f3a\u5236\uff0c\u6f0f\u62a5\u7c7b\u7684\u5b58\u5728\u4f7f\u6574\u4f53 verdict \u5fc5\u4e3a fail\uff1b</li> <li>\u4efb\u4e00 fixture \u672a\u88ab\u5982\u9884\u671f\u68c0\u51fa\u3001\u57fa\u7ebf pin \u6f02\u79fb\u3001fixture \u4fe1\u5c01\u4e0d\u5408\u6cd5\uff0c\u90fd\u4ea7\u751f mandatory \u7ea7\u53d1\u73b0\u5e76\u4f7f verdict fail\u3002</li> </ul>"},{"location":"integration/audit/failure-evidence/","title":"\u5931\u8d25\u8bc1\u636e\u683c\u5f0f\u4e0e AUD \u7801\u767b\u8bb0\u8868","text":"<p>\u5ba1\u8ba1\u53d1\u73b0\u5fc5\u987b\u4ee5\u673a\u5668\u53ef\u8bfb\u7684\u8bc1\u636e\u6587\u6863\u8bb0\u5f55\u3002\u8bc1\u636e\u6587\u6863\u7531 <code>runner/run-audit.mjs</code> \u8f93\u51fa\u5230 stdout\uff0c\u683c\u5f0f\u7531 schemas/audit-evidence.schema.json \u51bb\u7ed3\uff0c\u5e76\u901a\u8fc7\u88ab\u6d88\u8d39 Contracts \u7684 <code>validateDocument</code>\uff082020-12 \u65b9\u8a00\u3001strict \u7b56\u7565\uff09\u81ea\u6821\u9a8c\u2014\u2014\u8bc1\u636e\u6587\u6863\u672c\u8eab\u4e0d\u5408\u683c\u662f\u673a\u5236\u9519\u8bef\uff08\u9000\u51fa\u7801 2\uff09\u3002</p>"},{"location":"integration/audit/failure-evidence/#\u8bc1\u636e\u6587\u6863\u5f62\u72b6","title":"\u8bc1\u636e\u6587\u6863\u5f62\u72b6","text":"<pre><code>{\n \"schemaVersion\": 1,\n \"kind\": \"skill-family.audit.evidence\",\n \"auditId\": \"fnd-060-independent-audit\",\n \"generatedAt\": \"RFC 3339 date-time\",\n \"consumer\": {\n \"contractsVersion\": \"1.0.0\",\n \"auditSurfaceVersion\": 1,\n \"surfaceDigest\": { \"algorithm\": \"sha256\", \"value\": \"64 \u4f4d\u5341\u516d\u8fdb\u5236\" }\n },\n \"verdict\": \"pass | fail\",\n \"classCoverage\": {\n \"&lt;class&gt;\": { \"fixtures\": 0, \"detected\": 0, \"required\": 3, \"satisfied\": false }\n },\n \"fixtureResults\": [\n { \"fixtureId\": \"AUD-M1-01\", \"mutationClass\": \"structure\", \"expectedAuditCode\": \"AUD-M1-STRUCT\", \"detected\": true, \"observed\": {} }\n ],\n \"findings\": [\n {\n \"findingId\": \"F-0001\",\n \"auditCode\": \"AUD-BASE-001\",\n \"severity\": \"mandatory\",\n \"mutationClass\": null,\n \"fixtureId\": null,\n \"detected\": true,\n \"summary\": \"\u4eba\u7c7b\u53ef\u8bfb\u6458\u8981\",\n \"details\": {}\n }\n ]\n}\n</code></pre> <p>\u8981\u70b9\uff1a</p> <ul> <li><code>consumer</code> \u7528\u7248\u672c\u5750\u6807 + surface \u6458\u8981\u9489\u6b7b\u88ab\u6d88\u8d39\u7684 Contracts \u5305\uff0c\u8bc1\u636e\u56e0\u6b64\u53ef\u56de\u6eaf\u5230\u7cbe\u786e\u5b57\u8282\uff1b</li> <li><code>fixtureResults</code> \u662f\u5168\u90e8 fixture \u7684\u91cd\u653e\u8bb0\u5f55\uff08\u542b\u901a\u8fc7\u9879\uff09\uff0c<code>findings</code> \u53ea\u6536\u8fdd\u89c4\u9879\uff1b</li> <li>v1 \u51bb\u7ed3\u5355\u4e00\u4e25\u91cd\u7ea7 <code>mandatory</code>\uff1a\u4efb\u4f55\u53d1\u73b0\u90fd\u4f7f <code>verdict</code> \u4e3a <code>fail</code>\uff1b</li> <li><code>classCoverage</code> \u4e94\u7c7b\u9f50\u5168\uff1b<code>satisfied = fixtures \u2265 3 \u4e14 detected \u2265 1</code>\u3002</li> </ul>"},{"location":"integration/audit/failure-evidence/#\u88c1\u51b3\u89c4\u5219","title":"\u88c1\u51b3\u89c4\u5219","text":"<ol> <li><code>findings</code> \u4e3a\u7a7a \u2192 <code>verdict = pass</code>\uff0c\u9000\u51fa\u7801 0\uff1b</li> <li>\u4efb\u4e00\u53d1\u73b0\u5b58\u5728 \u2192 <code>verdict = fail</code>\uff0c\u9000\u51fa\u7801 1\uff1b</li> <li>\u7528\u6cd5\u6216\u673a\u5236\u9519\u8bef\uff08\u542b\u8bc1\u636e\u81ea\u6821\u9a8c\u5931\u8d25\uff09\u2192 \u9000\u51fa\u7801 2\uff0c\u4e0d\u4ea7\u751f\u8bc1\u636e\u6216\u4ea7\u751f\u4f5c\u5e9f\u8bc1\u636e\uff1b</li> <li>\u6f0f\u62a5\u5f8b\uff1a\u4efb\u4e00\u7c7b <code>satisfied = false</code> \u5fc5\u987b\u4ea7\u751f AUD-MISS-001 \u53d1\u73b0\uff0c\u6574\u4f53 verdict \u5fc5\u4e3a fail\u3002</li> </ol>"},{"location":"integration/audit/failure-evidence/#AUD-\u7801\u767b\u8bb0\u8868append-only","title":"AUD \u7801\u767b\u8bb0\u8868\uff08append-only\uff09","text":"<p>\u5ba1\u8ba1\u7801\u5c5e\u4e8e\u5ba1\u8ba1\u81ea\u6709\u547d\u540d\u7a7a\u95f4 <code>AUD-</code>\uff0c\u4e0d\u8fdb\u5165 Contracts \u7684 SFC \u767b\u8bb0\uff1b\u5ba1\u8ba1\u5bf9 SFC \u7801\u53ea\u8bfb\u6d88\u8d39\u3002\u673a\u5668\u53ef\u8bfb\u526f\u672c\u89c1 baseline/audit-codes.json\u3002</p> \u7801 \u540d\u79f0 \u542b\u4e49 AUD-M1-STRUCT STRUCTURE_MUTATION_DETECTED \u7ed3\u6784\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u89c2\u5bdf\u7801\u7b49\u4e8e\u9884\u671f\u7a33\u5b9a\u7801\uff09 AUD-M2-SEM SEMANTIC_MUTATION_DETECTED \u8bed\u4e49\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa AUD-M3-DIGEST DIGEST_MISMATCH_DETECTED \u6458\u8981\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u89c4\u8303\u5316\u6458\u8981\u4e0e pin \u4e0d\u4e00\u81f4\uff09 AUD-M4-OMIT OMISSION_DETECTED \u9057\u6f0f\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u7f3a\u5931\u6e05\u5355\u4e0e\u9884\u671f\u4e00\u81f4\uff09 AUD-M5-ENGINE ENGINE_WEAKENING_DETECTED \u5f15\u64ce\u524a\u5f31\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u88ab\u524a\u5f31\u5b57\u6bb5\u4e0e\u9884\u671f\u4e00\u81f4\uff09 AUD-MISS-001 MUTATION_CLASS_MISSED \u67d0\u7c7b fixture \u6570\u4f4e\u4e8e\u51bb\u7ed3\u4e0b\u9650\u6216\u96f6\u68c0\u51fa\uff1b\u6f0f\u62a5\u5373\u6574\u4f53\u5931\u8d25 AUD-BASE-001 BASELINE_DRIFT \u6d88\u8d39\u7684 Contracts \u6d3b\u8dc3 surface \u4e0e\u51bb\u7ed3\u57fa\u7ebf pin \u4e0d\u4e00\u81f4 AUD-FMT-001 EVIDENCE_OR_FIXTURE_FORMAT_INVALID fixture \u4fe1\u5c01\u6216\u8bc1\u636e\u6587\u6863\u683c\u5f0f\u975e\u6cd5 AUD-LOCK-001 LOCK_VERIFICATION_FAILED \u6d88\u8d39\u5305\u7684\u8eab\u4efd\u3001\u4f9d\u8d56\u95ed\u5305\u6216 pin \u5bf9\u6bd4\u5931\u8d25 AUD-IND-001 INDEPENDENCE_VIOLATION \u5ba1\u8ba1\u8bfb\u53d6\u6216\u5bfc\u5165\u8d8a\u51fa\u5141\u8bb8\u96c6\u5408 <p>\u767b\u8bb0\u7eaa\u5f8b\uff1a\u7801\u53ea\u589e\u4e0d\u6539\u4e0d\u590d\u7528\uff1b\u65b0\u589e\u7801\u5fc5\u987b\u540c\u6b65\u66f4\u65b0\u672c\u8868\u4e0e <code>baseline/audit-codes.json</code>\uff0c\u4e14\u4e0d\u5f97\u4e0e SFC \u547d\u540d\u7a7a\u95f4\u4ea7\u751f\u4efb\u4f55\u4ea4\u53c9\u62e5\u6709\u3002</p>"},{"location":"integration/audit/independence/","title":"\u72ec\u7acb\u6027\u58f0\u660e\u4e0e\u673a\u68b0\u8bc1\u660e","text":"<p>FND-060 \u7684\u9a8c\u6536\u8981\u6c42\uff1a\u5ba1\u8ba1 fixture\u3001\u9884\u671f\u503c\u548c\u88c1\u51b3\u4e0d\u6765\u81ea\u751f\u6210\u5668\uff1bAudit \u4e0d\u4f9d\u8d56 Kit\u3002\u672c\u9875\u7684\u73b0\u884c\u4e8b\u5b9e\u662f\uff1a\u672c\u4ed3\u5e93\u4e0d\u5b58\u5728\u72ec\u7acb\u7684\u7b2c\u4e8c\u5ba1\u9605\u4f1a\u8bdd\uff0c\u5ba1\u8ba1\u6811\u662f\u4ea7\u54c1\u4fa7\u7684\u673a\u68b0\u9a8c\u8bc1\u8bbe\u65bd\u3002\u673a\u68b0\u8bc1\u660e\u80fd\u591f\u8bc1\u660e\u7684\u662f\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u4e0e\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\uff1b\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002</p>"},{"location":"integration/audit/independence/#provenance-\u73b0\u884c\u4e8b\u5b9e","title":"provenance \u73b0\u884c\u4e8b\u5b9e","text":"<ul> <li>\u5168\u90e8 18 \u4e2a\u53d8\u5f02 fixture \u7684 provenance \u4e3a <code>product-fixture</code>\uff1a\u4ea7\u54c1\u4fa7\u7ef4\u62a4\u7684\u6d4b\u8bd5\u8bed\u6599\u3002\u9884\u671f\u7531\u4ea7\u54c1\u4fa7\u5bf9\u7167\u5408\u540c\u6587\u6863\u63a8\u5bfc\uff08schema \u7ea6\u675f required/pattern/additionalProperties\u3001\u767b\u8bb0\u8868\u6210\u5458\u8d44\u683c\u3001kernel \u8bcd\u8868\u4e0e params \u5951\u7ea6\u3001\u9519\u8bef\u7801 append-only \u8bed\u4e49\uff09\uff0c\u4e0d\u590d\u7528\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\uff0c\u4e0d\u8bfb\u53d6 oracle \u5224\u636e\uff1b\u8fd9\u4e00\u8f93\u5165\u9694\u79bb\u7531\u4e0b\u65b9 P4/P5/P6 \u673a\u68b0\u5f3a\u5236\u3002</li> <li>\u57fa\u7ebf pin \u7684 provenance \u4e3a <code>product-compatibility-fixture</code>\uff1a\u4ea7\u54c1\u4fa7\u7ef4\u62a4\u7684\u517c\u5bb9\u57fa\u7ebf\u3002\u6458\u8981\u6765\u81ea\u5bf9\u5df2\u51bb\u7ed3\u4ea7\u7269\u7684 <code>digestAuditSurface()</code> \u673a\u68b0\u8ba1\u7b97\uff0c\u4e8b\u5b9e\u6e05\u5355\u76f4\u63a5\u5bf9\u7167\u5408\u540c\u6587\u6863\u63a8\u5bfc\u3002</li> <li>\u5b83\u4eec\u8bc1\u660e\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u548c\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\u3002fixture \u4e0e pin \u80cc\u540e\u7684\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u8fc7\u7a0b\u662f\u5426\u72ec\u7acb\u4e8e\u5176\u4ed6\u9879\u76ee\u53c2\u4e0e\u8005\uff0c\u4e0d\u662f\u4ed3\u5185\u673a\u68b0\u68c0\u67e5\u53ef\u4ee5\u8bc1\u660e\u7684\u5bf9\u8c61\u3002</li> <li>\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\uff1a\u5b9e\u73b0\u8005\u81ea\u6d4b\u4e0e\u672c\u9875\u673a\u68b0\u8bc1\u660e\u90fd\u53ea\u5f62\u6210\u5f85\u5ba1\u8bc1\u636e\uff0c\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002</li> <li>\u8bda\u5b9e\u6027\u7ea0\u9519\uff1a\u65e7 fixture \u4e0e pin \u66fe\u643a\u5e26 <code>independent-r2</code> provenance \u548c\u72ec\u7acb\u4f5c\u8005\u53d9\u4e8b\uff08\u542b\u4f5c\u8005\u9605\u8bfb\u53f2\u58f0\u660e\uff09\uff0c\u4e0e\u672c\u4ed3\u4e8b\u5b9e\u4e0d\u7b26\uff1bprovenance \u5df2\u4fee\u6b63\u4e3a\u4e0a\u8ff0\u5982\u5b9e\u8bcd\u6c47\uff0c\u672c\u9875\u968f\u4e4b\u91cd\u5199\u3002\u7ea0\u9519\u53ea\u89e6\u53ca provenance\u3001note \u4e0e\u6587\u6848\u7b49\u8bda\u5b9e\u6027\u5b57\u6bb5\uff0c\u4e0d\u6539\u53d8\u4efb\u4f55 digest\u3001facts\u3001fixture \u5185\u5bb9\u6216\u673a\u68b0\u8bc1\u660e\u884c\u4e3a\u3002</li> </ul>"},{"location":"integration/audit/independence/#\u673a\u68b0\u8bc1\u660e\u5165\u53e3","title":"\u673a\u68b0\u8bc1\u660e\u5165\u53e3","text":"<pre><code>node docs/integration/audit/runner/proof-independence.mjs\n</code></pre> <p>\u8bc1\u660e\u68c0\u67e5\u4e0e\u7ed3\u8bba\uff1a</p> \u68c0\u67e5 \u7ed3\u8bba P0-modules \u6536\u96c6\u5230\u5168\u90e8\u5ba1\u8ba1\u6a21\u5757\uff08\u8bc1\u660e\u8303\u56f4\u5b8c\u5907\uff09 P1-imports \u5168\u90e8 import \u53ea\u5141\u8bb8 <code>node:</code> \u5185\u5efa\u4e0e\u76f8\u5bf9\u8def\u5f84\uff0c\u4e14\u76f8\u5bf9\u8bf4\u660e\u7b26\u7684\u89e3\u6790\u57df\u88ab\u9650\u5236\u5728\u5ba1\u8ba1\u6811\u6216 contracts \u5305\u5185\uff08\u675c\u7edd\u76f8\u5bf9\u8def\u5f84\u7ed5\u5230\u751f\u6210\u5668/oracle \u6a21\u5757\uff09\uff1b\u7981\u6b62 engineering-kit / harness / \u7b2c\u4e09\u65b9\u5305 \u2192 Audit \u4e0d\u4f9d\u8d56 Kit P2-contracts-site Contracts \u53ea\u5728\u552f\u4e00\u58f0\u660e\u70b9\uff08<code>lib/contracts-client.mjs</code>\uff09\u88ab\u5bfc\u5165 P3-chokepoint \u6587\u4ef6\u8bfb\u53d6\u53ea\u7ecf\u8fc7\u4e24\u4e2a\u58f0\u660e\u8bfb\u53d6\u70b9\uff1a<code>lib/guard.mjs</code>\uff08\u5ba1\u8ba1\u6811\u5185\uff0c\u88c1\u51b3\u8f93\u5165\uff09\u4e0e <code>lib/consumed-package.mjs</code>\uff08\u88ab\u6d88\u8d39\u5305\u6839\u5185\uff0c\u9501\u9a8c\u8bc1\uff09\uff1b\u53ea\u8bfb API\uff1b\u5168\u6811\u65e0\u4efb\u4f55\u5199 API P4-refusal \u73b0\u573a\u62d2\u8bfb\u6f14\u793a\uff1a\u5bf9\u751f\u6210\u5668\u81ea\u6d4b\u8fd0\u884c\u5668\u3001oracle \u5224\u636e\u3001oracle \u8fd0\u884c\u5668\u3001fixture README\u3001profiles\u3001kit \u5165\u53e3\u3001harness \u5165\u53e3\u9010\u4e00\u5c1d\u8bd5\u8bfb\u53d6\uff0c\u5168\u90e8\u88ab guard \u4ee5 AUD-IND-001 \u62d2\u7edd P5-provenance \u5168\u90e8\u53d8\u5f02 fixture \u7684 provenance \u4e3a <code>product-fixture</code>\uff0c\u57fa\u7ebf pin \u7684 provenance \u5728\u58f0\u660e\u8bcd\u6c47\u8868\u5185\uff08\u5f53\u524d\u552f\u4e00\u6210\u5458 <code>product-compatibility-fixture</code>\uff09\uff1b\u4efb\u4f55\u6cbf\u7528\u65e7\u72ec\u7acb\u89d2\u8272 provenance \u8bcd\u6c47\u7684\u5de5\u4ef6\u90fd\u4f1a\u88ab\u5224\u8fdd\u89c4 P6-literals \u9664\u8bc1\u660e\u811a\u672c\u81ea\u8eab\uff08\u62d2\u8bfb\u6f14\u793a\u8005\uff0c\u53d7 P4 \u7ea6\u675f\uff09\u5916\uff0c\u4efb\u4f55\u5ba1\u8ba1\u6a21\u5757\u7684\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u90fd\u4e0d\u5f97\u70b9\u540d\u751f\u6210\u5668\u81ea\u6d4b\u8868\u6216 oracle \u5224\u636e\u6587\u4ef6 <p>\u63a8\u7406\u94fe\u4e0e\u80fd\u529b\u8fb9\u754c\uff1aP3 \u4fdd\u8bc1\u88c1\u51b3\u8f93\u5165\u53ea\u80fd\u6765\u81ea\u5ba1\u8ba1\u6811\uff1bP4 \u8bc1\u660e\u751f\u6210\u5668/oracle \u5de5\u4ef6\u5728\u8fd0\u884c\u65f6\u4e0d\u53ef\u8bfb\uff1bP6 \u8bc1\u660e\u5176\u6587\u4ef6\u540d\u5728\u4ee3\u7801\u4e2d\u4e0d\u53ef\u5f15\u7528\uff1bP5 \u673a\u68b0\u7981\u6b62\u65e7\u72ec\u7acb\u89d2\u8272 provenance \u8bcd\u6c47\u56de\u6f6e\u3002\u56e0\u6b64\u8fd0\u884c\u65f6\u4e0d\u5b58\u5728\u4efb\u4f55\u628a\u751f\u6210\u5668\u9884\u671f\u53d8\u6210\u5ba1\u8ba1\u5224\u636e\u7684\u8def\u5f84\u2014\u2014\u8fd9\u8bc1\u660e\u7684\u662f\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u3002\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u662f\u5426\u72ec\u7acb\u4e0d\u5728\u673a\u68b0\u8bc1\u660e\u80fd\u529b\u4e4b\u5185\uff0c\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u6700\u7ec8\u63a5\u53d7\u3002</p>"},{"location":"integration/audit/independence/#\u53cd\u5411\u62e5\u6709\u7981\u4ee4","title":"\u53cd\u5411\u62e5\u6709\u7981\u4ee4","text":"<p>Contracts \u4fa7\u65b0\u589e\u7684 <code>src/audit-surface.mjs</code> \u662f\u7eaf\u53ea\u8bfb\u6295\u5f71\uff1a\u4e0d\u63a5\u6536\u56de\u8c03\u3001\u4e0d\u6ce8\u518c\u4efb\u4f55\u4e1c\u897f\u3001\u4e0d import \u4efb\u4f55\u5ba1\u8ba1\u5de5\u4ef6\uff1b<code>packages/skill-family-contracts/test/audit-surface.test.mjs</code> \u542b\u4e00\u6761\u673a\u68b0\u6d4b\u8bd5\uff0c\u65ad\u8a00\u8be5\u6a21\u5757\u7684 import \u5168\u90e8\u4e3a <code>node:</code> \u6216\u672c\u5730\u76f8\u5bf9\u6a21\u5757\uff0c\u4e14\u6e90\u7801\u4e0d\u51fa\u73b0 integration/audit\u3001engineering-kit\u3001harness \u5b57\u6837\u3002\u4f9d\u8d56\u65b9\u5411\u6052\u4e3a Audit \u2192 Contracts\u3002</p>"},{"location":"integration/audit/independence/#\u517c\u5bb9\u6027\u8bc1\u660e\u5165\u53e3","title":"\u517c\u5bb9\u6027\u8bc1\u660e\u5165\u53e3","text":"<p>\u53d8\u5f02\u91cd\u653e\u4e0e\u57fa\u7ebf pin \u7684\u6bd4\u5bf9\uff08\u6458\u8981\u3001\u4e8b\u5b9e\u6e05\u5355\u3001\u5f15\u64ce\u53c2\u6570\u5b8c\u6574\u6027\uff09\u89c1 version-compatibility.md \u4e0e isolation-and-lockfile.md\uff1b\u5206\u7c7b\u5b66\u89c1 mutation-taxonomy.md\u3002pin \u662f\u4ea7\u54c1\u4fa7\u517c\u5bb9\u57fa\u7ebf\uff08<code>product-compatibility-fixture</code>\uff09\uff0c\u8bc1\u660e\u88ab\u6d88\u8d39\u7684 Contracts \u5305\u4e0e\u51bb\u7ed3\u57fa\u7ebf\u5b57\u8282\u4e00\u81f4\u3001\u6821\u9a8c\u8bed\u4e49\u4e00\u81f4\uff0c\u540c\u6837\u4e0d\u4f5c\u4efb\u4f55\u72ec\u7acb\u89d2\u8272\u58f0\u79f0\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/","title":"\u53d8\u5f02\u5206\u7c7b\u5b66\uff08\u51bb\u7ed3\uff09","text":"<p>FND-060 \u51bb\u7ed3\u4e94\u7c7b\u53d8\u5f02\u3002\u6bcf\u4e00\u7c7b\u90fd\u6709\u72ec\u7acb\u7684\u68c0\u6d4b\u673a\u5236\u4e0e\u6bcf\u7c7b \u22653 \u4f8b\u7684\u53d8\u5f02 fixture\uff1bfixture \u4e0e\u9884\u671f\u662f\u4ea7\u54c1\u4fa7\u7ef4\u62a4\u7684\u6d4b\u8bd5\u8bed\u6599\uff08provenance <code>product-fixture</code>\uff0c\u89c1\u4e0b\u65b9 fixture \u4fe1\u5c01\uff09\uff0c\u4e0d\u590d\u7528\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\uff0c\u4e0d\u8bfb\u53d6 oracle \u5224\u636e\uff08\u8be5\u8f93\u5165\u9694\u79bb\u7531 independence.md \u7684\u673a\u68b0\u8bc1\u660e\u5f3a\u5236\uff09\u3002\u5b83\u4eec\u8bc1\u660e\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u548c\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\uff1b\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002\u5206\u7c7b\u96c6\u5408\u662f\u95ed\u5408\u7684\uff1a\u65b0\u589e\u7c7b\u522b\u5c5e\u4e8e\u5ba1\u8ba1\u5206\u7c7b\u5b66\u53d8\u66f4\uff0c\u5fc5\u987b\u8d70\u65b0\u7684\u88c1\u51b3\u5e76\u66f4\u65b0\u672c\u6587\u4ef6\u4e0e <code>runner/lib/paths.mjs</code> \u7684 <code>MUTATION_CLASSES</code>\u3002</p> \u7c7b\u522b \u679a\u4e3e\u503c \u68c0\u6d4b\u673a\u5236 \u6d88\u8d39\u63a5\u53e3 \u5ba1\u8ba1\u7801 \u7ed3\u6784 <code>structure</code> \u4e25\u683c\u65b9\u8a00\u4e0b\u7684 schema \u6821\u9a8c\u62d2\u7edd <code>validateDocument</code>\uff08strict, 2020-12\uff09 AUD-M1-STRUCT \u8bed\u4e49 <code>semantics</code> \u7ed3\u6784\u5408\u6cd5\u4f46\u8fdd\u53cd\u51bb\u7ed3\u8bed\u4e49\uff08\u534f\u8bae\u767b\u8bb0\u3001\u64cd\u4f5c\u8bcd\u8868\u3001params \u5951\u7ea6\u3001\u9519\u8bef\u7801\u6210\u5458\u8d44\u683c\uff09 <code>findProtocol</code>\u3001<code>checkOperation</code>\u3001<code>isRegisteredErrorCode</code> AUD-M2-SEM \u6458\u8981 <code>digest</code> \u89c4\u8303\u5316 JSON \u7684 SHA-256 \u4e0e\u51bb\u7ed3 pin \u4e0d\u4e00\u81f4 <code>digestDocument</code> AUD-M3-DIGEST \u9057\u6f0f <code>omission</code> \u51bb\u7ed3\u5fc5\u5907\u90e8\u4ef6\u7f3a\u5931\uff08\u767b\u8bb0\u3001\u89c4\u5219\u8986\u76d6\u3001\u9519\u8bef\u7801\u6210\u5458\uff09 \u57fa\u7ebf pin \u4e8b\u5b9e\u6e05\u5355\u5bf9\u6bd4 AUD-M4-OMIT \u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31 <code>engine</code> \u5f15\u64ce\u53c2\u6570\u5b8c\u6574\u6027\u5bf9\u6bd4\uff08\u9884\u7b97\u3001\u6821\u9a8c\u7b56\u7565\u3001\u68c0\u67e5\u7c7b\u578b\u95ed\u96c6\u3001\u7a33\u5b9a\u6027\u653f\u7b56\uff09 <code>describeAuditSurface</code> + \u57fa\u7ebf pin AUD-M5-ENGINE"},{"location":"integration/audit/mutation-taxonomy/#\u5404\u7c7b\u522b\u5b9a\u4e49\u4e0e\u5224\u636e","title":"\u5404\u7c7b\u522b\u5b9a\u4e49\u4e0e\u5224\u636e","text":""},{"location":"integration/audit/mutation-taxonomy/#M1-\u7ed3\u6784structure","title":"M1 \u7ed3\u6784\uff08structure\uff09","text":"<p>\u53d8\u5f02\u6539\u53d8\u6587\u6863\u7684\u5f62\u72b6\uff1a\u7f3a\u5fc5\u586b\u6210\u5458\u3001\u7c7b\u578b\u6f02\u79fb\u3001\u672a\u58f0\u660e\u6210\u5458\u3001\u6a21\u5f0f\u8fdd\u89c4\u3002\u5224\u636e\uff1a\u5728 <code>2020-12</code> \u65b9\u8a00\u3001<code>strict</code> \u7b56\u7565\u4e0b\uff0c\u6587\u6863\u5fc5\u987b\u88ab\u62d2\u7edd\uff0c\u4e14\u7a33\u5b9a\u7801\u7b49\u4e8e fixture \u58f0\u660e\u7684 <code>expect.observedErrorCode</code>\uff08\u672c\u7c7b\u5168\u90e8\u4e3a SFC1001\uff09\u3002\u9884\u671f\u7531\u4ea7\u54c1\u4fa7\u5bf9\u7167\u76f8\u5e94 schema \u7684 required/pattern/additionalProperties \u63a8\u5bfc\uff0c\u4e0d\u53d6\u81ea\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\u6216 oracle \u5224\u636e\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#M2-\u8bed\u4e49semantics","title":"M2 \u8bed\u4e49\uff08semantics\uff09","text":"<p>\u53d8\u5f02\u4fdd\u6301 schema \u5408\u6cd5\u6027\uff0c\u4f46\u8fdd\u53cd\u51bb\u7ed3\u7684\u767b\u8bb0\u8bed\u4e49\u3002\u4e09\u4e2a\u8bed\u4e49\u68c0\u67e5\u70b9\uff08fixture \u7528 <code>expect.semanticCheck</code> \u58f0\u660e\uff09\uff1a</p> <ul> <li><code>protocol-registered</code>\uff1a\u534f\u8bae\u540d/\u7248\u672c\u5fc5\u987b\u5728\u767b\u8bb0\u8868\u4e2d\uff0c\u5426\u5219 SFC1011\uff1b</li> <li><code>operation-vocabulary</code>\uff1a\u64cd\u4f5c\u540d\u5fc5\u987b\u5728\u534f\u8bae\u7248\u672c\u7684\u51bb\u7ed3\u8bcd\u8868\u5185\uff08\u5426\u5219 SFC2002\uff09\uff0cparams \u5fc5\u987b\u6ee1\u8db3\u8be5\u64cd\u4f5c\u7684\u51bb\u7ed3 params \u5951\u7ea6\uff08\u5426\u5219 SFC2003\uff09\uff1b</li> <li><code>error-code-registered</code>\uff1aoperation-result \u4e2d\u7684\u9519\u8bef\u7801\u5fc5\u987b\u662f\u51bb\u7ed3\u767b\u8bb0\u8868\u6210\u5458\uff08\u5f62\u72b6\u5408\u6cd5\u4f46\u672a\u767b\u8bb0 \u2192 SFC1009\uff09\u3002</li> </ul>"},{"location":"integration/audit/mutation-taxonomy/#M3-\u6458\u8981digest","title":"M3 \u6458\u8981\uff08digest\uff09","text":"<p>\u53d8\u5f02\u4fdd\u6301\u7ed3\u6784\u4e0e\u8bed\u4e49\uff0c\u4ec5\u6539\u53d8\u89c4\u8303\u5316\u5b57\u8282\uff08\u63aa\u8f9e\u6539\u5199\u3001\u540c\u4e49\u66ff\u6362\uff09\u3002\u5224\u636e\uff1a<code>digestDocument(input)</code> \u5fc5\u987b\u4e0d\u7b49\u4e8e\u57fa\u7ebf pin \u4e2d <code>documentDigests[expect.pinField]</code>\u3002\u8fd9\u662f\u552f\u4e00\u80fd\u6355\u83b7\"\u542b\u4e49\u4e0d\u53d8\u3001\u5b57\u8282\u6539\u53d8\"\u7684\u7c7b\u522b\u3002\u89c4\u8303\u5316\u89c4\u5219\u7531 Contracts \u7684 <code>canonicalJson</code> \u51bb\u7ed3\uff1a\u5bf9\u8c61\u952e\u9010\u7ea7\u5b57\u5178\u5e8f\u6392\u5e8f\u3001\u6570\u7ec4\u4fdd\u5e8f\u3001\u53ea\u63a5\u53d7 JSON \u6570\u636e\u7c7b\u578b\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#M4-\u9057\u6f0fomission","title":"M4 \u9057\u6f0f\uff08omission\uff09","text":"<p>\u53d8\u5f02\u4ece\u51bb\u7ed3\u6587\u6863\u4e2d\u5220\u9664\u5fc5\u5907\u90e8\u4ef6\u3002\u4e09\u4e2a\u8986\u76d6\u68c0\u67e5\uff08fixture \u7528 <code>expect.check</code> \u58f0\u660e\uff09\uff1a</p> <ul> <li><code>registry-schema-coverage</code>\uff1a\u5f53\u524d\u57fa\u7ebf pin \u4e2d\u7684\u5168\u90e8\u9876\u5c42\u5bf9\u8c61\u90fd\u5fc5\u987b\u767b\u8bb0\uff1b</li> <li><code>rules-checktype-coverage</code>\uff1a\u4e5d\u4e2a\u68c0\u67e5\u7c7b\u578b\u6bcf\u4e2a\u90fd\u5fc5\u987b\u88ab\u81f3\u5c11\u4e00\u6761 mandatory \u89c4\u5219\u8986\u76d6\uff1b</li> <li><code>error-code-coverage</code>\uff1a\u51bb\u7ed3\u9519\u8bef\u7801\u6e05\u5355\u4e00\u4e2a\u4e0d\u80fd\u5c11\u3002</li> </ul> <p>\u5224\u636e\uff1a\u89c2\u5bdf\u5230\u7684\u7f3a\u5931\u6e05\u5355\u5fc5\u987b\u4e0e <code>expect.missing</code> \u5b8c\u5168\u4e00\u81f4\uff08\u591a\u62a5\u3001\u6f0f\u62a5\u90fd\u7b97 fixture \u5931\u8d25\uff09\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#M5-\u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31engine","title":"M5 \u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31\uff08engine\uff09","text":"<p>\u53d8\u5f02\u4e0d\u5220\u9664\u90e8\u4ef6\uff0c\u800c\u662f\u653e\u5bbd\u5f15\u64ce\u53c2\u6570\u3002\u56db\u4e2a\u5b8c\u6574\u6027\u68c0\u67e5\uff08fixture \u7528 <code>expect.check</code> \u58f0\u660e\uff09\uff1a</p> <ul> <li><code>rules-budget</code>\uff1a\u9884\u7b97\u6570\u503c\uff08firstVersionMax=20\u3001absoluteMax=30\uff09\u4e0d\u5f97\u53d8\u5316\uff1b</li> <li><code>validation-policies</code>\uff1astrict \u7b56\u7565\u5fc5\u987b\u4fdd\u6301 coerceTypes=false\u3001useDefaults=false\u3001allErrors=true\u3001validateFormats=true\uff1btolerant \u7b56\u7565\u9010\u952e\u5bf9\u6bd4\uff1b</li> <li><code>check-type-set</code>\uff1a\u4e5d\u4e2a\u68c0\u67e5\u7c7b\u578b\u662f\u95ed\u96c6\uff0c\u7f3a\u4e00\u4e0d\u53ef\uff1b</li> <li><code>error-code-stability</code>\uff1a\u9519\u8bef\u7801 append-only \u7a33\u5b9a\u6027\u653f\u7b56\u539f\u6587\u4e0d\u5f97\u6539\u5199\u3002</li> </ul> <p>\u5224\u636e\uff1a\u89c2\u5bdf\u5230\u7684\u88ab\u524a\u5f31\u5b57\u6bb5\u6e05\u5355\u5fc5\u987b\u4e0e <code>expect.weakened</code> \u5b8c\u5168\u4e00\u81f4\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#fixture-\u4fe1\u5c01\u51bb\u7ed3","title":"fixture \u4fe1\u5c01\uff08\u51bb\u7ed3\uff09","text":"<p>\u6bcf\u4e2a fixture \u662f\u4e00\u4e2a JSON \u6587\u4ef6\uff1a</p> \u5b57\u6bb5 \u8981\u6c42 <code>schemaVersion</code> \u5e38\u91cf <code>1</code> <code>kind</code> \u5e38\u91cf <code>skill-family.audit.mutation-fixture</code> <code>fixtureId</code> <code>^AUD-M[1-5]-[0-9]{2}$</code>\uff0c\u7b2c 6 \u4f4d\u6570\u5b57\u5fc5\u987b\u4e0e\u7c7b\u522b\u4e00\u81f4 <code>mutationClass</code> \u4e94\u7c7b\u4e4b\u4e00\uff0c\u4e14\u5fc5\u987b\u4e0e\u6240\u5728\u76ee\u5f55\u4e00\u81f4 <code>provenance</code> \u5fc5\u987b\u4e3a <code>product-fixture</code>\uff08\u673a\u68b0\u68c0\u67e5 P5\uff09 <code>description</code> \u53d8\u5f02\u610f\u56fe\u8bf4\u660e <code>target</code> \u88ab\u6d4b\u5bf9\u8c61\uff08schema/\u6587\u4ef6/\u6295\u5f71\uff09 <code>input</code> \u53d8\u5f02\u540e\u7684\u5b8c\u6574\u6587\u6863\u6216\u6295\u5f71 <code>expect.detected</code> \u5fc5\u987b\u4e3a <code>true</code>\uff08\u53d8\u5f02\u5fc5\u987b\u88ab\u68c0\u51fa\uff09 <code>expect.auditCode</code> \u5fc5\u987b\u7b49\u4e8e\u8be5\u7c7b\u522b\u7684\u5ba1\u8ba1\u7801 <p>provenance \u73b0\u884c\u4e8b\u5b9e\uff1a\u53d8\u5f02 fixture \u662f\u4ea7\u54c1\u4fa7\u6d4b\u8bd5\u8bed\u6599\uff08<code>product-fixture</code>\uff09\uff0c\u57fa\u7ebf pin \u662f\u4ea7\u54c1\u4fa7\u517c\u5bb9\u57fa\u7ebf\uff08<code>product-compatibility-fixture</code>\uff0c\u89c1 version-compatibility.md\uff09\uff1b\u5b83\u4eec\u8bc1\u660e\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u548c\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\u3002\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002\u5386\u53f2\u7ea0\u9519\uff1afixture \u4e0e pin \u66fe\u643a\u5e26\u65e7\u503c <code>independent-r2</code> \u4e0e\u72ec\u7acb\u4f5c\u8005\u53d9\u4e8b\uff0c\u8be5\u58f0\u79f0\u4e0e\u672c\u4ed3\u4e8b\u5b9e\u4e0d\u7b26\uff0c\u5df2\u4fee\u6b63\u4e3a\u4e0a\u8ff0\u5982\u5b9e\u8bcd\u6c47\uff1b\u7ea0\u9519\u4e0d\u6539\u53d8\u4efb\u4f55 fixture \u7684 <code>input</code>/<code>expect</code>\u3001digest \u6216 facts \u5b57\u6bb5\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#\u6570\u91cf\u51bb\u7ed3\u4e0e\u6f0f\u62a5\u5f8b","title":"\u6570\u91cf\u51bb\u7ed3\u4e0e\u6f0f\u62a5\u5f8b","text":"<ul> <li>\u6bcf\u7c7b fixture \u2265 3\uff08\u5f53\u524d\u5b9e\u9645\uff1a\u7ed3\u6784 4\u3001\u8bed\u4e49 4\u3001\u6458\u8981 3\u3001\u9057\u6f0f 3\u3001\u5f15\u64ce 4\uff0c\u5171 18\uff09\uff1b</li> <li>\u8986\u76d6\u95e8\u8981\u6c42\u6bcf\u7c7b <code>fixtures \u2265 3 \u4e14 detected \u2265 1</code>\uff0c\u4e0d\u6ee1\u8db3\u4ea7\u751f AUD-MISS-001 \u5e76\u5f3a\u5236 verdict fail\uff1b</li> <li>\u6f0f\u62a5\u5f8b\u7684\u8d1f\u4f8b\u9a8c\u8bc1\u7531 <code>runner/selftest-negative.mjs</code> \u6267\u884c\uff1a\u9010\u7c7b\u7981\u7528\u68c0\u6d4b\u5668\uff0c\u65ad\u8a00\u6bcf\u6b21\u7834\u574f\u90fd\u4f7f\u8fd0\u884c\u5931\u8d25\u3002</li> </ul>"},{"location":"integration/audit/version-compatibility/","title":"\u7248\u672c\u517c\u5bb9\u5b9a\u4e49","text":"<p>\u5ba1\u8ba1\u6d88\u8d39 Contracts \u4ee5\u4e24\u4e2a\u7248\u672c\u5750\u6807 + \u4e00\u4e2a\u6458\u8981\u4e3a\u51c6\uff1a</p> \u5750\u6807 \u6765\u6e90 \u542b\u4e49 <code>contractsVersion</code> Contracts \u51bb\u7ed3\u7248\u672c\uff08\u5f53\u524d <code>1.15.0</code>\uff09 \u673a\u5668\u5951\u7ea6\u5185\u5bb9\u7684\u7248\u672c <code>auditSurfaceVersion</code> \u5ba1\u8ba1\u6d88\u8d39\u63a5\u53e3\u81ea\u8eab\u7684\u7248\u672c\uff08\u5f53\u524d <code>1</code>\uff09 \u6d88\u8d39\u9762\u5f62\u72b6\u7684\u7248\u672c <code>surfaceDigest</code> <code>digestAuditSurface()</code>\uff08SHA-256\uff09 \u6d88\u8d39\u9762\u7684\u7cbe\u786e\u5b57\u8282\u6307\u7eb9 <p>\u4e09\u8005\u90fd\u7531 <code>describeAuditSurface()</code> \u4e00\u6b21\u6027\u7ed9\u51fa\uff0c\u5ba1\u8ba1\u4fa7\u628a\u5b83\u4eec\u4e0e\u5f53\u524d Contracts \u7248\u672c\u5bf9\u5e94\u7684\u57fa\u7ebf pin \u6bd4\u5bf9\uff08\u5f53\u524d\u4e3a <code>baseline/contracts-1.15.0.pin.json</code>\uff09\u3002</p>"},{"location":"integration/audit/version-compatibility/#\u517c\u5bb9\u89c4\u5219","title":"\u517c\u5bb9\u89c4\u5219","text":"<p>\u4e00\u4e2a\u88ab\u6d88\u8d39\u7684 Contracts \u5305\u4e0e\u67d0\u4e2a\u57fa\u7ebf pin \u517c\u5bb9\uff0c\u5f53\u4e14\u4ec5\u5f53\u540c\u65f6\u6ee1\u8db3\uff1a</p> <ol> <li><code>contractsVersion</code> \u4e0e pin \u76f8\u540c\uff1b</li> <li><code>auditSurfaceVersion</code> \u4e0e pin \u76f8\u540c\uff1b</li> <li><code>digestAuditSurface()</code> \u4e0e pin \u7684 <code>surfaceDigest</code> \u76f8\u540c\u3002</li> </ol> <p>\u7531\u4e8e surface \u6458\u8981\u8986\u76d6\u4e86\u767b\u8bb0\u8868\u3001\u9519\u8bef\u7801\u3001\u89c4\u5219\u3001kernel \u534f\u8bae\u3001\u5168\u90e8 schema \u6587\u6863\u4e0e\u5f15\u64ce\u53c2\u6570\uff0c\u6458\u8981\u76f8\u540c\u8574\u542b\u5185\u5bb9\u9010\u5b57\u8282\u7b49\u4ef7\uff08\u89c4\u8303\u5316\u610f\u4e49\u4e0b\uff09\u3002\u4e09\u4e2a\u6761\u4ef6\u4efb\u4e00\u4e0d\u6ee1\u8db3\u5373\u4e0d\u517c\u5bb9\uff1a\u5ba1\u8ba1\u5fc5\u987b\u62a5\u544a AUD-BASE-001\uff08\u8fd0\u884c\u671f\u57fa\u7ebf\u68c0\u67e5\uff09\u6216 AUD-LOCK-001\uff08\u5305\u9501\u9a8c\u8bc1\uff09\uff0c\u5e76\u62d2\u7edd\u7ed9\u51fa\u901a\u8fc7\u88c1\u51b3\u3002</p>"},{"location":"integration/audit/version-compatibility/#\u53d8\u66f4\u5206\u7ea7","title":"\u53d8\u66f4\u5206\u7ea7","text":"\u53d8\u66f4 \u5206\u7ea7 \u9700\u8981\u7684\u52a8\u4f5c \u4e0d\u6539\u53d8 surface \u5b57\u8282\u7684\u53d8\u66f4\uff08\u5982\u6ce8\u91ca\u3001\u6d4b\u8bd5\uff09 \u65e0\u5f71\u54cd \u65e0\u9700\u65b0 pin \u6539\u53d8 surface \u5b57\u8282\u4f46\u4e0d\u6539\u53d8\u542b\u4e49\u7684\u53d8\u66f4 \u4e0d\u517c\u5bb9 \u7981\u6b62\u4ee5\"\u540c\u4e49\"\u4e3a\u7531\u514d\u68c0\uff1b\u5fc5\u987b\u8d70\u5408\u540c\u53d8\u66f4\u5e76\u91cd\u65b0\u6279\u51c6 pin \u65b0\u589e\u5ba1\u8ba1\u6d88\u8d39\u63a5\u53e3\uff08\u53ea\u8bfb\u3001\u589e\u91cf\uff09 auditSurfaceVersion \u9012\u589e \u65b0 pin + \u672c\u6587\u4ef6\u66f4\u65b0 \u6539\u53d8\u65e2\u6709\u6d88\u8d39\u63a5\u53e3\u542b\u4e49 auditSurfaceVersion \u9012\u589e + \u5408\u540c\u53d8\u66f4 \u65b0 pin\uff1b\u65e7 pin \u5b58\u6863\u4e0d\u5220 Contracts \u7248\u672c\u6f14\u8fdb\uff081.0.0 \u2192 \u4e0b\u4e00\u7248\u672c\uff09 contractsVersion \u53d8\u5316 \u65b0\u7684\u57fa\u7ebf pin \u6587\u4ef6\uff1b\u65e7 pin \u6587\u4ef6\u53ea\u8bfb\u5b58\u6863"},{"location":"integration/audit/version-compatibility/#pin-\u751f\u547d\u5468\u671f","title":"pin \u751f\u547d\u5468\u671f","text":"<ul> <li>\u6bcf\u4e2a\u7ecf\u7248\u672c\u5316\u6279\u51c6\u7684 Contracts \u53d1\u5e03\u5bf9\u5e94\u4e00\u4e2a pin \u6587\u4ef6\uff1a<code>baseline/contracts-&lt;version&gt;.pin.json</code>\uff1b</li> <li>pin \u662f append-only\uff1a\u6279\u51c6\u540e\u4e0d\u518d\u539f\u5730\u7f16\u8f91\uff0c\u4f5c\u5e9f\u4ee5\u65b0 pin \u53d6\u4ee3\u5e76\u5728 <code>note</code> \u4e2d\u8bf4\u660e\uff1b</li> <li>pin \u7531\u4ea7\u54c1\u4fa7\u5728\u51bb\u7ed3\u65f6\u523b\u6784\u9020\uff08provenance <code>product-compatibility-fixture</code>\uff09\uff1a\u6458\u8981\u6765\u81ea\u5bf9\u5df2\u51bb\u7ed3\u4ea7\u7269\u7684 <code>digestAuditSurface()</code> \u673a\u68b0\u8ba1\u7b97\uff0c\u4e8b\u5b9e\u6e05\u5355\u76f4\u63a5\u5bf9\u7167\u5408\u540c\u6587\u6863\u63a8\u5bfc\uff0c\u4e0d\u53d6\u81ea\u751f\u6210\u5668\u6216 oracle\uff1b\u672c\u4ed3\u5e93\u4e0d\u5b58\u5728\u72ec\u7acb\u7684\u7b2c\u4e8c\u5ba1\u9605\u4f1a\u8bdd\uff0cpin \u4e0d\u4f5c\u4efb\u4f55\u72ec\u7acb\u89d2\u8272\u58f0\u79f0\uff1b</li> <li>\u8bda\u5b9e\u6027\u4fee\u6b63\uff082026-08-05\uff09\uff1a\u65e7 pin\uff081.0.0\u30011.1.0\uff09\u66fe\u643a\u5e26 <code>independent-r2</code> provenance \u4e0e\u72ec\u7acb\u91cd\u7b7e\u53d9\u4e8b\uff0c\u8be5\u58f0\u79f0\u4e0e\u672c\u4ed3\u4e8b\u5b9e\u4e0d\u7b26\uff0c\u5df2\u5c31\u5730\u4fee\u6b63 provenance \u4e0e note\uff1b\u4fee\u6b63\u53ea\u89e6\u53ca provenance/note \u4e24\u5904\u8bda\u5b9e\u6027\u5b57\u6bb5\uff0c\u4e0d\u6539\u53d8\u4efb\u4f55 digest \u6216 facts \u5b57\u6bb5\uff0c\u65e7 pin \u7ee7\u7eed\u4f5c\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\uff1b</li> <li>Contracts 1.1.1\uff082026-08-05\uff09\uff1a\u4ec5\u63cf\u8ff0\u8865\u4e01\uff08migration-manifest schema \u4e09\u5904 description \u6539\u5199\u4e3a\u7a33\u5b9a\u4ea7\u54c1\u8bed\u4e49\uff1b\u65e0\u4efb\u4f55\u6821\u9a8c\u5173\u952e\u5b57\u3001\u516c\u5f00 API\u3001\u9519\u8bef\u7801\u3001\u89c4\u5219\u6216\u5f15\u64ce\u53c2\u6570\u53d8\u5316\uff09\u3002\u6309\u672c\u751f\u547d\u5468\u671f\u65b0\u589e <code>contracts-1.1.1.pin.json</code> \u4e3a\u73b0\u884c\u57fa\u7ebf\uff0c<code>contracts-1.1.0.pin.json</code> \u8f6c\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u30021.1.1 pin \u76f8\u5bf9 1.1.0 pin \u7684\u51c6\u786e\u4e8b\u5b9e\uff1a\u6821\u9a8c\u8bed\u4e49\u548c\u4e8b\u5b9e\u6e05\u5355\u4e0d\u53d8\uff08<code>facts</code> \u9010\u9879\u4e00\u81f4\uff09\uff1b\u56db\u4e2a Contracts \u6587\u6863\uff08registry\u3001error-codes\u3001rules\u3001kernel-protocol\uff09\u56e0\u5185\u5d4c <code>contractsVersion</code> \u4ece <code>1.1.0</code> \u66f4\u65b0\u5230 <code>1.1.1</code> \u800c\u6539\u53d8\u6458\u8981\uff1bmigration-manifest Schema \u56e0\u4e0a\u8ff0\u4e09\u5904 description \u66f4\u65b0\u800c\u6539\u53d8\u6458\u8981\uff1b\u5176\u4f59\u4e94\u4e2a Schema\uff08project-manifest\u3001profile-descriptor\u3001managed-file-lock\u3001operation-request\u3001operation-result\uff09\u6458\u8981\u4e0d\u53d8\u3002<code>proof-independence.mjs</code> \u7684 P5 \u5f3a\u5236\u8fd9\u5957\u5982\u5b9e\u58f0\u660e\u7684 provenance \u8bcd\u6c47\uff08pin\uff1a<code>product-compatibility-fixture</code>\uff1b\u53d8\u5f02\u5939\u5177\uff1a<code>product-fixture</code>\uff09\uff1b</li> <li>Contracts 1.2.0\uff082026-08-09\uff09\uff1a\u62a5\u544a\u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>report-model</code>\u3001<code>report-binding</code> \u4e24\u4e2a\u9876\u5c42\u5951\u7ea6\u548c SFC3001\uff5eSFC3003 \u62a5\u544a\u9519\u8bef\u7801\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002</li> <li>Contracts 1.3.0\uff082026-08-09\uff09\uff1a\u5bbf\u4e3b\u63a5\u5165\u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>host-descriptor</code>\u3001<code>host-capability-fact</code>\u3001<code>adapter-build-manifest</code>\u3001<code>host-operation-plan</code>\u3001<code>host-operation-receipt</code> \u4e94\u4e2a\u9876\u5c42\u5951\u7ea6\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002</li> <li>Contracts 1.4.0\uff082026-08-09\uff09\uff1a\u6301\u4e45\u72b6\u6001\u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>state-event-envelope</code>\u3001<code>state-snapshot-metadata</code> \u4e24\u4e2a\u9876\u5c42\u5951\u7ea6\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002</li> <li>Contracts 1.5.0\uff082026-08-16\uff09\uff1aFND-ADR-010/011 \u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>declared-read-surface-result</code>\u3001<code>structured-scan-policy</code> \u4e24\u4e2a\u9876\u5c42\u5951\u7ea6\uff08\u9876\u5c42\u5bf9\u8c61\u96c6\u5408 20 \u2192 22\uff09\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002\u8be5 pin \u7684\u6458\u8981\u4e0e\u4e8b\u5b9e\u5747\u4ece\u5f53\u524d <code>describeAuditSurface()/digestAuditSurface()</code> \u673a\u68b0\u6295\u5f71\uff0cprovenance \u4ecd\u4e3a <code>product-compatibility-fixture</code>\u3002</li> <li>Contracts 1.6.0\uff082026-08-18\uff09\uff1a\u5ba1\u8ba1\u6574\u6539 C5 \u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>public-boundary-declaration</code>\u3001<code>platform-difference-registry</code>\u3001<code>observation-scope</code>\u3001<code>profile-adoption-declaration</code>\u3001<code>audit-baseline-pin</code>\u3001<code>token-estimate-record</code> \u516d\u4e2a\u9876\u5c42\u5951\u7ea6\uff08\u9876\u5c42\u5bf9\u8c61\u96c6\u5408 24 \u2192 30\uff09\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\uff1b\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\uff0c\u89c4\u5219\u4e0e kernel \u534f\u8bae\u4ec5\u968f <code>contractsVersion</code> \u5b57\u6bb5\u66f4\u65b0\u3002pin \u5408\u540c\u672c\u8eab\uff08<code>audit-baseline-pin</code>\uff09\u4e0e\u6d88\u8d39\u9762\u6821\u9a8c\u51fd\u6570 <code>verifyBaselinePin()</code>\uff08AUD-BASE-001 / AUD-LOCK-001 \u7f16\u7801\uff09\u5728\u672c\u7248\u672c\u843d\u5730\uff08GAP-5 / SG-28\uff09\u3002</li> <li>Contracts 1.7.0\uff082026-08-22\uff09\uff1aFND-ADR-013 \u7684 Project Profile \u80fd\u529b\u7ebf\u589e\u91cf\u3002\u65b0\u589e <code>project-profile</code> \u9876\u5c42\u5951\u7ea6\uff08\u9876\u5c42\u5bf9\u8c61\u96c6\u5408 30 \u2192 31\uff09\uff0c\u7edf\u4e00 scaffold \u9879\u76ee\u6839\u58f0\u660e\u7684\u673a\u5668\u7ed3\u6784\uff1b\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\u3002<code>contracts-1.7.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece <code>describeAuditSurface()/describeBaselinePin()</code> \u673a\u68b0\u751f\u6210\uff0c\u5e76\u7ecf\u8fc7\u5408\u540c\u6821\u9a8c\u548c <code>verifyBaselinePin()</code> \u81ea\u6821\u9a8c\uff1b\u73b0\u4f5c\u4e3a\u5386\u53f2\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u4fdd\u7559\u3002</li> <li>Contracts 1.8.0\uff082026-08-24\uff09\uff1a\u65b0\u589e\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>source-authority-receipt</code> \u9876\u5c42\u5951\u7ea6\uff0831 \u2192 32\uff09\uff0c\u4ee5\u53ca\u7eaf\u6821\u9a8c\u3001\u89e3\u6790 API\uff1b\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\u3002<code>contracts-1.8.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.7.0 \u53ca\u66f4\u65e9 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.9.0\uff082026-08-24\uff09\uff1a\u65b0\u589e\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>filesystem-root-binding</code>\u3001<code>fixed-set-publication-manifest</code> \u548c <code>fixed-set-publication-receipt</code> \u4e09\u4e2a\u9876\u5c42\u5951\u7ea6\uff0832 \u2192 35\uff09\u3002\u9519\u8bef\u7801\u3001\u89c4\u5219\u3001\u68c0\u67e5\u7c7b\u578b\u3001\u9884\u7b97\u3001Kernel \u64cd\u4f5c\u548c\u6821\u9a8c\u7b56\u7565\u5747\u672a\u53d8\u5316\u3002<code>contracts-1.9.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.8.0 \u53ca\u66f4\u65e9 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.10.0\uff082026-08-24\uff09\uff1aFoundation 0.10.0 \u6269\u5c55\u5df2\u767b\u8bb0\u7684 <code>host-descriptor</code>\u3001<code>host-probe-result</code> \u548c <code>host-operation-plan</code> stable Schema\uff0c\u52a0\u5165\u6709\u9650 <code>manual</code> \u652f\u6301\u3001<code>maturity/sourceAliases</code> \u4e0e digest \u7ed1\u5b9a\u7684\u672c\u5730\u751f\u547d\u5468\u671f\u8ba1\u5212\u8bed\u4e49\uff1b\u540c\u65f6\u65b0\u589e\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>adapter-peer-verification-request</code> \u4e0e <code>adapter-peer-verification-result</code> R05 Schema\uff0c\u9876\u5c42\u5bf9\u8c61\u7531 35 \u7c7b\u589e\u81f3 37 \u7c7b\u3002\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\uff0cregistry\u3001rules\u3001error-codes \u91cd\u65b0\u8bb0\u5f55 1.10.0 \u5750\u6807\uff0cKernel \u534f\u8bae\u4ecd\u6309\u65e2\u6709\u751f\u547d\u5468\u671f\u4fdd\u6301 1.8.0 \u5b57\u8282\u57fa\u7ebf\u3002<code>contracts-1.10.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.9.0 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.11.0\uff082026-08-25\uff09\uff1aFoundation 0.11.0 \u65b0\u589e <code>host-verification-request</code> \u4e0e <code>host-verification-result</code> \u4e1a\u52a1\u4e2d\u7acb Schema\uff0c\u9876\u5c42\u5bf9\u8c61\u7531 37 \u7c7b\u589e\u81f3 39 \u7c7b\uff1bHarness \u589e\u52a0\u539f\u59cb\u5b57\u8282 sink\uff0cEngineering Kit \u63d0\u4f9b candidate \u53d7\u7ea6\u675f\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5165\u53e3\uff08Kimi \u4e0e WorkBuddy \u4e24\u4e2a\u5185\u7f6e driver\uff0c\u590d\u7528\u73b0\u6709\u767b\u5f55\u6001\uff09\u3002<code>contracts-1.11.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.10.0 \u53ca\u66f4\u65e9 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.12.0\uff082026-08-26\uff09\uff1a\u6269\u5c55\u65e2\u6709 <code>host-descriptor</code> \u7684\u56fa\u5b9a\u5bbf\u4e3b\u9a8c\u8bc1\u7ec4\u5408\uff0c\u5e76\u5141\u8bb8 <code>host-verification-result</code> \u5728\u9000\u51fa\u7801\u4e3a\u96f6\u4f46\u8f93\u51fa\u534f\u8bae\u4e0d\u5408\u6cd5\u65f6\u8868\u8fbe\u6267\u884c\u5931\u8d25\u3002\u9876\u5c42\u5bf9\u8c61\u4ecd\u4e3a 39 \u7c7b\uff0c\u65e0\u65b0\u589e Schema ID \u6216\u9519\u8bef\u7801\u3002registry\u3001rules\u3001error-codes \u66f4\u65b0\u7248\u672c\u5750\u6807\uff0cKernel \u4fdd\u6301 1.8.0 \u5b57\u8282\u57fa\u7ebf\u3002\u65b0 pin \u53ea\u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00\u8868\u9762\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.11.0 \u53ca\u66f4\u65e9 pin \u4e0d\u6539\u5199\u3002</li> <li>Contracts 1.13.0\uff082026-08-26\uff09\uff1a\u589e\u52a0 <code>plugin-verification-request</code>\u3001<code>plugin-verification-result</code> \u548c <code>filesystem-tree-observation</code> \u4e09\u4e2a\u5019\u9009\u9876\u5c42\u5951\u7ea6\uff0c\u9876\u5c42\u5bf9\u8c61\u7531 39 \u7c7b\u589e\u81f3 42 \u7c7b\uff1b\u540c\u65f6\u4e3a watchdog \u4fe1\u5c01\u589e\u52a0\u53ef\u9009\u7684\u6bcf\u6d41\u8f93\u51fa\u9650\u989d\u4e8b\u5b9e\uff0c\u672a\u542f\u7528\u9650\u989d\u7684\u65e7\u8c03\u7528\u4fdd\u6301\u539f\u5f62\u72b6\u3002<code>contracts-1.13.0.pin.json</code> \u7531\u516c\u5f00\u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u4fdd\u7559\u4e3a\u5386\u53f2\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.14.0\uff082026-08-28\uff09\uff1a\u589e\u52a0\u6d88\u8d39\u8005\u5951\u7ea6\u6d4b\u8bd5\u5411\u91cf\u4e0e\u80fd\u529b\u91c7\u7528\u5b57\u6bb5\uff0c\u660e\u786e\u533a\u5206\u5019\u9009\u53d1\u73b0\u3001\u8fc1\u79fb\u5b8c\u6210\u3001\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u548c\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\uff1b\u6d88\u8d39\u8005\u5411\u91cf\u4ecd\u662f\u5019\u9009\u6d4b\u8bd5\u5408\u540c\uff0c\u4e0d\u6539\u53d8\u65e2\u6709\u5bbf\u4e3b\u9a8c\u8bc1\u8eab\u4efd\u3002<code>contracts-1.14.0.pin.json</code> \u4fdd\u7559\u4e3a\u5386\u53f2\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.15.0\uff082026-08-29\uff09\uff1a\u589e\u52a0 <code>executable-identity-observation</code>\u3001<code>skill-family-directory-verification-request</code> \u548c <code>skill-family-directory-verification-result</code> \u4e09\u4e2a\u5019\u9009\u9876\u5c42\u5951\u7ea6\uff0c\u5e76\u5c06 Kimi <code>driverVersion=1.0.0</code> \u4e0e\u95ed\u5408 <code>cliVersion=0.39.1</code> \u5206\u5f00\u3002\u9876\u5c42\u5bf9\u8c61\u7531 42 \u7c7b\u589e\u81f3 45 \u7c7b\uff1bKernel \u4ecd\u4e3a 1.8.0\uff0c\u5ba1\u8ba1\u6d88\u8d39\u9762\u4ecd\u4e3a <code>auditSurfaceVersion=1</code>\u3002\u5f53\u524d pin \u4e3a <code>baseline/contracts-1.15.0.pin.json</code>\uff0c\u5176 <code>supersedes</code> \u6307\u5411\u4e0d\u53ef\u53d8\u7684 <code>contracts-1.14.0.pin.json</code>\uff1b\u66f4\u65e9 pin \u5747\u7ee7\u7eed\u4f5c\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>\u5ba1\u8ba1\u8fd0\u884c\u65f6\u5148\u505a\u5305\u9501\u9a8c\u8bc1\uff08\u89c1 isolation-and-lockfile.md\uff09\uff0c\u518d\u505a\u53d8\u5f02\u91cd\u653e\uff1bpin \u4e0d\u5339\u914d\u65f6\uff0c\u53d8\u5f02\u91cd\u653e\u7ed3\u679c\u4e0d\u5f97\u88ab\u91c7\u4fe1\u3002</li> </ul>"},{"location":"integration/audit/version-compatibility/#profile-\u884c\u4e3a\u53d8\u66f4\u7eaa\u5f8b2026-08-19D6","title":"profile \u884c\u4e3a\u53d8\u66f4\u7eaa\u5f8b\uff082026-08-19\uff0cD6\uff09","text":"<p>Foundation \u5bf9\u5916\u66b4\u9732\u7684 profile \u673a\u5236\u9762\u662f\u6d88\u8d39\u65b9 pin \u7684\u884c\u4e3a\u5951\u7ea6\uff0c\u5305\u62ec <code>FOUNDATION_MECHANISM_OPERATIONS</code> 8 \u4e2a operations \u4e0e <code>runner.mjs</code> \u76f4\u63a5\u5bfc\u51fa\uff08\u542b <code>publishFileExclusive</code> \u7b49\u51fd\u6570\u7684\u9009\u9879\u9762\uff09\u3002profile \u884c\u4e3a\u53d8\u66f4 = profile \u7248\u672c\u53d8\u66f4\uff1a\u884c\u4e3a\u8bed\u4e49\u6f02\u79fb\u4e0d\u5f97\u5728\u4e0d\u5347\u7248\u672c\u7684\u524d\u63d0\u4e0b\u53d1\u751f\u3002stability \u7ef4\u6301 candidate-only\uff08D6\uff09\u671f\u95f4\u540c\u6837\u9002\u7528\u2014\u2014candidate profile \u7684\u5b57\u8282\u4e00\u81f4\u6027\u7531 pin digest \u7ea6\u675f\uff0c\u884c\u4e3a\u8bed\u4e49\u53d8\u66f4\u5fc5\u987b\u8d70\u7248\u672c\u5750\u6807\uff0c\u4e0d\u56e0 candidate \u72b6\u6001\u800c\u8c41\u514d\u3002</p> \u53d8\u66f4 \u5206\u7ea7 \u9700\u8981\u7684\u52a8\u4f5c 8 \u4e2a operations \u4e4b\u4e00\u7684\u5206\u6d3e\u8bed\u4e49\u53d8\u5316\uff08\u53c2\u6570\u3001\u7ed3\u679c\u3001\u9519\u8bef kind\uff09 profile \u884c\u4e3a\u53d8\u66f4 \u5305\u7248\u672c\u9012\u589e\uff08candidate \u9636\u6bb5\u4e3a candidate \u7248\u672c\u9012\u589e\uff09+ \u672c\u6587\u4ef6\u66f4\u65b0 runner \u76f4\u63a5\u5bfc\u51fa\u9762\u53d8\u5316\uff08\u65b0\u589e/\u5220\u9664/\u6539\u53d8\u5bfc\u51fa\uff0c\u542b publish \u51fd\u6570\u65cf\uff09 profile \u884c\u4e3a\u53d8\u66f4 \u5305\u7248\u672c\u9012\u589e + \u672c\u6587\u4ef6\u66f4\u65b0 publish \u9009\u9879\u9762\u53d8\u5316\uff082026-08-19 D5 \u4e3a <code>publishFileExclusive</code> \u65b0\u589e <code>createParents</code> \u9009\u9879\u5373\u6b64\u7c7b\uff1b\u9009\u9879\u662f Foundation \u4fa7\u5951\u7ea6\uff0c\u6d88\u8d39\u9762\u53ea\u4f20\u53c2\uff09 profile \u884c\u4e3a\u53d8\u66f4 \u5305\u7248\u672c\u9012\u589e + \u672c\u6587\u4ef6\u66f4\u65b0 \u4e0d\u6539\u53d8\u884c\u4e3a\u7684\u5b57\u8282\u53d8\u66f4\uff08\u6ce8\u91ca\u3001\u683c\u5f0f\u5316\uff09 \u65e0\u5f71\u54cd \u65e0\u9700\u7248\u672c\u52a8\u4f5c\uff08pin digest \u4ecd\u6309\u65e2\u6709\u673a\u5236\u53d8\u5316\uff09 <p>\u6d88\u8d39\u65b9\u54cd\u5e94\u52a8\u4f5c\uff1a</p> <ol> <li>pin \u5347\u7ea7\uff1a\u6d88\u8d39\u65b9\u628a foundation-pin\uff08\u6216\u7b49\u4ef7\u9489\u624e\uff09\u5347\u7ea7\u5230\u542b\u8be5\u884c\u4e3a\u53d8\u66f4\u7684\u7248\u672c\uff1b\u7981\u6b62\u5728\u65e7 pin \u4e0a\u5047\u8bbe\u65b0\u884c\u4e3a\u3002</li> <li>adoption-lock \u91cd\u751f\u6210\uff1a\u53d7\u5f71\u54cd\u6d88\u8d39\u65b9\u91cd\u65b0\u751f\u6210 adoption-lock\uff08\u6216\u7b49\u4ef7\u58f0\u660e\u8f7d\u4f53\uff09\uff0c\u4f7f <code>declared_foundation_surface</code> \u4e0e <code>foundation_versions</code> \u53cd\u6620\u65b0 pin \u5b57\u8282\u3002</li> <li>\u5148\u5efa\u540e\u5220\uff1a\u884c\u4e3a\u53d8\u66f4\u4ee5 Foundation \u4fa7\u884c\u4e3a\u6d4b\u8bd5\uff08\u542b bundle \u5b57\u8282\u5bf9\u8c61\u6d4b\u8bd5\uff09\u843d\u5730\u4e3a\u5148\uff0c\u6d88\u8d39\u65b9\u5220\u9664\u81ea\u8eab\u91cd\u9a8c\u6d4b\u8bd5\u5728\u540e\uff08D2 \u987a\u5e8f\uff09\u3002</li> </ol> <p>\u884c\u4e3a\u5f52\u5c5e\u8bb0\u5f55\uff082026-08-19\uff09\uff1a\u300c\u5bbf\u4e3b\u8fd0\u884c\u65f6\uff08node\uff09\u4e0d\u53ef\u7528 \u2192 \u65e0\u56de\u9000\u3001fail-closed\u300d\u7684\u89e6\u53d1\u9762\uff08node \u89e3\u6790/env \u68c0\u67e5\uff09\u5c5e\u4e8e\u6d88\u8d39\u65b9\u8c03\u7528\u8fb9\u754c\uff08SFA \u4fa7\u4e3a D3 \u5df2\u88c1\u51b3\u63a5\u53d7\u7684\u6b8b\u4f59\u98ce\u9669\uff0c\u4ec5\u4fdd\u7559\u8c03\u7528\u70b9\u58f0\u660e\u68c0\u67e5\uff09\uff1bFoundation \u4fa7\u7b49\u4ef7\u8bed\u4e49 = \u5199\u5165\u73af\u8282\u5931\u8d25\u65f6 fail-closed\uff08\u65e0\u90e8\u5206\u4ea7\u7269\u3001\u9519\u8bef\u7801\u6b63\u786e\u3001\u65e0\u672c\u5730\u56de\u9000\uff09\uff0c\u7531 atomic \u884c\u4e3a\u6d4b\u8bd5\u627f\u63a5\uff0c\u4e0d\u5728 Foundation \u5efa\u5bbf\u4e3b spawn \u6d4b\u8bd5\u3002</p>"},{"location":"migration/","title":"\u4e2d\u6587 \u00b7 \u5b58\u91cf\u91c7\u7528\u4e0e\u8fc1\u79fb","text":"<p>English</p>"},{"location":"migration/#\u5b58\u91cf\u91c7\u7528\u4e0e\u8fc1\u79fbFND-070","title":"\u5b58\u91cf\u91c7\u7528\u4e0e\u8fc1\u79fb\uff08FND-070\uff09","text":"<p>\u672c\u9875\u63cf\u8ff0\u5b58\u91cf\u9879\u76ee\u5982\u4f55\u91c7\u7528 Skill Family \u57fa\u7840\u8bbe\u65bd\uff0c\u4ee5\u53ca\u8fc1\u79fb\u5b8c\u6210\u5224\u5b9a\u7684\u95e8\u7981\u3002\u5b83\u670d\u52a1\u4e8e\u4e24\u7c7b\u8bfb\u8005\uff1a\u4eba\u7c7b\u8d1f\u8d23\u4eba\u636e\u6b64\u5224\u65ad\u91c7\u7528\u8def\u5f84\u4e0e\u98ce\u9669\uff1b\u667a\u80fd\u4f53\u636e\u6b64\u7528 <code>adopt-plan</code> \u505a\u53ea\u8bfb\u76d8\u70b9\uff0c\u4e0d\u5728\u672c\u9875\u590d\u5236\u5199\u5165\u52a8\u4f5c\u3002</p> <p>0.14.0 \u628a\u56db\u79cd\u7ed3\u8bba\u5206\u5f00\u8bb0\u5f55\u3002\u80fd\u529b\u76ee\u5f55\u67e5\u8be2\u53ea\u53d1\u73b0\u5019\u9009\uff1b\u8fc1\u79fb\u72b6\u6001 <code>complete</code> \u53ea\u8bc1\u660e\u8fc1\u79fb\u95ed\u73af\uff1b\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u7531\u6d88\u8d39\u8005\u81ea\u5df1\u7684\u9002\u914d\u5668\u6d4b\u8bd5\u4e0e\u9886\u57df\u95e8\u7981\u58f0\u660e\uff1b\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u53ea\u7531\u663e\u5f0f\u7684 <code>check qualification --native</code> \u6267\u884c\u8bc1\u660e\u3002\u4efb\u4f55\u4e00\u4e2a\u7ed3\u8bba\u90fd\u4e0d\u80fd\u66ff\u4ee3\u53e6\u5916\u4e09\u4e2a\u3002</p>"},{"location":"migration/#0140-\u6700\u77ed\u5165\u53e3","title":"0.14.0 \u6700\u77ed\u5165\u53e3","text":"<p>\u5148\u5728 migration manifest \u4e2d\u58f0\u660e\u7528\u9014\uff0c\u518d\u7528\u540c\u4e00\u7528\u9014\u77e9\u9635\u67e5\u770b\u5019\u9009\u3002<code>adopt-plan</code> \u59cb\u7ec8\u53ea\u8bfb\uff0c\u547d\u4ee4\u4e0d\u4f1a\u81ea\u52a8\u751f\u6210 decision \u6216\u4fee\u6539 Profile\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json\n</code></pre> <p>\u6bcf\u4e2a\u7528\u9014\u90fd\u5fc5\u987b\u660e\u786e\u9009\u62e9 <code>direct-adoption</code>\u3001<code>compatibility-layer</code>\u3001<code>keep-business</code> \u6216 <code>foundation-gap</code>\u3002\u53ea\u6709\u524d\u4e24\u9879\u9700\u8981 <code>targetCapability</code>\uff1b\u540e\u4e24\u9879\u7528\u4e8e\u4fdd\u7559\u6d88\u8d39\u8005\u8d23\u4efb\u6216\u767b\u8bb0 Foundation \u7f3a\u53e3\u3002\u7528\u9014\u6587\u672c\u547d\u4e2d capability ID \u4e5f\u4e0d\u4f1a\u81ea\u52a8\u5f62\u6210\u91c7\u7528\u58f0\u660e\u3002</p> <p>\u5b8c\u6210\u8fc1\u79fb\u540e\uff0c\u7ee7\u7eed\u7531\u6d88\u8d39\u8005\u9a8c\u8bc1\u5951\u7ea6\u63a5\u7ebf\u548c\u9886\u57df\u4fdd\u8bc1\u3002\u9700\u8981\u771f\u5b9e\u5bbf\u4e3b\u65f6\uff0c\u624d\u663e\u5f0f\u8fd0\u884c\uff1a</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p><code>--request</code> \u548c <code>--bindings</code> \u662f\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 JSON\uff1b\u547d\u4ee4\u4f1a\u5148\u505a\u7cbe\u786e\u7248\u672c\u3001\u76ee\u5f55\u80fd\u529b\u548c\u53c2\u6570\u9884\u68c0\uff0c\u518d\u51b3\u5b9a\u662f\u5426\u89e6\u78b0\u5bbf\u4e3b\u3002\u7f3a\u5c11\u8bc1\u636e\u3001\u8df3\u8fc7\u6267\u884c\u6216\u7ec8\u6001\u4e0d\u786e\u5b9a\u65f6\uff0c\u4e0d\u80fd\u5f97\u5230 <code>real-host-qualified</code>\u3002</p>"},{"location":"migration/#\u5206\u7c7b\u65b9\u6cd5","title":"\u5206\u7c7b\u65b9\u6cd5","text":"<p>\u5b58\u91cf\u4ed3\u63a5\u5165 Foundation \u524d\uff0c\u5148\u6309\u4e0b\u9762\u56db\u7c7b\u5f52\u7c7b\u3002\u5206\u7c7b\u51b3\u5b9a\u8d70\u54ea\u6761\u8def\u5f84\u3001\u662f\u5426\u5199\u6587\u4ef6\u3001\u65e7\u5b9e\u73b0\u5982\u4f55\u5904\u7406\u3002</p> \u7c7b\u522b \u542b\u4e49 \u5904\u7406\u8def\u5f84 \u662f\u5426\u5199\u6587\u4ef6 <code>direct-adoption</code> \u4ed3\u5185\u5df2\u6709\u80fd\u529b\u53ef\u88ab Foundation \u539f\u6837\u66ff\u4ee3\uff0c\u65e0\u4e1a\u52a1\u8bed\u4e49\u8026\u5408 \u76f4\u63a5\u91c7\u7528\uff1a<code>adopt-plan</code> \u76d8\u70b9 \u2192 <code>scaffold</code>/<code>projection</code> \u843d\u76d8 \u662f\uff08\u53d7\u6536\u5bb9\uff09 <code>compatibility-layer</code> \u4ed3\u5185\u5df2\u6709\u5b9e\u73b0\u4e0e Foundation \u63a5\u53e3\u5b58\u5728\u5dee\u5f02\uff0c\u9700\u4e00\u5c42\u517c\u5bb9\u9002\u914d \u5199\u517c\u5bb9\u5c42\u540e\u91c7\u7528\uff0c\u65e7\u5b9e\u73b0\u7ecf\u517c\u5bb9\u5c42\u9000\u51fa \u662f\uff08\u517c\u5bb9\u5c42\u53d7\u6536\u5bb9\uff09 <code>keep-business</code> \u80fd\u529b\u542b\u9886\u57df\u8bed\u4e49\u6216\u4e1a\u52a1\u72b6\u6001\u673a\uff0c\u5c5e\u4e8e\u8c03\u7528\u65b9\u62e5\u6709\uff0cFoundation \u4e0d\u63a5 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u53ea\u63a5\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236 \u5426\uff08Foundation \u4fa7\uff09 <code>foundation-gap</code> \u9700\u8981\u7684\u80fd\u529b Foundation \u5c1a\u672a\u63d0\u4f9b\uff08\u5982 host apply\u3001Qoder driver\uff09 \u7559\u5728\u6d88\u8d39\u8005\u6216\u540e\u7eed\u7248\u672c\uff0c\u4e0d\u5f3a\u884c\u6269\u5f20 Foundation \u5426 <p>\u5206\u7c7b\u662f\u91c7\u7528\u51b3\u7b56\u7684\u524d\u63d0\u3002\u843d\u5165 <code>keep-business</code> \u6216 <code>foundation-gap</code> \u7684\u80fd\u529b\uff0c\u4e0d\u5e94\u4e3a\u4e86\u300c\u5b8c\u6210\u91c7\u7528\u300d\u800c\u585e\u8fdb Foundation\uff1b\u8fd9\u6b63\u597d\u662f\u67b6\u6784\u8def\u7531\u7b2c 1\u30018 \u6b65\u7684\u843d\u5730\u3002</p>"},{"location":"migration/#\u539f\u5219","title":"\u539f\u5219","text":"<ol> <li>\u8ba1\u5212\u5148\u884c\uff1a\u4efb\u4f55\u5b58\u91cf\u4ed3\u5148\u8fd0\u884c\u53ea\u8bfb <code>adopt-plan</code>\uff0c\u62ff\u5230\u73b0\u72b6\u3001\u76ee\u6807 Profile\u3001\u7cbe\u786e\u5199\u96c6\u3001\u51b2\u7a81\u3001\u65e7\u5b9e\u73b0\u9000\u51fa\u6e05\u5355\u4e0e\u9a8c\u6536\u547d\u4ee4\uff0c\u518d\u51b3\u5b9a\u662f\u5426\u6267\u884c\u5199\u5165\u3002</li> <li>\u53ea\u8bfb\u8ba1\u5212\u96f6\u53d8\u5316\uff1a<code>adopt-plan</code> \u4e0d\u5199\u4efb\u4f55\u6587\u4ef6\uff08\u542b\u4e34\u65f6\u6587\u4ef6\uff09\u3001\u4e0d\u8fd0\u884c git \u5199\u547d\u4ee4\u3001\u4e0d\u6539\u540d\u3001\u4e0d\u89e6\u78b0\u8fdc\u7aef\uff1b\u5bf9\u8f93\u5165\u4ed3\u5b57\u8282\u96f6\u53d8\u5316\uff08\u524d\u540e\u54c8\u5e0c\u8d70\u67e5\u53ef\u8bc1\uff09\u3002</li> <li>\u91c7\u7528\u4e0e\u6539\u540d\u5206\u79bb\uff1a\u57fa\u7840\u8bbe\u65bd\u91c7\u7528\u7edd\u4e0d\u8fde\u5e26\u4ed3\u5e93\u6539\u540d\u6216\u8fdc\u7aef\u5750\u6807\u53d8\u66f4\uff1b\u4e24\u8005\u662f\u72ec\u7acb\u51b3\u7b56\uff0c\u5de5\u5177\u4e0d\u63d0\u4f9b\u4efb\u4f55\u6539\u540d\u80fd\u529b\u3002</li> <li>\u53cc\u8f68\u4e0d\u7b97\u5b8c\u6210\uff1a\u8fc1\u79fb\u5b8c\u6210\u5224\u5b9a\u8981\u6c42\u65e7\u91cd\u590d\u5b9e\u73b0\u5df2\u5220\u9664\uff1b\u53ea\u63a5\u5165\u65b0\u57fa\u7840\u8bbe\u65bd\u800c\u65e7\u5b9e\u73b0\u4ecd\u5728\uff0c\u5224\u5b9a\u6052\u4e3a false\u3002</li> </ol>"},{"location":"migration/#adopt-plan-\u8f93\u51fa\u7ed3\u6784","title":"adopt-plan \u8f93\u51fa\u7ed3\u6784","text":"\u6bb5\u843d \u5185\u5bb9 <code>target</code> \u73b0\u72b6\uff1a\u5165\u53e3\u6570\u3001\u76ee\u6807\u81ea\u6709\u53d7\u7ba1\u58f0\u660e <code>project</code> / <code>traceability</code> \u76ee\u6807 Profile \u4e0e\u6bcf\u9879\u5199\u5165\u7684\u771f\u6e90\uff08Contracts \u7248\u672c\u3001skeleton \u751f\u6210\u51fd\u6570\u3001\u8bb8\u53ef\u8bc1 Profile \u4e0e\u53d8\u4f53\uff09 <code>git</code> \u53ea\u8bfb Git \u524d\u7f6e\u72b6\u6001\uff08\u4ed3\u5e93\u3001HEAD\u3001clean\uff09 <code>writeSet</code> \u7cbe\u786e\u5199\u96c6\uff1a\u6bcf\u8def\u5f84\u7684 action\uff08\u4ec5 <code>create</code>/<code>unchanged</code>\uff09\u3001fileClass\u3001sha256 <code>conflicts</code> \u624b\u5199\u51b2\u7a81\u3001\u53d7\u7ba1\u6f02\u79fb\u3001\u7b26\u53f7\u94fe\u63a5\u5360\u4f4d\u3001\u7f3a\u5b57\u6bb5\u4e34\u65f6\u4f8b\u5916 <code>risks</code> dirty\u3001\u5d4c\u5957\u4ed3\u3001tracked-but-ignored\u3001\u5230\u671f\u4f8b\u5916\u7b49 <code>migration</code> \u8fc1\u79fb\u72b6\u6001\u673a\uff1a\u7ed1\u5b9a\uff08binding\uff09\u3001\u5728\u76d8\u8bc1\u660e\uff08adoptionProof\uff09\u3001\u5f85\u5199\u5165\u6570\u3001check \u95e8\u7981\u3001\u56db\u7c7b\u9a8c\u8bc1\u8bc1\u636e\u3001\u72b6\u6001\u4e0e\u5b8c\u6210\u5224\u5b9a <code>verificationPlan</code> \u9a8c\u6536\u547d\u4ee4\u5e8f\u5217\uff08check \u2192 projection \u2192 \u590d\u67e5\uff09"},{"location":"migration/#\u8fc1\u79fb\u6e05\u5355skill-familymigrationjson","title":"\u8fc1\u79fb\u6e05\u5355\uff08skill-family.migration.json\uff09","text":"<p>\u76ee\u6807\u4ed3\u5728\u6839\u76ee\u5f55\u58f0\u660e\u81ea\u5df1\u7684\u8fc1\u79fb\u72b6\u6001\uff1a</p> <pre><code>{\n \"schemaVersion\": 1,\n \"kind\": \"skill-family.migration-manifest\",\n \"manifestVersion\": 4,\n \"capabilityUseContext\": { \"scope\": \"harness\", \"locale\": \"zh-CN\" },\n \"capabilityUses\": [\n {\n \"useId\": \"safe-output-write\",\n \"problemStatement\": \"\u5199\u5165\u8f93\u51fa\u65f6\u4e0d\u80fd\u7559\u4e0b\u6b8b\u7f3a\u6587\u4ef6\",\n \"constraints\": [\"\u6d4b\u8bd5\u4e0d\u5f97\u5199\u5165\u771f\u5b9e\u9879\u76ee\u76ee\u5f55\"],\n \"retainedGuarantees\": [\"\u8f93\u51fa\u5236\u54c1\u4ecd\u7531\u6d88\u8d39\u8005\u9009\u62e9\"],\n \"catalogFilters\": [\"\u539f\u5b50\u5199\"]\n }\n ],\n \"capabilityDecisions\": [\n {\n \"useId\": \"safe-output-write\",\n \"disposition\": \"direct-adoption\",\n \"targetCapability\": \"foundation.harness.atomic-write\",\n \"reason\": \"\u4e1a\u52a1\u4e2d\u7acb\u7684\u539f\u5b50\u5199\u673a\u5236\u8986\u76d6\u8be5\u9700\u6c42\uff0c\u5236\u54c1\u9009\u62e9\u4ecd\u7531\u6d88\u8d39\u8005\u8d1f\u8d23\"\n }\n ],\n \"legacyInfra\": [\n {\n \"path\": \"scripts/old-validator.mjs\",\n \"replacedBy\": null,\n \"useId\": \"safe-output-write\",\n \"recoveryRef\": \"docs/recovery/old-validator.md\"\n }\n ],\n \"legacyReferences\": [\n {\n \"path\": \"src/index.mjs\",\n \"text\": \"legacyWrite()\",\n \"replacedBy\": \"foundation.harness.atomic-write\",\n \"useId\": \"safe-output-write\"\n }\n ],\n \"exceptions\": []\n}\n</code></pre> <p>\u4ee5\u4e0a\u793a\u4f8b\u4e0e <code>positive-04-capability-adoption.json</code> \u7684\u673a\u5668 fixture \u5bf9\u9f50\uff1a<code>replacedBy: null</code> \u8868\u793a\u65e7\u5b9e\u73b0\u5c1a\u672a\u66ff\u4ee3\uff0c<code>recoveryRef</code> \u8bb0\u5f55\u6062\u590d\u6307\u5f15\uff1b\u5de5\u5177\u53ea\u8bfb\u8bc4\u4f30\u5b58\u5728\u6027\uff0c\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\u3002</p> <p>0.3.0 \u4e2d\u7684 Quickstart Profile candidate \u5df2\u5347\u7ea7\u5230 v2\u3002\u8fc1\u79fb\u6e05\u5355\u82e5\u7ed1\u5b9a candidate \u80fd\u529b\uff0c\u4e09\u4e2a Foundation \u5305\u5fc5\u987b\u7edf\u4e00\u7cbe\u786e\u9501\u5b9a\u4e3a 0.3.0\uff1b\u4ecd\u9700 v1 \u7684\u5b58\u91cf\u63a5\u5165\u7ee7\u7eed\u7edf\u4e00\u9501\u5b9a 0.2.1\uff0c\u4e0d\u6df7\u88c5\u4e24\u7ec4\u7248\u672c\u3002</p> <ul> <li><code>legacyInfra</code> \u6bcf\u9879\u7ed9\u51fa\u65e7\u5b9e\u73b0\u8def\u5f84\u4e0e\u66ff\u4ee3\u7269\uff1b\u5de5\u5177\u53ea\u8bfb\u8bc4\u4f30\u5b58\u5728\u6027\uff0c\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\u3002</li> <li><code>exceptions</code> \u662f\u4e34\u65f6\u4f8b\u5916\uff1a\u5fc5\u987b\u540c\u65f6\u542b\u8d1f\u8d23\u4eba\uff08owner\uff09\u3001\u539f\u56e0\uff08reason\uff09\u3001\u622a\u6b62\u65f6\u95f4\uff08deadline\uff09\u3001\u8fc1\u79fb\u76ee\u6807\uff08migrationTarget\uff09\u56db\u9879\uff0c\u7f3a\u4efb\u4e00\u5b57\u6bb5\u5373\u8ba1\u4e3a\u51b2\u7a81\uff08\u8ba1\u5212\u5931\u8d25\uff09\uff1b\u5230\u671f\u4f8b\u5916\u4e0d\u81ea\u52a8\u7eed\u671f\uff0c\u6301\u7eed\u963b\u65ad\u5b8c\u6210\u5224\u5b9a\u3002</li> <li><code>targetProfile</code> / <code>foundationPackages</code>\uff1a\u91c7\u7528\u7ed1\u5b9a\u3002\u76ee\u6807 Profile \u5fc5\u987b\u4e0e\u8ba1\u5212 Profile \u4e00\u81f4\uff1b\u4e09\u4e2a Foundation \u5305\uff08contracts\u3001harness-node\u3001engineering-kit\uff09\u5fc5\u987b\u5404\u81ea\u7ed1\u5b9a\u7cbe\u786e\u7248\u672c\u53f7\uff08\u4e0d\u63a5\u53d7\u6d6e\u52a8\u8303\u56f4\uff09\u4e0e <code>sha256:</code> \u6458\u8981\u3002</li> <li><code>verification</code>\uff1a\u56db\u7c7b\u9a8c\u8bc1\u8bc1\u636e\u6587\u6863\u8def\u5f84\uff08unit\u3001integration\u3001consumer\u3001independentAudit\uff09\u3002\u6bcf\u4efd\u8bc1\u636e\u5fc5\u987b\u662f\u53ef\u89e3\u6790 JSON \u4e14\u5176 <code>projectId</code> \u4e0e\u76ee\u6807\u9879\u76ee\u8eab\u4efd\u4e00\u81f4\uff0c\u624d\u8ba1\u4e3a proven\uff1b\u8def\u5f84\u8d8a\u754c\u3001\u7f3a\u5931\u3001\u4e0d\u53ef\u89e3\u6790\u3001\u8eab\u4efd\u4e0d\u7b26\u5747\u4e3a\u672a\u8bc1\u660e\uff0cfail-closed\u3002</li> </ul>"},{"location":"migration/#\u8fc1\u79fb\u72b6\u6001\u673a","title":"\u8fc1\u79fb\u72b6\u6001\u673a","text":"<p>\u72b6\u6001\u5355\u8c03\u9012\u8fdb\uff0c\u53ea\u7531\u53ea\u8bfb\u8bc1\u636e\u63a8\u5bfc\uff0c\u4efb\u4f55\u5de5\u5177\u90fd\u4e0d\u901a\u8fc7\u5199\u5165\u63a8\u8fdb\u72b6\u6001\uff1a</p> <pre><code>not-declared \u2192 declared \u2192 adopted \u2192 verified \u2192 complete\n</code></pre> \u72b6\u6001 \u542b\u4e49 <code>not-declared</code> \u4e0d\u5b58\u5728\u5951\u7ea6\u6709\u6548\u7684\u8fc1\u79fb\u6e05\u5355 <code>declared</code> \u6e05\u5355\u5951\u7ea6\u6709\u6548\uff0c\u4f46\u91c7\u7528\u4e8b\u5b9e\u8bc1\u660e\u4e0d\u5168 <code>adopted</code> Foundation \u5b57\u8282\u5df2\u5728\u76d8\u4e14\u65e7\u5b9e\u73b0\u5df2\u9000\u51fa\uff0ccheck \u95e8\u7981\u672a\u7eff <code>verified</code> check \u95e8\u7981\u7eff\uff0c\u9a8c\u8bc1\u8bc1\u636e\u672a\u5168\u90e8 proven <code>complete</code> \u516b\u9879\u5b8c\u6210\u6761\u4ef6\u5168\u90e8\u6ee1\u8db3\uff1b<code>complete</code> \u4e3a\u771f\u5f53\u4e14\u4ec5\u5f53\u72b6\u6001\u4e3a <code>complete</code>"},{"location":"migration/#\u5b8c\u6210\u5224\u5b9a\u95e8\u7981","title":"\u5b8c\u6210\u5224\u5b9a\u95e8\u7981","text":"<p><code>migration.completion.complete</code> \u4e3a true \u5f53\u4e14\u4ec5\u5f53\u5168\u90e8\u516b\u9879\u6210\u7acb\uff1a</p> <ol> <li>\u5df2\u58f0\u660e\u5951\u7ea6\u6709\u6548\u7684\u8fc1\u79fb\u6e05\u5355\uff08kind/\u5b57\u6bb5\u7ecf Contracts schema \u6821\u9a8c\uff09\uff1b</li> <li>\u91c7\u7528\u7ed1\u5b9a\u5df2\u8bc1\u660e\uff1a\u76ee\u6807 Profile \u4e0e\u8ba1\u5212\u4e00\u81f4\uff0c\u4e09\u4e2a Foundation \u5305\u5747\u7ed1\u5b9a\u7cbe\u786e\u7248\u672c\u4e0e sha256 \u6458\u8981\uff1b</li> <li>Project Manifest\u3001managed lock\u3001identity \u4e0e\u5168\u90e8\u53d7\u7ba1\u9aa8\u67b6\u6587\u4ef6\u5728\u76d8\u4e14\u6458\u8981\u4e0e\u8ba1\u5212\u4e00\u81f4\uff08<code>adoptionProof.missing</code>/<code>mismatched</code> \u4e3a\u7a7a\uff09\uff1b</li> <li>\u5199\u96c6\u4e2d\u65e0\u5f85\u6267\u884c\u7684 create/replace/project \u52a8\u4f5c\uff08<code>pendingWrites</code> \u4e3a 0\uff09\uff1b</li> <li>Foundation check \u95e8\u7981\u7eff\uff1b</li> <li>\u6bcf\u9879\u65e7\u5b9e\u73b0\u5747\u5df2\u9000\u51fa\uff08absent\uff09\u2014\u2014containment \u62d2\u7edd\u6216\u7578\u5f62\u6761\u76ee\u4e0e present \u540c\u7b49 fail-closed\uff1b</li> <li>\u65e0\u7f3a\u5b57\u6bb5\u3001\u65e0\u4e0d\u53ef\u89e3\u6790\u622a\u6b62\u65f6\u95f4\u3001\u65e0\u5df2\u5230\u671f\u7684\u4e34\u65f6\u4f8b\u5916\uff1b\u65e0\u672a\u89e3\u51b3\u7684\u91c7\u7528\u51b2\u7a81\uff1b</li> <li>\u56db\u7c7b\u9a8c\u8bc1\u8bc1\u636e\uff08unit/integration/consumer/independentAudit\uff09\u5168\u90e8 proven \u4e14\u8eab\u4efd\uff08projectId\uff09\u5339\u914d\u3002</li> </ol> <p>\u672a\u8bc4\u4f30\u7684\u8f93\u5165\u4e0e\u672a\u8bc1\u660e\u7b49\u4ef7\uff1a\u95e8\u7981\u53ea\u4f9d\u636e\u51fa\u793a\u7684\u8bc1\u636e\u524d\u8fdb\u3002\u963b\u65ad\u7406\u7531\uff08<code>blockers</code>\uff09\u4e3a\u7a33\u5b9a\u53ef\u8bfb\u5b57\u7b26\u4e32\uff0c\u53ef\u76f4\u63a5\u8fdb\u5165\u8fc1\u79fb\u8bc4\u5ba1\u8bb0\u5f55\u3002</p>"},{"location":"migration/#\u5f3a\u5236\u8d1f\u4f8b\u4efb\u4e00\u573a\u666f-completion-\u5fc5\u987b\u4e3a-false","title":"\u5f3a\u5236\u8d1f\u4f8b\uff08\u4efb\u4e00\u573a\u666f completion \u5fc5\u987b\u4e3a false\uff09","text":"<ul> <li>\u7a7a\u4ed3 + \u7a7a\u6e05\u5355\uff08\u65e0\u5951\u7ea6\u6709\u6548\u6e05\u5355 \u2192 <code>not-declared</code>\uff09\uff1b</li> <li>\u6e05\u5355 kind \u9519\u8bef\uff08schema-invalid \u2192 \u89c6\u540c\u672a\u58f0\u660e\uff09\uff1b</li> <li>9 \u4e2a\u9aa8\u67b6\u6587\u4ef6\u4ecd\u5f85 create\uff08<code>declared</code>\uff0c\u5217\u51fa\u5168\u90e8\u7f3a\u5931\u8def\u5f84\uff09\uff1b</li> <li>managed lock \u6f02\u79fb\uff08<code>mismatched</code> \u975e\u7a7a\uff09\uff1b</li> <li>\u53ea\u63a5\u5165\u65b0\u5b9e\u73b0\u3001\u65e7\u5b9e\u73b0\u4ecd\u5728\uff08\u53cc\u8f68 \u2192 <code>declared</code>\uff09\uff1b</li> <li>\u6d88\u8d39\u8005\u9a8c\u8bc1\u8bc1\u636e\u7f3a\u5931\u6216\u8eab\u4efd\u4e0d\u7b26\uff08<code>verified</code>\uff0c\u4e0d\u5f97 complete\uff09\uff1b</li> <li>\u4e34\u65f6\u4f8b\u5916\u8fc7\u671f\uff08\u5de5\u5177\u7edd\u4e0d\u7eed\u671f\uff09\u3002</li> </ul>"},{"location":"migration/#\u65e7\u5b9e\u73b0\u5220\u9664\u4e0e\u56de\u6eda\u5408\u540c","title":"\u65e7\u5b9e\u73b0\u5220\u9664\u4e0e\u56de\u6eda\u5408\u540c","text":"<ul> <li>\u5220\u9664\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff1a<code>adopt-plan</code> \u53ea\u8bc4\u4f30\u65e7\u5b9e\u73b0\u5b58\u5728\u6027\u5e76\u5217\u51fa\u9000\u51fa\u6e05\u5355\uff0c\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\uff1b<code>foundation-gap</code> \u4e0e <code>keep-business</code> \u7c7b\u80fd\u529b\u4e0d\u8981\u6c42\u5220\u9664\u3002</li> <li>\u56de\u6eda\u4ee5\u8bc1\u636e\u4e3a\u51c6\uff1a\u91c7\u7528\u843d\u76d8\u524d\u5fc5\u987b\u5148\u6709 <code>adoptionProof</code> \u4e0e <code>foundationPlanDigest</code> \u53cc\u6458\u8981\u7ed1\u5b9a\uff1b\u56de\u6eda\u65f6\u4ee5\u8ba1\u5212\u5199\u96c6\u7684 <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u8fd8\u539f\uff0c\u672a\u58f0\u660e\u524d\u7f6e\u72b6\u6001\u7684\u8986\u76d6\u52a8\u4f5c\u5728 <code>projection</code> \u9636\u6bb5\u5373\u62d2\u7edd\u3002</li> <li>fail-closed \u9ed8\u8ba4\uff1a\u4efb\u4f55\u4e0d\u53ef\u89e3\u6790\u3001\u8d8a\u754c\u3001\u8eab\u4efd\u4e0d\u7b26\u6216\u8bc1\u636e\u7f3a\u5931\u7684\u8f93\u5165\uff0c\u90fd\u4f7f\u5bf9\u5e94\u5224\u5b9a\u4e3a\u672a\u8bc1\u660e\uff0c\u4e0d\u5047\u8bbe\u6210\u529f\u3002</li> </ul>"},{"location":"migration/#Profile-\u8349\u7a3f","title":"Profile \u8349\u7a3f","text":"<p><code>adopt-plan</code> \u8f93\u51fa\u643a\u5e26 <code>profileDraft</code> \u5b50\u5757\uff08kind=<code>skill-family.profile-draft</code>\uff0cschemaVersion=1\uff09\uff1a\u4e00\u4efd\u9884\u586b\u7684 profile.json \u63cf\u8ff0\u7b26\u8349\u7a3f\uff08<code>descriptorRelPath</code>=<code>profile.json</code>\uff09\u3002adoption-lock \u6982\u5ff5\u4e0e\u5176\u5de5\u4ef6\u5f62\u6001\u5df2\u5e9f\u5f03\uff08\u6574\u6539\u4ea4\u63a5 D-8\uff09\uff1a\u8f7b\u91cf\u91c7\u7528\u8bc1\u660e\u5c31\u662f\u63cf\u8ff0\u7b26\u81ea\u8eab\u7684\u91c7\u7528\u58f0\u660e\uff0c\u7531 <code>verifyProfile</code>\uff08Profile SPI v3\uff09\u673a\u68b0\u6838\u9a8c\u2014\u2014\u5b57\u6bb5\u5b8c\u6574\u6027\u4e0e pin \u5f62\u6001\u5728\u63cf\u8ff0\u7b26 Schema \u6b65\u628a\u5173\uff08SPE1001\uff09\uff0cpin \u6458\u8981\u6309 GK-4 \u7eaa\u5f8b\u5bf9\u5199\u96c6\u5185\u771f\u5b9e\u5de5\u4ef6\u5b57\u8282\u9010\u4e00\u6bd4\u5bf9\uff08SPE1006\uff09\uff0coverrides \u53ea\u6536\u7d27\u7b56\u7565\u72ec\u7acb\u88c1\u51b3\uff08SPE1007\uff09\u3002</p> <p>\u8349\u7a3f\u9884\u586b\u4e00\u5207\u53ef\u7531\u53ea\u8bfb\u4e8b\u5b9e\u673a\u68b0\u63a8\u5bfc\u7684\u5185\u5bb9\uff1a</p> <ul> <li>\u63cf\u8ff0\u7b26\u8eab\u4efd\u4e0e\u57fa\u7ebf\uff1a<code>profile.id</code>/<code>profile.name</code> \u6765\u81ea\u8ba1\u5212\u8f93\u5165\uff0c<code>base.contractsVersion</code> \u4e3a\u5df2\u52a0\u8f7d\u7684\u51bb\u7ed3 Contracts \u7248\u672c\uff1b<code>differences</code>/<code>spi</code> \u4e3a\u7a7a\u6570\u7ec4\u8d77\u70b9\u3002</li> <li>\u91c7\u7528\u58f0\u660e\uff08D-8 \u6700\u5c0f\u5b57\u6bb5\u96c6\uff0c\u6743\u5a01\u5b9a\u4e49\u5728 <code>profiles/spi/extension-spi.json</code> \u7684 <code>adoptionDeclaration</code>\uff09\uff1a</li> <li><code>foundation_profile.id</code> \u4e3a\u8ba1\u5212\u91c7\u7528\u7684 Foundation Profile id\uff1b<code>version</code>/<code>stability</code> \u5c5e\u4eba\u7c7b\u51b3\u7b56\uff0c\u4fdd\u6301 null\u3002</li> <li><code>foundation_pin.algorithm</code> \u6052\u4e3a <code>sha256</code>\uff1b\u4e09\u4e2a Foundation \u5305\u7684 <code>version</code> \u6309\u300c\u8fc1\u79fb\u6e05\u5355\u58f0\u660e\u4f18\u5148\uff0c\u5176\u6b21\u52a0\u8f7d\u5e38\u91cf\u300d\u9884\u586b\uff1b<code>path</code>/<code>sha256</code> \u5728\u771f\u5b9e\u5de5\u4ef6\u653e\u5165 Profile \u5199\u96c6\u4e4b\u524d\u4fdd\u6301 null\uff08\u6458\u8981\u53ea\u80fd\u6765\u81ea\u771f\u5b9e\u5b57\u8282\uff0c\u7edd\u4e0d\u731c\u6d4b\uff09\u3002</li> <li><code>adopted_at</code> \u5728\u91c7\u7528\u65f6\u523b\u624d\u4ea7\u751f\uff0c\u89c4\u5212\u671f\u4fdd\u6301 null\u3002</li> <li><code>overrides</code> \u4e3a\u7a7a\u6570\u7ec4\uff08\u7a7a\u793a\u4f8b\uff09\uff1a\u8986\u76d6\u662f\u53ef\u9009\u7684\u81ea\u6536\u7d27\u58f0\u660e\uff0cKit \u4e0d\u679a\u4e3e\u89c4\u5219\u793a\u4f8b\uff08\u6838\u5fc3\u4e0d\u5bfc\u5165 Profile \u5c42\uff09\uff1b\u8349\u7a3f\u9644\u5e26 <code>overridesGuidance</code> \u8bf4\u660e\u53ea\u6536\u7d27\u8bed\u4e49\u3002</li> </ul>"},{"location":"migration/#\u4e0d\u5b8c\u6574\u963b\u65ad\u89c4\u5219","title":"\u4e0d\u5b8c\u6574\u963b\u65ad\u89c4\u5219","text":"<ul> <li>\u4efb\u4f55\u4e0d\u53ef\u673a\u68b0\u63a8\u5bfc\u7684\u5b57\u6bb5\u4fdd\u6301 null \u5e76\u5217\u5165 <code>incompleteFields</code>\uff1b\u53ea\u8981 <code>incompleteFields</code> \u975e\u7a7a\u5373 <code>ready=false</code>\uff1a\u5e26\u7f3a\u53e3\u7684\u8349\u7a3f\u4e0d\u5f97\u76f4\u63a5\u843d\u76d8\u4e3a\u91c7\u7528\u58f0\u660e\u3002</li> <li>\u5de5\u5177\u7edd\u4e0d\u731c\u6d4b\uff1a\u4eba\u5de5\u9700\u8865\u9f50 <code>foundation_profile.version</code>/<code>stability</code>\u3001\u5404\u5305\u5de5\u4ef6\u7684 <code>path</code>/<code>sha256</code>\u3001<code>adopted_at</code> \u4e0e <code>profile.version</code>\u3002</li> </ul>"},{"location":"migration/#\u7ed1\u5b9a","title":"\u7ed1\u5b9a","text":"<p>\u8349\u7a3f\u643a\u5e26\u53cc sha256 \u6458\u8981\uff08<code>binding</code> \u5757\uff09\uff1a<code>targetSetDigest</code> \u6c47\u603b\u76ee\u6807\u4ed3\u6587\u4ef6\u96c6\u5408\uff0c<code>foundationPlanDigest</code> \u6c47\u603b Foundation \u8ba1\u5212\u5199\u96c6\u3002\u540c\u4e00\u76ee\u6807\u4e24\u6b21\u8ba1\u5212\u5f97\u5230\u76f8\u540c\u6458\u8981\uff0c\u8349\u7a3f\u4e0e\u8ba1\u5212\u65f6\u523b\u7684\u76ee\u6807\u72b6\u6001\u7cbe\u786e\u7ed1\u5b9a\u3002</p>"},{"location":"migration/#\u8fb9\u754c","title":"\u8fb9\u754c","text":"<ul> <li><code>adopt-plan</code> \u4e25\u683c\u53ea\u8bfb\uff1a\u8349\u7a3f\u53ea\u968f\u8ba1\u5212\u8f93\u51fa\u5230 stdout\uff0c\u7edd\u4e0d\u5199\u6d88\u8d39\u8005\u4ed3\uff1b</li> <li>\u4e0d\u65b0\u589e\u7b2c\u4e94\u4e2a Kit \u9876\u5c42\u547d\u4ee4\uff1aKit \u9876\u5c42\u547d\u4ee4\u6052\u4e3a scaffold\u3001adopt-plan\u3001projection\u3001check \u56db\u4e2a\uff0c<code>profileDraft</code> \u53ea\u662f <code>adopt-plan</code> \u8f93\u51fa\u7684\u5b50\u5757\u3002</li> </ul>"},{"location":"migration/#\u5371\u5bb3\u7c7b-fixture","title":"\u5371\u5bb3\u7c7b fixture","text":"<p><code>fixtures/adoption/cases/</code> \u8986\u76d6\u4e03\u4e2a\u5371\u5bb3\u7c7b\uff1adirty \u4ed3\u3001\u5d4c\u5957\u4ed3\u3001tracked-but-ignored\u3001\u7b26\u53f7\u94fe\u63a5\u5360\u4f4d\u3001\u751f\u6210\u7269\u6f02\u79fb\u3001\u65e7\u5b9e\u73b0\u9000\u51fa\u95e8\u7981\u3001\u4e34\u65f6\u4f8b\u5916\u5b57\u6bb5\u3002\u6bcf\u4e2a\u6848\u4f8b\u4ee5\u5b57\u8282\u7ea7\u524d\u540e\u5feb\u7167\u8bc1\u660e\u8ba1\u5212\u53ea\u8bfb\uff1b\u6848\u4f8b\u8bf4\u660e\u89c1\u4ed3\u5185 <code>fixtures/adoption/README.md</code>\u3002</p>"},{"location":"public/status/","title":"Skill Family Foundation \u2014 \u516c\u5f00\u72b6\u6001","text":"<p>\u672c\u9875\u662f\u672c\u9759\u6001\u53d1\u5e03\u5feb\u7167\u7684\u76ee\u6807\u5750\u6807\u548c\u9a8c\u8bc1\u5165\u53e3\u3002\u9875\u9762\u53ea\u4ece\u5404\u5305 package.json \u7684\u7248\u672c\u771f\u6e90\u673a\u68b0\u751f\u6210\uff0c\u7531 <code>node scripts/render-public-status.mjs --check</code> \u96f6\u5199\u5165\u91cd\u7b97\u5e76\u9010\u5b57\u8282\u6821\u9a8c\u3002</p>"},{"location":"public/status/#\u5305","title":"\u5305","text":"\u5305 \u7248\u672c \u516c\u5f00\u53d1\u5e03\u955c\u50cf <code>skill-family-contracts</code> 0.19.2 ifoohoo/skill-family-contracts <code>skill-family-harness-node</code> 0.19.2 ifoohoo/skill-family-harness-node <code>skill-family-engineering-kit</code> 0.19.2 ifoohoo/skill-family-engineering-kit"},{"location":"public/status/#\u6587\u6863","title":"\u6587\u6863","text":"<ul> <li>\u516c\u5f00\u6587\u6863\u7ad9</li> </ul>"},{"location":"public/status/#\u9a8c\u8bc1\u5165\u53e3","title":"\u9a8c\u8bc1\u5165\u53e3","text":"<ul> <li>\u672c\u9875\uff1a<code>node scripts/render-public-status.mjs --check</code>\uff08\u96f6\u5199\u5165\u91cd\u7b97\uff0c\u4e0e\u5df2\u63d0\u4ea4\u9875\u9762\u9010\u5b57\u8282\u4e00\u81f4\uff09</li> <li>\u9759\u6001\u7ad9\u4e0e\u57fa\u7ebf\uff1a<code>node scripts/render-public-site.mjs --check</code>\uff08\u51bb\u7ed3 MkDocs \u73af\u5883\u91cd\u7b97\uff0c\u4e0e\u5df2\u63d0\u4ea4\u57fa\u7ebf\u9010\u9879\u4e00\u81f4\uff09</li> <li>\u5de5\u4f5c\u533a\u6839\u95e8\u7981\uff1a<code>pnpm check</code>\uff0811 \u4e2a\u7a33\u5b9a\u4ea7\u54c1\u95e8\u7981\u6309\u56fa\u5b9a\u987a\u5e8f\u4e32\u8054\uff09</li> <li>registry\u3001Pages \u4e0e Release \u7684\u5b9e\u65f6\u8fdc\u7aef\u72b6\u6001\uff1a\u7531\u53d1\u5e03\u540e\u9a8c\u8bc1\u62a5\u544a\u8bc1\u660e\uff0c\u4e0d\u5728\u672c\u9875\u8bb0\u5f55</li> </ul>"},{"location":"public/status/#\u8bf4\u660e","title":"\u8bf4\u660e","text":"<ul> <li>\u672c\u9875\u4e0d\u5ba3\u79f0\u4efb\u4f55\u7248\u672c\u5df2\u5728\u8fdc\u7aef\u53d1\u5e03\uff1b\u53d1\u5e03\u52a8\u4f5c\u662f\u5426\u5df2\u6267\u884c\u7531\u53d1\u5e03\u540e\u7684\u8fdc\u7aef\u9a8c\u8bc1\u62a5\u544a\u8bc1\u660e\u3002</li> <li>\u4e09\u4e2a\u5305\u5747\u4e3a\u72ec\u7acb\u53d1\u5e03\u5230 npm \u7684\u516c\u5f00\u53d1\u5e03\u76ee\u6807\u3002</li> <li>\u8bb8\u53ef\u8bc1\uff1aApache-2.0</li> <li>\u79c1\u6709\u5de5\u4f5c\u533a\u4ed3\u4e0d\u5bf9\u5916\u53ef\u89c1\uff1b\u516c\u5f00\u53d1\u5e03\u7269\u53ea\u7ecf\u5404\u5305 public \u53d1\u5e03\u955c\u50cf\u4ed3\u4e0e npm tarball \u5206\u53d1\u3002</li> </ul>"},{"location":"recipes/","title":"\u4e2d\u6587 \u00b7 Recipes","text":"<p>English</p>"},{"location":"recipes/#Recipe-\u7d22\u5f15","title":"Recipe \u7d22\u5f15","text":"<p>\u672c\u76ee\u5f55\u7ed9\u5e38\u89c1\u67b6\u6784\u9700\u6c42\u63d0\u4f9b\u53ef\u76f4\u63a5\u590d\u5236\u6267\u884c\u7684\u6700\u5c0f\u505a\u6cd5\u3002\u6bcf\u4e2a recipe \u6309\u56fa\u5b9a\u4e5d\u6bb5\u7ec4\u7ec7\uff1a\u573a\u666f\u4e0e\u975e\u573a\u666f\u3001\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c\u3001\u6700\u5c0f\u4ee3\u7801\u6216\u547d\u4ee4\u3001\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e\u3001\u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b\u3001\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4\u3001\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91\u3001\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879\u3002</p>"},{"location":"recipes/#\u9009\u62e9\u89c4\u5219","title":"\u9009\u62e9\u89c4\u5219","text":"<ul> <li>\u9700\u6c42\u542b\u9886\u57df\u8bed\u4e49 / \u72b6\u6001\u673a / \u5ba1\u8ba1 oracle \u2192 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u5728\u8fd9\u91cc\u627e Foundation \u80fd\u529b\u3002</li> <li>\u9700\u8981\u7ed3\u6784\u6216\u534f\u8bae\u6821\u9a8c \u2192 \u770b <code>domain-schema-validation</code>\u3002</li> <li>\u9700\u8981\u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u6216\u539f\u5b50\u5199 \u2192 \u770b <code>safe-filesystem-and-atomic-write</code>\u3002</li> <li>\u9700\u8981\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a \u2192 \u770b <code>deterministic-human-report</code>\u3002</li> <li>\u9700\u8981\u6301\u4e45\u4e8b\u4ef6\u4e0e\u6d3e\u751f\u5feb\u7167 \u2192 \u770b <code>durable-local-state</code>\u3002</li> <li>\u9700\u8981\u5b58\u91cf\u91c7\u7528\u76d8\u70b9 \u2192 \u770b <code>adopt-existing-repository</code>\u3002</li> <li>\u9700\u8981\u6587\u672c\u8d44\u6e90\u95ed\u5305\u6216\u5bbf\u4e3b\u63a5\u5165 \u2192 \u770b <code>adapter-text-closure</code> / <code>host-profile-integration</code>\u3002</li> <li>\u9700\u8981\u8bd5\u7528 Quickstart Profile v2 \u2192 \u7cbe\u786e\u9501\u5b9a\u4e09\u4e2a\u5305\u7684 0.3.0 candidate \u5b50\u8def\u5f84\uff1b\u9700\u8981 v1 \u65f6\u7ee7\u7eed\u9501\u5b9a 0.2.1\u3002</li> </ul>"},{"location":"recipes/#\u5171\u540c\u9a8c\u8bc1\u7ea6\u5b9a","title":"\u5171\u540c\u9a8c\u8bc1\u7ea6\u5b9a","text":"<ul> <li>\u6240\u6709\u793a\u4f8b\u5728\u65b0\u7684\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u6267\u884c\uff0c\u4e0d\u7559\u4e2a\u4eba\u8def\u5f84\u6216\u51ed\u636e\u3002</li> <li>\u793a\u4f8b\u4e0d\u542b\u4f01\u4e1a\u6807\u8bc6\u3001\u79c1\u6709 Profile\u3001\u771f\u5b9e\u4e1a\u52a1\u6570\u636e\u6216\u4e2a\u4eba\u8def\u5f84\u3002</li> <li>\u6bcf\u4e2a recipe \u81f3\u5c11\u7ed9\u51fa\u4e00\u4e2a\u6b63\u4f8b\u4e0e\u4e00\u4e2a\u8d1f\u4f8b\uff1b\u8d1f\u4f8b\u5fc5\u987b\u4ea7\u751f\u7a33\u5b9a\u5931\u8d25\u7801\u6216\u62d2\u7edd\u3002</li> <li>\u9a8c\u8bc1\u547d\u4ee4\u53ef\u76f4\u63a5\u590d\u5236\u8fd0\u884c\uff1b\u9700\u8981\u5305\u65f6\u5148 <code>npm install</code> \u5bf9\u5e94 <code>@0.3.0</code>\u3002</li> </ul>"},{"location":"recipes/#\u80fd\u529b-ID-\u603b\u89c8","title":"\u80fd\u529b ID \u603b\u89c8","text":"Recipe \u9996\u9009\u80fd\u529b ID adopt-existing-repository <code>foundation.kit.adopt-plan</code> safe-filesystem-and-atomic-write <code>foundation.harness.path-containment</code>\u3001<code>foundation.harness.atomic-write</code> domain-schema-validation <code>foundation.contracts.object-validation</code> adapter-text-closure <code>foundation.harness.resource-closure</code>\u3001<code>foundation.harness.host-adapter</code> deterministic-human-report <code>foundation.harness.report</code>\u3001<code>foundation.kit.report</code> durable-local-state <code>foundation.harness.state-store</code> host-profile-integration <code>foundation.kit.host</code>\u3001<code>foundation.profile.extension-spi</code>"},{"location":"recipes/adapter-text-closure/","title":"\u4e2d\u6587 \u00b7 Adapter \u6587\u672c\u95ed\u5305","text":"<p>English</p>"},{"location":"recipes/adapter-text-closure/#Recipe\u6587\u672c\u8d44\u6e90\u95ed\u5305\u4e0e\u5bbf\u4e3b\u6784\u5efa","title":"Recipe\uff1a\u6587\u672c\u8d44\u6e90\u95ed\u5305\u4e0e\u5bbf\u4e3b\u6784\u5efa","text":""},{"location":"recipes/adapter-text-closure/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u628a\u4e00\u7ec4\u6587\u672c\u8d44\u6e90\u5f52\u4e00\u6210\u53ef\u590d\u7b97\u7684\u95ed\u5305\uff0c\u5e76\u636e\u6b64\u5728\u53d7\u6536\u5bb9\u5904 materialize \u4e00\u4e2a\u5bbf\u4e3b\u9002\u914d\u6784\u5efa\uff0c\u4e14\u6784\u5efa\u6e05\u5355\u53ef\u5168\u6458\u8981\u590d\u9a8c\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u628a\u4e8c\u8fdb\u5236\u8d44\u6e90\u7eb3\u5165 adapter \u6295\u5f71\uff08\u4ec5\u652f\u6301\u6587\u672c\u95ed\u5305\uff09\uff1b\u9700\u8981 Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply\u3001\u81ea\u52a8\u5220\u9664\u5f0f uninstall\u3002</p>"},{"location":"recipes/adapter-text-closure/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.resource-closure</code>\uff08\u786e\u5b9a\u6027\u95ed\u5305\u4e0e sha256 \u6458\u8981\uff09\u4e0e <code>foundation.harness.host-adapter</code>\uff08adapter source closure / build / manifest \u6821\u9a8c / materialize / <code>verifyPeerAdapterDirectories</code> \u53ea\u8bfb\u540c\u7ea7\u9a8c\u8bc1\uff09\u3002</p>"},{"location":"recipes/adapter-text-closure/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>adapter source \u4e3a\u5df2\u58f0\u660e\u7684\u6587\u672c\u95ed\u5305\uff08<code>content</code> \u53ea\u63a5\u53d7 string\uff0cutf8\uff09\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1amaterialize \u7528 sibling staging + \u5355\u6b21 rename\uff0c\u76ee\u6807\u5df2\u5b58\u5728\u5219\u62d2\u7edd\uff1bprobe \u9ed8\u8ba4\u4e0d spawn\u3001\u4e0d\u8d70 PATH\u3002</li> </ul>"},{"location":"recipes/adapter-text-closure/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import {\n computeResourceClosure,\n buildAdapterClosure,\n verifyAdapterBuildManifest,\n materializeAdapterBuild,\n} from \"skill-family-harness-node\";\n\nconst closure = computeResourceClosure([\n { path: \"skill.json\", content: \"{}\" },\n { path: \"readme.md\", content: \"# demo\" },\n]);\nconst built = buildAdapterClosure(closure);\nverifyAdapterBuildManifest(built.manifest); // \u5168\u6458\u8981\u590d\u9a8c\nawait materializeAdapterBuild(built, { outDir: \"./out\" }); // \u53d7\u6536\u5bb9\u843d\u76d8\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u5148\u7b97\u95ed\u5305\u3001\u518d\u6821\u9a8c\u6e05\u5355\u3001\u6700\u540e\u539f\u5b50 materialize \u7684\u987a\u5e8f\u3002</p>"},{"location":"recipes/adapter-text-closure/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>computeResourceClosure</code> \u8fd4\u56de\u786e\u5b9a\u6027\u95ed\u5305\u5bf9\u8c61\u4e0e sha256 \u6458\u8981\uff1b<code>materializeAdapterBuild</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u51fa\u4ea7\u7269\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/closure.test.mjs</code> \u4e0e <code>test/host.test.mjs</code>\u3002</p>"},{"location":"recipes/adapter-text-closure/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u4e8c\u8fdb\u5236 content \u4e0d\u652f\u6301 -&gt; \u6821\u9a8c/\u6784\u5efa\u62d2\u7edd\nbuildAdapterClosure({ path: \"x.bin\", content: Buffer.from([0, 1, 2]) });\n// \u629b HarnessError\uff1aadapter source content \u4ec5\u652f\u6301 string (utf8)\n</code></pre> <p>\u6e05\u5355\u6458\u8981\u4e0d\u7b26\u3001\u76ee\u6807\u5df2\u5b58\u5728\u3001\u975e\u53d7\u4fe1\u53ef\u6267\u884c\u6587\u4ef6\u4e5f\u4f1a\u629b\u9519\u3002</p>"},{"location":"recipes/adapter-text-closure/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/closure.test.mjs \\\n packages/skill-family-harness-node/test/host.test.mjs\n</code></pre>"},{"location":"recipes/adapter-text-closure/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u5bbf\u4e3b\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\u3002</li> <li>\u5bbf\u4e3b\u5dee\u5f02\u58f0\u660e\u7531 Profile + Kit host \u5b50\u52a8\u4f5c\u6ce8\u5165\u3002</li> </ul>"},{"location":"recipes/adapter-text-closure/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>Harness \u53ea\u8d1f\u8d23\u6784\u5efa\u548c\u53ea\u8bfb\u540c\u7ea7\u9a8c\u8bc1\u3002\u5305 API <code>applyHostPlan</code> \u5728 Kit \u5c42\u652f\u6301\u5df2\u767b\u8bb0\u3001\u6458\u8981\u7ed1\u5b9a\u7684\u672c\u5730 install/update\uff1b\u6267\u884c uninstall \u8ba1\u5212\u4e0d\u5220\u9664\u6587\u4ef6\u3002Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply \u4ecd\u7a33\u5b9a\u62d2\u7edd\uff0cQoder \u5b8c\u6574 driver \u4e3a unsupported\u3002</li> <li><code>verifyPeerAdapterDirectories</code> \u53ea\u8bc1\u660e\u540c\u7ea7\u76ee\u5f55\u7684\u95ed\u5305\u3001\u5b57\u8282\u548c <code>logicalMappings</code> \u4e00\u81f4\uff0c\u4e0d\u63a8\u5bfc\u5b89\u88c5\u3001\u53d1\u5e03\u6216\u9886\u57df\u72b6\u6001\u3002</li> <li>materialize \u4e3a\u539f\u5b50 sibling + rename\uff0c\u5931\u8d25\u65f6\u4e0d\u5f71\u54cd\u65e2\u6709\u76ee\u6807\uff1b\u5347\u7ea7\u8ddf\u968f <code>skill-family-harness-node</code> \u7248\u672c\u3002</li> </ul>"},{"location":"recipes/adopt-existing-repository/","title":"\u4e2d\u6587 \u00b7 \u91c7\u7528\u5b58\u91cf\u4ed3\u5e93","text":"<p>English</p>"},{"location":"recipes/adopt-existing-repository/#Recipe\u5b58\u91cf\u4ed3\u53ea\u8bfb\u91c7\u7528\u76d8\u70b9","title":"Recipe\uff1a\u5b58\u91cf\u4ed3\u53ea\u8bfb\u91c7\u7528\u76d8\u70b9","text":""},{"location":"recipes/adopt-existing-repository/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u5bf9\u4e00\u4e2a\u5df2\u5b58\u5728\u7684\u5b58\u91cf\u4ed3\u5224\u65ad\u662f\u5426\u53ef\u91c7\u7528 Foundation\uff0c\u5e76\u62ff\u5230\u7cbe\u786e\u5199\u96c6\u3001\u51b2\u7a81\u4e0e\u65e7\u5b9e\u73b0\u9000\u51fa\u6e05\u5355\uff0c\u4e14\u4e0d\u6539\u52a8\u4efb\u4f55\u5b57\u8282\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u81ea\u52a8\u6539\u5199\u5b58\u91cf\u4ed3\uff08\u7981\u6b62\u5199\u6587\u4ef6\u3001\u7981\u6b62\u81ea\u52a8\u8fc1\u79fb\uff09\uff1b\u9700\u8981\u53d1\u5e03\u5230\u8fdc\u7aef\uff08\u5f52 release-skill\uff09\u3002</p>"},{"location":"recipes/adopt-existing-repository/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.kit.adopt-plan</code>\uff08\u4e25\u683c\u53ea\u8bfb\u76d8\u70b9\u4e0e\u5b8c\u6210\u5224\u5b9a\uff09\u3002\u5b83\u53ea\u8f93\u51fa\uff0c\u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u8fd0\u884c git \u5199\u547d\u4ee4\u3002</p>"},{"location":"recipes/adopt-existing-repository/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u76ee\u6807\u4ed3\u5b58\u5728\u4e14\u53ef\u88ab\u53ea\u8bfb\u8bbf\u95ee\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a<code>adopt-plan</code> \u5bf9\u8f93\u5165\u4ed3\u5b57\u8282\u96f6\u53d8\u5316\uff1b\u65e7\u5b9e\u73b0\u5220\u9664\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff0c\u5de5\u5177\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\u3002</li> </ul>"},{"location":"recipes/adopt-existing-repository/#4-\u6700\u5c0f\u547d\u4ee4","title":"4. \u6700\u5c0f\u547d\u4ee4","text":"<pre><code>npm install --save-dev skill-family-engineering-kit@0.3.0\nnpm exec -- skill-family-kit adopt-plan --root &lt;repo&gt;\n</code></pre>"},{"location":"recipes/adopt-existing-repository/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p>\u8f93\u51fa\u5305\u542b\u73b0\u72b6\uff08<code>target</code>\uff09\u3001\u76ee\u6807 Profile \u4e0e\u8ffd\u6eaf\uff08<code>project</code>/<code>traceability</code>\uff09\u3001\u53ea\u8bfb Git \u524d\u7f6e\u72b6\u6001\uff08<code>git</code>\uff09\u3001\u7cbe\u786e\u5199\u96c6\uff08<code>writeSet</code>\uff09\u3001\u51b2\u7a81\uff08<code>conflicts</code>\uff09\u3001\u98ce\u9669\uff08<code>risks</code>\uff09\u3001\u8fc1\u79fb\u72b6\u6001\u673a\uff08<code>migration</code>\uff09\u4e0e\u9a8c\u6536\u547d\u4ee4\u5e8f\u5217\uff08<code>verificationPlan</code>\uff09\u3002\u8bc1\u636e\u6765\u81ea <code>packages/skill-family-engineering-kit/test/adopt-plan.test.mjs</code> \u4e0e <code>test/migration.test.mjs</code>\u3002</p>"},{"location":"recipes/adopt-existing-repository/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<p>dirty \u4ed3\u8fd0\u884c <code>adopt-plan</code> \u524d\u540e\uff0c\u8f93\u5165\u4ed3\u5b57\u8282\u5fc5\u987b\u5b8c\u5168\u4e00\u81f4\uff08\u54c8\u5e0c\u8d70\u67e5\u53ef\u8bc1\uff09\uff1b\u5de5\u5177\u4e0d\u5199\u4e34\u65f6\u6587\u4ef6\u3001\u4e0d\u89e6\u78b0\u8fdc\u7aef\u3002\u82e5\u8fc1\u79fb\u6e05\u5355\u7f3a <code>exceptions</code> \u5fc5\u586b\u5b57\u6bb5\uff0c\u8ba1\u5212\u76f4\u63a5\u5931\u8d25\uff08\u5b8c\u6210\u5224\u5b9a false\uff09\uff0c\u5de5\u5177\u4e0d\u7eed\u671f\u3002</p>"},{"location":"recipes/adopt-existing-repository/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code># \u6b63\u4f8b\uff1a\u5bf9\u516c\u5f00 fixture \u5b58\u91cf\u4ed3\u505a\u53ea\u8bfb\u76d8\u70b9\nnpm exec -- skill-family-kit adopt-plan --root fixtures/m0-consumer\n\n# \u53ea\u8bfb\u8bca\u65ad\uff0c\u4e0d\u4fee\u590d\nnpm exec -- skill-family-kit check --root fixtures/m0-consumer\n</code></pre>"},{"location":"recipes/adopt-existing-repository/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u65e7\u5b9e\u73b0\u662f\u5426\u9000\u51fa\u3001\u4f55\u65f6\u5220\u9664\uff08\u5de5\u5177\u53ea\u8bc4\u4f30\u5b58\u5728\u6027\u5e76\u5217\u51fa\u9000\u51fa\u6e05\u5355\uff09\u3002</li> <li><code>business-logic-to-keep</code> \u4e0e <code>legacy-removal-recovery</code> \u6052\u4e3a INCOMPLETE\uff0c\u5fc5\u987b\u7531\u4eba\u7c7b\u8d1f\u8d23\u4eba\u7ed9\u51fa\u3002</li> </ul>"},{"location":"recipes/adopt-existing-repository/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li><code>adopt-plan</code> \u53ea\u8bfb\uff0c\u65e0\u5199\u98ce\u9669\uff0c\u65e0\u9700\u56de\u6eda\u3002</li> <li>\u771f\u6b63\u843d\u76d8\u7531 <code>scaffold</code>/<code>projection</code> \u6267\u884c\uff0c\u56de\u6eda\u4ee5 <code>adoptionProof</code> \u4e0e <code>foundationPlanDigest</code> \u53cc\u6458\u8981\u7ed1\u5b9a\u4e3a\u51c6\uff1b\u672a\u58f0\u660e <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u7684\u8986\u76d6\u52a8\u4f5c\u5728 <code>projection</code> \u9636\u6bb5\u5373\u62d2\u7edd\u3002</li> <li>\u82e5\u91c7\u7528 Quickstart Profile candidate\uff0c\u4e09\u4e2a\u5305\u6309\u540c\u4e00 profile \u7cbe\u786e\u9501\u5b9a\uff1av2 \u4f7f\u7528 0.3.0\uff0cv1 \u7ee7\u7eed\u4f7f\u7528 0.2.1\uff0c\u4e0d\u6df7\u88c5\u3002</li> </ul>"},{"location":"recipes/deterministic-human-report/","title":"\u4e2d\u6587 \u00b7 \u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a","text":"<p>English</p>"},{"location":"recipes/deterministic-human-report/#Recipe\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a","title":"Recipe\uff1a\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a","text":""},{"location":"recipes/deterministic-human-report/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u4ece\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\u6210\u4eba\u7c7b\u53ef\u8bfb\u62a5\u544a\uff08Markdown + digest \u7ed1\u5b9a + \u5206\u7ea7\u68c0\u67e5\uff09\uff0c\u53cc\u8f93\u51fa\u6210\u7ec4\u5199\u5165\u5e76\u62d2\u7edd\u8def\u5f84\u522b\u540d\u4e0e\u8f93\u5165\u8986\u76d6\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u4ece\u5f00\u653e\u4e1a\u52a1 outputs \u81ea\u7531\u7f16\u62a5\u544a\uff08\u7981\u6b62\uff09\uff1b\u9700\u8981\u6a21\u578b\u8c03\u7528\u6216\u4e1a\u52a1\u7f16\u6392\u3002</p>"},{"location":"recipes/deterministic-human-report/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.report</code>\uff08validate \u2192 render \u2192 bind \u2192 check\uff0c\u7eaf\u51fd\u6570\uff09\u4e0e <code>foundation.kit.report</code>\uff08CLI \u5b50\u52a8\u4f5c\u7f16\u6392\u6e32\u67d3\u4e0e\u5206\u7ea7\uff09\u3002</p>"},{"location":"recipes/deterministic-human-report/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u5df2\u5b58\u5728\u7ecf Contracts \u6821\u9a8c\u7684 report-model \u4e0e operation-result\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1aMarkdown \u786e\u5b9a\u6027\u8f6c\u4e49\uff1bmodel/result/report \u4e09\u6458\u8981\u7ed1\u5b9a\uff1b\u8c03\u7528\u65b9\u5fc5\u987b\u5148\u6784\u9020\u5408\u6cd5 model\uff0cKit \u4e0d\u4ece\u4e1a\u52a1 outputs \u63a8\u5bfc\u4e8b\u5b9e\u3002</li> </ul>"},{"location":"recipes/deterministic-human-report/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import {\n validateReportModel,\n renderReportMarkdown,\n buildBinding,\n checkReport,\n} from \"skill-family-harness-node\";\n\nvalidateReportModel(model);\nconst markdown = renderReportMarkdown(model, { locale: \"zh-CN\" });\nconst binding = buildBinding(model, result, markdown);\nconst graded = checkReport(model, result, markdown, binding); // \u5206\u7ea7\u68c0\u67e5\u53d1\u73b0\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u6a21\u578b\u6821\u9a8c\u3001\u6e32\u67d3\u3001\u7ed1\u5b9a\u4e0e\u5206\u7ea7\u68c0\u67e5\u7684\u56db\u6b65\u987a\u5e8f\u3002</p>"},{"location":"recipes/deterministic-human-report/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>renderReportMarkdown</code> \u8fd4\u56de\u786e\u5b9a\u6027 Markdown\uff1b<code>buildBinding</code> \u4ea7\u51fa\u4e09\u6458\u8981\u7ed1\u5b9a\uff1b<code>checkReport</code> \u8fd4\u56de\u5206\u7ea7\u68c0\u67e5\u53d1\u73b0\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/report.test.mjs</code> \u4e0e <code>packages/skill-family-engineering-kit/test/report.test.mjs</code>\u3002</p>"},{"location":"recipes/deterministic-human-report/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u62a5\u544a\u5b57\u8282\u504f\u79bb\u786e\u5b9a\u6027\u91cd\u6e32\u67d3 -&gt; SFC3003 (REPORT_FACT_DRIFT)\n// \u624b\u5de5\u6539\u4e86 markdown \u518d bind/check\uff0c\u6458\u8981\u5bf9\u4e0d\u4e0a\u5373\u5931\u8d25\ncheckReport(model, result, tamperedMarkdown, binding);\n// \u629b HarnessError\uff0cerrorCode = \"SFC3003\"\n</code></pre> <p><code>SFC3001</code>\uff08\u6458\u8981\u4e0d\u4e00\u81f4\uff09\u3001<code>SFC3002</code>\uff08\u7f3a\u5f3a\u5236\u5143\u7d20\uff09\u540c\u6837\u4e3a\u786c\u5931\u8d25\u3002</p>"},{"location":"recipes/deterministic-human-report/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/report.test.mjs \\\n packages/skill-family-engineering-kit/test/report.test.mjs\n</code></pre>"},{"location":"recipes/deterministic-human-report/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u62a5\u544a\u4e1a\u52a1\u7ed3\u8bba\u7684\u89e3\u8bfb\u3002</li> <li>\u8c03\u7528\u65b9\u5fc5\u987b\u5148\u6784\u9020\u5408\u6cd5 report-model\uff08Kit \u4e0d\u4ece\u4e1a\u52a1 outputs \u63a8\u5bfc\u4e8b\u5b9e\uff09\u3002</li> </ul>"},{"location":"recipes/deterministic-human-report/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\uff0c\u4e0d\u81ea\u7531\u64b0\u5199\uff1b\u5347\u7ea7\u8ddf\u968f <code>skill-family-harness-node</code> \u4e0e <code>skill-family-engineering-kit</code> \u7248\u672c\u3002</li> <li>\u53cc\u8f93\u51fa\u6210\u7ec4\u5199\u5165\uff0c\u62d2\u7edd\u8def\u5f84\u522b\u540d\u4e0e\u8f93\u5165\u8986\u76d6\uff0c\u56de\u6eda\u4ee5\u5199\u5165\u524d\u7684 <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u8fd8\u539f\u3002</li> </ul>"},{"location":"recipes/domain-schema-validation/","title":"\u4e2d\u6587 \u00b7 \u9886\u57df Schema \u6821\u9a8c","text":"<p>English</p>"},{"location":"recipes/domain-schema-validation/#Recipe\u9886\u57df\u65e0\u5173\u7684\u5951\u7ea6\u5bf9\u8c61\u6821\u9a8c","title":"Recipe\uff1a\u9886\u57df\u65e0\u5173\u7684\u5951\u7ea6\u5bf9\u8c61\u6821\u9a8c","text":""},{"location":"recipes/domain-schema-validation/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u6821\u9a8c\u4e00\u4efd\u6587\u6863\u662f\u5426\u7b26\u5408 Foundation \u5df2\u767b\u8bb0\u7684\u5951\u7ea6\u5bf9\u8c61\uff08\u5982 project-manifest\uff09\uff0c\u6309\u65b9\u8a00\u9009\u62e9\u6821\u9a8c\u7b56\u7565\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u6821\u9a8c\u6d88\u8d39\u8005\u81ea\u6709\u4e1a\u52a1 Schema\uff08\u6d88\u8d39\u8005\u5e94\u81ea\u884c\u6301\u6709\uff0cFoundation \u4e0d\u53d6\u4ee3\uff09\uff1b\u9700\u8981\u628a\u9886\u57df\u8bed\u4e49\u6821\u9a8c\u6df7\u5165\u901a\u7528\u5951\u7ea6\u3002</p> <p>Quickstart Profile v2 \u662f\u5355\u72ec\u7684 candidate \u8def\u5f84\u3002\u6d88\u8d39\u8005\u4ecd\u62e5\u6709\u4e1a\u52a1 Schema\uff1bEngineering Kit \u53ea\u5728\u6784\u5efa\u9636\u6bb5\u628a\u663e\u5f0f Schema \u96c6\u5408\u7f16\u8bd1\u6210\u6309 <code>$id</code> \u67e5\u8be2\u7684\u79bb\u7ebf validator\uff0c\u4e0d\u63a5\u7ba1 method \u5230 Schema \u7684\u9009\u62e9\u3002</p>"},{"location":"recipes/domain-schema-validation/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.contracts.object-validation</code>\uff08<code>validateDocument</code> / <code>compileSchema</code> / <code>detectDialect</code>\uff09\u3002\u7eaf Ajv \u5b9e\u73b0\uff0c\u652f\u6301 draft-07 \u4e0e 2020-12\u3002</p>"},{"location":"recipes/domain-schema-validation/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u5f85\u6821\u9a8c\u6587\u6863\u5e26\u6709\u5df2\u767b\u8bb0\u5951\u7ea6\u5bf9\u8c61\u7684 <code>$id</code>\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a<code>validateDocument</code> \u6c38\u4e0d\u4fee\u6539\u8c03\u7528\u8005\u8f93\u5165\uff1b\u89c4\u8303\u5316\u526f\u672c\u53ea\u5728\u7ed3\u679c <code>data</code> \u5b57\u6bb5\u8fd4\u56de\u3002</li> </ul>"},{"location":"recipes/domain-schema-validation/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import { validateDocument } from \"skill-family-contracts\";\n\nconst document = {\n schemaVersion: 1,\n kind: \"skill-family.project-manifest\",\n project: { id: \"my-project\", name: \"My Project\", description: \"Example\" },\n contracts: { version: \"1.0.0\", profile: \"generic\" },\n managedFiles: [\"package.json\"],\n updatedAt: \"2026-01-01T00:00:00Z\",\n};\n\nconst result = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/project-manifest.json\",\n dialect: \"2020-12\",\n});\nif (!result.valid) console.error(result.errorCode);\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u7528 <code>$id</code> \u6307\u5b9a\u76ee\u6807 Schema \u5e76\u53d6\u56de <code>{ valid, errorCode, errors, data }</code>\u3002</p>"},{"location":"recipes/domain-schema-validation/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p>\u6821\u9a8c\u901a\u8fc7\u65f6 <code>result.valid</code> \u4e3a true\uff1b\u5931\u8d25\u65f6 <code>errorCode</code> \u4e3a <code>SFC1001</code> \u7b49\u7a33\u5b9a\u7801\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-contracts/test/validator.test.mjs</code> \u4e0e <code>test/schemas.test.mjs</code>\u3002</p>"},{"location":"recipes/domain-schema-validation/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u672a\u77e5 $id -&gt; \u8fd4\u56de valid:false\uff0cerrorCode = SFC1002 (UNKNOWN_SCHEMA_ID)\nconst bad = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/does-not-exist.json\",\n dialect: \"2020-12\",\n});\n// \u4e0d\u629b\u5f02\u5e38\uff0c\u8fd4\u56de\u7ed3\u6784\u5316\u7ed3\u679c\uff1a\n// { valid: false, errorCode: \"SFC1002\",\n// errors: [{ message: \"unknown schema $id: https://contracts.skill-family.example/v1/does-not-exist.json\" }] }\nif (!bad.valid) console.error(bad.errorCode); // SFC1002\n</code></pre>"},{"location":"recipes/domain-schema-validation/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-contracts/test/validator.test.mjs \\\n packages/skill-family-contracts/test/schemas.test.mjs\n</code></pre>"},{"location":"recipes/domain-schema-validation/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u5177\u4f53\u4e1a\u52a1\u5b57\u6bb5\u7684\u8bed\u4e49\u89e3\u91ca\u3002</li> <li>\u9886\u57df\u7ea7\u6821\u9a8c\u89c4\u5219\uff08\u4e0d\u5728 Foundation \u901a\u7528\u5951\u7ea6\u5185\uff09\u3002</li> </ul>"},{"location":"recipes/domain-schema-validation/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u5951\u7ea6\u6743\u5a01\u7248\u672c <code>CONTRACTS_VERSION = 1.4.0</code>\uff0cnpm \u5305\u7248\u672c <code>0.3.0</code> \u5e76\u884c\uff0c\u4e0d\u6df7\u7528\u3002</li> <li>\u9519\u8bef\u7801\u51bb\u7ed3\u4e0d\u6f02\u79fb\uff1bSchema \u53d8\u66f4\u4f5c\u4e3a\u65b0\u7684\u5408\u540c\u7248\u672c\u4efb\u52a1\u8fdb\u884c\uff0c\u4e0d\u5c31\u5730\u6539\u51bb\u7ed3\u5185\u5bb9\u3002</li> <li>candidate v2 \u5fc5\u987b\u7cbe\u786e\u9501\u5b9a 0.3.0\uff1b\u4ecd\u9700 v1 \u7684\u63a5\u5165\u7ee7\u7eed\u7cbe\u786e\u9501\u5b9a 0.2.1\u3002</li> </ul>"},{"location":"recipes/durable-local-state/","title":"\u4e2d\u6587 \u00b7 \u6301\u4e45\u672c\u5730\u72b6\u6001","text":"<p>English</p>"},{"location":"recipes/durable-local-state/#Recipe\u6301\u4e45\u672c\u5730\u72b6\u6001\u5e95\u5ea7","title":"Recipe\uff1a\u6301\u4e45\u672c\u5730\u72b6\u6001\u5e95\u5ea7","text":""},{"location":"recipes/durable-local-state/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u6301\u4e45\u5316\u4e8b\u4ef6\u65e5\u5fd7\u5e76\u4fdd\u8bc1\u987a\u5e8f\u4e0e\u5b8c\u6574\u6027\uff0c\u91cd\u5efa\u6216\u6821\u9a8c\u6d3e\u751f\u5feb\u7167\uff0c\u4ee5\u53ca\u68c0\u67e5\u6216\u6062\u590d\u534f\u4f5c\u5f0f\u5355\u5199\u8005\u9501\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u5728 Foundation \u5b9a\u4e49 workflow \u72b6\u6001\u673a\uff08\u7981\u6b62\uff09\uff1b\u9700\u8981\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\uff08fencing \u4e0d\u627f\u8bfa\u8be5\u573a\u666f\uff09\u3002</p>"},{"location":"recipes/durable-local-state/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.state-store</code>\uff08append-only \u4e8b\u4ef6\u3001hash chain\u3001\u5feb\u7167\u4e0e\u9501\u68c0\u67e5/\u6062\u590d\uff09\u3002\u4e8b\u4ef6\u542b\u4e49\u4e0e reducer \u8f6c\u79fb\u7531\u8c03\u7528\u65b9\u62e5\u6709\u3002</p>"},{"location":"recipes/durable-local-state/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li><code>STATE_GENESIS_DIGEST</code> \u4f5c\u4e3a\u94fe\u8d77\u70b9\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u662f\u552f\u4e00\u6743\u5a01\uff0csnapshot \u4e3a\u6d3e\u751f\u7f13\u5b58\uff1b<code>confirmOwnerTerminated</code> \u662f\u8c03\u7528\u65b9\u63d0\u4f9b\u7684\u5916\u90e8\u4fe1\u4efb\u951a\uff0c\u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\u3002</li> </ul>"},{"location":"recipes/durable-local-state/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport {\n openStateStore,\n appendEvent,\n readEvents,\n writeSnapshot,\n readSnapshot,\n inspectStateStoreLock,\n recoverStateStoreLock,\n} from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-state-\"));\nconst store = openStateStore(root, { owner: \"writer-a\", expectedSchemas: [] });\nappendEvent(store, { eventType: \"demo\", payload: { n: 1 } });\nwriteSnapshot(store, readEvents(store));\nconst snap = readSnapshot(store);\nconst lock = inspectStateStoreLock(root); // { owner, fencing, ageMs, recovering }\nawait recoverStateStoreLock(root, {\n expectedOwner: lock.owner,\n expectedFencing: lock.fencing,\n confirmOwnerTerminated: true,\n});\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u5f00\u5e93\u3001\u8ffd\u52a0\u4e8b\u4ef6\u3001\u5199\u5feb\u7167\u3001\u67e5\u9501\u4e0e\u663e\u5f0f\u6062\u590d\u7684\u987a\u5e8f\u3002</p>"},{"location":"recipes/durable-local-state/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>readEvents</code> \u8fd4\u56de\u8ffd\u52a0\u7684\u4e8b\u4ef6\uff0c<code>readSnapshot</code> \u8fd4\u56de\u6d3e\u751f\u5feb\u7167\uff0c<code>inspectStateStoreLock</code> \u8fd4\u56de <code>owner</code>/<code>fencing</code>/<code>ageMs</code>/<code>recovering</code>\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/state-store.test.mjs</code>\uff08\u542b 34 \u5904\u65ad\u8a00\uff09\u3002</p>"},{"location":"recipes/durable-local-state/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u7b2c\u4e8c\u5199\u8005\u7acb\u5373\u6536\u5230 store-locked\nconst other = openStateStore(root, { owner: \"writer-b\", expectedSchemas: [] });\n// \u629b HarnessError\uff1adetails.kind = \"store-locked\"\n</code></pre> <p>hash chain \u65ad\u88c2\u3001\u9501 fencing \u4e0d\u5339\u914d\u3001\u6062\u590d\u7f3a\u5c11 <code>confirmOwnerTerminated</code> \u5747\u5931\u8d25\u5173\u95ed\u3002</p>"},{"location":"recipes/durable-local-state/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/state-store.test.mjs\n</code></pre>"},{"location":"recipes/durable-local-state/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u4e8b\u4ef6\u4e1a\u52a1\u542b\u4e49\u3001reducer \u8f6c\u79fb\u3002</li> <li><code>confirmOwnerTerminated</code> \u4fe1\u4efb\u951a\uff08Foundation \u4e4b\u5916\u786e\u8ba4\u65e7\u5199\u8005\u5df2\u7ec8\u6b62\uff09\u3002</li> </ul>"},{"location":"recipes/durable-local-state/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u72b6\u6001\u5e95\u5ea7\u53ea\u63d0\u4f9b\u673a\u5236\uff1b\u4e1a\u52a1\u72b6\u6001\u673a/\u7ec8\u6001\u5f52 loop-agent\u3002</li> <li>\u5d29\u6e83\u9057\u7559\u9501\u9700\u5916\u90e8\u53d6\u8bc1\u540e\u663e\u5f0f\u6062\u590d\uff0c\u4e0d\u81ea\u52a8\u5077\u9501\uff1b\u7cfb\u7edf\u4fdd\u6301\u53ef\u8bca\u65ad\u9501\u6b7b\u800c\u975e\u9759\u9ed8\u8986\u76d6\u3002</li> </ul>"},{"location":"recipes/host-profile-integration/","title":"\u4e2d\u6587 \u00b7 \u5bbf\u4e3b Profile \u96c6\u6210","text":"<p>English</p>"},{"location":"recipes/host-profile-integration/#Recipe\u5bbf\u4e3b\u63a5\u5165\u4e0e-Profile-\u6ce8\u5165","title":"Recipe\uff1a\u5bbf\u4e3b\u63a5\u5165\u4e0e Profile \u6ce8\u5165","text":""},{"location":"recipes/host-profile-integration/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u63cf\u8ff0\u5df2\u767b\u8bb0\u5bbf\u4e3b\uff08claude/codex\uff09\u3001\u63a2\u6d4b\u6216\u89c4\u5212\u5bbf\u4e3b\u63a5\u5165\uff0c\u9a8c\u8bc1\u540c\u7ea7 adapter \u76ee\u5f55\uff0c\u6216\u8005\u901a\u8fc7\u5305 API \u6267\u884c\u6458\u8981\u7ed1\u5b9a\u7684\u672c\u5730 install/update\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981 Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply\u3001\u81ea\u52a8\u5220\u9664\u5f0f uninstall\uff1b\u9700\u8981 Qoder \u7684 install/update \u751f\u547d\u5468\u671f driver\uff08\u8be5\u5bbf\u4e3b\u4e3a <code>manual</code>\uff0c\u53ea\u652f\u6301\u53d7\u7ea6\u675f\u7684\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\uff0c\u4e0d\u6388\u4e88\u751f\u547d\u5468\u671f\u80fd\u529b\uff09\u3002</p>"},{"location":"recipes/host-profile-integration/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.kit.host</code>\uff08<code>describeHost</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>verifyHostPeers</code> / <code>planHost</code> / <code>applyHostPlan</code>\uff09\u4e0e <code>foundation.profile.extension-spi</code>\uff08<code>verifyProfile</code>\uff09\u3002\u5bbf\u4e3b\u5dee\u5f02\u58f0\u660e\u5728 <code>foundation.profile.hosts</code>\u3002</p>"},{"location":"recipes/host-profile-integration/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u5bbf\u4e3b Profile \u5df2\u5728 <code>profiles/hosts</code> \u767b\u8bb0\uff1b0.11.0 \u8d77\uff0cKit \u5b89\u88c5\u5305\u643a\u5e26\u8be5\u95ed\u5305\u7684\u53d7\u7ba1\u6295\u5f71\u3002\u53d7\u4fe1 driver \u4ec5 <code>claude-version-v1</code> / <code>codex-version-v1</code>\u3002\u672c\u5730 install/update \u8fd8\u8981\u6c42\u5df2\u9a8c\u8bc1 build\u3001\u6458\u8981\u4e00\u81f4\u7684 plan\u3001\u53d7\u6536\u5bb9 <code>targetRoot</code> \u4e0e\u663e\u5f0f <code>authorizationRef</code>\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1aProfile \u5165\u53e3\u5fc5\u987b\u662f JSON \u6570\u636e\u8d44\u6e90\uff0c\u516c\u5171\u6838\u5fc3\u4e0d\u5bfc\u5165 <code>profiles/</code>\uff1b<code>coreOwned</code> \u4e3a\u7981\u5165\u76ee\u6807\u3002</li> </ul>"},{"location":"recipes/host-profile-integration/#4-\u6700\u5c0f\u547d\u4ee4\u4e0e\u4ee3\u7801","title":"4. \u6700\u5c0f\u547d\u4ee4\u4e0e\u4ee3\u7801","text":"<pre><code># \u63cf\u8ff0\u5df2\u767b\u8bb0\u5bbf\u4e3b\nnpm exec -- skill-family-kit adopt-plan host-describe --host claude --hosts-root profiles/hosts\n\n# \u53ea\u8bfb\u63a2\u6d4b\uff08\u9ed8\u8ba4\u4e0d spawn\uff09\nnpm exec -- skill-family-kit adopt-plan host-probe --host claude --hosts-root profiles/hosts\n</code></pre> <pre><code>import { bundledHostProfilesRoot, buildHostAdapter, describeHost, probeHost, planHost } from \"skill-family-engineering-kit\";\nimport { verifyProfile } from \"profiles/spi/index.mjs\";\n\nconst hostsRoot = bundledHostProfilesRoot();\nconst desc = await describeHost({ hostId: \"claude\", hostsRoot });\nconst facts = await probeHost({ hostId: \"claude\", hostsRoot, allowSpawn: false });\nconst build = await buildHostAdapter({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n input: {\n schemaVersion: 1,\n kind: \"skill-family.adapter-source\",\n skillFamilyId: \"example-family\",\n skills: [{ id: \"demo\", files: [{ path: \"SKILL.md\", content: \"# Demo\\n\" }] }],\n },\n hostsRoot,\n});\nconst plan = await planHost({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n buildManifest: build.manifest,\n probeFacts: facts.facts,\n hostsRoot,\n});\nconst spi = verifyProfile({ profileRoot: \"profiles/public-plugin\" }); // SPE0000\n</code></pre> <p>\u4ee5\u4e0a\u547d\u4ee4\u5c55\u793a\u4e86\u5982\u4f55\u663e\u5f0f\u9009\u62e9\u4ed3\u5185 Profile \u6839\u3002\u4ee3\u7801\u5219\u4ece\u5b89\u88c5\u5305\u53d6\u5f97\u89c4\u8303\u6839\uff0c\u518d\u8fd0\u884c describe/probe\u3001\u5185\u5b58\u6784\u5efa\u548c plan\uff0c\u5e76\u7528 <code>verifyProfile</code> \u6821\u9a8c Profile \u58f0\u660e\uff1b\u8fd9\u4e9b\u64cd\u4f5c\u6ca1\u6709\u6267\u884c install/update\u3002</p>"},{"location":"recipes/host-profile-integration/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>describeHost</code> \u8fd4\u56de\u5bbf\u4e3b\u63cf\u8ff0\uff0c<code>probeHost</code> \u8fd4\u56de\u53ea\u8bfb\u63a2\u6d4b\u4e8b\u5b9e\uff0c<code>planHost</code> \u8fd4\u56de\u63a5\u5165\u8ba1\u5212\uff0c<code>verifyProfile</code> \u8fd4\u56de <code>SPE0000</code> \u7b49\u7ed3\u679c\u7801\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-engineering-kit/test/host.test.mjs</code> \u4e0e <code>fixtures/generic-profile-extension-conformance/verify.mjs</code>\u3002</p>"},{"location":"recipes/host-profile-integration/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code># \u8d1f\u4f8b\uff1aCLI apply \u7a33\u5b9a\u62d2\u7edd\nnpm exec -- skill-family-kit adopt-plan host-apply --host claude --hosts-root profiles/hosts\n# \u9000\u51fa\u7801 2\uff1ahost apply is not implemented in the read-only Phase D slice\n</code></pre> <pre><code>// \u8d1f\u4f8b\uff1aqoder \u4e3a manual\uff0c\u4e0d\u6388\u4e88\u751f\u547d\u5468\u671f\u80fd\u529b\nconst qoder = await describeHost({ hostId: \"qoder\", hostsRoot }); // support = \"manual\"\uff0c\u65e0 driverId\nconst qoderFacts = await probeHost({ hostId: \"qoder\", hostsRoot }); // \u4e5d\u9879\u5747\u4e3a unknown / driver-limited\nconst qoderPlan = await planHost({ hostId: \"qoder\", hostsRoot }); // status = \"manual\"\uff0cactions \u4e3a\u7a7a\n</code></pre>"},{"location":"recipes/host-profile-integration/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-engineering-kit/test/host.test.mjs \\\n fixtures/generic-profile-extension-conformance/verify.mjs\n</code></pre>"},{"location":"recipes/host-profile-integration/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u5bbf\u4e3b\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\u3002</li> <li>\u672c\u5730 install/update \u7684\u4e1a\u52a1\u6388\u6743\u4e0e\u5b8c\u6210\u5224\u5b9a\uff1b\u5378\u8f7d\u65f6\u7684\u4eba\u5de5\u6062\u590d\u548c\u6587\u4ef6\u5220\u9664\u3002</li> </ul>"},{"location":"recipes/host-profile-integration/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u5305 API <code>applyHostPlan</code> \u652f\u6301\u5df2\u767b\u8bb0\u3001\u6458\u8981\u7ed1\u5b9a\u7684\u672c\u5730 install/update\uff1b\u6267\u884c uninstall \u8ba1\u5212\u53ea\u8fd4\u56de <code>manual-recovery-required</code>\uff0c\u4e0d\u5220\u9664\u6587\u4ef6\u3002Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply \u4ecd\u7a33\u5b9a\u62d2\u7edd\u3002</li> <li><code>verifyHostPeers</code> \u53ea\u505a\u540c\u7ea7 adapter \u76ee\u5f55\u7684\u53ea\u8bfb\u590d\u9a8c\uff0c\u4e0d\u6388\u4e88\u5b89\u88c5\u3001\u53d1\u5e03\u6216\u9886\u57df\u88c1\u51b3\u80fd\u529b\u3002</li> <li><code>bundledHostProfilesRoot()</code> \u53ea\u63d0\u4f9b\u53d7\u7ba1 Profile \u6839\u3002\u5bbf\u4e3b\u5165\u53e3\u4ecd\u8981\u6c42\u663e\u5f0f\u4f20 <code>hostsRoot</code>\uff0c\u8c03\u7528\u65b9\u4e5f\u53ef\u4ee5\u9009\u62e9\u53e6\u4e00\u7ec4\u7b26\u5408\u5408\u540c\u7684 Profile\u3002</li> <li>Qoder \u4e3a <code>manual</code> \u5bbf\u4e3b\uff1aDescriptor <code>support</code> \u4e0e <code>maturity</code> \u5747\u4e3a <code>manual</code>\uff0c\u771f\u5b9e\u9a8c\u8bc1\u80fd\u529b\u7684\u7a33\u5b9a\u6027\u7531\u80fd\u529b\u76ee\u5f55\u7684 <code>stability=candidate</code> \u8868\u8fbe\u3002\u53ea\u767b\u8bb0\u53d7\u7ea6\u675f\u7684\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u80fd\u529b\uff0c\u4e0d\u6388\u4e88 build\u3001plan\u3001apply\u3001\u901a\u7528 install/update/uninstall \u6216 rollback\uff1b\u5347\u7ea7\u65b0\u589e\u53d7\u652f\u6301\u5bbf\u4e3b\u987b\u767b\u8bb0 descriptor \u5e76\u7ed1\u5b9a\u53d7\u4fe1 driver\u3002</li> </ul>"},{"location":"recipes/safe-filesystem-and-atomic-write/","title":"\u4e2d\u6587 \u00b7 \u5b89\u5168\u6587\u4ef6\u7cfb\u7edf\u4e0e\u539f\u5b50\u5199","text":"<p>English</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#Recipe\u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u4e0e\u539f\u5b50\u5199","title":"Recipe\uff1a\u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u4e0e\u539f\u5b50\u5199","text":""},{"location":"recipes/safe-filesystem-and-atomic-write/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u5728 Node \u5185\u628a\u5916\u90e8\u63d0\u4f9b\u7684\u8def\u5f84\u9650\u5236\u5728\u67d0\u4e2a\u6839\u76ee\u5f55\u5185\uff0c\u5e76\u5411\u53d7\u6536\u5bb9\u8def\u5f84\u539f\u5b50\u5199\u5165\u666e\u901a\u6587\u4ef6\uff0c\u5931\u8d25\u65f6\u56de\u6eda\u4e0d\u7559\u6b8b\u5f71\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u628a\u6587\u4ef6\u9009\u62e9\u7684\u4e1a\u52a1\u89c4\u5219\u653e\u5165 Foundation\uff08\u4e1a\u52a1\u89c4\u5219\u7531\u8c03\u7528\u65b9\u62e5\u6709\uff09\uff1b\u9700\u8981\u5199\u5165\u672a\u53d7\u6536\u5bb9\u8def\u5f84\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.path-containment</code>\uff08\u8def\u5f84\u5206\u7c7b\u4e0e\u53d7\u6536\u5bb9\u89e3\u6790\uff09\u4e0e <code>foundation.harness.atomic-write</code>\uff08\u53d7\u6536\u5bb9\u8def\u5f84\u5185\u539f\u5b50\u5199\uff09\u3002\u4e24\u8005\u90fd\u53ea\u5b9e\u73b0\u673a\u5236\uff0c\u4e0d\u62e5\u6709\u8bed\u4e49\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u8c03\u7528\u65b9\u63d0\u4f9b\u660e\u786e\u7684\u6839\u76ee\u5f55\uff08\u6536\u5bb9\u8fb9\u754c\uff09\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a\u6240\u6709\u89e3\u6790\u7ed3\u679c\u5fc5\u987b\u843d\u5728\u6839\u76ee\u5f55\u5185\uff1b\u8d8a\u754c\u3001\u7b26\u53f7\u94fe\u63a5\u9003\u9038\u3001\u771f\u5b9e\u8def\u5f84\u9003\u9038\u5747\u88ab\u62d2\u7edd\u3002</li> </ul>"},{"location":"recipes/safe-filesystem-and-atomic-write/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { resolveContained, writeFileAtomic } from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-safe-\"));\nconst target = resolveContained(root, \"nested/config.json\"); // \u53d7\u6536\u5bb9\u7edd\u5bf9\u8def\u5f84\nawait writeFileAtomic(target, JSON.stringify({ ok: true }));\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u5148\u6536\u5bb9\u8def\u5f84\u3001\u518d\u539f\u5b50\u5199\u5165\u7684\u57fa\u672c\u987a\u5e8f\uff1b<code>writeFileAtomic</code> \u7528\u4e34\u65f6\u6587\u4ef6 + fsync + rename\uff0c\u5931\u8d25\u56de\u6eda\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>resolveContained</code> \u8fd4\u56de\u843d\u5728\u6839\u5185\u7684\u7edd\u5bf9\u8def\u5f84\uff1b<code>writeFileAtomic</code> \u5199\u5165\u5b8c\u6210\u7684\u6587\u4ef6\uff0c\u5b57\u8282\u4e0e\u8f93\u5165\u4e00\u81f4\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/containment.test.mjs</code> \u4e0e <code>test/atomic.test.mjs</code>\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u8bd5\u56fe\u8d8a\u51fa\u6839\u76ee\u5f55 -&gt; SFC2004 (path-traversal)\nimport { resolveContained } from \"skill-family-harness-node\";\nresolveContained(root, \"../escape.json\"); // \u629b HarnessError\uff0cdetails.kind = \"path-traversal\"\n</code></pre> <p>\u8d8a\u754c\u3001symlink-escape\u3001realpath-escape \u5747\u5f52 <code>SFC2004</code> \u52a0\u7a33\u5b9a <code>details.kind</code>\uff1b\u539f\u5b50\u5199\u5bf9\u8d8a\u754c\u8def\u5f84\u6216\u975e\u6cd5\u6570\u636e\u7c7b\u578b\u629b\u9519\u5e76\u56de\u6eda\u4e34\u65f6\u6587\u4ef6\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/containment.test.mjs \\\n packages/skill-family-harness-node/test/atomic.test.mjs\n</code></pre>"},{"location":"recipes/safe-filesystem-and-atomic-write/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u54ea\u4e9b\u8def\u5f84\u662f\u4e1a\u52a1\u5141\u8bb8\u7684\u9009\u62e9\u89c4\u5219\uff08\u4e0d\u5728 Foundation \u5185\uff09\u3002</li> <li>\u5199\u5165\u5185\u5bb9\u7684\u4e1a\u52a1\u6b63\u786e\u6027\u3002</li> </ul>"},{"location":"recipes/safe-filesystem-and-atomic-write/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u8def\u5f84\u6536\u5bb9\u4e0e\u539f\u5b50\u5199\u5747\u4e3a\u53d7\u6536\u5bb9\u673a\u5236\uff0c\u5931\u8d25\u56de\u6eda\u4e0d\u7559\u534a\u6210\u54c1\uff0c\u65e0\u5916\u90e8\u56de\u6eda\u9700\u6c42\u3002</li> <li>\u5347\u7ea7\u8ddf\u968f <code>skill-family-harness-node</code> \u7248\u672c\uff1b<code>HARNESS_EXCLUSIONS</code> \u4e0d\u5f15\u5165\u8fdc\u7aef\u6216 git \u5199\u3002</li> </ul>"},{"location":"reference/compatibility/","title":"\u4e2d\u6587 \u00b7 \u517c\u5bb9\u6027","text":"<p>English</p>"},{"location":"reference/compatibility/#\u517c\u5bb9\u6027\u4e0e\u652f\u6301\u77e9\u9635","title":"\u517c\u5bb9\u6027\u4e0e\u652f\u6301\u77e9\u9635","text":"<p>\u672c\u9875\u7ed9\u51fa\u5f53\u524d\u6e90\u7801\u7248\u672c\u3001\u8fd0\u884c\u65f6\u652f\u6301\u9762\uff0c\u4ee5\u53ca\u5386\u53f2 candidate\uff08\u5019\u9009\uff09\u5165\u53e3\u7684\u4e00\u6b21\u8fc1\u79fb\u89c4\u5219\u3002\u7248\u672c\u4e0e\u5165\u53e3\u7531 package.json\u3001 Contracts \u767b\u8bb0\u8868\u548c\u80fd\u529b\u76ee\u5f55\u590d\u6838\u3002</p>"},{"location":"reference/compatibility/#\u5f53\u524d\u7248\u672c","title":"\u5f53\u524d\u7248\u672c","text":"\u5305 \u5f53\u524d\u6e90\u7801\u7248\u672c \u89d2\u8272 <code>skill-family-contracts</code> 0.14.0 Contracts 1.14.0 \u673a\u5668\u5951\u7ea6 <code>skill-family-harness-node</code> 0.14.0 Contracts \u7684 Node \u673a\u5236\u5b9e\u73b0 <code>skill-family-engineering-kit</code> 0.14.0 \u56db\u4e2a\u5de5\u7a0b\u547d\u4ee4\u4e0e\u6784\u5efa\u671f\u6295\u5f71 \u79c1\u6709\u7236\u5de5\u4f5c\u533a 0.14.0 \u552f\u4e00\u5f00\u53d1\u771f\u6e90 <p>\u4e09\u4e2a\u53f6\u5b50\u5305\u9501\u6b65\u53d1\u5e03\uff0c\u4e0d\u80fd\u6df7\u7528\u7248\u672c\u3002Contracts \u89c4\u683c\u7248\u672c\u4e0e npm \u5305\u7248\u672c\u662f\u4e24\u6761\u4e0d\u540c\u7248\u672c\u7ebf\u3002</p>"},{"location":"reference/compatibility/#\u4e24\u4ee3\u6210\u719f\u5ea6\u89c4\u5219","title":"\u4e24\u4ee3\u6210\u719f\u5ea6\u89c4\u5219","text":"<p>\u5386\u53f2 candidate API \u5148\u8fc1\u79fb\u4e00\u6b21\u5230\u89c4\u8303\u5165\u53e3\u3002\u65e7\u5165\u53e3\u5728\u517c\u5bb9\u7a97\u53e3\u5185\u7ee7\u7eed\u89e3\u6790\u540c\u4e00\u6a21\u5757\uff1b\u6700\u7ec8\u5220\u9664\u5fc5\u987b\u6709\u516c\u5f00\u5f03\u7528\u3001\u771f\u5b9e\u6d88\u8d39\u8005 \u5f15\u7528\u6e05\u96f6\u3001\u81f3\u5c11\u4e00\u4e2a\u53d1\u5e03\u5468\u671f\u548c\u72ec\u7acb\u4e3b\u7248\u672c\u51b3\u7b56\u3002</p> <p>0.10.0 \u4ee5\u540e\u65b0\u589e\u7684 API \u4ece\u9996\u4e2a candidate \u7248\u672c\u8d77\u5c31\u4f7f\u7528\u6700\u7ec8\u89c4\u8303\u8eab\u4efd\u3002candidate \u9636\u6bb5\u4e3b\u52a8\u5347\u7ea7\u4ecd\u53ef\u80fd\u9700\u8981\u9002\u914d\uff1b\u4f46\u63d0\u4f9b\u65b9 \u51b3\u5b9a\u664b\u5347 stable \u65f6\uff0c\u53ea\u80fd\u6539\u53d8\u517c\u5bb9\u627f\u8bfa\uff0c\u4e0d\u80fd\u540c\u65f6\u66f4\u6362\u5165\u53e3\u3001\u80fd\u529b ID\u3001Schema <code>$id</code>\u3001operation\u3001\u8bf7\u6c42\u3001\u7ed3\u679c\u6216\u9519\u8bef\u8bed\u4e49\u3002 \u6d88\u8d39\u8005\u8981\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\uff0c\u4ecd\u9700\u66f4\u65b0\u4e09\u4e2a\u5305\u7684\u7cbe\u786e pin\uff1bBundle \u662f\u5426\u91cd\u5efa\u7531\u65e2\u6709 package identity\u3001\u6765\u6e90\u6458\u8981\u4e0e provenance \u7ed1\u5b9a\u8f93\u5165\u51b3\u5b9a\uff0c\u4e0d\u80fd\u4ec5\u56e0\u6210\u719f\u5ea6\u6807\u7b7e\u53e6\u52a0\u8981\u6c42\u3002\u673a\u5668\u89c4\u5219\u89c1 FND-ADR-016 \u548c Contracts <code>CANDIDATE_PROMOTION_POLICY</code>\u3002</p>"},{"location":"reference/compatibility/#\u5386\u53f2-candidate-\u8fc1\u79fb\u77e9\u9635","title":"\u5386\u53f2 candidate \u8fc1\u79fb\u77e9\u9635","text":"\u5386\u53f2\u5750\u6807\u6216\u80fd\u529b 0.10.0 \u8fc1\u79fb\u76ee\u6807 \u5f53\u524d\u5904\u7406 <code>skill-family-contracts/candidate/quickstart-profile</code> <code>skill-family-contracts/quickstart-profile</code> \u4e24\u4e2a\u5165\u53e3\u540c\u6e90\uff1b\u6d88\u8d39\u8005\u8fc1\u79fb\u4e00\u6b21 <code>skill-family-harness-node/candidate/quickstart-profile</code> <code>skill-family-harness-node/quickstart-profile</code> \u4e24\u4e2a\u5165\u53e3\u540c\u6e90\uff1boperation \u4e0d\u53d8 <code>skill-family-harness-node/candidate/rename-directory-no-replace</code> <code>skill-family-harness-node/rename-directory-no-replace</code> \u4e24\u4e2a\u5165\u53e3\u540c\u6e90\uff1b\u4e0d\u7b49\u540c\u4e8e\u9ad8\u5c42\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03 <code>skill-family-engineering-kit/candidate/quickstart-profile</code> <code>skill-family-engineering-kit/quickstart-profile</code> Quickstart builder \u8fc1\u79fb\u4e00\u6b21 \u65e7 Quickstart \u547d\u540d\u7a7a\u95f4\u4e2d\u7684 adoption <code>skill-family-engineering-kit/adoption</code> \u804c\u8d23\u660e\u786e\u7684\u89c4\u8303\u5165\u53e3\uff1b\u5b9e\u73b0\u4ecd\u4e0e\u65e7\u547d\u540d\u7a7a\u95f4\u540c\u6e90 \u5305\u5185\u6216\u6295\u5f71\u4e2d\u7684 skill naming candidate <code>skill-family-engineering-kit/skill-naming</code> \u65b0\u589e\u89c4\u8303\u5305\u5165\u53e3\uff1b\u4e0d\u589e\u52a0 Kit \u9876\u5c42\u547d\u4ee4 0.4.0 \u56fa\u5b9a\u96c6\u5408 candidate Schema \u4e0e\u539f\u8bed 0.9.0 stable Schema <code>$id</code>\u3001<code>skill-family-harness-node/fixed-set-publication</code> \u65e7 Schema \u7ee7\u7eed\u968f\u5305\u63d0\u4f9b\uff1b\u6d88\u8d39\u8005\u8fc1\u79fb\u5230\u9ad8\u5c42 API 0.9.0 <code>validate-many-by-schema-id</code> candidate Schema <code>/foundation-mechanisms/v1/schema-validation-batch-{request,result}.json</code> \u89c4\u8303 Schema \u53ea\u4fdd\u7559\u4e00\u4efd\uff1b\u65e7\u65b0 ID \u6307\u5411\u540c\u4e00\u7f16\u8bd1 validator\uff0coperation \u4e0e\u7ed3\u679c\u56de\u663e\u4e0d\u53d8 <p>Quickstart v2 \u7684 Resource\u3001Task\u3001Result\u3001consumer inventory\u3001Harness surface inventory/detectors \u516d\u4e2a\u8eab\u4efd\u4e5f\u4ece <code>/candidate/quickstart-profile/v2/</code> \u4e00\u6b21\u8fc1\u79fb\u5230 <code>/quickstart-profile/v2/</code>\u3002Contracts loader \u53ea\u8fd4\u56de\u89c4\u8303 <code>$id</code>\uff1bBundle \u5728 \u517c\u5bb9\u7a97\u53e3\u5185\u540c\u65f6\u63a5\u53d7\u65e7\u65b0 ID\uff0c\u4e0d\u5efa\u7acb\u7b2c\u4e8c\u5957 Schema \u6216\u901a\u7528 alias registry\u3002</p> <p>Quickstart v1 \u5728 0.3.0 \u4ee5\u524d\u5df2\u88ab v2 \u66ff\u6362\u3002\u9700\u8981 v1 \u7684\u6d88\u8d39\u8005\u53ea\u80fd\u7ee7\u7eed\u7cbe\u786e\u9501\u5b9a 0.2.1\uff1b0.10.0 \u4e0d\u91cd\u5199\u5386\u53f2\u53d1\u5e03\u7269\uff0c \u4e5f\u4e0d\u91cd\u65b0\u6253\u5305 v1\u3002</p>"},{"location":"reference/compatibility/#R05-\u4e0e\u65e7-platform-manifest-\u8fc1\u79fb","title":"R05 \u4e0e\u65e7 platform-manifest \u8fc1\u79fb","text":"<p>R05 \u7684 request/result Schema \u662f <code>logicalMappings</code> \u7684\u552f\u4e00\u7ed3\u6784\u4e8b\u5b9e\u6e90\u3002\u6d88\u8d39\u8005\u8fc1\u79fb\u65f6\u53ea\u4fdd\u7559\u81ea\u8eab\u9886\u57df\u5b57\u6bb5\uff0c\u5b8c\u6210\u771f\u5b9e\u76ee\u5f55\u9a8c\u8bc1\u540e\u5220\u9664\u91cd\u590d\u7684 closure\u3001digest \u548c\u6587\u4ef6\u6e05\u5355\u5b57\u6bb5\uff0c\u4e0d\u6c38\u4e45\u53cc\u5199\u3002</p> \u65e7\u5b57\u6bb5 \u8fc1\u79fb\u88c1\u51b3 <code>familyId</code> \u6620\u5c04\u4e3a <code>skillFamilyId</code>\u3002 <code>platformId</code> \u5148\u7531\u5df2\u767b\u8bb0 Descriptor \u8bc1\u660e\uff0c\u518d\u6620\u5c04\u4e3a canonical <code>hostId</code>\u3002request \u58f0\u660e\u672c\u8eab\u4e0d\u6784\u6210\u8bc1\u660e\u3002 <code>version</code> \u4fdd\u7559\u4e3a\u6d88\u8d39\u8005\u5305\u7248\u672c\u3002 <code>sourceDigest</code> \u6620\u5c04\u4e3a <code>commonSourceClosure.digest</code>\u3002 <code>projectionDigest</code> \u6ca1\u6709\u81ea\u52a8\u7b49\u4ef7\u5173\u7cfb\uff1b<code>manifest.digest</code> \u4e0d\u5f97\u4ee3\u66ff\u5b83\u3002 <code>fileCount</code> / <code>files</code> \u4ece\u6807\u51c6 manifest \u6d3e\u751f\uff1bpeer \u6839\u7684 <code>skills/</code> \u4e0d\u5305\u542b\u7236\u76ee\u5f55\u65e7 manifest\uff0c\u8fc1\u79fb\u540e\u5220\u9664\u65e7\u6e05\u5355\u3002 <code>logicalMappings</code> \u53ea\u7531 request/result \u6301\u6709\u3002 <code>lifecycleStatus</code> / <code>blocked</code> / <code>blockingReasons</code> / <code>advisories</code> \u7559\u5728\u6d88\u8d39\u8005\u9886\u57df\u3002 <code>verified</code> \u4e0d\u63a8\u5bfc\u4ea7\u54c1\u3001Audit \u6216\u53d1\u5e03\u72b6\u6001\u3002"},{"location":"reference/compatibility/#Node-\u4e0e\u5de5\u5177\u94fe","title":"Node \u4e0e\u5de5\u5177\u94fe","text":"<ul> <li>Node\uff1a<code>&gt;=22.22.2 &lt;23</code>\uff1b<code>.node-version</code> \u56fa\u5b9a\u7cbe\u786e floor <code>22.22.2</code>\u3002</li> <li>pnpm\uff1a<code>10.30.0</code>\u3002</li> <li>projen\uff1a<code>0.101.23</code>\uff0c\u662f\u53d7\u7ba1\u5de5\u7a0b\u6587\u4ef6\u552f\u4e00\u751f\u6210\u5165\u53e3\u3002</li> <li>Schema \u6821\u9a8c\u5668\uff1aAjv <code>8.20.0</code>\uff0c\u652f\u6301 draft-07 \u4e0e 2020-12\u3002</li> </ul> <p>\u4f4e\u4e8e Node floor \u6216\u9ad8\u4e8e\u9501\u5b9a major \u7684\u7ed3\u679c\u4e0d\u80fd\u66ff\u4ee3\u6743\u5a01\u95e8\u7981\u7ed3\u679c\u3002</p>"},{"location":"reference/compatibility/#Contracts-\u4e0e\u5de5\u7a0b\u8fb9\u754c","title":"Contracts \u4e0e\u5de5\u7a0b\u8fb9\u754c","text":"<ul> <li>\u9876\u5c42 Contracts \u5bf9\u8c61\u4e3a 42 \u7c7b\uff0c\u4ee5 <code>packages/skill-family-contracts/src/registry.json</code> \u4e3a\u552f\u4e00\u771f\u6e90\u3002</li> <li>Kernel \u534f\u8bae\u662f stable <code>skill-family.kernel.operation</code>\uff1b\u672c\u8f6e Contracts \u89c4\u683c\u4e3a 1.14.0\uff0cKernel \u6587\u6863\u4ecd\u6309\u65e2\u6709\u751f\u547d\u5468\u671f\u4fdd\u6301 1.8.0 \u5b57\u8282\u57fa\u7ebf\u3002</li> <li>\u9519\u8bef\u7801\u53ea\u589e\u4e0d\u6539\u3001\u4e0d\u590d\u7528\u3002</li> <li>Kit \u9876\u5c42\u547d\u4ee4\u56fa\u5b9a\u4e3a <code>scaffold</code>\u3001<code>adopt-plan</code>\u3001<code>projection</code>\u3001<code>check</code>\u3002</li> <li>\u8fdc\u7aef\u6216\u901a\u7528 <code>host apply</code>\u3001\u5220\u9664\u5f0f <code>uninstall</code>\u3001\u5b8c\u6574 Qoder driver\u3001\u8fdc\u7aef\u53d1\u5e03\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u4e0e\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\u4e0d\u5728\u7a33\u5b9a\u652f\u6301\u9762\uff1b\u672c\u5730 install/update \u4ecd\u5904\u4e8e 0.10.0 unstable \u8ba1\u5212 API \u8fb9\u754c\uff0cunsupported \u5bbf\u4e3b\u4e0d\u4f1a\u83b7\u5f97\u81ea\u52a8\u751f\u547d\u5468\u671f\u80fd\u529b\uff0c\u4e5f\u4e0d\u6784\u6210\u8fdc\u7aef\u53d1\u5e03\u4fdd\u8bc1\u3002</li> </ul> <p>\u5bbf\u4e3b\u7684\u5b9e\u65f6\u652f\u6301\u72b6\u6001\u4ee5\u80fd\u529b\u76ee\u5f55\u3001Profile descriptor \u548c\u771f\u5b9e driver \u4e3a\u51c6\uff1b\u4ec5\u6709\u76ee\u5f55\u7ed3\u6784\u6216 CLI \u8eab\u4efd\u4e8b\u5b9e\u4e0d\u7b49\u4e8e\u53d7\u652f\u6301\u95ed\u73af\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/","title":"\u4e2d\u6587 \u00b7 \u5931\u8d25\u4e0e\u526f\u4f5c\u7528","text":"<p>English</p>"},{"location":"reference/failure-and-side-effect-matrix/#\u5931\u8d25\u4e0e\u526f\u4f5c\u7528\u77e9\u9635","title":"\u5931\u8d25\u4e0e\u526f\u4f5c\u7528\u77e9\u9635","text":"<p>\u672c\u9875\u9010\u516c\u5171\u5165\u53e3\u5217\u51fa\u8bfb\u5199\u3001spawn\u3001Git\u3001\u7f51\u7edc\u3001\u6b8b\u4f59\u72b6\u6001\u4e0e\u7a33\u5b9a\u9519\u8bef\u7801\u3002\u5b83\u670d\u52a1\u4e8e\u8c03\u7528\u65b9\u5728\u63a5\u5165\u524d\u5224\u65ad\u98ce\u9669\uff0c\u5e76\u4f5c\u4e3a <code>capability-catalog.json</code> \u4e2d <code>sideEffects</code> \u4e0e <code>failureSemantics</code> \u5b57\u6bb5\u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\u3002\u6240\u6709\u4e8b\u5b9e\u4ee5\u771f\u5b9e\u5b9e\u73b0\u4e0e\u8d1f\u4f8b\u6d4b\u8bd5\u4e3a\u51c6\u3002</p> <p>\u7b26\u53f7\u7ea6\u5b9a\uff1a\u8bfb=\u8bfb\u53d6\u6587\u4ef6\u7cfb\u7edf\uff1b\u5199=\u5199\u5165\u6587\u4ef6\u7cfb\u7edf\uff1bspawn=\u542f\u52a8\u5b50\u8fdb\u7a0b\uff1bGit=\u8bfb\u5199 Git\uff1b\u7f51\u7edc=\u8bbf\u95ee\u8fdc\u7aef\uff1b\u6b8b\u4f59=\u8c03\u7528\u7ed3\u675f\u540e\u4ecd\u7559\u5728\u78c1\u76d8/\u8fdb\u7a0b\u4e2d\u7684\u72b6\u6001\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#Contracts\u7eaf\u51fd\u6570\u5c42","title":"Contracts\uff08\u7eaf\u51fd\u6570\u5c42\uff09","text":"\u5165\u53e3 \u8bfb \u5199 spawn Git \u7f51\u7edc \u6b8b\u4f59\u72b6\u6001 \u7a33\u5b9a\u9519\u8bef\u7801 <code>validateDocument</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u7f16\u8bd1\u7f13\u5b58\u4ec5\u9a7b\u7559\u5185\u5b58\uff09 <code>SFC1001</code>/<code>SFC1002</code>/<code>SFC1006</code> <code>compileSchema</code> / <code>detectDialect</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC1006</code>/<code>SFC1012</code> <code>loadRegistry</code> / <code>findSchemaByObject</code> / <code>findProtocol</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC1003</code>/<code>SFC1004</code> <code>runChecks</code> / <code>collectUnresolvedRefs</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC1002</code>\u2013<code>SFC1010</code> <code>verifyAllFixtures</code> / <code>verifyFixture</code> \u5426 \u5426 \u5426? \u5426 \u5426 \u5426 \u65e0 <code>SFC1010</code> <code>ERROR_CODES</code> / <code>stableError</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 \u51bb\u7ed3\u767b\u8bb0\u8868\uff0c\u4e0d\u65b0\u589e <p>Contracts \u5168\u90e8\u4e3a\u7eaf\u51fd\u6570\uff0c\u65e0\u6587\u4ef6/Git/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff1b\u9519\u8bef\u5bf9\u8c61\u542b <code>stableError</code> \u4e0e <code>details.kind</code>\uff0c\u4fbf\u4e8e\u8c03\u7528\u65b9\u5206\u7c7b\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#Harness\u673a\u5236\u5c42\u53d7\u6536\u5bb9","title":"Harness\uff08\u673a\u5236\u5c42\uff0c\u53d7\u6536\u5bb9\uff09","text":"\u5165\u53e3 \u8bfb \u5199 spawn Git \u7f51\u7edc \u6b8b\u4f59\u72b6\u6001 \u7a33\u5b9a\u9519\u8bef\u7801 <code>validateContractDocument</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u6821\u9a8c\u5668\u7f13\u5b58\u5185\u5b58\uff09 <code>SFC</code> \u6821\u9a8c\u5931\u8d25 <code>resolveContained</code> / <code>readFileContained</code> \u662f\uff08\u53ea\u8bfb\uff09 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC2004</code>\uff08<code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>\uff09 <code>writeFileAtomic</code> \u5426 \u662f\uff08\u53d7\u6536\u5bb9\uff09 \u5426 \u5426 \u5426 \u5931\u8d25\u56de\u6eda\u4e34\u65f6\u6587\u4ef6 <code>SFC2004</code>\uff08<code>atomic-write-failed</code>\uff09 <code>TemporaryWorkspace</code> / <code>withTemporaryWorkspace</code> \u5426 \u662f\uff08\u4e34\u65f6\u76ee\u5f55\uff09 \u5426 \u5426 \u5426 \u9000\u51fa\u65f6\u6e05\u7406\u4e34\u65f6\u76ee\u5f55 <code>SFC2004</code>\uff08<code>workspace-disposed</code>\uff09 <code>computeResourceClosure</code> / <code>digestBytes</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC</code>\uff08\u58f0\u660e/\u5185\u5bb9\u8fdd\u89c4\uff09 <code>parseRequest</code> / <code>processRequest</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u7eaf\u51fd\u6570\u7ba1\u7ebf\uff09 <code>SFC2004</code> <code>validateReportModel</code> / <code>renderReportMarkdown</code> / <code>buildBinding</code> / <code>checkReport</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u7eaf\u51fd\u6570\uff09 <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>buildAdapterClosure</code> / <code>verifyAdapterBuildManifest</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC2004</code>\uff08<code>missing-resource</code>\uff09 <code>materializeAdapterBuild</code> \u5426 \u662f\uff08\u53d7\u6536\u5bb9\uff0csibling + rename\uff09 \u5426 \u5426 \u5426 \u65e0\uff08\u539f\u5b50 rename\uff09 <code>SFC2004</code> <code>probeVersionVector</code> \u5426 \u5426 \u9ed8\u8ba4\u5426\uff08\u9700\u663e\u5f0f <code>--allow-host-spawn</code>\uff09 \u5426 \u5426 \u65e0 <code>SFC2004</code> <code>openStateStore</code> / <code>appendEvent</code> / <code>readEvents</code> / <code>writeSnapshot</code> \u662f \u662f\uff08\u4e8b\u4ef6/\u5feb\u7167/\u9501\u6587\u4ef6\uff09 \u5426 \u5426 \u5426 \u4e8b\u4ef6\u65e5\u5fd7 + \u9501\u6587\u4ef6 <code>SFC2004</code>\uff08<code>store-locked</code>/\u94fe\u65ad\u88c2\uff09 <code>inspectStateStoreLock</code> / <code>recoverStateStoreLock</code> \u662f \u662f\uff08\u4ec5\u6062\u590d\u5199\u9501\uff09 \u5426 \u5426 \u5426 \u9501\u6587\u4ef6\uff08\u5355\u8c03 fencing\uff09 <code>SFC2004</code> <code>runMechanismCliBatch</code> / <code>mechanisms-cli.mjs --batch</code>\uff08since 0.19.0\uff0ccandidate\uff09 \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u53ea\u5199\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 output/error \u6d41\uff09 \u9000\u51fa\u7801 0\uff08\u5168\u6210\u529f\uff09/ 2\uff08\u81f3\u5c11\u4e00\u9879\u5931\u8d25\u6216\u6574\u6279\u62d2\u7edd\uff09\uff1b<code>details.kind</code> \u5c01\u95ed\u4e3a <code>batch-structure-invalid</code>/<code>batch-item-limit</code>/<code>batch-input-limit</code>/<code>batch-output-limit</code> <p>\u6279\u91cf\u5165\u53e3\u7684\u5931\u8d25\u9636\u6bb5\u51b3\u5b9a\u53ef\u89c2\u5bdf\u526f\u4f5c\u7528\u3002\u8bf7\u6c42\u5b57\u8282\u3001\u8f93\u5165\u9879\u6570\u6216\u7ed3\u6784\u7684\u9884\u68c0\u62d2\u7edd\u4e0d\u4f1a\u8c03\u7528\u673a\u5236\uff0cstdout \u4e3a\u7a7a\uff1b\u8f93\u51fa\u5bb9\u91cf\u53ea\u80fd\u5728\u5f53\u524d\u9879\u8fd4\u56de\u540e\u786e\u8ba4\uff0c\u56e0\u6b64\u8be5\u9879\u53ef\u80fd\u5df2\u7ecf\u6267\u884c\uff0c\u4f46\u540e\u7eed\u9879\u4e0d\u4f1a\u518d\u6267\u884c\uff0cstdout \u4ecd\u4e3a\u7a7a\u3002\u8f93\u51fa\u901a\u9053\u5931\u8d25\u65f6\u53ef\u80fd\u5df2\u6709\u90e8\u5206\u5b57\u8282\u9001\u51fa\uff0c\u6574\u4f53\u9000\u51fa 2\uff1b\u82e5\u9519\u8bef\u901a\u9053\u4e5f\u5931\u8d25\uff0c\u9519\u8bef\u5bf9\u8c61\u4e0d\u4fdd\u8bc1\u80fd\u591f\u4ea4\u4ed8\u3002</p> <p>Harness \u7684 <code>HARNESS_EXCLUSIONS</code> \u660e\u786e\u6392\u9664 release-state\u3001remote-network-access\u3001business-semantics\u3001workflow-orchestration\u3001model-calls\u3001git-writes\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#Engineering-Kit\u5de5\u7a0b\u547d\u4ee4\u5c42","title":"Engineering Kit\uff08\u5de5\u7a0b\u547d\u4ee4\u5c42\uff09","text":"\u5165\u53e3 \u8bfb \u5199 spawn Git \u7f51\u7edc \u6b8b\u4f59\u72b6\u6001 \u7a33\u5b9a\u9519\u8bef\u7801 / \u9000\u51fa\u7801 <code>scaffoldTarget</code> \u5426 \u662f\uff08\u53d7\u6536\u5bb9\u9aa8\u67b6\uff0c\u539f\u5b50 + \u6536\u5bb9\uff09 \u5426 \u5426 \u5426 \u65e0\uff08\u5931\u8d25\u4e0d\u7559\u534a\u6210\u54c1\uff09 <code>SFC2004</code>\uff08<code>target-not-empty</code>\uff09 <code>planAdoption</code> \u662f \u5426 \u9ed8\u8ba4\u53ef\u80fd\uff08\u51bb\u7ed3\u53ea\u8bfb git status\uff1b\u53ef\u5173\u95ed\uff09 \u53ea\u8bfb\u63a2\u6d4b \u5426 \u65e0\uff08stdout \u8f93\u51fa\uff09 <code>SFC</code> \u5b8c\u6210\u5224\u5b9a false <code>buildProfileDraft</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08stdout \u8f93\u51fa\uff09 <code>SFC</code> \u5b8c\u6210\u5224\u5b9a false <code>runProjection</code> \u662f\uff08\u8bfb manifest\uff09 \u662f\uff08\u53d7\u7ba1\u8def\u5f84\uff0c\u4e24\u9636\u6bb5\uff09 \u5426 \u5426 \u5426 \u65e0\uff08\u5931\u8d25\u96f6\u5199/\u56de\u6eda\uff09 <code>SFC2004</code>\uff08<code>unauthorized-path</code>/<code>handwritten-overwrite</code>/<code>conflict-drift</code>\uff09 <code>runChecks</code>\uff08<code>check</code>\uff09 \u662f \u5426 \u9ed8\u8ba4\u53ef\u80fd\uff08\u51bb\u7ed3\u53ea\u8bfb git status\uff1b\u53ef\u7528 <code>--no-git-spawn</code> \u5173\u95ed\uff09 \u53ea\u8bfb\u767d\u540d\u5355 \u5426 \u65e0 \u9000\u51fa\u7801 1\uff08\u53d1\u73b0\uff09/ 2\uff08\u673a\u5236\uff09 <code>check relock</code> \u662f \u662f\uff08\u663e\u5f0f\u53d7\u63a7\u5199\uff09 \u5426 \u5426 \u5426 \u53d7\u63a7 relock \u4e8b\u52a1\u72b6\u6001 \u9000\u51fa\u7801 0/1/2 <code>check qualification</code> / <code>runQualification</code> \u8bfb\u53d6 request \u4e0e bindings \u5728\u8c03\u7528\u65b9\u7ed1\u5b9a\u6839\u4e0b\u5199\u79c1\u6709\u8bc1\u636e \u662f\uff0c\u9884\u68c0\u901a\u8fc7\u540e \u5426 \u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51 \u7ec8\u6001\u4e0d\u786e\u5b9a\u65f6\u4fdd\u7559\u8bc1\u636e \u9000\u51fa\u7801 0/1/2\uff1b\u56db\u6001\u7ed3\u679c <code>runPluginVerification</code> \u662f\uff08\u8c03\u7528\u65b9\u7ed1\u5b9a\u6839\uff09 \u662f\uff08fresh workspace\u3001\u5bbf\u4e3b\u72b6\u6001\u3001\u79c1\u6709\u8bc1\u636e\uff09 \u662f\uff0c\u4ec5\u672c\u5730 executable \u5426 \u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51 \u4e0d\u786e\u5b9a\u8bc1\u636e\u4f1a\u4fdd\u7559 \u56db\u6001 <code>plugin-verification-result</code> <code>runSkillFamilyDirectoryVerification</code> \u662f\uff08\u8c03\u7528\u65b9\u7ed1\u5b9a\u6839\uff09 \u662f\uff08\u79c1\u6709 raw evidence\uff09 \u662f\uff0c\u4ec5\u672c\u5730 executable \u5426 \u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51 \u4e0d\u786e\u5b9a\u8bc1\u636e\u4f1a\u4fdd\u7559 \u56db\u6001\u76ee\u5f55\u7ed3\u679c <code>renderReportAction</code> / <code>checkReportAction</code> \u662f \u4ec5 <code>--out</code>/<code>--binding</code> \u5426 \u5426 \u5426 \u9ed8\u8ba4\u53ea\u5199 stdout <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>probeGitState</code> / <code>probeGitFacts</code> \u662f \u5426 \u9ed8\u8ba4\u53ef\u80fd\uff08\u51bb\u7ed3\u53ea\u8bfb Git \u5b50\u8fdb\u7a0b\uff1b\u53ef\u5173\u95ed\uff09 \u53ea\u8bfb\u767d\u540d\u5355 \u5426 \u65e0 <code>SFC</code>\uff08\u8d8a\u6743\u53c2\u6570\u62d2\u7edd\uff09 <code>describeHost</code> / <code>resolveHostId</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>planHost</code> / <code>applyHostPlan</code> \u662f build/install/update \u5199\uff08\u53d7\u6536\u5bb9\uff1buninstall \u4e0d\u5199\uff09 probe \u9ed8\u8ba4\u5426 \u5426 \u5426 \u4ec5\u663e\u5f0f <code>authorizationRef</code> <code>SFC2004</code>\uff1b\u8fdc\u7aef apply \u4e0e\u5220\u9664\u5f0f uninstall \u7a33\u5b9a\u62d2\u7edd <code>loadLicensingProfile</code> / <code>generateLicenseContent</code> \u7b49 \u5426 \u5426\uff08\u7eaf\u51fd\u6570\u751f\u6210\uff09 \u5426 \u5426 \u5426 \u65e0 <code>SFC</code>\uff08\u975e\u6cd5 Profile\uff09 <code>checkIdentityDrift</code> / <code>validateIdentityAgainstProfile</code> \u662f \u5426 \u5426 \u5426 \u5426 \u65e0 findings <code>cliMain</code> / <code>runCommand</code> \u4f9d\u5b50\u52a8\u4f5c \u4f9d\u5b50\u52a8\u4f5c \u4f9d\u5b50\u52a8\u4f5c \u4f9d\u5b50\u52a8\u4f5c \u7ed1\u5b9a executable \u53ef\u80fd\u8054\u7f51 \u4f9d\u5b50\u52a8\u4f5c \u9000\u51fa\u7801 0/1/2 <p>Kit \u7684 <code>FORBIDDEN_SIDE_EFFECTS</code> \u542b git-init/commit/push/tag\u3001publish\u3001remote-write\uff1b<code>REFUSED_MUTATION_FLAGS</code>\uff08\u542b <code>--apply</code>\uff09\u5728 CLI \u5165\u53e3\u5373\u62d2\u3002</p> <p>Foundation \u672c\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51\u3002Foundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002Qoder\u3001WorkBuddy \u4e0e Kimi \u5165\u53e3\u4ecd\u4e3a <code>manual/candidate</code>\uff1b\u53d7\u63a7 fixture \u53ea\u8bc1\u660e\u751f\u4ea7\u63a5\u7ebf\uff0c\u4e0d\u6388\u4e88\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#\u6b8b\u4f59\u72b6\u6001\u5408\u96c6","title":"\u6b8b\u4f59\u72b6\u6001\u5408\u96c6","text":"<ul> <li>\u539f\u5b50\u5199\uff1a\u5931\u8d25\u65f6\u56de\u6eda\u4e34\u65f6\u6587\u4ef6\uff0c\u76ee\u6807\u76ee\u5f55\u4e0d\u7559\u534a\u6210\u54c1\u3002</li> <li>\u4e34\u65f6\u5de5\u4f5c\u533a\uff1a\u9000\u51fa\uff08\u542b\u5f02\u5e38\u8def\u5f84\uff09\u65f6\u6e05\u7406\u3002</li> <li>\u72b6\u6001\u5b58\u50a8\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u662f\u552f\u4e00\u6743\u5a01\uff0csnapshot \u4e3a\u6d3e\u751f\u7f13\u5b58\uff1b\u5d29\u6e83\u9057\u7559\u9501\u9700\u8c03\u7528\u65b9\u5728 Foundation \u5916\u786e\u8ba4\u65e7\u5199\u8005\u7ec8\u6b62\u540e\u663e\u5f0f\u6062\u590d\uff0c\u4e0d\u81ea\u52a8\u5077\u9501\u3002</li> <li>\u6295\u5f71\uff1a\u4efb\u4e00\u6821\u9a8c\u5931\u8d25\u6574\u4f53\u62d2\u7edd\u3001\u96f6\u5199\u5165\uff1b\u8986\u76d6\u65e2\u6709\u6587\u4ef6\u9700\u58f0\u660e <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u3002</li> <li>adopt-plan\u3001\u666e\u901a runChecks \u4e0e\u666e\u901a check\uff1a\u7ed3\u6784\u6027\u53ea\u8bfb\u4e14\u4e0d\u5199\u6587\u4ef6\uff1b\u9ed8\u8ba4\u53ef\u80fd\u542f\u52a8\u4e00\u6761\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb Git status \u5b50\u8fdb\u7a0b\uff0c\u53ef\u7531 <code>--no-git-spawn</code>\uff08\u6216 API \u7684 <code>allowGitSpawn: false</code>\uff09\u5173\u95ed\uff0c\u8fd0\u884c\u524d\u540e\u5b57\u8282\u7ea7\u96f6\u53d8\u5316\u3002check relock \u4e0e check qualification \u7684\u526f\u4f5c\u7528\u89c1\u4e0a\u8868\u3002</li> </ul>"},{"location":"reference/failure-and-side-effect-matrix/#\u5931\u8d25\u540e\u8c03\u7528\u65b9\u8be5\u505a\u4ec0\u4e48","title":"\u5931\u8d25\u540e\u8c03\u7528\u65b9\u8be5\u505a\u4ec0\u4e48","text":"<ul> <li>\u6821\u9a8c\u5931\u8d25\uff08<code>SFC1001</code>/<code>SFC2002</code>/<code>SFC2003</code>\uff09\uff1a\u68c0\u67e5\u8f93\u5165\u662f\u5426\u6ee1\u8db3\u76ee\u6807 Schema \u6216\u53c2\u6570\u5408\u540c\uff0c\u4e0d\u91cd\u8bd5\u5df2\u88ab\u51bb\u7ed3\u62d2\u7edd\u7684\u767b\u8bb0\u3002</li> <li>\u6536\u5bb9\u5931\u8d25\uff08<code>SFC2004</code> + <code>path-traversal</code> \u7b49\uff09\uff1a\u786e\u8ba4\u6839\u76ee\u5f55\u4e0e\u8def\u5f84\u662f\u5426\u8d8a\u754c\uff0c\u4e0d\u8981\u628a\u4e1a\u52a1\u9009\u62e9\u89c4\u5219\u585e\u8fdb Foundation\u3002</li> <li>\u72b6\u6001\u9501\u51b2\u7a81\uff08<code>store-locked</code>\uff09\uff1a\u5728 Foundation \u4e4b\u5916\u786e\u8ba4\u65e7\u5199\u8005\u5df2\u7ec8\u6b62\uff0c\u518d\u7528\u7cbe\u786e\u5339\u914d\u7684 owner/fencing \u8c03\u7528\u6062\u590d\u3002</li> <li>check \u53d1\u73b0\uff08\u9000\u51fa\u7801 1\uff09\uff1a\u5904\u7f6e\u53d1\u73b0\u9879\uff0cKit \u4e0d\u81ea\u52a8\u4fee\u590d\u3002</li> </ul>"},{"location":"reference/api/","title":"\u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u76ee\u5f55\u4e3a Skill Family Foundation \u4e09\u5305\u5efa\u7acb\u673a\u5668\u53ef\u8bfb\u80fd\u529b\u76ee\u5f55\uff08<code>docs/agents/capability-catalog.json</code>\uff09\u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\u3002\u8303\u56f4\u6309 hand-off \u00a74.3\uff1a\u4f18\u5148\u4ece\u771f\u5b9e\u5bfc\u51fa\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684 API \u5168\u96c6\u3002</p>"},{"location":"reference/api/#\u8986\u76d6\u8303\u56f4","title":"\u8986\u76d6\u8303\u56f4","text":"\u5305 \u9875\u9762 \u516c\u5171\u5165\u53e3\u6027\u8d28 <code>skill-family-contracts</code> contracts.md \u673a\u5668\u5951\u7ea6\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001fixture\u3001\u5ba1\u8ba1\u8868\u9762\uff08\u7eaf\u51fd\u6570\u4e3a\u4e3b\uff09 <code>skill-family-harness-node</code> harness.md \u4e1a\u52a1\u4e2d\u7acb Node \u673a\u5236\uff08\u6536\u5bb9\u3001\u539f\u5b50\u5199\u3001\u95ed\u5305\u3001\u8bf7\u6c42\u3001\u62a5\u544a\u3001\u72b6\u6001\u5e95\u5ea7\uff09 <code>skill-family-engineering-kit</code> engineering-kit.md \u56db\u4e2a\u9876\u5c42\u547d\u4ee4\u4e0e\u53ea\u8bfb/\u53d7\u63a7\u5199\u5b50\u52a8\u4f5c <p>\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 \u00a74.3 \u81f3\u5c11\u8bf4\u660e\uff1a\u7b7e\u540d\u4e0e\u8f93\u5165\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p>"},{"location":"reference/api/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u5173\u7cfb","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u5173\u7cfb","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID\uff08\u5982 <code>foundation.contracts.object-validation</code>\u3001<code>foundation.harness.state-store</code>\uff09\u5b9a\u4e49\u5728 <code>docs/agents/capability-catalog.json</code>\uff0c\u672c\u9875\u4ece\u4e2d\u6295\u5f71\u5e76\u94fe\u63a5\u56de <code>sourceRefs</code> \u4e0e\u6d4b\u8bd5\u5f15\u7528\u3002</li> <li>\u672c\u9875\u7b7e\u540d\u53d6\u81ea\u5404\u5305 <code>src/index.mjs</code> \u4e0e\u6e90\u6a21\u5757\u771f\u5b9e\u5bfc\u51fa\uff1b\u95e8\u7981 <code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code>\uff0c\u62d2\u7edd catalog \u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\u3002</li> <li>catalog \u662f\u6587\u6863\u5c42\u673a\u5668\u4e8b\u5b9e\uff0c\u4e0d\u662f\u65b0\u7684 Contracts \u516c\u5171\u5bf9\u8c61\u6216\u534f\u8bae\uff1b\u672a\u7ecf ADR \u4e0d\u5f97\u4e3a\u5199\u6587\u6863\u65b0\u589e\u7b2c\u56db\u5305\u6216 Contracts \u5bf9\u8c61\u3002</li> </ul>"},{"location":"reference/api/#\u5173\u952e\u7eaa\u5f8b","title":"\u5173\u952e\u7eaa\u5f8b","text":"<ul> <li>\u673a\u5236\u5931\u8d25\u7edf\u4e00 <code>SFC2004</code>\uff08<code>EXECUTION_FAILED</code>\uff09\uff0c\u7531 <code>details.kind</code> \u533a\u5206\uff08<code>HARNESS_ERROR_KINDS</code> \u51bb\u7ed3\u679a\u4e3e\uff09\uff1bContracts \u6821\u9a8c\u5931\u8d25\uff08<code>SFC1001</code> / <code>SFC1002</code>\uff09\u7ecf <code>validateDocument</code> \u8fd4\u56de\u503c\u8868\u8fbe\u3001\u4e0d\u629b\u5f02\u5e38\u3002</li> <li>Kit \u9876\u5c42\u547d\u4ee4\u96c6\u5408\u56fa\u5b9a\u4e3a 4 \u4e2a\uff08<code>scaffold</code> / <code>adopt-plan</code> / <code>projection</code> / <code>check</code>\uff09\uff0c\u4e0d\u6269\u5f20\uff1b\u8fdc\u7aef\u6216\u901a\u7528 <code>host apply</code>\u3001\u5220\u9664\u5f0f <code>uninstall</code>\u3001Qoder \u5b8c\u6574 driver\u3001\u4e8c\u8fdb\u5236 adapter source\u3001\u8fdc\u7aef\u53d1\u5e03\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u3001\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\u5747\u660e\u786e unsupported\u3002\u5df2\u767b\u8bb0\u5bbf\u4e3b\u7684\u672c\u5730 install/update \u4ec5\u901a\u8fc7\u53d7\u6388\u6743\u7684 plan API \u63d0\u4f9b\u3002</li> <li>\u6240\u6709\u7248\u672c\u5b57\u6bb5\u4ece <code>package.json</code> \u4e0e Contracts \u771f\u6e90\u751f\u6210\u6216\u7531 fact-check \u6821\u9a8c\uff1b<code>CONTRACTS_VERSION=1.4.0</code> \u4e0e npm \u5305\u7248\u672c <code>0.3.0</code> \u5e76\u884c\u3002</li> </ul>"},{"location":"reference/api/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u4e09\u4e2a\u5305\u90fd\u901a\u8fc7\u65e2\u6709 candidate \u5b50\u8def\u5f84\u516c\u5f00 Quickstart Profile v2\u3002Contracts \u5b9a\u4e49 <code>execute-method</code> \u4ea4\u6362\u7ed3\u6784\uff0cHarness \u590d\u9a8c\u5b57\u8282\u548c\u7ed1\u5b9a\uff0cKit \u4ece\u663e\u5f0f\u6d88\u8d39\u8005 Schema \u751f\u6210\u79bb\u7ebf Bundle\u3002\u8be5\u80fd\u529b\u4ecd\u6807\u8bb0\u4e3a <code>candidate</code>\uff0c0.3.0 \u7684 v2 \u4e0e 0.2.1 \u7684 v1 \u4e0d\u517c\u5bb9\uff1b\u6d88\u8d39\u8005\u5fc5\u987b\u7cbe\u786e\u9501\u5b9a\u6240\u9009\u5305\u7248\u672c\u3002</p>"},{"location":"reference/api/contracts/","title":"skill-family-contracts \u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u9875\u4ece\u771f\u5b9e\u5bfc\u51fa\uff08<code>src/index.mjs</code> \u4e0e\u5404\u6e90\u6a21\u5757\uff09\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684\u5168\u96c6\u3002\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 hand-off \u00a74.3 \u8bf4\u660e\uff1a\u7b7e\u540d\u3001\u8f93\u5165\u4e0e\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p> <p>\u80fd\u529b\u5206\u7ec4\uff08\u4e0e <code>docs/agents/capability-catalog.json</code> \u5bf9\u5e94\uff09\uff1a</p> <ul> <li>\u5bf9\u8c61\u6821\u9a8c \u2192 <code>validateDocument</code> / <code>compileSchema</code> / <code>detectDialect</code></li> <li>\u6765\u6e90\u6743\u5a01\u6536\u636e \u2192 <code>validateSourceAuthorityReceipt</code> / <code>parseSourceAuthorityReceipt</code></li> <li>\u6587\u4ef6\u7cfb\u7edf\u5951\u7ea6 \u2192 \u6839\u7ed1\u5b9a\u4e0e\u56fa\u5b9a\u96c6\u5408 manifest/receipt Schema</li> <li>\u767b\u8bb0\u4e0e\u534f\u8bae \u2192 <code>loadRegistry</code> / <code>findSchemaByObject</code> / <code>findProtocol</code> / <code>registerSchema</code> / <code>registerProtocol</code></li> <li>\u5185\u6838\u534f\u8bae \u2192 <code>loadKernelProtocol</code> / <code>findOperation</code> / <code>checkOperation</code></li> <li>\u5f3a\u5236\u68c0\u67e5 \u2192 <code>runChecks</code> / <code>collectUnresolvedRefs</code></li> <li>fixture \u6821\u9a8c \u2192 <code>listFixtures</code> / <code>verifyFixture</code> / <code>verifyAllFixtures</code></li> <li>\u9519\u8bef\u7801 \u2192 <code>ContractsError</code> / <code>isRegisteredErrorCode</code> / <code>stableError</code></li> <li>\u5ba1\u8ba1\u8868\u9762 \u2192 <code>canonicalJson</code> / <code>digestDocument</code> / <code>digestAuditSurface</code></li> <li>\u5de5\u7a0b\u57fa\u7ebf \u2192 <code>validateEngineeringBaseline</code> / <code>describeEngineeringBaseline</code></li> <li>\u540c\u7ea7\u9002\u914d\u5668\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> <li>\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> <li>\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> <li>\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> </ul> <p>\u5305\u7ea7\u5e38\u91cf\uff08\u51bb\u7ed3\uff0c\u4ec5\u4f5c\u4e8b\u5b9e\u6295\u5f71\uff0c\u4e0d\u53e6\u7acb\u6743\u5a01\uff09\uff1a<code>CONTRACT_OBJECTS</code>\uff0846 \u7c7b\u9876\u5c42\u5bf9\u8c61\uff0c\u95ed\u96c6\uff09\u3001<code>CONTRACT_BOUNDARY</code>\u3001<code>CONTRACTS_VERSION = \"1.16.0\"</code>\u3001<code>SUPPORTED_DIALECTS</code>\u3001<code>VALIDATION_POLICIES</code>\u3001<code>CHECK_TYPES</code>\uff089 \u7c7b\u673a\u68b0\u68c0\u67e5\uff09\u3001<code>MANDATORY_RULES</code>\u3001<code>RULE_BUDGET</code>\u3001<code>ERROR_CODES</code>\u3002</p>"},{"location":"reference/api/contracts/#\u5bf9\u8c61\u6821\u9a8c-foundationcontractsobject-validation","title":"\u5bf9\u8c61\u6821\u9a8c (foundation.contracts.object-validation)","text":""},{"location":"reference/api/contracts/#validateDocument","title":"validateDocument","text":"<ul> <li>\u7b7e\u540d\uff1a<code>validateDocument(document, { schemaId, schema, dialect, policy = \"strict\" } = {})</code></li> <li>\u8f93\u5165\uff1a\u4efb\u610f JSON \u6587\u6863\uff1b\u76ee\u6807\u5951\u7ea6\u5bf9\u8c61 <code>$id</code> \u6216 schema \u5bf9\u8c61\uff1b\u65b9\u8a00\uff08<code>draft-07</code> / <code>2020-12</code>\uff09\uff1b\u7b56\u7565\uff08<code>strict</code> | <code>tolerant</code>\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u59cb\u7ec8\u8fd4\u56de <code>{valid, errorCode, errors, data}</code>\uff1b\u6821\u9a8c\u901a\u8fc7\u65f6 <code>valid=true</code>\uff0c\u5931\u8d25\u65f6 <code>valid=false</code> \u5e76\u5e26\u7a33\u5b9a <code>errorCode</code>\uff0c\u4e0d\u629b\u51fa\uff08\u5df2\u5b9e\u6d4b\uff1a\u672a\u77e5 <code>$id</code> \u8fd4\u56de <code>SFC1002</code>\uff0c\u6587\u6863\u4e0d\u7b26\u8fd4\u56de <code>SFC1001</code>\uff09\u3002<code>data</code> \u662f\u6821\u9a8c\u4f7f\u7528\u7684\u89c4\u8303\u5316\u526f\u672c\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002\u4ec5\u8bfb\u53d6\u8fdb\u7a0b\u5185 Ajv \u7f16\u8bd1\u7f13\u5b58\uff0c\u4e0d\u89e6\u5916\u90e8\u8d44\u6e90\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/Git/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff1b\u9996\u6b21\u7f16\u8bd1\u5199\u5165\u5185\u5b58\u7f16\u8bd1\u7f13\u5b58\uff0c\u540e\u7eed\u540c <code>(schemaId,dialect,policy)</code> \u590d\u7528\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1002</code>\uff08\u672a\u77e5 <code>$id</code>\uff09\u3001<code>SFC1001</code>\uff08\u6587\u6863\u4e0d\u7b26 Schema\uff09\u3002\u4e24\u8005\u5747\u7ecf\u8fd4\u56de\u503c <code>errorCode</code> \u8868\u8fbe\uff0c\u8c03\u7528\u65b9\u4ee5 <code>valid</code> \u5b57\u6bb5\u5224\u65ad\u6210\u8d25\uff0c\u4e0d\u4ee5 <code>try/catch</code> \u6355\u83b7\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5f85\u6821\u9a8c\u6587\u6863\u5e26\u5df2\u767b\u8bb0\u5951\u7ea6\u5bf9\u8c61 <code>$id</code>\uff1bNode &gt;= 22.22.2\uff1b\u6821\u9a8c\u5668\u56fa\u5b9a\u4e3a Ajv 8.20.0\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/validator.mjs</code>\u3002</li> <li>\u6b63\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/validator.test.mjs</code>\u3001<code>schemas.test.mjs</code>\u3001<code>host-contracts.test.mjs</code>\u3001<code>report-contracts.test.mjs</code>\u3002</li> <li>\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c\u4e0a\uff08\u672a\u77e5 <code>$id</code> \u4e0e\u4e0d\u7b26 Schema \u5747\u8fd4\u56de <code>valid:false</code>\uff09\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5177\u4f53\u4e1a\u52a1\u5b57\u6bb5\u7684\u8bed\u4e49\u89e3\u91ca\u3001\u9886\u57df\u7ea7\u6821\u9a8c\u89c4\u5219\u3002</li> </ul>"},{"location":"reference/api/contracts/#compileSchema","title":"compileSchema","text":"<ul> <li>\u7b7e\u540d\uff1a<code>compileSchema(target, { dialect, policy = \"strict\" } = {})</code></li> <li>\u8f93\u5165\uff1aschema \u5bf9\u8c61\u6216 <code>$id</code>\uff1b\u65b9\u8a00\uff1b\u7b56\u7565\u3002</li> <li>\u8f93\u51fa\uff1a\u7f16\u8bd1\u540e\u7684 Ajv <code>validate</code> \u51fd\u6570\uff1b\u6216\u629b <code>ContractsError</code>\uff08<code>SFC1012</code> <code>SCHEMA_COMPILE_FAILED</code>\uff0c\u5f53 schema \u81ea\u8eab\u65e0\u6cd5\u5728\u58f0\u660e\u65b9\u8a00\u4e0b\u7f16\u8bd1\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff0c\u4ec5\u5199\u5165\u7f16\u8bd1\u7f13\u5b58\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1012</code>\uff08Schema \u7f16\u8bd1\u5931\u8d25\uff0c\u629b\u5f02\u5e38\u2014\u2014\u4e0e <code>validateDocument</code> \u7684\u8fd4\u56de\u5f0f\u5931\u8d25\u4e0d\u540c\uff09\u3001<code>SFC1006</code>\uff08\u4e0d\u652f\u6301\u7684\u65b9\u8a00\uff1b<code>compileSchema</code> \u629b\u51fa\uff0c<code>validateDocument</code> \u4ee5\u8fd4\u56de\u503c\u62a5\u544a\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aAjv 8.20.0 \u56fa\u5b9a\uff1b<code>dialect</code> \u5c5e\u51bb\u7ed3\u652f\u6301\u96c6\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/validator.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c <code>validateDocument</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1aschema \u7684\u4e1a\u52a1\u542b\u4e49\u3002</li> </ul>"},{"location":"reference/api/contracts/#detectDialect","title":"detectDialect","text":"<ul> <li>\u7b7e\u540d\uff1a<code>detectDialect(schema)</code></li> <li>\u8f93\u5165\uff1a\u5e26 <code>$schema</code> \u5b57\u6bb5\u7684 schema \u5bf9\u8c61\u3002</li> <li>\u8f93\u51fa\uff1a\u65b9\u8a00\u5b57\u7b26\u4e32\uff08<code>draft-07</code> / <code>2020-12</code>\uff09\uff1b\u7f3a\u5c11\u6216\u672a\u77e5\u65b9\u8a00\u8fd4\u56de <code>null</code>\u3002<code>compileSchema</code> \u5bf9\u4e0d\u652f\u6301\u7684\u65b9\u8a00\u629b <code>SFC1006</code>\uff0c<code>validateDocument</code> \u5bf9\u540c\u4e00\u60c5\u51b5\u8fd4\u56de <code>errorCode: \"SFC1006\"</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8c03\u7528\u65b9\u76f4\u63a5\u8c03\u7528 <code>detectDialect</code> \u65f6\u672a\u77e5\u65b9\u8a00\u4e0d\u4ea7\u751f\u9519\u8bef\u7801\uff1b\u4e0b\u6e38\u7f16\u8bd1/\u6821\u9a8c\u5206\u522b\u6309\u4e0a\u8ff0\u89c4\u5219\u4ea7\u751f <code>SFC1006</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u65b9\u8a00\u96c6\u51bb\u7ed3\uff08<code>SUPPORTED_DIALECTS</code>\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/validator.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c\u4e0a\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u65b9\u8a00\u9009\u62e9\u7b56\u7565\uff08\u4f55\u65f6\u7528 tolerant\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u6765\u6e90\u6743\u5a01\u6536\u636e-foundationcontractssource-authority","title":"\u6765\u6e90\u6743\u5a01\u6536\u636e (foundation.contracts.source-authority)","text":""},{"location":"reference/api/contracts/#validateSourceAuthorityReceipt--parseSourceAuthorityReceipt","title":"validateSourceAuthorityReceipt / parseSourceAuthorityReceipt","text":"<ul> <li>\u7b7e\u540d\uff1a<code>validateSourceAuthorityReceipt(receipt)</code>\uff1b<code>parseSourceAuthorityReceipt(receipt, actualSubjects)</code>\u3002</li> <li>\u8f93\u5165\uff1a\u95ed\u5408\u7684\u5916\u7f6e receipt\uff0c\u4ee5\u53ca\u8c03\u7528\u65b9\u5b9e\u9645\u89c2\u6d4b\u7684 subjects\u3002\u6bcf\u4e2a subject \u53ea\u542b <code>packageName</code>\u3001<code>version</code>\u3001<code>filename</code> \u4e0e <code>sha256</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u4e24\u8005\u5747\u8fd4\u56de\u65e2\u6709 <code>{ valid, errorCode, errors, data }</code> \u7ed3\u679c\u5f62\u6001\u3002\u89e3\u6790\u6210\u529f\u65f6\uff0c<code>data</code> \u53ea\u542b <code>sourceRepository</code> \u4e0e <code>sourceBaseCommit</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002\u8f93\u5165\u4f1a\u590d\u5236\u540e\u6821\u9a8c\uff0c\u8c03\u7528\u65b9\u5bf9\u8c61\u4e0d\u88ab\u4fee\u6539\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u3001\u8fdb\u7a0b\u3001Git\u3001\u7f51\u7edc\u6216\u53d1\u5e03\u72b6\u6001\u526f\u4f5c\u7528\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\uff1a\u7ed3\u6784\u3001\u6392\u5e8f\u3001\u91cd\u590d\u5305\u540d\u3001\u5b9e\u9645 subjects \u5f62\u72b6\u6216\u9010\u5b57\u6bb5\u6838\u5bf9\u5931\u8d25\u5747\u8fd4\u56de <code>SFC1001</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1areceipt subjects \u81f3\u5c11\u4e00\u9879\uff0c\u6309 <code>packageName</code> \u552f\u4e00\u3001\u5347\u5e8f\u6392\u5217\uff1b<code>sourceBaseCommit</code> \u662f 40 \u4f4d\u5c0f\u5199\u5341\u516d\u8fdb\u5236\uff0cSHA-256 \u662f 64 \u4f4d\u5c0f\u5199\u5341\u516d\u8fdb\u5236\u3002\u8c03\u7528\u65b9\u8d1f\u8d23\u53d6\u5f97 receipt \u4e0e\u5b9e\u9645 subjects\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.8.4</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/source-authority.mjs</code>\u3001<code>src/schemas/source-authority-receipt.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/source-authority.test.mjs</code>\u3001<code>source-authority-public-consumer.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1areceipt \u7684\u7b7e\u53d1\u3001\u5b58\u50a8\u548c\u4f20\u8f93\uff1b\u5b9e\u9645\u5305\u53d1\u73b0\uff1b\u6821\u9a8c\u540e\u662f\u5426\u91c7\u7528\u8be5\u6765\u6e90\u3002Contracts \u4e0d\u6267\u884c\u76ee\u6807\uff0c\u4e5f\u4e0d\u89e3\u91ca\u79c1\u6709\u53d1\u5e03\u8ba1\u5212\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u6587\u4ef6\u7cfb\u7edf\u5951\u7ea6-foundationcontractsfilesystem","title":"\u6587\u4ef6\u7cfb\u7edf\u5951\u7ea6 (foundation.contracts.filesystem)","text":"<p>0.9.0 \u65b0\u589e\u4e09\u4e2a\u7a33\u5b9a\u9876\u5c42 Schema\uff1a<code>filesystem-root-binding</code>\u3001<code>fixed-set-publication-manifest</code> \u4e0e <code>fixed-set-publication-receipt</code>\u3002\u5b83\u4eec\u53ea\u63cf\u8ff0\u7ed3\u6784\u4e0e\u56de\u6267\uff0c\u4e0d\u63d0\u4f9b\u5220\u9664\u3001\u66ff\u6362\u6216\u901a\u7528\u6062\u590d\u72b6\u6001\u673a\u3002</p> <ul> <li>\u6839\u7ed1\u5b9a Schema\uff1a<code>https://contracts.skill-family.example/v1/filesystem-root-binding.json</code>\u3002\u503c\u56fa\u5b9a\u4e3a <code>kind</code>\u3001<code>digestAlgorithm</code>\u3001<code>basis</code>\u3001<code>digest</code> \u56db\u4e2a\u5b57\u6bb5\uff1b\u7ed1\u5b9a\u503c\u53ef\u5e8f\u5217\u5316\u4e14\u4e0d\u5305\u542b\u516c\u5f00\u76ee\u5f55\u53e5\u67c4\u3002</li> <li>\u56fa\u5b9a\u96c6\u5408 manifest/receipt Schema\uff1a<code>https://contracts.skill-family.example/v1/fixed-set-publication-manifest.json</code> \u4e0e <code>https://contracts.skill-family.example/v1/fixed-set-publication-receipt.json</code>\u3002\u53d1\u5e03\u56de\u6267\u7684\u7ec8\u6001\u53ea\u5141\u8bb8 <code>succeeded</code>\u3001<code>refused</code>\u3001<code>failed</code>\u3001<code>indeterminate</code>\u3002</li> <li>\u8fd9\u4e09\u4e2a Schema \u7684\u771f\u5b9e\u767b\u8bb0\u4e0e fixture \u7531 <code>packages/skill-family-contracts/src/registry.json</code>\u3001<code>src/schemas/</code> \u548c <code>test/</code> \u5171\u540c\u6838\u9a8c\uff1b\u6279\u91cf\u6821\u9a8c Schema \u4fdd\u6301 candidate\uff0c\u4e0d\u8fdb\u5165\u7a33\u5b9a Registry\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u767b\u8bb0\u4e0e\u534f\u8bae-foundationcontractsregistry-protocol","title":"\u767b\u8bb0\u4e0e\u534f\u8bae (foundation.contracts.registry-protocol)","text":""},{"location":"reference/api/contracts/#loadRegistry--listSchemas--listProtocols--findSchemaRegistration--findSchemaByObject--findProtocol","title":"loadRegistry / listSchemas / listProtocols / findSchemaRegistration / findSchemaByObject / findProtocol","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>loadRegistry()</code></li> <li><code>listSchemas(registry = REGISTRY)</code></li> <li><code>listProtocols(registry = REGISTRY)</code></li> <li><code>findSchemaRegistration(schemaId, registry = REGISTRY)</code></li> <li><code>findSchemaByObject(object, registry = REGISTRY)</code></li> <li><code>findProtocol(name, version, registry = REGISTRY)</code></li> <li>\u8f93\u5165\uff1a\u5bf9\u8c61\u540d\u3001<code>$id</code>\u3001\u534f\u8bae\u540d/\u7248\u672c\uff08\u5176\u4f59\u9ed8\u8ba4\u8bfb\u51bb\u7ed3 <code>REGISTRY</code>\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u5df2\u767b\u8bb0 schema \u5143\u4fe1\u606f\u6216\u534f\u8bae\u5b9a\u4e49\uff1b\u672a\u547d\u4e2d\u8fd4\u56de <code>null</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u767b\u8bb0\u7c7b\u51b2\u7a81\u7ecf <code>registerSchema</code> / <code>registerProtocol</code> \u629b <code>SFC1003</code>\uff08<code>DUPLICATE_SCHEMA_ID</code>\uff09/ <code>SFC1004</code>\uff08<code>DUPLICATE_PROTOCOL_NAME</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>registry.json</code> \u968f\u5305\u53d1\u5e03\uff1b<code>schemaVersion=1</code>\u3001<code>contractsVersion=1.16.0</code> \u4e3a\u552f\u4e00\u6743\u5a01\uff1b\u767b\u8bb0\u8868\u542b 46 \u7c7b Schema \u4e0e 1 \u4e2a Kernel Protocol\uff0c\u65b0\u589e\u9700 ADR\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/registry.mjs</code>\u3001<code>registry.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/registry.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5bf9\u8c61\u4e1a\u52a1\u542b\u4e49\u7684\u89e3\u91ca\u3002</li> </ul>"},{"location":"reference/api/contracts/#registerSchema--registerProtocol","title":"registerSchema / registerProtocol","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>registerSchema(entry, registry = REGISTRY)</code></li> <li><code>registerProtocol(entry, registry = REGISTRY)</code></li> <li>\u8f93\u5165\uff1aschema/protocol \u767b\u8bb0\u9879\u3002</li> <li>\u8f93\u51fa\uff1a\u5305\u542b\u65b0\u767b\u8bb0\u9879\u7684 registry \u65b0\u526f\u672c\uff1b\u8f93\u5165 registry \u4e0e\u9ed8\u8ba4\u51bb\u7ed3 <code>REGISTRY</code> \u5747\u4e0d\u4fee\u6539\u3002\u91cd\u590d <code>$id</code>/\u534f\u8bae\u540d\u629b <code>ContractsError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u4ec5\u8fd4\u56de\u590d\u5236\u540e\u7684\u5185\u5b58\u5bf9\u8c61\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u3001\u8fdb\u7a0b\u3001Git\u3001\u7f51\u7edc\u6216\u6301\u4e45\u5316\u526f\u4f5c\u7528\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1003</code>\uff08\u91cd\u590d <code>$id</code>\uff09\u3001<code>SFC1004</code>\uff08\u91cd\u590d\u534f\u8bae\u540d\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u767b\u8bb0\u8868\u542b 46 \u7c7b Schema \u4e0e 1 \u4e2a Kernel Protocol\uff0c\u65b0\u589e\u9700 ADR\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a\u540c\u4e0a\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c\u4e0a\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u767b\u8bb0\u9879\u7684\u4e1a\u52a1\u7406\u7531\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5185\u6838\u534f\u8bae-foundationcontractskernel-protocol","title":"\u5185\u6838\u534f\u8bae (foundation.contracts.kernel-protocol)","text":""},{"location":"reference/api/contracts/#loadKernelProtocol--findOperation--checkOperation","title":"loadKernelProtocol / findOperation / checkOperation","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>loadKernelProtocol()</code></li> <li><code>findOperation(name, kernel = KERNEL)</code></li> <li><code>checkOperation(operation, params)</code></li> <li>\u8f93\u5165\uff1a\u534f\u8bae\u540d\u3001\u64cd\u4f5c\u540d\u3001\u64cd\u4f5c\u53c2\u6570\u3002</li> <li>\u8f93\u51fa\uff1a\u534f\u8bae\u5b9a\u4e49\u6216\u64cd\u4f5c\u53c2\u6570\u6821\u9a8c\u7ed3\u679c\uff1b\u5931\u8d25\u65f6\u629b <code>ContractsError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u52a0\u8f7d\u4e3a\u53ea\u8bfb\u89e3\u6790\uff0c\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC2002</code>\uff08<code>UNKNOWN_OPERATION</code>\uff0c\u64cd\u4f5c\u540d\u4e0d\u5728\u51bb\u7ed3\u8bcd\u6c47\uff09\u3001<code>SFC2003</code>\uff08<code>INVALID_PARAMS</code>\uff0c\u53c2\u6570\u8fdd\u53cd\u64cd\u4f5c\u53c2\u6570\u5951\u7ea6\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>kernel-protocol.json</code> \u968f\u5305\u53d1\u5e03\uff1b\u5185\u6838\u534f\u8bae\u7248\u672c\u4e0e Contracts \u7248\u672c\u7ed1\u5b9a\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/kernel.mjs</code>\u3001<code>kernel-protocol.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/kernel.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u64cd\u4f5c\u7684\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\uff08\u72b6\u6001\u673a/\u91cd\u8bd5/\u7ec8\u6001\u8f6c <code>loop-agent</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5f3a\u5236\u68c0\u67e5-foundationcontractsmandatory-checks","title":"\u5f3a\u5236\u68c0\u67e5 (foundation.contracts.mandatory-checks)","text":""},{"location":"reference/api/contracts/#runChecks--collectUnresolvedRefs","title":"runChecks / collectUnresolvedRefs","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runChecks({ schemaEntries, ... } = {})</code></li> <li><code>collectUnresolvedRefs(schemaEntries)</code></li> <li>\u8f93\u5165\uff1a\u5f85\u68c0\u67e5\u5951\u7ea6\u96c6\u6216\u5408\u6210 registry/fixtures\u3002</li> <li>\u8f93\u51fa\uff1a\u68c0\u67e5\u7ed3\u8bba\u4e0e\u672a\u89e3\u6790\u5f15\u7528\u6e05\u5355\uff1b\u8fdd\u53cd\u89c4\u5219\u629b <code>ContractsError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1002</code>/<code>1003</code>/<code>1004</code>/<code>1005</code>/<code>1006</code>/<code>1008</code>/<code>1009</code>/<code>1010</code> \u5bf9\u5e94\u5404\u89c4\u5219 violated\uff1b<code>SFC1005</code>\uff08<code>UNRESOLVED_REF</code>\uff09\u3001<code>SFC1008</code>\uff08<code>RULE_BUDGET_EXCEEDED</code>\uff09\u3001<code>SFC1010</code>\uff08<code>FIXTURE_EXPECTATION_MISMATCH</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aregistry \u4e0e rules \u5df2\u52a0\u8f7d\uff1b<code>CHECK_TYPES</code> \u4e3a 9 \u7c7b\u95ed\u96c6\uff1b<code>RULE_BUDGET</code> \u9650\u5236 <code>firstVersionMax</code> \u4e0e <code>absoluteMax</code>\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/checker.mjs</code>\u3001<code>rules.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/checker.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u89c4\u5219\u4e1a\u52a1\u7406\u7531\u7684\u89e3\u91ca\uff08\u8bed\u4e49\u63a5\u53d7/\u62d2\u7edd\u5c5e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#fixture-\u6821\u9a8c-foundationcontractsfixture-verification","title":"fixture \u6821\u9a8c (foundation.contracts.fixture-verification)","text":""},{"location":"reference/api/contracts/#listFixtures--fixtureClasses--verifyFixture--verifyAllFixtures","title":"listFixtures / fixtureClasses / verifyFixture / verifyAllFixtures","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>listFixtures()</code></li> <li><code>fixtureClasses()</code></li> <li><code>verifyFixture(fixture)</code></li> <li><code>verifyAllFixtures()</code></li> <li>\u8f93\u5165\uff1afixture \u7c7b\u6216\u5355\u4e2a fixture \u6807\u8bc6\u3002</li> <li>\u8f93\u51fa\uff1a\u9010 fixture \u7684\u6821\u9a8c\u7ed3\u679c\uff08\u6b63\u4f8b\u987b\u901a\u8fc7\u3001\u8d1f\u4f8b\u987b\u4ee5\u58f0\u660e\u7a33\u5b9a\u7801\u5931\u8d25\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u53ea\u8bfb fixture \u76ee\u5f55\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u8bbf\u95ee fixture\uff0c\u65e0\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1010</code>\uff08<code>FIXTURE_EXPECTATION_MISMATCH</code>\uff0c\u8d1f\u4f8b\u672a\u4ea7\u751f\u9884\u671f\u5931\u8d25\uff09\uff1b<code>SFC1009</code>\uff08<code>UNKNOWN_ERROR_CODE</code>\uff0cfixture \u5f15\u7528\u672a\u767b\u8bb0\u7801\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1afixtures \u76ee\u5f55\u4e3a\u516c\u5f00\u6216\u5b8c\u5168\u865a\u6784\u6570\u636e\uff1bfixture \u4e0e\u5ba1\u8ba1\u5668\u9884\u671f\u7ed3\u679c\u4e0d\u5171\u4eab\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/fixtures.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/fixtures.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1afixture \u80cc\u540e\u7684\u4e1a\u52a1\u610f\u56fe\uff08fixture \u53ea\u8bc1\u7ed3\u6784\u3001\u4e0d\u8bc1\u8bed\u4e49\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u9519\u8bef\u7801-foundationcontractserror-codes","title":"\u9519\u8bef\u7801 (foundation.contracts.error-codes)","text":""},{"location":"reference/api/contracts/#ContractsError--errorCodeRegistry--errorCodeInfo--isRegisteredErrorCode--assertRegisteredErrorCode--stableError","title":"ContractsError / errorCodeRegistry / errorCodeInfo / isRegisteredErrorCode / assertRegisteredErrorCode / stableError","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>class ContractsError extends Error</code>\uff08\u6784\u9020 <code>(code, message, details)</code>\uff09</li> <li><code>errorCodeRegistry()</code></li> <li><code>errorCodeInfo(code)</code></li> <li><code>isRegisteredErrorCode(code)</code></li> <li><code>assertRegisteredErrorCode(code)</code></li> <li><code>stableError(code, message, details)</code></li> <li>\u8f93\u5165\uff1a\u9519\u8bef\u7801\u5b57\u7b26\u4e32\u3001\u9519\u8bef\u4e0a\u4e0b\u6587\u3002</li> <li>\u8f93\u51fa\uff1a\u5e26\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details</code> \u7684\u9519\u8bef\u5bf9\u8c61\uff1b<code>assertRegisteredErrorCode</code> \u5bf9\u672a\u767b\u8bb0\u7801\u629b <code>TypeError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08<code>ContractsError</code> \u6784\u9020\u4e3a\u7eaf\u5bf9\u8c61\uff0c\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u9519\u8bef\u7801\u4f53\u7cfb\u672c\u8eab\u51bb\u7ed3\uff08<code>error-codes.json</code>\uff09\uff0c\u65b0\u589e\u7801\u5c5e Contracts \u53d8\u66f4\uff1b<code>SFC1009</code> \u7528\u4e8e\u672a\u767b\u8bb0\u7801\u65ad\u8a00\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>error-codes.json</code> \u968f\u5305\u53d1\u5e03\uff1b\u51bb\u7ed3\u5bf9\u8c61\u4e0d\u53ef\u53d8\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/errors.mjs</code>\u3001<code>error-codes.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/boundary.test.mjs</code>\u3001<code>immutability.test.mjs</code>\u3001<code>audit-surface.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9519\u8bef\u7801\u7684\u4e1a\u52a1\u5f52\u56e0\u3002</li> </ul> <p>Contracts \u9519\u8bef\u7801\u4e00\u89c8\uff08\u7a33\u5b9a\u3001append-only\uff09\uff1a</p> \u7801 \u540d\u79f0 \u7c7b\u522b SFC1001 SCHEMA_VALIDATION_FAILED contract SFC1002 UNKNOWN_SCHEMA_ID contract SFC1003 DUPLICATE_SCHEMA_ID contract SFC1004 DUPLICATE_PROTOCOL_NAME contract SFC1005 UNRESOLVED_REF contract SFC1006 UNSUPPORTED_DIALECT contract SFC1007 UNKNOWN_CHECK_TYPE contract SFC1008 RULE_BUDGET_EXCEEDED contract SFC1009 UNKNOWN_ERROR_CODE contract SFC1010 FIXTURE_EXPECTATION_MISMATCH contract SFC1011 UNKNOWN_PROTOCOL contract SFC1012 SCHEMA_COMPILE_FAILED contract SFC1013 CONSUMER_CONTRACT_VERSION_MISMATCH contract SFC2002 UNKNOWN_OPERATION kernel SFC2003 INVALID_PARAMS kernel SFC2004 EXECUTION_FAILED kernel\uff08\u673a\u5236\u5931\u8d25\u7edf\u4e00\u7801\uff0c\u627f\u8f7d <code>details.kind</code>\uff09 SFC3001 REPORT_DIGEST_MISMATCH report SFC3002 REPORT_ELEMENT_MISSING report SFC3003 REPORT_FACT_DRIFT report"},{"location":"reference/api/contracts/#\u5ba1\u8ba1\u8868\u9762-foundationcontractsaudit-surface","title":"\u5ba1\u8ba1\u8868\u9762 (foundation.contracts.audit-surface)","text":""},{"location":"reference/api/contracts/#canonicalJson--digestDocument--describeAuditSurface--digestAuditSurface","title":"canonicalJson / digestDocument / describeAuditSurface / digestAuditSurface","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>canonicalJson(value)</code></li> <li><code>digestDocument(value, { algorithm = \"sha256\" } = {})</code></li> <li><code>describeAuditSurface()</code></li> <li><code>digestAuditSurface(surface = describeAuditSurface())</code></li> <li>\u8f93\u5165\uff1a\u4efb\u610f JSON \u6587\u6863\u3002</li> <li>\u8f93\u51fa\uff1acanonical \u5b57\u7b26\u4e32\u4e0e sha256 \u6458\u8981\uff1b\u5ba1\u8ba1\u8868\u9762\u7ed3\u6784\u63cf\u8ff0\u4e0e\u5176\u6458\u8981\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e JSON \u503c\u3001\u672a\u77e5\u7b97\u6cd5\uff08<code>AUDIT_DIGEST_ALGORITHMS</code> \u4ec5 <code>sha256</code>\uff09\u3001\u51bb\u7ed3\u8fdd\u89c4\u629b <code>ContractsError</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>AUDIT_SURFACE_VERSION=1</code>\uff1b\u6458\u8981\u7b97\u6cd5\u4ec5 <code>sha256</code>\uff1b\u4f9d\u8d56\u65b9\u5411 Audit \u2192 Contracts\uff0c\u672c\u6a21\u5757\u4e0d\u53cd\u5411\u5bfc\u5165\u5ba1\u8ba1\u4ea7\u7269\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/audit-surface.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/audit-surface.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5ba1\u8ba1\u8bed\u4e49\u7ed3\u8bba\uff08\u63a5\u53d7/\u62d2\u7edd\u5c5e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5de5\u7a0b\u57fa\u7ebf-foundationcontractsengineering-baseline","title":"\u5de5\u7a0b\u57fa\u7ebf (foundation.contracts.engineering-baseline)","text":""},{"location":"reference/api/contracts/#validateEngineeringBaseline--describeEngineeringBaseline","title":"validateEngineeringBaseline / describeEngineeringBaseline","text":"<ul> <li>\u7b7e\u540d\uff1a<code>validateEngineeringBaseline(baseline)</code>\uff1b<code>describeEngineeringBaseline({ provider, id, version, canonicalRuleRefs, referenceImplementation })</code>\u3002</li> <li>\u8f93\u5165\uff1a\u95ed\u5408\u7684 <code>skill-family.engineering-baseline</code> \u6587\u6863\uff0c\u6216\u6784\u9020\u8be5\u6587\u6863\u6240\u9700\u7684\u63d0\u4f9b\u65b9\u8eab\u4efd\u3001\u5df2\u6392\u5e8f\u89c4\u5219\u8c31\u7cfb\u5f15\u7528\u548c Foundation \u53c2\u8003\u9aa8\u67b6\u8eab\u4efd\u3002<code>referenceImplementation</code> \u53ea\u542b <code>foundationVersion</code>\u3001<code>profile</code> \u4e0e <code>skeletonDigest</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u6821\u9a8c\u5165\u53e3\u8fd4\u56de\u65e2\u6709 <code>{ valid, errorCode, errors, data }</code> \u7ed3\u679c\uff1b\u6784\u9020\u5165\u53e3\u6309\u89c4\u5219 ID \u6392\u5e8f\u3001\u8ba1\u7b97\u53bb\u6389 <code>digest</code> \u5b57\u6bb5\u540e\u7684\u89c4\u8303 JSON \u6458\u8981\uff0c\u5e76\u8fd4\u56de\u6df1\u5ea6\u51bb\u7ed3\u7684\u6587\u6863\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002\u53ea\u590d\u7528 Contracts \u7684 Schema \u6821\u9a8c\u3001\u60f0\u6027 JSON \u9884\u68c0\u3001<code>digestDocument()</code> \u4e0e\u8fdb\u7a0b\u5185\u7f16\u8bd1\u7f13\u5b58\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u3001\u8fdb\u7a0b\u3001Git \u6216\u7f51\u7edc\u526f\u4f5c\u7528\uff1b\u4e0d\u8bfb\u53d6\u57fa\u7ebf\u63d0\u4f9b\u65b9\u7684\u5305\u3001\u4ed3\u5e93\u6216\u89c4\u5219\u6587\u4ef6\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u7ed3\u6784\u3001\u91cd\u590d\u89c4\u5219 ID\u3001\u975e\u786e\u5b9a\u6027\u987a\u5e8f\u6216\u6458\u8981\u4e0d\u4e00\u81f4\u8fd4\u56de\u6216\u629b\u51fa <code>SFC1001</code>\uff1b\u672a\u77e5 Schema \u4ecd\u6309\u901a\u7528\u6821\u9a8c\u89c4\u5219\u8fd4\u56de <code>SFC1002</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aSchema <code>$id</code> \u4e3a <code>https://contracts.skill-family.example/v1/engineering-baseline.json</code>\uff1b<code>canonicalRuleRefs</code> \u81f3\u5c11\u4e00\u9879\uff0c\u6309 <code>id</code> \u552f\u4e00\u4e14\u5347\u5e8f\uff1b<code>digest</code> \u5fc5\u987b\u7ed1\u5b9a\u6587\u6863\u81ea\u8eab\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.17.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/engineering-baseline.mjs</code>\u3001<code>src/schemas/engineering-baseline.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/engineering-baseline.test.mjs</code>\u3001<code>schemas.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u57fa\u7ebf\u63d0\u4f9b\u65b9\u8d1f\u8d23\u89c4\u5219\u6b63\u6587\u3001\u89c4\u5219\u6548\u679c\u3001\u7b49\u4ef7\u5173\u7cfb\u3001\u8c41\u514d\u548c\u6b63\u5f0f\u57fa\u7ebf\u53d1\u5e03\u3002Foundation \u4e0d\u89e3\u91ca\u8fd9\u4e9b\u8bed\u4e49\uff0c\u4e5f\u4e0d\u5ba3\u79f0 Audit \u5df2\u7ecf\u53d1\u5e03\u6b63\u5f0f\u57fa\u7ebf\uff1b\u4f9d\u8d56\u65b9\u5411\u4fdd\u6301\u4e3a\u57fa\u7ebf\u63d0\u4f9b\u65b9\u4f9d\u8d56 Foundation\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u540c\u7ea7\u9002\u914d\u5668\u9a8c\u8bc1\u5408\u540c-foundationcontractspeer-adapter-verification","title":"\u540c\u7ea7\u9002\u914d\u5668\u9a8c\u8bc1\u5408\u540c (foundation.contracts.peer-adapter-verification)","text":"<p>Contracts 1.10.0 \u767b\u8bb0 <code>adapter-peer-verification-request</code> \u4e0e <code>adapter-peer-verification-result</code> \u4e24\u4e2a\u7a33\u5b9a Schema\u3002request \u81f3\u5c11\u5305\u542b\u4e24\u4e2a\u663e\u5f0f peer\uff1b\u6bcf\u4e2a peer \u643a\u5e26\u95ed\u96c6 <code>hostId</code>\u3001\u8def\u5f84\u7c7b\u522b\u548c\u5b8c\u6574 <code>logicalMappings</code>\u3002result \u56fa\u5b9a\u4e3a <code>verified</code> \u4e0e <code>peer-verification</code>\uff0c\u5e76\u643a\u5e26\u5171\u540c\u6765\u6e90\u95ed\u5305\u3001\u6bcf\u4e2a peer \u7684\u6807\u51c6 manifest \u548c mapping\u3002</p> <p>\u8fd9\u4e24\u4e2a\u5408\u540c\u53ea\u63cf\u8ff0\u4e1a\u52a1\u4e2d\u7acb\u7684\u53ea\u8bfb\u9a8c\u8bc1\uff0c\u4e0d\u62e5\u6709 canonical source\u3001\u76ee\u5f55\u5199\u5165\u3001\u8fc1\u79fb\u3001receipt\u3001\u91cd\u8bd5\u6216\u751f\u547d\u5468\u671f\u72b6\u6001\u3002 peer \u987a\u5e8f\u4e0d\u5f97\u6539\u53d8\u5171\u540c\u95ed\u5305\u6458\u8981\u6216\u7ed3\u8bba\uff1b\u672a\u77e5\u5b57\u6bb5\u3001\u91cd\u590d/\u7f3a\u5931/\u60ac\u7a7a mapping \u548c\u65e0\u6cd5\u7531\u771f\u5b9e\u76ee\u5f55\u8bc1\u660e\u7684\u8f93\u5165\u5fc5\u987b\u5931\u8d25\u5173\u95ed\u3002</p> <ul> <li><code>since</code> / <code>stability</code>\uff1a<code>0.10.0</code> / <code>stable</code>\u3002</li> <li>Schema \u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/schemas/adapter-peer-verification-request.schema.json</code>\u3001<code>adapter-peer-verification-result.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/peer-adapter.test.mjs</code>\u3001<code>packages/skill-family-engineering-kit/test/host.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1apeer \u7684 canonical \u9009\u62e9\u3001\u65e7 manifest \u8fc1\u79fb\u89e3\u91ca\u3001\u6d88\u8d39\u8005 smoke \u548c\u53d1\u5e03\u540e\u9a8c\u8bc1\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5408\u540c-foundationcontractshost-verification","title":"\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5408\u540c (foundation.contracts.host-verification)","text":"<p>Contracts 1.11.0 \u767b\u8bb0 <code>host-verification-request</code> \u4e0e <code>host-verification-result</code>\u3002\u4e24\u4e2a Schema \u7684 <code>$id</code>\u3001 <code>operation=host-verification</code> \u548c\u56db\u6001\u7ed3\u679c\u8eab\u4efd\u4ece\u9996\u7248\u56fa\u5b9a\uff0c\u4f46\u8be5\u80fd\u529b\u5f53\u524d\u662f <code>candidate</code>\uff0c\u4e0d\u80fd\u636e\u6b64\u5ba3\u79f0\u5bbf\u4e3b\u3001\u9886\u57df\u7ed3\u679c\u6216\u53d1\u5e03\u5df2\u901a\u8fc7\u3002</p> <ul> <li>request \u628a\u5171\u540c\u5019\u9009\u7ed1\u5b9a\u4e0e\u6bcf\u5bbf\u4e3b binding \u5206\u5f00\uff1b\u6240\u6709 <code>*Sha256</code> \u4e0e <code>*ClosureDigest</code> \u5747\u4e3a 64 \u4f4d\u5c0f\u5199\u5341\u516d\u8fdb\u5236\u3002\u8c03\u7528\u65b9\u5fc5\u987b\u4ece\u79c1\u6709 roots \u4e25\u683c\u91cd\u7b97\u8fd9\u4e9b\u503c\uff0c\u4e0d\u80fd\u628a\u81ea\u62a5\u6458\u8981\u5f53\u4f5c\u8bc1\u660e\u3002<code>auth</code> \u56fa\u5b9a\u4e3a <code>existing-user-state + host-managed</code>\uff0c\u53ea\u8bf4\u660e\u590d\u7528\u7528\u6237\u73b0\u6709 \u767b\u5f55\u72b6\u6001\uff1b<code>execution.modelOverridePolicy</code> \u56fa\u5b9a\u4e3a <code>forbidden</code>\u3002</li> <li>result \u53ea\u5141\u8bb8 <code>observed</code>\u3001<code>rejected</code>\u3001<code>failed</code>\u3001<code>indeterminate</code>\u3002\u5b83\u4e0d\u542b credential\u3001\u7edd\u5bf9\u8def\u5f84\u3001\u73af\u5883\u53d8\u91cf\u3001Prompt\u3001\u539f\u59cb stream \u6216 durable receipt\uff1b<code>observed</code> \u53ea\u8868\u793a\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u5b8c\u6574\uff0c\u4e0d\u8868\u793a\u6d88\u8d39\u8005\u9886\u57df PASS\u3002<code>requiredActions</code> \u53ea\u5141\u8bb8 <code>manual-temporary-root-inspection-required</code>\u3002</li> <li>request auth \u5fc5\u987b\u7cbe\u786e\u5bf9\u5e94\u5df2\u767b\u8bb0 Descriptor \u7684\u5355\u503c <code>driverId/authStrategy/credentialMutation</code>\uff1bDescriptor \u662f\u8ba4\u8bc1\u7ec4\u5408\u7684 \u552f\u4e00\u4e8b\u5b9e\u6e90\u3002Schema \u5206\u522b\u7ed1\u5b9a <code>kimi-code \u2192 kimi-code-print-v1</code>\u3001<code>workbuddy \u2192 workbuddy-codebuddy-print-v1</code>\u3001 <code>codebuddy \u2192 codebuddy-print-v1</code>\u3001<code>claude \u2192 claude-code-print-v1</code>\u3001<code>codex \u2192 codex-exec-v1</code> \u4e0e <code>qoder \u2192 qodercli-print-v1</code>\uff0cCodeBuddy \u4e0e WorkBuddy \u7684\u8def\u7531\u4e0d\u53ef\u4e92\u6362\u3002 Schema \u4e0d\u63d0\u4f9b\u901a\u7528 driver Registry \u6216\u8ba4\u8bc1 SPI\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.11.0</code> / <code>candidate</code>\u3002Schema \u6587\u4ef6\uff1a <code>packages/skill-family-contracts/src/schemas/host-verification-request.schema.json</code>\u3001 <code>packages/skill-family-contracts/src/schemas/host-verification-result.schema.json</code>\u3002\u6b63\u53cd\u4f8b\uff1a <code>packages/skill-family-contracts/test/schemas.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1acandidate \u89e3\u5f15\u7528\u3001workload\u3001\u9886\u57df\u8f93\u51fa\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u3001\u9886\u57df PASS/FAIL \u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1\u5408\u540c-foundationcontractsplugin-verification","title":"\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1\u5408\u540c (foundation.contracts.plugin-verification)","text":"<p>Contracts 1.15.0 \u5728\u4fdd\u7559 <code>install-only</code> \u4e0e <code>install-and-invoke</code> \u4e24\u4e2a\u65e2\u6709 goal \u7684\u540c\u65f6\uff0c\u589e\u52a0 <code>native-lifecycle</code> \u5206\u652f\u3002request \u53ea\u63cf\u8ff0\u95ed\u5408\u7684\u5bbf\u4e3b\u3001\u6765\u6e90\u3001\u8ba4\u8bc1\u3001\u8f7d\u8377\u4e0e\u5de5\u4f5c\u8d1f\u8f7d\u6458\u8981\uff0c\u4e0d\u643a\u5e26 runner\u3001parser\u3001\u9884\u5236 observation \u6216\u81ea\u7531 <code>hostState</code>\u3002</p> <p>\u539f\u751f\u547d\u5468\u671f result \u7684 <code>facts.lifecycle.stages</code> \u6070\u597d\u6309\u4ee5\u4e0b\u987a\u5e8f\u5305\u542b\u5341\u4e8c\u9879\uff1a<code>preflight</code>\u3001<code>validate-v1</code>\u3001<code>marketplace-add</code>\u3001<code>install-v1</code>\u3001<code>discover-v1</code>\u3001<code>invoke-v1</code>\u3001<code>disable</code>\u3001<code>enable</code>\u3001<code>update-v2</code>\u3001<code>invoke-v2</code>\u3001<code>uninstall</code>\u3001<code>absent-after-uninstall</code>\u3002Contracts \u53ea\u68c0\u67e5\u95ed\u5b57\u6bb5\u3001\u9636\u6bb5\u987a\u5e8f\u3001\u5c40\u90e8\u7ed3\u6784\u4e0e\u505c\u6b62\u4f20\u64ad\uff1b\u9996\u4e2a\u975e <code>observed</code> \u9636\u6bb5\u4e4b\u540e\uff0c\u540e\u7eed\u9636\u6bb5\u53ea\u80fd\u4e3a <code>not-performed</code>\uff0c\u4e14 <code>commands</code> \u4e0e <code>trees</code> \u4e3a\u7a7a\u3002</p> <p>Schema \u4e0d\u56fa\u5b9a\u8de8\u5bbf\u4e3b\u7edf\u4e00\u547d\u4ee4\u6570\u6216 argv \u8ba1\u5212\uff0c\u4e0d\u6839\u636e command step\u3001\u9000\u51fa\u7801\u3001\u81ea\u7136\u8bed\u8a00\u6216 marker \u89e3\u91ca\u5382\u5546\u8bed\u4e49\uff0c\u4e5f\u4e0d\u62e5\u6709 Qoder/WorkBuddy Oracle\u3002\u6bcf\u4e2a\u5bbf\u4e3b\u7684\u547d\u4ee4\u8ba1\u5212\u3001tree evidence \u9009\u62e9\u4e0e raw stream \u5224\u5b9a\u7531 Engineering Kit \u7684\u4e13\u5c5e driver \u8d1f\u8d23\u3002</p> <ul> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u5408\u540c\u81ea <code>0.13.0</code> / <code>candidate</code>\uff1b<code>native-lifecycle</code> \u5206\u652f\u81ea <code>0.15.0</code>\u3002</li> <li>Schema \u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/schemas/plugin-verification-request.schema.json</code>\u3001<code>plugin-verification-result.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/foundation-015-contracts.test.mjs</code>\u3001<code>schemas.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6765\u6e90\u63a5\u53d7\u3001\u9886\u57df\u7ed3\u679c\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u3001\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1\u5408\u540c-foundationcontractsskill-family-directory-verification","title":"\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1\u5408\u540c (foundation.contracts.skill-family-directory-verification)","text":"<p>Contracts 1.15.0 \u767b\u8bb0 Kimi \u4e13\u7528\u7684 skill-family-directory request/result\u3002request \u7ed1\u5b9a <code>hostId=kimi-code</code>\u3001\u56fa\u5b9a driver/CLI \u8eab\u4efd\u3001\u6280\u80fd\u65cf\u6811\u6458\u8981\u3001\u9884\u671f\u6280\u80fd\u6765\u6e90\u6458\u8981\u4e0e\u5de5\u4f5c\u8d1f\u8f7d\u6458\u8981\uff1b\u5b83\u4e0d\u63a5\u6536 caller observation\u3001runner\u3001parser \u7ed3\u8bba\u6216 plugin lifecycle \u5b57\u6bb5\u3002</p> <p>result \u4fdd\u6301\u65e2\u6709\u56db\u6001\uff0c\u9010\u6280\u80fd\u4e8b\u5b9e\u53ea\u80fd\u660e\u786e\u5199\u4e3a <code>observed</code>\u3001<code>absent</code> \u6216 <code>unknown</code>\u3002\u7f3a\u5c11\u53ef\u9a8c\u8bc1\u7684\u5b98\u65b9 typed observation \u6620\u5c04\u65f6\uff0c\u5141\u8bb8 <code>status=indeterminate</code>\u3001<code>reason=official-observation-unavailable</code>\uff0c\u9010\u6280\u80fd discovery/load \u4e3a <code>unknown</code>\uff0ccall/result id \u4e3a <code>null</code>\u3002Schema \u4e0d\u4ece raw marker \u731c\u6d4b\u5382\u5546\u8bed\u4e49\u3002</p> <p>\u8fdb\u7a0b\u542f\u52a8\u3001\u56fa\u5b9a <code>--skills-dir</code> argv\u3001\u7a84\u73af\u5883\u3001\u539f\u59cb\u6d41\u6536\u96c6\u4e0e parser \u5c5e Engineering Kit\u3002Contracts \u53ea\u9a8c\u8bc1\u95ed\u5408\u7ed3\u6784\u548c\u5c40\u90e8\u4e00\u81f4\u6027\uff0c\u4e0d\u628a Foundation \u81ea\u6709\u53d7\u63a7 fixture \u534f\u8bae\u767b\u8bb0\u6210 Kimi \u5b98\u65b9 grammar\u3002</p> <ul> <li><code>since</code> / <code>stability</code>\uff1a<code>0.15.0</code> / <code>candidate</code>\u3002</li> <li>Schema \u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/schemas/skill-family-directory-verification-request.schema.json</code>\u3001<code>skill-family-directory-verification-result.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/foundation-015-contracts.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6280\u80fd\u65cf\u6765\u6e90\u63a5\u53d7\u3001\u9886\u57df\u8f93\u51fa\u3001\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u80fd\u529b\u6210\u719f\u5ea6\u4e0e\u5386\u53f2\u8fc1\u79fb\u653f\u7b56","title":"\u80fd\u529b\u6210\u719f\u5ea6\u4e0e\u5386\u53f2\u8fc1\u79fb\u653f\u7b56","text":"<p>\u5305\u6839\u5bfc\u51fa <code>CAPABILITY_MATURITY_LEVELS</code>\u3001<code>CANDIDATE_PROMOTION_POLICY</code>\u3001 <code>HISTORICAL_CANDIDATE_MIGRATION_POLICY</code>\uff0c\u4ee5\u53ca\u4e24\u4e2a\u8fd4\u56de\u7ed3\u6784\u5316\u526f\u672c\u7684 <code>describe*Policy()</code>\u3002\u5b83\u4eec\u4e0d\u8bfb\u53d6\u6587\u4ef6\u3001\u4e0d\u5199\u72b6\u6001\uff0c \u4e5f\u4e0d\u66ff\u6d88\u8d39\u8005\u6267\u884c\u8fc1\u79fb\u3002\u653f\u7b56\u56fa\u5b9a\u5386\u53f2\u5165\u53e3\u53ea\u8fc1\u79fb\u4e00\u6b21\uff1b\u65b0\u80fd\u529b\u91c7\u7528\u89c4\u8303\u8eab\u4efd\u540e\uff0ccandidate\u2192stable \u4e0d\u518d\u6539\u53d8\u6d88\u8d39\u8005\u5408\u540c\u3002 \u6d88\u8d39\u8005\u8981\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\u4ecd\u9700\u66f4\u65b0\u4e09\u5305\u7cbe\u786e pin\uff1b\u53d7\u7ba1\u6295\u5f71\u662f\u5426\u91cd\u5efa\u6cbf\u7528\u65e2\u6709\u7ed1\u5b9a\u8f93\u5165\u5408\u540c\u3002</p> <p><code>since</code> / <code>stability</code>\uff1a<code>0.10.0</code> / <code>stable</code>\u3002\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/stability.mjs</code>\u3002\u6b63\u53cd\u4f8b\u6d4b\u8bd5\uff1a <code>packages/skill-family-contracts/test/candidate-promotion-compatibility.test.mjs</code>\u3002</p>"},{"location":"reference/api/contracts/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u89c4\u8303\u5165\u53e3 <code>skill-family-contracts/quickstart-profile</code> \u5bfc\u51fa v2 \u534f\u8bae\u3001\u6309\u89c4\u8303 <code>$id</code> \u7d22\u5f15\u7684 Resource/Task/Result Schema \u96c6\u5408\uff0c \u4ee5\u53ca <code>validateQuickstartProfileDocument</code>\u3002\u5386\u53f2\u5165\u53e3 <code>skill-family-contracts/candidate/quickstart-profile</code> \u5728\u5f03\u7528\u7a97\u53e3\u5185\u89e3\u6790\u5230 \u540c\u4e00\u6a21\u5757\uff0c\u73b0\u6709\u6d88\u8d39\u8005\u5e94\u8fc1\u79fb\u4e00\u6b21\u3002\u552f\u4e00 operation \u662f\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>execute-method</code>\uff1bFoundation \u4e0d\u767b\u8bb0 method \u8bcd\u8868\uff0c \u4e5f\u4e0d\u89e3\u91ca parameters\u3001evidence \u6216 domainResult \u7684\u9886\u57df\u542b\u4e49\u3002</p> <p>0.10.0 \u628a Quickstart \u516d\u4e2a\u5386\u53f2 Schema \u8eab\u4efd\u548c 0.9.0 \u7684\u4e24\u4e2a batch Schema \u8eab\u4efd\u4e00\u6b21\u8fc1\u79fb\u5230\u4e0d\u542b <code>/candidate/</code> \u7684\u89c4\u8303 <code>$id</code>\u3002<code>HISTORICAL_CANDIDATE_SCHEMA_ID_MIGRATIONS</code> \u56fa\u5b9a\u516b\u9879\u65e7 ID\u2192\u89c4\u8303 ID\uff1bloader \u53ea\u8fd4\u56de\u89c4\u8303 Schema\u3002Quickstart Bundle \u8ba9\u65e7\u65b0 ID \u6307\u5411\u540c\u4e00\u7f16\u8bd1 validator\uff0c\u4e0d\u590d\u5236 Schema\uff0c\u4e5f\u4e0d\u767b\u8bb0\u8fdb stable Registry\u3002\u4e24\u4e2a batch Schema \u4ecd\u53ea\u4f9b <code>validate-many-by-schema-id</code> \u4f7f\u7528\uff1b\u672a\u77e5 <code>schemaId</code> \u6216\u4efb\u4e00\u7ed3\u6784\u7578\u5f62\u90fd\u4f7f\u6574\u6279\u8bf7\u6c42\u5931\u8d25\u3002</p> <p>\u8be5\u80fd\u529b\u4ece <code>0.2.1</code> \u8d77\u516c\u5f00\uff0c\u7a33\u5b9a\u6027\u4ecd\u4e3a <code>candidate</code>\u30020.3.0 \u5df2\u7528 v2 \u66ff\u6362 v1\uff0c\u4e24\u8005\u4e0d\u517c\u5bb9\uff1a\u4ecd\u9700 v1 \u7684\u63a5\u5165\u7ee7\u7eed\u7cbe\u786e \u9501\u5b9a <code>0.2.1</code>\uff1bv2 \u65b0\u63a5\u5165\u5e94\u4f7f\u7528 0.10.0 \u89c4\u8303\u5165\u53e3\u5e76\u7cbe\u786e\u9501\u5b9a\u4e09\u5305\u3002candidate Schema \u4e0d\u8fdb\u5165\u7a33\u5b9a <code>src/registry.json</code>\u3002 \u4e3b\u52a8\u5347\u7ea7\u5019\u9009\u7248\u672c\u4ecd\u9700\u590d\u9a8c\uff1b\u4ee5\u540e\u4ec5\u664b\u5347 stable \u65f6\u4e0d\u518d\u5207\u5165\u53e3\u6216 Schema \u8eab\u4efd\u3002\u53d6\u5f97 stable \u53d1\u5e03\u627f\u8bfa\u4ecd\u9700\u66f4\u65b0\u4e09\u5305\u7cbe\u786e pin\u3002</p>"},{"location":"reference/api/contracts/#\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u5411\u91cf-Foundation-0140","title":"\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u5411\u91cf (Foundation 0.14.0)","text":"<p><code>listConsumerContractVectors({ capabilityId, foundationVersion, vectorSetId? })</code> \u8fd4\u56de\u6309 <code>vectorId</code> \u7684 Unicode \u7801\u70b9\u987a\u5e8f\u6392\u5217\u4e14\u6df1\u5ea6\u51bb\u7ed3\u7684\u516c\u5f00\u5411\u91cf\u3002<code>capabilityId</code> \u548c <code>foundationVersion</code> \u5fc5\u586b\uff1b\u672a\u627e\u5230\u5339\u914d\u5411\u91cf\u65f6\u8fd4\u56de\u7a7a\u6570\u7ec4\u3002</p> <p><code>verifyConsumerContractVector(vector, { capabilityId, foundationVersion, vectorSetId? })</code> \u53ea\u6838\u5bf9\u5411\u91cf\u8eab\u4efd\u3001\u7cbe\u786e\u7248\u672c\u548c\u516c\u5f00 request/expected \u7ed3\u6784\uff0c\u8fd4\u56de <code>{ vectorId, ok, expected, observed, mismatchCode }</code>\u3002\u8eab\u4efd\u6216\u7248\u672c\u4e0d\u5339\u914d\u65f6 <code>ok=false</code>\u3001<code>mismatchCode=SFC1013</code>\uff1b\u6821\u9a8c\u5668\u4e0d\u4f1a\u8c03\u7528\u6d88\u8d39\u65b9\u3001Harness\u3001\u6d4b\u8bd5\u66ff\u8eab\uff08<code>fake</code>\uff09\u6216\u5bbf\u4e3b\u3002</p> <p>0.14.0 \u63d0\u4f9b <code>foundation.contracts.object-validation.consumer-v1</code> \u4e0e <code>foundation.harness.atomic-write.consumer-v1</code> \u4e24\u7ec4\u5411\u91cf\u3002\u5411\u91cf\u58f0\u660e\u7684\u662f\u5408\u540c\u53ef\u89c2\u5bdf\u7ed3\u679c\uff1b \u539f\u5b50\u5199\u6b63\u4f8b\u7684 <code>valueRelation</code> \u7531 Harness \u4e0e\u6d88\u8d39\u65b9\u6d4b\u8bd5\u9a8c\u8bc1\uff0cContracts \u4e0d\u89e3\u91ca\u8be5\u5173\u7cfb\u3002</p>"},{"location":"reference/api/contracts/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID \u89c1 <code>docs/agents/capability-catalog.json</code>\uff08<code>foundation.contracts.*</code>\uff09\u3002</li> <li>\u673a\u68b0\u6821\u9a8c\uff1a<code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code>\uff0c\u62d2\u7edd\u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\uff1b<code>sourceRefs</code> \u4e0e\u6d4b\u8bd5\u5f15\u7528\u5747\u6307\u5411\u672c\u9875\u6240\u5217\u771f\u5b9e\u6587\u4ef6\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/","title":"skill-family-engineering-kit \u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u9875\u4ece\u771f\u5b9e\u5bfc\u51fa\uff08<code>src/index.mjs</code> \u4e0e\u5404\u6e90\u6a21\u5757\u3001CLI \u5165\u53e3\uff09\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684\u5168\u96c6\u3002\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 hand-off \u00a74.3 \u8bf4\u660e\uff1a\u7b7e\u540d\u3001\u8f93\u5165\u4e0e\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p> <p>Kit \u6d88\u8d39 Contracts \u4e0e Harness\uff0c\u53ea\u62e5\u6709\u56db\u4e2a\u9876\u5c42\u547d\u4ee4\u4e0e\u5b83\u4eec\u7684\u53ea\u8bfb/\u53d7\u63a7\u5199\u8fb9\u754c\u3002\u5305\u7ea7\u5e38\u91cf\uff1a<code>TOP_LEVEL_COMMANDS</code>\uff08\u51bb\u7ed3 4 \u4e2a\uff1a<code>scaffold</code> / <code>adopt-plan</code> / <code>projection</code> / <code>check</code>\uff09\u3001<code>FORBIDDEN_SIDE_EFFECTS</code>\u3001<code>COMMAND_SIDE_EFFECTS</code>\u3001<code>KIT_EXIT_CODES</code>\uff08<code>ok=0</code> / <code>findings=1</code> / <code>rejected=2</code>\uff09\u3002Kit \u6c38\u4e0d\u6267\u884c Git \u5199\u3001\u53d1\u5e03\u6216\u5220\u9664\u7528\u6237\u5185\u5bb9\u3002</p> <p>Foundation \u672c\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51\u3002Foundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff1b\u9694\u79bb\u8d23\u4efb\u7531\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u627f\u62c5\u3002\u4ed3\u5185\u53d7\u63a7 fixture \u6309\u8bbe\u8ba1\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\u3002</p> <p>\u5916\u7f6e source authority \u4e0d\u589e\u52a0 Kit API\u3002\u8c03\u7528\u65b9\u5148\u7528 Contracts <code>parseSourceAuthorityReceipt(receipt, actualSubjects)</code> \u6838\u5bf9\u6536\u636e\uff0c\u518d\u628a\u6210\u529f\u7ed3\u679c\u4e2d\u7684 <code>sourceRepository</code> \u4e0e <code>sourceBaseCommit</code> \u4f20\u7ed9\u65e2\u6709 Quickstart builder\u3002Kit \u4e0d\u8bfb\u53d6\u79c1\u6709\u53d1\u5e03 plan\uff0c\u4e0d\u53d1\u73b0\u5b9e\u9645\u5305\uff0c\u4e5f\u4e0d\u7b7e\u53d1 receipt\u3002</p> <p>provider Profile descriptor \u4f7f\u7528 Contracts 1.16.0 \u65f6\uff0c\u987b\u628a\u81ea\u8eab\u7684 <code>base.contractsVersion</code> \u5b57\u6bb5\u66f4\u65b0\u4e3a <code>1.16.0</code>\u3002 Kit \u4ecd\u53ea\u6709\u56db\u4e2a\u9876\u5c42\u547d\u4ee4\uff1bQuickstart Bundle \u7ee7\u7eed\u662f candidate \u7cbe\u786e\u7248\u672c\uff0c\u5e76\u5728\u540c\u4e00 mechanisms CLI \u4e2d\u63d0\u4f9b\u6709\u5e8f <code>validate-many-by-schema-id</code>\u3002</p> <p>\u80fd\u529b\u5206\u7ec4\uff08\u4e0e <code>docs/agents/capability-catalog.json</code> \u5bf9\u5e94\uff09\uff1a</p> <ul> <li>scaffold \u2192 <code>scaffoldTarget</code> / <code>describeSkeletonReferenceImplementation</code></li> <li>adopt-plan \u2192 <code>planAdoption</code> / <code>evaluateMigrationCompletion</code> / \u6309\u9700\u542f\u7528\u7684\u5de5\u7a0b\u57fa\u7ebf\u7ed3\u6784\u6bd4\u8f83</li> <li>projection \u2192 <code>buildProjectionClosure</code> / <code>runProjection</code> / <code>loadProjectionManifest</code></li> <li>check \u2192 <code>runChecks</code> / <code>runCoreCheck</code></li> <li>report \u2192 <code>renderReportAction</code> / <code>checkReportAction</code></li> <li>git-probe \u2192 <code>probeGitState</code> / <code>probeGitFacts</code></li> <li>host \u2192 <code>describeHost</code> / <code>resolveHostId</code> / <code>probeHost</code> / <code>planHost</code> / <code>applyHostPlan</code> \u2026</li> <li>\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1 \u2192 <code>runPluginVerification</code></li> <li>\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1 \u2192 <code>runSkillFamilyDirectoryVerification</code></li> <li>\u663e\u5f0f\u8d44\u683c\u5165\u53e3 \u2192 <code>runQualification</code></li> <li>licensing \u2192 <code>loadLicensingProfile</code> / <code>generateLicenseContent</code> \u2026</li> <li>identity-check \u2192 <code>checkIdentityDrift</code> / <code>validateIdentityAgainstProfile</code></li> <li>CLI \u2192 <code>runCommand</code> / <code>cliMain</code></li> </ul>"},{"location":"reference/api/engineering-kit/#scaffold-foundationkitscaffold","title":"scaffold (foundation.kit.scaffold)","text":""},{"location":"reference/api/engineering-kit/#scaffoldTarget--describeSkeletonFiles--describeSkeletonReferenceImplementation--normalizeSkeletonInputs","title":"scaffoldTarget / describeSkeletonFiles / describeSkeletonReferenceImplementation / normalizeSkeletonInputs","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>scaffoldTarget({ root, projectId, projectName, profileId, licensingProfile, licensingVariant, licensingProfileData, profilesRoot, identityProjections, capabilities } = {})</code>\uff08async\uff09</li> <li><code>describeSkeletonFiles(inputs)</code>\uff08async\uff09</li> <li><code>describeSkeletonReferenceImplementation({ profile })</code>\uff08async\uff09</li> <li><code>normalizeSkeletonInputs({ projectId, projectName, profileId, licensingProfile, licensingVariant, rootBasename })</code></li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3001\u9aa8\u67b6\u9009\u9879\uff08<code>projectId</code> \u7b49\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u7cbe\u786e\u96c6\u5408\u7684\u6258\u7ba1\u9aa8\u67b6\u6587\u4ef6\uff08\u539f\u5b50 + \u8def\u5f84\u6536\u5bb9\uff09\u3002<code>scaffoldTarget()</code> \u7684\u7ed3\u679c\u53e6\u542b <code>referenceImplementation</code>\uff0c\u5b57\u6bb5\u56fa\u5b9a\u4e3a\u5f53\u524d <code>foundationVersion</code>\u3001\u6240\u9009 <code>profile</code> \u4e0e\u7531\u89c4\u8303\u6587\u4ef6\u6e05\u5355\u8ba1\u7b97\u7684 <code>skeletonDigest</code>\u3002\u8be5\u8eab\u4efd\u7528\u4e8e\u6bd4\u8f83\uff0c\u4e0d\u8868\u793a Audit \u5408\u89c4\uff0c\u4e5f\u4e0d\u8981\u6c42\u5b58\u91cf\u9879\u76ee\u9010\u5b57\u8282\u590d\u5236\u53c2\u8003\u9aa8\u67b6\u3002\u9aa8\u67b6\u542b\u4e24\u4e2a\u76ee\u6807\u4fa7\u624b\u5199\u79cd\u5b50\uff08<code>handwritten</code> \u7c7b\uff0cadopt \u6c38\u4e0d\u8986\u5199\uff09\uff1a<code>SOURCE-OF-TRUTH.md</code>\uff08\u552f\u4e00\u58f0\u660e\u70b9\u3001\u771f\u6e90\u6e05\u5355\u4e0e\u751f\u6210\u8c31\u7cfb\u3001\u8fd0\u884c\u4e0e\u8bc1\u636e\u76ee\u5f55\u7ea6\u5b9a\uff09\u4e0e <code>profile.json</code>\uff08<code>foundation_profile</code> / <code>foundation_pin</code> \u91c7\u7528\u5b57\u6bb5\u52a0\u53ea\u6536\u7d27\u65b9\u5411\u7684 overrides \u793a\u4f8b\uff09\uff1b<code>.gitignore</code> / <code>.projenrc.js</code> / file-registry \u4e09\u5904\u540c\u6b65\u643a\u5e26\u6839\u7ea7\u552f\u4e00\u5ffd\u7565\u57fa\u7ebf <code>/site/</code>\u3001<code>/.qoder/</code>\u3001<code>/.artifacts/</code>\u3001<code>/.runs/</code>\u3001<code>/.evidence/</code>\uff08\u5d4c\u5957\u540c\u540d\u76ee\u5f55\u4e0d\u88ab\u5ffd\u7565\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>normalizeSkeletonInputs</code> \u662f\uff1b<code>describeSkeletonReferenceImplementation</code> \u53ea\u8bfb\u53d6\u5305\u5185\u8bb8\u53ef\u8bc1 Profile \u5e76\u786e\u5b9a\u6027\u8ba1\u7b97\u8eab\u4efd\uff1b<code>scaffoldTarget</code> \u843d\u76d8\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u76ee\u6807\u521b\u5efa\u6587\u4ef6\uff08\u539f\u5b50 + \u6536\u5bb9\uff09\uff1b\u76ee\u6807\u975e\u7a7a\u5219\u62d2\u7edd\u3001\u4e0d\u8986\u76d6\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u6cd5 kebab <code>projectId</code> / \u975e\u7a7a\u76ee\u6807\u629b <code>KitError</code>\uff08<code>KIT_ERROR_KINDS</code> \u7684 <code>invalid-params</code> / <code>rejected</code>\uff09\uff1b\u975e\u6cd5\u53c2\u6570 <code>+ INVALID_PARAMS</code>\uff08<code>SFC2003</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u76ee\u6807\u4e3a\u53ef\u5199\u7a7a\u76ee\u5f55\uff1bNode &gt;= 22.22.2\uff1b\u9aa8\u67b6\u96c6\u5408\u4e0e <code>scaffold-conformance</code> fixture \u4e00\u81f4\uff0833 \u4e2a\u8ba1\u5212\u6587\u4ef6\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u9aa8\u67b6\u5165\u53e3\u81ea <code>0.2.0</code> / <code>stable</code>\uff1b<code>describeSkeletonReferenceImplementation</code> \u4e0e scaffold \u7ed3\u679c\u4e2d\u7684\u53c2\u8003\u8eab\u4efd\u81ea <code>0.17.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/scaffold.mjs</code>\u3001<code>skeleton.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/scaffold.test.mjs</code>\u3001<code>skeleton-contract.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e1a\u52a1\u9879\u76ee\u5185\u5bb9\uff08\u5b58\u91cf\u4ed3\u6539\u7528 <code>adopt-plan</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#adopt-plan-foundationkitadopt-plan","title":"adopt-plan (foundation.kit.adopt-plan)","text":""},{"location":"reference/api/engineering-kit/#planAdoption--buildProfileDraft--evaluateMigrationCompletion--validateException--assessLegacyExitList--findNestedRepositories","title":"planAdoption / buildProfileDraft / evaluateMigrationCompletion / validateException / assessLegacyExitList / findNestedRepositories","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>planAdoption({ root, manifest, engineeringBaseline, compareSkeleton, ... } = {})</code>\uff08async\uff09</li> <li><code>buildProfileDraft({ inputs, migrationManifest, writeSet, entries })</code></li> <li><code>evaluateMigrationCompletion({ ... })</code></li> <li><code>validateException(exception, index, nowMs)</code></li> <li><code>assessLegacyExitList(root, legacyItems)</code>\uff08async\uff09</li> <li><code>findNestedRepositories(entries)</code></li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3001\u8fc1\u79fb\u6e05\u5355\u8def\u5f84\u3002\u5de5\u7a0b\u57fa\u7ebf\u6bd4\u8f83\u662f\u6309\u9700\u529f\u80fd\uff1b\u5e93\u8c03\u7528\u5fc5\u987b\u540c\u65f6\u4f20\u5165\u5df2\u9a8c\u8bc1\u7684 <code>engineeringBaseline</code> \u4e0e <code>compareSkeleton: true</code>\uff0cCLI \u5fc5\u987b\u6210\u5bf9\u4f7f\u7528 <code>--engineering-baseline &lt;relative-json-path&gt;</code> \u4e0e <code>--compare-skeleton</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u9ed8\u8ba4\u4ecd\u8fd4\u56de\u91c7\u7528\u5206\u7c7b\uff08<code>direct-adoption</code> / <code>compatibility-layer</code> / <code>keep-business</code> / <code>foundation-gap</code>\uff09\u3001\u5b8c\u6210\u5224\u5b9a\u3001profile \u8349\u7a3f\uff08kind=<code>skill-family.profile-draft</code>\uff1a\u9884\u586b D-8 \u6700\u5c0f\u91c7\u7528\u58f0\u660e + \u7a7a overrides \u793a\u4f8b\uff0c\u4ec5\u8f93\u51fa\uff0c\u4e0d\u843d\u76d8\uff1badoption-lock \u5f62\u6001\u5df2\u5e9f\u5f03\uff09\u3002\u663e\u5f0f\u542f\u7528\u6bd4\u8f83\u65f6\u624d\u589e\u52a0 <code>engineeringBaselineComparison</code>\uff1a\u5b83\u5305\u542b\u57fa\u7ebf\u8eab\u4efd\u3001Foundation \u53c2\u8003\u8eab\u4efd\uff0c\u4ee5\u53ca\u53c2\u8003\u4fa7\u72ec\u6709\u3001\u76ee\u6807\u4fa7\u72ec\u6709\u3001\u6761\u76ee\u7c7b\u578b\u548c\u6587\u4ef6\u7c7b\u522b\u56db\u7c7b\u7ed3\u6784\u5dee\u5f02\uff1b\u4e0d\u8f93\u51fa\u5408\u89c4\u3001\u7b49\u4ef7\u3001\u4e25\u91cd\u7a0b\u5ea6\u3001finding\u3001action\u3001waiver \u6216 exemption \u7ed3\u8bba\uff0c\u4e5f\u4e0d\u8fd4\u56de\u89c4\u5219\u6b63\u6587\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5206\u7c7b\u4e0e\u8bc4\u4f30\u51fd\u6570\u4e3a\u7eaf\u51fd\u6570\uff1b<code>planAdoption</code> \u542b\u53ea\u8bfb\u63a2\u6d4b\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u4e25\u683c\u53ea\u8bfb\u2014\u2014\u4e0d\u5199\u6587\u4ef6\uff08\u4e34\u65f6\u6587\u4ef6\u4e5f\u4e0d\u5199\uff09\u3001\u4e0d Git \u5199\u3001\u4e0d rename\u3001\u4e0d\u89e6\u7f51\uff1b\u9ed8\u8ba4\u53ef\u80fd\u542f\u52a8\u4e00\u6761\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb Git \u63a2\u6d4b\uff0c\u4f20\u5165 <code>allowGitSpawn: false</code> \u53ef\u5173\u95ed\u8be5\u5b50\u8fdb\u7a0b\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u4f8b\u5916\u7f3a\u5b57\u6bb5 / \u672a\u9000\u51fa\u65e7\u5b9e\u73b0\u5219\u5b8c\u6210\u5224\u5b9a <code>false</code>\uff1b\u65e0\u6548\u6216\u672a\u6210\u5bf9\u7684\u6bd4\u8f83\u53c2\u6570\u4f7f\u7528 <code>SFC2003</code>\uff0c\u65e0\u6548\u57fa\u7ebf\u5408\u540c\u4f7f\u7528 <code>SFC1001</code>\uff0c\u57fa\u7ebf\u4e2d\u7684 Foundation \u7248\u672c\u6216\u53c2\u8003\u9aa8\u67b6\u6458\u8981\u4e0e\u5f53\u524d Kit \u4e0d\u4e00\u81f4\u65f6\u4f7f\u7528 <code>SFC1013</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u76ee\u6807\u4ed3\u5b58\u5728\u4e14\u53ef\u53ea\u8bfb\u8bbf\u95ee\uff1b<code>MIGRATION_MANIFEST_PATH</code> / <code>MIGRATION_MANIFEST_SCHEMA_ID</code> \u6307\u5411\u5951\u7ea6\u3002\u6bd4\u8f83\u524d\u7531 Contracts \u9a8c\u8bc1\u57fa\u7ebf\uff0cKit \u53ea\u63a5\u53d7\u7ed1\u5b9a\u5f53\u524d Foundation \u7248\u672c\u4e0e\u53c2\u8003\u9aa8\u67b6\u6458\u8981\u7684\u6587\u6863\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u91c7\u7528\u89c4\u5212\u81ea <code>0.2.0</code> / <code>stable</code>\uff1b\u5de5\u7a0b\u57fa\u7ebf\u7ed3\u6784\u6bd4\u8f83\u81ea <code>0.17.0</code> / <code>stable</code>\uff0c\u9ed8\u8ba4\u5173\u95ed\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/adopt-plan.mjs</code>\u3001<code>migration.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/adopt-plan.test.mjs</code>\u3001<code>migration.test.mjs</code>\u3001<code>engineering-baseline-adopt-plan.test.mjs</code>\u3001<code>cli.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5b58\u91cf\u4e1a\u52a1\u4ee3\u7801\u7684\u8fc1\u79fb\u51b3\u7b56\uff08\u771f\u6b63\u8fc1\u79fb\u6267\u884c\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#projection-foundationkitprojection","title":"projection (foundation.kit.projection)","text":""},{"location":"reference/api/engineering-kit/#runProjection--loadProjectionManifest","title":"runProjection / loadProjectionManifest","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runProjection({ root, manifest: manifestRelPath } = {})</code>\uff08async\uff09</li> <li><code>loadProjectionManifest(rootAbs, manifestRelPath)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u6295\u5f71\u6e05\u5355\u3001\u76ee\u6807\u6839\u3002</li> <li>\u8f93\u51fa\uff1a\u6295\u5f71\u6587\u4ef6\uff08\u4ec5\u5728\u6821\u9a8c\u5168\u90e8\u901a\u8fc7\u65f6\u5199\u5165\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>loadProjectionManifest</code> \u662f\uff1b<code>runProjection</code> \u4e24\u9636\u6bb5\uff08\u5168\u6821\u9a8c\u540e\u624d\u5199\uff0c\u5931\u8d25\u56de\u6eda\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u6295\u5f71\u6587\u4ef6\uff1b\u4e0d\u8986\u76d6 handwritten \u6587\u4ef6\uff1b\u4efb\u4e00\u6821\u9a8c\u5931\u8d25\u96f6\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u672a\u6388\u6743 / \u624b\u5199\u51b2\u7a81 / \u8d8a\u754c / \u5185\u5bb9\u51b2\u7a81\u629b <code>KitError</code>\uff08<code>rejected</code> / <code>unauthorized</code> \u7c7b <code>kind</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u6295\u5f71\u6e05\u5355\u5df2\u767b\u8bb0\uff08<code>PROJECTION_MANIFEST_PATH</code>\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/projection.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/projection.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6295\u5f71\u5185\u5bb9\u7684\u4e1a\u52a1\u542b\u4e49\uff08\u8fdc\u7aef\u53d1\u5e03\u8f6c <code>release-skill</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#buildProjectionClosure","title":"buildProjectionClosure","text":"<ul> <li>\u7b7e\u540d\uff1a<code>buildProjectionClosure(resources)</code></li> <li>\u8f93\u5165\uff1a\u8d44\u6e90\u6570\u7ec4\uff0c\u6210\u5458\u4e3a <code>{path, sha256, mode}</code>\uff08\u663e\u5f0f <code>type: \"file\"</code> \u88ab\u5bb9\u5fcd\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u89c4\u8303\u6295\u5f71\u95ed\u5305 <code>{digestAlgorithm: \"sha256\", digest, resourceCount, resources}</code>\uff08\u6210\u5458\u89c4\u8303\u5316\u4e3a <code>{path, type: \"file\", sha256, mode}</code>\uff0c\u6309 path \u786e\u5b9a\u6027\u6392\u5e8f\uff0c<code>digest = sha256(JSON.stringify(resources))</code>\uff09\uff0c\u53ef\u539f\u6837\u4f5c\u4e3a <code>compileProjectionPlan()</code> \u7684 <code>previousOwnedClosure</code> \u6216 <code>externalCandidateClosure</code>\uff1b\u7a7a\u6570\u7ec4\u662f\u5408\u6cd5\u7a7a\u95ed\u5305\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u65e0\u6587\u4ef6\u8bfb\u5199\u3001\u65e0\u7f51\u7edc\u3001\u65e0\u5b50\u8fdb\u7a0b\uff1b\u5165\u53c2\u4e0d\u88ab\u6539\u5199\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u6570\u7ec4\u8f93\u5165\u3001\u91cd\u590d\u8def\u5f84\u3001\u53ef\u79fb\u690d\u8def\u5f84\u78b0\u649e\u3001\u975e\u6cd5 path/type/sha256/mode \u5728\u65e2\u6709 <code>projection plan input invalid</code> \u9519\u8bef\u57df\u5185\u5931\u8d25\u5173\u95ed\uff08<code>SFC2004</code>\uff0c<code>details.kind</code> \u4e3a <code>invalid-manifest</code>\uff09\u3002</li> <li>\u8fb9\u754c\uff1a\u672c\u51fd\u6570\u6784\u9020\u7684\u662f\u6295\u5f71/\u8ba1\u5212\u95ed\u5305\uff0c\u4e0e Harness <code>computeResourceClosure()</code> \u7684\u8d44\u6e90\u95ed\u5305\uff08\u6210\u5458 <code>{path, role, exists, sha256}</code>\u3001\u6574\u4f53\u4fe1\u5c01\u6458\u8981\uff09\u5f62\u72b6\u4e0e\u7528\u9014\u4e0d\u540c\uff0c\u4e24\u8005\u4e0d\u53ef\u4e92\u6362\uff1b\u4e0e <code>normalizePlanClosure()</code>\u3001\u5019\u9009\u679a\u4e3e\u95ed\u5305\u5171\u4eab\u540c\u4e00\u89c4\u8303\u5316\u4e0e\u6458\u8981\u4e8b\u5b9e\u6e90\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u65e0\uff1b\u7ed3\u679c\u76f4\u63a5\u6ee1\u8db3 <code>compileProjectionPlan()</code> \u7684\u95ed\u5305\u5408\u540c\uff0c\u4e0d\u65b0\u589e\u7b2c\u4e8c\u4e2a\u7f16\u8bd1\u5165\u53e3\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.7.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/projection.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/projection-closure-builder.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6295\u5f71\u5185\u5bb9\u7684\u4e1a\u52a1\u542b\u4e49\u4e0e\u8d44\u6e90\u5b57\u8282\u7684\u6765\u6e90\u8bc1\u660e\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#check-foundationkitcheck","title":"check (foundation.kit.check)","text":""},{"location":"reference/api/engineering-kit/#runChecks--runCoreCheck--isContainedDeclaration","title":"runChecks / runCoreCheck / isContainedDeclaration","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runChecks({ root, allowGitSpawn = true, only, profilesRoot } = {})</code>\uff08async\uff09</li> <li><code>runCoreCheck({ root, allowGitSpawn = true, profilesRoot } = {})</code>\uff08async\uff09</li> <li><code>isContainedDeclaration(rel)</code></li> <li>\u8f93\u5165\uff1a<code>--only</code> \u53d6\u503c <code>contracts|drift|closure|version|docs|git|identity|boundary|platform</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u53d1\u73b0\u6e05\u5355\uff1b\u9000\u51fa\u7801 <code>findings=1</code>\uff08\u6709\u53d1\u73b0\uff09\u3001<code>mechanism=2</code>\uff08\u67d0\u7c7b\u68c0\u67e5\u65e0\u6cd5\u5b8c\u6210\uff09\u3001<code>ok=0</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\u4e0e\u53ea\u8bfb Git \u72b6\u6001\uff09\uff1b\u4f46\u53ea\u8bca\u65ad\u3001\u4e0d\u4fee\u590d\u3001\u4e0d\u5199\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u5199\u5165\uff1b\u9ed8\u8ba4\u53ef\u80fd\u542f\u52a8\u4e00\u6761\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb Git \u63a2\u6d4b\uff08\u81f3\u591a\u4e00\u6b21\u51bb\u7ed3 <code>status</code> \u67e5\u8be2\uff09\uff0c\u4f20\u5165 <code>allowGitSpawn: false</code> \u53ef\u5173\u95ed\u8be5\u5b50\u8fdb\u7a0b\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>CHECK_CLASSES</code> \u4e3a\u4e5d\u7c7b\u95ed\u96c6\uff0c\u4e0d\u6269\u5f20\uff08\u5ba1\u8ba1\u6574\u6539 C2 \u4f9d\u88c1\u51b3 SG-13/14\u3001SG-17\u3001SFA-PLAT-002 \u589e\u8bbe <code>boundary</code>\u3001<code>platform</code> \u4e24\u7c7b\uff0c\u5e76\u4e3a <code>version</code> \u7c7b\u52a0\u88c5\u7248\u672c\u5355\u6e90\u4e00\u81f4\u6027\u4e8b\u5b9e\uff1b\u6269\u7c7b\u7ecf\u6cbb\u7406\u6279\u51c6\uff0c\u6b64\u540e\u4ecd\u4e0d\u6269\u5f20\uff09\uff1b\u673a\u5236\u5931\u8d25\u629b <code>KitError</code>\uff08<code>mechanism</code> \u7c7b\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>GIT_READ_ONLY_ALLOWLIST</code> \u9650\u5b9a\u53ef\u8c03\u7528\u5b50\u547d\u4ee4\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/check.mjs</code>\u3001<code>core-check.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/check.test.mjs</code>\u3001<code>core-check.test.mjs</code>\u3001<code>check-equivalence.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u53d1\u73b0\u9879\u7684\u4e1a\u52a1\u5904\u7f6e\uff08\u81ea\u52a8\u4fee\u590d\u6267\u884c\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#report-foundationkitreport","title":"report (foundation.kit.report)","text":""},{"location":"reference/api/engineering-kit/#renderReportAction--checkReportAction","title":"renderReportAction / checkReportAction","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>renderReportAction(options = {})</code>\uff08async\uff09</li> <li><code>checkReportAction(options = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a<code>report-model</code>\u3001<code>--out</code> / <code>--binding</code> \u9009\u9879\u3002</li> <li>\u8f93\u51fa\uff1aMarkdown \u6587\u672c\uff1b\u663e\u5f0f <code>--out</code> / <code>--binding</code> \u624d\u843d\u76d8\uff0c\u5426\u5219\u53ea\u5199 stdout\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u9ed8\u8ba4\u53ea\u5199 stdout\uff1b\u663e\u5f0f\u9009\u9879\u624d\u5199\u53d7\u6536\u5bb9\u6587\u4ef6\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u9ed8\u8ba4\u65e0\u6587\u4ef6\u5199\u5165\uff1b\u663e\u5f0f <code>--out</code> / <code>--binding</code> \u624d\u5199\u53d7\u6536\u5bb9\u6587\u4ef6\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u786c\u5931\u8d25\u8ba1\u4e3a\u53d1\u73b0\uff1b\u975e\u6cd5\u53c2\u6570 <code>reject</code>\uff08<code>invalid-params</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5df2\u5b58\u5728 Harness <code>report-model</code>\uff1b\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/report.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/report.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u62a5\u544a\u7ed3\u8bba\u89e3\u8bfb\uff08\u673a\u5236\u5728 Harness <code>report</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#git-probe-foundationkitgit-probe","title":"git-probe (foundation.kit.git-probe)","text":""},{"location":"reference/api/engineering-kit/#probeGitState--probeGitFacts","title":"probeGitState / probeGitFacts","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>probeGitState(root, { allowSpawn = true } = {})</code>\uff08async\uff09</li> <li><code>probeGitFacts(root, candidatePaths, { allowSpawn = true } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3002</li> <li>\u8f93\u51fa\uff1aGit \u72b6\u6001\u4e0e\u4e8b\u5b9e\uff08\u53ea\u8bfb\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8c03\u7528 <code>git</code> \u53ea\u8bfb\u5b50\u547d\u4ee4\uff09\uff1b\u4e0d\u542b\u4efb\u4f55\u5199\u64cd\u4f5c\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u8c03\u7528 <code>git status</code> / <code>ls-files</code> / <code>check-ignore</code>\uff1b\u9ed8\u8ba4\u5141\u8bb8\u542f\u52a8\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb\u5b50\u8fdb\u7a0b\uff0c<code>allowSpawn: false</code> \u53ef\u5173\u95ed\uff1b\u53c2\u6570\u5411\u91cf\u51bb\u7ed3\u4e8e <code>GIT_STATUS_ARGS</code> / <code>GIT_LS_FILES_ARGS</code> / <code>GIT_CHECK_IGNORE_ARGS</code>\uff0c\u4e0d\u5728\u767d\u540d\u5355\u5373\u62d2\u7edd\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u767d\u540d\u5355\u53c2\u6570\u5411\u91cf\u629b <code>KitError</code>\uff08<code>unauthorized-git</code> \u7c7b\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>GIT_READ_ONLY_ALLOWLIST</code> \u9650\u5b9a\u53ef\u8c03\u7528\u5b50\u547d\u4ee4\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/gitprobe.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/git-probe.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1aGit \u5199\u64cd\u4f5c\u6388\u6743\uff08Git \u5199\u5f52 Git \u751f\u547d\u5468\u671f\u6307\u5357\uff0cFoundation \u4e0d\u62e5\u6709\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#host-foundationkithost","title":"host (foundation.kit.host)","text":""},{"location":"reference/api/engineering-kit/#bundledHostProfilesRoot--describeHost--resolveHostId--loadHostRegistry--probeHost--buildHostAdapter--verifyHostPeers--runHostVerification--verifyHostVerificationBindings--materializeHostBuild--planHost--assertPlanConsistency--applyHostPlan--probeTrustedVersionDriver","title":"bundledHostProfilesRoot / describeHost / resolveHostId / loadHostRegistry / probeHost / buildHostAdapter / verifyHostPeers / runHostVerification / verifyHostVerificationBindings / materializeHostBuild / planHost / assertPlanConsistency / applyHostPlan / probeTrustedVersionDriver","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff1b<code>bundledHostProfilesRoot</code> \u4e0e <code>assertPlanConsistency</code> \u4e3a\u540c\u6b65\u51fd\u6570\uff0c\u5176\u4f59\u5165\u53e3\u6309\u4e0b\u5217 async \u5408\u540c\u6267\u884c\uff09\uff1a</li> <li><code>bundledHostProfilesRoot()</code>\uff1a\u8fd4\u56de Engineering Kit \u5b89\u88c5\u5305\u5185\u5bbf\u4e3b Profile \u95ed\u5305\u7684\u89c4\u8303\u7edd\u5bf9\u8def\u5f84\u3002</li> <li><code>describeHost({ hostId, hostsRoot, registry } = {})</code></li> <li><code>resolveHostId({ hostId, hostsRoot, registry } = {})</code>\uff08async\uff09\uff1a\u8bfb\u53d6\u5df2\u767b\u8bb0\u7684\u6709\u9650 Profile \u96c6\u5408\uff0c\u89e3\u6790 canonical <code>hostId</code> \u4e0e <code>sourceAliases</code>\uff1b\u4e0d\u8bfb\u53d6\u6216\u5199\u5165\u5168\u5c40\u522b\u540d\u8868\u3002</li> <li><code>loadHostRegistry({ hostsRoot, registry } = {})</code></li> <li><code>probeHost({ hostId, hostsRoot, registry, executable, allowSpawn = false, timeoutMs = 5000, runner } = {})</code></li> <li><code>buildHostAdapter({ hostId, pathCategoryId, input, hostsRoot, registry } = {})</code></li> <li><code>verifyHostPeers({ request, peerRoots, hostsRoot, registry } = {})</code>\uff08async\uff09\uff1a<code>hostsRoot</code> \u4e3a\u5fc5\u9700\u7684 Profile \u8bc1\u660e\u6839\uff0c<code>registry</code> \u53ef\u9009\uff1bnpm \u6d88\u8d39\u8005\u53ef\u4ee5\u663e\u5f0f\u4f20 <code>bundledHostProfilesRoot()</code>\uff0c\u8584\u5305\u88c5 Harness \u7684\u540c\u7ea7\u9002\u914d\u5668\u53ea\u8bfb\u9a8c\u8bc1\uff0c\u4e0d\u5199\u5165\u76ee\u5f55\u3002</li> <li><code>runHostVerification({ request, bindings, hostsRoot } = {})</code>\uff08async\uff09\uff1a\u6309\u5df2\u767b\u8bb0\u7684\u5c01\u95ed\u5185\u7f6e driver \u8868\uff08<code>kimi-code-print-v1</code>\u3001<code>workbuddy-codebuddy-print-v1</code>\u3001<code>codebuddy-print-v1</code>\u3001<code>claude-code-print-v1</code>\u3001<code>codex-exec-v1</code>\u3001<code>qodercli-print-v1</code>\uff0c\u5747\u7ed1\u5b9a <code>existing-user-state + host-managed</code>\uff09\u6267\u884c\u4e00\u6b21\u53d7\u7ea6\u675f\u8c03\u7528\u3002\u8bf7\u6c42\u3001\u5019\u9009\u3001fixture\u3001workspace\u3001\u73b0\u6709\u7528\u6237\u72b6\u6001\u6839\u548c\u4e34\u65f6\u6839\u5747\u7531\u8c03\u7528\u65b9\u7ed1\u5b9a\uff1b\u516c\u5171\u7ed3\u679c\u53ea\u8fd4\u56de\u8131\u654f\u7684\u9010\u5bbf\u4e3b\u4e8b\u5b9e\u3002</li> <li><code>verifyHostVerificationBindings({ results, expectedCommon, expectedRequestDigestByHost } = {})</code>\uff1a\u53ea\u7ec4\u5408\u5df2\u9a8c\u8bc1\u7684 <code>observed</code> \u7ed3\u679c\uff0c\u8981\u6c42\u5171\u540c\u5b57\u6bb5\u548c\u9010\u5bbf\u4e3b request digest \u7cbe\u786e\u5339\u914d\uff1b\u4e0d\u540c\u5bbf\u4e3b\u7684 driver\u3001\u5b89\u88c5\u3001Prompt \u548c\u53ef\u6267\u884c\u6587\u4ef6\u4e8b\u5b9e\u4fdd\u6301\u72ec\u7acb\u3002</li> <li><code>materializeHostBuild(options)</code></li> <li><code>planHost({ hostId, pathCategoryId, buildManifest, probeFacts, operation = \"install\", previousMembers = [], hostsRoot, registry } = {})</code></li> <li><code>assertPlanConsistency(planInput)</code></li> <li><code>applyHostPlan({ plan, build, targetRoot, authorizationRef } = {})</code>\uff1a\u590d\u7528 Harness \u7684\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6\u3001\u4e25\u683c\u4e0d\u66ff\u6362\u53d1\u5e03\u548c\u539f\u5b50\u66ff\u6362\uff1b\u5378\u8f7d\u59cb\u7ec8\u8fd4\u56de <code>manual-recovery-required</code>\uff0c\u4e0d\u5220\u9664\u6587\u4ef6\u3002</li> <li><code>probeTrustedVersionDriver({ hostId, driverId, capabilities = CAPABILITIES, executable, allowSpawn = false, timeoutMs = 5000, runner } = {})</code></li> <li>\u8f93\u5165\uff1a\u5bbf\u4e3b\u6807\u8bc6\u3001\u6709\u9650 Profile\u3001probe/plan \u9009\u9879\uff1b\u66f4\u65b0\u548c\u5378\u8f7d\u8ba1\u5212\u5fc5\u987b\u643a\u5e26\u5df2\u62e5\u6709\u6210\u5458\u7684\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u5bbf\u4e3b\u63cf\u8ff0\u3001canonical \u8eab\u4efd\u3001\u9010\u9879\u72ec\u7acb\u7684\u4e5d\u7c7b probe fact\u3001\u6784\u5efa\u4ea7\u7269\u3001plan \u6216\u672c\u5730\u64cd\u4f5c\u7ed3\u679c\u3002<code>runHostVerification()</code> \u76f4\u63a5\u8fd4\u56de Contracts \u6821\u9a8c\u540e\u7684\u9010\u5bbf\u4e3b\u56db\u6001 result\uff1b<code>verifyHostVerificationBindings()</code> \u6210\u529f\u65f6\u4e25\u683c\u8fd4\u56de <code>{ status: \"bound\" }</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u53ea\u6709 <code>assertPlanConsistency</code> \u662f\uff1b<code>resolveHostId</code> \u901a\u8fc7\u53d7\u6536\u5bb9\u7684\u53ea\u8bfb I/O \u8bfb\u53d6 Profile\uff0c\u4e0d\u80fd\u5f53\u4f5c\u7eaf\u51fd\u6570\u3002\u5176\u4f59\u5165\u53e3\u6309\u804c\u8d23\u542b\u843d\u76d8\u6216\u8fdb\u7a0b\u8c03\u7528\u3002</li> <li>\u526f\u4f5c\u7528\uff1a<code>resolveHostId</code> / <code>verifyHostPeers</code> \u53ea\u8bfb\uff1b<code>build</code> / <code>materialize</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u4ea7\u7269\uff1b<code>probe</code> \u9ed8\u8ba4 <code>allowSpawn=false</code>\uff0c\u4e0d\u53d6 PATH\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u53ea\u5728\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 fresh \u79c1\u6709\u6839\u5185\u5199\u539f\u59cb\u8bc1\u636e\uff1b\u516c\u5171 result \u4e0d\u843d\u76d8\u4e3a Foundation receipt\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u7f3a probe facts \u629b <code>KitError</code>\uff08<code>missing-probe-facts</code>\uff09\uff1b\u5199\u5165\u5931\u8d25\u6309 Harness \u7684 <code>publicationState</code> \u8fd4\u56de <code>partially_applied</code> \u6216 <code>indeterminate</code>\u3002<code>HOST_DRIVER_IDS</code> \u4ec5\u4e24\u4e2a\u53d7\u4fe1\u7248\u672c driver\uff08<code>claude-version-v1</code> / <code>codex-version-v1</code>\uff09\uff1b<code>manual</code> \u5bbf\u4e3b\uff08\u542b Qoder\uff09\u7531 <code>probeHost</code> \u751f\u6210\u4e5d\u9879 <code>driver-limited</code> \u4e8b\u5b9e\u3001\u7531 <code>planHost</code> \u8fd4\u56de <code>manual</code> \u8ba1\u5212\uff0c\u4e0d\u6388\u4e88\u751f\u547d\u5468\u671f\u80fd\u529b\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5bbf\u4e3b Profile \u5df2\u5728 <code>profiles/hosts</code> \u767b\u8bb0\uff0c\u5e76\u7531 synth \u6295\u5f71\u8fdb Kit \u7684 <code>data/hosts</code>\uff1b\u522b\u540d\u5fc5\u987b\u6765\u81ea\u8be5\u6709\u9650\u96c6\u5408\uff1b\u53d7\u4fe1 driver \u9650\u5b9a\uff1b<code>applyHostPlan</code> \u8981\u6c42\u663e\u5f0f <code>authorizationRef</code>\u3001\u5df2\u9a8c\u8bc1 build \u4e0e\u76ee\u6807\u6839\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u8fd8\u8981\u6c42\u663e\u5f0f <code>hostsRoot</code>\u3001\u53d7 Descriptor \u7ea6\u675f\u7684\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e driver\u3001canonical \u7684 <code>existingUserStateRoot</code>\uff08\u53ea\u8bfb\u6839\u53ef\u4f4d\u4e8e\u5176\u4e0b\uff1b\u4e0d\u5f97\u7b49\u4e8e\u6216\u4f4d\u4e8e output\u3001temporary\u3001private evidence\u3001\u5b89\u88c5\u76ee\u6807\u3001WorkBuddy config root \u6216 Qoder fresh workspace \u5185\u90e8\uff09\uff0c\u4ee5\u53ca\u4e92\u4e0d\u91cd\u53e0\u7684 fresh \u6839\u4e0e\u6700\u5c0f\u53d1\u73b0\u5e03\u5c40\u9884\u68c0\u3002WorkBuddy \u4f7f\u7528\u81ea\u8eab\u914d\u7f6e\u6839\u4e0b\u7684 <code>skills</code> \u76ee\u5f55\u4e0e <code>CODEBUDDY_CONFIG_DIR</code> \u6295\u5f71\uff1bCodeBuddy \u4f7f\u7528 fresh \u9879\u76ee\u7684 <code>.codebuddy/skills</code>\uff0c\u8fdb\u7a0b\u5de5\u4f5c\u76ee\u5f55\u6307\u5411\u8be5\u9879\u76ee\uff0c\u73b0\u6709\u767b\u5f55\u6001\u53ea\u7ecf <code>HOME</code> \u6295\u5f71\uff0c\u4e24\u8005\u7684 driver \u548c\u5e03\u5c40\u4e0d\u53ef\u4e92\u6362\u3002Codex \u4f7f\u7528 <code>&lt;workspace&gt;/.codex/skills</code>\uff0cQoder \u4f7f\u7528 <code>&lt;fresh-ws&gt;/.qoder/skills</code>\uff1bCodex \u53e6\u8981\u6c42 <code>repositoryRoot/.git</code> \u5b58\u5728\uff0c\u4e0d\u4f7f\u7528 <code>--skip-git-repo-check</code>\uff0c\u4e0d\u6267\u884c\u4efb\u4f55 git \u547d\u4ee4\u3002\u5bbf\u4e3b\u5165\u53e3\u4e0d\u8bbe\u7f6e\u9ed8\u8ba4 <code>hostsRoot</code>\u3002</li> <li>\u53ef\u6267\u884c\u6587\u4ef6\u8eab\u4efd\u8fb9\u754c\uff1a<code>executableSha256</code> \u53ea\u7ed1\u5b9a\u542f\u52a8\u524d\u4e25\u683c\u8bfb\u53d6\u5230\u7684\u5b57\u8282\uff0c\u662f\u70b9\u65f6\u89c2\u5bdf\uff1b\u5b9e\u9645\u8fdb\u7a0b\u4ecd\u6309 pathname \u542f\u52a8\uff0c\u4e0d\u8bc1\u660e\u8fdb\u7a0b\u6620\u50cf\u3002\u8c03\u7528\u65b9\u5fc5\u987b\u5728 probe \u4e0e\u6b63\u5f0f\u8c03\u7528\u671f\u95f4\u72ec\u5360\u53ef\u6267\u884c\u6587\u4ef6\u7684\u547d\u540d\u7a7a\u95f4\u3002</li> <li>\u4e34\u65f6\u76ee\u5f55\u751f\u547d\u5468\u671f\uff1aFoundation \u4fdd\u7559\u672c\u6b21\u8c03\u7528\u7684 <code>session-*</code> \u76ee\u5f55\uff0c\u4e0d\u6309\u8def\u5f84\u81ea\u52a8\u5220\u9664\u3002\u8c03\u7528\u65b9\u5b8c\u6210\u68c0\u67e5\u540e\uff0c\u7edf\u4e00\u6e05\u7406\u5176\u72ec\u5360\u7684\u5916\u5c42 <code>temporaryRoot</code>\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u5bbf\u4e3b\u80fd\u529b\u81ea <code>0.10.0</code> \u63d0\u4f9b\uff1b<code>bundledHostProfilesRoot</code> \u4e0e\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u81ea <code>0.11.0</code> \u63d0\u4f9b\uff1b0.12.0 \u628a\u5c01\u95ed driver \u8868\u6269\u5c55\u5230\u4e94\u4e2a\uff08Kimi \u4e0e WorkBuddy \u4fdd\u6301\u56de\u5f52\u57fa\u7ebf\uff0cClaude Code\u3001Codex\u3001Qoder \u4e3a\u65b0\u589e\uff09\uff1b0.17.0 \u518d\u589e\u52a0\u72ec\u7acb\u7684 CodeBuddy driver\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u4ecd\u4e3a <code>candidate</code>\uff1b\u751f\u4ea7 driver\u3001\u6e90\u7801\u6d4b\u8bd5\u6216\u53d7\u63a7 fixture \u90fd\u4e0d\u80fd\u66ff\u4ee3\u6d88\u8d39\u8005\u7684\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u8bc1\u636e\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/host.mjs</code>\u3001<code>host-profiles.mjs</code>\u3001<code>host-drivers.mjs</code>\u3001<code>host-verification.mjs</code>\u3001<code>host-verification-drivers.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/host.test.mjs</code>\u3001<code>host-verification.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5bbf\u4e3b\u80fd\u529b\u662f\u5426\u53ef\u7528\u3001\u624b\u52a8\u4e8b\u5b9e\u7684\u89e3\u91ca\u4e0e\u751f\u547d\u5468\u671f\u6388\u6743\uff1bFoundation \u4e0d\u58f0\u660e\u6d88\u8d39\u8005 smoke \u6216\u8fdc\u7aef\u53d1\u5e03\u6210\u529f\uff0c\u4e5f\u4e0d\u5ba3\u79f0\u8ba4\u8bc1\u72b6\u6001\u9694\u79bb\u3001\u51ed\u8bc1\u672a\u53d8\u5316\u3001\u6a21\u578b\u8eab\u4efd\u56fa\u5b9a\u6216\u5bbf\u4e3b\u5de5\u5177\u80fd\u529b\u5df2\u5173\u95ed\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#licensing-foundationkitlicensing","title":"licensing (foundation.kit.licensing)","text":""},{"location":"reference/api/engineering-kit/#loadLicensingProfile--listLicensingProfiles--validateLicensingProfile--generateLicenseContent--generateNoticeContent--generateIdentityRecord--bundledProfilesRoot","title":"loadLicensingProfile / listLicensingProfiles / validateLicensingProfile / generateLicenseContent / generateNoticeContent / generateIdentityRecord / bundledProfilesRoot","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>loadLicensingProfile({ profilesRoot, profileId, variant } = {})</code>\uff08async\uff09</li> <li><code>listLicensingProfiles(profilesRoot)</code></li> <li><code>validateLicensingProfile(profile)</code></li> <li><code>generateLicenseContent(profile)</code> / <code>generateNoticeContent(profile, { projectName })</code> / <code>generateIdentityRecord(profile, { projectId, projectName, projections } = {})</code></li> <li><code>bundledProfilesRoot()</code></li> <li>\u8f93\u5165\uff1aProfile \u6807\u8bc6\u3001\u53d8\u4f53\u9009\u62e9\u3002</li> <li>\u8f93\u51fa\uff1a\u8bb8\u53ef\u8bc1 / \u58f0\u660e / \u8eab\u4efd\u8bb0\u5f55\u6587\u672c\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>validateLicensingProfile</code> \u4e0e\u5404 <code>generate*</code> \u662f\uff1b<code>load*</code> \u542b\u53ea\u8bfb\u8bfb\u53d6 Profile \u6570\u636e\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\uff08\u7eaf\u51fd\u6570\u751f\u6210 + \u53ea\u8bfb\u8bfb\u53d6\uff09\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u591a\u53d8\u4f53\u672a\u6307\u5b9a / \u975e\u6cd5 Profile \u629b <code>KitError</code>\uff08<code>invalid-licensing-profile</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>profiles/licensing/registry.json</code> + <code>schema.json</code> \u5b58\u5728\uff1b\u9ed8\u8ba4\u53d6 registry \u7b2c\u4e00\u53d8\u4f53\uff0c\u591a\u53d8\u4f53\u987b\u663e\u5f0f\u9009\u62e9\uff1b\u6240\u6709\u5546\u4e1a\u8f7d\u8377\u5f53\u524d\u5173\u95ed\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/licensing.mjs</code>\u3001<code>profiles/licensing/registry.json</code>\u3001<code>profiles/licensing/schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/licensing.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6388\u6743\u4e1a\u52a1\u8bed\u4e49\uff08\u6388\u6743\u6267\u884c\u51b3\u7b56\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#identity-check-foundationkitidentity-check","title":"identity-check (foundation.kit.identity-check)","text":""},{"location":"reference/api/engineering-kit/#loadIdentityRecord--checkIdentityDrift--validateIdentityAgainstProfile","title":"loadIdentityRecord / checkIdentityDrift / validateIdentityAgainstProfile","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>loadIdentityRecord(rootAbs)</code>\uff08async\uff09</li> <li><code>checkIdentityDrift({ rootAbs, identityRecord } = {})</code>\uff08async\uff09</li> <li><code>validateIdentityAgainstProfile(record, profilesRoot)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3001Profile \u6807\u8bc6\u3002</li> <li>\u8f93\u51fa\uff1a\u6f02\u79fb\u53d1\u73b0\u3001\u6821\u9a8c\u7ed3\u8bba\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>validateIdentityAgainstProfile</code> \u662f\uff1b<code>load*</code> / <code>check*</code> \u542b\u53ea\u8bfb\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\uff1b\u4e0d\u4fee\u6539\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6f02\u79fb\u6216\u6821\u9a8c\u5931\u8d25\u4ea7\u51fa findings\uff08\u4e0d\u629b\u9519\uff0c\u7531 <code>check</code> \u9000\u51fa\u7801 <code>1</code> \u8868\u8fbe\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>IDENTITY_RECORD_PATH</code> \u6307\u5411\u8eab\u4efd\u8bb0\u5f55\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/identity-check.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/identity-check.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6f02\u79fb\u4e1a\u52a1\u5904\u7f6e\uff08\u81ea\u52a8\u4fee\u590d\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#CLI-foundationkitcli","title":"CLI (foundation.kit.cli)","text":""},{"location":"reference/api/engineering-kit/#runCommand--cliMain--\u62d2\u7edd\u53d8\u66f4\u65d7\u6807","title":"runCommand / cliMain / \u62d2\u7edd\u53d8\u66f4\u65d7\u6807","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runCommand(command, options = {})</code>\uff08async\uff09\u2014\u2014 \u6309 <code>TOP_LEVEL_COMMANDS</code> \u5206\u6d3e\uff0c\u8fd4\u56de <code>{ exitCode, output }</code></li> <li><code>cliMain(argv)</code>\uff08async\uff09\u2014\u2014 CLI \u5165\u53e3</li> <li>\u8f93\u5165\uff1a<code>argv</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u547d\u4ee4\u7ed3\u679c\uff1b\u9000\u51fa\u7801 <code>ok=0</code> / <code>findings=1</code> / <code>rejected=2</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u4f9d\u547d\u4ee4\u4ea7\u751f\u53d7\u6536\u5bb9\u6587\u4ef6\u5199\u5165\u6216\u53ea\u8bfb\u63a2\u6d4b\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u4f9d\u5b50\u52a8\u4f5c\u800c\u5b9a\uff1a<code>scaffold</code> / <code>projection</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u5165\uff1b<code>adopt-plan</code> \u4e0e\u666e\u901a <code>check</code> \u53ea\u8bfb\uff1b<code>check relock</code> \u662f\u663e\u5f0f\u53d7\u63a7\u5199\u4e8b\u52a1\uff1b<code>check qualification</code> \u9884\u68c0\u901a\u8fc7\u540e\u53ef\u80fd\u542f\u52a8\u7ed1\u5b9a\u7684 executable\u3002Foundation \u81ea\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u53ef\u80fd\u8054\u7f51\uff1bFoundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002<code>REFUSED_MUTATION_FLAGS</code>\uff08\u5982 <code>--apply</code>\uff09\u5728 <code>parseOptions</code> \u5165\u53e3\u5373\u62d2\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u672a\u77e5\u547d\u4ee4 / \u62d2\u7edd\u65d7\u6807\u9000\u51fa\u7801 <code>2</code>\uff08<code>unknown-command</code> / <code>refused-mutation</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aNode &gt;= 22.22.2\uff1b<code>TOP_LEVEL_COMMANDS</code> \u56fa\u5b9a 4 \u4e2a\uff0c\u7b2c 5 \u4e2a\u547d\u4ee4\u7981\u6b62\u65b0\u589e\uff1b<code>REFUSED_MUTATION_FLAGS</code> \u5728\u89e3\u6790\u5165\u53e3\u5373\u62d2\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/index.mjs</code>\u3001<code>cli.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/cli.test.mjs</code>\u3001<code>boundary.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u547d\u4ee4\u7684\u4e1a\u52a1\u76ee\u6807\uff08\u547d\u4ee4\u96c6\u5408\u4e0d\u6269\u5f20\uff09\u3002</li> </ul> <p>Kit \u9519\u8bef\u7c7b\u578b\uff1a<code>KitError extends ContractsError</code>\uff08\u6784\u9020\u672a\u767b\u8bb0\u7801\u7acb\u5373\u629b <code>TypeError</code>\uff09\uff1b<code>KIT_ERROR_KINDS</code> \u4e3a\u7a33\u5b9a kind \u679a\u4e3e\uff1b<code>kitError</code> / <code>invalidParamsError</code> / <code>unknownCommandError</code> / <code>mutationModeError</code> / <code>refusalError</code> \u4e3a\u6784\u9020\u8f85\u52a9\u3002<code>REFUSED_MUTATION_FLAGS</code> \u5217\u51fa\u5165\u53e3\u5373\u62d2\u7684\u53d8\u66f4\u65d7\u6807\uff08\u5982 <code>--apply</code>\uff09\u3002</p>"},{"location":"reference/api/engineering-kit/#Profile-SPI-\u516c\u5171\u6295\u5f71","title":"Profile SPI \u516c\u5171\u6295\u5f71","text":"<p><code>skill-family-engineering-kit/profile-spi</code> \u662f Profile SPI v3 \u7684\u516c\u5171\u6570\u636e\u5165\u53e3\u3002\u5b83\u7531 Profiles \u6e90\u5b9e\u73b0\u6295\u5f71\u751f\u6210\uff0c\u5305\u5185\u540c\u65f6\u643a\u5e26\u4e09\u4e2a SPI JSON \u8d44\u6e90\u4e0e Contracts \u7684 <code>profile-descriptor.schema.json</code>\uff1b\u6295\u5f71\u811a\u672c\u53ea\u66ff\u6362\u4e24\u4e2a\u516c\u5171\u5305\u5bfc\u5165\u548c\u4e00\u4e2a\u672c\u5730 Schema URL\uff0c\u8d44\u6e90\u5b57\u8282\u4fdd\u6301\u7ed1\u5b9a\u3002</p>"},{"location":"reference/api/engineering-kit/#\u516c\u5171\u5165\u53e3","title":"\u516c\u5171\u5165\u53e3","text":"<ul> <li><code>loadSpiDefinition()</code>\uff1a\u8bfb\u53d6 <code>extension-spi.json</code>\uff0c\u8fd4\u56de\u5f00\u653e\u6269\u5c55\u70b9\u3001\u6838\u5fc3\u6240\u6709\u6743\u548c entrypoint \u89c4\u5219\u3002</li> <li><code>loadExtendedDescriptorSchema()</code>\uff1a\u8bfb\u53d6 <code>profile-descriptor.schema.json</code>\uff0c\u8fd4\u56de\u6269\u5c55 Profile descriptor Schema\u3002</li> <li><code>loadRuleBaselineCatalog()</code>\uff1a\u8bfb\u53d6 <code>rule-baseline-catalog.json</code>\uff0c\u8fd4\u56de overrides-policy \u7684\u57fa\u7ebf\u76ee\u5f55\u3002</li> <li><code>verifyProfile({ profileRoot, descriptorRelPath = \"profile.json\" } = {})</code>\uff08async\uff09\uff1a\u53ea\u8bfb\u6821\u9a8c Profile descriptor\u3001\u8d44\u6e90\u6536\u5bb9\u3001\u6838\u5fc3\u53cd\u5411\u4f9d\u8d56\u3001\u91c7\u7528 pin \u4e0e overrides\uff1b\u8fd4\u56de <code>SPE0000</code> \u6216 <code>SPE1001</code>\u2013<code>SPE1007</code> \u7ed3\u679c\u7801\uff0c\u4e0d\u6267\u884c Profile entrypoint\u3002</li> <li><code>verifyAdoptionDigests({ profileRoot, adoption })</code> \u4e0e <code>assessOverridesPolicy(overrides)</code>\uff1a\u5206\u522b\u6821\u9a8c\u91c7\u7528 pin \u6458\u8981\u548c\u53ea\u6536\u7d27\u7684 overrides\u3002</li> </ul> <p>\u516c\u5171\u6295\u5f71\u5165\u53e3\u6ca1\u6709\u6587\u4ef6\u5199\u5165\u3001Git\u3001\u7f51\u7edc\u6216\u8fdb\u7a0b\u526f\u4f5c\u7528\u3002<code>profileRoot</code> \u5fc5\u987b\u662f\u53ef\u8bfb\u53d6\u76ee\u5f55\uff0c\u8d44\u6e90 entrypoint \u5fc5\u987b\u7559\u5728\u8be5\u76ee\u5f55\u5185\u4e14\u4e3a JSON \u6570\u636e\u6587\u4ef6\uff1b\u7b26\u53f7\u94fe\u63a5\u548c\u8def\u5f84\u9003\u9038\u5747\u5931\u8d25\u5173\u95ed\u3002Profile \u7684\u9886\u57df\u8bed\u4e49\u4ecd\u7531\u8c03\u7528\u65b9\u62e5\u6709\u3002</p> <p><code>profiles/spi</code> \u662f\u552f\u4e00\u624b\u5199\u771f\u6e90\uff1b<code>packages/skill-family-engineering-kit/profile-spi</code> \u7531 projen \u673a\u68b0\u751f\u6210\uff0c\u4e0d\u5f97\u76f4\u63a5\u7f16\u8f91\u6295\u5f71\u6587\u4ef6\u3002</p>"},{"location":"reference/api/engineering-kit/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u89c4\u8303\u5165\u53e3 <code>skill-family-engineering-kit/quickstart-profile</code> \u5bfc\u51fa <code>buildQuickstartProfileProjection</code>\u3001 <code>buildQuickstartProfileProjectionFromInventory</code> \u4e0e <code>QUICKSTART_PROFILE_TARGET_PREFIX</code>\u3002builder \u63a5\u6536\u663e\u5f0f\u6d88\u8d39\u8005 Schema \u8def\u5f84 \u4e0e\u51bb\u7ed3\u6765\u6e90\u8eab\u4efd\uff0c\u751f\u6210\u6309 Schema <code>$id</code> \u67e5\u8be2\u7684 standalone validator\u3001\u673a\u68b0\u6295\u5f71\u7684 Contracts/Harness runtime\u3001\u8bb8\u53ef\u8bc1\u548c \u5b8c\u6574 provenance\u3002\u5386\u53f2 <code>skill-family-engineering-kit/candidate/quickstart-profile</code> \u5728\u5f03\u7528\u7a97\u53e3\u5185\u89e3\u6790\u540c\u4e00\u6a21\u5757\u3002</p> <p>Bundle \u79bb\u7ebf\u8fd0\u884c\u65f6\u4e0d\u9700\u8981 Foundation \u5305\u3001<code>node_modules</code> \u6216 Ajv\u3002builder \u53ea\u8fd4\u56de\u7a33\u5b9a projection manifest\uff0c\u4e0d\u5199\u76ee\u6807\u6587\u4ef6\uff0c \u4e5f\u4e0d\u589e\u52a0\u7b2c\u4e94\u4e2a Kit \u9876\u5c42\u547d\u4ee4\uff1b\u8c03\u7528\u65b9\u4ecd\u9700\u628a manifest \u4ea4\u7ed9 <code>runProjection</code> \u5b8c\u6210\u6388\u6743\u5199\u5165\u30020.3.0 \u7684 v2 \u4e0e 0.2.1 \u7684\u4f9d\u8d56 \u95ed\u5305 Bundle \u4e0d\u517c\u5bb9\uff0c\u5fc5\u987b\u7cbe\u786e\u9501\u5b9a\u7248\u672c\u3002</p> <p>\u5386\u53f2 Quickstart \u547d\u540d\u7a7a\u95f4\u8fd8\u5bfc\u51fa adoption \u673a\u5236\uff1b0.10.0 \u7684\u89c4\u8303\u5165\u53e3\u662f <code>skill-family-engineering-kit/adoption</code>\u3002 skill naming \u4f7f\u7528 <code>skill-family-engineering-kit/skill-naming</code>\u3002\u4e24\u4e2a\u5165\u53e3\u90fd\u4e0d\u589e\u52a0 Kit \u9876\u5c42\u547d\u4ee4\uff1b\u5386\u53f2\u6d88\u8d39\u8005\u8fc1\u79fb\u4e00\u6b21\u540e\uff0c \u4ee5\u540e\u53ea\u6539\u53d8\u6210\u719f\u5ea6\u6807\u7b7e\u65f6\u4e0d\u518d\u8fc1\u79fb\u5408\u540c\u8eab\u4efd\u3002\u6d88\u8d39\u8005\u91c7\u7528\u65b0 Foundation \u7248\u672c\u4ecd\u9700\u66f4\u65b0\u7cbe\u786e pin\uff0cBundle \u662f\u5426\u91cd\u5efa\u6309\u65e2\u6709 package identity\u3001\u6765\u6e90\u6458\u8981\u4e0e provenance \u7ed1\u5b9a\u5408\u540c\u5224\u65ad\u3002</p>"},{"location":"reference/api/engineering-kit/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID \u89c1 <code>docs/agents/capability-catalog.json</code>\uff08<code>foundation.kit.*</code>\u3001<code>foundation.unsupported.*</code>\uff09\u3002</li> <li>\u673a\u68b0\u6821\u9a8c\uff1a<code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code> \u4e0e <code>cli.mjs</code>\uff0c\u62d2\u7edd\u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\uff0c\u5e76\u6821\u9a8c <code>TOP_LEVEL_COMMANDS</code> \u672a\u6269\u5f20\u4e3a\u8d85 4 \u4e2a\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#\u80fd\u529b\u53d1\u73b0\u4e0e\u8fc1\u79fb\u6307\u5f15-Foundation-0140","title":"\u80fd\u529b\u53d1\u73b0\u4e0e\u8fc1\u79fb\u6307\u5f15 (Foundation 0.14.0)","text":"<p><code>adopt-plan --list-capabilities</code> \u662f\u80fd\u529b\u53d1\u73b0\u7684\u552f\u4e00 CLI \u5165\u53e3\uff0c\u4e0d\u589e\u52a0\u7b2c\u4e94\u4e2a\u9876\u5c42\u547d\u4ee4\u3002 \u8986\u76d6\u53c2\u8003\u548c\u9879\u76ee\u8bc4\u4f30\u4f7f\u7528 <code>--all --scope &lt;scope&gt; --locale &lt;en|zh-CN&gt;</code>\uff1b\u9879\u76ee\u8bc4\u4f30\u53e6\u52a0 <code>--uses &lt;relative-json-path&gt;</code>\uff0c\u65e5\u5e38\u5355\u9700\u6c42\u67e5\u8be2\u4f7f\u7528 <code>--filter &lt;text&gt;</code>\u3002\u8f93\u51fa\u4e2d\u7684 <code>supportedMatches</code> \u53ea\u662f\u5019\u9009\uff0c<code>needsDecision=true</code> \u8868\u793a\u9879\u76ee\u4ecd\u9700\u660e\u786e disposition\uff1b <code>boundary-found</code> \u548c <code>no-text-match</code> \u90fd\u4e0d\u81ea\u52a8\u751f\u6210 <code>foundation-gap</code>\u3002</p> <p><code>planAdoption()</code> \u8fd4\u56de\u7684 <code>capabilityAssessment</code> \u548c <code>capabilityGuidance</code> \u4ecd\u662f\u53ea\u8bfb\u6295\u5f71\u3002 <code>direct-adoption</code>\u3001<code>compatibility-layer</code>\u3001<code>keep-business</code> \u4e0e <code>foundation-gap</code> \u7684 decision \u7531\u6d88\u8d39\u8005\u8bb0\u5f55\u3002\u8fc1\u79fb <code>complete</code> \u53ea\u8868\u793a\u8fc1\u79fb\u95e8\u7981\u95ed\u5408\uff0c<code>consumerVerification.claim</code> \u4fdd\u6301 <code>null</code>\uff1b\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u987b\u7531\u6d88\u8d39\u8005\u9002\u914d\u5668\u6d4b\u8bd5\u4e0e\u9886\u57df\u95e8\u7981\u58f0\u660e\u3002</p>"},{"location":"reference/api/engineering-kit/#\u663e\u5f0f\u8d44\u683c\u5165\u53e3","title":"\u663e\u5f0f\u8d44\u683c\u5165\u53e3","text":"<p><code>check qualification</code> \u662f\u6302\u5728 <code>check</code> \u4e0b\u7684\u663e\u5f0f\u5b50\u52a8\u4f5c\uff0c\u8981\u6c42\u540c\u65f6\u63d0\u4f9b <code>--root</code>\u3001\u53d7\u652f\u6301\u7684 <code>--capability</code>\uff08\u63d2\u4ef6\u751f\u547d\u5468\u671f\u6216\u6280\u80fd\u65cf\u76ee\u5f55\uff09\u3001<code>--request</code>\u3001<code>--bindings</code> \u4e0e <code>--native</code>\u3002\u5b83\u5148\u8bfb\u53d6\u4e09\u5305\u7cbe\u786e\u7248\u672c\u3001\u80fd\u529b\u76ee\u5f55\u3001request/result Schema \u548c\u53c2\u6570\u5b8c\u6574\u6027\uff0c \u518d\u8c03\u7528\u56fa\u5b9a\u8d44\u683c\u5165\u53e3\u3002\u7f3a\u5c11\u8bc1\u636e\u3001\u8df3\u8fc7\u6267\u884c\u6216\u7ec8\u6001\u4e0d\u786e\u5b9a\u65f6\uff0c\u4e0d\u5f97\u8f93\u51fa <code>real-host-qualified</code>\uff1b\u5019\u9009\u53d1\u73b0\u3001\u8fc1\u79fb <code>complete</code> \u548c\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u90fd\u4e0d\u80fd\u66ff\u4ee3\u771f\u5b9e\u8d44\u683c\u3002</p> <p>\u516c\u5171\u5e93\u5165\u53e3\u4e3a <code>runQualification({ root, capability, requestPath, bindingsPath, native })</code>\u3002\u53c2\u6570\u952e\u96c6\u95ed\u5408\uff1b<code>runner</code>\u3001catalog loader\u3001parser\u3001\u9884\u5236 observation \u6216\u5176\u5b83\u6d4b\u8bd5\u63a5\u7f1d\u4f1a\u5728\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\u548c\u521b\u5efa\u4e34\u65f6\u6839\u4e4b\u524d\u88ab\u62d2\u7edd\u3002\u5305\u5185\u6d4b\u8bd5\u63a5\u7f1d\u4e0d\u4ece package root \u5bfc\u51fa\uff0c\u4e5f\u4e0d\u5c5e\u4e8e\u516c\u5171 API\u3002</p> <p>0.15.0 \u7684 <code>foundation.kit.plugin-verification</code> \u53ea\u4fdd\u7559 Qoder \u4e0e WorkBuddy \u7684 <code>native-lifecycle</code> \u5206\u652f\uff0c\u4f7f\u7528\u5bbf\u4e3b\u4e13\u5c5e\u751f\u4ea7 driver \u4e0e\u56fa\u5b9a\u5341\u4e8c\u9636\u6bb5\u751f\u547d\u5468\u671f\u7ed3\u6784\uff1b <code>foundation.kit.skill-family-directory-verification</code> \u662f Kimi \u7684\u56fa\u5b9a\u76ee\u5f55\u5206\u652f\uff0c\u5185\u7f6e <code>driverVersion</code> \u4e3a <code>1.0.0</code>\uff0cCLI <code>cliVersion</code> \u4e3a <code>0.39.1</code>\u3002\u53d7\u63a7 fixture executable \u5fc5\u987b\u8d70\u540c\u4e00\u751f\u4ea7 driver\u3001<code>superviseProcess</code> \u548c\u539f\u59cb\u6d41\u8def\u5f84\uff0c\u53ea\u8bc1\u660e\u9694\u79bb\u63a5\u7ebf\uff0c\u4e0d\u662f\u5382\u5546\u5b98\u65b9 grammar\uff0c\u4e5f\u4e0d\u80fd\u4ece\u516c\u5171\u8d44\u683c\u5165\u53e3\u4f2a\u9020\u6b63\u5f0f\u5bbf\u4e3b\u89c2\u5bdf\u3002\u8c03\u7528\u65b9\u8d1f\u8d23\u9886\u57df\u63a5\u53d7\u4e0e\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\uff0c\u4e0d\u5f97\u590d\u5236\u901a\u7528 runner\u3001Schema\u3001Registry \u6216 receipt \u94fe\u3002</p>"},{"location":"reference/api/engineering-kit/#\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1-foundationkitplugin-verification","title":"\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1 (foundation.kit.plugin-verification)","text":""},{"location":"reference/api/engineering-kit/#runPluginVerification","title":"runPluginVerification","text":"<ul> <li>\u7b7e\u540d\uff1a<code>runPluginVerification({ request, bindings, hostsRoot })</code>\uff08async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u6ce8\u518c\u7684 <code>plugin-verification-request</code>\u3001\u79c1\u6709\u8def\u5f84\u7ed1\u5b9a\u53ca\u663e\u5f0f\u5bbf\u4e3b Profile \u6839\u3002\u8bf7\u6c42\u4fdd\u7559 <code>install-only</code> \u4e0e <code>install-and-invoke</code>\uff0c\u5e76\u589e\u52a0\u53ea\u5141\u8bb8\u672c\u5730 source \u7684 <code>native-lifecycle</code>\u3002\u539f\u5206\u652f\u7ee7\u7eed\u533a\u5206 <code>local-staged</code> \u4e0e\u6709\u9650 <code>public-channel</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u6ce8\u518c\u7684 <code>plugin-verification-result</code>\u3002\u539f\u5206\u652f\u5206\u522b\u62a5\u544a\u8f93\u5165\u3001\u5b89\u88c5\u3001\u53d1\u73b0\u548c\u8c03\u7528\u4e8b\u5b9e\uff1b\u539f\u751f\u547d\u5468\u671f\u5206\u652f\u6070\u597d\u62a5\u544a <code>preflight</code> \u5230 <code>absent-after-uninstall</code> \u7684\u5341\u4e8c\u4e2a\u6709\u5e8f\u8bed\u4e49\u9636\u6bb5\u3002\u5b8c\u6574\u6811\u89c2\u5bdf\u548c\u539f\u59cb\u8f93\u51fa\u53ea\u4fdd\u5b58\u5728\u79c1\u6709\u8bc1\u636e\u6839\u3002</li> <li>\u751f\u4ea7 driver\uff1aQoder \u4e0e WorkBuddy \u5404\u81ea\u62e5\u6709 argv \u8ba1\u5212\u3001command step\u3001tree evidence \u4e0e raw stream Oracle\uff0c\u9636\u6bb5\u5185\u6700\u591a\u4e09\u6761\u547d\u4ee4\uff0c\u4e24\u4e2a\u5bbf\u4e3b\u8ba1\u5212\u53ef\u4ee5\u4e0d\u540c\u3002\u6bcf\u6b21 spawn \u524d\u90fd\u91cd\u65b0\u8c03\u7528 <code>observeExecutableIdentity</code>\uff1b\u8eab\u4efd\u6216\u89e3\u91ca\u5668\u94fe\u6f02\u79fb\u4f1a\u963b\u65ad\u4e0b\u4e00\u6b21\u542f\u52a8\u3002Contracts \u4e0d\u4fdd\u5b58\u8de8\u5bbf\u4e3b\u7edf\u4e00\u547d\u4ee4\u8868\uff0c\u4e5f\u4e0d\u89e3\u91ca\u5382\u5546\u8f93\u51fa\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u539f\u751f\u547d\u5468\u671f\u5206\u652f\u53ea\u8fd0\u884c\u8c03\u7528\u65b9\u7ed1\u5b9a\u7684\u672c\u5730 executable\uff0c\u521b\u5efa fresh workspace\u3001\u4e00\u6b21\u6027\u5bbf\u4e3b\u72b6\u6001\u4e0e\u79c1\u6709\u8bc1\u636e\u3002Foundation \u81ea\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u53ef\u80fd\u8054\u7f51\uff1bFoundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002\u6240\u6709\u5206\u652f\u4e0d\u8986\u76d6\u5df2\u6709\u5b89\u88c5\uff0c\u4e0d\u81ea\u52a8\u91cd\u8bd5\u3001\u56de\u6eda\u6216\u6e05\u7406\u4e0d\u786e\u5b9a\u73b0\u573a\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a<code>rejected</code> \u8868\u793a\u524d\u63d0\u62d2\u7edd\uff0c<code>failed</code> \u8868\u793a\u786e\u5b9a\u5931\u8d25\uff0c<code>indeterminate</code> \u8868\u793a\u8fb9\u754c\u7ec8\u6001\u65e0\u6cd5\u8bc1\u660e\u3002\u539f\u751f\u547d\u5468\u671f\u7684\u9996\u4e2a\u975e <code>observed</code> \u9636\u6bb5\u4f1a\u4f7f\u540e\u7eed\u9636\u6bb5\u4fdd\u6301\u7a7a\u7684 <code>not-performed</code>\uff1b\u8f93\u51fa\u672a\u77e5\u3001\u91cd\u590d\u3001\u7f3a\u5931\u3001\u8eab\u4efd\u6f02\u79fb\u3001\u6839\u8d8a\u754c\u6216\u5378\u8f7d\u6b8b\u7559\u5747\u5931\u8d25\u5173\u95ed\u3002</li> <li>fixture \u8fb9\u754c\uff1a\u53d7\u63a7 Qoder/WorkBuddy executable \u4f7f\u7528 Foundation \u81ea\u6709\u7684\u5c01\u95ed\u6d4b\u8bd5\u534f\u8bae\uff0c\u5e76\u901a\u8fc7\u771f\u5b9e\u751f\u4ea7 driver \u4e0e raw-stream \u8def\u5f84\u6267\u884c\u3002\u8be5\u534f\u8bae\u4e0d\u662f\u5382\u5546\u5b98\u65b9 grammar\uff0c\u4e0d\u6784\u6210\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u6216\u9886\u57df\u63a5\u53d7\u3002</li> <li>\u524d\u63d0\uff1a\u4e09\u5305\u7cbe\u786e\u9501\u6b65\uff1b\u8c03\u7528\u65b9\u7ed1\u5b9a\u51bb\u7ed3\u672c\u5730\u6e90\u3001\u53ef\u6267\u884c\u6587\u4ef6\u3001\u89e3\u91ca\u5668\u3001\u4e92\u4e0d\u91cd\u53e0\u7684 fresh \u6839\u4e0e\u73b0\u6709\u7528\u6237\u72b6\u6001\u8fb9\u754c\u3002\u6bcf\u4e2a\u771f\u5b9e\u5bbf\u4e3b\u4e0e\u6765\u6e90\u7ec4\u5408\u5fc5\u987b\u53e6\u6709\u8d44\u683c\u8bc1\u636e\uff0c\u5165\u53e3\u5b58\u5728\u4e0d\u7b49\u4e8e\u5168\u90e8\u7ec4\u5408\u83b7\u51c6\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.13.0</code> / <code>candidate</code>\u3002\u6c38\u4e45\u5165\u53e3\u8eab\u4efd\u4e0d\u56e0\u6210\u719f\u5ea6\u6807\u7b7e\u53d8\u5316\u800c\u8fc1\u79fb\uff1b\u73b0\u6709\u5355 Skill \u5165\u53e3\u53ca\u5408\u540c\u4fdd\u7559\u3002</li> <li>\u6e90\u6587\u4ef6\u4e0e\u6b63\u53cd\u4f8b\uff1a<code>packages/skill-family-engineering-kit/src/plugin-verification.mjs</code>\u3001<code>src/host-verification-drivers.mjs</code>\u3001<code>test/plugin-verification.test.mjs</code>\u3001<code>test/foundation-015-kit.test.mjs</code>\u3001<code>test/isolated-install.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u8d23\u4efb\uff1a\u6e90\u63a5\u53d7\u3001\u9886\u57df\u7ed3\u679c\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u548c\u72b6\u6001\u3001\u6d88\u8d39\u8005\u8fc1\u79fb\u53ca\u673a\u5236\u9000\u51fa\u8bc1\u660e\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1-foundationkitskill-family-directory-verification","title":"\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1 (foundation.kit.skill-family-directory-verification)","text":""},{"location":"reference/api/engineering-kit/#runSkillFamilyDirectoryVerification","title":"runSkillFamilyDirectoryVerification","text":"<ul> <li>\u7b7e\u540d\uff1a<code>runSkillFamilyDirectoryVerification({ request, bindings })</code>\uff08async\uff09\u3002\u516c\u5171\u952e\u96c6\u53ea\u6709 <code>request</code> \u4e0e <code>bindings</code>\uff1bcaller observation\u3001runner\u3001parser \u6216\u9884\u5236 result \u5747\u88ab\u62d2\u7edd\u3002</li> <li>\u8f93\u5165\uff1a\u6ce8\u518c\u7684 skill-family-directory request\uff0c\u4ee5\u53ca\u8c03\u7528\u65b9\u7ed1\u5b9a\u7684 Kimi executable/interpreter\u3001\u6280\u80fd\u65cf\u6839\u3001\u5de5\u4f5c\u533a\u3001\u73b0\u6709\u7528\u6237\u72b6\u6001\u6839\u3001\u4e34\u65f6\u6839\u4e0e\u79c1\u6709\u8bc1\u636e\u6839\u3002\u5165\u53e3\u56fa\u5b9a <code>hostId=kimi-code</code>\u3001<code>driverVersion=1.0.0</code>\u3001<code>cliVersion=0.39.1</code>\u3002</li> <li>\u542f\u52a8\uff1a\u5148\u4ee5\u56fa\u5b9a\u7248\u672c\u53c2\u6570\u68c0\u67e5 CLI\uff1b\u6b63\u5f0f\u8c03\u7528\u56fa\u5b9a\u4e3a <code>-p &lt;prompt&gt; --output-format stream-json --skills-dir &lt;family-root&gt;</code>\u3002\u73af\u5883\u53ea\u6295\u5f71 <code>NO_COLOR</code>\u3001<code>HOME</code>\u3001<code>TMPDIR</code> \u4e0e <code>KIMI_CODE_HOME</code>\uff0c\u4e0d\u5c55\u5f00\u7ee7\u627f <code>process.env</code>\u3002\u6bcf\u6b21 spawn \u524d\u91cd\u65b0\u89c2\u5bdf\u53ef\u6267\u884c\u6587\u4ef6\u53ca\u89e3\u91ca\u5668\u8eab\u4efd\u3002</li> <li>\u8f93\u51fa\uff1a\u6ce8\u518c\u7684\u56db\u6001 directory result\uff0c\u4ee5\u53ca\u53d7\u4fdd\u62a4\u6280\u80fd\u65cf\u6811\u3001\u5de5\u4f5c\u533a\u548c\u539f\u59cb\u6d41\u6458\u8981\u3002\u79c1\u6709 raw stdout/stderr\u3001\u7edd\u5bf9\u8def\u5f84\u4e0e\u5b8c\u6574 observation \u4e0d\u8fdb\u5165\u516c\u5171\u7ed3\u679c\u3002</li> <li>\u5f53\u524d\u5224\u5b9a\u8fb9\u754c\uff1aFoundation \u81ea\u6709\u53d7\u63a7 raw fixture \u534f\u8bae\u53ef\u9a8c\u8bc1\u751f\u4ea7 parser \u63a5\u7ebf\uff0c\u4f46\u4e0d\u662f Kimi \u5b98\u65b9 stream-json grammar\u3002\u5f53\u524d\u7f3a\u5c11\u53ef\u9a8c\u8bc1\u7684\u5b98\u65b9 typed call/result \u6620\u5c04\uff0c\u56e0\u6b64\u5373\u4f7f\u53d7\u63a7\u4e8b\u4ef6\u5b8c\u6574\u914d\u5bf9\uff0c\u516c\u5171\u7ed3\u679c\u4ecd\u4e3a <code>indeterminate</code>\uff0c\u539f\u56e0\u4e3a <code>official-observation-unavailable</code>\uff0c\u9010\u6280\u80fd discovery/load \u4fdd\u6301 <code>unknown</code>\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u8c03\u7528\u65b9 observation\u3001\u6839\u91cd\u53e0\u6216\u8d8a\u754c\u3001\u975e fresh evidence \u6839\u3001\u6765\u6e90\u6458\u8981\u4e0d\u7b26\u3001\u53ef\u6267\u884c\u6587\u4ef6/\u89e3\u91ca\u5668\u6f02\u79fb\u3001raw evidence \u53d8\u5316\u548c protected snapshot \u6f02\u79fb\u5747\u5931\u8d25\u5173\u95ed\u3002\u8fb9\u754c\u7ec8\u6001\u65e0\u6cd5\u8bc1\u660e\u65f6\u4fdd\u7559\u73b0\u573a\u5e76\u8981\u6c42\u4eba\u5de5\u68c0\u67e5\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u542f\u52a8\u672c\u5730\u53d7\u7ea6\u675f\u8fdb\u7a0b\uff0c\u5e76\u5728\u8c03\u7528\u65b9\u7ed1\u5b9a\u7684\u79c1\u6709\u4e34\u65f6\u6839\u5199 raw evidence\u3002Foundation \u81ea\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u53ef\u80fd\u8054\u7f51\uff1bFoundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002Foundation \u4e0d\u7ba1\u7406\u8ba4\u8bc1\u3001\u4e0d\u5199\u5168\u5c40\u914d\u7f6e\u6216\u8fdc\u7aef\u72b6\u6001\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.15.0</code> / <code>candidate</code>\u3002</li> <li>\u6e90\u6587\u4ef6\u4e0e\u6b63\u53cd\u4f8b\uff1a<code>packages/skill-family-engineering-kit/src/skill-family-directory-verification.mjs</code>\u3001<code>test/foundation-015-kit.test.mjs</code>\u3001<code>test/isolated-install.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u8d23\u4efb\uff1a\u6280\u80fd\u65cf\u6765\u6e90\u63a5\u53d7\u3001\u9886\u57df\u7ed3\u679c\u3001\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/harness/","title":"skill-family-harness-node \u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u9875\u4ece\u771f\u5b9e\u5bfc\u51fa\uff08<code>src/index.mjs</code> \u4e0e\u5404\u6e90\u6a21\u5757\uff09\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684\u5168\u96c6\u3002\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 hand-off \u00a74.3 \u8bf4\u660e\uff1a\u7b7e\u540d\u3001\u8f93\u5165\u4e0e\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p> <p>Harness \u662f\u8584\u8fd0\u884c\u65f6\uff1a\u6d88\u8d39 Contracts\uff0c\u53ea\u5b9e\u73b0\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\uff1b\u4e0d\u62e5\u6709\u4e1a\u52a1\u8bed\u4e49\u3001\u7f16\u6392\u3001Git\u3001\u7f51\u7edc\u4e0e\u7b2c\u4e8c\u8bed\u8a00\u3002\u5305\u7ea7\u5e38\u91cf\uff1a<code>HARNESS_CAPABILITIES</code>\uff0823 \u9879\u80fd\u529b\uff0c\u95ed\u96c6\uff09\u3001<code>HARNESS_EXCLUSIONS</code>\uff08\u660e\u786e\u6392\u9664 <code>business-semantics</code> / <code>workflow-orchestration</code> / <code>git-writes</code> / <code>model-calls</code> / <code>release-state</code> / <code>remote-network-access</code>\uff09\u3002</p> <p>\u80fd\u529b\u5206\u7ec4\uff08\u4e0e <code>docs/agents/capability-catalog.json</code> \u5bf9\u5e94\uff09\uff1a</p> <ul> <li>\u5951\u7ea6\u6821\u9a8c \u2192 <code>validateContractDocument</code> / <code>getValidator</code></li> <li>\u8def\u5f84\u6536\u5bb9 \u2192 <code>classifyPathInput</code> / <code>resolveContained</code> / <code>readFileContained</code></li> <li>\u4e25\u683c\u8bfb\u53d6 \u2192 <code>readFileStrict</code></li> <li>\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6 \u2192 <code>createFilesystemRootBinding</code> / <code>readFileBound</code></li> <li>\u5b8c\u6574\u6811\u89c2\u5bdf \u2192 <code>observeFilesystemTree</code></li> <li>\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03 \u2192 <code>createFixedSetPublicationManifest</code> / <code>publishFixedSet</code> / <code>replaceFixedSetAtomic</code></li> <li>\u539f\u5b50\u5199 \u2192 <code>writeFileAtomic</code></li> <li>\u4e34\u65f6\u5de5\u4f5c\u533a \u2192 <code>TemporaryWorkspace</code> / <code>withTemporaryWorkspace</code></li> <li>\u8d44\u6e90\u95ed\u5305 \u2192 <code>computeResourceClosure</code> / <code>digestBytes</code> / <code>closureContains</code></li> <li>\u8fdb\u7a0b\u76d1\u7763 \u2192 <code>superviseProcess</code> / <code>validateTimeoutPolicy</code></li> <li>\u8bf7\u6c42\u7ba1\u7ebf \u2192 <code>parseRequest</code> / <code>processRequest</code></li> <li>\u62a5\u544a \u2192 <code>validateReportModel</code> / <code>renderReportMarkdown</code> / <code>buildBinding</code> / <code>verifyBinding</code> / <code>checkReport</code></li> <li>\u5bbf\u4e3b\u9002\u914d\u673a\u5236 \u2192 <code>normalizeAdapterSource</code> / <code>buildAdapterClosure</code> / <code>materializeAdapterBuild</code> / <code>probeVersionVector</code></li> <li>\u53ef\u6267\u884c\u8eab\u4efd\u89c2\u5bdf \u2192 <code>observeExecutableIdentity</code></li> <li>\u673a\u5236\u6279\u91cf \u2192 <code>runMechanismCliBatch</code> / <code>--batch</code>\uff080.19.0 candidate\uff09</li> <li>\u6301\u4e45\u72b6\u6001\u5e95\u5ea7 \u2192 <code>openStateStore</code> / <code>appendEvent</code> / <code>readSnapshot</code> / <code>verifyStateStore</code> \u2026</li> <li>\u57fa\u7ebf\u7269\u5316 \u2192 <code>computeDirectoryDigest</code> / <code>materializeBaseline</code>\uff08FND-ADR-009\uff09</li> <li>\u53ea\u8bfb chokepoint \u2192 <code>createReadChokepoint</code>\uff08FND-ADR-009\uff09</li> <li>\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf \u2192 <code>scanSurface</code>\uff08FND-ADR-009\uff09</li> <li>token \u4e0a\u754c\u4f30\u7b97 \u2192 <code>estimateTokenUpperBound</code> / <code>estimateTokens</code>\uff08FND-ADR-009\uff09</li> <li>\u901a\u7528\u4e0a\u9650\u5b88\u536b \u2192 <code>openUsageGuard</code> / <code>appendUsageEvent</code> / <code>readUsage</code> / <code>closeUsageGuard</code>\uff08FND-ADR-009\uff09</li> <li>\u673a\u5236\u9519\u8bef \u2192 <code>HarnessError</code> / <code>mechanismError</code> / <code>HARNESS_ERROR_KINDS</code></li> </ul>"},{"location":"reference/api/harness/#\u5951\u7ea6\u6821\u9a8c-foundationharnesscontract-validation","title":"\u5951\u7ea6\u6821\u9a8c (foundation.harness.contract-validation)","text":""},{"location":"reference/api/harness/#validateContractDocument--getValidator--resolveSchemaContext--validatorCacheSize","title":"validateContractDocument / getValidator / resolveSchemaContext / validatorCacheSize","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>validateContractDocument(document, { schemaId, dialect, policy = \"strict\" } = {})</code></li> <li><code>getValidator({ schemaId, dialect, policy = \"strict\" } = {})</code></li> <li><code>resolveSchemaContext({ schemaId, dialect, policy = \"strict\" } = {})</code></li> <li><code>validatorCacheSize()</code></li> <li>\u8f93\u5165\uff1aschema \u4e0a\u4e0b\u6587\u6216\u5951\u7ea6\u6587\u6863\u3002</li> <li>\u8f93\u51fa\uff1a\u6821\u9a8c\u7ed3\u679c\uff08\u8bed\u4e49\u540c Contracts <code>validateDocument</code>\uff0c\u4f46\u7ecf Node \u8fd0\u884c\u65f6\u590d\u7528\u7f13\u5b58\uff09\uff1b\u7f13\u5b58\u5927\u5c0f\u67e5\u8be2\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08<code>getValidator</code> / <code>validateContractDocument</code> \u5199\u5165\u8fdb\u7a0b\u5185\u4ee5 schema \u4e3a\u952e\u7684\u6821\u9a8c\u5668\u7f13\u5b58\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u8fdb\u7a0b\u5185\u5185\u5b58\u7f13\u5b58\u6821\u9a8c\u5668\u5b9e\u4f8b\uff1b\u65e0\u6587\u4ef6/Git/\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6cbf\u7528 Contracts <code>SFC1001</code> / <code>SFC1002</code> / <code>SFC1006</code>\uff1b\u5e95\u5c42\u673a\u5236\u5931\u8d25\u7edf\u4e00 <code>SFC2004</code> + <code>HARNESS_ERROR_KINDS</code> \u7684 <code>kind</code>\uff08\u5982 <code>INVALID_PATH</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5df2\u5b89\u88c5 <code>skill-family-contracts</code>\uff1bAjv 8.20.0\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/validation.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/validation.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5951\u7ea6\u4e1a\u52a1\u5b57\u6bb5\u8bed\u4e49\uff08\u8bed\u4e49\u5b9a\u4e49\u4ecd\u5728 Contracts\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8def\u5f84\u6536\u5bb9-foundationharnesspath-containment","title":"\u8def\u5f84\u6536\u5bb9 (foundation.harness.path-containment)","text":""},{"location":"reference/api/harness/#classifyPathInput--resolveContained--readFileContained","title":"classifyPathInput / resolveContained / readFileContained","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>classifyPathInput(input, platform = process.platform)</code></li> <li><code>resolveContained(root, relPath)</code></li> <li><code>readFileContained(root, relPath, { encoding } = {})</code></li> <li>\u8f93\u5165\uff1a\u6839\u76ee\u5f55\uff08\u6536\u5bb9\u8fb9\u754c\uff09\u4e0e\u5f85\u89e3\u6790\u7684\u76f8\u5bf9/\u7edd\u5bf9\u8def\u5f84\u3002</li> <li>\u8f93\u51fa\uff1a\u53d7\u6536\u5bb9\u7edd\u5bf9\u8def\u5f84\u6216\u8bfb\u5230\u7684\u6587\u4ef6\u5185\u5bb9\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>classifyPathInput</code> \u662f\uff1b<code>resolveContained</code> / <code>readFileContained</code> \u4e3a <code>async</code>\uff0c\u542b\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff08\u8bfb\u53d6/\u89e3\u6790\uff09\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u673a\u5236\u5931\u8d25\u629b <code>HarnessError</code>\uff08<code>SFC2004</code>\uff09+ <code>details.kind</code> \u2208 <code>{PATH_TRAVERSAL, SYMLINK_ESCAPE, REALPATH_ESCAPE, INVALID_ROOT, ABSOLUTE_PATH, WINDOWS_DRIVE_PATH, WINDOWS_PATH, UNC_PATH, INVALID_PATH, READ_FAILED}</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8c03\u7528\u65b9\u63d0\u4f9b\u660e\u786e\u6839\u76ee\u5f55\uff1b\u6240\u6709\u89e3\u6790\u7ed3\u679c\u5fc5\u987b\u843d\u5728\u6839\u76ee\u5f55\u5185\uff1bWindows \u76d8\u7b26/UNC \u9003\u9038\u540c\u6837\u62d2\u7edd\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/paths.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/containment.test.mjs</code>\u3001<code>boundaries.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u54ea\u4e9b\u8def\u5f84\u662f\u4e1a\u52a1\u5141\u8bb8\u7684\u9009\u62e9\u89c4\u5219\uff08\u4e1a\u52a1\u9009\u62e9\u8bed\u4e49\u7559\u5728\u8c03\u7528\u65b9\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u4e25\u683c\u8bfb\u53d6-foundationharnessstrict-read","title":"\u4e25\u683c\u8bfb\u53d6 (foundation.harness.strict-read)","text":""},{"location":"reference/api/harness/#readFileStrict","title":"readFileStrict","text":"<ul> <li>\u7b7e\u540d\uff1a<code>readFileStrict(root, relPath, { encoding?, expectedSha256? } = {})</code>\uff08async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u6536\u5bb9\u6839\u76ee\u5f55\u3001\u76f8\u5bf9\u6587\u4ef6\u8def\u5f84\uff0c\u53ef\u9009\u7684 <code>utf8</code> \u7f16\u7801\u4e0e\u5c0f\u5199 sha256 \u9884\u671f\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u51bb\u7ed3\u56de\u6267 <code>{ path, content, sha256, bytes, mode }</code>\u3002\u6307\u5b9a <code>utf8</code> \u65f6\uff0c<code>content</code> \u662f\u5b57\u7b26\u4e32\uff1b\u7701\u7565\u7f16\u7801\u65f6\uff0c<code>content</code> \u662f <code>Buffer</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff0c\u51fd\u6570\u53ea\u8bfb\u4e00\u4e2a\u53d7\u6536\u5bb9\u7684\u666e\u901a\u6587\u4ef6\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u6267\u884c <code>lstat</code>\u3001<code>open</code>\u3001<code>read</code> \u4e0e\u6587\u4ef6\u8eab\u4efd\u590d\u6838\uff1b\u4e0d\u5199\u6587\u4ef6\uff0c\u4e0d\u8bbf\u95ee Git \u6216\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u5931\u8d25\u4f7f\u7528 <code>SFC2004</code>\u3002\u7f3a\u5931\u6587\u4ef6\u8fd4\u56de <code>missing-resource</code>\uff0c\u6458\u8981\u4e0d\u7b26\u8fd4\u56de <code>content-guard-rejected</code>\uff0c\u76ee\u5f55\u8fd4\u56de <code>read-failed</code>\uff0c\u8d8a\u754c\u8def\u5f84\u6cbf\u7528\u8def\u5f84\u6536\u5bb9\u7684\u5931\u8d25\u79cd\u7c7b\u3002</li> <li>\u7b26\u53f7\u94fe\u63a5\u8fb9\u754c\uff1a\u53f6\u8282\u70b9\u7b26\u53f7\u94fe\u63a5\u59cb\u7ec8\u62d2\u7edd\u3002\u7956\u5148\u76ee\u5f55\u53ef\u4ee5\u662f\u6307\u5411\u6839\u5185\u76ee\u5f55\u7684\u7b26\u53f7\u94fe\u63a5\uff1b\u5176\u89c4\u8303\u8def\u5f84\u4ecd\u987b\u53d7 <code>root</code> \u6536\u5bb9\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>expectedSha256</code> \u7684\u6765\u6e90\u4e0e\u4fe1\u4efb\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff1b\u6458\u8981\u53ea\u8986\u76d6\u5b9e\u9645\u8bfb\u5230\u7684\u5b57\u8282\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.6.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/strict-read.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/strict-read.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9009\u62e9\u54ea\u4e2a\u6743\u5a01\u6587\u4ef6\u3001\u6458\u8981\u4ece\u4f55\u800c\u6765\uff0c\u4ee5\u53ca\u8bfb\u53d6\u5931\u8d25\u540e\u7684\u5904\u7f6e\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6-foundationharnessbound-read","title":"\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6 (foundation.harness.bound-read)","text":""},{"location":"reference/api/harness/#createFilesystemRootBinding--readFileBound","title":"createFilesystemRootBinding / readFileBound","text":"<ul> <li>\u7b7e\u540d\uff1a<code>createFilesystemRootBinding(root)</code>\uff1b<code>readFileBound(root, relPath, { rootBinding, encoding?, expectedSha256? } = {})</code>\uff08\u5747\u4e3a async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u5df2\u89c4\u8303\u5316\u7684\u7edd\u5bf9\u771f\u5b9e\u76ee\u5f55\u3001\u53d7\u6536\u5bb9\u7684\u76f8\u5bf9 POSIX \u8def\u5f84\uff0c\u4ee5\u53ca\u8c03\u7528\u65b9\u5148\u524d\u6279\u51c6\u7684\u51bb\u7ed3\u6839\u7ed1\u5b9a\u3002<code>encoding</code> \u4ec5\u652f\u6301 <code>utf8</code>\uff1b\u6743\u5a01\u8bfb\u53d6\u53ef\u5e26\u5c0f\u5199 sha256 \u9884\u671f\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u6839\u7ed1\u5b9a\u4e3a\u51bb\u7ed3\u53ef\u5e8f\u5217\u5316\u503c\uff1b\u8bfb\u53d6\u56de\u6267\u4e3a\u51bb\u7ed3 <code>{ path, content, sha256, bytes, mode, statMode }</code>\u3002<code>mode</code> \u4fdd\u6301\u65e7\u517c\u5bb9\u542b\u4e49\uff08<code>st_mode &amp; 0o777</code>\uff09\uff1b<code>statMode</code> \u662f\u540c\u6b21\u539f\u751f\u6253\u5f00\u63cf\u8ff0\u7b26 <code>fstat</code> \u5f97\u5230\u7684\u5b8c\u6574 POSIX <code>st_mode</code>\uff0c\u5305\u62ec\u6587\u4ef6\u7c7b\u578b\u4e0e\u7279\u6b8a\u6743\u9650\u4f4d\u3002</li> <li>\u8bed\u4e49\u8fb9\u754c\uff1a\u6839\u4e0e\u4e2d\u95f4\u76ee\u5f55\u7531\u56fa\u5b9a\u56db\u5e73\u53f0 N-API \u95ed\u5305\u4ee5\u4e0d\u8ddf\u968f\u7b26\u53f7\u94fe\u63a5\u7684\u53e5\u67c4\u76f8\u5bf9\u65b9\u5f0f\u83b7\u53d6\uff1b\u53f6\u5b50\u5fc5\u987b\u662f\u5355\u94fe\u63a5\u666e\u901a\u6587\u4ef6\u3002\u53e5\u67c4\u4e0d\u4f1a\u9003\u9038\uff0c\u8c03\u7528\u7ed3\u675f\u524d\u5173\u95ed\u3002\u7ed1\u5b9a\u8bfb\u53d6\u4e0d\u63d0\u4f9b\u5220\u9664\u6216\u6062\u590d\u72b6\u6001\u673a\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff1b\u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u89e6 Git\u3001\u7f51\u7edc\u6216\u8fdb\u7a0b\u3002</li> <li>\u9519\u8bef\uff1a\u6839\u8eab\u4efd\u4e0d\u7b26\u3001\u7b26\u53f7\u94fe\u63a5\u7ec4\u4ef6\u3001\u7f3a\u5931\u8d44\u6e90\u548c\u6458\u8981\u4e0d\u7b26\u5747\u5931\u8d25\u5173\u95ed\uff1b\u4e0d\u652f\u6301\u7684 Darwin/Linux \u67b6\u6784\u4e0d\u63d0\u4f9b JavaScript \u56de\u9000\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.9.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/bound-read.mjs</code> \u4e0e <code>src/native/</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/bound-read.test.mjs</code>\u3002</li> </ul>"},{"location":"reference/api/harness/#\u5b8c\u6574\u6811\u89c2\u5bdf-foundationharnessfilesystem-tree-observation","title":"\u5b8c\u6574\u6811\u89c2\u5bdf (foundation.harness.filesystem-tree-observation)","text":""},{"location":"reference/api/harness/#observeFilesystemTree","title":"observeFilesystemTree","text":"<ul> <li>\u7b7e\u540d\uff1a<code>observeFilesystemTree({ root, rootBinding, symlinkPolicy?: { mode: \"reject\" | \"record\" } })</code>\uff08async\uff09\u3002\u8c03\u7528\u65b9\u5148\u7528\u65e2\u6709 <code>createFilesystemRootBinding</code> \u6279\u51c6\u6839\u76ee\u5f55\u3002</li> <li>\u8f93\u5165\uff1a\u5df2\u89c4\u8303\u5316\u7684\u771f\u5b9e\u7edd\u5bf9\u76ee\u5f55\u53ca\u5176\u6839\u7ed1\u5b9a\u3002\u6bcf\u6b21\u8c03\u7528\u91cd\u65b0\u8bfb\u53d6\u76ee\u5f55\u548c\u666e\u901a\u6587\u4ef6\uff0c\u7a7a\u6811\u5408\u6cd5\u3002</li> <li>\u8f93\u51fa\uff1a\u79c1\u6709 <code>filesystem-tree-observation</code>\uff0c\u542b\u6309\u8def\u5f84\u6392\u5e8f\u7684\u5b8c\u6574\u6210\u5458\u3001\u6839\u7ed1\u5b9a\u548c <code>membersDigest</code>\u3002\u6587\u4ef6\u6210\u5458\u5305\u542b\u540c\u6b21\u8bfb\u53d6\u7684 <code>contentBase64</code>\u3001<code>sha256</code>\u3001<code>bytes</code> \u4e0e\u5b8c\u6574 POSIX <code>statMode</code>\uff1b\u76ee\u5f55\u6210\u5458\u53ea\u542b\u8def\u5f84\u3001\u7c7b\u578b\u548c\u6a21\u5f0f\uff0c\u4e0d\u4f2a\u9020\u6587\u4ef6\u6458\u8981\u3002\u7701\u7565 <code>symlinkPolicy</code> \u6216\u4f7f\u7528 <code>reject</code> \u65f6\u4fdd\u6301 0.14 \u7684 UTF-16 \u5173\u7cfb\u987a\u5e8f\u548c\u65e2\u6709\u539f\u751f\u8bed\u4e49\uff1b<code>record</code> \u5728\u7a33\u5b9a\u3001\u8c03\u7528\u65b9\u9694\u79bb\u4e14\u65e0\u5e76\u53d1 namespace writer \u7684\u672c\u5730\u6811\u4e0a\u8d70 Node/JS \u5206\u652f\uff0c\u4f7f\u7528 Unicode \u7801\u70b9\u987a\u5e8f\uff0c\u8bb0\u5f55 symlink \u81ea\u8eab\u7684 <code>targetBase64</code>\u3001<code>bytes</code>\u3001<code>statMode</code>\uff0c\u7edd\u4e0d\u8bfb\u53d6\u6216\u9012\u5f52 target\u3002<code>membersDigest</code> \u6309\u6240\u9009\u6a21\u5f0f\u7684\u6210\u5458\u987a\u5e8f\u63a8\u5bfc\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\uff0c\u4e0d\u5b89\u88c5\u3001\u4e0d\u542f\u52a8\u8fdb\u7a0b\u3001\u4e0d\u8bbf\u95ee\u7f51\u7edc\u3002\u7ed3\u679c\u542b\u539f\u59cb\u6587\u4ef6\u5185\u5bb9\uff0c\u8c03\u7528\u65b9\u5fc5\u987b\u4fdd\u62a4\u654f\u611f\u6570\u636e\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u53c2\u6570\u4e0d\u5408\u6cd5\u629b <code>TypeError</code>\uff0c\u673a\u5236\u5931\u8d25\u6cbf <code>SFC2004</code> \u5173\u95ed\uff0c\u4e0d\u628a\u90e8\u5206\u89c2\u5bdf\u62a5\u544a\u4e3a\u6210\u529f\u3002record \u68c0\u6d4b\u5230\u89c2\u5bdf\u671f\u95f4\u7684\u6f02\u79fb\u5373\u5931\u8d25\u5173\u95ed\uff0c\u666e\u901a\u6587\u4ef6\u590d\u7528 <code>readFileBound</code>\uff0c\u786c\u94fe\u63a5\u4e0e\u7279\u6b8a\u6587\u4ef6\u7ee7\u7eed\u62d2\u7edd\u3002</li> <li>\u4fdd\u8bc1\u8fb9\u754c\uff1a\u6bcf\u6b21\u68c0\u67e5\u540c\u4e00\u6839\u7ed1\u5b9a\uff0c\u4e0d\u4f7f\u7528\u65e7\u7f13\u5b58\uff1brecord \u662f best-effort candidate\uff0c\u4e0d\u627f\u8bfa\u4e8b\u52a1\u5feb\u7167\u3001\u540c UID \u6076\u610f\u5e76\u53d1\u6216 ABA \u5b89\u5168\u3002\u6d88\u8d39\u8005\u8d1f\u8d23\u5728\u5bbf\u4e3b\u547d\u4ee4\u5b8c\u6210\u540e\u8c03\u7528\uff0c\u5e76\u4fdd\u7559 npm <code>.bin</code> \u7b49\u9886\u57df\u63a5\u53d7\u89c4\u5219\uff1b\u771f\u5b9e\u6076\u610f\u5e76\u53d1\u5a01\u80c1\u5e94\u4ea4\u56de Foundation\uff0c\u4e0d\u5728\u672c\u5730\u590d\u5236 walker\u3001native addon\u3001Harness\u3001schema\u3001Registry\u3001runner \u6216 receipt \u94fe\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.13.0</code> / <code>candidate</code>\u3002\u89c2\u5bdf\u5b8c\u6210\u4e0d\u7b49\u4e8e\u6d88\u8d39\u8005\u63a5\u53d7\u8f7d\u8377\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/filesystem-observation.mjs</code> \u4e0e <code>src/native/bound_read.c</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\uff1a<code>packages/skill-family-engineering-kit/test/plugin-verification.test.mjs</code> \u7684\u5b9e\u9645\u6811\u89c2\u5bdf\u4e0e\u8f7d\u8377\u653f\u7b56\u7ec4\u5408\u6d4b\u8bd5\u3002</li> </ul>"},{"location":"reference/api/harness/#\u53ef\u6267\u884c\u8eab\u4efd\u89c2\u5bdf-foundationharnessexecutable-identity-observation","title":"\u53ef\u6267\u884c\u8eab\u4efd\u89c2\u5bdf (foundation.harness.executable-identity-observation)","text":""},{"location":"reference/api/harness/#observeExecutableIdentity","title":"observeExecutableIdentity","text":"<ul> <li>\u7b7e\u540d\uff1a<code>observeExecutableIdentity({ boundRoots, lookup, interpreterPolicy? })</code>\uff08async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u8c03\u7528\u65b9\u63d0\u4f9b\u7684\u975e\u91cd\u53e0\u771f\u5b9e\u6839\u7ed1\u5b9a\u3001\u7edd\u5bf9\u8def\u5f84\u6216\u663e\u5f0f <code>pathEntries</code> \u67e5\u627e\uff0c\u4ee5\u53ca\u53ef\u9009\u7684\u663e\u5f0f\u89e3\u91ca\u5668\u6839\u7b56\u7565\uff1b\u4e0d\u8bfb\u53d6 ambient <code>PATH</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u9010\u6b21\u53ea\u8bfb\u7684\u53ef\u6267\u884c\u5165\u53e3\u89c2\u5bdf\uff0c\u542b <code>canonicalEntry</code>\u3001symlinkChain\u3001<code>sha256</code>\u3001<code>bytes</code>\u3001<code>statMode</code>\u3001<code>entryKind</code>\u3001\u89e3\u91ca\u5668\u4e0e <code>launch</code> \u8ba1\u5212\u3002<code>/usr/bin/env</code> shebang \u901a\u8fc7\u663e\u5f0f <code>pathEntries</code> \u627e\u5230\u89e3\u91ca\u5668\u65f6\uff0c\u89e3\u91ca\u5668\u89c2\u5bdf\u4fdd\u7559\u5019\u9009\u5165\u53e3\u7684\u5b8c\u6574 symlink chain\uff0c\u4e0d\u6298\u53e0\u6210\u6700\u7ec8\u6587\u4ef6\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb <code>lstat</code> / <code>readlink</code> \u4e0e\u65e2\u6709 <code>readFileBound</code>\uff1b\u4e0d\u542f\u52a8\u8fdb\u7a0b\u3001\u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u4f7f\u7528\u8de8\u8c03\u7528\u7f13\u5b58\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u8def\u5f84\u8d8a\u754c\u3001\u7b26\u53f7\u94fe\u63a5\u6f02\u79fb\u6216\u5faa\u73af\u3001\u975e\u5355\u94fe\u63a5\u53ef\u6267\u884c\u666e\u901a\u6587\u4ef6\u3001\u89e3\u91ca\u5668\u7b56\u7565\u4e0d\u7b26\u53ca\u5b57\u8282\u53d8\u5316\u5747\u5931\u8d25\u5173\u95ed\uff1b\u4e0d\u8fd4\u56de\u90e8\u5206\u8eab\u4efd\u7ed3\u679c\u3002</li> <li>\u4fdd\u8bc1\u8fb9\u754c\uff1a\u8fd9\u662f\u9010\u6b21\u70b9\u65f6\u89c2\u5bdf\uff0c\u8c03\u7528\u65b9\u5fc5\u987b\u5728\u6b63\u5f0f\u542f\u52a8\u524d\u7d27\u90bb\u91cd\u89c2\u5bdf\u3002\u5b83\u4e0d\u8bc1\u660e wrapper \u63a7\u5236\u6d41\u3001ambient PATH\u3001fd-exec\u3001\u5185\u6838\u6700\u7ec8\u6620\u50cf\u3001\u7b7e\u540d\u4fe1\u4efb\u3001\u8de8\u8c03\u7528\u8fde\u7eed\u8eab\u4efd\u3001\u5bbf\u4e3b\u652f\u6301/\u751f\u547d\u5468\u671f\u6216\u9886\u57df\u63a5\u53d7\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.15.0</code> / <code>candidate</code>\u3002\u89c2\u5bdf\u5b8c\u6210\u4e0d\u7b49\u4e8e\u5bbf\u4e3b\u8d44\u683c\u6216\u542f\u52a8\u6388\u6743\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/executable-identity.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\uff1a<code>packages/skill-family-harness-node/test/foundation-015-harness.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u547d\u4ee4\u9009\u62e9\u3001\u6b63\u5f0f\u542f\u52a8\u3001wrapper/argv \u8bed\u4e49\u3001\u7b7e\u540d\u4e0e\u8ba4\u8bc1\u4fe1\u4efb\u3001\u5bbf\u4e3b\u652f\u6301/\u751f\u547d\u5468\u671f\u8d44\u683c\u3001\u9886\u57df\u63a5\u53d7\u53ca\u91cd\u89c2\u5bdf\u65f6\u673a\u3002</li> </ul>"},{"location":"reference/api/harness/#\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03-foundationharnessfixed-set-publication","title":"\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03 (foundation.harness.fixed-set-publication)","text":""},{"location":"reference/api/harness/#createFixedSetPublicationManifest--publishFixedSet","title":"createFixedSetPublicationManifest / publishFixedSet","text":"<ul> <li>\u7b7e\u540d\uff1a<code>createFixedSetPublicationManifest({ sourceRoot, targetParent, targetSegment })</code>\uff1b<code>publishFixedSet({ sourceRoot, targetParent, targetSegment, manifest })</code>\uff08\u5747\u4e3a async\uff09\u3002\u7a33\u5b9a\u5165\u53e3\u4e5f\u7531 <code>skill-family-harness-node/fixed-set-publication</code> \u5bfc\u51fa\u3002</li> <li>\u8f93\u5165\uff1a\u540c\u4e00\u89c4\u8303\u7236\u76ee\u5f55\u4e0b\u7684\u6e90\u76ee\u5f55\u3001\u76ee\u6807\u7236\u76ee\u5f55\u3001\u4e00\u4e2a\u5b89\u5168\u76ee\u6807\u6bb5\u548c\u6b64\u524d\u51bb\u7ed3\u7684\u5b8c\u6574\u96c6\u5408 manifest\u3002</li> <li>\u8f93\u51fa\uff1a\u5b8c\u6574\u96c6\u5408 manifest \u4e0e\u7ed3\u6784\u5316 publication receipt\u3002receipt \u7ec8\u6001\u4e3a <code>succeeded</code>\u3001<code>refused</code>\u3001<code>failed</code> \u6216 <code>indeterminate</code>\u3002</li> <li>\u8bed\u4e49\u8fb9\u754c\uff1a\u53d1\u5e03\u4f7f\u7528 Darwin <code>renameatx_np(RENAME_EXCL)</code> \u6216 Linux <code>renameat2(RENAME_NOREPLACE)</code> \u7684\u56fa\u5b9a\u539f\u751f\u95ed\u5305\uff1b\u4e0d\u4f7f\u7528\u68c0\u67e5\u540e <code>rename</code> \u7684 JavaScript \u66ff\u4ee3\uff0c\u4e0d\u63d0\u4f9b\u8eab\u4efd\u4fdd\u62a4\u5220\u9664\uff0c\u4e0d\u81ea\u52a8\u91cd\u8bd5\u3001\u56de\u6eda\u6216\u6062\u590d <code>indeterminate</code>\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u4ec5\u5728\u6210\u529f\u65f6\u5bf9\u76ee\u6807\u76ee\u5f55\u6267\u884c\u4e00\u6b21\u4e0d\u66ff\u6362\u53d1\u5e03\uff1b\u5931\u8d25\u5173\u95ed\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.9.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/fixed-set-publication.mjs</code> \u4e0e\u56fa\u5b9a\u539f\u751f\u52a0\u8f7d\u5668\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/stable-filesystem-operations.test.mjs</code> \u4e0e\u65e2\u6709\u56fa\u5b9a\u96c6\u5408\u8fb9\u754c\u6d4b\u8bd5\u3002</li> </ul>"},{"location":"reference/api/harness/#replaceFixedSetAtomic","title":"replaceFixedSetAtomic","text":"<ul> <li>\u7b7e\u540d\uff1a<code>replaceFixedSetAtomic({ sourceRoot, targetParent, targetSegment })</code>\uff08async\uff09\u3002\u5305\u6839\u4e0e <code>skill-family-harness-node/fixed-set-publication</code> \u5b50\u8def\u5f84\u5747\u5bfc\u51fa\u3002</li> <li>\u8f93\u5165\uff1a\u5df2\u7ecf\u5b8c\u6574\u751f\u6210\u7684\u771f\u5b9e <code>sourceRoot</code>\u3001\u89c4\u8303 <code>targetParent</code> \u548c\u4e00\u4e2a\u5b89\u5168 <code>targetSegment</code>\u3002\u6e90\u76ee\u5f55\u4e0e\u65e2\u6709\u76ee\u6807\u5fc5\u987b\u662f\u540c\u4e00\u89c4\u8303\u7236\u76ee\u5f55\u4e0b\u7684\u5144\u5f1f\u76ee\u5f55\uff1b\u4e24\u68f5\u6811\u53ea\u5141\u8bb8\u771f\u5b9e\u76ee\u5f55\u4e0e\u5355\u94fe\u63a5\u666e\u901a\u6587\u4ef6\u3002</li> <li>\u8f93\u51fa\uff1a\u786e\u8ba4\u6210\u529f\u65f6\u8fd4\u56de\u76ee\u6807\u8def\u5f84\u3001\u4fdd\u7559\u65e7\u76ee\u6807\u7684 <code>displacedTargetPath</code>\uff0c\u4ee5\u53ca <code>publicationState=published</code>\u3001<code>commitState=exchange-committed</code>\u3001<code>verification=verified</code>\u3001<code>durability=namespace-synced</code> \u548c\u4e24\u68f5\u6811\u7684\u95ed\u5305\u6458\u8981\u3002</li> <li>\u63d0\u4ea4\u8bed\u4e49\uff1a\u590d\u9a8c\u7236\u76ee\u5f55\u3001\u6e90\u548c\u76ee\u6807\u8eab\u4efd\u540e\uff0c\u5728\u540c\u4e00\u7236\u76ee\u5f55\u53e5\u67c4\u4e0b\u53ea\u6267\u884c\u4e00\u6b21 Darwin <code>RENAME_SWAP</code> \u6216 Linux <code>RENAME_EXCHANGE</code>\u3002\u6210\u529f\u540e\uff0c\u65b0\u96c6\u5408\u5b8c\u6574\u4f4d\u4e8e\u76ee\u6807\u8def\u5f84\uff0c\u88ab\u7f6e\u6362\u7684\u65e7\u76ee\u6807\u5b8c\u6574\u7559\u5728\u539f <code>sourceRoot</code>\uff1bFoundation \u4e0d\u5220\u9664\u4efb\u4e00\u76ee\u5f55\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u53d7\u652f\u6301\u7684\u63d0\u4ea4\u524d\u5931\u8d25\u4fdd\u6301\u539f\u76ee\u6807\u8def\u5f84\u548c\u5b57\u8282\u4e0d\u53d8\u3002\u673a\u5236\u5931\u8d25\u629b <code>SFC2004</code> + <code>details.kind=atomic-replace-failed</code>\uff1b<code>details</code> \u540c\u65f6\u7ed9\u51fa <code>phase</code>\u3001<code>publicationState</code>\u3001<code>commitState</code>\u3001<code>verification</code> \u4e0e <code>durability</code>\u3002\u4e0d\u652f\u6301\u7684\u5e73\u53f0\u4f7f\u7528 <code>details.kind=unsupported-platform</code>\u3002</li> <li>\u91cd\u8bd5\u8fb9\u754c\uff1a\u8be5\u64cd\u4f5c\u4e0d\u662f\u5e42\u7b49\u64cd\u4f5c\u3002\u76f8\u540c\u53c2\u6570\u518d\u6b21\u8c03\u7528\u4f1a\u4ea4\u6362\u56de\u539f\u72b6\u6001\uff1b\u786e\u8ba4\u6210\u529f\u540e\uff0c\u6216\u6536\u5230\u63d0\u4ea4\u540e\u53ca\u4e0d\u786e\u5b9a\u9519\u8bef\u65f6\uff0c\u4e0d\u5f97\u76f2\u76ee\u91cd\u8bd5\u3002Foundation \u4e0d\u81ea\u52a8\u6267\u884c\u7b2c\u4e8c\u6b21\u4ea4\u6362\u3001\u56de\u6eda\u6216\u6e05\u7406\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.18.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/fixed-set-publication.mjs</code>\u3001\u7a33\u5b9a\u539f\u751f\u52a0\u8f7d\u5668\u4e0e\u56fa\u5b9a\u9884\u6784\u5efa\u95ed\u5305\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/stable-filesystem-operations.test.mjs</code>\uff1bEngineering Kit \u79bb\u7ebf\u6295\u5f71\u7531 <code>packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs</code> \u8986\u76d6\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6682\u5b58\u76ee\u5f55\u7684\u751f\u547d\u5468\u671f\u3001\u6210\u529f\u540e\u7684\u65e7\u76ee\u6807\u6e05\u7406\uff0c\u4ee5\u53ca\u63d0\u4ea4\u540e\u6216\u4e0d\u786e\u5b9a\u5931\u8d25\u7684\u53d6\u8bc1\u4e0e\u6062\u590d\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/harness/#\u539f\u5b50\u5199-foundationharnessatomic-write","title":"\u539f\u5b50\u5199 (foundation.harness.atomic-write)","text":""},{"location":"reference/api/harness/#writeFileAtomic","title":"writeFileAtomic","text":"<ul> <li>\u7b7e\u540d\uff1a<code>writeFileAtomic(root, relPath, data, { mode = 0o644 } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u5df2\u6536\u5bb9\u76ee\u6807\u8def\u5f84\u3001\u6587\u4ef6\u5185\u5bb9\uff08<code>string</code> \u6216 <code>Buffer</code>\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u5199\u5165\u5b8c\u6210\u7684\u6587\u4ef6\uff0c\u5b57\u8282\u4e0e\u8f93\u5165\u4e00\u81f4\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u843d\u76d8\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u6839\u76ee\u5f55\u5185\u521b\u5efa\u4e34\u65f6\u6587\u4ef6\uff0c\u5148 <code>fsync</code> \u518d <code>rename</code> \u8986\u76d6\u76ee\u6807\uff1b\u5931\u8d25\u65f6\u56de\u6eda\u4e34\u65f6\u6587\u4ef6\u3001\u4e0d\u7559\u6b8b\u5f71\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8d8a\u754c\u8def\u5f84\u629b <code>SFC2004</code> + <code>PATH_TRAVERSAL</code>/\u8d8a\u754c\u7c7b <code>kind</code>\uff1b\u975e\u6cd5\u6570\u636e\u7c7b\u578b / \u5199\u5931\u8d25 <code>+ ATOMIC_WRITE_FAILED</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u76ee\u6807\u8def\u5f84\u7ecf <code>path-containment</code> \u9a8c\u8bc1\u5728\u6839\u76ee\u5f55\u5185\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/atomic.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/atomic.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5199\u5165\u5185\u5bb9\u7684\u4e1a\u52a1\u6b63\u786e\u6027\u3002</li> </ul>"},{"location":"reference/api/harness/#\u4e34\u65f6\u5de5\u4f5c\u533a-foundationharnesstemporary-workspace","title":"\u4e34\u65f6\u5de5\u4f5c\u533a (foundation.harness.temporary-workspace)","text":""},{"location":"reference/api/harness/#TemporaryWorkspace--createTemporaryWorkspace--withTemporaryWorkspace","title":"TemporaryWorkspace / createTemporaryWorkspace / withTemporaryWorkspace","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>class TemporaryWorkspace</code>\uff08\u6784\u9020 <code>(options)</code>\uff09</li> <li><code>createTemporaryWorkspace(options)</code>\uff08async\uff09</li> <li><code>withTemporaryWorkspace(fn, options)</code>\uff08async\uff0c\u56de\u8c03\u5f0f\u751f\u547d\u5468\u671f\uff09</li> <li>\u8f93\u5165\uff1a\u53ef\u9009\u524d\u7f00/\u6807\u7b7e\u3002</li> <li>\u8f93\u51fa\uff1a\u4e34\u65f6\u5de5\u4f5c\u76ee\u5f55\u53e5\u67c4\uff1b<code>with</code> \u5728\u56de\u8c03\u7ed3\u675f\u540e\u6e05\u7406\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u521b\u5efa\u5e76\u5220\u9664\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u5b50\u76ee\u5f55\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u5bbf\u4e3b\u4e34\u65f6\u76ee\u5f55\u521b\u5efa\u5b50\u76ee\u5f55\uff0c\u9000\u51fa/\u5f02\u5e38\u65f6\u5220\u9664\uff1b\u4e0d\u6301\u4e45\u5316\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u521b\u5efa\u5931\u8d25 <code>+ WORKSPACE_CREATE_FAILED</code>\uff1b\u6e05\u7406\u5931\u8d25 <code>+ WORKSPACE_DISPOSE_FAILED</code>\uff1b\u5df2\u91ca\u653e\u540e\u4f7f\u7528 <code>+ WORKSPACE_DISPOSED</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5bbf\u4e3b\u63d0\u4f9b\u53ef\u5199\u4e34\u65f6\u76ee\u5f55\uff08\u5982 <code>os.tmpdir</code>\uff09\uff1b\u8def\u5f84\u4e0d\u9003\u9038\u51fa\u5bbf\u4e3b\u4e34\u65f6\u6839\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/workspace.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/workspace.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e34\u65f6\u4ea7\u7269\u7684\u6700\u7ec8\u53bb\u5904\uff08\u6301\u4e45\u6001\u8f6c <code>state-store</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8d44\u6e90\u95ed\u5305-foundationharnessresource-closure","title":"\u8d44\u6e90\u95ed\u5305 (foundation.harness.resource-closure)","text":""},{"location":"reference/api/harness/#computeResourceClosure--digestBytes--closureContains","title":"computeResourceClosure / digestBytes / closureContains","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>computeResourceClosure({ root, resources } = {})</code>\uff08async\uff09</li> <li><code>digestBytes(bytes)</code></li> <li><code>closureContains(closure, relPath)</code></li> <li>\u8f93\u5165\uff1a\u8d44\u6e90\u5217\u8868\uff08\u8def\u5f84 + \u5185\u5bb9\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u786e\u5b9a\u6027\u95ed\u5305\u5bf9\u8c61\u4e0e sha256 \u6458\u8981\uff1b<code>closureContains</code> \u5224\u5b9a\u67d0\u76f8\u5bf9\u8def\u5f84\u662f\u5426\u5728\u95ed\u5305\u5185\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>digestBytes</code> / <code>closureContains</code> \u662f\uff1b<code>computeResourceClosure</code> \u542b\u6309 <code>root</code> \u8bfb\u53d6\u8d44\u6e90\uff0c\u5c5e\u53d7\u63a7\u53ea\u8bfb\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u6309 <code>root</code> \u53ea\u8bfb\u8bfb\u53d6\u8d44\u6e90\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u6cd5/\u91cd\u590d\u8d44\u6e90\u58f0\u660e\u629b <code>SFC2004</code> + <code>CLOSURE_CONFLICT</code> / <code>MISSING_RESOURCE</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8d44\u6e90\u4e3a\u53ef\u5e8f\u5217\u5316\u6587\u672c\u6761\u76ee\uff08\u4e8c\u8fdb\u5236\u6295\u5f71\u660e\u786e unsupported\uff09\uff1b\u53bb\u91cd\u4e0e\u6392\u5e8f\u56fa\u5b9a\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/closure.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/closure.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u8d44\u6e90\u4e1a\u52a1\u542b\u4e49\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8fdb\u7a0b\u76d1\u7763-foundationharnesssupervise-process","title":"\u8fdb\u7a0b\u76d1\u7763 (foundation.harness.supervise-process)","text":""},{"location":"reference/api/harness/#superviseProcess--validateTimeoutPolicy","title":"superviseProcess / validateTimeoutPolicy","text":"<ul> <li>\u7b7e\u540d\uff1a<code>superviseProcess(options, deps = {})</code>\uff08async\uff09\uff1b<code>validateTimeoutPolicy(policy)</code>\u3002</li> <li>\u8f93\u5165\uff1a\u53d7\u7ea6\u675f\u7684 command\u3001args\u3001cwd\u3001\u73af\u5883\u3001\u8d85\u65f6\u7b56\u7565\u4e0e\u65e2\u6709\u76d1\u7763\u9009\u9879\u30020.11.0 \u53ef\u9009 <code>rawSink</code> \u53ea\u63a5\u53d7 <code>{ root, stdoutFile, stderrFile, onClosed? }</code>\uff1a\u6839\u5fc5\u987b\u5728\u6253\u5f00\u65f6\u5df2\u662f fresh canonical \u76ee\u5f55\uff0c\u4e24\u4e2a\u6587\u4ef6\u540d\u5fc5\u987b\u662f\u4e0d\u540c\u7684\u5355\u6bb5\u76f8\u5bf9\u540d\u3002</li> <li>\u53ef\u9009\u6bcf\u6d41\u4e0a\u9650\uff1a<code>outputByteLimits</code> \u4e3a <code>{ stdout?, stderr? }</code>\uff0c\u81f3\u5c11\u58f0\u660e\u4e00\u6d41\uff0c\u5404\u503c\u4e3a 0 \u5230 <code>Number.MAX_SAFE_INTEGER</code> \u7684\u6574\u6570\u3002\u6309\u539f\u59cb\u5b57\u8282\u72ec\u7acb\u8ba1\u6570\uff0c\u7b49\u4e8e\u4e0a\u9650\u5141\u8bb8\uff0c\u9996\u6b21\u8d85\u8fc7\u4e0a\u9650\u8fdb\u5165\u65e2\u6709\u8fdb\u7a0b\u7ec4\u7ec8\u6b62\u6d41\u7a0b\u3002</li> <li>\u8f93\u51fa\uff1a\u4e00\u4e2a\u65e2\u6709\u7684 <code>watchdog-termination-envelope</code>\u3002<code>rawSink.onClosed</code> \u53ea\u63a5\u6536\u51bb\u7ed3\u7684 stdout/stderr <code>{ sha256, bytes }</code> \u6458\u8981\uff1b \u5b83\u4e0d\u521b\u5efa\u7b2c\u4e8c\u79cd\u516c\u5f00 envelope \u6216 receipt\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u542f\u52a8\u4e00\u4e2a\u53d7\u76d1\u7763\u5b50\u8fdb\u7a0b\u3002raw sink \u5728 spawn \u524d\u4ee5 exclusive/no-follow\u30010600 \u6253\u5f00\u4e24\u4e2a\u6587\u4ef6\uff0c\u76f4\u5230 child <code>close</code>\u3001\u4e24\u4e2a stream <code>close</code>\u3001\u5168\u90e8\u6392\u961f\u5199\u5165\u3001<code>fsync</code> \u548c handle <code>close</code> \u90fd\u5b8c\u6210\u624d\u7ed3\u675f\uff1bexit \u540e\u5230\u8fbe\u7684\u5b57\u8282\u4ecd\u8ba1\u5165\u6458\u8981\u3002</li> <li>\u9650\u989d\u7ed3\u679c\uff1a\u4ec5\u914d\u7f6e\u4e0a\u9650\u65f6\uff0c<code>evidence</code> \u589e\u52a0 <code>outputByteLimits</code> \u548c <code>outputLimitExceeded</code>\uff1b\u8d85\u9650\u91c7\u7528 <code>output_limit_exceeded</code> \u7ec8\u6b62\u539f\u56e0\u3002\u4fdd\u5b58\u7684\u622a\u65ad\u6d41\u6458\u8981\u53ea\u8986\u76d6\u5df2\u4fdd\u5b58\u5b57\u8282\u3002\u6d41\u3001\u8fdb\u7a0b\u6216\u5199\u5165\u7ec8\u6001\u672a\u77e5\u65f6\u4ecd\u4f18\u5148\u5931\u8d25\u5173\u95ed\u3002\u672a\u914d\u7f6e\u4e0a\u9650\u4fdd\u7559\u65e7\u884c\u4e3a\u3002</li> <li>\u8eab\u4efd\u8fb9\u754c\uff1a\u8c03\u7528\u65b9\u5fc5\u987b\u5728\u6574\u4e2a\u8c03\u7528\u671f\u95f4\u72ec\u5360 raw sink \u7684\u547d\u540d\u7a7a\u95f4\u3002\u6587\u4ef6\u53e5\u67c4\u4fdd\u62a4\u4e0d\u4f1a\u8bc1\u660e\u8c03\u7528\u671f\u95f4 pathname \u6216\u6839\u76ee\u5f55\u8eab\u4efd\u59cb\u7ec8\u4e0d\u53d8\uff1b \u524d\u540e\u68c0\u67e5\u53ea\u7528\u4e8e\u5c3d\u65e9\u5931\u8d25\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u9009\u9879\u5f62\u72b6\u9519\u8bef\u629b <code>TypeError</code>\uff1b\u673a\u5236\u5931\u8d25\u629b <code>SFC2004</code>\uff0c\u6cbf\u65e2\u6709 <code>supervise-process-failed</code> \u9519\u8bef\u57df\u5931\u8d25\u5173\u95ed\u3002<code>rawStreamSink</code> \u4ecd\u662f\u660e\u786e\u62d2\u7edd\u7684\u540d\u79f0\uff1b\u517c\u5bb9\u522b\u540d\u3001\u7edd\u5bf9\u8def\u5f84\u3001\u591a\u6bb5\u6587\u4ef6\u540d\u3001\u76f8\u540c stdout/stderr \u540d\u79f0\u4e0e\u975e fresh \u6839\u5747\u88ab\u62d2\u7edd\u3002</li> <li>\u63a5\u7ebf\u8fb9\u754c\uff1a\u4e0d\u8981\u56e0\u4e3a\u5355\u4e00\u6d88\u8d39\u8005\u60f3\u5728\u5199\u6b63\u5f0f\u8bc1\u636e\u524d\u8131\u654f\uff0c\u5c31\u65b0\u589e <code>rawStreamSink</code>\u3001transform sink\u3001\u901a\u7528 sanitizer\u3001\u7b2c\u4e8c\u4e2a\u8fdb\u7a0b runner \u6216\u65b0\u7684\u516c\u5f00 stdout \u5b57\u6bb5/\u56de\u8c03\u3002\u73b0\u6709 <code>rawSink</code> \u9002\u5408\u8c03\u7528\u65b9\u63a5\u53d7\u5728 fresh canonical \u4e34\u65f6\u6839\u4e2d\u4ee5 0600 \u4fdd\u5b58\u539f\u59cb stdout/stderr \u6587\u4ef6\u7684\u573a\u666f\uff1bFoundation \u4e0d\u627f\u8bfa zero-plaintext-on-filesystem\uff0c\u4e5f\u4e0d\u62e5\u6709\u9886\u57df\u8131\u654f\u3001\u8de8\u6d41\u79d8\u5bc6\u53d1\u73b0\u6216\u4e8b\u540e\u906e\u76d6\u3002</li> <li>\u82e5\u6d88\u8d39\u8005\u6709\u786c\u6027\u96f6\u660e\u6587\u843d\u76d8\u8981\u6c42\uff0c\u5e94\u7531\u6d88\u8d39\u8005\u57fa\u4e8e\u660e\u786e\u5a01\u80c1\u6a21\u578b\u62e5\u6709\u8be5\u65b9\u6848\u5e76\u6682\u505c\u76f8\u5173\u8def\u5f84\u3002\u81f3\u5c11\u51fa\u73b0\u7b2c\u4e8c\u4e2a\u72ec\u7acb\u6d88\u8d39\u8005\u548c\u6e05\u6670\u5171\u540c\u5408\u540c\u524d\uff0c \u4e0d\u91cd\u5f00 Foundation \u7684\u516c\u5171\u80fd\u529b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u76d1\u7763\u5165\u53e3\u81ea <code>0.5.0</code> / <code>stable</code>\uff1b\u53d7\u7ea6\u675f raw sink \u81ea <code>0.11.0</code>\uff0c\u4ec5\u63d0\u4f9b\u673a\u5236\uff0c\u4e0d\u627f\u8bfa\u5bbf\u4e3b\u8d44\u683c\u3001\u8ba4\u8bc1\u3001\u9886\u57df \u5224\u65ad\u6216\u53d1\u5e03\u72b6\u6001\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/supervise-process.mjs</code>\u3002\u6b63\u53cd\u4f8b\u6d4b\u8bd5\uff1a <code>packages/skill-family-harness-node/test/supervise-process-validation.test.mjs</code>\u3001 <code>packages/skill-family-harness-node/test/supervise-process-evidence.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u53ef\u6267\u884c\u7a0b\u5e8f\u9009\u62e9\u3001\u8d85\u65f6\u7b56\u7565\u503c\u3001\u8f93\u51fa\u89e3\u91ca\u3001\u8ba4\u8bc1\u3001\u91cd\u8bd5\u548c\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8bf7\u6c42\u7ba1\u7ebf-foundationharnessrequest-processing","title":"\u8bf7\u6c42\u7ba1\u7ebf (foundation.harness.request-processing)","text":""},{"location":"reference/api/harness/#parseRequest--processRequest","title":"parseRequest / processRequest","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>parseRequest(raw)</code></li> <li><code>processRequest(raw, { now = () =&gt; new Date() } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u539f\u59cb\u8bf7\u6c42\u8d1f\u8f7d\uff08\u5e94\u7b26\u5408 kernel \u534f\u8bae\u7ed3\u6784\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u89c4\u8303\u5316 <code>operation-request</code> \u4e0e\u7ec8\u6001 <code>operation-result</code>\uff08\u7ec8\u6001\u96c6\u5408\u56fa\u5b9a\u4e3a <code>REJECTED</code> / <code>FAILED</code> / <code>SUCCESS</code>\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>parseRequest</code> \u662f\uff1b<code>processRequest</code> \u4e3a\u7eaf\u51fd\u6570\u7ba1\u7ebf\uff08\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff0c\u9ed8\u8ba4 <code>now</code> \u53ef\u6ce8\u5165\u4ee5\u4fdd\u8bc1\u786e\u5b9a\u6027\u6d4b\u8bd5\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/Git/\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u89e3\u6790\u5931\u8d25\u8fdb\u5165 <code>REJECTED</code>/<code>FAILED</code> \u7ec8\u6001\u5e76\u5e26 <code>SFC2002</code> / <code>SFC2003</code> / <code>SFC2004</code>\uff1b\u673a\u5236\u5931\u8d25 <code>+ EXECUTION_FAILED</code> <code>kind</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8bf7\u6c42\u7b26\u5408 kernel \u534f\u8bae\u7ed3\u6784\uff1b\u4e1a\u52a1\u8bed\u4e49\u7531\u6d88\u8d39\u8005\u62e5\u6709\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/request.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/request.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u64cd\u4f5c\u7684\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\uff08\u72b6\u6001\u673a/\u91cd\u8bd5\u8f6c <code>loop-agent</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u62a5\u544a-foundationharnessreport","title":"\u62a5\u544a (foundation.harness.report)","text":""},{"location":"reference/api/harness/#validateReportModel--renderReportMarkdown--computeResultDigest--computeModelDigest--digestReport--buildBinding--verifyBinding--checkReport--collectStyleWarnings","title":"validateReportModel / renderReportMarkdown / computeResultDigest / computeModelDigest / digestReport / buildBinding / verifyBinding / checkReport / collectStyleWarnings","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>validateReportModel(reportModel, { resultDocument } = {})</code></li> <li><code>renderReportMarkdown(model)</code></li> <li><code>computeResultDigest(resultDocument)</code> / <code>computeModelDigest(reportModel)</code> / <code>digestReport(reportMarkdown)</code></li> <li><code>buildBinding(reportModel, resultDocument, reportMarkdown)</code></li> <li><code>verifyBinding(binding, { reportModel, resultDocument, reportMarkdown } = {})</code></li> <li><code>checkReport({ reportMarkdown, reportModel, resultDocument, binding } = {})</code></li> <li><code>collectStyleWarnings(reportMarkdown)</code></li> <li>\u8f93\u5165\uff1a<code>report-model</code>\u3001\u6e32\u67d3\u9009\u9879\uff08<code>locale</code> / <code>audience</code> / <code>style</code>\uff09\uff1b<code>SUPPORTED_REPORT_LOCALES = [zh-CN, en-US]</code>\u3002</li> <li>\u8f93\u51fa\uff1aMarkdown \u6587\u672c\u3001\u7ed1\u5b9a\u5bf9\u8c61\u3001\u5206\u7ea7\u68c0\u67e5\u53d1\u73b0\uff1b\u4eba\u7c7b\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u6d3e\u751f\uff0c\u7981\u6b62\u81ea\u7531\u64b0\u5199\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u65e0\u65f6\u949f\u3001\u65e0\u73af\u5883\u3001\u65e0\u7f51\u7edc\u3001\u65e0\u6a21\u578b\u8c03\u7528\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/Git/\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC3001</code>\uff08<code>REPORT_DIGEST_MISMATCH</code>\uff0c\u7ed1\u5b9a\u6458\u8981\u4e0d\u7b26\u6216\u62a5\u544a\u975e\u6a21\u578b\u89c4\u8303\u6e32\u67d3\uff09\u3001<code>SFC3002</code>\uff08<code>REPORT_ELEMENT_MISSING</code>\uff0c\u5f3a\u5236\u5143\u7d20\u7f3a\u5931\uff09\u3001<code>SFC3003</code>\uff08<code>REPORT_FACT_DRIFT</code>\uff0c\u62a5\u544a\u6539\u5199\u7ed1\u5b9a\u7ed3\u679c\u4e8b\u5b9e\u6216\u5b57\u8282\u4e0e\u786e\u5b9a\u6027\u518d\u6e32\u67d3\u4e0d\u4e00\u81f4\uff09\u3002\u98ce\u683c\u544a\u8b66\u7531 <code>collectStyleWarnings</code> \u4ea7\u51fa\uff0c\u4ec5\u5efa\u8bae\u3001\u4e0d\u7f16\u7801\u3001\u4e0d\u963b\u65ad\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>REPORT_RENDERER_NAME</code> / <code>VERSION</code> \u53d6\u81ea\u5404\u81ea package\uff08\u5f53\u524d <code>0.3.0</code>\uff09\uff1b\u53cc\u8f93\u51fa\u6210\u7ec4\u5199\u5165\u5e76\u62d2\u7edd\u8def\u5f84\u522b\u540d\u4e0e\u8f93\u5165\u8986\u76d6\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/report.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/report.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u62a5\u544a\u4e1a\u52a1\u7ed3\u8bba\u7684\u89e3\u8bfb\uff08\u7f16\u6392\u7531 Kit <code>report</code> \u5b50\u52a8\u4f5c\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u5bbf\u4e3b\u9002\u914d\u673a\u5236-foundationharnesshost-adapter","title":"\u5bbf\u4e3b\u9002\u914d\u673a\u5236 (foundation.harness.host-adapter)","text":""},{"location":"reference/api/harness/#normalizeAdapterSource--buildAdapterClosure--verifyAdapterBuildManifest--verifyPeerAdapterDirectories--materializeAdapterBuild--probeVersionVector","title":"normalizeAdapterSource / buildAdapterClosure / verifyAdapterBuildManifest / verifyPeerAdapterDirectories / materializeAdapterBuild / probeVersionVector","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>normalizeAdapterSource(input)</code></li> <li><code>buildAdapterClosure({ hostId, pathCategory, input } = {})</code></li> <li><code>verifyAdapterBuildManifest(manifestInput, { hostId, pathCategory } = {})</code></li> <li><code>verifyPeerAdapterDirectories({ request, peerRoots } = {})</code>\uff08async\uff09\uff1a\u4ece\u4e24\u4e2a\u6216\u66f4\u591a\u771f\u5b9e peer \u6839\u76ee\u5f55\u91cd\u7b97\u5171\u540c\u95ed\u5305\u3001\u6807\u51c6 manifest \u548c\u5b8c\u6574 <code>logicalMappings</code>\u3002</li> <li><code>materializeAdapterBuild({ targetRoot, build, writer = writeFileAtomic } = {})</code>\uff08async\uff09</li> <li><code>probeVersionVector({ hostId, capabilities, executable, argv, allowSpawn = false, timeoutMs = 5000, runner = spawnSync } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1aadapter source\u3001\u76ee\u6807\u8def\u5f84\u3001probe \u9009\u9879\u3002</li> <li>\u8f93\u51fa\uff1a\u6784\u5efa\u95ed\u5305\u3001\u6821\u9a8c\u540e\u7684\u6e05\u5355\u3001materialize \u4ea7\u7269\u3001\u7248\u672c\u5411\u91cf\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>normalizeAdapterSource</code> / <code>buildAdapterClosure</code> / <code>verifyAdapterBuildManifest</code> \u662f\uff1b<code>materializeAdapterBuild</code> / <code>probeVersionVector</code> \u542b\u843d\u76d8\u6216\u8fdb\u7a0b\u8c03\u7528\u3002</li> <li>\u526f\u4f5c\u7528\uff1a<code>materializeAdapterBuild</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u521b\u5efa sibling staging \u5e76\u5355\u6b21 rename\uff1b<code>probeVersionVector</code> \u9ed8\u8ba4 <code>allowSpawn=false</code>\uff0c\u4e0d\u53d6 PATH\u3001\u4e0d\u81ea\u52a8\u6267\u884c\u5bbf\u4e3b\u4e8c\u8fdb\u5236\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6e05\u5355\u6458\u8981\u4e0d\u7b26 <code>+ MANIFEST_MISMATCH</code>\uff1b\u76ee\u6807\u5df2\u5b58\u5728 <code>+ PORTABLE_PATH_COLLISION</code>\uff1b\u975e\u53d7\u4fe1\u53ef\u6267\u884c\u6587\u4ef6 <code>+ UNTRUSTED_EXECUTABLE</code>\uff1b\u6784\u5efa/\u63a2\u6d4b\u5931\u8d25 <code>+ HOST_BUILD_FAILED</code> / <code>HOST_PROBE_FAILED</code>\uff1b\u5951\u7ea6\u4e0d\u7b26 <code>+ HOST_CONTRACT_INVALID</code>\uff1b\u4ee5\u4e0a\u5747\u5305\u4e8e <code>SFC2004</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aadapter source \u4e3a\u5df2\u58f0\u660e\u6587\u672c\u95ed\u5305\uff08<code>content</code> \u7c7b\u578b\u56fa\u5b9a <code>string</code>\uff0c\u4ec5 utf8\uff1b\u4e8c\u8fdb\u5236\u6295\u5f71 unsupported\uff09\uff1b\u53d7\u4fe1\u53ef\u6267\u884c\u6587\u4ef6\u65b9\u53ef materialize\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/host.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/host.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5bbf\u4e3b\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\u4e0e\u672c\u5730\u751f\u547d\u5468\u671f\u51b3\u7b56\uff1bKit \u53ea\u590d\u7528\u672c\u8282\u7684\u7ed1\u5b9a\u8bfb\u53d6\u3001\u4e25\u683c\u4e0d\u66ff\u6362\u53d1\u5e03\u548c\u539f\u5b50\u5199\u673a\u5236\uff0c\u4e0d\u7531 Harness \u6ce8\u518c\u5bbf\u4e3b\u522b\u540d\u6216 driver\u3002</li> </ul> <p><code>verifyPeerAdapterDirectories</code> \u662f\u53ea\u8bfb\u5165\u53e3\u3002\u5b83\u9010\u7ea7\u679a\u4e3e\u548c\u8bfb\u53d6\u771f\u5b9e\u76ee\u5f55\uff0c\u62d2\u7edd\u7b26\u53f7\u94fe\u63a5\u3001\u8def\u5f84\u9003\u9038\u3001\u975e\u666e\u901a\u6587\u4ef6\u3001\u7f3a\u5931/\u591a\u51fa\u6216\u9010\u5b57\u8282\u6458\u8981\u4e0d\u4e00\u81f4\uff1bmapping \u5fc5\u987b\u552f\u4e00\u8986\u76d6\u6bcf\u4e2a\u771f\u5b9e <code>SKILL.md</code>\u3002\u5b83\u6309 <code>peerId</code> \u5f52\u4e00\u5316\u6bd4\u8f83\u95ed\u5305\uff0c\u56e0\u6b64\u8bf7\u6c42\u987a\u5e8f\u4e0d\u4f1a\u5f71\u54cd\u7ed3\u679c\u3002\u5931\u8d25\u4f7f\u7528\u65e2\u6709 <code>SFC2003</code>/<code>SFC2004</code> \u4e0e <code>details.kind</code>\uff0c\u4e0d\u8fd4\u56de\u90e8\u5206\u6210\u529f\uff0c\u4e5f\u4e0d\u5199\u5165 peer \u6839\u76ee\u5f55\u3002</p>"},{"location":"reference/api/harness/#\u6301\u4e45\u72b6\u6001\u5e95\u5ea7-foundationharnessstate-store","title":"\u6301\u4e45\u72b6\u6001\u5e95\u5ea7 (foundation.harness.state-store)","text":""},{"location":"reference/api/harness/#openStateStore--appendEvent--readEvents--readSnapshot--writeSnapshot--verifyStateStore--rebuildSnapshot--inspectStateStoreLock--recoverStateStoreLock--closeStateStore--close","title":"openStateStore / appendEvent / readEvents / readSnapshot / writeSnapshot / verifyStateStore / rebuildSnapshot / inspectStateStoreLock / recoverStateStoreLock / closeStateStore / close","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>openStateStore(root, { owner, payloadSchemas, clock } = {})</code>\uff08async\uff09</li> <li><code>appendEvent(store, event)</code>\uff08async\uff09</li> <li><code>readEvents(store, { afterSequence = 0 } = {})</code>\uff08async\uff09</li> <li><code>readSnapshot(store, { reducer, initial = null } = {})</code>\uff08async\uff09</li> <li><code>writeSnapshot(store, state, { hostSessionRef, reducer, initial = null } = {})</code>\uff08async\uff09</li> <li><code>verifyStateStore(store, { reducer, initial = null } = {})</code>\uff08async\uff09</li> <li><code>rebuildSnapshot(store, reducer, { initial = null } = {})</code>\uff08async\uff09</li> <li><code>inspectStateStoreLock(root, { clock } = {})</code>\uff08async\uff09</li> <li><code>recoverStateStoreLock(root, { ... } = {})</code>\uff08async\uff09</li> <li><code>closeStateStore(store)</code> / <code>close(store)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u4e8b\u4ef6\u8d1f\u8f7d\u3001\u5feb\u7167\u3001\u9501\u4ee4\u724c\u3002</li> <li>\u8f93\u51fa\uff1a\u4e8b\u4ef6\u3001hash chain \u6821\u9a8c\u7ed3\u679c\u3001\u5feb\u7167\uff1b<code>STATE_GENESIS_DIGEST</code> \u4f5c\u4e3a\u94fe\u8d77\u70b9\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8bfb\u5199\u4e8b\u4ef6\u65e5\u5fd7\u4e0e\u5feb\u7167\u6587\u4ef6\uff0c\u5199\u534f\u4f5c\u5f0f\u5355\u5199\u8005\u9501\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u8def\u5f84\u8bfb\u5199\u4e8b\u4ef6\u65e5\u5fd7\u4e0e\u5feb\u7167\uff1b\u5199\u9501\u6587\u4ef6\u7528\u4e8e\u672c\u5730\u534f\u4f5c\u5f0f\u5355\u5199\u8005\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1ahash chain \u65ad\u88c2 <code>+ CHAIN_BROKEN</code>\uff1b\u9501 fencing \u51b2\u7a81 <code>+ STORE_LOCKED</code>\uff1b\u9501\u635f\u574f <code>+ LOCK_CORRUPT</code>\uff1b\u6062\u590d\u62d2\u7edd <code>+ LOCK_RECOVERY_REFUSED</code>\uff1b\u975e\u6cd5\u4e8b\u4ef6 <code>+ UNSAFE_STATE_ENTRY</code> / <code>EVENT_SCHEMA_INVALID</code>\uff1b\u91cd\u590d\u5e8f\u53f7 <code>+ DUPLICATE_SEQUENCE</code>\uff1b\u5e42\u7b49\u51b2\u7a81 <code>+ IDEMPOTENCY_CONFLICT</code>\uff1b\u5feb\u7167\u4e0d\u4e00\u81f4 <code>+ SNAPSHOT_MISMATCH</code>\uff1b\u5df2\u5173\u95ed <code>+ STORE_CLOSED</code>\uff1b\u4ee5\u4e0a\u5747\u5305\u4e8e <code>SFC2004</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u4e3a\u552f\u4e00\u6743\u5a01\uff0csnapshot \u4e3a\u6d3e\u751f\u7f13\u5b58\uff1bfencing \u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\uff1b<code>confirmOwnerTerminated</code> \u4fe1\u4efb\u951a\u7531\u8c03\u7528\u65b9\u63d0\u4f9b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/state-store.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/state-store.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e8b\u4ef6\u4e1a\u52a1\u542b\u4e49\u3001reducer \u8f6c\u79fb\u3001owner-terminated \u4fe1\u4efb\u951a\uff08\u4e1a\u52a1\u72b6\u6001\u673a/\u7ec8\u6001\u8f6c <code>loop-agent</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u673a\u5236\u9519\u8bef-foundationharnesserrors","title":"\u673a\u5236\u9519\u8bef (foundation.harness.errors)","text":""},{"location":"reference/api/harness/#HarnessError--mechanismError--HARNESS_ERROR_KINDS","title":"HarnessError / mechanismError / HARNESS_ERROR_KINDS","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>class HarnessError extends ContractsError</code>\uff08\u6784\u9020 <code>(code, message, details)</code>\uff0c\u672a\u767b\u8bb0\u7801\u7acb\u5373\u629b <code>TypeError</code>\uff09</li> <li><code>mechanismError(kind, message, extraDetails)</code>\uff08\u8fd4\u56de <code>SFC2004</code> + \u7a33\u5b9a <code>details.kind</code>\uff09</li> <li><code>HARNESS_ERROR_KINDS</code>\uff08\u51bb\u7ed3\u5bf9\u8c61\uff09</li> <li>\u8f93\u5165\uff1a\u9519\u8bef <code>kind</code>\u3001\u4e0a\u4e0b\u6587\u3002</li> <li>\u8f93\u51fa\uff1a\u5e26\u7a33\u5b9a <code>kind</code> \u7684\u9519\u8bef\u5bf9\u8c61\uff1b\u975e\u6cd5 <code>kind</code> \u629b <code>TypeError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u672c\u6a21\u5757\u4e0d\u53d1\u660e\u65b0\u7801\u2014\u2014\u673a\u5236\u5931\u8d25\u7edf\u4e00 <code>SFC2004</code>\uff08<code>EXECUTION_FAILED</code>\uff09\uff0c\u5176\u6ce8\u518c\u542b\u4e49\u4e3a\u300c\u673a\u5236\u8fd0\u884c\u65f6\u6267\u884c\u5408\u89c4\u64cd\u4f5c\u65f6\u5931\u8d25\uff1bdetails \u643a\u5e26\u673a\u5236\u8bc1\u636e\u300d\uff1b<code>details.kind</code> \u53d6\u4e0b\u5217\u51bb\u7ed3\u679a\u4e3e\u4e4b\u4e00\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>HARNESS_ERROR_KINDS</code> \u51bb\u7ed3\uff0c\u65b0\u589e SFC \u7801\u5c5e Contracts \u53d8\u66f4\uff08\u4e0d\u5728\u672c\u5305\u5199\u96c6\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/errors.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/boundary.test.mjs</code>\u3001<code>boundaries.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9519\u8bef\u4e1a\u52a1\u5f52\u56e0\u3002</li> </ul> <p><code>HARNESS_ERROR_KINDS</code> \u51bb\u7ed3\u679a\u4e3e\uff08v1\uff09\uff1a</p> kind \u542b\u4e49 <code>invalid-path</code> / <code>absolute-path</code> / <code>windows-drive-path</code> / <code>windows-path</code> / <code>unc-path</code> \u8def\u5f84\u5f62\u6001\u975e\u6cd5 <code>path-traversal</code> / <code>symlink-escape</code> / <code>realpath-escape</code> \u6536\u5bb9\u9003\u9038 <code>invalid-root</code> \u6839\u76ee\u5f55\u975e\u6cd5 <code>atomic-write-failed</code> / <code>read-failed</code> \u6587\u4ef6\u8bfb\u5199\u5931\u8d25 <code>missing-resource</code> \u8d44\u6e90\u7f3a\u5931 <code>workspace-create-failed</code> / <code>workspace-dispose-failed</code> / <code>workspace-disposed</code> \u4e34\u65f6\u5de5\u4f5c\u533a\u5f02\u5e38 <code>closure-conflict</code> / <code>unsupported-policy</code> \u95ed\u5305/\u7b56\u7565\u51b2\u7a81 <code>execution-failed</code> / <code>invalid-result</code> \u6267\u884c/\u7ed3\u679c\u5f02\u5e38 <code>store-closed</code> / <code>store-locked</code> / <code>lock-corrupt</code> / <code>lock-recovery-refused</code> \u72b6\u6001\u9501\u5f02\u5e38 <code>unsafe-state-entry</code> / <code>event-schema-invalid</code> / <code>duplicate-sequence</code> / <code>idempotency-conflict</code> / <code>chain-broken</code> / <code>snapshot-mismatch</code> \u72b6\u6001\u4e8b\u4ef6\u5f02\u5e38 <code>host-contract-invalid</code> / <code>host-build-failed</code> / <code>host-probe-failed</code> / <code>untrusted-executable</code> / <code>portable-path-collision</code> / <code>manifest-mismatch</code> \u5bbf\u4e3b\u9002\u914d\u5f02\u5e38 <code>baseline-mismatch</code> / <code>content-guard-rejected</code> \u57fa\u7ebf\u7269\u5316\u5931\u8d25\u5173\u95ed <code>read-chokepoint-rejected</code> \u53ea\u8bfb\u51c6\u5165\u62d2\u7edd <code>surface-scan-violation</code> / <code>scan-policy-invalid</code> \u8868\u9762\u626b\u63cf\u5931\u8d25\u5173\u95ed <code>upper-bound-exceeded</code> \u4e0a\u9650\u5b88\u536b\u8d8a\u9650"},{"location":"reference/api/harness/#\u57fa\u7ebf\u7269\u5316-foundationharnessbaseline-materialization","title":"\u57fa\u7ebf\u7269\u5316 (foundation.harness.baseline-materialization)","text":"<p>FND-ADR-009\u3002\u628a\u51bb\u7ed3\u57fa\u7ebf\u7269\u5316\u4e3a\u5b57\u8282\u4fdd\u771f\u7684\u4e34\u65f6\u526f\u672c\uff1a\u7269\u5316\u524d\u6821\u9a8c\u6e90\u6458\u8981\u3001\u7269\u5316\u540e\u540c\u65f6\u6821\u9a8c\u526f\u672c\u6458\u8981\u4e0e\u6e90\u6458\u8981\uff08\u6355\u83b7\u7269\u5316\u4e2d\u9014\u7684\u4efb\u4e00\u4fa7\u53d8\u5316\uff09\uff1b\u526f\u672c\u5185\u7b26\u53f7\u94fe\u63a5\u4e00\u5f8b\u62d2\u7edd\u3002</p>"},{"location":"reference/api/harness/#computeDirectoryDigest--materializeBaseline","title":"computeDirectoryDigest / materializeBaseline","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>computeDirectoryDigest(rootDir)</code>\uff08async\uff0c\u8fd4\u56de 64 \u4f4d\u5c0f\u5199 sha256 \u5341\u516d\u8fdb\u5236\u6458\u8981\uff09</li> <li><code>materializeBaseline({ baselineDir, baselineDigest, prefix = \"sf-baseline-\" } = {})</code>\uff08async\uff0c\u8fd4\u56de\u7269\u5316\u6839\u8def\u5f84\uff09</li> <li>\u8f93\u5165\uff1a\u57fa\u7ebf\u76ee\u5f55\u4e0e\u51bb\u7ed3\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u786e\u5b9a\u6027\u76ee\u5f55\u6458\u8981\uff1b\u7269\u5316\u540e\u7684\u4e34\u65f6\u76ee\u5f55\u6839\u8def\u5f84\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8bfb\u6e90\u6811\u3001\u5728\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u521b\u5efa\u526f\u672c\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6e90\u57fa\u7ebf\uff1b\u5199\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u5e76\u5728\u5931\u8d25\u65f6\u6e05\u7406\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6458\u8981\u4e0d\u7b26\uff08\u7269\u5316\u524d\u6216\u7269\u5316\u540e\uff09\u629b <code>SFC2004</code> + <code>baseline-mismatch</code>\uff08details \u542b <code>phase</code>\uff1a<code>pre-materialization</code> / <code>post-materialization</code>\uff09\uff1b\u76ee\u5f55\u4e0d\u53ef\u7528\u629b <code>invalid-root</code>\uff1b\u5efa\u76ee\u5f55\u5931\u8d25\u629b <code>workspace-create-failed</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8c03\u7528\u65b9\u6301\u6709\u51bb\u7ed3\u6458\u8981\uff1b\u540c\u4e00\u6743\u9650\u7ea7\u8fdb\u7a0b\u53ef\u5728\u7269\u5316\u7a97\u53e3\u5185\u6539\u52a8\u6e90\uff0c\u673a\u5236\u4ee5\u53cc\u7aef\u6458\u8981\u6355\u83b7\u5e76\u5931\u8d25\u5173\u95ed\uff0c\u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/baseline.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/baseline.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6b8b\u7559\u5185\u5bb9\u5224\u5b9a\uff08<code>contentGuard</code> \u8c13\u8bcd\uff09\u4e0e\u526f\u672c\u6700\u7ec8\u53bb\u5904\u3002</li> </ul> <p><code>TemporaryWorkspace.fromBaseline({ baselineDir, baselineDigest, prefix, contentGuard })</code> \u4e0e <code>createTemporaryWorkspace({ baseline: { ... } })</code> \u628a\u7269\u5316\u63a5\u5165\u5de5\u4f5c\u533a\u751f\u547d\u5468\u671f\uff1a<code>contentGuard</code> \u7f3a\u7701\u4e3a\u5141\u8bb8\uff08\u5b57\u8282\u4fdd\u771f\u662f\u673a\u5236\u5951\u7ea6\uff0c\u6b8b\u7559\u5224\u5b9a\u5f52\u6d88\u8d39\u8005\uff09\uff1b\u5b88\u536b\u629b\u9519\u5305\u88c5\u4e3a <code>content-guard-rejected</code> \u5e76 dispose \u526f\u672c\u3002</p>"},{"location":"reference/api/harness/#\u53ea\u8bfb-chokepoint-foundationharnessread-chokepoint","title":"\u53ea\u8bfb chokepoint (foundation.harness.read-chokepoint)","text":"<p>FND-ADR-009\u3002\u628a\u53d7\u4fdd\u62a4\u533a\u57df\u7684\u8bfb\u53d6\u96c6\u4e2d\u5230\u4e00\u4e2a\u51c6\u5165\u5165\u53e3\uff1a\u5141\u8bb8\u6839\u96c6\u5408 + \u53ef\u9009\u8eab\u4efd\u8c13\u8bcd\uff1b\u8d8a\u754c\u3001\u94fe\u63a5\u9003\u9038\u4e0e\u975e\u6388\u6743\u8eab\u4efd\u4e00\u5f8b <code>read-chokepoint-rejected</code>\u3002</p>"},{"location":"reference/api/harness/#createReadChokepoint","title":"createReadChokepoint","text":"<ul> <li>\u7b7e\u540d\uff1a<code>createReadChokepoint({ allowRoots, allowIdentity } = {})</code> \u2192 <code>{ assertReadAllowed, read }</code></li> <li>\u8f93\u5165\uff1a\u975e\u7a7a\u5141\u8bb8\u6839\u96c6\u5408\uff1b\u53ef\u9009\u8eab\u4efd\u8c13\u8bcd <code>(identity) =&gt; boolean</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u51c6\u5165\u540e\u7684 <code>{ root, relPath, absolute }</code> \u6216\u53d7\u6536\u5bb9\u8bfb\u53d6\u7ed3\u679c\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08<code>async</code>\uff0c\u542b\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb realpath / \u6536\u5bb9\u8bfb\u53d6\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8d8a\u754c/\u9003\u9038/\u975e\u6388\u6743\u629b <code>SFC2004</code> + <code>read-chokepoint-rejected</code>\uff1b\u8d44\u6e90\u7f3a\u5931\u629b <code>missing-resource</code>\uff1b\u53c2\u6570\u975e\u6cd5\u629b <code>TypeError</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8c03\u7528\u65b9\u58f0\u660e\u5141\u8bb8\u6839\u96c6\u5408\u4e0e\u8eab\u4efd\u89c4\u5219\uff1b\u673a\u5236\u4e0d\u89e3\u91ca\u4efb\u4f55\u79c1\u6709\u8eab\u4efd\u6216\u8def\u5f84\u8bed\u4e49\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/chokepoint.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/chokepoint.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5141\u8bb8\u6839\u96c6\u5408\u3001\u8eab\u4efd\u8c13\u8bcd\u3001\u51c6\u5165\u540e\u8bfb\u53d6\u8bed\u4e49\u3002</li> </ul> <p>\u5b57\u7b26\u4e32\u8f93\u5165\u4e0e <code>{ root, relPath }</code> \u8f93\u5165\u8d70\u540c\u4e00 <code>resolveContained</code> \u6536\u5bb9\u5206\u7c7b\uff08\u542b macOS <code>/var \u2192 /private/var</code> \u7b49\u7b26\u53f7\u94fe\u63a5\u524d\u7f00\u6839\u7684\u7edf\u4e00\u89c4\u8303\u5316\uff09\u3002</p>"},{"location":"reference/api/harness/#\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf-foundationharnesssurface-scan","title":"\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf (foundation.harness.surface-scan)","text":"<p>FND-ADR-009\u3002\u6309 <code>surface-scan-policy</code> \u5951\u7ea6\u6587\u6863\u5bf9\u58f0\u660e\u8868\u9762\u505a\u8def\u5f84\u4e0e\u5185\u5bb9\u6a21\u5f0f\u626b\u63cf\uff1a\u9996\u4e2a\u547d\u4e2d\u5373\u5931\u8d25\u5173\u95ed\uff1b\u7b56\u7565\u975e\u6cd5\u6216\u6a21\u5f0f\u4e0d\u53ef\u7f16\u8bd1\u540c\u6837\u5931\u8d25\u5173\u95ed\uff1b\u7f3a\u5931\u626b\u63cf\u6587\u4ef6\u4e0d\u9759\u9ed8\u8df3\u8fc7\u3002</p>"},{"location":"reference/api/harness/#scanSurface","title":"scanSurface","text":"<ul> <li>\u7b7e\u540d\uff1a<code>scanSurface({ root, relPaths, policy, encoding = \"utf8\" } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u626b\u63cf\u6839\u3001\u76f8\u5bf9\u8def\u5f84\u6e05\u5355\u3001\u7b56\u7565\u5951\u7ea6\u6587\u6863\u3002</li> <li>\u8f93\u51fa\uff1a<code>{ scanned, bytes, policy }</code>\uff08\u51bb\u7ed3\u5bf9\u8c61\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff1b\u8fdb\u7a0b\u5185\u6b63\u5219\u7f16\u8bd1\uff0c\u65e0\u6301\u4e45\u72b6\u6001\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u547d\u4e2d\u629b <code>SFC2004</code> + <code>surface-scan-violation</code>\uff08details \u542b <code>kindOfHit</code>\uff1a<code>path</code> / <code>content</code>\uff09\uff1b\u7b56\u7565\u975e\u6cd5\u6216\u6a21\u5f0f\u4e0d\u53ef\u7f16\u8bd1\u629b <code>scan-policy-invalid</code>\uff1b\u7f3a\u5931\u6587\u4ef6\u629b <code>missing-resource</code>\uff1b\u53c2\u6570\u975e\u6cd5\u629b <code>TypeError</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u7b56\u7565\u6587\u6863\u901a\u8fc7\u5951\u7ea6\u6821\u9a8c\uff1b<code>allowedUses</code> \u53ea\u643a\u5e26\u4e0d\u89e3\u91ca\uff0c\u547d\u4e2d\u4e0d\u88ab\u8c41\u514d\uff08\u8c41\u514d\u7531\u6d88\u8d39\u8005\u5c42\u5b9e\u73b0\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/surface-scan.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/surface-scan.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u7b56\u7565\u5185\u5bb9\u3001\u5141\u8bb8\u7528\u9014\u8bed\u4e49\u4e0e\u547d\u4e2d\u540e\u7684\u5904\u7f6e\u3002</li> </ul> <p>\u6ce8\u5165\u5f0f\u81ea\u6d4b\u7ea6\u5b9a\uff1a\u626b\u63cf\u5668\u65e0\u72b6\u6001\u2014\u2014\u6ce8\u5165\u6a21\u5f0f\u5e76\u626b\u63cf\u540e\u79fb\u9664\u6ce8\u5165\uff0c\u518d\u6b21\u626b\u63cf\u7ed3\u679c\u5b57\u8282\u4e00\u81f4\uff08\u81ea\u6d4b\u89c1\u6d4b\u8bd5\u6587\u4ef6\uff0c\u4e0d\u5192\u5145\u72ec\u7acb\u590d\u6838\uff09\u3002</p>"},{"location":"reference/api/harness/#token-\u4e0a\u754c\u4f30\u7b97-foundationharnesstoken-estimation","title":"token \u4e0a\u754c\u4f30\u7b97 (foundation.harness.token-estimation)","text":"<p>FND-ADR-009\u3002\u786e\u5b9a\u6027\u9886\u57df\u4f30\u7b97\u539f\u8bed\uff0c\u4e24\u4e2a\u4e92\u76f8\u72ec\u7acb\u7684\u4f30\u7b97\u5668\uff1aUTF-8 \u5b57\u8282\u6570\u4e0a\u754c\uff08<code>estimateTokenUpperBound</code>\uff09\u4e0e\u6309 CJK \u7801\u4f4d/\u7a7a\u767d\u5207\u5206\u7684\u8bcd\u5143\u6570\u4f30\u7b97\uff08<code>estimateTokens</code>\uff0c\u7b97\u6cd5 <code>cjk-char-whitespace-split</code>\uff09\u3002\u4e24\u8005\u5747\u4e3a\u65e0\u6a21\u578b\u3001\u65e0\u7f51\u7edc\u3001\u65e0 tokenizer \u4f9d\u8d56\u3001\u65e0\u6301\u4e45\u72b6\u6001\u5bfc\u5165\u7684\u7eaf\u51fd\u6570\uff1b\u5b57\u8282\u4e0a\u754c\u7ed3\u679c\u7b26\u5408 <code>token-estimate-result</code> \u5951\u7ea6\uff08\u65e0\u65f6\u95f4\u6233\uff0c<code>guarantees</code> \u4e3a\u5c01\u95ed\u679a\u4e3e\uff09\u3002\u6bcf\u6761\u8bcd\u5143\u4f30\u7b97\u8bb0\u5f55\u643a\u5e26\u4f30\u7b97\u5668 id \u4e0e\u7248\u672c\uff08SFA-CONTEXT-028\uff1a\u6d88\u8d39\u65b9\u5fc5\u987b\u80fd\u56de\u7b54\u7ed3\u679c\u51fa\u81ea\u54ea\u4e2a\u4f30\u7b97\u5668\uff09\uff0c\u4e24\u4e2a\u4f30\u7b97\u5668\u7684\u7ed3\u679c\u4e0d\u5f97\u9759\u9ed8\u6df7\u7528\u3001\u4e0d\u5f97\u4e92\u76f8\u66ff\u4ee3\u3002</p>"},{"location":"reference/api/harness/#estimateTokenUpperBound","title":"estimateTokenUpperBound","text":"<ul> <li>\u7b7e\u540d\uff1a<code>estimateTokenUpperBound(text)</code>\uff08\u7eaf\u51fd\u6570\uff09</li> <li>\u8f93\u5165\uff1a\u6587\u672c\u5b57\u7b26\u4e32\u3002</li> <li>\u8f93\u51fa\uff1a<code>token-estimate-result</code> \u5bf9\u8c61\uff08<code>upperBound === inputBytes</code>\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff1b\u96f6\u4f9d\u8d56\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u5b57\u7b26\u4e32\u8f93\u5165\u629b <code>TypeError</code>\uff08\u65e0 SFC \u7801\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8f93\u5165\u4e3a JavaScript \u5b57\u7b26\u4e32\uff1b\u4f30\u7b97\u53ea\u627f\u8bfa\u4e0a\u754c\uff08\u5b57\u8282\u6570\u5373\u4e0a\u754c\uff09\uff0c\u4e0d\u627f\u8bfa\u771f\u5b9e token \u8ba1\u6570\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/token-estimate.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/token-estimate.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4f30\u7b97\u7ed3\u679c\u7684\u89e3\u91ca\u4e0e\u6d88\u8d39\u4fa7\u6362\u7b97\uff08\u6a21\u578b\u8c03\u7528\u4e0e\u771f\u5b9e token \u8ba1\u6570\u4e0d\u5728 Foundation\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#estimateTokens--isCjkCodePoint--\u4f30\u7b97\u5668\u5e38\u91cf","title":"estimateTokens / isCjkCodePoint / \u4f30\u7b97\u5668\u5e38\u91cf","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>estimateTokens(text)</code>\uff08\u7eaf\u51fd\u6570\uff09</li> <li><code>isCjkCodePoint(codePoint)</code>\uff08\u7eaf\u51fd\u6570\uff09</li> <li>\u5e38\u91cf\uff1a<code>TOKEN_ESTIMATOR_ID</code>\uff08<code>skill-family.token-estimator</code>\uff09\u3001<code>TOKEN_ESTIMATOR_VERSION</code>\uff08<code>1.0.0</code>\uff09\u3001<code>TOKEN_ESTIMATION_ALGORITHM</code>\uff08<code>cjk-char-whitespace-split</code>\uff09\u3001<code>CJK_CODE_POINT_RANGES</code>\uff08\u51bb\u7ed3\u7801\u4f4d\u533a\u95f4\u8868\uff09</li> <li>\u8f93\u5165\uff1a\u6587\u672c\u5b57\u7b26\u4e32\uff1b<code>isCjkCodePoint</code> \u63a5\u6536\u6574\u6570\u7801\u4f4d\u3002</li> <li>\u8f93\u51fa\uff1a\u51bb\u7ed3\u7684\u8bcd\u5143\u4f30\u7b97\u8bb0\u5f55\uff08<code>kind: skill-family.token-estimate-record</code>\uff0c<code>schemaVersion: 1</code>\uff09\uff0c\u643a\u5e26 <code>estimator.id</code> / <code>estimator.version</code> / <code>algorithm</code>\u3001\u8f93\u5165\u7edf\u8ba1\uff08<code>codePoints</code> / <code>inputBytes</code>\uff09\u3001\u5207\u5206\u7edf\u8ba1\uff08<code>cjkCharacters</code> / <code>whitespaceSeparators</code> / <code>otherRuns</code>\uff09\u4e0e <code>tokens</code>\uff1b<code>unit</code> \u4e3a <code>tokens</code>\uff0c<code>precision</code> \u4e3a <code>deterministic-heuristic</code>\uff0c<code>scope</code> \u4e3a <code>content-text-only</code>\u3002</li> <li>\u7b97\u6cd5\uff08<code>cjk-char-whitespace-split</code>\uff0c\u9010\u7801\u4f4d\u5355\u904d\u626b\u63cf\uff09\uff1a</li> <li>CJK \u7801\u4f4d\u533a\u95f4\uff08\u51bb\u7ed3\uff09\uff1aU+3400\u2013U+4DBF\uff08\u6269\u5c55 A\uff09\u3001U+4E00\u2013U+9FFF\uff08\u7edf\u4e00\u8868\u610f\u6587\u5b57\uff09\u3001U+F900\u2013U+FAFF\uff08\u517c\u5bb9\u8868\u610f\u6587\u5b57\uff09\u3001U+20000\u2013U+3134F\uff08\u6269\u5c55 B\u2013G\uff09\u3002</li> <li>\u6bcf\u4e2a CJK \u7801\u4f4d\u8ba1 1 \u8bcd\u5143\uff0c\u5e76\u7acb\u5373\u7ec8\u7ed3\u5176\u524d\u5c1a\u672a\u95ed\u5408\u7684 OTHER \u6bb5\u3002</li> <li>\u8fde\u7eed\u7684\u975e CJK\u3001\u975e\u7a7a\u767d\u7801\u4f4d\u6784\u6210 OTHER \u6bb5\uff0c\u88ab\u7a7a\u767d\u6216 CJK \u7801\u4f4d\u5206\u9694\u65f6\u6bcf\u6bb5\u8ba1 1 \u8bcd\u5143\u3002</li> <li>\u7a7a\u767d\uff08ECMAScript <code>\\s</code> \u7c7b\uff09\u53ea\u8d77\u5206\u9694\u4f5c\u7528\uff0c\u4e0d\u8d21\u732e\u8bcd\u5143\u3002</li> <li>\u6052\u7b49\u5f0f\uff1a<code>tokens === cjkCharacters + otherRuns</code>\uff1b\u4e2d\u82f1\u6df7\u6392\u3001\u7eaf CJK\u3001\u7eaf ASCII\u3001\u7a7a\u4e32\uff080 \u8bcd\u5143\uff09\u5168\u90e8\u9002\u7528\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff1b\u96f6\u4f9d\u8d56\u3001\u96f6 import\uff08\u6a21\u5757\u7eaf\u5ea6\u7531\u6d4b\u8bd5\u590d\u68c0\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u5b57\u7b26\u4e32\u8f93\u5165\u629b <code>TypeError</code>\uff08\u65e0 SFC \u7801\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u4f30\u7b97\u662f\u5bf9\u76ee\u6807 tokenizer \u7684\u786e\u5b9a\u6027\u542f\u53d1\u5f0f\u8fd1\u4f3c\uff0c\u4e0d\u627f\u8bfa\u4e0e\u4efb\u4f55\u5177\u4f53\u6a21\u578b tokenizer \u76f8\u7b49\uff1b\u6bd4\u8f83\u9608\u503c\u65f6\u540c\u4e00\u6279\u6b21\u5fc5\u987b\u4f7f\u7528\u540c\u4e00\u4f30\u7b97\u5668\uff08\u8bb0\u5f55\u5185\u7684 <code>estimator</code> \u4e0e <code>algorithm</code> \u5373\u88c1\u51b3\u4f9d\u636e\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.6.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/token-estimate.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/token-estimator.test.mjs</code>\uff08\u4e2d\u82f1\u6df7\u6392\u3001\u7eaf CJK\u3001\u7eaf ASCII\u3001\u7a7a\u4e32\u4e0e\u7a7a\u767d\u4e32\u3001\u6269\u5c55 B \u7801\u4f4d\u3001\u533a\u95f4\u8fb9\u754c\u3001\u8bb0\u5f55\u5c01\u95ed\u952e\u96c6\u3001\u6052\u7b49\u5f0f\u3001\u786e\u5b9a\u6027\u3001CLI \u5b50\u8fdb\u7a0b\u884c\u4e3a\uff09\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9608\u503c\u7b56\u7565\u4e0e\u8d85\u9650\u5904\u7f6e\uff1b\u628a\u542f\u53d1\u5f0f\u8bcd\u5143\u6570\u6362\u7b97\u4e3a\u76ee\u6807\u6a21\u578b\u7684\u771f\u5b9e\u6d88\u8017\u3002</li> </ul>"},{"location":"reference/api/harness/#CLIskill-family-token-estimate","title":"CLI\uff1askill-family-token-estimate","text":"<ul> <li>\u5165\u53e3\uff1aharness \u5305 bin <code>skill-family-token-estimate</code>\uff08<code>src/token-estimate-cli.mjs</code>\uff09\uff1b\u4e0e\u5de5\u7a0b Kit \u7684\u56db\u547d\u4ee4\u4e92\u4e0d\u6df7\u7528\u3002</li> <li>\u7528\u6cd5\uff1a<code>skill-family-token-estimate (--text &lt;s&gt; | --file &lt;p&gt; | --stdin) [--estimator tokens|upper-bound|both]</code>\uff1b\u9ed8\u8ba4 <code>--estimator tokens</code>\u3002<code>both</code> \u8f93\u51fa <code>{ tokens, upperBound }</code> \u4e24\u4e2a\u952e\uff0c\u660e\u793a\u4e24\u4e2a\u4f30\u7b97\u5668\u5e76\u5b58\u800c\u975e\u6df7\u5408\u3002</li> <li>\u8f93\u51fa\uff1astdout \u6253\u5370 JSON \u4f30\u7b97\u8bb0\u5f55\uff08<code>tokens</code> \u4e3a\u4f30\u7b97\u8bb0\u5f55\uff0c<code>upper-bound</code> \u4e3a <code>token-estimate-result</code>\uff09\uff0c\u6362\u884c\u7ed3\u5c3e\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u53d6\u547d\u4ee4\u884c\u53c2\u6570\u3001<code>--file</code> \u6307\u5b9a\u6587\u4ef6\u6216 stdin\uff1b\u53ea\u5199 stdout\u3002</li> <li>\u7a33\u5b9a\u9000\u51fa\u7801\uff1a<code>0</code> \u6210\u529f\uff1b<code>2</code> \u7528\u6cd5\u9519\u8bef\uff08\u8f93\u5165\u6e90\u7f3a\u5931\u6216\u4e92\u65a5\u3001\u672a\u77e5\u53c2\u6570\u3001<code>--file</code> \u76ee\u6807\u4e0d\u662f\u666e\u901a\u6587\u4ef6\u7b49\uff0cstderr \u7ed9\u51fa\u539f\u56e0\uff09\uff1b<code>--help</code> \u6253\u5370\u7528\u6cd5\u540e\u9000\u51fa 0\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>--file</code> \u6309\u8c03\u7528\u65b9\u7ed9\u5b9a\u7684\u8def\u5f84\u539f\u6837\u8bfb\u53d6\uff0cCLI \u4e0d\u505a\u8def\u5f84\u6536\u5bb9\uff1b\u9700\u8981\u6536\u5bb9\u65f6\u5728\u5e93\u5185\u7528 <code>readFileContained</code>\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.6.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/token-estimate-cli.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/token-estimator.test.mjs</code>\uff08\u5b50\u8fdb\u7a0b CLI \u7528\u4f8b\uff1a\u786e\u5b9a\u6027\u3001<code>--file</code>/<code>--stdin</code>/<code>both</code>\u3001\u7528\u6cd5\u9519\u8bef\u9000\u51fa\u7801 2\u3001<code>--help</code>\uff09\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u8f93\u5165\u6587\u672c\u7684\u91c7\u96c6\u4e0e\u88c1\u526a\u7b56\u7565\u3001\u8f93\u51fa\u8bb0\u5f55\u7684\u5f52\u6863\u4f4d\u7f6e\u3002</li> </ul>"},{"location":"reference/api/harness/#\u901a\u7528\u4e0a\u9650\u5b88\u536b-foundationharnessupper-bound-guard","title":"\u901a\u7528\u4e0a\u9650\u5b88\u536b (foundation.harness.upper-bound-guard)","text":"<p>FND-ADR-009\u3002\u590d\u7528 state-store \u4e8b\u4ef6\u8d26\u4e0e token-lock \u663e\u5f0f\u5360\u7528\u5b9e\u73b0\u901a\u7528\u4e0a\u9650\u5b88\u536b\uff1a\u8d8a\u9650\u4e8b\u4ef6\u5931\u8d25\u5173\u95ed\u4e14\u4e0d\u5199\u5165\uff1b\u4e0a\u9650\u503c\u3001\u5355\u4f4d\u7c7b\u522b\u4e0e\u8d85\u9650\u7b56\u7565\u5168\u90e8\u7531\u6d88\u8d39\u8005\u914d\u7f6e\uff0c\u6a21\u5757\u4e0d\u643a\u5e26\u4efb\u4f55\u56fa\u5b9a\u6570\u989d\u6216\u5b9a\u4ef7\u8bcd\u6c47\u3002</p>"},{"location":"reference/api/harness/#openUsageGuard--appendUsageEvent--readUsage--closeUsageGuard","title":"openUsageGuard / appendUsageEvent / readUsage / closeUsageGuard","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>openUsageGuard({ stateRoot, owner, payloadSchemas, reducer, initial = 0, upperBound, lockRoot, lockPath, clock } = {})</code>\uff08async\uff09</li> <li><code>appendUsageEvent(guard, event, { beforeCommit } = {})</code>\uff08async\uff09</li> <li><code>readUsage(guard)</code>\uff08async\uff09</li> <li><code>closeUsageGuard(guard)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u4e8b\u4ef6\u8d1f\u8f7d\u3001\u7eaf\u5f52\u7ea6\u51fd\u6570\u3001\u975e\u8d1f\u4e0a\u9650\u3001\u72b6\u6001\u6839\u4e0e\u9501\u6839/\u9501\u8def\u5f84\u3002</li> <li>\u8f93\u51fa\uff1a\u8ffd\u52a0\u7ed3\u679c\u3001\u5f53\u524d\u7528\u91cf\u8bfb\u6570\u3001\u5b88\u536b\u53e5\u67c4\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u5199\u4e8b\u4ef6\u8d26\u4e0e\u9501\u6587\u4ef6\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u8def\u5f84\u5199\u4e8b\u4ef6\u8d26\u4e0e\u9501\u6587\u4ef6\uff1b\u6253\u5f00\u65f6\u663e\u5f0f\u5360\u7528\u9501\u3001\u5173\u95ed\u65f6\u91ca\u653e\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8d8a\u9650\u629b <code>SFC2004</code> + <code>upper-bound-exceeded</code>\uff08details \u542b <code>upperBound</code> / <code>projected</code>\uff0c\u4e8b\u4ef6\u4e0d\u5199\u5165\uff09\uff1b\u9501\u88ab\u5360\u7528\u629b <code>store-locked</code>\uff1b\u4e8b\u4ef6\u8d26\u65ad\u94fe\u629b <code>chain-broken</code>\uff1b\u4e8b\u4ef6 schema \u8fdd\u89c4\u629b <code>event-schema-invalid</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>lockRoot</code>/<code>lockPath</code> \u7531\u6d88\u8d39\u8005\u6307\u5b9a\u5728 state store \u6839\u4e4b\u5916\uff1b\u4e8b\u4ef6\u8d26\u662f\u552f\u4e00\u6743\u5a01\uff1bfencing \u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/budget-guard.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/budget-guard.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e8b\u4ef6\u542b\u4e49\u3001\u5f52\u7ea6\u51fd\u6570\u3001\u4e0a\u9650\u6570\u503c\u4e0e\u8d85\u9650\u540e\u7684\u4e1a\u52a1\u5904\u7f6e\uff08\u5b9a\u4ef7\u4e0e\u8ba1\u8d39\u8bed\u4e49\u7559\u5728\u6d88\u8d39\u8005\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u89c4\u8303\u5165\u53e3 <code>skill-family-harness-node/quickstart-profile</code> \u8d1f\u8d23\u521b\u5efa observation Resource\u3001Task \u4e0e\u7ec8\u6001 Result\uff0c\u5e76\u590d\u9a8c\u771f\u5b9e \u6587\u4ef6\u5b57\u8282\u3001Resource id \u5168\u5c40\u552f\u4e00\u6027\u3001Task digest\u3001operation \u8eab\u4efd\u3001\u9010\u5b57\u6bb5 <code>run/stage/attempt</code> \u4ee5\u53ca evidence \u7cbe\u786e\u56de\u6307\u3002 \u5386\u53f2\u5165\u53e3 <code>skill-family-harness-node/candidate/quickstart-profile</code> \u5728\u5f03\u7528\u7a97\u53e3\u5185\u89e3\u6790\u540c\u4e00\u6a21\u5757\uff1b\u6d88\u8d39\u8005\u5e94\u8fc1\u79fb\u4e00\u6b21\u3002 <code>verifyQuickstartExchange</code> \u628a\u673a\u5236\u62d2\u7edd\u8f6c\u6362\u6210\u7ed3\u6784\u5316\u7ed3\u679c\uff0c\u629b\u51fa\u5f0f\u5165\u53e3\u7ee7\u7eed\u4f7f\u7528\u5df2\u767b\u8bb0\u7684 <code>SFC2004</code> \u4e0e\u7a33\u5b9a <code>details.kind</code>\u3002</p>"},{"location":"reference/api/harness/#invokeFoundationMechanism","title":"invokeFoundationMechanism","text":"<p><code>invokeFoundationMechanism(request)</code> \u662f\u56fa\u5b9a\u673a\u5236\u6865\u63a5\u3002\u8c03\u7528\u65b9\u53ea\u80fd\u9009\u62e9\u9884\u5148\u767b\u8bb0\u7684 operation\uff0c\u4e0d\u80fd\u4f20\u5165\u6a21\u5757\u540d\u3001\u5bfc\u51fa\u540d\u6216\u4efb\u610f\u51fd\u6570\u30020.8.2 \u65b0\u589e\u7684 <code>read-file-strict</code> \u76f4\u63a5\u8c03\u7528\u4e0a\u6587\u7684 <code>readFileStrict</code>\uff1a</p> <pre><code>{\n \"operation\": \"read-file-strict\",\n \"params\": {\n \"root\": \"/absolute/consumer-root\",\n \"path\": \"authority/frozen.json\",\n \"encoding\": \"utf8\",\n \"expectedSha256\": \"&lt;lowercase-sha256&gt;\"\n }\n}\n</code></pre> <p><code>params</code> \u662f\u95ed\u5408\u5bf9\u8c61\u3002<code>root</code> \u4e0e <code>path</code> \u662f\u5fc5\u586b\u975e\u7a7a\u5b57\u7b26\u4e32\uff1b<code>encoding</code> \u53ea\u80fd\u662f <code>utf8</code> \u6216\u7701\u7565\uff1b<code>expectedSha256</code> \u7701\u7565\u65f6\u4e0d\u505a\u9884\u671f\u6458\u8981\u6bd4\u5bf9\uff0c\u63d0\u4f9b\u65f6\u6cbf\u7528\u6838\u5fc3\u4e25\u683c\u8bfb\u53d6\u5408\u540c\u3002</p> <p>\u6865\u63a5\u4fdd\u7559\u6838\u5fc3\u56de\u6267\u7684 <code>path</code>\u3001<code>sha256</code>\u3001<code>bytes</code> \u4e0e <code>mode</code>\u3002UTF-8 \u5185\u5bb9\u4ecd\u662f\u5b57\u7b26\u4e32\uff1b\u4e8c\u8fdb\u5236\u5185\u5bb9\u6295\u5f71\u6210 Node \u6807\u51c6\u7684 Buffer JSON \u5f62\u6001 <code>{ \"type\": \"Buffer\", \"data\": [...] }</code>\uff0c\u4ee5\u4fbf\u901a\u8fc7 JSON \u4f20\u8f93\u540e\u65e0\u635f\u8fd8\u539f\u5b57\u8282\u3002</p> <p>\u76f4\u63a5\u8c03\u7528\u5931\u8d25\u65f6\u6cbf\u7528\u6838\u5fc3\u5f02\u5e38\uff0c\u5305\u62ec <code>SFC2004</code> \u4e0e <code>details.kind</code>\u3002\u5019\u9009 <code>mechanisms-cli.mjs</code> \u7ee7\u7eed\u4f7f\u7528\u4e00\u8bf7\u6c42\u4e00\u54cd\u5e94 JSON\uff1a\u6210\u529f\u9000\u51fa 0\uff0c\u62d2\u7edd\u6216\u7528\u6cd5\u9519\u8bef\u9000\u51fa 2\uff1bCLI \u9519\u8bef JSON \u53ea\u627f\u8bfa <code>name</code> \u4e0e <code>message</code>\uff0c\u4e0d\u627f\u8bfa\u8de8\u8bed\u8a00\u4fdd\u7559 <code>details</code>\u3002</p> <p>\u8be5\u5165\u53e3\u4e0d\u9009\u62e9 method\uff0c\u4e0d\u89e3\u91ca domainResult\uff0c\u4e5f\u4e0d\u62e5\u6709\u91cd\u8bd5\u3001\u8c03\u5ea6\u6216\u751f\u547d\u5468\u671f\u3002\u6d88\u8d39\u8005\u5fc5\u987b\u628a Contracts\u3001Harness \u4e0e Engineering Kit \u7cbe\u786e\u9501\u5b9a\u5230\u540c\u4e00\u7248\u672c\uff1b\u4e0d\u80fd\u4ece Foundation \u5de5\u4f5c\u6811\u5bfc\u5165\u6e90\u7801\u30020.3.0 \u7684 v2 \u4e0e 0.2.1 \u7684 v1 \u4e0d\u517c\u5bb9\u3002 \u8fc1\u79fb\u5230\u89c4\u8303\u5165\u53e3\u548c Schema \u8eab\u4efd\u540e\uff0c\u540e\u7eed\u4ec5\u664b\u5347 stable \u4e0d\u518d\u8981\u6c42\u6539\u5408\u540c\u8eab\u4efd\uff1b\u6d88\u8d39\u8005\u4ecd\u9700\u66f4\u65b0\u7cbe\u786e pin \u624d\u80fd\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\uff0cBundle \u662f\u5426\u91cd\u5efa\u7531\u65e2\u6709\u5305\u5b57\u8282\u4e0e provenance \u7ed1\u5b9a\u8f93\u5165\u51b3\u5b9a\u3002</p> <p><code>rename-directory-no-replace</code> \u7684\u89c4\u8303\u5165\u53e3\u662f <code>skill-family-harness-node/rename-directory-no-replace</code>\uff1b\u5386\u53f2 <code>/candidate/rename-directory-no-replace</code> \u5165\u53e3\u89e3\u6790\u540c\u4e00\u539f\u751f\u539f\u8bed\u3002 \u8be5\u539f\u8bed\u4ecd\u4e0d\u7b49\u540c\u4e8e\u7a33\u5b9a\u7684\u9ad8\u5c42 <code>fixed-set-publication</code>\uff0c\u6d88\u8d39\u8005\u5e94\u6839\u636e\u6240\u9700\u5408\u540c\u9009\u62e9\uff0c\u4e0d\u5f97\u7528\u522b\u540d\u6df7\u6dc6\u4e24\u4e2a\u80fd\u529b\u5c42\u6b21\u3002</p>"},{"location":"reference/api/harness/#\u673a\u5236\u6279\u91cf-foundationharnessmechanism-batch","title":"\u673a\u5236\u6279\u91cf (foundation.harness.mechanism-batch)","text":"<p>FND-DES-022\u3002\u6709\u754c\u3001\u540c\u64cd\u4f5c\u3001\u987a\u5e8f\u7684\u8de8\u8fdb\u7a0b\u6279\u91cf\u4f20\u8f93\uff1a\u628a\u4e00\u7ec4\u76f8\u4e92\u72ec\u7acb\u7684 <code>canonical-json</code> \u8bf7\u6c42\u5408\u5e76\u4e3a\u4e00\u6b21\u8fdb\u7a0b\u542f\u52a8\u4e0e\u4f20\u8f93\uff0c\u9010\u9879\u7ed3\u679c\u4e0e\u9519\u8bef\u5b57\u8282\u7b49\u4ef7\u4e8e\u540c\u7248\u672c\u539f\u5355\u8bf7\u6c42\u8c03\u7528\u3002\u5df2\u7ecf\u4f4d\u4e8e\u540c\u4e00 Node \u8fdb\u7a0b\u5185\u7684\u8c03\u7528\u4e0d\u5f3a\u5236\u6539\u6279\u3002\u672c\u5207\u7247\u53ea\u5b9e\u73b0\u8be5\u6279\u91cf\u5408\u540c\uff0c\u4e0d\u65b0\u589e\u5e38\u9a7b\u670d\u52a1\u3001\u5e76\u53d1\u3001\u7f13\u5b58\u3001\u91cd\u8bd5\u3001\u8de8\u9879\u5f15\u7528\u3001\u5de5\u4f5c\u6d41\u3001\u6536\u636e\u6216\u6ce8\u518c\u8868\u3002</p>"},{"location":"reference/api/harness/#runMechanismCliBatch--mechanisms-climjs---batch","title":"runMechanismCliBatch / mechanisms-cli.mjs --batch","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runMechanismCliBatch({ input = stdin, output = stdout, error = stderr, invoke } = {})</code>\uff08async\uff0c\u8fd4\u56de\u6574\u4f53\u9000\u51fa\u7801\uff09</li> <li>CLI \u663e\u5f0f\u6a21\u5f0f\uff1a<code>node &lt;\u540c\u7248\u672c\u5b98\u65b9 Bundle \u5185\u7684 mechanisms-cli.mjs&gt; --batch</code>\uff0c\u4ece\u6807\u51c6\u8f93\u5165\u8bfb\u53d6\u6070\u597d\u4e00\u4e2a JSON \u6587\u6863\uff0c\u5199\u51fa\u4e00\u4e2a\u6279\u6b21\u54cd\u5e94\u540e\u9000\u51fa\u3002\u5e26 <code>--batch</code> \u4e14\u51fa\u73b0\u989d\u5916\u53c2\u6570\u65f6\u5728\u8bfb\u53d6\u8f93\u5165\u524d\u62d2\u7edd\uff1b\u65e0 <code>--batch</code> \u65f6\u4ecd\u8fd0\u884c\u65e7 <code>runMechanismCli</code> \u5355\u8bf7\u6c42\u5165\u53e3\uff0c\u4e0d\u5bf9\u65e7\u8bf7\u6c42\u65b0\u589e\u5bb9\u91cf\u9650\u5236\u3002</li> <li>\u8f93\u5165\uff1a\u6070\u597d\u542b <code>operation</code>\uff08\u56fa\u5b9a <code>canonical-json</code>\uff09\u4e0e <code>inputs</code>\uff08\u975e\u7a7a\u6709\u5e8f\u6570\u7ec4\uff0c\u6bcf\u9879\u6070\u597d <code>{ \"document\": &lt;\u4efb\u610f JSON \u503c&gt; }</code>\uff09\u7684\u4e00\u4e2a JSON \u6587\u6863\u3002\u4e0d\u652f\u6301 NDJSON\u3001\u4f1a\u8bdd\u534f\u8bae\u3001\u6570\u7ec4\u81ea\u52a8\u63a2\u6d4b\u3001\u6bcf\u9879\u81ea\u5e26\u64cd\u4f5c\u6216\u5d4c\u5957\u6279\u6b21\u3002\u9876\u5c42\u7f3a/\u591a\u5b57\u6bb5\u3001\u9879\u7f3a <code>document</code>\u3001\u7a7a\u6570\u7ec4\u4e0e\u672a\u77e5\u64cd\u4f5c\u5c5e\u4e8e\u6574\u6279\u7ed3\u6784\u5931\u8d25\u3002</li> <li>\u8f93\u51fa\uff1a<code>{ \"results\": [{ \"inputIndex\", \"exitCode\", \"response\" }] }</code>\uff0c\u957f\u5ea6\u4e0e\u8f93\u5165\u4e00\u81f4\u3001\u5e8f\u53f7\u4ece 0 \u8fde\u7eed\u9012\u589e\uff1b<code>exitCode</code> \u53ea\u53d6 0\uff08\u6210\u529f\uff09\u6216 2\uff08\u5931\u8d25\uff09\u3002\u6210\u529f\u9879 <code>response</code> \u4e3a\u539f\u673a\u5236\u7ed3\u679c\uff1b\u5931\u8d25\u9879\u4e3a\u539f CLI \u7684 <code>{ ok: false, error: { name, message, code?, details? } }</code> \u9519\u8bef\u5bf9\u8c61\u3002\u9010\u9879\u8fd8\u539f\u89c4\u5219\u56fa\u5b9a\u4e3a <code>JSON.stringify(response) + \"\\n\"</code>\uff0c\u9000\u51fa\u7801 0 \u5bf9\u5e94\u539f stdout\u30012 \u5bf9\u5e94\u539f stderr\uff0c\u53e6\u4e00\u901a\u9053\u4e3a\u7a7a\uff1b\u9519\u8bef\u5bf9\u8c61\u4e0d\u91cd\u65b0\u6392\u5e8f\u6216\u89c4\u8303\u5316\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u9010\u9879\u7ecf\u65e2\u6709\u56fa\u5b9a\u5206\u6d3e\u5668 <code>invokeFoundationMechanism</code> \u6267\u884c\uff0c\u4e0d\u5f15\u5165\u7b2c\u4e8c\u5957\u7b97\u6cd5\uff1b\u6d4b\u8bd5\u53ef\u6ce8\u5165\u65e2\u6709\u53ef\u4fe1 <code>invoke</code>\uff0c\u4f46\u8f93\u5165 JSON \u4e0d\u5f97\u6307\u5b9a\u51fd\u6570\u3001\u6a21\u5757\u3001\u8def\u5f84\u6216\u8986\u76d6\u5206\u6d3e\u5668\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff0c\u65e0\u6b8b\u4f59\u72b6\u6001\uff1b\u53ea\u5199\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 <code>output</code>/<code>error</code> \u6d41\uff08\u9ed8\u8ba4\u8fdb\u7a0b\u6807\u51c6\u6d41\uff09\u3002</li> <li>\u5bb9\u91cf\uff08\u56fa\u5b9a\u653f\u7b56\uff0c\u6743\u5a01\u503c\u7531 Contracts <code>mechanism-batch-policy.json</code> \u6301\u6709\uff0c\u672c\u9875\u4e0e Harness \u4ece\u8be5\u6743\u5a01\u6d3e\u751f\uff0c\u8c03\u7528\u65b9\u4e0d\u53ef\u8c03\u9ad8\uff09\uff1a</li> </ul> \u9650\u5236 \u542b\u8fb9\u754c\u7684\u6700\u5927\u503c \u8ba1\u91cf\u5bf9\u8c61\u4e0e\u68c0\u67e5\u65f6\u70b9 \u8f93\u5165\u9879\u6570 256 \u89e3\u6790\u540e\u3001\u9010\u9879\u8c03\u7528\u524d \u8bf7\u6c42\u5b57\u8282 16 MiB\uff0816,777,216\uff09 \u539f\u59cb UTF-8 \u6d41\u542b\u7a7a\u767d\uff0c\u62fc\u63a5\u4e0e\u89e3\u6790\u524d\u7d2f\u8ba1 \u54cd\u5e94\u5b57\u8282 32 MiB\uff0833,554,432\uff09 \u5b8c\u6574 JSON \u54cd\u5e94\u4e0e\u6700\u540e\u6362\u884c\uff0c\u53d1\u9001\u524d\u7d2f\u8ba1\u786e\u8ba4 <ul> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u8bf7\u6c42\u5b57\u8282\u3001\u8f93\u5165\u9879\u6570\u6216\u7ed3\u6784\u7684\u9884\u68c0\u62d2\u7edd\u5728\u4efb\u4f55\u673a\u5236\u8c03\u7528\u524d\u53d1\u751f\uff0cstdout \u4e3a\u7a7a\uff0c<code>error</code> \u6d41\u5199\u4e00\u4e2a\u6279\u6b21\u9519\u8bef\u5bf9\u8c61\u5e76\u6574\u4f53\u9000\u51fa 2\u3002\u8f93\u51fa\u5bb9\u91cf\u53ea\u80fd\u5728\u5f53\u524d\u9879\u5df2\u7ecf\u8fd4\u56de\u540e\u786e\u8ba4\uff1b\u8d85\u9650\u65f6\u505c\u6b62\u540e\u7eed\u9879\uff0cstdout \u4ecd\u4e3a\u7a7a\uff0c<code>error</code> \u6d41\u5199\u6279\u6b21\u9519\u8bef\u5bf9\u8c61\u5e76\u9000\u51fa 2\u3002\u9519\u8bef\u4e3a <code>TypeError</code> \u6295\u5f71\uff0c<code>details.kind</code> \u5c01\u95ed\u4e3a <code>batch-structure-invalid</code>\u3001<code>batch-item-limit</code>\u3001<code>batch-input-limit</code>\u3001<code>batch-output-limit</code>\uff0c\u4e0d\u65b0\u589e SFC \u9519\u8bef\u7801\u3002\u7578\u5f62 UTF-8\u3001\u7578\u5f62 JSON \u4e0e\u8f93\u5165\u6d41\u9519\u8bef\u5c5e\u4f20\u8f93\u5931\u8d25\uff0c\u4fdd\u7559\u539f\u5f02\u5e38\u6295\u5f71\uff0c\u4e0d\u4f2a\u88c5\u4e3a\u673a\u5236\u4e1a\u52a1\u5931\u8d25\u3001\u4e0d\u4f2a\u9020\u67d0\u4e2a <code>inputIndex</code>\u3002\u5355\u9879\u673a\u5236\u5931\u8d25\uff08\u542b unsafe integer \u7b49\u7559\u7ed9\u539f\u5206\u6d3e\u5668\u6309\u9879\u5224\u65ad\u7684\u7ea6\u675f\uff09\u7ecf\u539f CLI \u9519\u8bef\u6295\u5f71\u5199\u5165\u8be5\u9879 <code>response</code> \u5e76\u7ee7\u7eed\u6267\u884c\u540e\u7eed\u9879\u3002\u8f93\u51fa\u901a\u9053\u5931\u8d25\u65f6\u53ef\u80fd\u5df2\u6709\u90e8\u5206\u5b57\u8282\u9001\u51fa\uff1b\u6574\u4f53\u9000\u51fa 2\uff0c\u6d88\u8d39\u8005\u5fc5\u987b\u628a\u622a\u65ad JSON\u3001\u901a\u9053\u9519\u8bef\u6216\u8fdb\u7a0b\u65e0\u6b63\u5e38\u5b8c\u6210\u7ed3\u679c\u5224\u4e3a\u4f20\u8f93\u5931\u8d25\uff0c\u4e0d\u80fd\u4ece\u524d\u7f00\u8ba4\u5b9a\u6279\u6b21\u6210\u529f\u3002\u82e5\u8fde\u9519\u8bef\u901a\u9053\u4e5f\u5199\u5165\u5931\u8d25\uff0c\u9519\u8bef\u5bf9\u8c61\u53ef\u80fd\u65e0\u6cd5\u4ea4\u4ed8\u3002</li> <li>\u6574\u4f53\u9000\u51fa\u7801\u4e09\u5206\u652f\uff1a\u6240\u6709\u673a\u5236\u9879\u6210\u529f \u2192 0\uff0cstdout \u4e3a\u5b8c\u6574\u6279\u6b21\u7ed3\u679c\u52a0\u4e00\u4e2a\u6362\u884c\u3001stderr \u7a7a\uff1b\u81f3\u5c11\u4e00\u4e2a\u673a\u5236\u9879\u5931\u8d25 \u2192 2\uff0cstdout \u4ecd\u4e3a\u5b8c\u6574\u6279\u6b21\u7ed3\u679c\u3001stderr \u7a7a\uff1b\u6279\u6b21\u9884\u68c0\u3001\u8f93\u51fa\u5bb9\u91cf\u6216\u4f20\u8f93\u5931\u8d25 \u2192 2\u3002\u9884\u68c0\u4e0e\u8f93\u51fa\u5bb9\u91cf\u5931\u8d25\u65f6 stdout \u7a7a\u3001stderr \u4e3a\u4e00\u4e2a\u6279\u6b21\u9519\u8bef\u5bf9\u8c61\u4e0e\u6362\u884c\uff1b\u8f93\u51fa\u901a\u9053\u5931\u8d25\u65f6\u4e0d\u627f\u8bfa\u6536\u56de\u5df2\u7ecf\u53d1\u9001\u7684\u5b57\u8282\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aContracts\u3001Harness \u4e0e Engineering Kit \u7cbe\u786e\u9501\u5b9a\u540c\u4e00\u7248\u672c\uff1b\u7a0b\u5e8f\u5316\u51fd\u6570\u4e0e CLI \u90fd\u7ecf\u8c03\u7528\u65b9\u5df2\u5b89\u88c5\u5e76\u9a8c\u8bc1\u6765\u6e90\u7684\u5b98\u65b9 Bundle \u6d88\u8d39\uff08Bundle \u7531\u540c\u7248\u672c\u4e09\u5305\u751f\u6210\uff0c\u4fdd\u7559\u6765\u6e90\u8eab\u4efd\u3001\u6458\u8981\u4e0e\u5b8c\u6574\u6027\u68c0\u67e5\uff09\uff0c\u4e0d\u4ece Foundation \u5de5\u4f5c\u6811\u5bfc\u5165\u6e90\u7801\uff1b\u8c03\u7528\u65b9\u63d0\u4f9b input/output/error \u6d41\u3002\u5df2\u6709 Schema \u6279\u91cf\u6821\u9a8c\uff08<code>validate-many-by-schema-id</code>\uff09\u7ee7\u7eed\u4f7f\u7528\u539f\u5165\u53e3\uff0c\u4e0d\u5d4c\u5957\u3001\u4e0d\u91cd\u65b0\u5305\u88c5\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.19.0</code> / <code>candidate</code>\u3002<code>candidate</code> \u4e0d\u7b49\u4e8e <code>stable</code>\uff0c\u672c\u5730\u5019\u9009\u6d4b\u8bd5\u901a\u8fc7\u4e5f\u4e0d\u6539\u53d8\u6210\u719f\u5ea6\uff1b\u662f\u5426\u53d1\u5e03\u987b\u67e5\u5bf9\u5e94\u7248\u672c\u7684\u53d1\u5e03\u540e\u9a8c\u8bc1\u8bc1\u636e\uff0c\u4e0d\u80fd\u4ece <code>stability</code> \u63a8\u65ad\u3002</li> <li>\u6e90\u6587\u4ef6\uff1aContracts \u65b0 Schema <code>packages/skill-family-contracts/candidate/foundation-mechanisms/mechanism-batch-request.schema.json</code>\u3001<code>mechanism-batch-result.schema.json</code> \u4e0e\u5bb9\u91cf\u6743\u5a01 <code>mechanism-batch-policy.json</code>\uff1bHarness <code>packages/skill-family-harness-node/candidate/mechanisms-cli.mjs</code>\uff1bKit \u79bb\u7ebf Bundle \u6295\u5f71 <code>packages/skill-family-engineering-kit/candidate/profile-bundle.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/quickstart-profile.test.mjs</code>\u3001<code>packages/skill-family-harness-node/test/quickstart-profile.test.mjs</code>\u3001<code>packages/skill-family-engineering-kit/test/candidate-mechanisms-cli.test.mjs</code>\u3001<code>packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9886\u57df\u5206\u7ec4\u4e0e\u5bb9\u91cf\u5207\u5206\u3001\u8bf7\u6c42\u95f4\u4f9d\u8d56\u5173\u7cfb\u5224\u65ad\u3001\u7cbe\u786e pin \u4e0e\u6765\u6e90\u8eab\u4efd\u7ed1\u5b9a\u3001\u6279\u6b21\u91c7\u7528\u5b8c\u6210\u4e0e\u9886\u57df\u56de\u5f52\u5224\u5b9a\u3002\u9010\u9879\u8fc1\u79fb\u793a\u4f8b\uff1a\u628a\u82e5\u5e72 <code>{ \"operation\": \"canonical-json\", \"params\": { \"document\": ... } }</code> \u5355\u8bf7\u6c42\u5408\u5e76\u4e3a <code>{ \"operation\": \"canonical-json\", \"inputs\": [{ \"document\": ... }, ...] }</code>\uff0c\u518d\u6309 <code>results[i].inputIndex</code> \u8bfb\u56de\u9010\u9879 <code>response</code> \u4e0e <code>exitCode</code>\uff1b\u540c\u4e00 Node \u8fdb\u7a0b\u5185\u7684\u76f4\u63a5\u8c03\u7528\u7ee7\u7eed\u4f7f\u7528 <code>invokeFoundationMechanism</code>\uff0c\u4e0d\u88ab\u5f3a\u5236\u6539\u6210\u6279\u91cf\u3002</li> </ul>"},{"location":"reference/api/harness/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID \u89c1 <code>docs/agents/capability-catalog.json</code>\uff08<code>foundation.harness.*</code>\uff09\u3002</li> <li>\u673a\u68b0\u6821\u9a8c\uff1a<code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code>\uff0c\u62d2\u7edd\u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\u3002</li> </ul>"},{"location":"reference/api/harness/#\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u66ff\u8eabfake-Foundation-0140","title":"\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u66ff\u8eab\uff08<code>fake</code>\uff09 (Foundation 0.14.0)","text":"<p><code>createAtomicWriteFake({ vector })</code> \u662f\u6309\u80fd\u529b\u5177\u540d\u5bfc\u51fa\u7684\u5b98\u65b9\u6d4b\u8bd5\u66ff\u8eab\uff0c\u5165\u53e3\u4e3a <code>skill-family-harness-node/contract-testing</code>\u3002\u5b83\u8981\u6c42\u4f20\u5165\u5df2\u7531 Contracts \u6821\u9a8c\u3001\u8eab\u4efd\u4e0e \u7cbe\u786e\u7248\u672c\u5339\u914d\u4e14\u5c1a\u672a\u6d88\u8d39\u7684 atomic-write \u5411\u91cf\uff1b\u8c03\u7528\u7b7e\u540d\u4fdd\u6301 <code>writeFileAtomic(root, relPath, data, options)</code>\uff0c\u4f46\u6d4b\u8bd5\u66ff\u8eab\u4e0d\u8bbf\u95ee\u771f\u5b9e\u6587\u4ef6\u7cfb\u7edf\u3002</p> <p><code>fake.identity</code> \u56fa\u5b9a\u66b4\u9732 <code>capabilityId</code>\u3001<code>vectorSetId</code> \u4e0e <code>foundationVersion</code>\u3002 <code>fake.observation()</code> \u8fd4\u56de\u51bb\u7ed3\u7684\u8c03\u7528\u53c2\u6570\u6458\u8981\u548c <code>return</code>\u3001<code>throw</code> \u6216 <code>indeterminate</code> \u7ed3\u679c\u3002\u6d4b\u8bd5\u66ff\u8eab\u8986\u76d6\u5411\u91cf\u58f0\u660e\u7684\u6210\u529f\u3001\u62d2\u7edd\u4e0e\u4e0d\u786e\u5b9a\u8def\u5f84\uff0c\u4e0d\u5224\u5b9a\u6d88\u8d39\u8005\u9886\u57df\u4fdd\u8bc1\uff1b\u6d88\u8d39\u8005\u987b \u53e6\u884c\u8fd0\u884c\u81f3\u5c11\u4e00\u6761\u53d7\u63a7\u771f\u5b9e\u516c\u5171\u8c03\u7528\u8def\u5f84\u3002</p>"}]}
1
+ {"config":{"lang":["en"],"separator":"[\\s\\u200b\\u3000\\-\u3001\u3002\uff0c\uff0e\uff1f\uff01\uff1b]+","pipeline":["stemmer"],"fields":{"title":{"boost":1000.0},"text":{"boost":1.0},"tags":{"boost":1000000.0}}},"docs":[{"location":"","title":"\u4e2d\u6587 \u00b7 \u9996\u9875","text":"<p>English</p>"},{"location":"#Skill-Family-Foundation-Workspace","title":"Skill Family Foundation Workspace","text":"<p>Skill Family \u751f\u547d\u5468\u671f\u7684\u516c\u5171\u5de5\u7a0b\u57fa\u7840\u8bbe\u65bd\u7236\u5de5\u4f5c\u533a\u3002\u672c\u4ed3\u63d0\u4f9b\u673a\u5668\u5951\u7ea6\uff08Contracts\uff09\u3001Node \u8584\u8fd0\u884c\u65f6\uff08Harness\uff09\u3001\u5de5\u7a0b\u5de5\u5177\u5305\uff08Engineering Kit\uff09\u3001Profile SPI\u3001\u5b8c\u5168\u865a\u6784\u7684\u901a\u7528\u6837\u4f8b\uff08fixture\uff09\u548c\u5de5\u7a0b\u6587\u6863\u9aa8\u67b6\u3002</p>"},{"location":"#\u5f53\u524d\u72b6\u6001","title":"\u5f53\u524d\u72b6\u6001","text":"<p>\u672c\u4ed3\u662f\u4e00\u5957\u5f00\u53d1\u4e2d\u7684\u9996\u7248\u9aa8\u67b6\u3002\u7248\u672c\u3001\u53d1\u5e03\u3001Pages \u4e0e Git \u7b49\u52a8\u6001\u72b6\u6001\u552f\u4e00\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff1b\u8bb8\u53ef\u8bc1\u5df2\u6279\u51c6\u4e3a Apache License 2.0\uff0c\u7248\u6743\u4e3b\u4f53\u4e3a\u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8\uff0c\u89c4\u8303\u5168\u6587\u89c1\u6839\u7ea7 <code>LICENSE</code>\u3002</p> <p>\u672c\u5de5\u4f5c\u533a\u6c38\u4e45 private\uff0c\u662f\u552f\u4e00\u5f00\u53d1\u771f\u6e90\uff1b\u516c\u5f00\u8fb9\u754c\u53ea\u6709\u4e09\u4e2a\u7248\u672c\u5316\u53d1\u5e03\u955c\u50cf\u4e0e npm tarball\uff0c\u9489\u4f4f\u7684\u6d88\u8d39\u5750\u6807\u4e0e\u53d1\u5e03\u72b6\u6001\u552f\u4e00\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u3002</p> <p>\u4ea7\u54c1\u7ea7\u7684\u552f\u4e00\u72b6\u6001\u9875\u662f \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff0c\u7531 <code>node scripts/docs/fact-check.mjs</code> \u5bf9\u7167\u673a\u5668\u771f\u6e90\u673a\u68b0\u6821\u9a8c\uff1b\u5176\u4ed6\u9875\u9762\u4e0d\u627f\u8f7d\u7b2c\u4e8c\u5957\u72b6\u6001\u53e3\u5f84\u3002</p>"},{"location":"#\u9996\u7248\u7ec4\u6210","title":"\u9996\u7248\u7ec4\u6210","text":"\u7ec4\u6210 \u8def\u5f84 \u804c\u8d23 Contracts <code>packages/skill-family-contracts</code> \u673a\u5668\u53ef\u6267\u884c\u5de5\u7a0b\u7ed3\u6784\u548c\u673a\u5236\u534f\u8bae\u7684\u552f\u4e00\u6743\u5a01 Harness <code>packages/skill-family-harness-node</code> \u53ea\u5b9e\u73b0 Contracts \u5b9a\u4e49\u7684\u673a\u5236\u534f\u8bae\uff0c\u4e0d\u62e5\u6709\u4e1a\u52a1\u8bed\u4e49 Engineering Kit <code>packages/skill-family-engineering-kit</code> \u53ea\u63d0\u4f9b <code>scaffold</code>\u3001<code>adopt-plan</code>\u3001<code>projection</code>\u3001<code>check</code> \u56db\u4e2a\u9876\u5c42\u547d\u4ee4 Profile \u79cd\u5b50 <code>profiles/public-plugin</code> \u516c\u5f00\u63d2\u4ef6\u5f62\u6001\u7684 Profile \u79cd\u5b50 \u865a\u6784\u6837\u4f8b <code>fixtures/generic-profile-extension-conformance</code> \u5b8c\u5168\u865a\u6784\u7684\u6269\u5c55\u4e00\u81f4\u6027\u6837\u4f8b <p>\u5305\u6e05\u5355\u3001Profile\u3001fixture \u4e0e\u9876\u5c42\u547d\u4ee4\u4ee5 <code>.foundation/skeleton-manifest.json</code> \u4e3a\u673a\u5668\u771f\u6e90\uff1b\u5de5\u5177\u7248\u672c\u9501\u5b9a\u89c1 <code>.foundation/version-lock.json</code>\u3002</p>"},{"location":"#\u6587\u6863\u5730\u56fe","title":"\u6587\u6863\u5730\u56fe","text":"<ul> <li>\u5b89\u88c5\u4e0e\u73af\u5883\u2014\u2014\u5de5\u5177\u7248\u672c pin\u3001\u5b89\u88c5\u4e0e\u6587\u6863\u7ad9\u70b9\u6784\u5efa</li> <li>\u5feb\u901f\u5f00\u59cb\u2014\u2014\u4ece\u672c\u5730\u9a8c\u8bc1\u5230\u8bd5\u8fd0\u884c\u7684\u6700\u77ed\u8def\u5f84</li> <li>\u80fd\u529b\u4e0e\u8bca\u65ad\u2014\u2014Kit \u56db\u547d\u4ee4\u3001\u9000\u51fa\u7801\u4e0e\u6545\u969c\u6392\u67e5</li> <li>\u67b6\u6784\u8fb9\u754c\u2014\u2014\u5206\u5c42\u3001\u552f\u4e00\u6743\u5a01\u3001\u9884\u7b97\u4e0e\u6587\u6863\u4e8b\u5b9e\u68c0\u67e5</li> <li>\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u2014\u2014\u552f\u4e00\u4ea7\u54c1\u72b6\u6001\u9875</li> <li>Git \u751f\u547d\u5468\u671f\u6307\u5357\u2014\u2014\u5206\u652f\u3001\u63d0\u4ea4\u3001\u63a8\u9001\u4e0e\u53d1\u5e03\u7684\u6388\u6743\u8fb9\u754c</li> </ul>"},{"location":"#\u5199\u4f5c\u8fb9\u754c","title":"\u5199\u4f5c\u8fb9\u754c","text":"<p>\u6587\u6863\u53ea\u6d88\u8d39\u673a\u5668\u771f\u6e90\u6784\u6210\u7684\u51bb\u7ed3\u4e8b\u5b9e\u5305\uff08manifest\u3001package.json\u3001Contracts \u767b\u8bb0\u7b49\uff09\uff0c\u7531 <code>node scripts/docs/fact-check.mjs</code> \u673a\u68b0\u6821\u9a8c\u3002\u6a21\u578b\u540d\u3001\u51ed\u636e\u548c\u8c03\u5ea6\u4fe1\u606f\u4e0d\u8fdb\u5165\u6587\u6863\uff0c\u4e5f\u4e0d\u8fdb\u5165 Contracts\uff1b\u8be6\u89c1 \u67b6\u6784\u8fb9\u754c\u3002</p>"},{"location":"architecture/","title":"\u4e2d\u6587 \u00b7 \u67b6\u6784\u8fb9\u754c","text":"<p>English</p>"},{"location":"architecture/#\u67b6\u6784\u8fb9\u754c","title":"\u67b6\u6784\u8fb9\u754c","text":"<p>\u672c\u9875\u662f Skill Family Foundation \u9762\u5411\u4f7f\u7528\u8005\u7684\u7a33\u5b9a\u67b6\u6784\u6295\u5f71\u3002\u5b83\u53ea\u89e3\u91ca\u7ed3\u6784\u3001\u804c\u8d23\u3001\u8fb9\u754c\u4e0e\u8def\u7531\uff0c\u4e0d\u627f\u8f7d\u52a8\u6001\u53d1\u5e03\u72b6\u6001\uff08\u53d1\u5e03\u72b6\u6001\u53ea\u7531 <code>docs/status/current.md</code> \u8bb0\u5f55\uff0c\u4e14\u7ecf <code>scripts/docs/fact-check.mjs</code> \u673a\u68b0\u6821\u9a8c\uff09\u3002\u6240\u6709\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\u3001\u652f\u6301\u72b6\u6001\u90fd\u4ece\u673a\u5668\u771f\u6e90\u590d\u7b97\u3002</p>"},{"location":"architecture/#\u5206\u5c42","title":"\u5206\u5c42","text":"<p>2026-08-09 \u67b6\u6784 hand-off\uff08FND-ADR-001\uff5e007\uff0cactive\uff0c\u89c1 <code>artifacts/decisions/</code>\uff09\u786e\u7acb\u7684\u5206\u5c42\uff1a\u7eb5\u5411\u4f9d\u8d56\u94fe\u56db\u5c42\uff0c\u6a2a\u5411\u80fd\u529b\u6302\u63a5\uff0c\u4e0d\u65b0\u589e\u7eb5\u5c42\u3002</p> <pre><code>\u6280\u80fd\u65cf\u4e1a\u52a1\uff08\u5404\u4ea7\u54c1\u4ed3\uff1arelease-skill\u3001loop-agent\u3001skill-eval \u7b49\uff09\n \u2502 \u4f9d\u8d56\n \u25bc\nEngineering Kit\uff08scaffold / adopt-plan / projection / check\uff09\n \u2502 \u4f9d\u8d56\n \u25bc\nHarness Node\uff08Contracts \u673a\u5236\u534f\u8bae\u5b9e\u73b0\uff09\n \u2502 \u4f9d\u8d56\n \u25bc\nContracts\uff08\u7ed3\u6784\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001\u534f\u8bae\u540d\u767b\u8bb0\uff09\n \u25b2\n \u2514---------------- independent Audit consumer\n\n\u6a2a\u5411\uff08\u6302\u63a5\u9762\uff0c\u4e0d\u65b0\u589e\u7eb5\u5c42\uff09\uff1a\n- profiles/ \u5bbf\u4e3b\u4e0e\u9879\u76ee\u5f62\u6001\u5dee\u5f02\u58f0\u660e\uff0c\u53ea\u5b9e\u73b0\u7a33\u5b9a SPI\n- \u5bbf\u4e3b \u5916\u90e8 AI \u7f16\u7801\u8fd0\u884c\u73af\u5883\uff1a\u62e5\u6709\u8bed\u4e49\uff0cFoundation \u7edf\u4e00\u7ed3\u6784\u6027\u5dee\u5f02\n- release-skill \u53d1\u5e03\u72b6\u6001\u4e0e\u5168\u90e8\u8fdc\u7aef\u5199\u5165\uff0c\u4e0d\u8fdb\u5165 Foundation\n- Artifact Graph `artifacts/` \u67b6\u6784\u5236\u54c1\u4f53\u7cfb\uff0c\u95e8\u7981\u4e3a check:artifacts\n</code></pre> <p>\u540c\u4e00 Git workspace \u8fd8\u5305\u542b <code>packages/foundation-adoption-review/</code>\u3002\u5b83\u662f\u72ec\u7acb\u7684 Plugin release unit \u548c\u516c\u5f00\u955c\u50cf\u6e90\uff0c\u4ece 0.17.0 \u8d77\u4e0e Foundation \u6570\u503c\u5bf9\u9f50\uff0c\u5386\u53f2 0.1.0 \u53d1\u5e03\u4fdd\u6301\u4e0d\u53d8\u3002\u5b83\u4f7f\u7528 Foundation \u7684\u516c\u5f00\u4e8b\u5b9e\uff0c\u4f46\u4e0d\u5c5e\u4e8e Contracts \u2192 Harness \u2192 Engineering Kit \u4f9d\u8d56\u94fe\uff0c\u4e5f\u4e0d\u8ba1\u4f5c Foundation \u7684\u7b2c\u56db\u4e2a\u673a\u5236\u5305\u3002\u8be5 Plugin \u7684\u516c\u5f00\u95ed\u5305\u7531\u81ea\u5df1\u7684 release unit \u767d\u540d\u5355\u9650\u5b9a\uff1b\u6839\u76ee\u5f55\u7684\u8ba1\u5212\u3001\u5236\u54c1\u3001\u6d4b\u8bd5\u548c\u5176\u4ed6\u79c1\u6709\u6587\u6863\u4e0d\u4f1a\u8fdb\u5165 Plugin \u955c\u50cf\u3002</p> <p>\u7bad\u5934\u6307\u5411\u88ab\u4f9d\u8d56\u65b9\u3002\u516c\u5171\u6838\u5fc3\u4e0d\u5f97\u53cd\u5411\u4f9d\u8d56\u5177\u4f53 Profile \u6216\u5177\u4f53\u6280\u80fd\u65cf\uff1b\u65b0\u80fd\u529b\u7684\u4f9d\u8d56\u65b9\u5411\u843d\u4f4d\u89c1 <code>artifacts/design/FND-DES-001.md</code>\uff0c\u9010\u8d44\u4ea7\u5f52\u5c5e\u89c1 FND-ADR-002\u3002</p>"},{"location":"architecture/#\u804c\u8d23\u77e9\u9635","title":"\u804c\u8d23\u77e9\u9635","text":"<p>\u6bcf\u4e2a\u5206\u5c42\u53ea\u627f\u62c5\u4e0b\u8868\u5217\u51fa\u7684\u804c\u8d23\uff0c\u8d8a\u754c\u80fd\u529b\u4e00\u5f8b\u7531\u5916\u90e8\u9879\u76ee\u6216\u6d88\u8d39\u8005\u62e5\u6709\u3002</p> \u5206\u5c42 \u62e5\u6709 \u4e0d\u62e5\u6709\uff08\u843d\u5728\u522b\u5904\uff09 Contracts \u7ed3\u6784\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001\u534f\u8bae\u540d\u767b\u8bb0\uff1b46 \u7c7b\u9876\u5c42\u5bf9\u8c61\uff1b9 \u6761 mandatory rule \u4e1a\u52a1\u5b57\u6bb5\u8bed\u4e49\u3001\u9886\u57df\u5ba1\u8ba1\u3001\u8fdc\u7aef\u5199\u5165\u3001\u6a21\u578b\u751f\u6210 Harness Contracts \u7684 Node \u673a\u5236\u5b9e\u73b0\uff1b\u8def\u5f84\u6536\u5bb9\u3001\u539f\u5b50\u5199\u3001\u95ed\u5305\u3001\u8bf7\u6c42\u5904\u7406\u3001\u62a5\u544a\u6e32\u67d3\u3001\u5bbf\u4e3b\u63a5\u5165\u673a\u5236\u3001\u72b6\u6001\u5e95\u5ea7 \u4e1a\u52a1\u8bed\u4e49\u3001workflow \u7f16\u6392\u3001\u6a21\u578b\u8c03\u7528\u3001git \u5199\u3001\u7f51\u7edc\u8fdc\u7aef Engineering Kit \u56db\u4e2a\u5de5\u7a0b\u547d\u4ee4\u53ca\u5176\u53ea\u8bfb/\u53d7\u9650\u5199\u5165\u8fb9\u754c\uff1bhost \u5b50\u52a8\u4f5c\u6ce8\u5165\u5177\u4f53 Profile \u81ea\u52a8\u4fee\u590d\u3001\u81ea\u52a8\u8fc1\u79fb\u3001\u8fdc\u7aef\u53d1\u5e03\u3001\u7b2c 5 \u4e2a\u547d\u4ee4 Profile \u5bbf\u4e3b\u4e0e\u9879\u76ee\u5f62\u6001\u5dee\u5f02\u7684\u58f0\u660e\u5f0f SPI\uff1b\u53ea\u5b9e\u73b0\u7a33\u5b9a SPI \u4e1a\u52a1\u8bed\u4e49\u3001\u53ef\u6267\u884c\u811a\u672c\u5165\u53e3\u3001\u516c\u5171\u6838\u5fc3\u53d8\u66f4 release-skill \u53d1\u5e03\u72b6\u6001\u4e0e\u5168\u90e8\u8fdc\u7aef\u5199\u5165 Foundation \u4e0d\u542b\u4efb\u4f55 publish/remote-write \u5165\u53e3 loop-agent \u4efb\u52a1\u3001\u91cd\u8bd5\u3001\u8fd4\u5de5\u3001\u9a8c\u6536\u3001\u81ea\u8fed\u4ee3 Foundation \u4e0d\u5b9a\u4e49 workflow \u72b6\u6001\u673a Artifact Graph \u5236\u54c1\u5173\u7cfb\u3001context\u3001packet\u3001version-lock Foundation \u4e0d\u62e5\u6709\u5236\u54c1\u56fe Audit \u72ec\u7acb fixture\u3001\u9884\u671f\u503c\u3001\u88c1\u51b3 \u9886\u57df\u8bed\u4e49\u7ed3\u8bba\u7531\u5916\u90e8\u5ba1\u9605\u62e5\u6709"},{"location":"architecture/#\u80fd\u529b\u5f52\u5c5e\u7b97\u6cd5","title":"\u80fd\u529b\u5f52\u5c5e\u7b97\u6cd5","text":"<p>\u7ed9\u4e00\u4e2a\u67b6\u6784\u9700\u6c42\uff0c\u6309\u4e0b\u9762\u987a\u5e8f\u5224\u5b9a\u5f52\u5c5e\uff0c\u547d\u4e2d\u5373\u505c\uff1a</p> <ol> <li>\u542b\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1 oracle \u2192 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u53ea\u63a5\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\u3002</li> <li>\u662f\u7ed3\u6784\u3001\u534f\u8bae\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u6216\u5bf9\u8c61 Schema \u2192 Contracts\u3002</li> <li>\u662f\u8de8\u6280\u80fd\u65cf\u53ef\u590d\u7528\u7684 Node \u673a\u5236 \u2192 Harness\u3002</li> <li>\u662f scaffold/adopt-plan/projection/check \u6216\u5177\u4f53 host Profile \u6ce8\u5165 \u2192 Kit / Profile\u3002</li> <li>\u6d89\u53ca\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001 \u2192 release-skill\u3002</li> <li>\u6d89\u53ca\u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5/\u9a8c\u6536 \u2192 loop-agent\u3002</li> <li>\u6d89\u53ca\u5236\u54c1\u5173\u7cfb/\u7248\u672c\u9501 \u2192 artifact-graph\u3002</li> <li>\u53ea\u6709\u4e00\u4e2a\u6d88\u8d39\u8005\u6216\u5c1a\u672a\u8bc1\u660e\u8de8\u4e24\u4e2a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d \u2192 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u6269\u5f20 Foundation\u3002</li> </ol> <p>\u7b2c 8 \u6b65\u662f\u6269\u5f20\u95f8\u95e8\uff1a\u65b0\u589e\u7ec4\u4ef6\u5fc5\u987b\u8bf4\u660e\u5220\u9664\u5b83\u4f1a\u8ba9\u4e24\u4e2a\u4ee5\u4e0a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\u5b9e\u73b0\uff0c\u5e76\u7ecf\u72ec\u7acb fixture \u9a8c\u8bc1\uff1b\u8fdb\u5165\u95e8 1 \u53e6\u8981\u6c42\u81f3\u5c11\u4e00\u4e2a\u73b0\u6709\u771f\u5b9e\u6d88\u8d39\u8005\u52a0\u4e00\u4e2a\u7ed3\u6784\u540c\u578b\u7684\u53ef\u9884\u89c1\u6d88\u8d39\u8005\uff08\u7b2c\u4e8c\u6d88\u8d39\u8005\u4e0d\u8981\u6c42\u5df2\u4e0a\u7ebf\uff0c\u4f46\u9700\u6c42\u5fc5\u987b\u80fd\u7528\u540c\u4e00\u7ed3\u6784\u8868\u8fbe\uff0c\u8c03\u6574\u8bb0\u5f55\u89c1 FND-ADR-009\uff09\u3002\u7b2c 9 \u6b65\u662f\u6709\u9650\u5c01\u95ed\u8bed\u4e49\u95f8\u95e8\uff08\u5bf9\u5e94 FND-ADR-001 \u95e8 8\uff09\uff1a\u80fd\u529b\u82e5\u643a\u5e26\u5c11\u91cf\u9886\u57df\u8bed\u4e49\uff0c\u5fc5\u987b\u6ee1\u8db3\u8bed\u4e49\u80fd\u88ab\u5c11\u6570\u7a33\u5b9a\u5c01\u95ed\u679a\u4e3e\u8986\u76d6\uff0c\u6216\u4e3a\u786e\u5b9a\u6027\u4f30\u7b97\u539f\u8bed\u2014\u2014\u7b97\u6cd5\u3001\u9002\u7528\u8303\u56f4\u4e0e\u504f\u5dee\u65b9\u5411\u5df2\u5728\u5951\u7ea6\u4e2d\u58f0\u660e\uff1b\u672c\u95f8\u95e8\u4e0d\u53d6\u6d88\u95e8 2\u300c\u8bed\u4e49\u65e0\u5173\u300d\u4e00\u7968\u5426\u51b3\u3002\u673a\u5668\u53ef\u8bfb\u7248\u89c1 <code>docs/agents/architecture-routing.md</code>\u3002</p>"},{"location":"architecture/#\u4fe1\u4efb\u4e0e\u526f\u4f5c\u7528\u8fb9\u754c","title":"\u4fe1\u4efb\u4e0e\u526f\u4f5c\u7528\u8fb9\u754c","text":"<p>Foundation \u7684\u4fe1\u4efb\u524d\u63d0\u4e0e\u526f\u4f5c\u7528\u7ea6\u5b9a\u6309\u5c42\u56fa\u5316\uff0c\u8c03\u7528\u65b9\u636e\u6b64\u5224\u65ad\u98ce\u9669\uff1a</p> <ul> <li>Contracts\uff1a\u7eaf\u51fd\u6570\uff0c\u65e0\u6587\u4ef6/Git/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff1b\u9519\u8bef\u7801\u51bb\u7ed3\u4e0d\u6f02\u79fb\uff08<code>foundation.contracts.error-codes</code>\uff09\u3002</li> <li>Harness\uff1a\u673a\u5236\u5c42\u53ea\u5728\u53d7\u6536\u5bb9\u8def\u5f84\u5185\u8bfb\u5199\uff1b<code>HARNESS_EXCLUSIONS</code> \u6392\u9664 release-state\u3001remote-network-access\u3001business-semantics\u3001workflow-orchestration\u3001model-calls\u3001git-writes\uff08<code>foundation.harness.errors</code>\uff09\u3002</li> <li>Engineering Kit\uff1a<code>FORBIDDEN_SIDE_EFFECTS</code> \u542b git-init/commit/push/tag\u3001publish\u3001remote-write\uff1b<code>REFUSED_MUTATION_FLAGS</code> \u5728 CLI \u5165\u53e3\u5373\u62d2\uff08<code>foundation.kit.cli</code>\uff09\u3002</li> <li>Profile\uff1a\u58f0\u660e\u5f0f\u5dee\u5f02\uff0c\u5165\u53e3\u5fc5\u987b\u4e3a JSON \u6570\u636e\u8d44\u6e90\uff1b<code>coreOwned</code>\uff08packages/commands/namespacePrefixes\uff09\u4e3a\u7981\u5165\u76ee\u6807\uff08<code>foundation.profile.extension-spi</code>\uff09\u3002</li> <li>\u72b6\u6001\u5e95\u5ea7\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u662f\u552f\u4e00\u6743\u5a01\uff0csnapshot \u662f\u6d3e\u751f\u7f13\u5b58\uff1b<code>confirmOwnerTerminated</code> \u662f\u8c03\u7528\u65b9\u63d0\u4f9b\u7684\u5916\u90e8\u4fe1\u4efb\u951a\uff0c\u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\uff08<code>foundation.harness.state-store</code>\uff09\u3002</li> </ul>"},{"location":"architecture/#\u67b6\u6784\u51b3\u7b56\u6811","title":"\u67b6\u6784\u51b3\u7b56\u6811","text":"<pre><code>\u9700\u6c42\u542b\u9886\u57df\u8bed\u4e49/\u72b6\u6001\u673a/\u5ba1\u8ba1? \u2500\u2500\u662f\u2500\u2500\u25b6 \u7559\u5728\u6d88\u8d39\u8005\n \u2502\u5426\n\u662f\u7ed3\u6784/\u534f\u8bae/\u9519\u8bef\u7801/Schema? \u2500\u2500\u662f\u2500\u2500\u25b6 Contracts\n \u2502\u5426\n\u662f\u8de8\u6280\u80fd\u65cf Node \u673a\u5236? \u2500\u2500\u662f\u2500\u2500\u25b6 Harness\n \u2502\u5426\n\u662f scaffold/adopt/projection/check \u6216 Profile \u6ce8\u5165? \u2500\u2500\u662f\u2500\u2500\u25b6 Kit / Profile\n \u2502\u5426\n\u6d89\u53ca\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001? \u2500\u2500\u662f\u2500\u2500\u25b6 release-skill\n \u2502\u5426\n\u6d89\u53ca\u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5/\u9a8c\u6536? \u2500\u2500\u662f\u2500\u2500\u25b6 loop-agent\n \u2502\u5426\n\u6d89\u53ca\u5236\u54c1\u5173\u7cfb/\u7248\u672c\u9501? \u2500\u2500\u662f\u2500\u2500\u25b6 artifact-graph\n \u2502\u5426\n\u53ea\u6709\u4e00\u4e2a\u6d88\u8d39\u8005/\u672a\u8bc1\u660e\u8de8\u4e24\u4e2a\u771f\u5b9e\u6d88\u8d39\u8005? \u2500\u2500\u662f\u2500\u2500\u25b6 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u6269\u5f20\n \u2502\u5426\n\u643a\u5e26\u5c11\u91cf\u9886\u57df\u8bed\u4e49? \u2500\u2500\u662f\u2500\u2500\u25b6 \u6709\u9650\u5c01\u95ed\u8bed\u4e49\uff1a\u7a33\u5b9a\u95ed\u679a\u4e3e\u53ef\u8986\u76d6\uff0c\u6216\u4e3a\u786e\u5b9a\u6027\n \u2502 \u4f30\u7b97\u539f\u8bed\uff08\u7b97\u6cd5/\u9002\u7528\u8303\u56f4/\u504f\u5dee\u65b9\u5411\u5df2\u5951\u7ea6\u58f0\u660e\uff09\u2192 \u53ef\u7eb3\u5165\uff1b\n \u2502 \u5426\u5219\u7559\u5728\u6d88\u8d39\u8005\uff08FND-ADR-001 \u95e8 8\uff0c\u4e0d\u53d6\u6d88\u95e8 2 \u4e00\u7968\u5426\u51b3\uff09\n \u2502\u5426\n \u2500\u2500\u25b6 \u53ef\u7eb3\u5165\n</code></pre>"},{"location":"architecture/#\u4e0e\u5916\u90e8\u9879\u76ee\u7684\u8def\u7531\u5173\u7cfb","title":"\u4e0e\u5916\u90e8\u9879\u76ee\u7684\u8def\u7531\u5173\u7cfb","text":"<p>Foundation \u4e0d\u662f\u5168\u80fd\u5e95\u5ea7\u3002\u4e0b\u5217\u804c\u8d23\u660e\u786e\u5728 Foundation \u4e4b\u5916\uff1a</p> <ul> <li>\u53d1\u5e03\u4e0e\u8fdc\u7aef\u5199\u5165\uff1arelease-skill \u62e5\u6709\uff1bFoundation \u4e0d\u63d0\u4f9b\u4efb\u4f55 publish/remote-write \u5165\u53e3\uff08<code>foundation.unsupported.remote-publish</code>\uff09\u3002</li> <li>\u4efb\u52a1\u751f\u547d\u5468\u671f\uff1aloop-agent \u62e5\u6709\u4efb\u52a1\u3001\u91cd\u8bd5\u3001\u8fd4\u5de5\u3001\u9a8c\u6536\uff1bFoundation \u4e0d\u542b workflow \u72b6\u6001\u673a\uff08<code>foundation.unsupported.business-state-machine</code>\uff09\u3002</li> <li>\u5236\u54c1\u6cbb\u7406\uff1aartifact-graph \u62e5\u6709 <code>artifacts/</code> \u5173\u7cfb\u5408\u540c\u4e0e\u7248\u672c\u9501\uff0c\u95e8\u7981\u4e3a <code>check:artifacts</code>\u3002</li> <li>\u9886\u57df\u5ba1\u8ba1\uff1a\u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\u62e5\u6709\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\uff1bFoundation \u53ea\u63d0\u4f9b\u786e\u5b9a\u6027\u5ba1\u8ba1\u8868\u9762\uff08<code>foundation.unsupported.domain-audit-semantics</code>\uff09\u3002</li> <li>\u5bbf\u4e3b\u5e94\u7528\u4e0e\u751f\u547d\u5468\u671f\uff1a\u5bbf\u4e3b\u62e5\u6709\u81ea\u8eab\u8bed\u4e49\u4e0e\u751f\u547d\u5468\u671f\u884c\u4e3a\uff1bFoundation \u53ea\u7edf\u4e00\u7ed3\u6784\u6027\u5dee\u5f02\uff0c\u63d0\u4f9b\u6709\u9650 host identity/alias \u89e3\u6790\u3001\u53d7\u6536\u5bb9\u672c\u5730\u6295\u5f71\u3001\u7ed1\u5b9a\u8bfb\u53d6\u3001\u539f\u5b50\u5199\u5165\u548c\u56fa\u5b9a driver \u7684\u53d7\u7ea6\u675f\u9a8c\u8bc1\u3002\u53ea\u6709 Descriptor \u7684 <code>support=supported</code> \u65f6\uff0c<code>planHost</code> \u624d\u53ef\u80fd\u4ea7\u51fa <code>status=planned</code> \u7684 install/update \u8ba1\u5212\uff1bQoder \u7b49 <code>support=manual</code> \u5bbf\u4e3b\u8fd4\u56de\u7a7a\u7684 <code>status=manual</code> \u8ba1\u5212\uff0c<code>applyHostPlan</code> \u5bf9\u8be5\u8ba1\u5212\u8fd4\u56de <code>rejected</code> \u4e0e <code>publicationState=not-attempted</code>\u3002<code>applyHostPlan</code> \u53ea\u6267\u884c <code>status=planned</code> \u7684\u8ba1\u5212\uff1binstall/update \u4ecd\u987b\u6458\u8981\u7ed1\u5b9a\u3001\u5df2\u9a8c\u8bc1 build \u548c\u663e\u5f0f\u6388\u6743\uff0cuninstall \u8fd4\u56de <code>manual-recovery-required</code> \u4e14\u4e0d\u5220\u9664\u6587\u4ef6\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u4f7f\u7528\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e driver\uff0c\u6309\u56fa\u5b9a\u53c2\u6570\u6267\u884c fresh\u3001\u53d7\u7ea6\u675f\u8c03\u7528\uff0c\u5e76\u590d\u7528 <code>existing-user-state + host-managed</code>\u3002\u6280\u80fd\u65cf\uff08\u8c03\u7528\u65b9\uff09\u6839\u636e\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u548c\u4e1a\u52a1\u7b54\u6848\u89e3\u91ca\u4e1a\u52a1\u7ed3\u679c\u5e76\u4f5c\u6700\u7ec8\u9886\u57df\u9a8c\u6536\u3002Qoder \u7684 Descriptor \u4e3a <code>manual</code>\uff0c<code>qodercli-print-v1</code> \u662f <code>candidate</code> \u771f\u5b9e\u9a8c\u8bc1 driver\uff1bWorkBuddy \u4e0e CodeBuddy \u5404\u7528\u72ec\u7acb driver \u548c\u53d1\u73b0\u5e03\u5c40\u3002\u771f\u5b9e\u7528\u6237\u73af\u5883\u4e2d\u7684\u53d1\u5e03\u540e\u63d2\u4ef6\u53d1\u73b0\u3001\u5b89\u88c5\u3001\u66f4\u65b0\u3001marketplace \u4e0e\u53d1\u5e03\u72b6\u6001\u7531 release-skill \u7ba1\u7406\u3002</li> <li>\u540c\u7ea7\u9002\u914d\u5668\u53ea\u8bfb\u9a8c\u8bc1\uff1aContracts 1.10.0 \u589e\u52a0\u6210\u719f\u5ea6\u4e2d\u7acb\u7684 request/result\uff1bHarness \u590d\u7528\u771f\u5b9e\u6839\u7ed1\u5b9a\u3001\u8def\u5f84\u6536\u5bb9\u3001\u8bfb\u53d6\u3001\u95ed\u5305\u548c manifest\uff0c\u6309 peer \u5f52\u4e00\u5316\u540e\u9a8c\u8bc1\u5171\u540c\u6765\u6e90\u4e0e\u552f\u4e00 <code>SKILL.md</code> mapping\uff1bKit \u53ea\u63d0\u4f9b\u8584\u5165\u53e3\u3002Foundation \u4e0d\u62e5\u6709 canonical source\uff0c\u4e0d\u5199\u76ee\u5f55\uff0c\u4e0d\u4ea7\u751f receipt\uff0c\u4e5f\u4e0d\u63a5\u7ba1\u65e7 manifest \u7684\u4e1a\u52a1\u8fc1\u79fb\u3002</li> <li>\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\uff1aContracts 1.11.0 \u589e\u52a0 <code>host-verification-request</code> \u4e0e <code>host-verification-result</code>\uff1bHarness \u5728\u65e2\u6709 <code>superviseProcess</code> \u4e0a\u63d0\u4f9b\u539f\u59cb\u5b57\u8282 sink\uff0cKit \u7ef4\u62a4\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e candidate driver\uff1a\u5176\u4e2d\u5305\u542b <code>qodercli-print-v1</code>\u3001WorkBuddy \u4e0e CodeBuddy \u5404\u81ea\u72ec\u7acb\u7684 driver\uff0c\u4ee5\u53ca\u53e6\u5916\u4e09\u4e2a\u5df2\u767b\u8bb0 driver\u3002\u8c03\u7528\u65b9\u521b\u5efa\u3001\u63d0\u4f9b\u5e76\u72ec\u5360\u672c\u6b21\u9a8c\u8bc1\u6240\u9700\u7684 fresh roots\uff0c\u5b8c\u6210\u68c0\u67e5\u540e\u6e05\u7406\u5176\u72ec\u5360\u7684\u5916\u5c42 <code>temporaryRoot</code>\uff1bFoundation \u53ea\u5728\u8be5\u6839\u4e0b\u521b\u5efa\u5e76\u4fdd\u7559\u53d7\u8ddf\u8e2a\u7684 session root\u3002Foundation \u6821\u9a8c canonical/fresh \u8def\u5f84\u3001\u8def\u5f84\u6536\u5bb9\u3001\u6839\u91cd\u53e0\u9694\u79bb\u3001\u6458\u8981\u4e0e Descriptor/driver \u7ed1\u5b9a\uff0c\u518d\u6309\u56fa\u5b9a\u53c2\u6570\u6267\u884c\u53d7\u7ea6\u675f\u8c03\u7528\uff1b\u8fd9\u4e9b\u8def\u5f84\u68c0\u67e5\u662f\u8def\u5f84\u8fb9\u754c\uff0c\u4e0d\u662f OS sandbox\u3002\u8c03\u7528\u65b9\u6839\u636e\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u548c\u4e1a\u52a1\u7b54\u6848\u4f5c\u6700\u7ec8\u9886\u57df\u9a8c\u6536\u3002WorkBuddy \u4e0e CodeBuddy \u7684 driver\u3001\u53d1\u73b0\u76ee\u5f55\u548c\u5de5\u4f5c\u76ee\u5f55\u4fdd\u6301\u72ec\u7acb\u3002Foundation \u8fd4\u56de\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u7ed3\u679c\uff0c\u4e0d\u62e5\u6709\u9886\u57df\u8f93\u51fa\u3001\u53d1\u5e03\u72b6\u6001\u6216\u771f\u5b9e\u7528\u6237\u73af\u5883\u4e2d\u7684\u63d2\u4ef6\u53d1\u5e03\u540e\u884c\u4e3a\uff0c\u4e5f\u4e0d\u5ba3\u79f0\u8ba4\u8bc1\u72b6\u6001\u9694\u79bb\u3001\u51ed\u8bc1\u672a\u53d8\u5316\u3001\u6a21\u578b\u8eab\u4efd\u56fa\u5b9a\u6216\u5bbf\u4e3b\u5de5\u5177\u80fd\u529b\u5df2\u5173\u95ed\u3002</li> </ul>"},{"location":"architecture/#\u80fd\u529b\u8eab\u4efd\u4e0e\u6210\u719f\u5ea6","title":"\u80fd\u529b\u8eab\u4efd\u4e0e\u6210\u719f\u5ea6","text":"<p>\u80fd\u529b\u8eab\u4efd\u548c\u6210\u719f\u5ea6\u662f\u4e24\u4e2a\u7ef4\u5ea6\uff08FND-ADR-016\uff09\u3002\u5386\u53f2 <code>./candidate/**</code> \u6d88\u8d39\u8005\u8fc1\u79fb\u4e00\u6b21\u5230 0.10.0 \u63d0\u4f9b\u7684\u89c4\u8303\u5165\u53e3\uff1b\u65e7\u5165\u53e3 \u53ea\u4f5c\u4e3a\u540c\u6e90\u517c\u5bb9\u9762\u8fdb\u5165\u5f03\u7528\u7a97\u53e3\u30020.10.0 \u4ee5\u540e\u65b0\u589e\u80fd\u529b\u4ece\u7b2c\u4e00\u4e2a candidate \u7248\u672c\u8d77\u5c31\u4f7f\u7528\u6700\u7ec8\u89c4\u8303\u5165\u53e3\u3001Schema <code>$id</code> \u548c operation\u3002\u540e\u7eed\u664b\u5347 stable \u53ea\u63d0\u9ad8\u517c\u5bb9\u627f\u8bfa\uff0c\u4e0d\u518d\u89e6\u53d1\u6d88\u8d39\u8005\u6e90\u7801\u6216\u5408\u540c\u8eab\u4efd\u6539\u9020\u3002\u6d88\u8d39\u8005\u8981\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\u4ecd\u9700 \u66f4\u65b0\u4e09\u5305\u7cbe\u786e pin\uff1bBundle \u662f\u5426\u91cd\u5efa\u7531\u65e2\u6709 package identity\u3001\u6765\u6e90\u6458\u8981\u4e0e provenance \u7ed1\u5b9a\u8f93\u5165\u51b3\u5b9a\uff0c\u800c\u975e\u6210\u719f\u5ea6\u6807\u7b7e\u51b3\u5b9a\u3002</p> <p>\u7269\u7406 <code>candidate/</code> \u76ee\u5f55\u4e0d\u662f\u65b0\u7684\u67b6\u6784\u5c42\uff0c\u4e5f\u4e0d\u51b3\u5b9a\u516c\u5f00\u7a33\u5b9a\u6027\u3002Contracts \u7684\u673a\u5668\u653f\u7b56\u548c\u80fd\u529b\u76ee\u5f55 <code>stability</code> \u5b57\u6bb5\u624d\u662f\u6210\u719f\u5ea6 \u771f\u6e90\uff1b\u5220\u9664\u5386\u53f2\u5165\u53e3\u9700\u8981\u72ec\u7acb\u4e3b\u7248\u672c\u51b3\u7b56\u548c\u6d88\u8d39\u8005\u9000\u51fa\u8bc1\u636e\uff0c\u4e0d\u80fd\u5939\u5e26\u5728\u664b\u5347\u4e2d\u3002</p>"},{"location":"architecture/#\u4e0b\u4e00\u9636\u6bb5\u80fd\u529b\u7ebf\u67b6\u6784-hand-off","title":"\u4e0b\u4e00\u9636\u6bb5\u80fd\u529b\u7ebf\uff08\u67b6\u6784 hand-off\uff09","text":"<p>\u4e09\u6761\u80fd\u529b\u7ebf\u5747\u7ecf FND-ADR-001 \u80fd\u529b\u7eb3\u5165\u95e8\u88c1\u51b3\u7eb3\u5165\uff0c\u5168\u90e8\u5728\u65e2\u6709\u5206\u5c42\u5185\u843d\u4f4d\uff1a</p> <ul> <li>\u5bbf\u4e3b\u63a5\u5165\u7ebf\uff08FND-FR-001/FND-FR-002\uff0cFND-ADR-003\uff0cFND-ADR-017\uff09\uff1aContracts 1.10.0 \u5728\u65e2\u6709 stable descriptor/probe/plan/receipt \u5408\u540c\u4e0a\u8865\u8db3\u6709\u9650\u6210\u719f\u5ea6\u3001\u624b\u52a8\u4e8b\u5b9e\u4e0e digest \u7ed1\u5b9a\u7684\u64cd\u4f5c\u7ea6\u675f\uff1bHarness \u590d\u7528 source closure\u3001\u53d7\u6536\u5bb9\u672c\u5730\u6295\u5f71\u3001\u7ed1\u5b9a\u8bfb\u53d6\u3001\u4e25\u683c\u53d1\u5e03\u548c\u539f\u5b50\u66ff\u6362\uff1bKit \u6ce8\u5165\u6709\u9650 Profile \u4e0e\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e driver\u3002\u53ea\u6709 <code>support=supported</code> \u7684 Descriptor \u624d\u80fd\u8ba9 <code>planHost</code> \u4ea7\u51fa <code>status=planned</code> \u7684 install/update \u8ba1\u5212\uff1bmanual \u5bbf\u4e3b\u5f97\u5230\u7a7a\u7684 <code>status=manual</code> \u8ba1\u5212\uff0c<code>applyHostPlan</code> \u8fd4\u56de <code>rejected</code> / <code>not-attempted</code>\u3002\u73b0\u6709\u516c\u5171 API \u4fdd\u7559 <code>planHost</code> / <code>applyHostPlan</code>\uff0cplanned \u8ba1\u5212\u4ecd\u987b\u6458\u8981\u7ed1\u5b9a\u3001\u5df2\u9a8c\u8bc1 build \u548c\u663e\u5f0f\u6388\u6743\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u7531\u8c03\u7528\u65b9\u521b\u5efa\u5e76\u72ec\u5360 fresh roots\uff0cFoundation \u6821\u9a8c canonical/fresh\u3001\u6536\u5bb9\u3001\u91cd\u53e0\u9694\u79bb\u3001\u6458\u8981\u4e0e Descriptor/driver \u7ed1\u5b9a\u5e76\u6309\u56fa\u5b9a\u53c2\u6570\u8c03\u7528\uff1b\u8c03\u7528\u65b9\u6839\u636e\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u548c\u4e1a\u52a1\u7b54\u6848\u4f5c\u6700\u7ec8\u9886\u57df\u9a8c\u6536\u3002Qoder \u7684 Descriptor \u4e3a <code>manual</code>\uff0c<code>qodercli-print-v1</code> \u4e3a <code>candidate</code> \u771f\u5b9e\u9a8c\u8bc1 driver\uff1bWorkBuddy \u4e0e CodeBuddy \u4f7f\u7528\u72ec\u7acb driver \u548c\u53d1\u73b0\u5e03\u5c40\u3002\u771f\u5b9e\u7528\u6237\u73af\u5883\u7684\u53d1\u5e03\u540e\u63d2\u4ef6\u53d1\u73b0\u3001\u5b89\u88c5\u3001\u66f4\u65b0\u3001marketplace \u4e0e\u53d1\u5e03\u72b6\u6001\u7531 release-skill \u7ba1\u7406\u3002</li> <li>\u6301\u4e45\u72b6\u6001\u5e95\u5ea7\u7ebf\uff08FND-FR-003\uff0cFND-ADR-004\uff09\uff1aappend-only \u4e8b\u4ef6\u3001hash chain\u3001\u5feb\u7167\u4e0e\u6821\u9a8c\u6062\u590d\uff1b\u53ea\u63d0\u4f9b\u72b6\u6001\u5e95\u5ea7\uff0c\u72b6\u6001\u673a\u3001\u4efb\u52a1\u8282\u70b9\u3001\u91cd\u8bd5\u3001\u7ec8\u6001\u3001\u8bb0\u5fc6\u7b49\u4e1a\u52a1\u8bed\u4e49\u4e0d\u7eb3\u5165 Foundation\u3002</li> <li>\u4eba\u7c7b\u62a5\u544a\u7ebf\uff08FND-FR-004\uff0cFND-ADR-005\uff09\uff1a\u53cc\u5c42\u5408\u540c\u2014\u2014\u673a\u5668\u7ed3\u679c\u662f\u552f\u4e00\u771f\u6e90\uff0c\u4eba\u7c7b\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\uff08Markdown + digest \u7ed1\u5b9a + \u5206\u7ea7\u68c0\u67e5\uff09\uff0c\u4e0d\u81ea\u7531\u64b0\u5199\u3002</li> <li>\u6709\u9650\u5c01\u95ed\u8bed\u4e49\u5de5\u5177\u7ebf\uff08FND-ADR-009\uff09\uff1a\u57fa\u7ebf\u7269\u5316 + contentGuard\uff08\u6458\u8981\u4e0d\u7b26\u3001\u7269\u5316\u4e2d\u9014\u53d8\u5316\u3001\u5b88\u536b\u68c0\u51fa\u5747\u5931\u8d25\u5173\u95ed\uff09\u3001\u901a\u7528\u53ea\u8bfb chokepoint\uff08\u5141\u8bb8\u6839\u96c6\u5408 + \u53ef\u9009\u8eab\u4efd\u8c13\u8bcd\uff09\u3001\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf\uff08\u7b56\u7565\u5951\u7ea6 + \u6ce8\u5165\u5f0f\u81ea\u6d4b\uff09\u3001token \u4e0a\u754c\u4f30\u7b97\uff08\u786e\u5b9a\u6027\u9886\u57df\u4f30\u7b97\u539f\u8bed\uff0c\u65e0\u6a21\u578b/\u7f51\u7edc/tokenizer \u4f9d\u8d56\uff09\u3001\u901a\u7528\u4e0a\u9650\u5b88\u536b\uff08\u590d\u7528 state-store \u4e8b\u4ef6\u8d26\u4e0e token-lock\uff0c\u4e0a\u9650\u4e0e\u8d85\u9650\u7b56\u7565\u7531\u6d88\u8d39\u8005\u914d\u7f6e\uff09\u3002</li> </ul> <p>\u4e09\u5305\u673a\u5236\u7ed3\u6784\u4fdd\u6301\u3001\u4e0d\u62c6\u7b2c\u56db\u4e2a\u673a\u5236\u5305\uff08FND-ADR-007\uff09\uff1b\u540c\u4e00 workspace \u5185\u7684\u72ec\u7acb Plugin release unit \u4e0d\u6539\u53d8\u8fd9\u6761\u4f9d\u8d56\u94fe\u3002\u5236\u54c1\u6cbb\u7406\u91c7\u7528 artifact-graph CLI \u4e0e\u7248\u672c\u9501\uff08FND-ADR-006\uff09\u3002</p>"},{"location":"architecture/#\u9996\u7248\u9884\u7b97","title":"\u9996\u7248\u9884\u7b97","text":"<ul> <li>\u9876\u5c42 Contracts \u5bf9\u8c61\uff1a46 \u7c7b\uff08\u5b8c\u6574\u6e05\u5355\u4ee5 <code>packages/skill-family-contracts/src/registry.json</code> \u4e3a\u552f\u4e00\u771f\u6e90\uff09\uff1aproject-manifest\u3001profile-descriptor\u3001project-profile\uff08FND-ADR-013\uff0c1.7.0 \u7eb3\u5165\uff09\u3001managed-file-lock\u3001operation-request\u3001operation-result\u3001migration-manifest\u3001adapter-source\u3001report-model\u3001report-binding\u3001host-descriptor\u3001host-registry\u3001host-capability-fact\u3001host-probe-result\u3001adapter-build-manifest\u3001host-operation-plan\u3001host-operation-receipt\u3001state-event-envelope\u3001state-snapshot-metadata\u3001token-estimate-result\u3001surface-scan-policy\u3001declared-read-surface-result\u3001structured-scan-policy\uff08FND-ADR-010/011\uff09\u3001timeout-policy\u3001watchdog-termination-envelope\uff08FND-ADR-012\uff0cappend-only \u4fdd\u6301 1.5.0\uff09\u3001public-boundary-declaration\u3001platform-difference-registry\u3001observation-scope\u3001profile-adoption-declaration\u3001audit-baseline-pin\u3001token-estimate-record\uff08\u5ba1\u8ba1\u89c4\u5219\u88c1\u51b3\u4e0e\u6574\u6539 1.6.0 \u7eb3\u5165\uff09\u3001source-authority-receipt\uff081.8.0 \u7eb3\u5165\uff09\u3001filesystem-root-binding\u3001fixed-set-publication-manifest\u3001fixed-set-publication-receipt\uff081.9.0 \u7eb3\u5165\uff09\u3001adapter-peer-verification-request\u3001adapter-peer-verification-result\uff08FND-ADR-018\uff0c1.10.0 \u7eb3\u5165\uff09\u3001host-verification-request\u3001host-verification-result\uff08FND-ADR-019\uff0c1.11.0 \u7eb3\u5165\uff09\u3001plugin-verification-request\u3001plugin-verification-result\u3001filesystem-tree-observation\uff08FND-ADR-021\uff0c1.13.0 \u7eb3\u5165\uff09\u3001executable-identity-observation\u3001skill-family-directory-verification-request\u3001skill-family-directory-verification-result\u3001engineering-baseline\uff1b</li> <li>Kit \u9876\u5c42\u547d\u4ee4\uff1a4 \u4e2a\uff08scaffold\u3001adopt-plan\u3001projection\u3001check\uff09\uff1b</li> <li>\u5f3a\u5236\u673a\u68b0\u89c4\u5219\uff1a\u5f53\u524d 9 \u6761\uff0c\u9884\u7b97\u4e0d\u8d85\u8fc7 20 \u6761\uff0c\u7edd\u5bf9\u4e0a\u9650 30 \u6761\uff1bCR-001 \u5bf9\u767b\u8bb0\u8868\u5185\u5168\u90e8 Schema \u505a\u7edf\u4e00\u7f16\u8bd1\uff1b</li> <li>\u53f6\u5b50\u5305\uff1a3 \u4e2a\uff08skill-family-contracts\u3001skill-family-harness-node\u3001skill-family-engineering-kit\uff09\uff1b</li> <li>Schema \u6821\u9a8c\u5668\uff1aAjv 8.20.0\uff08\u7cbe\u786e\u7248\u672c pin\uff09\uff0c\u652f\u6301 draft-07 \u4e0e 2020-12 \u53cc\u65b9\u8a00\uff1b</li> <li>kernel \u534f\u8bae\uff1askill-family.kernel.operation\uff08stable\uff09\uff0cContracts \u89c4\u683c\u7248\u672c 1.14.0\uff1bKernel \u6587\u6863\u4ecd\u4fdd\u6301 1.8.0 \u751f\u547d\u5468\u671f\u5750\u6807\u548c\u5b57\u8282\u57fa\u7ebf\uff1b</li> <li>\u9ed8\u8ba4\u8fd0\u884c\u65f6\u8bed\u8a00\uff1aNode\uff1b\u7b2c\u4e8c\u8bed\u8a00\u5b9e\u73b0\u9996\u7248\u4e3a 0\u3002</li> </ul> <p>\u4efb\u4f55\u65b0\u589e\u7ec4\u4ef6\u5fc5\u987b\u8bf4\u660e\u5220\u9664\u5b83\u4f1a\u5bfc\u81f4\u7684\u4e24\u4e2a\u4ee5\u4e0a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\u5b9e\u73b0\uff0c\u5e76\u901a\u8fc7\u72ec\u7acb fixture \u9a8c\u8bc1\u3002</p>"},{"location":"architecture/#\u673a\u5668\u771f\u6e90\u4e0e\u6587\u4ef6\u5206\u7c7b","title":"\u673a\u5668\u771f\u6e90\u4e0e\u6587\u4ef6\u5206\u7c7b","text":"\u771f\u6e90 \u5185\u5bb9 <code>.foundation/skeleton-manifest.json</code> \u5305\u6e05\u5355\u3001Profile\u3001fixture\u3001\u9876\u5c42\u547d\u4ee4 <code>.foundation/version-lock.json</code> projen\u3001pnpm\u3001Node \u7684\u7cbe\u786e\u7248\u672c\u4e0e\u9501\u5b9a\u70b9 <code>.foundation/file-registry.json</code> managed / handwritten / artifact \u4e09\u7c7b\u6587\u4ef6\u767b\u8bb0 <code>package.json</code> \u4e0e <code>packages/*/package.json</code> \u7248\u672c\u3001\u547d\u4ee4\u3001\u4f9d\u8d56\uff08\u5168\u90e8 projen \u53d7\u7ba1\uff09 <code>packages/skill-family-contracts/src/registry.json</code> \u534f\u8bae\u540d\u4e0e Schema $id \u767b\u8bb0 <code>scripts/release-artifact-contract.json</code> \u56fa\u5b9a\u4e09\u5305\u53d1\u5e03\u5b57\u8282\u5408\u540c\uff08\u6210\u5458\u3001\u5fc5\u9700\u9879\u4e0e\u5185\u5bb9\u6458\u8981\u89c4\u5219\uff09 <p>\u53d7\u7ba1\u6587\u4ef6\u53ea\u80fd\u901a\u8fc7 <code>.projenrc.js</code> \u4fee\u6539\u5e76\u8fd0\u884c <code>pnpm synth</code> \u518d\u751f\u6210\uff1b\u624b\u5199\u6587\u4ef6\uff08\u542b\u5168\u90e8\u6587\u6863\uff09\u4e0d\u4f1a\u88ab synth \u8986\u76d6\u3002\u5206\u7c7b\u6743\u5a01\u89c1 <code>.foundation/file-registry.json</code>\u3002</p>"},{"location":"architecture/#\u6587\u6863\u7cfb\u7edf\u4e0e\u4e8b\u5b9e\u68c0\u67e5","title":"\u6587\u6863\u7cfb\u7edf\u4e0e\u4e8b\u5b9e\u68c0\u67e5","text":"<p>\u6587\u6863\u4f53\u7cfb\u7684\u76ee\u6807\u662f\u7528\u786e\u5b9a\u6027\u68c0\u67e5\u6d88\u9664\u624b\u5de5\u6f02\u79fb\uff1a</p> <ol> <li>\u51bb\u7ed3\u4e8b\u5b9e\u5305\uff1a\u6587\u6863\u5199\u4f5c\u53ea\u6d88\u8d39\u4e0a\u8868\u6240\u5217\u673a\u5668\u771f\u6e90\u3002\u6a21\u578b\u6216\u4f5c\u8005\u4e0d\u5f97\u51ed\u8bb0\u5fc6\u5199\u5165\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\uff1b\u6a21\u578b\u540d\u3001\u51ed\u636e\u548c\u8c03\u5ea6\u4fe1\u606f\u4e0d\u8fdb\u5165\u6587\u6863\uff0c\u4e5f\u4e0d\u8fdb\u5165 Contracts\u3002</li> <li>\u4e8b\u5b9e\u68c0\u67e5\uff1a<code>node scripts/docs/fact-check.mjs</code> \u5bf9\u7167\u771f\u6e90\u6821\u9a8c\u6587\u6863\u4e2d\u7684\u5305\u540d\u3001\u547d\u4ee4\u3001\u95e8\u7981\u4e8b\u5b9e\u3001\u7248\u672c pin \u4e0e\u5173\u952e\u6570\u5b57\uff0c\u5e76\u4ea4\u53c9\u6821\u9a8c\u771f\u6e90\u4e4b\u95f4\u7684\u4e00\u81f4\u6027\uff08manifest \u4e0e package.json\u3001version-lock \u4e0e packageManager\u3001\u89c4\u5219\u6570\u4e0e\u9884\u7b97\u7b49\uff09\u3002</li> <li>\u94fe\u63a5\u68c0\u67e5\uff1a<code>node scripts/docs/link-check.mjs</code> \u89e3\u6790 README \u4e0e\u5168\u90e8 <code>docs/**/*.md</code> \u7684\u7ad9\u5185\u76f8\u5bf9\u94fe\u63a5\u548c\u6807\u9898\u951a\u70b9\uff0c\u5e76\u6821\u9a8c <code>mkdocs.yml</code> nav \u6536\u5f55\u5b8c\u6574\u3002</li> <li>\u65e0\u5de5\u4f5c\u6d41\u8fb9\u754c\u4e0e\u516c\u5f00\u8fb9\u754c\u9a8c\u8bc1\uff1a\u672c\u4ed3\u6ca1\u6709\u4efb\u4f55 CI/CD workflow\uff08\u65e7\u62d3\u6251\u7684 ci/docs/docs-deploy \u4e09\u4e2a Actions \u5df2\u6574\u4f53\u5220\u9664\uff09\uff0c\u5168\u90e8\u95e8\u7981\u5728\u79c1\u6709\u5de5\u4f5c\u533a\u5185\u8fd0\u884c\uff08<code>pnpm check</code>\uff09\uff1b\u516c\u5f00\u8fb9\u754c\u7531 <code>check:public-snapshots</code> \u4e0e\u53d1\u5e03\u5b57\u8282\u5408\u540c\u673a\u68b0\u9a8c\u8bc1\u3002\u516c\u5f00\u9759\u6001\u7ad9\u7531 <code>scripts/render-public-site.mjs</code> \u6e32\u67d3\uff08\u552f\u4e00\u8f93\u51fa <code>docs/public/site/**</code> \u4e0e\u786e\u5b9a\u6027\u57fa\u7ebf <code>docs/public/site-baseline.json</code>\uff09\u3002</li> <li>\u7248\u672c\u9501\u5b9a\uff1a\u7ad9\u70b9\u5de5\u5177\u94fe\u9501\u5b9a\u5728 <code>scripts/docs/toolchain.json</code> \u4e0e <code>scripts/docs/requirements.txt</code>\uff0c\u6784\u5efa\u53ea\u4f7f\u7528\u4ed3\u5e93\u5916\u90e8\u7684 Python \u865a\u62df\u73af\u5883\uff0c\u4e0d\u505a\u7cfb\u7edf\u7ea7 pip install\u3002</li> </ol> <p>\u4e24\u4e2a\u68c0\u67e5\u811a\u672c\u90fd\u53ef\u76f4\u63a5 <code>node scripts/docs/&lt;name&gt;.mjs</code> \u8fd0\u884c\uff1a<code>fact-check.mjs</code> \u7ecf\u4ed3\u5185\u6a21\u5757\u6d88\u8d39\u6839\u76ee\u5f55\u7cbe\u786e\u9501\u5b9a\u7684 <code>semver@7.8.5</code>\uff0c\u8fd0\u884c\u524d\u5fc5\u987b\u5148\u5b8c\u6210 <code>pnpm install --frozen-lockfile</code>\uff1b<code>link-check.mjs</code> \u4e3a\u7eaf Node \u5b9e\u73b0\u3002\u804c\u8d23\u8bf4\u660e\u89c1 <code>scripts/docs/README.md</code>\u3002</p>"},{"location":"architecture/#\u7a33\u5b9a\u4ea7\u54c1\u95e8\u7981","title":"\u7a33\u5b9a\u4ea7\u54c1\u95e8\u7981","text":"<p>\u6839 <code>pnpm check</code> \u53ea\u7f16\u6392 11 \u4e2a\u7a33\u5b9a\u4ea7\u54c1 gate ID\uff08<code>check:structure</code>\uff5e<code>check:artifacts</code>\uff0c\u9010 ID \u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff09\uff0c\u4e0d\u518d\u9501\u6b7b\u539f\u59cb\u547d\u4ee4\u6e05\u5355\uff1b\u6bcf\u4e2a\u7a33\u5b9a ID \u5728\u81ea\u5df1\u7684 package script \u5185\u7ec4\u5408\u5c11\u91cf\u4ea7\u54c1\u68c0\u67e5\u3002\u95e8\u7981\u4e8b\u5b9e\u7531 <code>node scripts/docs/fact-check.mjs</code> \u4ece\u6839 <code>package.json</code> \u7684 <code>scripts.check</code> \u673a\u68b0\u63a8\u5bfc\u5e76\u9010\u5b57\u6838\u5bf9\u3002\u6587\u6863\u4e0e setup \u53ea\u8c03\u7528\u6216\u5217\u51fa 11 \u4e2a\u7a33\u5b9a ID \u6216\u6839 <code>pnpm check</code>\uff0c\u4e0d\u590d\u5236\u5e95\u5c42\u547d\u4ee4\u5217\u8868\u3002</p> <p>\u4ed3\u5185\u68c0\u67e5\u7684\u8bda\u5b9e\u8fb9\u754c\uff1a\u7ed3\u6784\u68c0\u67e5\u53ea\u8bc1\u660e\u201c\u5b57\u8282/\u7ed3\u6784\u4e00\u81f4\u6027\uff08\u4ed3\u5185\u53ef\u8bc1\uff09\u201d\uff1b\u4e00\u6b21\u6027\u8fc1\u79fb\u5b8c\u6574\u6027\u3001\u666e\u901a\u6b63\u6587\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\u7ed3\u8bba\u5c5e\u4e8e\u5916\u90e8\u5ba1\u9605\u804c\u8d23\uff0c\u4e0d\u5728\u76ee\u6807\u4ed3\u5185\u7ef4\u62a4\u7b2c\u4e8c\u4efd\u95e8\u7981 registry\u3001baseline \u6216\u547d\u4ee4\u6bd4\u8f83\u5668\u3002</p>"},{"location":"examples-and-fixtures/","title":"\u6837\u4f8b\u4e0e Fixture","text":"<p>\u672c\u9875\u8bf4\u660e Foundation \u4e2d fixture \u7684\u76ee\u7684\u3001\u8fd0\u884c\u5165\u53e3\uff0c\u4ee5\u53ca\u5b83\u80fd\u5426\u4f5c\u4e3a\u4e1a\u52a1 oracle\uff08\u5224\u5b9a\u4f9d\u636e\uff09\u3002\u7ed3\u8bba\u5148\u884c\uff1afixture \u53ea\u8bc1\u660e\u7ed3\u6784\u5951\u7ea6\uff0c\u4e0d\u8bc1\u660e\u4e1a\u52a1\u8bed\u4e49\u3002</p>"},{"location":"examples-and-fixtures/#fixture-\u7684\u76ee\u7684","title":"fixture \u7684\u76ee\u7684","text":"<p>fixture \u56de\u7b54\u4e00\u4e2a\u95ee\u9898\u2014\u2014\u300c\u8fd9\u4efd\u5951\u7ea6\u5bf9\u8c61/SPI \u5728\u7ed9\u5b9a\u8f93\u5165\u4e0b\u662f\u5426\u4ea7\u751f\u58f0\u660e\u7684\u884c\u4e3a\u300d\u3002\u5b83\u5206\u4e09\u7c7b\uff1a</p> <ul> <li>\u6b63\u4f8b\uff08positive\uff09\uff1a\u7ed9\u5b9a\u5408\u6cd5\u8f93\u5165\uff0c\u6821\u9a8c/\u673a\u5236\u5e94\u901a\u8fc7\u3002</li> <li>\u53cd\u4f8b\uff08negative\uff09\uff1a\u7ed9\u5b9a\u975e\u6cd5\u8f93\u5165\uff0c\u5fc5\u987b\u4ea7\u751f\u7a33\u5b9a\u5931\u8d25\u7801\uff08\u5982 <code>SFC1001</code>/<code>SFC1010</code>\uff09\u3002</li> <li>\u65b9\u8a00\u8fb9\u754c\uff08dialect-boundary\uff09\uff1a\u5728 draft-07 \u4e0e 2020-12 \u53cc\u65b9\u8a00\u4ea4\u754c\u5904\u7684\u9884\u671f\u884c\u4e3a\u3002</li> </ul> <p>fixture \u662f\u5b8c\u5168\u865a\u6784\u6570\u636e\uff0c\u4e0d\u542b\u771f\u5b9e\u4e1a\u52a1\u3001\u79c1\u6709 Profile\u3001\u7528\u6237\u8def\u5f84\u6216\u51ed\u636e\u3002</p>"},{"location":"examples-and-fixtures/#\u8fd0\u884c\u5165\u53e3","title":"\u8fd0\u884c\u5165\u53e3","text":"<ul> <li>Contracts fixture\uff1a<code>packages/skill-family-contracts/test/fixtures.test.mjs</code> \u673a\u68b0\u91cd\u653e <code>src/fixtures/&lt;contract&gt;/</code> \u7684\u671f\u671b\uff0c\u884c\u4e3a\u4e0d\u7b26\u62a5 <code>SFC1010</code>\u3002</li> <li>Profile SPI \u7b26\u5408\u6027\uff1a<code>fixtures/generic-profile-extension-conformance/verify.mjs</code>\uff08\u53ea\u8bfb\u6821\u9a8c\uff09\u4e0e <code>leak-scan.mjs</code>\uff08\u6cc4\u6f0f\u626b\u63cf\uff09\u3002</li> <li>\u9aa8\u67b6\u7cbe\u786e\u5408\u540c\uff1a<code>fixtures/scaffold-conformance/verify.mjs</code>\u3002</li> <li>\u91c7\u7528\u5371\u5bb3\u7c7b\uff1a<code>fixtures/adoption/cases/</code> \u4ee5\u5b57\u8282\u7ea7\u524d\u540e\u5feb\u7167\u8bc1\u660e <code>adopt-plan</code> \u53ea\u8bfb\u3002</li> </ul> <p>\u4ee5\u4e0a\u5165\u53e3\u5747\u4e3a\u53ea\u8bfb\u6216\u81ea\u542b\uff0c\u4e0d\u5199\u8c03\u7528\u65b9\u4ed3\u3001\u4e0d\u89e6\u78b0\u8fdc\u7aef\u3002</p>"},{"location":"examples-and-fixtures/#fixture-\u80fd\u5426\u4f5c\u4e3a\u4e1a\u52a1-oracle","title":"fixture \u80fd\u5426\u4f5c\u4e3a\u4e1a\u52a1 oracle","text":"<p>\u4e0d\u80fd\u3002\u539f\u56e0\uff1a</p> <ul> <li>fixture \u53ea\u8986\u76d6\u7ed3\u6784\u5951\u7ea6\u4e0e\u673a\u5236\u8fb9\u754c\uff0c\u4e0d\u8986\u76d6\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1\u7ed3\u8bba\u3002</li> <li>\u5ba1\u8ba1\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\u5c5e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff0cFoundation \u53ea\u63d0\u4f9b\u5ba1\u8ba1\u8868\u9762\uff08canonical JSON + sha256 \u6458\u8981\uff0c\u89c1 <code>foundation.contracts.audit-surface</code>\uff09\u3002</li> <li>\u6587\u6863\u4f53\u7cfb\u660e\u786e\uff1a\u666e\u901a\u6b63\u6587\u8bed\u4e49\u6b63\u786e\u6027\u7531\u5916\u90e8\u5ba1\u9605\u8d1f\u8d23\uff0c\u4ed3\u5185\u95e8\u7981\u53ea\u8bc1\u660e\u673a\u5668\u4e8b\u5b9e\u4e0e\u5b57\u8282/\u7ed3\u6784\u4e00\u81f4\u6027\u3002</li> </ul> <p>\u56e0\u6b64\uff0c\u628a fixture \u5f53\u4f5c\u4e1a\u52a1\u6b63\u786e\u6027\u7684\u5224\u636e\u662f\u8bef\u7528\u3002\u5b83\u8bc1\u660e\u300c\u5951\u7ea6\u88ab\u6ee1\u8db3\u300d\uff0c\u4e0d\u8bc1\u660e\u300c\u4e1a\u52a1\u662f\u5bf9\u7684\u300d\u3002</p>"},{"location":"examples-and-fixtures/#\u516c\u5f00\u8303\u56f4","title":"\u516c\u5f00\u8303\u56f4","text":"<ul> <li>Profile\uff1a<code>profiles/public-plugin</code>\uff08\u516c\u5f00\u6216\u5b8c\u5168\u865a\u6784\u6837\u4f8b\uff09\u3002</li> <li>fixture\uff1a<code>fixtures/generic-profile-extension-conformance</code>\u3001<code>fixtures/scaffold-conformance</code>\u3001<code>fixtures/licensing-profile-conformance</code>\u3001<code>fixtures/adoption</code>\u3001<code>fixtures/m0-consumer</code>\u3002</li> </ul> <p>\u5176\u4f59\u79c1\u6709\u6216\u6d88\u8d39\u8005 fixture \u4e0d\u8fdb\u5165\u516c\u5f00\u6587\u6863\uff1b\u79c1\u6709 Profile\u3001\u4ea7\u54c1\u6570\u636e\u3001\u7528\u6237\u8def\u5f84\u3001\u8d26\u53f7\u3001token \u6216\u8fd0\u884c\u65e5\u5fd7\u4e00\u5f8b\u4e0d\u5199\u5165\u516c\u5f00 fixture\u3002</p>"},{"location":"git-lifecycle/","title":"Git \u751f\u547d\u5468\u671f\u6307\u5357","text":"<p>\u672c\u6587\u662f Skill Family \u5404\u5de5\u4f5c\u533a Git \u751f\u547d\u5468\u671f\u89c4\u5219\u7684\u552f\u4e00\u6743\u5a01\u6587\u6863\u3002\u65b0\u5efa\u9879\u76ee\u9aa8\u67b6 \uff08<code>npx skill-family-engineering-kit scaffold</code>\uff09\u4e2d\u7684 AGENTS.md\u300cMinimal Git lifecycle\u300d\u533a\u5757\u4e0e <code>docs/git-lifecycle.md</code> \u9875\u9762\u90fd\u662f\u5bf9\u672c\u6307\u5357\u540c\u53e3\u5f84\u7684\u6295\u5f71\u4e0e\u6307\u9488\u2014\u2014 \u4efb\u4f55\u5de5\u4f5c\u533a\u90fd\u4e0d\u5f97\u518d\u7ef4\u62a4\u7b2c\u4e8c\u5957 Git \u89c4\u5219\u3002\u6240\u6709\u5de5\u5177\u94fe\uff08projen\u3001engineering kit\u3001 CI \u811a\u672c\uff09\u90fd\u4e0d\u6267\u884c Git \u5199\u64cd\u4f5c\uff1b\u4e0b\u8ff0\u6bcf\u4e00\u7c7b\u5199\u64cd\u4f5c\u90fd\u53ea\u6765\u81ea\u4eba\u7684\u663e\u5f0f\u51b3\u5b9a\u3002</p>"},{"location":"git-lifecycle/#\u5206\u652f\u547d\u540d\u4e0e\u5bff\u547d","title":"\u5206\u652f\u547d\u540d\u4e0e\u5bff\u547d","text":"<ul> <li>\u5206\u652f\u6a21\u578b\uff1a\u4e00\u6761\u957f\u671f\u5206\u652f <code>main</code>\uff0c\u52a0\u77ed\u5bff\u547d\u4efb\u52a1\u5206\u652f <code>task/&lt;\u4efb\u52a1\u53f7&gt;-&lt;\u77ed\u6a2a\u7ebf\u6458\u8981&gt;</code> \uff08\u4f8b\u5982 <code>task/0050-git-lifecycle</code>\uff09\u3002</li> <li>\u4efb\u52a1\u5206\u652f\u53ea\u627f\u8f7d\u4e00\u4e2a\u4efb\u52a1\u7684\u4e00\u7ec4\u76f8\u5173\u53d8\u66f4\uff1b\u4efb\u52a1\u9a8c\u6536\u901a\u8fc7\u540e\u5408\u5e76\uff1b\u786e\u8ba4\u6ca1\u6709\u672a\u5408\u5e76 \u63d0\u4ea4\u540e\u53ef\u5220\u9664\u672c\u5730\u5206\u652f\u3002\u8fdc\u7aef\u5206\u652f\u5220\u9664\u5c5e\u4e8e push \u7c7b\u5916\u90e8\u5199\u5165\uff0c\u5fc5\u987b\u53e6\u884c\u53d6\u5f97\u663e\u5f0f \u6388\u6743\uff08\u89c1\u4e0b\u6587\u9010\u9879\u6388\u6743\u8282\uff09\uff0c\u5408\u5e76\u672c\u8eab\u4e0d\u81ea\u52a8\u6388\u6743\u8fdc\u7aef\u5220\u9664\u3002\u4e0d\u5b58\u5728\u957f\u671f\u5b58\u6d3b\u7684 \u7279\u6027\u5206\u652f\uff0c\u4e5f\u4e0d\u5141\u8bb8\u5728\u4efb\u52a1\u5206\u652f\u4e0a\u5806\u79ef\u4e0e\u4efb\u52a1\u65e0\u5173\u7684\u53d8\u66f4\u3002</li> <li><code>main</code> \u6c38\u8fdc\u53ea\u63a5\u6536\u5df2\u901a\u8fc7\u95e8\u7981\u7684\u5408\u5e76\uff1b\u4efb\u4f55\u60c5\u51b5\u4e0b\u90fd\u4e0d\u5f97\u5bf9 <code>main</code> \u76f4\u63a5\u63d0\u4ea4\u6216 force-push\u3002</li> </ul>"},{"location":"git-lifecycle/#\u4fee\u6539\u524d\u72b6\u6001\u68c0\u67e5","title":"\u4fee\u6539\u524d\u72b6\u6001\u68c0\u67e5","text":"<ul> <li>\u63d0\u4ea4\u3001\u8fdc\u7aef\u7b49\u5b9e\u65f6 Git \u72b6\u6001\u4e0d\u5199\u8fdb\u4efb\u4f55\u7248\u672c\u5316\u6587\u6863\uff08\u5305\u62ec\u4ea7\u54c1\u72b6\u6001\u9875\uff09\uff1b\u6267\u884c\u4efb\u4f55 Git \u52a8\u4f5c\u524d\uff0c\u5148\u73b0\u573a\u8fd0\u884c\u4e0b\u5217\u53ea\u8bfb\u547d\u4ee4\u53d1\u73b0\u5f53\u524d\u72b6\u6001\uff1a</li> </ul> <p><code>bash git status --short --branch git rev-parse --verify HEAD git remote -v</code></p> <p>\u8fd9\u4e09\u6761\u547d\u4ee4\u53ea\u662f\u53ea\u8bfb\u63a2\u6d4b\uff1a\u8f93\u51fa\u53ea\u53cd\u6620\u672c\u673a\u5de5\u4f5c\u533a\u5f53\u4e0b\u7684\u72b6\u6001\uff0c\u4e0d\u6388\u4e88\u4efb\u4f55\u5199\u6743\u9650\uff1b \u6267\u884c stage/commit/push/tag/release \u4ecd\u5fc5\u987b\u6309\u4e0b\u6587\u9010\u9879\u6388\u6743\u8282\u5355\u72ec\u53d6\u5f97\u6388\u6743\u3002 - \u5f00\u59cb\u4efb\u4f55\u4fee\u6539\u4e4b\u524d\uff0c\u5148\u8fd0\u884c <code>git status --short --branch</code>\uff0c\u786e\u8ba4\u5f53\u524d\u5206\u652f\u3001\u672a\u63d0\u4ea4 \u53d8\u66f4\u4e0e\u8fdc\u7aef\u8ddf\u8e2a\u72b6\u6001\uff1b\u5de5\u4f5c\u533a\u91cc\u51fa\u73b0\u4e0d\u8ba4\u8bc6\u7684\u5206\u652f\u3001\u672a\u6682\u5b58\u53d8\u66f4\u6216\u964c\u751f\u6587\u4ef6\u65f6\uff0c\u5148 \u8c03\u67e5\u6765\u6e90\u518d\u52a8\u624b\uff0c\u90a3\u662f\u522b\u4eba\u6b63\u5728\u8fdb\u884c\u7684\u5de5\u4f5c\uff0c\u4e0d\u662f\u53ef\u4ee5\u968f\u624b\u6e05\u7406\u7684\u566a\u58f0\u3002 - \u7981\u6b62\u7528 <code>git checkout .</code>\u3001<code>git restore .</code>\u3001<code>git clean -f</code>\u3001<code>git reset --hard</code> \u4e4b\u7c7b\u7684\u7834\u574f\u6027\u547d\u4ee4\u201c\u987a\u624b\u201d\u6e05\u7a7a\u5de5\u4f5c\u533a\u6765\u7ed5\u8fc7\u969c\u788d\uff1b\u786e\u9700\u4e22\u5f03\u672a\u63d0\u4ea4\u53d8\u66f4\u65f6\uff0c\u5fc5\u987b \u9010\u6761\u5217\u51fa\u5c06\u88ab\u4e22\u5f03\u7684\u5185\u5bb9\u5e76\u83b7\u5f97\u663e\u5f0f\u786e\u8ba4\u3002</p>"},{"location":"git-lifecycle/#\u539f\u5b50-commit-\u6761\u4ef6","title":"\u539f\u5b50 commit \u6761\u4ef6","text":"<p>\u4e00\u4e2a commit \u5fc5\u987b\u540c\u65f6\u6ee1\u8db3\uff1a</p> <ol> <li>\u53ea\u5305\u542b\u4e00\u4e2a\u903b\u8f91\u53d8\u66f4\uff08\u4e00\u4e2a\u4efb\u52a1\u7684\u63a8\u8fdb\uff0c\u6216\u4e00\u6b21\u660e\u786e\u62c6\u5206\u7684\u4fee\u6b63\uff09\uff1b</li> <li>\u53d7\u7ba1\u751f\u6210\u7269\u4e0e\u5176\u6e90\uff08<code>.projenrc.js</code>\u3001\u6295\u5f71\u811a\u672c\uff09\u5728\u540c\u4e00\u6b21\u63d0\u4ea4\u5185\u6210\u5bf9\u51fa\u73b0\uff1b</li> <li>\u63d0\u4ea4\u524d <code>pnpm check</code>\uff08\u6216\u4efb\u52a1\u6307\u5b9a\u7684\u6700\u5c0f\u9a8c\u8bc1\u5165\u53e3\uff09\u9000\u51fa\u7801\u4e3a 0\u2014\u2014\u4e0d\u5f97\u628a\u7ea2\u7684 \u72b6\u6001\u63d0\u4ea4\u8fdb\u4efb\u4f55\u5206\u652f\u540e\u518d\u201c\u56de\u5934\u4fee\u201d\uff1b</li> <li>\u63d0\u4ea4\u4fe1\u606f\u8bf4\u660e\u201c\u4e3a\u4ec0\u4e48\u201d\uff0c\u5f15\u7528\u4efb\u52a1\u53f7\uff1b\u4e0d\u5f97\u5305\u542b\u51ed\u636e\u3001\u79c1\u6709\u6570\u636e\u6216\u4e0d\u53ef\u516c\u5f00\u7684 \u5185\u90e8\u6807\u8bc6\u3002</li> </ol> <p>\u4e0d\u6ee1\u8db3\u4ee5\u4e0a\u4efb\u4e00\u6761\u4ef6\u7684\u53d8\u66f4\u4e0d\u5f97\u63d0\u4ea4\uff1b\u5b81\u53ef\u62c6\u6210\u591a\u4e2a commit\uff0c\u4e5f\u4e0d\u5408\u5e76\u6210\u4e00\u4e2a\u6df7\u5408 \u53d8\u66f4\u3002</p>"},{"location":"git-lifecycle/#stagecommitpushtagrelease-\u7684\u9010\u9879\u6388\u6743","title":"stage\u3001commit\u3001push\u3001tag\u3001release \u7684\u9010\u9879\u6388\u6743","text":"<ul> <li>\u4fee\u6539\u6388\u6743\u4e0d\u5305\u542b stage \u4e0e commit\uff1a\u83b7\u5f97\u67d0\u4efb\u52a1\u7684\u4fee\u6539\u6388\u6743\uff0c\u53ea\u8868\u793a\u53ef\u4ee5\u5728\u5de5\u4f5c\u533a \u91cc\u6539\u52a8\u6587\u4ef6\uff1bstage\uff08<code>git add</code>\uff09\u4e0e commit \u4ecd\u662f\u4e24\u4e2a\u72ec\u7acb\u7684\u5199\u64cd\u4f5c\uff0c\u5fc5\u987b\u5206\u522b \u6309\u98ce\u9669\u9010\u9879\u53d6\u5f97\u660e\u786e\u6388\u6743\uff0c\u4e0d\u5b58\u5728\u201c\u6388\u6743\u4fee\u6539\u5373\u9ed8\u8ba4\u6388\u6743\u63d0\u4ea4\u201d\u3002</li> <li>stage \u4e0e commit\uff1a\u9ed8\u8ba4\u53ea\u5728\u672c\u5730\u3001\u6309\u539f\u5b50\u6761\u4ef6\u6267\u884c\uff1b\u4e00\u6b21 commit \u6388\u6743\u53ea\u8986\u76d6\u88ab \u660e\u786e\u58f0\u660e\u7684\u90a3\u4e00\u6b21\u672c\u5730\u63d0\u4ea4\uff0c\u4e0d\u8986\u76d6\u4efb\u52a1\u4e4b\u5916\u7684\u6e05\u7406\u3001\u6539\u5199\uff08\u542b amend/rebase \u6539\u5199\u5df2\u63d0\u4ea4\u5185\u5bb9\uff09\u6216\u540e\u7eed\u63d0\u4ea4\u3002</li> <li>push\uff1a\u628a\u4efb\u52a1\u5206\u652f\u63a8\u9001\u5230\u8fdc\u7aef\u3001\u5f00 PR\uff0c\u4ee5\u53ca\u5220\u9664\u8fdc\u7aef\u5206\u652f \uff08<code>git push --delete</code> / <code>git push origin :&lt;branch&gt;</code>\uff09\u540c\u5c5e push \u7c7b\u5916\u90e8 \u5199\u5165\uff0c\u90fd\u9700\u8981\u5728\u5f53\u524d\u4efb\u52a1\u91cc\u5355\u72ec\u6388\u6743\uff1b\u7981\u6b62\u76f4\u63a5 push <code>main</code>\u3002\u5408\u5e76\u540e\u7684\u6e05\u7406\u8bf4\u660e \u4e0d\u6784\u6210\u5bf9\u8fdc\u7aef\u5220\u9664\u7684\u81ea\u52a8\u6388\u6743\u3002</li> <li>tag \u4e0e release\uff1a\u6bcf\u4e00\u6b21\u6253 tag\u3001\u53d1\u5e03 release\uff08\u5305\u62ec npm publish\u3001Pages \u90e8\u7f72\u3001 \u5efa\u8fdc\u7aef\u4ed3\u5e93\uff09\u90fd\u662f\u72ec\u7acb\u7684\u9ad8\u98ce\u9669\u52a8\u4f5c\uff0c\u5fc5\u987b\u9010\u9879\u5355\u72ec\u6388\u6743\uff1b\u4e00\u6b21 push \u6388\u6743\u4e0d\u6784\u6210 \u4efb\u4f55 tag/release \u6388\u6743\u3002</li> <li>\u81ea\u52a8\u5316\u5de5\u5177\uff08\u542b AI \u52a9\u624b\u4e0e CI\uff09\u5728\u672a\u83b7\u5f97\u9488\u5bf9\u5f53\u524d\u4efb\u52a1\u7684\u663e\u5f0f\u4eba\u5de5\u6388\u6743\u524d\uff0c\u4e0d\u5f97 \u6267\u884c <code>git add</code>\uff08stage\uff09\u3001<code>git commit</code>\u3001<code>git push</code>\u3001<code>git tag</code> \u6216\u4efb\u4f55\u5efa \u8fdc\u7aef/\u53d1\u5e03/\u5220\u9664\u8fdc\u7aef\u5f15\u7528\u7684\u547d\u4ee4\u3002</li> <li>\u6388\u6743\u53ea\u5bf9\u58f0\u660e\u8005\u7684\u90a3\u4e00\u6b21\u64cd\u4f5c\u6709\u6548\uff0c\u4e0d\u6784\u6210\u5bf9\u540c\u7c7b\u540e\u7eed\u64cd\u4f5c\u7684\u957f\u671f\u653e\u884c\u3002</li> </ul>"},{"location":"git-lifecycle/#\u53d7\u7ba1\u6295\u5f71\u4e0e\u6e90\u540c\u63d0\u4ea4","title":"\u53d7\u7ba1\u6295\u5f71\u4e0e\u6e90\u540c\u63d0\u4ea4","text":"<ul> <li>projen \u53d7\u7ba1\u6587\u4ef6\u53ea\u80fd\u901a\u8fc7\u4fee\u6539 <code>.projenrc.js</code> \u540e\u8fd0\u884c <code>pnpm synth</code> \u4ea7\u751f\uff1b\u751f\u6210\u7269 \u5fc5\u987b\u4e0e\u5176\u6e90\u53d8\u66f4\u5728\u540c\u4e00\u4e2a commit \u5185\u63d0\u4ea4\uff0c\u4e0d\u5f97\u5148\u63d0\u4ea4\u6e90\u3001\u540e\u8865\u751f\u6210\u7269\uff0c\u66f4\u4e0d\u5f97\u53ea \u63d0\u4ea4\u5176\u4e2d\u4e00\u4fa7\u3002</li> <li>\u6587\u6863\u53d7\u7ba1\u6295\u5f71\uff08\u5982 setup.md \u7684\u7a33\u5b9a\u95e8\u7981\u9636\u6bb5\u533a\u5757\uff09\u540c\u7406\uff1a\u6295\u5f71\u811a\u672c\u91cd\u8dd1 \u7684\u8f93\u51fa\u4e0e\u89e6\u53d1\u5b83\u7684\u771f\u6e90\u53d8\u66f4\u540c\u63d0\u4ea4\uff1bCI \u7684\u6f02\u79fb\u68c0\u67e5\uff08synth-drift / synth-idempotency\uff09 \u4f1a\u673a\u68b0\u62e6\u622a\u53ea\u63d0\u4ea4\u4e00\u4fa7\u7684\u53d8\u66f4\u3002</li> </ul>"},{"location":"git-lifecycle/#gitignore-\u5206\u7c7b","title":".gitignore \u5206\u7c7b","text":"<ul> <li>\u6bcf\u4e2a\u88ab\u5ffd\u7565\u7684\u8def\u5f84\u90fd\u5fc5\u987b\u5f52\u5165 <code>.foundation/file-registry.json</code> \u7684\u4e00\u4e2a\u7c7b\u522b\uff1a \u5de5\u5177\u751f\u6210\u7269\uff08artifacts\uff0c\u5982 <code>node_modules/</code>\u3001<code>site/</code>\u3001<code>.cache/</code>\u3001\u65e5\u5fd7\uff09\u8d70 <code>.gitignore</code>\uff1b\u4f9d\u8d56\u9501\u6587\u4ef6\uff08trackedToolLocks\uff0c\u5982 <code>pnpm-lock.yaml</code>\uff09\u88ab\u663e\u5f0f\u8ddf\u8e2a\u3001 \u4e0d\u5f97\u5ffd\u7565\uff1b\u624b\u5199\u6e90\u4e8b\u5b9e\u4e0e\u53d7\u7ba1\u6587\u4ef6\u4e00\u5f8b\u8ddf\u8e2a\u3002</li> <li><code>.gitignore</code> \u7684\u5ffd\u7565\u6a21\u5f0f\u96c6\u5408\u4e0e file-registry \u7684 artifacts \u6a21\u5f0f\u96c6\u5408\u5fc5\u987b\u9010\u5b57 \u4e00\u81f4\uff08<code>scripts/check-structure.mjs</code> \u673a\u68b0\u6838\u5bf9\uff09\uff1b\u65b0\u589e\u5ffd\u7565\u9879\u5fc5\u987b\u5148\u767b\u8bb0\u7c7b\u522b\uff0c \u4e0d\u5141\u8bb8\u51fa\u73b0\u201c\u8ddf\u8e2a\u4f46\u88ab\u5ffd\u7565\u201d\u6216\u201c\u5ffd\u7565\u4f46\u672a\u767b\u8bb0\u201d\u7684\u4e2d\u95f4\u6001\u3002</li> </ul>"},{"location":"git-lifecycle/#\u5220\u9664\u524d\u6838\u5bf9\u4e0e\u53ef\u6062\u590d\u5904\u7f6e","title":"\u5220\u9664\u524d\u6838\u5bf9\u4e0e\u53ef\u6062\u590d\u5904\u7f6e","text":"<ul> <li>\u5220\u9664\u4efb\u4f55\u6587\u4ef6\u3001\u5206\u652f\u6216\u5386\u53f2\u5185\u5bb9\u4e4b\u524d\uff0c\u5148\u6838\u5bf9\u5176\u662f\u5426\u4ecd\u88ab\u5f15\u7528\uff08\u95e8\u7981\u3001\u6587\u6863\u94fe\u63a5\u3001 \u51bb\u7ed3\u8bc1\u636e\u5f15\u7528\uff09\uff1b\u88ab\u51bb\u7ed3\u9a8c\u6536\u8f93\u5165\u5f15\u7528\u7684\u8bc1\u636e\u4e00\u5f8b\u4e0d\u5f97\u5220\u9664\u3002</li> <li>\u4f18\u5148\u53ef\u6062\u590d\u5904\u7f6e\uff1a\u80fd\u6539\u5c31\u4e0d\u5220\uff0c\u80fd\u505c\u7528\uff08\u5982 <code>if: false</code> \u786c\u95e8\u7981\uff09\u5c31\u4e0d\u79fb\u9664\uff1b\u786e\u9700 \u5220\u9664\u65f6\u4fdd\u7559\u53ef\u8ffd\u6eaf\u7684\u66ff\u4ee3\u7269\uff08\u7eed\u63a5\u8bb0\u5f55\u3001\u51b3\u5b9a\u8bb0\u5f55\u3001\u5f52\u6863\u9875\uff09\u3002</li> <li>\u5206\u652f\u9000\u51fa\uff1a\u4efb\u52a1\u5206\u652f\u5408\u5e76\u540e\uff0c\u5148\u786e\u8ba4\u6ca1\u6709\u672a\u5408\u5e76\u7684\u63d0\u4ea4\uff0c\u518d\u5220\u9664\u672c\u5730\u5206\u652f\uff1b\u8fdc\u7aef \u5206\u652f\u5220\u9664\u5c5e\u4e8e push \u7c7b\u5916\u90e8\u5199\u5165\uff0c\u5408\u5e76\u540e\u7684\u6e05\u7406\u8bf4\u660e\u4e0d\u5f97\u81ea\u52a8\u6388\u6743\u8fdc\u7aef\u5220\u9664\uff0c\u987b\u6309 \u9010\u9879\u6388\u6743\u8282\u53e6\u884c\u53d6\u5f97\u663e\u5f0f\u6388\u6743\u3002</li> <li>\u4efb\u4f55\u201c\u5220\u9664\u540e\u91cd\u653e\u201d\u90fd\u5fc5\u987b\u6709\u5148\u7ea2\u540e\u7eff\u7684\u673a\u5668\u8bc1\u636e\uff0c\u8bc1\u660e\u5220\u9664\u4e0d\u662f\u9759\u9ed8\u4e22\u5931\u3002</li> </ul>"},{"location":"git-lifecycle/#\u751f\u6210\u7269\u7981\u6b62\u624b\u6539","title":"\u751f\u6210\u7269\u7981\u6b62\u624b\u6539","text":"<ul> <li>\u5e26 projen \u751f\u6210\u6807\u8bb0\u7684\u6587\u4ef6\u3001\u6295\u5f71\u811a\u672c\u5199\u5165\u7684\u53d7\u7ba1\u533a\u5757\u3001<code>.foundation/</code> \u4e0b\u7684\u673a\u5668 \u771f\u6e90\u4e00\u5f8b\u7981\u6b62\u624b\u6539\uff1b\u624b\u6539\u4f1a\u88ab synth \u6f02\u79fb\u68c0\u67e5\u68c0\u51fa\u5e76\u62e6\u622a\u3002</li> <li>\u9700\u8981\u53d8\u66f4\u53d7\u7ba1\u5185\u5bb9\u65f6\uff0c\u552f\u4e00\u5408\u6cd5\u8def\u5f84\u662f\u4fee\u6539\u5bf9\u5e94\u7684\u6e90\uff08<code>.projenrc.js</code> \u6216\u6295\u5f71\u811a\u672c \u7684\u771f\u6e90\u8f93\u5165\uff09\u518d\u91cd\u65b0\u751f\u6210\uff1b\u201c\u624b\u6539\u540e\u518d\u91cd\u65b0\u751f\u6210\u628a\u5dee\u5f02\u6d17\u767d\u201d\u5c5e\u4e8e\u88ab\u95e8\u7981\u660e\u786e\u62d2\u7edd \u7684\u7be1\u6539\u6a21\u5f0f\u3002</li> </ul>"},{"location":"help/","title":"\u4e2d\u6587 \u00b7 \u80fd\u529b\u4e0e\u8bca\u65ad","text":"<p>English</p>"},{"location":"help/#\u5e2e\u52a9\u4e0e\u5206\u8bca","title":"\u5e2e\u52a9\u4e0e\u5206\u8bca","text":"<p>\u672c\u9875\u6309\u9519\u8bef\u7801\u3001\u8fdb\u7a0b\u9000\u51fa\u7801\u4e0e\u73b0\u8c61\u7ed9\u5206\u8bca\u8def\u5f84\u3002Foundation \u7684\u9519\u8bef\u7801\u4f53\u7cfb\u51bb\u7ed3\u5728 Contracts\uff08<code>src/error-codes.json</code>\uff09\uff0c\u4e0d\u6f02\u79fb\uff1b\u673a\u5236\u5931\u8d25\u7edf\u4e00\u4e3a <code>SFC2004</code> \u52a0\u7a33\u5b9a <code>details.kind</code>\u3002</p>"},{"location":"help/#\u6309\u7a33\u5b9a\u9519\u8bef\u7801\u5206\u8bca","title":"\u6309\u7a33\u5b9a\u9519\u8bef\u7801\u5206\u8bca","text":"\u9519\u8bef\u7801 \u540d\u79f0 \u542b\u4e49 \u5904\u7f6e SFC1001 SCHEMA_VALIDATION_FAILED \u6587\u6863\u672a\u901a\u8fc7\u76ee\u6807 Schema \u9a8c\u8bc1 \u68c0\u67e5\u6587\u6863\u5fc5\u586b\u5b57\u6bb5\u4e0e\u7c7b\u578b\u7ea6\u675f SFC1002 UNKNOWN_SCHEMA_ID <code>$id</code> \u672a\u5728\u767b\u8bb0\u8868\u6ce8\u518c \u786e\u8ba4 <code>$id</code> \u62fc\u5199\u4e0e Contracts \u7248\u672c SFC1003 DUPLICATE_SCHEMA_ID \u91cd\u590d <code>$id</code> \u6ce8\u518c\u88ab\u62d2 \u4e0d\u91cd\u590d\u6ce8\u518c\uff0c\u590d\u7528\u5df2\u6709\u767b\u8bb0 SFC1004 DUPLICATE_PROTOCOL_NAME \u91cd\u590d\u534f\u8bae\u540d/\u7248\u672c\u88ab\u62d2 \u4e0d\u91cd\u590d\u767b\u8bb0\u534f\u8bae SFC1005 UNRESOLVED_REF <code>$ref</code> \u76ee\u6807\u65e0\u6cd5\u89e3\u6790 \u68c0\u67e5 <code>$ref</code> \u6307\u5411 SFC1006 UNSUPPORTED_DIALECT \u65b9\u8a00\u4e0d\u5728\u652f\u6301\u96c6 \u4ec5\u7528 draft-07 / 2020-12 SFC1007 UNKNOWN_CHECK_TYPE \u89c4\u5219\u7528\u4e5d\u7c7b\u5916\u68c0\u67e5\u7c7b\u578b \u4e0d\u81ea\u5b9a\u4e49\u68c0\u67e5\u7c7b\u578b SFC1008 RULE_BUDGET_EXCEEDED \u5f3a\u5236\u89c4\u5219\u8d85\u9884\u7b97/\u4e0a\u9650 \u4e0d\u8d85 20\uff08\u7edd\u5bf9 30\uff09 SFC1009 UNKNOWN_ERROR_CODE \u5f15\u7528\u672a\u767b\u8bb0\u9519\u8bef\u7801 \u53ea\u5f15\u7528\u51bb\u7ed3\u767b\u8bb0\u8868 SFC1010 FIXTURE_EXPECTATION_MISMATCH fixture \u884c\u4e3a\u4e0e\u671f\u671b\u4e0d\u7b26 \u67e5 fixture \u58f0\u660e SFC1011 UNKNOWN_PROTOCOL \u5f15\u7528\u672a\u767b\u8bb0\u534f\u8bae \u786e\u8ba4\u534f\u8bae\u540d/\u7248\u672c SFC1012 SCHEMA_COMPILE_FAILED Schema \u672c\u8eab\u65e0\u6cd5\u7f16\u8bd1 \u67e5 Schema \u8bed\u6cd5 SFC2002 UNKNOWN_OPERATION \u64cd\u4f5c\u540d\u4e0d\u5728\u51bb\u7ed3\u8bcd\u6c47\u8868 \u53ea\u7528 <code>validate</code> SFC2003 INVALID_PARAMS \u53c2\u6570\u4e0d\u6ee1\u8db3 params \u5408\u540c \u68c0\u67e5\u53c2\u6570 SFC2004 EXECUTION_FAILED \u673a\u5236\u6267\u884c\u5931\u8d25 \u770b <code>details.kind</code> \u7ec6\u5206 SFC3001 REPORT_DIGEST_MISMATCH \u62a5\u544a/\u7ed3\u679c\u6458\u8981\u4e0e\u7ed1\u5b9a\u4e0d\u4e00\u81f4 \u91cd\u7b97 model/result SFC3002 REPORT_ELEMENT_MISSING \u62a5\u544a\u7f3a\u5f3a\u5236\u5143\u7d20 \u8865\u5168\u62a5\u544a\u5b57\u6bb5 SFC3003 REPORT_FACT_DRIFT \u62a5\u544a\u5b57\u8282\u504f\u79bb\u786e\u5b9a\u6027\u91cd\u6e32\u67d3 \u7528\u673a\u5668\u7ed3\u679c\u91cd\u6e32\u67d3"},{"location":"help/#\u6309\u8fdb\u7a0b\u9000\u51fa\u7801\u5206\u8bcaEngineering-Kit","title":"\u6309\u8fdb\u7a0b\u9000\u51fa\u7801\u5206\u8bca\uff08Engineering Kit\uff09","text":"\u9000\u51fa\u7801 \u542b\u4e49 \u5904\u7f6e 0 \u6210\u529f / \u65e0\u53d1\u73b0 \u65e0\u9700\u5904\u7f6e 1 <code>check</code> \u6709\u53d1\u73b0 \u5904\u7f6e\u53d1\u73b0\u9879\uff0cKit \u4e0d\u81ea\u52a8\u4fee\u590d 2 \u62d2\u7edd / \u7528\u6cd5 / \u673a\u5236\u9519\u8bef \u68c0\u67e5\u547d\u4ee4\u540d\u3001\u53c2\u6570\u4e0e <code>--fix</code> \u7b49\u88ab\u62d2\u65d7\u6807"},{"location":"help/#\u6309\u73b0\u8c61\u5206\u8bca","title":"\u6309\u73b0\u8c61\u5206\u8bca","text":"<ul> <li>\u6821\u9a8c\u4e00\u76f4\u62a5 SFC1002\uff1a<code>$id</code> \u672a\u6ce8\u518c\uff0c\u5148\u786e\u8ba4 Contracts \u7248\u672c\u4e0e <code>$id</code> \u547d\u540d\u7a7a\u95f4\u3002</li> <li>\u8def\u5f84\u64cd\u4f5c\u62a5 SFC2004 + <code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>\uff1a\u8def\u5f84\u8d8a\u51fa\u53d7\u6536\u5bb9\u6839\uff0c\u786e\u8ba4\u6839\u76ee\u5f55\u8fb9\u754c\uff0c\u4e0d\u8981\u628a\u4e1a\u52a1\u9009\u62e9\u89c4\u5219\u585e\u8fdb Foundation\u3002</li> <li>\u539f\u5b50\u5199\u62a5 SFC2004 + <code>atomic-write-failed</code>\uff1a\u76ee\u6807\u8d8a\u754c\u6216\u5185\u5bb9\u7c7b\u578b\u975e\u6cd5\uff0c\u68c0\u67e5\u8def\u5f84\u6536\u5bb9\u4e0e\u5185\u5bb9\u7c7b\u578b\u3002</li> <li>\u72b6\u6001\u5b58\u50a8\u62a5 <code>store-locked</code>\uff1a\u65e7\u5199\u8005\u53ef\u80fd\u4ecd\u6301\u6709\u9501\uff1b\u5728 Foundation \u5916\u786e\u8ba4\u65e7\u5199\u8005\u5df2\u7ec8\u6b62\uff0c\u518d\u7528\u7cbe\u786e owner/fencing \u8c03\u7528 <code>recoverStateStoreLock</code>\u3002</li> <li>CLI host apply \u76f4\u63a5\u5931\u8d25\uff1aEngineering Kit \u7684 <code>adopt-plan host-apply</code>\u3001\u901a\u7528\u6216\u8fdc\u7aef apply \u4ecd\u7a33\u5b9a\u62d2\u7edd\u3002\u5305 API <code>applyHostPlan</code> \u53ea\u6267\u884c\u5df2\u767b\u8bb0\u5bbf\u4e3b\u7684\u6458\u8981\u7ed1\u5b9a\u672c\u5730 install/update\uff1b\u6267\u884c uninstall \u8ba1\u5212\u4f1a\u8fd4\u56de <code>manual-recovery-required</code>\uff0c\u4e0d\u5220\u9664\u6587\u4ef6\u3002Qoder \u5b8c\u6574 driver \u4ecd\u4e3a unsupported\u3002</li> <li>\u540c\u7ea7 adapter \u9a8c\u8bc1\u5931\u8d25\uff1a<code>verifyHostPeers</code> \u53ea\u63a5\u53d7\u7531\u5df2\u767b\u8bb0 Profile \u8bc1\u660e\u7684\u5bbf\u4e3b\u548c\u8def\u5f84\u7c7b\u522b\uff1b\u4efb\u4e00 peer \u7684\u8def\u5f84\u3001\u95ed\u5305\u3001\u5b57\u8282\u6216 <code>logicalMappings</code> \u4e0d\u4e00\u81f4\u90fd\u4f1a\u5931\u8d25\u5173\u95ed\uff0c\u4e0d\u4f1a\u6388\u4e88\u5b89\u88c5\u6216\u53d1\u5e03\u72b6\u6001\u3002</li> <li>\u6587\u6863\u7248\u672c/\u547d\u4ee4\u5bf9\u4e0d\u4e0a\u771f\u6e90\uff1a\u4ee5 <code>scripts/docs/fact-check.mjs</code> \u590d\u7b97\u7ed3\u679c\u4e3a\u51c6\uff0c\u4e0d\u51ed\u8bb0\u5fc6\u4fee\u8ba2\u3002</li> </ul>"},{"location":"help/#\u9879\u76ee\u8def\u7531","title":"\u9879\u76ee\u8def\u7531","text":"<ul> <li>\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001 / npm \u53d1\u5e03 \u2192 release-skill\u3002</li> <li>\u4efb\u52a1 / \u91cd\u8bd5 / \u8fd4\u5de5 / \u9a8c\u6536 \u2192 loop-agent\u3002</li> <li>\u5236\u54c1\u5173\u7cfb / \u7248\u672c\u9501 \u2192 artifact-graph\u3002</li> <li>\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49 \u2192 \u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\u3002</li> <li>\u901a\u7528\u7ed3\u6784 / \u673a\u5236\u95ee\u9898 \u2192 \u672c\u4ed3 <code>docs/architecture.md</code> \u4e0e <code>docs/agents/</code>\u3002</li> </ul>"},{"location":"help/#\u547d\u4ee4\u901f\u67e5\u4e0e\u6743\u5a01\u4e8b\u5b9e","title":"\u547d\u4ee4\u901f\u67e5\u4e0e\u6743\u5a01\u4e8b\u5b9e","text":"<p>Engineering Kit \u53ea\u6709\u56db\u4e2a\u9876\u5c42\u547d\u4ee4\uff1a<code>scaffold</code>\u3001<code>adopt-plan</code>\u3001<code>projection</code>\u3001<code>check</code>\u3002\u5176\u4e2d <code>check</code> \u53ea\u8bca\u65ad\u4e0d\u4fee\u590d\uff0c\u53d1\u73b0\u9879\u4ea4\u8c03\u7528\u65b9\u5904\u7f6e\u3002</p> <ul> <li>\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u7248\u672c\u3001\u5305\u96c6\u5408\u3001\u955c\u50cf\u5750\u6807\u3001\u95e8\u7981\uff09\uff1a\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u552f\u4e00\u72b6\u6001\u9875\uff09\u3002</li> <li>\u5f00\u53d1\u4e0e\u63d0\u4ea4\u89c4\u8303\uff1aGit \u751f\u547d\u5468\u671f\u6307\u5357\u3002</li> </ul>"},{"location":"licensing/","title":"\u4e2d\u6587 \u00b7 \u8bb8\u53ef\u4e0e\u7f72\u540d","text":"<p>English</p>"},{"location":"licensing/#\u8bb8\u53ef\u8bc1\u4e0e\u8eab\u4efd\u8bf4\u660e","title":"\u8bb8\u53ef\u8bc1\u4e0e\u8eab\u4efd\u8bf4\u660e","text":"<p>\u672c\u9875\u8bf4\u660e Skill Family Foundation \u7684\u8bb8\u53ef\u8bc1\u91c7\u7528\u65b9\u5f0f\u3001\u5404\u8eab\u4efd\u4e3b\u4f53\u7684\u533a\u522b\uff0c\u4ee5\u53ca NOTICE \u4e0e\u7b2c\u4e09\u65b9\u7f72\u540d\u7684\u5f53\u524d\u72b6\u6001\u3002\u5b83\u4e0d\u662f Apache License 2.0 \u7684\u5b98\u65b9\u8bd1\u6587\uff1bApache-2.0 \u7684\u6cd5\u5f8b\u6b63\u6587\u4ee5\u4ed3\u5e93\u6839\u76ee\u5f55\u7684 <code>LICENSE</code> \u4e3a\u51c6\uff0c\u5982\u6709\u6b67\u4e49\u4ee5\u8be5\u82f1\u6587\u6b63\u672c\u4e3a\u51c6\u3002</p>"},{"location":"licensing/#\u8bb8\u53ef\u8bc1","title":"\u8bb8\u53ef\u8bc1","text":"<ul> <li>\u8bb8\u53ef\u8bc1\uff1a<code>Apache-2.0</code>\uff08SPDX \u6807\u8bc6\u4fdd\u6301\u4e0d\u53d8\uff09\u3002</li> <li>\u6cd5\u5f8b\u6b63\u6587\uff1a\u6839\u76ee\u5f55 <code>LICENSE</code> \u4e3a Apache License 2.0 \u5168\u6587\uff08\u82f1\u6587\u6743\u5a01\uff09\u3002\u672c\u9875\u4e0e\u4efb\u4f55\u4e2d\u6587\u6750\u6599\u53ea\u89e3\u91ca\u91c7\u7528\u65b9\u5f0f\uff0c\u4e0d\u66ff\u4ee3\u3001\u4e0d\u91cd\u8ff0\u6cd5\u5f8b\u6b63\u6587\uff0c\u4e5f\u4e0d\u58f0\u79f0\u5177\u6709\u540c\u7b49\u6cd5\u5f8b\u6548\u529b\u3002</li> <li>\u4e09\u4e2a\u53f6\u5b50\u5305\u968f\u5305\u5206\u53d1\u6839 <code>LICENSE</code> \u526f\u672c\u3002</li> </ul>"},{"location":"licensing/#\u8eab\u4efd\u4e3b\u4f53\u533a\u5206","title":"\u8eab\u4efd\u4e3b\u4f53\u533a\u5206","text":"<p>\u4ee5\u4e0b\u56db\u7c7b\u8eab\u4efd\u76f8\u4e92\u72ec\u7acb\uff0c\u4e0d\u5f97\u76f8\u4e92\u63a8\u5bfc\u6216\u5408\u5e76\uff1a</p> \u8eab\u4efd \u53d6\u503c \u8bf4\u660e \u4f5c\u8005 / \u7248\u6743\u4e3b\u4f53\uff08author / copyright holder\uff09 \u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8 \u7248\u6743\u5f52\u5c5e\u65b9\uff0c\u5199\u5165 <code>package.json</code> \u7684 <code>author</code> \u4e0e <code>LICENSE</code> \u9644\u5f55\u7f72\u540d \u4ed3\u5e93 owner\uff08GitHub owner\uff09 <code>ifoohoo</code> GitHub \u7ec4\u7ec7/\u8d26\u53f7\uff0c\u4e0e\u4f5c\u8005\u65e0\u63a8\u5bfc\u5173\u7cfb npm \u53d1\u5e03\u8005\uff08npm publisher\uff09 \u5f53\u524d\u53d1\u5e03\u914d\u7f6e\u4e2d\u7684\u8d26\u53f7 npm \u53d1\u5e03\u8eab\u4efd\uff0c\u4e0e\u4f5c\u8005/owner \u65e0\u63a8\u5bfc\u5173\u7cfb \u8d21\u732e\u8005\u7248\u6743\u884c \u6839 <code>LICENSE</code> \u9644\u5f55\u4e2d\u7684 contributors \u7f72\u540d \u4fdd\u7559\u7684\u5386\u53f2/\u8d21\u732e\u8005\u7f72\u540d\uff0c\u4e0d\u4f5c\u4e3a\u9879\u76ee\u4f5c\u8005\u6216\u7248\u6743\u4e3b\u4f53 <p><code>author</code>\u3001<code>repository.owner</code>\u3001<code>npm publisher</code> \u4e09\u8005\u5206\u522b\u8bb0\u5f55\uff0c\u4e0d\u5f97\u4ece\u4efb\u4e00\u63a8\u5bfc\u5176\u4f59\u3002</p>"},{"location":"licensing/#\u9879\u76ee\u7ea7-NOTICE","title":"\u9879\u76ee\u7ea7 NOTICE","text":"<p>FND-ADR-008 \u5df2\u6839\u636e 2026-08-10 \u7684\u7528\u6237\u88c1\u51b3\u91c7\u7528\u65b9\u6848 B\u3002Foundation \u73b0\u5728\u7ef4\u62a4\u6839 <code>NOTICE</code>\uff0c\u5176\u4e2d\u8bb0\u5f55\u9879\u76ee\u540d\u79f0\u3001\u5e74\u4efd 2026 \u548c\u7248\u6743\u4e3b\u4f53\u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8\u3002\u4ece 0.2.1 \u8d77\uff0c\u4e09\u4e2a public unit \u7684\u955c\u50cf\u3001\u51bb\u7ed3\u5feb\u7167\u4e0e npm tarball \u90fd\u5fc5\u987b\u5206\u53d1\u8be5\u6587\u4ef6\u3002</p> <p><code>open-source</code> Profile \u7ee7\u7eed\u58f0\u660e <code>noticeRequired: true</code>\u3002Engineering Kit \u7ee7\u7eed\u628a Apache-2.0 \u4e0e NOTICE \u8981\u6c42\u7ed1\u5b9a\u4e3a\u673a\u5236\u4e0d\u53d8\u91cf\uff1b<code>checkIdentityDrift</code> \u5728 NOTICE \u7f3a\u5931\u65f6\u7ee7\u7eed\u62a5\u544a <code>notice-missing</code>\u3002\u8fd9\u9879\u6536\u53e3\u53ea\u6539\u53d8 Foundation \u7684\u53d1\u5e03\u6210\u5458\uff0c\u4e0d\u6539 Kit \u5bf9\u5176\u4ed6\u6d88\u8d39\u8005\u7684\u884c\u4e3a\u3002</p> <p>\u6839\u636e\u6839 <code>LICENSE</code> \u4e2d Apache License 2.0 \u7684\u7b2c 4(d) \u6761\uff0cNOTICE \u4e2d\u7684\u5185\u5bb9\u7528\u4e8e\u4fe1\u606f\u4e0e\u7f72\u540d\uff0c\u4e0d\u4fee\u6539 Apache License 2.0 \u7684\u8bb8\u53ef\u6761\u6b3e\u3002</p>"},{"location":"licensing/#\u7b2c\u4e09\u65b9\u7f72\u540dTHIRD_PARTY_NOTICES","title":"\u7b2c\u4e09\u65b9\u7f72\u540d\uff08THIRD_PARTY_NOTICES\uff09","text":"<p>Engineering Kit \u7684 public unit \u5206\u53d1 MkDocs Material\u3001lunr \u4e0e lunr-languages \u8d44\u4ea7\uff0c\u5df2\u5305\u542b <code>packages/skill-family-engineering-kit/THIRD_PARTY_NOTICES</code> \u4e0e\u5bf9\u5e94\u7b2c\u4e09\u65b9\u8bb8\u53ef\u8bc1\u6750\u6599\u3002\u7b2c\u4e09\u65b9\u7f72\u540d\u7531 <code>THIRD_PARTY_NOTICES</code> \u4e0e\u5bf9\u5e94\u8bb8\u53ef\u8bc1\u95ed\u5305\u8986\u76d6\uff0c\u4e0d\u5f97\u7528\u9879\u76ee\u7ea7 <code>NOTICE</code> \u66ff\u4ee3\u3002<code>NOTICE</code> \u53ea\u627f\u8f7d Foundation \u81ea\u8eab\u7684\u9879\u76ee\u7f72\u540d\uff0c\u4e0d\u590d\u5236\u7b2c\u4e09\u65b9\u8bb8\u53ef\u8bc1\u5168\u6587\u3002</p>"},{"location":"licensing/#private-\u5de5\u4f5c\u533a\u4e0e-public-\u955c\u50cf\u7684\u8bb8\u53ef\u8bc1\u8fb9\u754c","title":"private \u5de5\u4f5c\u533a\u4e0e public \u955c\u50cf\u7684\u8bb8\u53ef\u8bc1\u8fb9\u754c","text":"<ul> <li>\u672c\u5de5\u4f5c\u533a\u6c38\u4e45 private\uff0c\u662f\u552f\u4e00\u5f00\u53d1\u771f\u6e90\uff1b\u672c\u4f53\u4e0d\u8fdb\u5165\u516c\u5f00\u8fb9\u754c\u3002</li> <li>\u516c\u5f00\u8fb9\u754c\u53ea\u6709\u4e09\u4e2a\u7248\u672c\u5316\u53d1\u5e03\u955c\u50cf\u4e0e npm tarball\uff1b\u5b83\u4eec\u5206\u53d1\u6839 <code>LICENSE</code>\uff08Apache-2.0\uff09\u4e0e <code>NOTICE</code>\u3002Engineering Kit \u8fd8\u5206\u53d1 <code>THIRD_PARTY_NOTICES</code> \u53ca\u5bf9\u5e94\u7b2c\u4e09\u65b9\u8bb8\u53ef\u8bc1\u6750\u6599\u3002</li> <li>\u79c1\u6709\u5de5\u4f5c\u533a\u5185\u7684 Profile\u3001fixture\u3001\u5185\u90e8\u6587\u6863\u4e0e\u8fd0\u884c\u8bc1\u636e\u4e0d\u8fdb\u5165\u516c\u5f00\u5305\uff1b\u516c\u5f00\u6587\u6863\u53ea\u6d88\u8d39\u7ecf allowlist \u4e0e\u53d1\u5e03\u5408\u540c\u673a\u68b0\u9a8c\u8bc1\u7684\u53d1\u5e03\u7269\u3002</li> <li>\u53d1\u5e03\u72b6\u6001\u4e0e\u5168\u90e8\u8fdc\u7aef\u5199\u5165\u5f52 release-skill\uff1b\u672c\u6587\u4e0d\u590d\u5236\u5b9e\u65f6\u53d1\u5e03\u72b6\u6001\u3002</li> </ul>"},{"location":"quickstart/","title":"\u4e2d\u6587 \u00b7 \u5feb\u901f\u5f00\u59cb","text":"<p>English</p>"},{"location":"quickstart/#\u5feb\u901f\u5f00\u59cb","title":"\u5feb\u901f\u5f00\u59cb","text":"<p>\u672c\u9875\u7ed9\u666e\u901a\u5f00\u53d1\u8005\u4e09\u6761\u53ef\u6267\u884c\u65c5\u7a0b\uff1a\u65b0\u9879\u76ee\u80fd\u529b\u53d1\u73b0\u4e0e\u9aa8\u67b6\u751f\u6210\u3001\u5b58\u91cf\u9879\u76ee\u91c7\u7528\u4e0e\u8fc1\u79fb\u3001\u65e5\u5e38\u5355\u9700\u6c42\u67e5\u8be2\u3002\u6bcf\u6761\u8def\u5f84\u90fd\u7ed9\u51fa\u7cbe\u786e\u547d\u4ee4\uff1b\u67b6\u6784\u8def\u7531\u4e0e API \u7ec6\u8282\u8f6c\u5230\u5bf9\u5e94\u6587\u6863\u3002</p>"},{"location":"quickstart/#\u516c\u5171\u5b89\u88c5\u524d\u63d0","title":"\u516c\u5171\u5b89\u88c5\u524d\u63d0","text":"<p>\u672c\u5730\u5019\u9009\u9a8c\u8bc1\u4ece\u5de5\u4f5c\u533a\u6253\u51fa\u4e09\u4efd\u5f53\u524d\u7248\u672c tarball\uff0c\u5e76\u628a\u5b83\u4eec\u5b89\u88c5\u5230\u4e34\u65f6 consumer\uff1b\u5f53\u524d\u7248\u672c\u89c1\u552f\u4e00\u72b6\u6001\u9875 <code>docs/status/current.md</code>\u3002\u4ee5\u4e0b\u547d\u4ee4\u4ece Foundation \u5de5\u4f5c\u533a\u6839\u76ee\u5f55\u8fd0\u884c\uff1a</p> <pre><code>pack_dir=\"$(mktemp -d)\"\n(cd packages/skill-family-contracts &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-harness-node &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-engineering-kit &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\nmkdir \"$pack_dir/consumer\" &amp;&amp; (cd \"$pack_dir/consumer\" &amp;&amp; npm init -y)\n(cd \"$pack_dir/consumer\" &amp;&amp; npm install \"$pack_dir/skill-family-contracts-&lt;version&gt;.tgz\" \"$pack_dir/skill-family-harness-node-&lt;version&gt;.tgz\" \"$pack_dir/skill-family-engineering-kit-&lt;version&gt;.tgz\")\n</code></pre> <p>\u53d1\u5e03\u540e\u5b89\u88c5\u72b6\u6001\u9875\u6240\u5217\u7684\u7cbe\u786e\u5750\u6807\uff0c\u518d\u8fd0\u884c\u4e0b\u6587\u7684 <code>npm exec</code> \u547d\u4ee4\u3002</p>"},{"location":"quickstart/#\u65b0\u9879\u76ee\u53d1\u73b0\u80fd\u529b\u5e76\u751f\u6210\u9aa8\u67b6","title":"\u65b0\u9879\u76ee\uff1a\u53d1\u73b0\u80fd\u529b\u5e76\u751f\u6210\u9aa8\u67b6","text":"<p>\u5148\u7528\u7528\u9014\u6587\u4ef6\u67e5\u770b\u6574\u4e2a\u9879\u76ee\u53ef\u7528\u7684\u80fd\u529b\uff0c\u518d\u663e\u5f0f\u9009\u62e9\u7a33\u5b9a\u80fd\u529b\u751f\u6210\u9aa8\u67b6\u3002<code>--list-capabilities</code> \u53ea\u8bfb\uff0c\u4e0d\u5199\u9879\u76ee\uff1b<code>--uses</code> \u6587\u4ef6\u53ea\u4fdd\u7559\u95ee\u9898\u3001\u7ea6\u675f\u3001\u4fdd\u7559\u4fdd\u8bc1\u548c\u53ef\u9009\u7b5b\u9009\u8bcd\uff0c\u4e0d\u8981\u5199\u51ed\u636e\u6216\u79c1\u5bc6\u4e1a\u52a1\u6570\u636e\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json\nnpm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project --capability foundation.contracts.object-validation --capability foundation.harness.atomic-write\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p><code>supportedMatches</code> \u53ea\u662f\u5019\u9009\u53d1\u73b0\uff0c<code>needsDecision</code> \u8868\u793a\u4ecd\u9700\u7531\u9879\u76ee\u786e\u8ba4\u7528\u9014\uff1b\u5b83\u4e0d\u4f1a\u5199 Profile \u6216\u5ba3\u79f0\u91c7\u7528\u5b8c\u6210\u3002<code>scaffold</code> \u6210\u529f\u53ea\u8868\u793a\u9aa8\u67b6\u548c\u5951\u7ea6\u6d4b\u8bd5\u63a5\u7ebf\u5df2\u5199\u5165\uff0c\u9002\u914d\u5668\u3001\u9886\u57df\u4fdd\u8bc1\u548c\u6d88\u8d39\u8005\u6d4b\u8bd5\u4ecd\u9700\u8865\u9f50\u3002</p>"},{"location":"quickstart/#\u5b58\u91cf\u9879\u76ee\u91c7\u7528\u5e76\u5b8c\u6210\u8fc1\u79fb","title":"\u5b58\u91cf\u9879\u76ee\uff1a\u91c7\u7528\u5e76\u5b8c\u6210\u8fc1\u79fb","text":"<p>\u5148\u8fd0\u884c\u53ea\u8bfb <code>adopt-plan</code>\uff0c\u518d\u5728 migration manifest \u4e2d\u8bb0\u5f55\u7528\u9014\u548c\u56db\u7c7b decision\u3002<code>direct-adoption</code> \u4e0e <code>compatibility-layer</code> \u624d\u80fd\u6307\u5411 Foundation \u80fd\u529b\uff1b<code>keep-business</code> \u548c <code>foundation-gap</code> \u4fdd\u7559\u5728\u6d88\u8d39\u8005\u4fa7\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> \u4e0d\u5199\u6587\u4ef6\uff0c\u4e5f\u4e0d\u81ea\u52a8\u8fc1\u79fb\u3002\u8fc1\u79fb\u72b6\u6001 <code>complete</code> \u53ea\u8868\u793a Profile\u3001\u53d7\u7ba1\u6587\u4ef6\u3001\u65e7\u5b9e\u73b0\u9000\u51fa\u3001check \u548c\u56db\u7c7b\u8bc1\u636e\u90fd\u6ee1\u8db3\uff1b\u5b83\u4e0d\u7b49\u4e8e\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u3002\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u8981\u7531\u6d88\u8d39\u8005\u81ea\u5df1\u7684\u9002\u914d\u5668\u6d4b\u8bd5\u4e0e\u9886\u57df\u95e8\u7981\u58f0\u660e\u3002</p>"},{"location":"quickstart/#\u65e5\u5e38\u5de5\u4f5c\u67e5\u8be2\u5355\u9879\u9700\u6c42","title":"\u65e5\u5e38\u5de5\u4f5c\uff1a\u67e5\u8be2\u5355\u9879\u9700\u6c42","text":"<p>\u4e0d\u786e\u5b9a capability ID \u65f6\uff0c\u7528\u5f53\u524d\u8bed\u8a00\u505a\u786e\u5b9a\u6027\u5b50\u4e32\u67e5\u8be2\u3002\u7ed3\u679c\u4e3a\u7a7a\u662f <code>no-text-match</code>\uff0c\u53ea\u547d\u4e2d unsupported \u80fd\u529b\u662f <code>boundary-found</code>\uff1b\u8fd9\u4e24\u79cd\u7ed3\u679c\u90fd\u4e0d\u662f <code>foundation-gap</code> decision\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --locale zh-CN --filter \"\u5199\u6587\u4ef6\u5931\u8d25\u65f6\u4e0d\u80fd\u7559\u4e0b\u6b8b\u7f3a\u6587\u4ef6\"\n</code></pre> <p>\u9700\u8981\u8bc1\u660e\u771f\u5b9e\u5bbf\u4e3b\u65f6\uff0c\u5fc5\u987b\u53e6\u884c\u63d0\u4f9b\u5b8c\u6574 request\u3001bindings \u548c <code>--native</code>\uff0c\u5e76\u4f7f\u7528\u80fd\u529b\u76ee\u5f55\u58f0\u660e\u7684\u8d44\u683c\u5165\u53e3\uff1a</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p>\u8be5\u547d\u4ee4\u7684\u771f\u5b9e\u8d44\u683c\u7ed3\u8bba\u53ea\u6765\u81ea\u4e00\u6b21\u663e\u5f0f\u3001\u53d7\u7ea6\u675f\u7684\u5bbf\u4e3b\u6267\u884c\uff1b\u5019\u9009\u53d1\u73b0\u3001\u8fc1\u79fb <code>complete</code> \u548c\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u90fd\u4e0d\u80fd\u66ff\u4ee3\u5b83\u3002</p>"},{"location":"quickstart/#\u65e7\u7248\u6700\u77ed\u8def\u5f84\u751f\u6210\u9aa8\u67b6","title":"\u65e7\u7248\u6700\u77ed\u8def\u5f84\uff1a\u751f\u6210\u9aa8\u67b6","text":"<p>\u82e5\u9879\u76ee\u5df2\u786e\u8ba4\u4e0d\u9700\u8981\u5148\u505a\u7528\u9014\u8bc4\u4f30\uff0c\u4ecd\u53ef\u76f4\u63a5\u4ece\u96f6\u751f\u6210\u7b26\u5408 Foundation \u5951\u7ea6\u7684\u9aa8\u67b6\u3002</p> <pre><code>npm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p>\u4ee5\u4e0a\u547d\u4ee4\u5148\u751f\u6210\u9aa8\u67b6\uff0c\u518d\u5bf9\u751f\u6210\u7ed3\u679c\u505a\u5de5\u7a0b\u8bca\u65ad\u3002<code>scaffold</code> \u53ea\u5199\u7a7a\u76ee\u6807\u76ee\u5f55\uff0c\u975e\u7a7a\u6216\u51b2\u7a81\u76ee\u6807\u4f1a\u88ab\u62d2\u7edd\u4e14\u4e0d\u88ab\u89e6\u78b0\uff1b<code>check</code> \u53ea\u8bca\u65ad\u4e0d\u4fee\u590d\u3002\u9a8c\u8bc1\u4ee5 <code>check</code> \u9000\u51fa\u7801 0 \u4e3a\u901a\u8fc7\u3002</p>"},{"location":"quickstart/#\u5b58\u91cf\u9879\u76ee\u53ea\u8bfb\u76d8\u70b9\u517c\u5bb9\u5165\u53e3","title":"\u5b58\u91cf\u9879\u76ee\uff1a\u53ea\u8bfb\u76d8\u70b9\uff08\u517c\u5bb9\u5165\u53e3\uff09","text":"<p>\u76ee\u6807\u662f\u5148\u770b\u6e05\u5b58\u91cf\u4ed3\u80fd\u5426\u91c7\u7528\uff0c\u4e0d\u6539\u52a8\u4efb\u4f55\u5b57\u8282\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> \u8f93\u51fa\u73b0\u72b6\u3001\u76ee\u6807 Profile\u3001\u7cbe\u786e\u5199\u96c6\u3001\u51b2\u7a81\u4e0e\u65e7\u5b9e\u73b0\u9000\u51fa\u6e05\u5355\uff0c\u4e14\u5bf9\u8f93\u5165\u4ed3\u5b57\u8282\u96f6\u53d8\u5316\u3002<code>check</code> \u53ea\u505a\u53ea\u8bfb\u8bca\u65ad\u3002\u786e\u8ba4\u76d8\u70b9\u7ed3\u679c\u540e\u518d\u51b3\u5b9a\u662f\u5426\u6267\u884c\u5199\u5165\u3002</p>"},{"location":"quickstart/#\u67b6\u6784\u8bbe\u8ba1\u8005\u5224\u5b9a\u5f52\u5c5e","title":"\u67b6\u6784\u8bbe\u8ba1\u8005\uff1a\u5224\u5b9a\u5f52\u5c5e","text":"<p>\u76ee\u6807\u662f\u5224\u65ad\u4e00\u4e2a\u67b6\u6784\u9700\u6c42\u8be5\u843d\u5728 Foundation \u54ea\u4e00\u5c42\uff0c\u8fd8\u662f\u7559\u5728\u6d88\u8d39\u8005\u3002</p> <ol> <li>\u8bfb <code>docs/agents/architecture-routing.md</code> \u7684\u516b\u6b65\u51b3\u7b56\u987a\u5e8f\u3002</li> <li>\u5728 <code>docs/agents/capability-catalog.json</code> \u6309 <code>layer</code> \u4e0e <code>intent</code> \u627e\u5230\u80fd\u529b\uff0c\u8bfb\u5b83\u7684 <code>entrypoints</code>\u3001<code>sideEffects</code>\u3001<code>failureSemantics</code>\u3001<code>ownedByCaller</code>\u3002</li> <li>\u9700\u8981\u53d1\u5e03\u3001\u4efb\u52a1\u751f\u547d\u5468\u671f\u6216\u5236\u54c1\u5173\u7cfb\u65f6\uff0c\u5206\u522b\u8f6c release-skill\u3001loop-agent\u3001artifact-graph\u3002</li> </ol> <p>\u8def\u7531\u7684\u786c\u8fb9\u754c\uff1aFoundation \u4e0d\u62e5\u6709\u8fdc\u7aef\u5199\u5165\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u4e0e\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\u3002\u843d\u5165 <code>keep-business</code> \u6216 <code>foundation-gap</code> \u7684\u80fd\u529b\u4e0d\u5f3a\u884c\u6269\u5f20 Foundation\u3002</p>"},{"location":"quickstart/#\u6743\u5a01\u4e8b\u5b9e\u4e0e\u89c4\u8303","title":"\u6743\u5a01\u4e8b\u5b9e\u4e0e\u89c4\u8303","text":"<ul> <li>\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u7248\u672c\u3001\u5305\u96c6\u5408\u3001\u955c\u50cf\u5750\u6807\u3001\u95e8\u7981\uff09\uff1a\u5f53\u524d\u4ea7\u54c1\u72b6\u6001\uff08\u552f\u4e00\u72b6\u6001\u9875\uff0c\u672c\u9875\u4e0d\u590d\u5236\uff09\u3002</li> <li>\u5f00\u53d1\u4e0e\u63d0\u4ea4\u89c4\u8303\uff1aGit \u751f\u547d\u5468\u671f\u6307\u5357\u3002</li> </ul>"},{"location":"quickstart/#\u8def\u5f84\u5bf9\u7167","title":"\u8def\u5f84\u5bf9\u7167","text":"\u8bfb\u8005 \u8d77\u70b9 \u4e0b\u4e00\u6b65 \u65b0\u9879\u76ee <code>scaffold</code> <code>check</code> \u2192 \u63a5\u5165 Profile \u5b58\u91cf\u9879\u76ee <code>adopt-plan</code> \u5206\u7c7b\uff08direct-adoption / compatibility-layer / keep-business / foundation-gap\uff09\u2192 \u91c7\u7528 \u67b6\u6784\u8bbe\u8ba1\u8005 \u8def\u7531\u51b3\u7b56 \u80fd\u529b\u76ee\u5f55 \u2192 \u771f\u5b9e\u5bfc\u51fa\u4e0e\u6d4b\u8bd5"},{"location":"setup/","title":"\u5b89\u88c5\u4e0e\u73af\u5883","text":""},{"location":"setup/#\u5fc5\u9700\u73af\u5883","title":"\u5fc5\u9700\u73af\u5883","text":"\u5de5\u5177 \u7248\u672c \u9501\u5b9a\u70b9 Node.js 22.22.2\uff08\u9501\u5b9a major 22 \u5e76\u7cbe\u786e\u63d0\u9ad8 floor\uff1a<code>&gt;=22.22.2 &lt;23</code>\uff09 <code>.node-version</code>\uff08\u53d6\u7cbe\u786e floor\uff09\u3001\u6839\u4e0e\u5404\u53f6\u5b50\u5305 <code>package.json</code> \u7684 <code>engines.node</code>\uff1bfloor \u7531 <code>scripts/engine-floor-check.mjs</code> \u4ece\u56fa\u5b9a\u6839 devDependencies \u7684 engines \u5b9e\u65f6\u91cd\u7b97\uff0cfact-check J \u8282\u7ed1\u5b9a\u6587\u6863\u8868\u9762 pnpm 10.30.0 <code>package.json</code> \u7684 <code>packageManager</code> projen 0.101.23 <code>package.json</code> \u7684 <code>devDependencies.projen</code>\uff08\u7cbe\u786e\u7248\u672c\uff0c\u65e0\u8303\u56f4\u7b26\u53f7\uff09 Git \u8fd1\u5e74\u7248\u672c\u5373\u53ef \u4ec5\u5f00\u53d1\u8005\u81ea\u884c\u7ba1\u7406\u7248\u672c\uff1b\u672c\u4ed3\u811a\u672c\u4e0d\u6267\u884c Git \u5199\u64cd\u4f5c <p>\u5de5\u5177\u7248\u672c\u4e0e\u9501\u5b9a\u70b9\u767b\u8bb0\u5728 <code>.foundation/version-lock.json</code>\uff08projen \u751f\u6210\u7684\u673a\u5668\u771f\u6e90\uff0c\u7981\u6b62\u624b\u6539\uff09\u3002\u5347\u7ea7\u6d41\u7a0b\u89c1 <code>scripts/README.md</code>\u3002</p>"},{"location":"setup/#\u5b89\u88c5\u4f9d\u8d56","title":"\u5b89\u88c5\u4f9d\u8d56","text":"<pre><code>pnpm install\n</code></pre> <p><code>.npmrc</code> \u542f\u7528 <code>save-exact=true</code>\uff0c\u65b0\u589e\u4f9d\u8d56\u4e5f\u4f1a\u4ee5\u7cbe\u786e\u7248\u672c\u5199\u5165\u3002</p>"},{"location":"setup/#\u5408\u6210\u4e0e\u68c0\u67e5","title":"\u5408\u6210\u4e0e\u68c0\u67e5","text":"<pre><code>pnpm synth\npnpm check\n</code></pre> <ul> <li><code>pnpm synth</code> \u518d\u751f\u6210 projen \u53d7\u7ba1\u6587\u4ef6\u3002\u53d7\u7ba1\u6587\u4ef6\u53ea\u80fd\u901a\u8fc7\u4fee\u6539 <code>.projenrc.js</code> \u95f4\u63a5\u53d8\u66f4\uff1b\u624b\u5199\u6e90\u7801\u3001\u6587\u6863\u548c fixture \u4e0d\u4f1a\u88ab synth \u8986\u76d6\u3002</li> <li><code>pnpm check</code> \u662f\u5f53\u524d\u7edf\u4e00\u6839\u95e8\u7981\uff1a11 \u4e2a\u7a33\u5b9a\u95e8\u7981 ID \u6309\u56fa\u5b9a\u987a\u5e8f\u4e32\u8054\u6267\u884c\uff0c\u4efb\u4e00\u6b65\u9aa4\u975e 0 \u5373\u6574\u4f53\u5931\u8d25\uff1b\u672c\u4ed3\u6ca1\u6709\u4efb\u4f55 CI/CD workflow\uff0c\u5168\u90e8\u95e8\u7981\u90fd\u5728\u79c1\u6709\u5de5\u4f5c\u533a\u5185\u8fd0\u884c\u3002\u4e0b\u65b9\u533a\u5757\u7531\u6839 <code>package.json</code> \u7684 <code>scripts.check</code> \u673a\u68b0\u6295\u5f71\uff08<code>node scripts/docs/fact-check.mjs</code> \u9010\u5b57\u6838\u5bf9\uff0c\u7981\u6b62\u624b\u5199\u6e05\u5355\u518d\u6b21\u6ede\u540e\uff09\uff1a</li> </ul> <ol> <li>pnpm run check:structure</li> <li>pnpm run check:packages</li> <li>pnpm run check:profiles</li> <li>pnpm run check:public-boundary</li> <li>pnpm run check:scaffold</li> <li>pnpm run check:docs</li> <li>pnpm run check:public-snapshots</li> <li>pnpm run check:release-artifacts</li> <li>pnpm run check:projen</li> <li>pnpm run check:integration</li> <li>pnpm run check:artifacts</li> </ol> <ul> <li>\u53d1\u5e03\u5b57\u8282\u5408\u540c\u7531\u4e24\u4e2a\u56fa\u5b9a\u5165\u53e3\u627f\u8f7d\uff1a<code>pnpm run release-artifacts:build</code>\uff08\u6784\u5efa\u5019\u9009\u4ea7\u7269\uff09\u4e0e <code>pnpm run release-artifacts:verify</code>\uff08\u6309\u5408\u540c\u6821\u9a8c\uff09\uff0c\u63a5\u53e3\u4e0e\u62d2\u7edd\u77e9\u9635\u8be6\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u3002</li> <li>\u8017\u65f6\u7684 Python \u6587\u6863\u77e9\u9635\u4e0d\u5c5e\u4e8e <code>pnpm check</code>\uff1a\u5b83\u6709\u72ec\u7acb\u5165\u53e3 <code>node scripts/docs/verify-matrix.mjs</code>\uff08\u77e9\u9635\u7248\u672c\u8986\u76d6\u7531\u8be5\u811a\u672c\u5bf9\u7167 <code>scripts/docs/toolchain.json</code> \u673a\u68b0\u6838\u5bf9\uff1b\u672c\u4ed3\u65e0 CI\uff0c\u77e9\u9635\u4e0d\u58f0\u660e\u5728\u4efb\u4f55\u5de5\u4f5c\u6d41\u91cc\uff09\u3002</li> </ul> <p>\u5176\u4f59\u547d\u4ee4\uff1a<code>pnpm test</code>\uff08\u4ec5\u6d4b\u8bd5\uff09\u3001<code>pnpm drift</code>\uff08\u53ea\u8bfb synth \u6f02\u79fb\u68c0\u67e5\uff09\u3001<code>pnpm synth-idempotency</code>(\u5e42\u7b49\u6027\u9a8c\u8bc1)\u3001<code>pnpm fixtures-projen</code>\uff08projen \u53cd\u4f8b fixture\uff09\u3002</p>"},{"location":"setup/#\u6587\u6863\u7ad9\u70b9Material-for-MkDocs","title":"\u6587\u6863\u7ad9\u70b9\uff08Material for MkDocs\uff09","text":"<p>\u6587\u6863\u7ad9\u70b9\u9501\u5b9a mkdocs 1.6.1 \u4e0e Material for MkDocs 9.7.7\u3002\u4f9d\u8d56\u9501\u662f <code>pip-compile --generate-hashes</code> \u751f\u6210\u7684\u5b8c\u6574\u5185\u5bb9\u9501\uff08\u5168\u90e8\u9876\u5c42\u4e0e\u4f20\u9012\u4f9d\u8d56\u90fd\u5e26 SHA-256 hash\uff09\uff0c\u89c1 <code>scripts/docs/requirements.txt</code>\uff08\u4eba\u5de5\u8f93\u5165\u53ea\u6709\u540c\u76ee\u5f55\u7684 <code>requirements.in</code>\uff09\uff1b\u5de5\u5177\u94fe\u771f\u6e90\u89c1 <code>scripts/docs/toolchain.json</code>\u3002Python 3.10 \u6216\u66f4\u9ad8\u5373\u53ef\uff08<code>node scripts/docs/verify-matrix.mjs</code> \u5728\u6700\u4f4e\u7248 3.10 \u4e0e tested 3.14 \u4e0a\u90fd\u4f1a\u7528\u5168\u65b0\u865a\u62df\u73af\u5883\u590d\u73b0\u5b89\u88c5\u4e0e\u4e25\u683c\u6784\u5efa\uff09\u3002</p> <p>\u7ea6\u5b9a\uff1a\u4e0d\u505a\u7cfb\u7edf\u7ea7 pip install\uff0c\u865a\u62df\u73af\u5883\u5fc5\u987b\u5efa\u5728\u4ed3\u5e93\u5916\u90e8\u3002\u539f\u56e0\u662f\u6839 <code>pnpm check</code> \u4f1a\u5bf9\u5168\u4ed3\u505a\u672c\u5730\u7edd\u5bf9\u8def\u5f84\u5b57\u8282\u626b\u63cf\uff08\u89c1 <code>node scripts/check-structure.mjs</code>\uff09\uff0c\u800c macOS/Windows \u4e0a\u7684\u865a\u62df\u73af\u5883\u5185\u90e8\u5d4c\u6709\u672c\u673a\u7edd\u5bf9\u8def\u5f84\uff0c\u653e\u8fdb\u4ed3\u5e93\u4f1a\u9020\u6210\u8bef\u62a5\u3002</p> <p>\u5b89\u88c5\u547d\u4ee4\u7edf\u4e00\u4f7f\u7528 <code>--require-hashes</code>\uff08\u5185\u5bb9\u9501\u8981\u6c42\u9010\u6761\u6821\u9a8c hash\uff09\uff1a</p> <pre><code># \u5728\u4ed3\u5e93\u5916\u90e8\u521b\u5efa\u865a\u62df\u73af\u5883\uff08\u8def\u5f84\u53ef\u6309\u9700\u66ff\u6362\uff0c\u793a\u4f8b\u7528\u7236\u76ee\u5f55\uff09\npython3 -m venv ../docs-site-venv\n\n# \u7528\u54c8\u5e0c\u9501\u5b89\u88c5\u9501\u5b9a\u7248\u672c\uff08\u5b57\u8282\u4e0d\u7b26\u4f1a\u76f4\u63a5\u5931\u8d25\uff09\n../docs-site-venv/bin/pip install --require-hashes -r scripts/docs/requirements.txt\n\n# \u4e25\u683c\u6a21\u5f0f\u6784\u5efa\uff08\u4efb\u4f55\u8b66\u544a\u90fd\u4f1a\u5931\u8d25\uff09\uff0c\u8f93\u51fa\u5230 site/\uff08\u5df2\u88ab .gitignore \u5ffd\u7565\uff09\n../docs-site-venv/bin/mkdocs build --strict\n\n# \u672c\u5730\u9884\u89c8\uff08\u53ef\u9009\uff09\n../docs-site-venv/bin/mkdocs serve\n</code></pre> <p>\u79bb\u7ebf\u73af\u5883\u5b89\u88c5\uff08\u56fa\u5b9a\u6d41\u7a0b\uff09\uff1a\u5728\u7ebf\u673a\u5668\u53ea\u4e0b\u8f7d wheelhouse\uff0c\u79bb\u7ebf\u5b89\u88c5\u5fc5\u987b\u8fdb\u5165\u4e00\u4e2a\u4ece\u672a\u5728\u7ebf\u5b89\u88c5\u8fc7\u7684\u65b0 offline venv\u2014\u2014\u590d\u7528\u5728\u7ebf venv \u65e0\u6cd5\u8bc1\u660e\u79bb\u7ebf\u94fe\u8def\u53ef\u7528\uff1a</p> <pre><code># 1. \u5728\u7ebf\u673a\u5668\uff1a\u4e0b\u8f7d wheelhouse\uff08\u4e0b\u8f7d\u540c\u6837\u9010\u6761\u6821\u9a8c hash\uff1b\u672c\u6b65\u4e0d\u5b89\u88c5\u5230\u4efb\u4f55 venv\uff09\npython3 -m pip download --require-hashes -r scripts/docs/requirements.txt -d ../docs-wheels\n\n# 2. \u79bb\u7ebf\u673a\u5668\uff1a\u65b0\u5efa\u4e00\u4e2a\u4ece\u672a\u5728\u7ebf\u5b89\u88c5\u8fc7\u7684 offline venv\uff08\u8def\u5f84\u53ef\u6309\u9700\u66ff\u6362\uff0c\u4e0d\u5f97\u590d\u7528 ../docs-site-venv\uff09\npython3 -m venv ../docs-site-offline-venv\n\n# 3. \u5b8c\u5168\u79bb\u7ebf\u5b89\u88c5\uff1a\u4e0d\u8bbf\u95ee\u4efb\u4f55\u7d22\u5f15\uff0c\u53ea\u4ece wheelhouse \u89e3\u6790\uff0c\u7ee7\u7eed\u9010\u6761\u6821\u9a8c hash\uff08\u5b57\u8282\u4e0d\u7b26\u76f4\u63a5\u5931\u8d25\uff09\n../docs-site-offline-venv/bin/pip install --no-index --find-links ../docs-wheels --require-hashes -r scripts/docs/requirements.txt\n\n# 4. \u4e25\u683c\u6a21\u5f0f\u6784\u5efa\uff08\u4efb\u4f55\u8b66\u544a\u90fd\u4f1a\u5931\u8d25\uff09\n../docs-site-offline-venv/bin/mkdocs build --strict\n</code></pre>"},{"location":"setup/#\u516c\u5f00\u9759\u6001\u7ad9render-public-sitemjs","title":"\u516c\u5f00\u9759\u6001\u7ad9\uff08render-public-site.mjs\uff09","text":"<p>\u516c\u5f00\u9759\u6001\u7ad9\u662f\u672c\u4ed3\u6587\u6863\u7ad9\u7684\u516c\u5f00\u5b50\u96c6\uff0c\u552f\u4e00\u7531 <code>scripts/render-public-site.mjs</code> \u7528\u4e0a\u8ff0\u51bb\u7ed3 MkDocs \u73af\u5883\u6e32\u67d3\uff1a</p> <ul> <li>\u811a\u672c\u53ea\u53d1\u73b0\u5e76\u6821\u9a8c\u51bb\u7ed3\u865a\u62df\u73af\u5883\uff08<code>SKILL_FAMILY_DOCS_VENV</code>\uff0c\u6216\u6309\u672c\u8282\u6b65\u9aa4\u5efa\u7684 <code>../docs-site-venv</code> / <code>../docs-site-offline-venv</code>\uff09\uff0c\u81ea\u8eab\u4e0d\u505a\u4efb\u4f55\u5b89\u88c5\uff1b</li> <li>\u6267\u884c\u4e24\u6b21 strict \u6784\u5efa\u5e76\u8981\u6c42\u6811\u54c8\u5e0c\u4e00\u81f4\uff08\u786e\u5b9a\u6027\uff09\uff0c\u968f\u540e\u590d\u7528 <code>scripts/leak-scan.mjs</code> \u6838\u5fc3\u4e0e <code>scripts/leak-policy.json</code> \u505a\u5185\u5bb9\u6cc4\u6f0f\u626b\u63cf\uff1b</li> <li><code>--write</code> \u53ea\u5199 <code>docs/public/site/**</code> \u4e0e <code>docs/public/site-baseline.json</code>\uff1b<code>--check</code> \u96f6\u5199\u5165\u91cd\u7b97\u5e76\u6bd4\u5bf9\u57fa\u7ebf\uff1b<code>--self-test</code> \u8fd0\u884c\u4e3b\u52a8\u53cd\u4f8b\u81ea\u6d4b\uff1b</li> <li>symlink\u3001\u7279\u6b8a\u6587\u4ef6\u3001\u8d8a\u754c realpath\u3001\u5355\u6587\u4ef6\u8d85\u9650\u4e0e\u4e0d\u786e\u5b9a\u8f93\u51fa\u4e00\u5f8b\u62d2\u7edd\uff1b\u57fa\u7ebf\u7981\u6b62\u624b\u6539\uff08\u6e32\u67d3\u5668\u662f\u552f\u4e00\u5199\u5165\u9762\uff09\u3002</li> </ul> <pre><code>node scripts/render-public-site.mjs --write\nnode scripts/render-public-site.mjs --check\n</code></pre> <p>\u7ad9\u70b9\u6587\u4ef6\u4e0e engineering-kit public \u53d1\u5e03\u955c\u50cf\u4ed3\u7684 <code>docs/**</code> \u9010\u6587\u4ef6\u5bf9\u5e94\uff08\u6620\u5c04\u7531\u53d1\u5e03\u914d\u7f6e\u6267\u884c\uff0c\u672c\u4ed3\u4e0d\u76f4\u63a5\u5199\u955c\u50cf\uff09\uff1bPages \u5b9e\u4f8b\u662f\u5426\u5728\u7ebf\u662f\u53d1\u5e03\u540e\u9a8c\u8bc1\u4e8b\u5b9e\uff0c\u53e3\u5f84\u552f\u4e00\u89c1 \u5f53\u524d\u4ea7\u54c1\u72b6\u6001\u3002</p>"},{"location":"setup/#\u6587\u6863\u4e8b\u5b9e\u4e0e\u94fe\u63a5\u68c0\u67e5","title":"\u6587\u6863\u4e8b\u5b9e\u4e0e\u94fe\u63a5\u68c0\u67e5","text":"<p>\u6587\u6863\u4e2d\u7684\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\u4e0e\u95e8\u7981\u4e8b\u5b9e\u7531\u786e\u5b9a\u6027\u811a\u672c\u5bf9\u7167\u673a\u5668\u771f\u6e90\u6821\u9a8c\uff0c\u94fe\u63a5\u7531\u72ec\u7acb\u811a\u672c\u89e3\u6790\uff1a</p> <pre><code>node scripts/docs/fact-check.mjs\nnode scripts/docs/link-check.mjs\n</code></pre> <p><code>fact-check.mjs</code> \u662f Node \u811a\u672c\uff0c\u7ecf\u4ed3\u5185\u6a21\u5757\uff08<code>scripts/engine-floor-check.mjs</code>\uff09\u6d88\u8d39\u6839\u76ee\u5f55\u7cbe\u786e\u9501\u5b9a\u7684 <code>semver@7.8.5</code>\uff0c\u8fd0\u884c\u524d\u5fc5\u987b\u5148\u5b8c\u6210 <code>pnpm install --frozen-lockfile</code>\uff1b<code>link-check.mjs</code> \u4e3a\u7eaf Node \u5b9e\u73b0\uff08\u65e0\u7b2c\u4e09\u65b9\u4f9d\u8d56\uff09\u3002\u4e24\u8005\u9000\u51fa\u7801 0 \u8868\u793a\u901a\u8fc7\u3002\u811a\u672c\u804c\u8d23\u89c1 <code>scripts/docs/README.md</code>\u3002</p>"},{"location":"agents/","title":"\u4e2d\u6587 \u00b7 \u667a\u80fd\u4f53\u5165\u53e3","text":"<p>English</p>"},{"location":"agents/#\u9762\u5411\u667a\u80fd\u4f53\u7684\u6587\u6863\u5165\u53e3","title":"\u9762\u5411\u667a\u80fd\u4f53\u7684\u6587\u6863\u5165\u53e3","text":"<p>\u672c\u76ee\u5f55\u662f Skill Family Foundation \u7ed9\u667a\u80fd\u4f53\uff08Agent\uff09\u7528\u7684\u51b3\u7b56\u5165\u53e3\u3002\u4eba\u7c7b\u8bfb\u8005\u4ece\u6839 <code>README.md</code> \u8fdb\u5165\uff1b\u667a\u80fd\u4f53\u5728\u6709\u9650\u4e0a\u4e0b\u6587\u91cc\u5148\u8bfb\u8fd9\u91cc\uff0c\u518d\u6309\u610f\u56fe\u8df3\u5230\u5177\u4f53\u80fd\u529b\uff0c\u907f\u514d\u901a\u8bfb\u5168\u90e8\u6e90\u7801\u3002</p> <p>Foundation \u4e0d\u62e5\u6709\u4e1a\u52a1\u8bed\u4e49\u3002\u5b83\u53ea\u63d0\u4f9b\u4e09\u4ef6\u4e8b\uff1a\u673a\u5668\u5951\u7ea6\uff08Contracts\uff09\u3001Node \u8584\u673a\u5236\u8fd0\u884c\u65f6\uff08Harness\uff09\u3001\u5de5\u7a0b\u9636\u6bb5\u7684\u56db\u4e2a\u547d\u4ee4\uff08Engineering Kit\uff09\uff0c\u4ee5\u53ca\u6a2a\u5411\u58f0\u660e\u5dee\u5f02\u7684 Profile\u3002\u9886\u57df\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u3001\u53d1\u5e03\u8fdc\u7aef\u5199\u5165\u3001\u5ba1\u8ba1\u8bed\u4e49\u90fd\u7559\u5728\u8c03\u7528\u65b9\u6216\u5176\u4ed6\u9879\u76ee\u3002</p>"},{"location":"agents/#\u9605\u8bfb\u987a\u5e8f","title":"\u9605\u8bfb\u987a\u5e8f","text":"<p>\u667a\u80fd\u4f53\u6309\u4e0b\u9762\u7684\u987a\u5e8f\u53d6\u7528\uff0c\u4e0d\u5fc5\u4ece\u5934\u8bfb\u5230\u5c3e\uff1a</p> <ol> <li><code>capability-catalog.json</code> \u2014\u2014 \u5168\u90e8\u7a33\u5b9a\u4e0e candidate \u80fd\u529b\u7684\u673a\u5668\u4e8b\u5b9e\u76ee\u5f55\uff0c\u662f\u5224\u65ad\u300c\u8be5\u9700\u6c42\u662f\u5426\u5c5e\u4e8e Foundation\u3001\u843d\u5728\u54ea\u4e00\u5c42\u3001\u7528\u54ea\u4e2a\u5165\u53e3\u300d\u7684\u8d77\u70b9\u3002</li> <li><code>architecture-routing.md</code> \u2014\u2014 \u4ece\u67b6\u6784\u610f\u56fe\u5230\u5c42/\u80fd\u529b/\u5165\u53e3/\u5916\u90e8\u9879\u76ee\u7684\u51b3\u7b56\u8868\u4e0e\u51b3\u7b56\u6811\u3002</li> <li><code>capability-catalog.schema.json</code> \u2014\u2014 \u76ee\u5f55\u81ea\u8eab\u7684\u7ed3\u6784\u5408\u540c\uff0c\u6821\u9a8c\u5668\u4e0e\u6295\u5f71\u90fd\u4f9d\u8d56\u5b83\u3002</li> <li>\u6839 <code>README.md</code> \u7684 Agent Quick Reference \u2014\u2014 \u53ea\u505a\u8def\u7531\uff0c\u4e0d\u590d\u5236 API\u3002</li> <li>\u4e09\u4e2a\u5305 README \u7684 Agent Quick Reference \u2014\u2014 \u7cbe\u786e\u5230\u5305\u7ea7\u80fd\u529b\u548c\u5931\u8d25\u8fb9\u754c\u3002</li> <li><code>../reference/failure-and-side-effect-matrix.md</code> \u2014\u2014 \u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u7684\u8bfb\u5199/spawn/Git/\u7f51\u7edc/\u6b8b\u4f59\u72b6\u6001/\u9519\u8bef\u7801\u3002</li> <li><code>../reference/api/README.md</code> \u2014\u2014 \u4e09\u5305\u516c\u5171 API \u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\uff0c\u6309\u5165\u53e3\u7ed9\u51fa\u7b7e\u540d\u3001\u8f93\u5165/\u8f93\u51fa\u3001\u7eaf\u51fd\u6570\u6027\u3001\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code>/<code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1b\u4e0e catalog \u80fd\u529b ID \u4e92\u94fe\u3002</li> </ol> <p>\u4e8b\u5b9e\u4f18\u5148\u7ea7\uff1a\u672c\u6587\u6863\u53ea\u6d88\u8d39\u673a\u5668\u771f\u6e90\uff08package.json\u3001src/index.mjs\u3001CLI\u3001registry.json\u3001profile descriptor\uff09\u3002\u7248\u672c\u3001\u547d\u4ee4\u3001\u5305\u6570\u3001\u652f\u6301\u72b6\u6001\u90fd\u4ece\u771f\u6e90\u590d\u7b97\uff0c\u4e0d\u4ece\u8bb0\u5fc6\u6216\u65e7\u6587\u6863\u7167\u642c\u3002</p>"},{"location":"agents/#\u76ee\u5f55\u5408\u540c","title":"\u76ee\u5f55\u5408\u540c","text":"<p><code>docs/agents/</code> \u4e0b\u7684\u6587\u4ef6\u627f\u62c5\u4e0d\u540c\u804c\u8d23\uff0c\u4e0d\u4e92\u76f8\u91cd\u590d\uff1a</p> \u6587\u4ef6 \u89d2\u8272 \u8c01\u8be5\u6539 <code>capability-catalog.json</code> \u673a\u5668\u53ef\u8bfb\u7684\u80fd\u529b\u4e8b\u5b9e\uff0c\u6587\u6863\u5c42\u552f\u4e00\u4e8b\u5b9e\u9762 \u80fd\u529b\u53d8\u5316\u65f6\u6539\uff0c\u5e76\u7ecf <code>capability-catalog-check.mjs</code> \u6821\u9a8c <code>capability-catalog.schema.json</code> \u76ee\u5f55\u7ed3\u6784\u5408\u540c \u7ed3\u6784\u53d8\u5316\u65f6\u624d\u6539 <code>architecture-routing.md</code> \u610f\u56fe \u2192 \u5c42/\u80fd\u529b/\u5165\u53e3/\u5916\u90e8\u9879\u76ee\u7684\u51b3\u7b56 \u8def\u7531\u88c1\u51b3\u53d8\u5316\u65f6\u6539 <code>README.md</code>\uff08\u672c\u6587\u4ef6\uff09 \u667a\u80fd\u4f53\u603b\u5165\u53e3\u4e0e\u9605\u8bfb\u987a\u5e8f \u5165\u53e3\u7ed3\u6784\u53d8\u5316\u65f6\u6539 <code>../reference/api/README.md</code> \u53ca\u4e09\u5305\u9875 \u516c\u5171 API \u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\uff0ccatalog \u80fd\u529b\u7684\u7b7e\u540d\u7ea7\u5c55\u5f00 \u771f\u5b9e\u5bfc\u51fa\u53d8\u5316\u65f6\u6539\uff0c\u5e76\u4e0e <code>capability-catalog-check.mjs</code> \u540c\u6b65 <p>capability catalog \u4e0d\u662f Contracts \u7684\u65b0\u516c\u5171\u5bf9\u8c61\uff0c\u4e5f\u4e0d\u662f\u7b2c\u56db\u7c7b\u767b\u8bb0\u8868\u3002\u5b83\u53ea\u662f\u6587\u6863\u5c42\u7684\u673a\u5668\u4e8b\u5b9e\uff0c\u907f\u514d README \u5f62\u6210\u7b2c\u4e8c\u5957\u4f1a\u6f02\u79fb\u7684\u624b\u5199\u6743\u5a01\u3002</p>"},{"location":"agents/#\u67b6\u6784\u8bbe\u8ba1\u5de5\u4f5c\u6cd5","title":"\u67b6\u6784\u8bbe\u8ba1\u5de5\u4f5c\u6cd5","text":"<p>\u667a\u80fd\u4f53\u5904\u7406\u4e00\u4e2a Foundation \u76f8\u5173\u9700\u6c42\u65f6\uff0c\u6309\u4e0b\u9762\u56db\u6b65\u63a8\u8fdb\uff1a</p> <ol> <li>\u5148\u5224\u5f52\u5c5e\u3002\u8be5\u9700\u6c42\u662f\u5426\u542b\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1 oracle\uff1f\u82e5\u662f\uff0c\u7559\u5728\u6d88\u8d39\u8005\uff0c\u53ea\u628a\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\u63a5 Foundation\u3002</li> <li>\u518d\u5224\u5206\u5c42\u3002\u7ed3\u6784/\u534f\u8bae/\u7a33\u5b9a\u9519\u8bef\u7801/\u5bf9\u8c61 Schema \u843d Contracts\uff1b\u8de8\u6280\u80fd\u65cf\u53ef\u590d\u7528\u7684 Node \u673a\u5236\u843d Harness\uff1bscaffold/adopt/projection/check \u6216\u5177\u4f53 Profile \u6ce8\u5165\u843d Kit/Profile\u3002</li> <li>\u67e5\u76ee\u5f55\u5b9a\u5165\u53e3\u3002\u5728 <code>capability-catalog.json</code> \u6309 <code>layer</code> \u4e0e <code>intent</code> \u627e\u5230\u80fd\u529b\uff0c\u8bfb\u5b83\u7684 <code>entrypoints</code>\u3001<code>sideEffects</code>\u3001<code>failureSemantics</code>\u3001<code>ownedByCaller</code>\u3001<code>routeElsewhere</code>\u3002</li> <li>\u9a8c\u8bc1\u636e\u518d\u4e0b\u7ed3\u8bba\u3002\u76ee\u5f55\u6bcf\u6761\u80fd\u529b\u90fd\u5e26 <code>sourceRefs</code> \u4e0e <code>positiveTestRefs</code>/<code>negativeTestRefs</code>\uff0c\u6539\u52a8\u5224\u65ad\u524d\u5148\u56de\u5230\u8fd9\u4e9b\u771f\u6e90\u786e\u8ba4\uff0c\u4e0d\u51ed\u76ee\u5f55\u6563\u6587\u63a8\u65ad\u3002</li> </ol> <p>\u8def\u7531\u8fb9\u754c\u7684\u786c\u89c4\u5219\uff1aFoundation \u4e0d\u62e5\u6709\u8fdc\u7aef\u5199\u5165\uff08\u5f52 release-skill\uff09\u3001\u4e0d\u62e5\u6709\u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5\uff08\u5f52 loop-agent\uff09\u3001\u4e0d\u62e5\u6709\u5236\u54c1\u5173\u7cfb\u4e0e context\uff08\u5f52 artifact-graph\uff09\u3001\u4e0d\u62e5\u6709\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\uff08\u5f52\u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\uff09\u3002\u8be6\u60c5\u89c1 <code>architecture-routing.md</code> \u7684\u8def\u7531\u8868\u3002</p> <p>candidate \u9879\u7684 <code>entrypoints</code> \u59cb\u7ec8\u7ed9\u51fa\u89c4\u8303\u5165\u53e3\u3002\u82e5\u540c\u65f6\u5b58\u5728 <code>legacyEntrypoints</code>\uff0c\u8868\u793a\u8fd9\u662f 0.10.0 \u4ee5\u524d\u5f62\u6210\u7684\u5386\u53f2\u503a\u52a1\uff0c \u6d88\u8d39\u8005\u9700\u8fc1\u79fb\u4e00\u6b21\uff1b\u8fc1\u79fb\u540e\u4ec5\u664b\u5347 stable \u4e0d\u518d\u6539\u5408\u540c\u8eab\u4efd\u3002\u6d88\u8d39\u8005\u4ecd\u9700\u66f4\u65b0\u7cbe\u786e pin \u624d\u80fd\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\u3002 0.10.0 \u4ee5\u540e\u65b0 candidate \u7684\u80fd\u529b ID\u3001\u5165\u53e3\u3001Schema <code>$id</code> \u4e0e operation \u90fd\u4e0d\u5f97\u7f16\u7801\u6210\u719f\u5ea6\u3002</p>"},{"location":"agents/#\u4e0e\u673a\u68b0\u95e8\u7981\u7684\u5173\u7cfb","title":"\u4e0e\u673a\u68b0\u95e8\u7981\u7684\u5173\u7cfb","text":"<p>\u4e24\u4e2a\u68c0\u67e5\u811a\u672c\u5b88\u62a4\u76ee\u5f55\u4e0e README \u4e0d\u6f02\u79fb\uff1a</p> <ul> <li><code>scripts/docs/capability-catalog-check.mjs</code> \u6821\u9a8c\u7ed3\u6784\u3001\u552f\u4e00 ID\u3001\u6e90/\u6d4b\u8bd5\u5f15\u7528\u5b58\u5728\u3001unsupported \u8fb9\u754c\u3001Kit \u56db\u547d\u4ee4\u672a\u6269\u5f20\u3002</li> <li><code>scripts/docs/agent-section-check.mjs</code> \u6821\u9a8c\u6839 README \u4e0e\u4e09\u4e2a\u5305 README \u7684\u56fa\u5b9a Agent Quick Reference \u7ae0\u8282\u3001\u5fc5\u542b\u5b50\u6807\u9898\u4e0e\u80fd\u529b ID \u94fe\u63a5\u3002</li> </ul> <p>\u4e8c\u8005\u90fd\u53ea\u62a5\u5f62\u72b6\u4e0d\u81ea\u52a8\u6539\u6587\uff1b\u8b66\u544a\u9879\u9700\u56de\u5230\u771f\u6e90\u4e0e\u58f0\u97f3\u4eba\u5de5\u5224\u65ad\u3002</p>"},{"location":"agents/architecture-routing/","title":"\u4e2d\u6587 \u00b7 \u67b6\u6784\u8def\u7531","text":"<p>English</p>"},{"location":"agents/architecture-routing/#\u67b6\u6784\u8def\u7531\u4ece\u610f\u56fe\u5230\u5c42\u80fd\u529b\u4e0e\u5916\u90e8\u9879\u76ee","title":"\u67b6\u6784\u8def\u7531\uff1a\u4ece\u610f\u56fe\u5230\u5c42\u3001\u80fd\u529b\u4e0e\u5916\u90e8\u9879\u76ee","text":"<p>\u672c\u9875\u628a\u300c\u4e00\u4e2a\u67b6\u6784\u9700\u6c42\u8be5\u843d\u5728\u54ea\u91cc\u300d\u6536\u655b\u6210\u53ef\u673a\u68b0\u590d\u7528\u7684\u51b3\u7b56\u987a\u5e8f\u4e0e\u8def\u7531\u8868\u3002\u5b83\u670d\u52a1\u4e8e\u65b0\u667a\u80fd\u4f53\u5728\u4e0d\u901a\u8bfb\u6e90\u7801\u7684\u524d\u63d0\u4e0b\uff0c\u5feb\u901f\u5f97\u5230\u53ef\u9a8c\u8bc1\u7b54\u6848\uff1a\u8be5\u9700\u6c42\u662f\u5426\u5c5e\u4e8e Foundation\u3001\u5e94\u843d\u5728 Contracts/Harness/Kit/Profile \u54ea\u4e00\u5c42\u3001\u7528\u54ea\u4e2a\u7a33\u5b9a\u5165\u53e3\u3001\u4ec0\u4e48\u8bed\u4e49\u4ecd\u7531\u8c03\u7528\u65b9\u62e5\u6709\u3001\u4f55\u65f6\u5e94\u8f6c\u4ea4\u5916\u90e8\u9879\u76ee\u3002</p>"},{"location":"agents/architecture-routing/#\u51b3\u7b56\u987a\u5e8f","title":"\u51b3\u7b56\u987a\u5e8f","text":"<p>\u6309\u7f16\u53f7\u4f9d\u6b21\u5224\u65ad\uff0c\u547d\u4e2d\u5373\u505c\uff1a</p> <ol> <li>\u662f\u5426\u542b\u9886\u57df\u8bed\u4e49\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u6216\u5ba1\u8ba1 oracle\uff1f \u82e5\u662f\uff0c\u7559\u5728\u6d88\u8d39\u8005\uff1bFoundation \u53ea\u63a5\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\u3002</li> <li>\u662f\u5426\u662f\u7ed3\u6784\u3001\u534f\u8bae\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u6216\u5bf9\u8c61 Schema\uff1f \u843d Contracts\uff08\u5951\u7ea6\u6743\u5a01\uff09\u3002</li> <li>\u662f\u5426\u662f\u8de8\u6280\u80fd\u65cf\u53ef\u590d\u7528\u7684 Node \u673a\u5236\uff1f \u843d Harness\uff08Contracts \u673a\u5236\u534f\u8bae\u7684 Node \u5b9e\u73b0\uff09\u3002</li> <li>\u662f\u5426\u662f\u5de5\u7a0b\u9636\u6bb5\u7684 scaffold/adopt-plan/projection/check\uff0c\u6216\u5177\u4f53 host Profile \u6ce8\u5165\uff1f \u843d Kit / Profile\u3002</li> <li>\u662f\u5426\u6d89\u53ca\u53d1\u5e03\u8fdc\u7aef\u72b6\u6001\uff1f \u8f6c release-skill\u3002</li> <li>\u662f\u5426\u6d89\u53ca\u4efb\u52a1\u3001\u91cd\u8bd5\u3001\u8fd4\u5de5\u3001\u9a8c\u6536\u6216\u81ea\u8fed\u4ee3\uff1f \u8f6c loop-agent\u3002</li> <li>\u662f\u5426\u6d89\u53ca\u5236\u54c1\u5173\u7cfb\u3001context\u3001packet \u6216 version-lock\uff1f \u8f6c artifact-graph\u3002</li> <li>\u662f\u5426\u53ea\u6709\u4e00\u4e2a\u6d88\u8d39\u8005\uff0c\u6216\u5c1a\u672a\u8bc1\u660e\u8de8\u4e24\u4e2a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\uff1f \u9ed8\u8ba4\u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u6269\u5f20 Foundation\u3002</li> </ol> <p>\u7b2c 8 \u6b65\u662f\u6269\u5f20\u95f8\u95e8\u3002\u4efb\u4f55\u65b0\u589e\u7ec4\u4ef6\u90fd\u5fc5\u987b\u8bf4\u660e\uff1a\u5220\u9664\u5b83\u4f1a\u8ba9\u4e24\u4e2a\u4ee5\u4e0a\u771f\u5b9e\u6d88\u8d39\u8005\u91cd\u590d\u5b9e\u73b0\uff0c\u5e76\u7ecf\u72ec\u7acb fixture \u9a8c\u8bc1\u3002\u5426\u5219\u7559\u5728\u6d88\u8d39\u8005\u4fa7\u3002</p>"},{"location":"agents/architecture-routing/#\u8def\u7531\u8868","title":"\u8def\u7531\u8868","text":"<p>\u4e0b\u8868\u7ed9\u51fa\u5e38\u89c1\u67b6\u6784\u610f\u56fe\u7684\u9996\u9009\u80fd\u529b\u4e0e\u7981\u6b62\u8bef\u7528\u3002\u6bcf\u6761\u9996\u9009\u80fd\u529b\u90fd\u53ef\u5728 <code>capability-catalog.json</code> \u6309 id \u67e5\u5230\u5165\u53e3\u3001\u526f\u4f5c\u7528\u4e0e\u5931\u8d25\u8bed\u4e49\u3002</p> \u67b6\u6784\u610f\u56fe \u9996\u9009\u80fd\u529b \u7981\u6b62\u8bef\u7528 \u9a8c\u8bc1 Foundation \u5408\u540c\u5bf9\u8c61 Contracts / Harness validation\uff08<code>foundation.contracts.object-validation</code>\u3001<code>foundation.harness.contract-validation</code>\uff09 \u4e0d\u53d6\u4ee3\u6d88\u8d39\u8005\u4e1a\u52a1 Schema \u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u548c\u539f\u5b50\u5199 Harness path / atomic API\uff08<code>foundation.harness.path-containment</code>\u3001<code>foundation.harness.atomic-write</code>\uff09 \u4e0d\u628a\u6587\u4ef6\u9009\u62e9\u4e1a\u52a1\u89c4\u5219\u653e\u5165 Harness \u751f\u6210\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a Harness report \u6216 Kit report \u5b50\u52a8\u4f5c\uff08<code>foundation.harness.report</code>\u3001<code>foundation.kit.report</code>\uff09 \u4e0d\u4ece\u5f00\u653e\u4e1a\u52a1 outputs \u81ea\u7531\u7f16\u62a5\u544a \u6301\u4e45\u4e8b\u4ef6\u548c\u6d3e\u751f snapshot Harness state-store\uff08<code>foundation.harness.state-store</code>\uff09 \u4e0d\u5728 Foundation \u5b9a\u4e49 workflow \u72b6\u6001\u673a \u65b0\u9879\u76ee\u9aa8\u67b6 Kit scaffold\uff08<code>foundation.kit.scaffold</code>\uff09 \u4e0d\u8986\u76d6\u975e\u7a7a\u5b58\u91cf\u4ed3 \u5b58\u91cf\u91c7\u7528\u76d8\u70b9 Kit adopt-plan\uff08<code>foundation.kit.adopt-plan</code>\uff09 \u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u81ea\u52a8\u8fc1\u79fb \u53d7\u7ba1\u6295\u5f71 Kit projection + Profile\uff08<code>foundation.kit.projection</code>\uff09 \u4e0d\u8986\u76d6 handwritten \u6587\u4ef6 \u5de5\u7a0b\u8bca\u65ad Kit check\uff08<code>foundation.kit.check</code>\uff09 \u4e0d\u81ea\u52a8\u4fee\u590d \u53d1\u5e03 release-skill Foundation \u4e0d\u62e5\u6709\u8fdc\u7aef\u5199\u5165 \u4efb\u52a1/\u91cd\u8bd5/\u8fd4\u5de5 loop-agent Foundation \u4e0d\u62e5\u6709\u4e1a\u52a1\u72b6\u6001\u673a \u5236\u54c1\u5173\u7cfb/\u7248\u672c\u9501 artifact-graph Foundation \u4e0d\u62e5\u6709\u5236\u54c1\u56fe"},{"location":"agents/architecture-routing/#\u5206\u5c42\u5b9a\u4f4d\u901f\u67e5","title":"\u5206\u5c42\u5b9a\u4f4d\u901f\u67e5","text":"<p>\u4f9d\u8d56\u65b9\u5411\u56fa\u5b9a\u4e3a Contracts \u2192 Harness \u2192 Engineering Kit\uff1bProfile \u6a2a\u5411\u58f0\u660e\uff0c\u516c\u5171\u6838\u5fc3\u4e0d\u53cd\u5411\u4f9d\u8d56\u5177\u4f53 Profile\u3002</p> <ul> <li>Contracts\uff1a\u7ed3\u6784\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001\u534f\u8bae\u540d\u767b\u8bb0\uff1b18 \u7c7b\u9876\u5c42\u5bf9\u8c61\u30019 \u6761 mandatory rule\u3002</li> <li>Harness\uff1aContracts \u7684 Node \u8584\u673a\u5236\u8fd0\u884c\u65f6\uff1b\u53ea\u5b9e\u73b0\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\uff0c\u4e0d\u62e5\u6709\u8bed\u4e49\u3002</li> <li>Engineering Kit\uff1a\u56db\u4e2a\u5de5\u7a0b\u547d\u4ee4\uff08scaffold\u3001adopt-plan\u3001projection\u3001check\uff09\u53ca\u5176\u53ea\u8bfb/\u53d7\u9650\u5199\u5165\u8fb9\u754c\u3002</li> <li>Profile\uff1a\u5bbf\u4e3b\u4e0e\u9879\u76ee\u5f62\u6001\u5dee\u5f02\u7684\u58f0\u660e\u5f0f SPI\uff1b\u53ea\u5b9e\u73b0\u7a33\u5b9a SPI\uff0c\u4e0d\u6ce8\u5165\u4e1a\u52a1\u8bed\u4e49\u3002</li> <li>\u5916\u90e8\u9879\u76ee\uff1arelease-skill\uff08\u53d1\u5e03\uff09\u3001loop-agent\uff08\u4efb\u52a1\u751f\u547d\u5468\u671f\uff09\u3001artifact-graph\uff08\u5236\u54c1\u5173\u7cfb\uff09\u3001\u72ec\u7acb\u5ba1\u8ba1\u6d88\u8d39\u8005\uff08\u9886\u57df\u8bed\u4e49\uff09\u3002</li> </ul>"},{"location":"agents/architecture-routing/#\u5178\u578b\u8bef\u8def\u7531\u4e0e\u7ea0\u6b63","title":"\u5178\u578b\u8bef\u8def\u7531\u4e0e\u7ea0\u6b63","text":"<ul> <li>\u8bef\u628a\u9886\u57df Schema \u8def\u7531\u5230 Foundation\uff1a\u9886\u57df Schema \u7531\u6d88\u8d39\u8005\u62e5\u6709\uff0cFoundation \u53ea\u63d0\u4f9b\u901a\u7528\u6821\u9a8c\u673a\u5236\uff08<code>foundation.contracts.object-validation</code>\uff09\u3002</li> <li>\u8bef\u628a workflow \u72b6\u6001\u673a\u8def\u7531\u5230 Foundation\uff1astate-store \u53ea\u63d0\u4f9b\u4e8b\u4ef6\u65e5\u5fd7\u4e0e\u5feb\u7167\u5e95\u5ea7\uff0creducer \u8f6c\u79fb\u4e0e\u7ec8\u6001\u7531\u8c03\u7528\u65b9\u62e5\u6709\uff08<code>foundation.unsupported.business-state-machine</code>\uff09\u3002</li> <li>\u8bef\u628a\u53d1\u5e03\u5199\u5165\u8def\u7531\u5230 Foundation\uff1a\u8fdc\u7aef\u5199\u5165\u5f52 release-skill\uff0cFoundation \u4e0d\u542b\u4efb\u4f55 publish/remote-write \u5165\u53e3\uff08<code>foundation.unsupported.remote-publish</code>\uff09\u3002</li> <li>\u8bef\u628a\u5ba1\u8ba1 oracle \u8def\u7531\u5230 Foundation\uff1a\u5ba1\u8ba1\u8868\u9762\u53ea\u505a\u786e\u5b9a\u6027\u5e8f\u5217\u5316\uff0c\u9886\u57df\u7ed3\u8bba\u5c5e\u5916\u90e8\u5ba1\u9605\uff08<code>foundation.unsupported.domain-audit-semantics</code>\uff09\u3002</li> </ul> <p>\u8def\u7531\u5224\u65ad\u7684\u8bda\u5b9e\u8fb9\u754c\uff1a\u7ed3\u6784\u68c0\u67e5\u53ea\u8bc1\u660e\u5b57\u8282/\u7ed3\u6784\u4e00\u81f4\u6027\uff08\u4ed3\u5185\u53ef\u8bc1\uff09\uff1b\u666e\u901a\u6b63\u6587\u8bed\u4e49\u4e0e\u6700\u7ec8\u63a5\u53d7/\u62d2\u7edd\u7ed3\u8bba\u5c5e\u4e8e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff0c\u4e0d\u5728\u76ee\u6807\u4ed3\u5185\u7ef4\u62a4\u7b2c\u4e8c\u4efd\u95e8\u7981\u3002</p>"},{"location":"en/","title":"English \u00b7 Home","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/#Skill-Family-Foundation-Workspace","title":"Skill Family Foundation Workspace","text":"<p>The shared engineering-infrastructure parent workspace for the Skill Family lifecycle. This repository provides the machine contracts (Contracts), the thin Node runtime (Harness), the engineering kit (Engineering Kit), the Profile SPI, fully fictional generic sample fixtures, and the engineering documentation skeleton.</p>"},{"location":"en/#Current-Status","title":"Current Status","text":"<p>This repository is a first-version skeleton under development. Dynamic state such as versions, releases, Pages, and Git is recorded solely in Current Product Status; the license is approved as Apache License 2.0, with the copyright holder being \u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8 (Guangzhou Fenghe Technology Co., Ltd.). The full text is in the root-level <code>LICENSE</code>.</p> <p>This workspace is permanently private and is the single source of truth for development; the only public boundary consists of three versioned release mirrors and the npm tarball. The pinned consumer coordinates and release status are recorded solely in Current Product Status.</p> <p>The single product-level status page is Current Product Status, mechanically verified by <code>node scripts/docs/fact-check.mjs</code> against the machine source of truth; other pages do not carry a second status caliber.</p>"},{"location":"en/#First-Version-Composition","title":"First-Version Composition","text":"Component Path Responsibility Contracts <code>packages/skill-family-contracts</code> Sole authority for machine-executable engineering structure and mechanism protocols Harness <code>packages/skill-family-harness-node</code> Implements only the mechanism protocols defined by Contracts; owns no business semantics Engineering Kit <code>packages/skill-family-engineering-kit</code> Provides only the four top-level commands <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, <code>check</code> Profile seed <code>profiles/public-plugin</code> Profile seed in the form of a public plugin Fictional sample <code>fixtures/generic-profile-extension-conformance</code> A fully fictional extension-conformance sample <p>The package manifest, Profiles, fixtures, and top-level commands use <code>.foundation/skeleton-manifest.json</code> as the machine source of truth; tool version locks are in <code>.foundation/version-lock.json</code>.</p>"},{"location":"en/#Documentation-Map","title":"Documentation Map","text":"<ul> <li>Setup and Environment \u2014 tool version pinning, installation, and documentation site build</li> <li>Quickstart \u2014 the shortest path from local verification to a trial run</li> <li>Capabilities and Diagnostics \u2014 the Kit's four commands, exit codes, and troubleshooting</li> <li>Architecture Boundaries \u2014 layering, single source of truth, budget, and documentation fact-check</li> <li>Current Product Status \u2014 the single product status page</li> <li>Git Lifecycle Guide \u2014 authorized boundaries for branches, commits, pushes, and releases</li> </ul>"},{"location":"en/#Writing-Boundaries","title":"Writing Boundaries","text":"<p>Documentation consumes only a frozen fact package composed of the machine source of truth (manifest, package.json, Contracts registry, etc.), mechanically verified by <code>node scripts/docs/fact-check.mjs</code>. Model names, credentials, and scheduling information do not enter documentation, nor do they enter Contracts; see Architecture Boundaries.</p>"},{"location":"en/architecture/","title":"English \u00b7 Architecture","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/architecture/#Architecture-Boundaries","title":"Architecture Boundaries","text":"<p>This page is the stable architecture projection of Skill Family Foundation for users. It explains only structure, responsibilities, boundaries, and routing; it does not carry dynamic release state (release state is recorded solely in <code>docs/status/current.md</code> and mechanically verified by <code>scripts/docs/fact-check.mjs</code>). All versions, commands, package counts, and support states are recomputed from the machine source of truth.</p>"},{"location":"en/architecture/#Layers","title":"Layers","text":"<p>The layering established by the 2026-08-09 architecture hand-off (FND-ADR-001~007, active, see <code>artifacts/decisions/</code>): a vertical dependency chain of four layers, with horizontal capability attachments, and no new vertical layers added.</p> <pre><code>Skill Family business (per-product repositories: release-skill, loop-agent, skill-eval, etc.)\n \u2502 depends on\n \u25bc\nEngineering Kit (scaffold / adopt-plan / projection / check)\n \u2502 depends on\n \u25bc\nHarness Node (Contracts mechanism-protocol implementation)\n \u2502 depends on\n \u25bc\nContracts (structure, protocols, error codes, protocol-name registry)\n \u25b2\n \u2514---------------- independent Audit consumer\n\nHorizontal (attachment surfaces, no new vertical layers):\n- profiles/ declarations of host and project-shape differences; implements only the stable SPI\n- host external AI coding runtime environment: owns semantics; Foundation unifies structural differences\n- release-skill release state and all remote writes; does not enter Foundation\n- Artifact Graph the `artifacts/` architecture artifact system; its gate is check:artifacts\n</code></pre> <p>The same Git workspace also contains <code>packages/foundation-adoption-review/</code>. It is an independent Plugin release unit and public-mirror source. Starting with 0.17.0, its version number aligns with Foundation while the historical 0.1.0 release remains unchanged. It consumes Foundation's public facts, but it is not part of the Contracts \u2192 Harness \u2192 Engineering Kit dependency chain and does not count as a fourth Foundation mechanism package. Its public closure is restricted by that release unit's own allowlist; the root's private plans, artifacts, tests, and other documents do not enter the Plugin mirror.</p> <p>Arrows point to the depended-upon party. The public core must not depend in reverse on a concrete Profile or a concrete skill family; where a new capability's dependency direction lands is specified in <code>artifacts/design/FND-DES-001.md</code>, and asset-by-asset ownership is in FND-ADR-002.</p>"},{"location":"en/architecture/#Responsibility-Matrix","title":"Responsibility Matrix","text":"<p>Each layer assumes only the responsibilities listed below; out-of-scope capabilities are owned by external projects or consumers.</p> Layer Owns Does not own (lands elsewhere) Contracts Structure, protocols, error codes, protocol-name registry; 46 top-level object kinds; 9 mandatory rules Business-field semantics, domain auditing, remote writes, model generation Harness Node mechanism implementation of Contracts; path containment, atomic write, closures, request handling, report rendering, host-access mechanism, state substrate Business semantics, workflow orchestration, model invocation, git writes, network remotes Engineering Kit The four engineering commands and their read-only / restricted-write boundaries; host sub-action injection of concrete Profiles Auto-fix, auto-migration, remote release, a fifth command Profile Declarative SPI for host and project-shape differences; implements only the stable SPI Business semantics, executable-script entry points, public-core changes release-skill Release state and all remote writes Foundation contains no publish/remote-write entry point loop-agent Tasks, retries, rework, acceptance, self-iteration Foundation does not define a workflow state machine Artifact Graph Artifact relationships, context, packet, version-lock Foundation does not own the artifact graph Audit Independent fixtures, expected values, adjudication Domain-semantic conclusions are owned by external review"},{"location":"en/architecture/#Capability-Ownership-Algorithm","title":"Capability Ownership Algorithm","text":"<p>Given an architecture requirement, decide ownership in the following order, stopping at the first match:</p> <ol> <li>Contains domain semantics, a business state machine, or an audit oracle \u2192 keep it with the consumer; connect only business-neutral mechanisms.</li> <li>Is structure, a protocol, a stable error code, or an object Schema \u2192 Contracts.</li> <li>Is a Node mechanism reusable across skill families \u2192 Harness.</li> <li>Is scaffold/adopt-plan/projection/check or a concrete host Profile injection \u2192 Kit / Profile.</li> <li>Involves publishing remote state \u2192 release-skill.</li> <li>Involves tasks/retries/rework/acceptance \u2192 loop-agent.</li> <li>Involves artifact relationships / version-lock \u2192 artifact-graph.</li> <li>Has only one consumer, or has not been proven to repeat across two real consumers \u2192 keep it with the consumer; do not expand Foundation.</li> </ol> <p>Step 8 is the expansion gate: a new component must justify that deleting it would force two or more real consumers to re-implement it, and this must be verified by an independent fixture; admission gate 1 additionally requires at least one existing real consumer plus one structurally isomorphic foreseeable consumer (the second consumer need not be live, but its need must be expressible with the same structure; adjustment record in FND-ADR-009). Step 9 is the finite-closed-semantics gate (FND-ADR-001 gate 8): a capability carrying limited domain semantics must satisfy either \u2014 its semantics are covered by a small stable closed enumeration, or it is a deterministic estimation primitive whose algorithm, scope, and bias direction are declared in the contract; this gate does not cancel gate 2's \"semantics-free\" veto. The machine-readable version is in <code>docs/agents/architecture-routing.md</code>.</p>"},{"location":"en/architecture/#Trust-and-Side-Effect-Boundaries","title":"Trust and Side-Effect Boundaries","text":"<p>Foundation's trust assumptions and side-effect conventions are solidified per layer; callers judge risk accordingly:</p> <ul> <li>Contracts: pure functions, no file/Git/network/process side effects; error codes are frozen and do not drift (<code>foundation.contracts.error-codes</code>).</li> <li>Harness: the mechanism layer reads and writes only within contained paths; <code>HARNESS_EXCLUSIONS</code> excludes release-state, remote-network-access, business-semantics, workflow-orchestration, model-calls, git-writes (<code>foundation.harness.errors</code>).</li> <li>Engineering Kit: <code>FORBIDDEN_SIDE_EFFECTS</code> includes git-init/commit/push/tag, publish, remote-write; <code>REFUSED_MUTATION_FLAGS</code> are refused at the CLI entry point (<code>foundation.kit.cli</code>).</li> <li>Profile: declarative differences; the entry point must be a JSON data resource; <code>coreOwned</code> (packages/commands/namespacePrefixes) is a forbidden target (<code>foundation.profile.extension-spi</code>).</li> <li>State substrate: the event log is the sole authority, and the snapshot is a derived cache; <code>confirmOwnerTerminated</code> is an external trust anchor provided by the caller, and does not promise resistance against same-privilege malicious processes (<code>foundation.harness.state-store</code>).</li> </ul>"},{"location":"en/architecture/#Architecture-Decision-Tree","title":"Architecture Decision Tree","text":"<pre><code>Requirement contains domain semantics/state machine/audit? \u2500\u2500yes\u2500\u2500\u25b6 keep with consumer\n \u2502no\nIs it structure/protocol/error code/Schema? \u2500\u2500yes\u2500\u2500\u25b6 Contracts\n \u2502no\nIs it a Node mechanism across skill families? \u2500\u2500yes\u2500\u2500\u25b6 Harness\n \u2502no\nIs it scaffold/adopt/projection/check or Profile injection? \u2500\u2500yes\u2500\u2500\u25b6 Kit / Profile\n \u2502no\nInvolves publishing remote state? \u2500\u2500yes\u2500\u2500\u25b6 release-skill\n \u2502no\nInvolves tasks/retries/rework/acceptance? \u2500\u2500yes\u2500\u2500\u25b6 loop-agent\n \u2502no\nInvolves artifact relationships/version-lock? \u2500\u2500yes\u2500\u2500\u25b6 artifact-graph\n \u2502no\nOnly one consumer / not proven across two real consumers? \u2500\u2500yes\u2500\u2500\u25b6 keep with consumer, do not expand\n \u2502no\nCarries limited domain semantics? \u2500\u2500yes\u2500\u2500\u25b6 finite closed semantics: covered by a\n \u2502 stable closed enumeration, or a deterministic estimation\n \u2502 primitive (algorithm/scope/bias declared in the contract)\n \u2502 \u2192 admissible; otherwise keep with consumer\n \u2502 (FND-ADR-001 gate 8; does not cancel gate 2's veto)\n \u2502no\n \u2500\u2500\u25b6 admissible\n</code></pre>"},{"location":"en/architecture/#Routing-Relationships-with-External-Projects","title":"Routing Relationships with External Projects","text":"<p>Foundation is not an all-powerful base. The following responsibilities are explicitly outside Foundation:</p> <ul> <li>Release and remote writes: owned by release-skill; Foundation provides no publish/remote-write entry point (<code>foundation.unsupported.remote-publish</code>).</li> <li>Task lifecycle: owned by loop-agent (tasks, retries, rework, acceptance); Foundation contains no workflow state machine (<code>foundation.unsupported.business-state-machine</code>).</li> <li>Artifact governance: artifact-graph owns the <code>artifacts/</code> relationship contract and version-lock; its gate is <code>check:artifacts</code>.</li> <li>Domain auditing: an independent audit consumer owns the semantics and final accept/reject; Foundation provides only a deterministic audit surface (<code>foundation.unsupported.domain-audit-semantics</code>).</li> <li>Host application and lifecycle: Hosts own their semantics and lifecycle behavior. Foundation only unifies structural differences through bounded host identity/alias resolution, contained local projection, bound reads, atomic writes, and fixed-driver constrained verification. Only a Descriptor with <code>support=supported</code> can make <code>planHost</code> produce an install/update plan with <code>status=planned</code>; a <code>support=manual</code> host such as Qoder receives an empty <code>status=manual</code> plan, and <code>applyHostPlan</code> returns <code>rejected</code> with <code>publicationState=not-attempted</code> for it. <code>applyHostPlan</code> executes only <code>status=planned</code> plans; install/update still requires digest binding, a verified build, and explicit authorization, while uninstall returns <code>manual-recovery-required</code> without deleting files. Real-host verification uses six closed built-in drivers with fixed-argument, fresh, constrained calls and <code>existing-user-state + host-managed</code>. The skill family (caller) interprets business results and performs final domain acceptance from infrastructure observations and business answers. Qoder's Descriptor is <code>manual</code>, and <code>qodercli-print-v1</code> is a <code>candidate</code> real-verification driver. WorkBuddy and CodeBuddy use separate drivers and discovery layouts. Post-publish plugin discovery, installation, updates, marketplace operations, and release state in real user environments are managed by release-skill.</li> </ul>"},{"location":"en/architecture/#Capability-Identity-and-Maturity","title":"Capability Identity and Maturity","text":"<p>Capability identity and maturity are separate dimensions (FND-ADR-016). Consumers of historical <code>./candidate/**</code> entrypoints migrate once to the canonical entrypoints introduced in 0.10.0, while the old entrypoints remain same-source compatibility surfaces during deprecation. Capabilities introduced from 0.10.0 onward use their final canonical entrypoint, Schema <code>$id</code>, and operation from the first candidate release. Stable promotion changes the compatibility promise only and does not trigger another source or contract-identity migration. A consumer must still update all three exact package pins to obtain a newly published stable promise. Existing package-identity, source-digest, and provenance bindings continue to determine whether a Bundle rebuild is required; the maturity label does not add a separate rebuild condition.</p> <p>The physical <code>candidate/</code> directory is not an architecture layer and does not determine public stability. The Contracts machine policy and capability-catalog <code>stability</code> field are authoritative. Removing a historical entrypoint requires a separate major-version decision and consumer-exit evidence; it cannot be bundled into promotion.</p>"},{"location":"en/architecture/#Next-Phase-Capability-Lines-Architecture-Hand-off","title":"Next-Phase Capability Lines (Architecture Hand-off)","text":"<p>All three capability lines were included via the FND-ADR-001 capability admission-gate adjudication and all land within the existing layers:</p> <ul> <li>Host-access line (FND-FR-001/FND-FR-002/FND-FR-008/FND-FR-009): Contracts registers descriptor/source/manifest/probe/plan/receipt and peer-verification request/result; Harness implements generic source closure, contained local projection, atomic build/materialize, probe classification, and read-only peer verification; Kit injects the concrete Profile and six closed built-in drivers, including <code>qodercli-print-v1</code>, separate WorkBuddy and CodeBuddy drivers, and three other registered drivers. Only a Descriptor with <code>support=supported</code> can yield an install/update plan with <code>status=planned</code>; manual hosts receive an empty <code>status=manual</code> plan, and <code>applyHostPlan</code> returns <code>rejected</code> / <code>not-attempted</code>. The public API retains <code>planHost</code> / <code>applyHostPlan</code>; a planned install/update still requires digest binding, a verified build, and explicit authorization, while uninstall remains non-destructive and requires manual recovery. Callers create, provide, and exclusively own the fresh roots and clean up their outer <code>temporaryRoot</code>; Foundation creates and retains only the tracked session root beneath it. Foundation validates canonical/fresh paths, containment, overlap isolation, digest and Descriptor/driver binding, then runs the fixed-argument constrained call. These path checks are boundaries, not an OS sandbox. Callers use the infrastructure observations and business answers for final domain acceptance. Qoder's Descriptor is <code>manual</code>, and <code>qodercli-print-v1</code> is a <code>candidate</code> real-verification driver; WorkBuddy and CodeBuddy keep separate drivers and discovery layouts. Post-publish plugin discovery, installation, updates, marketplace operations, and release state in real user environments remain release-skill responsibilities.</li> <li>Durable state-substrate line (FND-FR-003, FND-ADR-004): append-only events, hash chain, snapshots, and verification recovery; provides only the state substrate, not business semantics such as state machines, task nodes, retries, terminal states, or memory.</li> <li>Human-report line (FND-FR-004, FND-ADR-005): a two-layer contract \u2014 machine results are the sole source of truth, and the human report is deterministically rendered from machine results (Markdown + digest binding + graded checks), not freely authored.</li> <li>Finite-closed-semantics tools line (FND-ADR-009): baseline materialization + contentGuard (digest mismatch, mid-materialization change, and guard rejection all fail closed), generic read chokepoint (allowed-root set + optional identity predicate), strategy-driven surface scan (policy contract + injection self-test), token upper-bound estimation (deterministic estimation primitive with no model/network/tokenizer dependency), and a generic upper-bound guard (reusing the state-store event ledger and token-lock; the bound and over-limit policy are consumer-configured).</li> </ul> <p>The three mechanism-package structure is preserved and a fourth mechanism package is not split out (FND-ADR-007); the independent Plugin release unit in the same workspace does not change this dependency chain. Artifact governance uses the artifact-graph CLI and version-lock (FND-ADR-006).</p>"},{"location":"en/architecture/#First-Version-Budget","title":"First-Version Budget","text":"<ul> <li>Top-level Contracts objects: 46 kinds, including <code>plugin-verification-request</code>, <code>plugin-verification-result</code>, <code>filesystem-tree-observation</code>, <code>executable-identity-observation</code>, <code>skill-family-directory-verification-request</code>, <code>skill-family-directory-verification-result</code>, and <code>engineering-baseline</code>, with <code>packages/skill-family-contracts/src/registry.json</code> as the sole source of truth;</li> <li>Kit top-level commands: 4 (scaffold, adopt-plan, projection, check);</li> <li>Mandatory mechanical rules: currently 9, budget not exceeding 20, absolute ceiling 30; CR-001 uniformly compiles all Schemas within the registry;</li> <li>Leaf packages: 3 (skill-family-contracts, skill-family-harness-node, skill-family-engineering-kit);</li> <li>Schema validator: Ajv 8.20.0 (exact version pin), supporting both draft-07 and 2020-12 dialects;</li> <li>kernel protocol: skill-family.kernel.operation (stable), Contracts specification 1.14.0; the Kernel document remains at its 1.8.0 lifecycle coordinate and byte baseline;</li> <li>Default runtime language: Node; first-version implementations in a second language: 0.</li> </ul> <p>Any new component must justify the two-or-more real-consumer re-implementation that deleting it would cause, and be verified by an independent fixture.</p>"},{"location":"en/architecture/#Machine-Source-of-Truth-and-File-Classification","title":"Machine Source of Truth and File Classification","text":"Source of truth Content <code>.foundation/skeleton-manifest.json</code> Package manifest, Profiles, fixtures, top-level commands <code>.foundation/version-lock.json</code> Exact versions and lock points for projen, pnpm, Node <code>.foundation/file-registry.json</code> Registration of managed / handwritten / artifact file classes <code>package.json</code> and <code>packages/*/package.json</code> Versions, commands, dependencies (all projen-managed) <code>packages/skill-family-contracts/src/registry.json</code> Protocol-name and Schema $id registry <code>scripts/release-artifact-contract.json</code> Fixed three-package release byte contract (members, required items, and content-digest rules) <p>Managed files can only be modified via <code>.projenrc.js</code> and regenerated by running <code>pnpm synth</code>; handwritten files (including all documentation) are not overwritten by synth. The authoritative classification is in <code>.foundation/file-registry.json</code>.</p>"},{"location":"en/architecture/#Documentation-System-and-Fact-Check","title":"Documentation System and Fact-Check","text":"<p>The documentation system aims to eliminate manual drift through deterministic checks:</p> <ol> <li>Frozen fact package: documentation writing consumes only the machine sources of truth listed in the table above. Models or authors must not write versions, commands, or package counts from memory; model names, credentials, and scheduling information do not enter documentation, nor do they enter Contracts.</li> <li>Fact-check: <code>node scripts/docs/fact-check.mjs</code> verifies package names, commands, gate facts, version pins, and key numbers in the documentation against the source of truth, and cross-checks consistency across sources (manifest vs package.json, version-lock vs packageManager, rule count vs budget, etc.).</li> <li>Link-check: <code>node scripts/docs/link-check.mjs</code> resolves in-repo relative links and heading anchors across the README and all <code>docs/**/*.md</code>, and verifies that <code>mkdocs.yml</code> nav is complete.</li> <li>No-workflow boundary and public-boundary verification: this repository has no CI/CD workflow at all (the old topology's three Actions \u2014 ci/docs/docs-deploy \u2014 have been entirely deleted); all gates run within the private workspace (<code>pnpm check</code>); the public boundary is mechanically verified by <code>check:public-snapshots</code> and the release byte contract. The public static site is rendered by <code>scripts/render-public-site.mjs</code> (with the sole output <code>docs/public/site/**</code> and the deterministic baseline <code>docs/public/site-baseline.json</code>).</li> <li>Version lock: the site toolchain is locked in <code>scripts/docs/toolchain.json</code> and <code>scripts/docs/requirements.txt</code>; the build uses only an out-of-repo Python virtual environment, with no system-level pip install.</li> </ol> <p>Both check scripts can be run directly via <code>node scripts/docs/&lt;name&gt;.mjs</code>: <code>fact-check.mjs</code> consumes the root-pinned <code>semver@7.8.5</code> via in-repo modules and requires <code>pnpm install --frozen-lockfile</code> to be completed first; <code>link-check.mjs</code> is a pure Node implementation. See <code>scripts/docs/README.md</code> for responsibilities.</p>"},{"location":"en/architecture/#Stable-Product-Gates","title":"Stable Product Gates","text":"<p>The root <code>pnpm check</code> orchestrates only the 11 stable product gate IDs (<code>check:structure</code>~<code>check:artifacts</code>, each ID listed in Current Product Status), and no longer hard-pins the original command list; each stable ID composes a few product checks within its own package script. Gate facts are mechanically derived by <code>node scripts/docs/fact-check.mjs</code> from the root <code>package.json</code>'s <code>scripts.check</code> and verified verbatim. Documentation and setup invoke or list only the 11 stable IDs or the root <code>pnpm check</code>, and do not duplicate the underlying command list.</p> <p>The honest boundary of in-repo checks: structural checks only prove \"byte/structural consistency (provable in-repo)\"; one-time migration completeness, ordinary prose semantics, and the final accept/reject conclusion belong to the responsibility of external review; no second gate registry, baseline, or command comparator is maintained within the target repository.</p>"},{"location":"en/examples-and-fixtures/","title":"English \u00b7 Examples and fixtures","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/examples-and-fixtures/#Examples-and-Fixtures","title":"Examples and Fixtures","text":"<p>Foundation fixtures prove structural contracts and mechanism boundaries. They do not serve as an oracle for business correctness.</p>"},{"location":"en/examples-and-fixtures/#Fixture-Classes","title":"Fixture Classes","text":"<ul> <li>Positive fixtures provide valid input and must pass the declared contract or mechanism.</li> <li>Negative fixtures provide invalid input and must produce the stable failure code required by the contract.</li> <li>Dialect-boundary fixtures freeze expected behavior where draft-07 and 2020-12 JSON Schema handling differs.</li> </ul> <p>All published fixtures use fictional data. They must not contain a private Profile, real business data, credentials, user-specific paths, or consumer evidence.</p>"},{"location":"en/examples-and-fixtures/#Verification-Entry-Points","title":"Verification Entry Points","text":"Scope Verification entry point What it proves Contracts fixtures <code>packages/skill-family-contracts/test/fixtures.test.mjs</code> Registered fixture inputs and expected structural results still match; mismatch uses <code>SFC1010</code> Profile SPI conformance <code>fixtures/generic-profile-extension-conformance/verify.mjs</code> and <code>leak-scan.mjs</code> A fictional extension follows the stable SPI and public-data boundary Scaffold contract <code>fixtures/scaffold-conformance/verify.mjs</code> Generated skeleton bytes match the frozen contract Adoption hazards <code>fixtures/adoption/cases/</code> <code>adopt-plan</code> preserves its read-only boundary through before/after byte snapshots <p>These entry points are read-only or self-contained. They do not write a caller repository or access a remote service.</p>"},{"location":"en/examples-and-fixtures/#Oracle-Boundary","title":"Oracle Boundary","text":"<p>A fixture can prove that a contract was satisfied. It cannot prove that a business decision was correct. Domain state transitions, business acceptance, and audit conclusions remain with the consumer or an independent reviewer.</p> <p>The audit surface illustrates this boundary: Foundation can produce canonical JSON and a SHA-256 digest, while the caller still owns the meaning of the evidence and the final accept/reject decision.</p>"},{"location":"en/examples-and-fixtures/#Published-Example-Scope","title":"Published Example Scope","text":"<p>The public example surface includes the fictional <code>profiles/public-plugin</code> Profile and the generic conformance, scaffold, licensing, adoption, and minimal-consumer fixtures listed by the workspace manifest. Any private consumer fixture or real operational evidence remains outside the public release boundary.</p> <p>For capability selection, start with the agent documentation entry. For the exact machine facts behind an example, inspect the core capability catalog and its English overlay.</p>"},{"location":"en/help/","title":"English \u00b7 Capabilities and diagnostics","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/help/#Help-and-Triage","title":"Help and Triage","text":"<p>This page provides triage paths by error code, process exit code, and symptom. Foundation's error-code system is frozen in Contracts (<code>src/error-codes.json</code>) and does not drift; mechanism failures are unified as <code>SFC2004</code> with a stable <code>details.kind</code>.</p>"},{"location":"en/help/#Triage-by-Stable-Error-Code","title":"Triage by Stable Error Code","text":"Error code Name Meaning Handling SFC1001 SCHEMA_VALIDATION_FAILED Document failed target Schema validation Check the document's required fields and type constraints SFC1002 UNKNOWN_SCHEMA_ID <code>$id</code> is not registered in the registry Confirm the <code>$id</code> spelling and Contracts version SFC1003 DUPLICATE_SCHEMA_ID Duplicate <code>$id</code> registration refused Do not re-register; reuse the existing registration SFC1004 DUPLICATE_PROTOCOL_NAME Duplicate protocol name/version refused Do not re-register a protocol SFC1005 UNRESOLVED_REF <code>$ref</code> target cannot be resolved Check the <code>$ref</code> target SFC1006 UNSUPPORTED_DIALECT Dialect is not in the supported set Use only draft-07 / 2020-12 SFC1007 UNKNOWN_CHECK_TYPE Rule uses a check type outside the nine classes Do not define custom check types SFC1008 RULE_BUDGET_EXCEEDED Mandatory rule exceeded budget/ceiling Do not exceed 20 (absolute 30) SFC1009 UNKNOWN_ERROR_CODE Referenced an unregistered error code Reference only the frozen registry SFC1010 FIXTURE_EXPECTATION_MISMATCH Fixture behavior does not match expectation Check the fixture declaration SFC1011 UNKNOWN_PROTOCOL Referenced an unregistered protocol Confirm protocol name/version SFC1012 SCHEMA_COMPILE_FAILED The Schema itself cannot be compiled Check Schema syntax SFC2002 UNKNOWN_OPERATION Operation name is not in the frozen vocabulary Use only <code>validate</code> SFC2003 INVALID_PARAMS Parameters do not satisfy the params contract Check parameters SFC2004 EXECUTION_FAILED Mechanism execution failed See <code>details.kind</code> for the sub-classification SFC3001 REPORT_DIGEST_MISMATCH Report/result digest is inconsistent with the binding Recompute model/result SFC3002 REPORT_ELEMENT_MISSING Report is missing a mandatory element Complete the report fields SFC3003 REPORT_FACT_DRIFT Report bytes deviated from deterministic re-render Re-render from machine results"},{"location":"en/help/#Triage-by-Process-Exit-Code-Engineering-Kit","title":"Triage by Process Exit Code (Engineering Kit)","text":"Exit code Meaning Handling 0 Success / no findings No handling needed 1 <code>check</code> found findings Address the findings; Kit does not auto-fix 2 Refused / usage / mechanism error Check command name, parameters, and refused flags such as <code>--fix</code>"},{"location":"en/help/#Triage-by-Symptom","title":"Triage by Symptom","text":"<ul> <li>Validation keeps reporting SFC1002: <code>$id</code> is unregistered; first confirm the Contracts version and <code>$id</code> namespace.</li> <li>Path operation reports SFC2004 + <code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>: the path escaped the contained root; confirm the root-directory boundary, and do not cram business-selection rules into Foundation.</li> <li>Atomic write reports SFC2004 + <code>atomic-write-failed</code>: the target is out of bounds or the content type is illegal; check path containment and content type.</li> <li>State storage reports <code>store-locked</code>: an old writer may still hold the lock; confirm outside Foundation that the old writer has terminated, then call <code>recoverStateStoreLock</code> with the exact owner/fencing.</li> <li>CLI host apply fails immediately: Engineering Kit's <code>adopt-plan host-apply</code>, generic apply, and remote apply remain stably refused. The package API <code>applyHostPlan</code> is limited to digest-bound local install/update for registered hosts; executing an uninstall plan returns <code>manual-recovery-required</code> without deleting files. The full Qoder driver remains unsupported.</li> <li>Peer-adapter verification fails: <code>verifyHostPeers</code> accepts only hosts and path categories proved by registered Profiles. Any peer path, closure, byte, or <code>logicalMappings</code> mismatch fails closed and does not grant install or release status.</li> <li>Document versions/commands do not match the source of truth: rely on the recomputation result of <code>scripts/docs/fact-check.mjs</code>; do not revise from memory.</li> </ul>"},{"location":"en/help/#Project-Routing","title":"Project Routing","text":"<ul> <li>Publishing remote state / npm publish \u2192 release-skill.</li> <li>Tasks / retries / rework / acceptance \u2192 loop-agent.</li> <li>Artifact relationships / version-lock \u2192 artifact-graph.</li> <li>Domain-audit semantics \u2192 independent audit consumer.</li> <li>General structure / mechanism issues \u2192 this repository's <code>docs/architecture.md</code> and <code>docs/agents/</code>.</li> </ul>"},{"location":"en/help/#Command-Quick-Reference-and-Authoritative-Facts","title":"Command Quick Reference and Authoritative Facts","text":"<p>The Engineering Kit has only four top-level commands: <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, <code>check</code>. Of these, <code>check</code> only diagnoses and does not fix; the caller handles the findings.</p> <ul> <li>Current product status (versions, package set, mirror coordinates, gates): Current Product Status (the single status page).</li> <li>Development and commit specifications: Git Lifecycle Guide.</li> </ul>"},{"location":"en/licensing/","title":"English \u00b7 Licensing","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/licensing/#Licensing-and-identity","title":"Licensing and identity","text":"<p>This page explains how Skill Family Foundation adopts its license, the distinction between identity roles, and the current status of NOTICE and third-party attribution. It is not an official translation of the Apache License 2.0; the legal text of Apache-2.0 is the root-level <code>LICENSE</code>, and in case of any ambiguity the English original prevails.</p>"},{"location":"en/licensing/#License","title":"License","text":"<ul> <li>License: <code>Apache-2.0</code> (the SPDX identifier is unchanged).</li> <li>Legal text: the root-level <code>LICENSE</code> is the full Apache License 2.0 text (authoritative in English). This page and any Chinese material only explain how the license is adopted; they do not replace or restate the legal text and do not claim equal legal effect.</li> <li>The three leaf packages distribute a copy of the root <code>LICENSE</code> with the package.</li> </ul>"},{"location":"en/licensing/#Distinction-between-identity-roles","title":"Distinction between identity roles","text":"<p>The following four identities are independent; none may be inferred from or merged with another:</p> Role Value Notes Author / copyright holder Guangzhou Fenghe Technology Co., Ltd. (\u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8) The copyright owner; written into <code>package.json</code>'s <code>author</code> and the <code>LICENSE</code> appendix attribution Repository owner (GitHub owner) <code>ifoohoo</code> The GitHub organization/account; no inference relationship with the author npm publisher The account in the current publish configuration The npm publish identity; no inference relationship with author/owner Contributor copyright line The contributors attribution in the root <code>LICENSE</code> appendix A retained historical/contributor attribution, not the project author or copyright holder <p><code>author</code>, <code>repository.owner</code>, and <code>npm publisher</code> are recorded separately; none may be derived from another.</p>"},{"location":"en/licensing/#Project-level-NOTICE","title":"Project-level NOTICE","text":"<p>FND-ADR-008 adopts Option B following the user's explicit ruling on 2026-08-10. Foundation now maintains a root <code>NOTICE</code> containing the project name, the year 2026, and the copyright holder, \u5e7f\u5dde\u5e02\u98ce\u8377\u79d1\u6280\u6709\u9650\u516c\u53f8 (Guangzhou Fenghe Technology Co., Ltd.). Starting with 0.2.1, the three public-unit mirrors, frozen snapshots, and npm tarballs must all distribute that file.</p> <p>The <code>open-source</code> Profile continues to declare <code>noticeRequired: true</code>. Engineering Kit continues to enforce the invariant between Apache-2.0 and the NOTICE requirement, and <code>checkIdentityDrift</code> continues to report <code>notice-missing</code> when the file is absent. This closure changes only Foundation's publish members; it does not alter the Kit's behavior for other consumers.</p> <p>Under Section 4(d) of the Apache License 2.0 in the root <code>LICENSE</code>, NOTICE content is informational and attributional; it does not modify the terms of the Apache License 2.0.</p>"},{"location":"en/licensing/#Third-party-attribution-THIRD_PARTY_NOTICES","title":"Third-party attribution (THIRD_PARTY_NOTICES)","text":"<p>The Engineering Kit public unit distributes MkDocs Material, lunr, and lunr-languages assets and already includes <code>packages/skill-family-engineering-kit/THIRD_PARTY_NOTICES</code> with the corresponding third-party license material. Third-party attribution remains covered by <code>THIRD_PARTY_NOTICES</code> and the corresponding license closure; the project-level <code>NOTICE</code> must not replace them. The <code>NOTICE</code> carries only Foundation's own project attribution and does not copy full third-party license texts.</p>"},{"location":"en/licensing/#License-boundary-between-the-private-workspace-and-public-mirrors","title":"License boundary between the private workspace and public mirrors","text":"<ul> <li>This workspace is permanently private and is the single source of development truth; the workspace itself never enters the public boundary.</li> <li>The public boundary consists only of three versioned publish mirrors and npm tarballs; they distribute the root <code>LICENSE</code> (Apache-2.0) and <code>NOTICE</code>. Engineering Kit additionally distributes <code>THIRD_PARTY_NOTICES</code> and the corresponding third-party license material.</li> <li>Profiles, fixtures, internal docs, and run evidence inside the private workspace do not enter the public packages; public docs only consume artifacts mechanically verified by the allowlist and release contract.</li> <li>Publish state and all remote writes belong to release-skill; this page does not duplicate live publish state.</li> </ul>"},{"location":"en/quickstart/","title":"English \u00b7 Quickstart","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/quickstart/#Quickstart","title":"Quickstart","text":"<p>This page gives ordinary developers three executable journeys: discovering capabilities and generating a new project, adopting an existing project, and querying one requirement during daily work. Each journey includes exact commands; architecture routing and API details live in the linked references.</p>"},{"location":"en/quickstart/#Shared-Installation-Prerequisite","title":"Shared Installation Prerequisite","text":"<p>For local candidate validation, build the three <code>0.14.0</code> tarballs from the Foundation workspace and install them into a temporary consumer. Run these commands from the Foundation workspace root:</p> <pre><code>pack_dir=\"$(mktemp -d)\"\n(cd packages/skill-family-contracts &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-harness-node &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\n(cd packages/skill-family-engineering-kit &amp;&amp; pnpm pack --pack-destination \"$pack_dir\")\nmkdir \"$pack_dir/consumer\" &amp;&amp; (cd \"$pack_dir/consumer\" &amp;&amp; npm init -y)\n(cd \"$pack_dir/consumer\" &amp;&amp; npm install \"$pack_dir/skill-family-contracts-0.14.0.tgz\" \"$pack_dir/skill-family-harness-node-0.14.0.tgz\" \"$pack_dir/skill-family-engineering-kit-0.14.0.tgz\")\n</code></pre> <p>After publication, install the exact coordinate <code>skill-family-engineering-kit@0.14.0</code>, then run the <code>npm exec</code> commands below.</p>"},{"location":"en/quickstart/#New-Project-Discover-Capabilities-and-Generate-a-Skeleton","title":"New Project: Discover Capabilities and Generate a Skeleton","text":"<p>Start by evaluating the project's uses, then select stable capabilities explicitly. <code>--list-capabilities</code> is read-only; the <code>--uses</code> file should contain problems, constraints, retained guarantees, and optional filters, never credentials or private business data.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --all --scope all --locale en --uses ./uses.json\nnpm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project --capability foundation.contracts.object-validation --capability foundation.harness.atomic-write\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p><code>supportedMatches</code> is candidate discovery only, and <code>needsDecision</code> means that the project still has to confirm the use. The command does not write a Profile or claim adoption. A successful <code>scaffold</code> means that the skeleton and contract-test wiring were written; the adapter, domain guarantee, and consumer tests remain to be completed.</p>"},{"location":"en/quickstart/#Existing-Project-Adopt-and-Complete-Migration","title":"Existing Project: Adopt and Complete Migration","text":"<p>Run read-only <code>adopt-plan</code> first, then record uses and one of the four decision dispositions in the migration manifest. Only <code>direct-adoption</code> and <code>compatibility-layer</code> may target a Foundation capability; <code>keep-business</code> and <code>foundation-gap</code> stay with the consumer.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale en --uses ./uses.json\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> writes no files and does not migrate automatically. Migration state <code>complete</code> means that the Profile, managed files, legacy exit, checks, and four evidence classes are all satisfied; it does not mean contract integration is complete. The consumer's adapter tests and domain gate must state that conclusion.</p>"},{"location":"en/quickstart/#Daily-Work-Query-One-Requirement","title":"Daily Work: Query One Requirement","text":"<p>When the capability ID is unknown, use a deterministic substring query in the intended language. An empty result is <code>no-text-match</code>; a result containing only unsupported capabilities is <code>boundary-found</code>. Neither result creates a <code>foundation-gap</code> decision.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --list-capabilities --locale en --filter \"must not leave a partial file when a write fails\"\n</code></pre> <p>To establish real-host qualification, provide a complete request, bindings, and <code>--native</code> to the explicit qualification sub-action:</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p>The real qualification claim comes only from one explicit, bounded host execution. Candidate discovery, migration <code>complete</code>, and contract integration do not replace it.</p>"},{"location":"en/quickstart/#Legacy-Short-Path-Generate-a-Skeleton","title":"Legacy Short Path: Generate a Skeleton","text":"<p>If the project has already confirmed that a uses assessment is unnecessary, it can still generate a compliant skeleton directly.</p> <pre><code>npm exec -- skill-family-kit scaffold --root ./my-project --project-id my-project\nnpm exec -- skill-family-kit check --root ./my-project\n</code></pre> <p>The commands above first generate a skeleton, then run engineering diagnostics on the generated result. <code>scaffold</code> writes only to an empty target directory; a non-empty or conflicting target is refused and not touched; <code>check</code> diagnoses only, it does not fix. Verification passes when <code>check</code> exits with code 0.</p>"},{"location":"en/quickstart/#Existing-Project-Read-Only-Inventory-Compatibility-Entry","title":"Existing Project: Read-Only Inventory (Compatibility Entry)","text":"<p>The goal is to first see whether the existing repository can be adopted, without changing any bytes.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit check --root ./existing-repo\n</code></pre> <p><code>adopt-plan</code> outputs the current state, target Profile, exact write set, conflicts, and the legacy-implementation exit list, with zero change to the input repository's bytes. <code>check</code> performs read-only diagnostics only. Decide whether to perform a write after confirming the inventory results.</p>"},{"location":"en/quickstart/#Architecture-Designer-Decide-Ownership","title":"Architecture Designer: Decide Ownership","text":"<p>The goal is to determine which Foundation layer an architecture requirement should land in, or whether it should stay with the consumer.</p> <ol> <li>Read the eight-step decision order in <code>docs/agents/architecture-routing.md</code>.</li> <li>In <code>docs/agents/capability-catalog.json</code>, find the capability by <code>layer</code> and <code>intent</code>, and read its <code>entrypoints</code>, <code>sideEffects</code>, <code>failureSemantics</code>, <code>ownedByCaller</code>.</li> <li>When publishing, task lifecycle, or artifact relationships are involved, route to release-skill, loop-agent, and artifact-graph respectively.</li> </ol> <p>The hard boundary of routing: Foundation does not own remote writes, business state machines, model orchestration, or domain-audit semantics. Capabilities that fall into <code>keep-business</code> or <code>foundation-gap</code> do not forcibly expand Foundation.</p>"},{"location":"en/quickstart/#Authoritative-Facts-and-Specifications","title":"Authoritative Facts and Specifications","text":"<ul> <li>Current product status (versions, package set, mirror coordinates, gates): Current Product Status (the single status page; not duplicated here).</li> <li>Development and commit specifications: Git Lifecycle Guide.</li> </ul>"},{"location":"en/quickstart/#Path-Reference","title":"Path Reference","text":"Reader Starting point Next step New project <code>scaffold</code> <code>check</code> \u2192 integrate Profile Existing project <code>adopt-plan</code> classify (direct-adoption / compatibility-layer / keep-business / foundation-gap) \u2192 adopt Architecture designer routing decision capability catalog \u2192 real exports and tests"},{"location":"en/agents/","title":"English \u00b7 Agent entry","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/agents/#Documentation-Entry-for-Agents","title":"Documentation Entry for Agents","text":"<p>This directory is the decision entry point of Skill Family Foundation for agents (Agents). Human readers enter from the root <code>README.md</code>; agents, within a limited context, read here first, then jump to the specific capability by intent, avoiding reading all the source code end-to-end.</p> <p>Foundation does not own business semantics. It provides only three things: machine contracts (Contracts), the thin Node mechanism runtime (Harness), the four engineering-phase commands (Engineering Kit), and the horizontally-declared-difference Profile. Domain state machines, model orchestration, remote publish writes, and audit semantics all stay with the caller or other projects.</p>"},{"location":"en/agents/#Reading-Order","title":"Reading Order","text":"<p>Agents consume the following in order, without needing to read from start to finish:</p> <ol> <li><code>../../agents/capability-catalog.json</code> \u2014 the language-neutral machine-fact catalog of stable and candidate capabilities; the starting point for judging \"does this requirement belong to Foundation, in which layer, and with which entry point.\"</li> <li><code>architecture-routing.md</code> \u2014 the decision table and decision tree from architecture intent to layer/capability/entry-point/external-project.</li> <li><code>../../agents/capability-catalog.en.json</code> \u2014 English intent, use conditions, inputs, outputs, failure semantics, caller ownership, and external routing for exactly the same capability IDs.</li> <li><code>../../agents/capability-catalog.schema.json</code> \u2014 the closed structural contract for the core catalog and locale overlays.</li> <li>The root <code>README.md</code>'s Agent Quick Reference \u2014 routing only, no API duplication.</li> <li>The three packages' README Agent Quick References \u2014 down to package-level capabilities and failure boundaries.</li> <li><code>../reference/failure-and-side-effect-matrix.md</code> \u2014 read/write/spawn/Git/network/residual-state/error-code for each public entry point.</li> <li><code>../reference/api/README.md</code> \u2014 the English API route across the three packages, including key capabilities, failure rules, evidence paths, and caller-owned semantics.</li> </ol> <p>Fact priority: this documentation consumes only the machine source of truth (package.json, src/index.mjs, CLI, registry.json, profile descriptor). Versions, commands, package counts, and support states are recomputed from the source of truth, never copied from memory or old docs.</p>"},{"location":"en/agents/#Catalog-Contract","title":"Catalog Contract","text":"<p>Files under <code>docs/agents/</code> assume different responsibilities and do not duplicate each other:</p> File Role Who should change it <code>../../agents/capability-catalog.json</code> Language-neutral machine-readable capability facts; the documentation layer's sole fact surface Change when capabilities change, validated by <code>capability-catalog-check.mjs</code> <code>../../agents/capability-catalog.en.json</code> English explanation overlay for every core capability ID Change when the English intent or behavior explanation changes <code>../../agents/capability-catalog.zh-CN.json</code> Simplified Chinese explanation overlay for every core capability ID Change when the Chinese intent or behavior explanation changes <code>../../agents/capability-catalog.schema.json</code> Closed catalog and overlay structural contract Change only when structure changes <code>architecture-routing.md</code> Intent \u2192 layer/capability/entry-point/external-project decisions Change when routing adjudication changes <code>README.md</code> (this file) Agent total entry point and reading order Change when entry-point structure changes <code>../reference/api/README.md</code> and the three Chinese package detail pages Human-readable routing and signature-level expansion of catalog capabilities Change when real exports change, and sync with <code>capability-catalog-check.mjs</code> <p>The capability catalog is not a new public object of Contracts, nor a fourth registry class. It is only the documentation layer's machine facts, avoiding the README becoming a second drifting handwritten authority.</p>"},{"location":"en/agents/#Architecture-Design-Method","title":"Architecture Design Method","text":"<p>When an agent handles a Foundation-related requirement, it proceeds in the following four steps:</p> <ol> <li>Decide ownership first. Does this requirement contain domain semantics, a business state machine, or an audit oracle? If so, keep it with the consumer, connecting only business-neutral mechanisms to Foundation.</li> <li>Then decide the layer. Structure/protocol/stable error code/object Schema \u2192 Contracts; cross-skill-family reusable Node mechanism \u2192 Harness; scaffold/adopt/projection/check or concrete Profile injection \u2192 Kit/Profile.</li> <li>Check the catalog to determine the entry point. Find the capability by <code>layer</code> in the core catalog, then read the matching <code>intent</code>, <code>sideEffects</code>, <code>failureSemantics</code>, <code>ownedByCaller</code>, and <code>routeElsewhere</code> in the English overlay.</li> <li>Verify evidence before concluding. Each catalog capability carries <code>sourceRefs</code> and <code>positiveTestRefs</code>/<code>negativeTestRefs</code>; before changing a judgment, return to these sources of truth to confirm, rather than inferring from the catalog's prose.</li> </ol> <p>The hard rule of routing boundaries: Foundation does not own remote writes (\u2192 release-skill), does not own tasks/retries/rework (\u2192 loop-agent), does not own artifact relationships and context (\u2192 artifact-graph), does not own domain-audit semantics (\u2192 independent audit consumer). See the routing table in <code>architecture-routing.md</code> for details.</p> <p>For a candidate capability, <code>entrypoints</code> always lists the canonical identity. A simultaneous <code>legacyEntrypoints</code> field marks pre-0.10.0 debt that consumers migrate once. Stable promotion after that migration does not change the contract identity, although consumers must update their exact pins to obtain the newly published stable promise. Candidate capabilities introduced from 0.10.0 onward must not encode maturity in the capability ID, entrypoint, Schema <code>$id</code>, or operation.</p>"},{"location":"en/agents/#Relationship-with-Mechanical-Gates","title":"Relationship with Mechanical Gates","text":"<p>Two check scripts guard the catalog and README against drift:</p> <ul> <li><code>scripts/docs/capability-catalog-check.mjs</code> validates structure, unique IDs, existence of source/test references, unsupported boundaries, and that the Kit's four commands are not expanded.</li> <li><code>scripts/docs/agent-section-check.mjs</code> validates the fixed Agent Quick Reference sections of the root README and the three packages' READMEs, the required subheadings, and capability-ID links.</li> </ul> <p>Neither only reports shape and does not auto-edit; warnings require returning to the source of truth and human judgment.</p>"},{"location":"en/agents/architecture-routing/","title":"English \u00b7 Architecture routing","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/agents/architecture-routing/#Architecture-Routing-From-Intent-to-Layer-Capability-and-External-Project","title":"Architecture Routing: From Intent to Layer, Capability, and External Project","text":"<p>This page converges \"where should an architecture requirement land\" into a mechanically-reusable decision order and routing table. It serves new agents who, without reading the source code end-to-end, quickly obtain a verifiable answer: does this requirement belong to Foundation, in which layer (Contracts/Harness/Kit/Profile), with which stable entry point, what semantics remain owned by the caller, and when should it be handed off to an external project.</p>"},{"location":"en/agents/architecture-routing/#Decision-Order","title":"Decision Order","text":"<p>Judge in order by number, stopping at the first match:</p> <ol> <li>Does it contain domain semantics, a business state machine, or an audit oracle? If yes, keep it with the consumer; Foundation connects only business-neutral mechanisms.</li> <li>Is it structure, a protocol, a stable error code, or an object Schema? \u2192 Contracts (contract authority).</li> <li>Is it a cross-skill-family reusable Node mechanism? \u2192 Harness (Node implementation of the Contracts mechanism protocol).</li> <li>Is it the engineering-phase scaffold/adopt-plan/projection/check, or a concrete host Profile injection? \u2192 Kit / Profile.</li> <li>Does it involve publishing remote state? \u2192 release-skill.</li> <li>Does it involve tasks, retries, rework, acceptance, or self-iteration? \u2192 loop-agent.</li> <li>Does it involve artifact relationships, context, packet, or version-lock? \u2192 artifact-graph.</li> <li>Does it have only one consumer, or has cross-two-real-consumer duplication not been proven? Keep it with the consumer by default; do not expand Foundation.</li> </ol> <p>Step 8 is the expansion gate. Any new component must justify: deleting it would force two or more real consumers to re-implement it, and this is verified by an independent fixture. Otherwise keep it on the consumer side.</p>"},{"location":"en/agents/architecture-routing/#Routing-Table","title":"Routing Table","text":"<p>The table below gives the preferred capability and the forbidden misuse for common architecture intents. Each preferred capability can be looked up in <code>capability-catalog.json</code> by id for its entry points, side effects, and failure semantics.</p> Architecture intent Preferred capability Forbidden misuse Validate a Foundation contract object Contracts / Harness validation (<code>foundation.contracts.object-validation</code>, <code>foundation.harness.contract-validation</code>) Do not replace the consumer's business Schema Safe file access and atomic write Harness path / atomic API (<code>foundation.harness.path-containment</code>, <code>foundation.harness.atomic-write</code>) Do not put file-selection business rules into Harness Generate a deterministic human report Harness report or Kit report sub-action (<code>foundation.harness.report</code>, <code>foundation.kit.report</code>) Do not freely author reports from open business outputs Durable events and derived snapshot Harness state-store (<code>foundation.harness.state-store</code>) Do not define a workflow state machine in Foundation New-project skeleton Kit scaffold (<code>foundation.kit.scaffold</code>) Do not overwrite a non-empty existing repository Existing-repository adoption inventory Kit adopt-plan (<code>foundation.kit.adopt-plan</code>) Do not write files, do not auto-migrate Managed projection Kit projection + Profile (<code>foundation.kit.projection</code>) Do not overwrite handwritten files Engineering diagnostics Kit check (<code>foundation.kit.check</code>) Do not auto-fix Publishing release-skill Foundation does not own remote writes Tasks/retries/rework loop-agent Foundation does not own a business state machine Artifact relationships/version-lock artifact-graph Foundation does not own the artifact graph"},{"location":"en/agents/architecture-routing/#Layer-Location-Quick-Reference","title":"Layer-Location Quick Reference","text":"<p>The dependency direction is fixed as Contracts \u2192 Harness \u2192 Engineering Kit; Profile declares horizontally, and the public core does not depend in reverse on a concrete Profile.</p> <ul> <li>Contracts: structure, protocols, error codes, protocol-name registry; 18 top-level object kinds, 9 mandatory rules.</li> <li>Harness: the thin Node mechanism runtime of Contracts; implements only business-neutral mechanisms, owning no semantics.</li> <li>Engineering Kit: the four engineering commands (scaffold, adopt-plan, projection, check) and their read-only / restricted-write boundaries.</li> <li>Profile: the declarative SPI for host and project-shape differences; implements only the stable SPI, injecting no business semantics.</li> <li>External projects: release-skill (publishing), loop-agent (task lifecycle), artifact-graph (artifact relationships), independent audit consumer (domain semantics).</li> </ul>"},{"location":"en/agents/architecture-routing/#Typical-Misrouting-and-Correction","title":"Typical Misrouting and Correction","text":"<ul> <li>Misrouting a domain Schema to Foundation: the domain Schema is owned by the consumer; Foundation provides only a generic validation mechanism (<code>foundation.contracts.object-validation</code>).</li> <li>Misrouting a workflow state machine to Foundation: state-store provides only the event-log and snapshot substrate; reducer transitions and terminal states are owned by the caller (<code>foundation.unsupported.business-state-machine</code>).</li> <li>Misrouting a publish write to Foundation: remote writes belong to release-skill; Foundation contains no publish/remote-write entry point (<code>foundation.unsupported.remote-publish</code>).</li> <li>Misrouting an audit oracle to Foundation: the audit surface only performs deterministic serialization; domain conclusions belong to external review (<code>foundation.unsupported.domain-audit-semantics</code>).</li> </ul> <p>The honest boundary of routing judgment: structural checks only prove byte/structural consistency (provable in-repo); ordinary prose semantics and the final accept/reject conclusion belong to external independent review; no second gate is maintained within the target repository.</p>"},{"location":"en/migration/","title":"English \u00b7 Migration","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/migration/#Existing-Repository-Adoption-and-Migration-FND-070","title":"Existing-Repository Adoption and Migration (FND-070)","text":"<p>This page describes how an existing project adopts the Skill Family infrastructure, and the gate for judging migration completion. It serves two reader types: a human owner uses it to judge the adoption path and risks; an agent uses it to run a read-only inventory via <code>adopt-plan</code>, without duplicating write actions on this page.</p> <p>Foundation 0.14.0 records four different conclusions. A capability-catalog query discovers candidates; migration state <code>complete</code> proves only the migration loop; contract integration is stated by the consumer's adapter tests and domain gate; real-host qualification is proved only by an explicit <code>check qualification --native</code> execution. One conclusion cannot substitute for another.</p>"},{"location":"en/migration/#0140-Shortest-Entry","title":"0.14.0 Shortest Entry","text":"<p>Declare uses in the migration manifest, then inspect candidates with the same use matrix. <code>adopt-plan</code> remains read-only and never creates a decision or changes the Profile automatically.</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale en --uses ./uses.json\n</code></pre> <p>Each use must choose <code>direct-adoption</code>, <code>compatibility-layer</code>, <code>keep-business</code>, or <code>foundation-gap</code>. Only the first two require <code>targetCapability</code>; the other two retain consumer ownership or record a Foundation gap. A text match for a capability ID never creates an adoption declaration automatically.</p> <p>After migration, the consumer still verifies contract wiring and domain guarantees. For a real host, run the explicit command only when that evidence is required:</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p>The caller supplies the <code>--request</code> and <code>--bindings</code> JSON files. The command preflights exact versions, catalog capability metadata, and complete parameters before touching a host. Missing evidence, a skipped execution, or an indeterminate terminal state cannot produce <code>real-host-qualified</code>.</p>"},{"location":"en/migration/#Classification-Method","title":"Classification Method","text":"<p>Before an existing repository connects to Foundation, classify it into one of the four categories below. The classification determines which path to take, whether files are written, and how the legacy implementation is handled.</p> Category Meaning Handling path Writes files? <code>direct-adoption</code> The repository already has a capability that can be replaced by Foundation as-is, with no business-semantic coupling Direct adoption: <code>adopt-plan</code> inventory \u2192 <code>scaffold</code>/<code>projection</code> writes to disk Yes (contained) <code>compatibility-layer</code> The repository's existing implementation differs from the Foundation interface and needs a compatibility adaptation layer Write a compatibility layer, then adopt; the legacy implementation exits via the compatibility layer Yes (compatibility layer contained) <code>keep-business</code> The capability contains domain semantics or a business state machine, belongs to the caller, and Foundation does not take it Keep with the consumer; connect only business-neutral mechanisms No (on the Foundation side) <code>foundation-gap</code> A needed capability is not yet provided by Foundation (e.g., host apply, Qoder driver) Keep with the consumer or a later version; do not forcibly expand Foundation No <p>Classification is a prerequisite for the adoption decision. Capabilities that fall into <code>keep-business</code> or <code>foundation-gap</code> should not be stuffed into Foundation just to \"complete adoption\"; this is exactly the concrete instantiation of architecture-routing steps 1 and 8.</p>"},{"location":"en/migration/#Principles","title":"Principles","text":"<ol> <li>Plan first: any existing repository first runs the read-only <code>adopt-plan</code>, obtaining the current state, target Profile, exact write set, conflicts, legacy-implementation exit list, and acceptance commands, before deciding whether to perform a write.</li> <li>Read-only plan, zero change: <code>adopt-plan</code> writes no files (including temporary files), runs no git write commands, renames nothing, and touches no remotes; zero change to the input repository's bytes (provable by before/after hash walk-through).</li> <li>Adoption and rename are separate: infrastructure adoption never drags along a repository rename or remote-coordinate change; the two are independent decisions, and the tool provides no rename capability.</li> <li>Dual-track does not count as complete: the migration-completion judgment requires the legacy duplicate implementation to have been deleted; connecting the new infrastructure while the legacy implementation still remains is permanently judged false.</li> </ol>"},{"location":"en/migration/#adopt-plan-Output-Structure","title":"adopt-plan Output Structure","text":"Section Content <code>target</code> Current state: entry-point count, target's own managed declarations <code>project</code> / <code>traceability</code> Target Profile and the source of truth for each write (Contracts version, skeleton generation function, license Profile and variant) <code>git</code> Read-only Git pre-state (repository, HEAD, clean) <code>writeSet</code> Exact write set: per-path action (only <code>create</code>/<code>unchanged</code>), fileClass, sha256 <code>conflicts</code> Handwritten conflicts, managed drift, symlink placeholders, temporary exceptions for missing fields <code>risks</code> dirty, nested repository, tracked-but-ignored, expired exceptions, etc. <code>migration</code> Migration state machine: binding, on-disk proof (adoptionProof), pending-write count, check gate, four-class verification evidence, state and completion judgment <code>verificationPlan</code> Acceptance command sequence (check \u2192 projection \u2192 re-check)"},{"location":"en/migration/#Migration-Manifest-skill-familymigrationjson","title":"Migration Manifest (skill-family.migration.json)","text":"<p>The target repository declares its own migration state in the root directory:</p> <pre><code>{\n \"schemaVersion\": 1,\n \"kind\": \"skill-family.migration-manifest\",\n \"manifestVersion\": 4,\n \"capabilityUseContext\": { \"scope\": \"harness\", \"locale\": \"en\" },\n \"capabilityUses\": [\n {\n \"useId\": \"safe-output-write\",\n \"problemStatement\": \"Write output without leaving a partial file\",\n \"constraints\": [\"Tests must not write a real project directory\"],\n \"retainedGuarantees\": [\"The consumer still chooses the output artifact\"],\n \"catalogFilters\": [\"atomic write\"]\n }\n ],\n \"capabilityDecisions\": [\n {\n \"useId\": \"safe-output-write\",\n \"disposition\": \"direct-adoption\",\n \"targetCapability\": \"foundation.harness.atomic-write\",\n \"reason\": \"The neutral atomic-write mechanism covers the need while artifact selection remains consumer-owned\"\n }\n ],\n \"legacyInfra\": [\n {\n \"path\": \"scripts/old-validator.mjs\",\n \"replacedBy\": null,\n \"useId\": \"safe-output-write\",\n \"recoveryRef\": \"docs/recovery/old-validator.md\"\n }\n ],\n \"legacyReferences\": [\n {\n \"path\": \"src/index.mjs\",\n \"text\": \"legacyWrite()\",\n \"replacedBy\": \"foundation.harness.atomic-write\",\n \"useId\": \"safe-output-write\"\n }\n ],\n \"exceptions\": []\n}\n</code></pre> <p>This example matches the machine fixture <code>positive-04-capability-adoption.json</code>: <code>replacedBy: null</code> means the legacy implementation has not exited, and <code>recoveryRef</code> records the recovery guidance; the tool only read-only evaluates existence and never deletes on its behalf.</p> <p>The Quickstart Profile candidate moves to v2 in 0.3.0. A migration manifest that binds candidate capabilities must pin all three Foundation packages to exactly 0.3.0; an existing integration that still requires v1 must keep all three packages pinned to exactly 0.2.1 and must not mix the two sets.</p> <ul> <li><code>legacyInfra</code>: each entry gives the legacy-implementation path and its replacement; the tool only read-only evaluates existence and never deletes on its behalf.</li> <li><code>exceptions</code> are temporary exceptions: must simultaneously contain all four fields \u2014 owner, reason, deadline, and migrationTarget \u2014 and missing any field counts as a conflict (plan failure); expired exceptions are not auto-renewed and persistently block the completion judgment.</li> <li><code>targetProfile</code> / <code>foundationPackages</code>: adoption binding. The target Profile must be consistent with the plan Profile; the three Foundation packages (contracts, harness-node, engineering-kit) must each bind an exact version number (floating ranges not accepted) and a <code>sha256:</code> digest.</li> <li><code>verification</code>: paths to the four classes of verification-evidence documents (unit, integration, consumer, independentAudit). Each piece of evidence must be parseable JSON whose <code>projectId</code> matches the target project's identity to count as proven; out-of-bounds paths, missing, unparseable, or identity-mismatched evidence are all unproven, fail-closed.</li> </ul>"},{"location":"en/migration/#Migration-State-Machine","title":"Migration State Machine","text":"<p>States advance monotonically and are derived only from read-only evidence; no tool advances state by writing.</p> <pre><code>not-declared \u2192 declared \u2192 adopted \u2192 verified \u2192 complete\n</code></pre> State Meaning <code>not-declared</code> No contract-valid migration manifest exists <code>declared</code> The manifest contract is valid, but the adoption-proof facts are incomplete <code>adopted</code> Foundation bytes are on disk and the legacy implementation has exited, but the check gate is not green <code>verified</code> The check gate is green, but not all verification evidence is proven <code>complete</code> All eight completion conditions are satisfied; <code>complete</code> is true if and only if the state is <code>complete</code>"},{"location":"en/migration/#Completion-Gate","title":"Completion Gate","text":"<p><code>migration.completion.complete</code> is true if and only if all eight hold:</p> <ol> <li>A contract-valid migration manifest has been declared (kind/fields validated by the Contracts schema);</li> <li>The adoption binding is proven: the target Profile is consistent with the plan, and the three Foundation packages each bind an exact version and a sha256 digest;</li> <li>The Project Manifest, managed lock, identity, and all managed skeleton files are on disk and their digests are consistent with the plan (<code>adoptionProof.missing</code>/<code>mismatched</code> are empty);</li> <li>The write set has no pending create/replace/project actions (<code>pendingWrites</code> is 0);</li> <li>The Foundation check gate is green;</li> <li>Each legacy implementation has exited (absent) \u2014 containment refusal or malformed entries fail-closed identically to present;</li> <li>No missing fields, no unparseable deadline, no expired temporary exceptions; no unresolved adoption conflicts;</li> <li>All four classes of verification evidence (unit/integration/consumer/independentAudit) are proven and identity (projectId) matches.</li> </ol> <p>An unevaluated input is equivalent to unproven: the gate advances only on presented evidence. The blocking reason (<code>blockers</code>) is a stable, readable string that can go directly into the migration review record.</p>"},{"location":"en/migration/#Mandatory-Negative-Cases-completion-must-be-false-in-any-scenario","title":"Mandatory Negative Cases (completion must be false in any scenario)","text":"<ul> <li>Empty repository + empty manifest (no contract-valid manifest \u2192 <code>not-declared</code>);</li> <li>Manifest with wrong kind (schema-invalid \u2192 treated as undeclared);</li> <li>9 skeleton files still pending create (<code>declared</code>, all missing paths listed);</li> <li>Managed lock drift (<code>mismatched</code> non-empty);</li> <li>Only the new implementation connected, legacy still present (dual-track \u2192 <code>declared</code>);</li> <li>Consumer verification evidence missing or identity mismatched (<code>verified</code>, must not complete);</li> <li>Temporary exception expired (the tool never renews).</li> </ul>"},{"location":"en/migration/#Legacy-Removal-and-Rollback-Contract","title":"Legacy-Removal and Rollback Contract","text":"<ul> <li>Removal is the caller's responsibility: <code>adopt-plan</code> only evaluates legacy-implementation existence and lists the exit manifest, never deleting on its behalf; <code>foundation-gap</code> and <code>keep-business</code> capabilities do not require removal.</li> <li>Rollback relies on evidence: 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> <li>fail-closed default: any unparseable, out-of-bounds, identity-mismatched, or evidence-missing input makes the corresponding judgment unproven; success is not assumed.</li> </ul>"},{"location":"en/migration/#Profile-Draft","title":"Profile Draft","text":"<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 v3) \u2014 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> <p>The draft pre-fills everything mechanically derivable from read-only facts:</p> <ul> <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> <li>The adoption declaration (D-8 minimal field set, authoritative definition in <code>adoptionDeclaration</code> of <code>profiles/spi/extension-spi.json</code>):</li> <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> <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> <li><code>adopted_at</code> is fixed at adoption time, never at planning time, and stays null.</li> <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> </ul>"},{"location":"en/migration/#Incompleteness-Blocking-Rules","title":"Incompleteness Blocking Rules","text":"<ul> <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> <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> </ul>"},{"location":"en/migration/#Binding","title":"Binding","text":"<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>"},{"location":"en/migration/#Boundary","title":"Boundary","text":"<ul> <li><code>adopt-plan</code> is strictly read-only: the draft is only printed with the plan to stdout, never written into the consumer repository;</li> <li>No fifth Kit top-level command is added: Kit top-level commands are permanently the four \u2014 scaffold, adopt-plan, projection, check \u2014 and <code>profileDraft</code> is only a sub-block of <code>adopt-plan</code> output.</li> </ul>"},{"location":"en/migration/#Hazard-Class-Fixtures","title":"Hazard-Class Fixtures","text":"<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>"},{"location":"en/recipes/","title":"English \u00b7 Recipes","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/#Recipe-Index","title":"Recipe Index","text":"<p>This directory provides the minimal, copy-paste-runnable approach for common architecture requirements. Each recipe follows a fixed nine-section structure: scenario and non-scenario, architecture choice and capability ID, preconditions and trust boundary, minimal code or command, expected output and evidence, safety/failure negative case, copy-paste verification command, business logic the caller continues to own, and upgrade/rollback notes.</p>"},{"location":"en/recipes/#Selection-Rules","title":"Selection Rules","text":"<ul> <li>Requirement contains domain semantics / state machine / audit oracle \u2192 keep with the consumer; do not look for a Foundation capability here.</li> <li>Need structure or protocol validation \u2192 see <code>domain-schema-validation</code>.</li> <li>Need safe file access or atomic write \u2192 see <code>safe-filesystem-and-atomic-write</code>.</li> <li>Need a deterministic human report \u2192 see <code>deterministic-human-report</code>.</li> <li>Need durable events and derived snapshots \u2192 see <code>durable-local-state</code>.</li> <li>Need an existing-repository adoption inventory \u2192 see <code>adopt-existing-repository</code>.</li> <li>Need a text-resource closure or host access \u2192 see <code>adapter-text-closure</code> / <code>host-profile-integration</code>.</li> <li>Need to trial Quickstart Profile v2 \u2192 pin the 0.3.0 candidate subpaths of all three packages exactly; remain on exactly 0.2.1 when v1 is still required.</li> </ul>"},{"location":"en/recipes/#Common-Verification-Conventions","title":"Common Verification Conventions","text":"<ul> <li>All examples run in a new system temp directory, leaving no personal paths or credentials.</li> <li>Examples contain no enterprise identifiers, private Profiles, real business data, or personal paths.</li> <li>Each recipe gives at least one positive case and one negative case; the negative case must produce a stable failure code or refusal.</li> <li>Verification commands can be copied and run directly; when a package is needed, first <code>npm install</code> the corresponding <code>@0.3.0</code>.</li> </ul>"},{"location":"en/recipes/#Capability-ID-Overview","title":"Capability ID Overview","text":"Recipe Preferred capability ID adopt-existing-repository <code>foundation.kit.adopt-plan</code> safe-filesystem-and-atomic-write <code>foundation.harness.path-containment</code>, <code>foundation.harness.atomic-write</code> domain-schema-validation <code>foundation.contracts.object-validation</code> adapter-text-closure <code>foundation.harness.resource-closure</code>, <code>foundation.harness.host-adapter</code> deterministic-human-report <code>foundation.harness.report</code>, <code>foundation.kit.report</code> durable-local-state <code>foundation.harness.state-store</code> host-profile-integration <code>foundation.kit.host</code>, <code>foundation.profile.extension-spi</code>"},{"location":"en/recipes/adapter-text-closure/","title":"English \u00b7 Adapter text closure","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/adapter-text-closure/#Recipe-Text-Resource-Closure-and-Host-Build","title":"Recipe: Text Resource Closure and Host Build","text":""},{"location":"en/recipes/adapter-text-closure/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to normalize a set of text resources into a recomputable closure, and based on it materialize a host-adapter build at a contained location, with the build manifest fully digest-verifiable.</p> <p>Not applicable: needs to include binary resources in the adapter projection (text closure only); needs Kit CLI apply, generic or remote apply, or automatic deleting uninstall.</p>"},{"location":"en/recipes/adapter-text-closure/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.harness.resource-closure</code> (deterministic closure and sha256 digest) and <code>foundation.harness.host-adapter</code> (adapter source closure / build / manifest verification / materialize / read-only peer verification through <code>verifyPeerAdapterDirectories</code>).</p>"},{"location":"en/recipes/adapter-text-closure/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The adapter source is a declared text closure (<code>content</code> accepts only string, utf8).</li> <li>Trust boundary: materialize uses sibling staging + a single rename, and refuses if the target already exists; probe does not spawn by default and does not walk PATH.</li> </ul>"},{"location":"en/recipes/adapter-text-closure/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import {\n computeResourceClosure,\n buildAdapterClosure,\n verifyAdapterBuildManifest,\n materializeAdapterBuild,\n} from \"skill-family-harness-node\";\n\nconst closure = computeResourceClosure([\n { path: \"skill.json\", content: \"{}\" },\n { path: \"readme.md\", content: \"# demo\" },\n]);\nconst built = buildAdapterClosure(closure);\nverifyAdapterBuildManifest(built.manifest); // fully digest-verifiable\nawait materializeAdapterBuild(built, { outDir: \"./out\" }); // contained write to disk\n</code></pre> <p>The code above shows the order of first computing the closure, then verifying the manifest, then atomically materializing.</p>"},{"location":"en/recipes/adapter-text-closure/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>computeResourceClosure</code> returns a deterministic closure object and a sha256 digest; <code>materializeAdapterBuild</code> writes the artifact at the contained target. Evidence: <code>packages/skill-family-harness-node/test/closure.test.mjs</code> and <code>test/host.test.mjs</code>.</p>"},{"location":"en/recipes/adapter-text-closure/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: binary content unsupported -&gt; verification/build refusal\nbuildAdapterClosure({ path: \"x.bin\", content: Buffer.from([0, 1, 2]) });\n// throws HarnessError: adapter source content supports string (utf8) only\n</code></pre> <p>A manifest-digest mismatch, an already-existing target, or a non-trusted executable file also throw.</p>"},{"location":"en/recipes/adapter-text-closure/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/closure.test.mjs \\\n packages/skill-family-harness-node/test/host.test.mjs\n</code></pre>"},{"location":"en/recipes/adapter-text-closure/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>The host's concrete business semantics.</li> <li>Host-difference declarations are injected via Profile + Kit host sub-action.</li> </ul>"},{"location":"en/recipes/adapter-text-closure/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>Harness owns only build and read-only peer verification. The Kit package API <code>applyHostPlan</code> supports registered, digest-bound local install/update; executing an uninstall plan does not delete files. Kit CLI apply, generic apply, and remote apply remain stably refused, and the full Qoder driver is unsupported.</li> <li><code>verifyPeerAdapterDirectories</code> proves only that peer directories have matching closures, bytes, and <code>logicalMappings</code>; it derives no install, release, or domain state.</li> <li>materialize is an atomic sibling + rename, and on failure does not affect the existing target; upgrade follows the <code>skill-family-harness-node</code> version.</li> </ul>"},{"location":"en/recipes/adopt-existing-repository/","title":"English \u00b7 Adopt an existing repository","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/adopt-existing-repository/#Recipe-Existing-Repository-Read-Only-Adoption-Inventory","title":"Recipe: Existing-Repository Read-Only Adoption Inventory","text":""},{"location":"en/recipes/adopt-existing-repository/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to judge whether an existing repository can adopt Foundation, and obtain the exact write set, conflicts, and legacy-implementation exit list, without changing any bytes.</p> <p>Not applicable: needs to auto-rewrite the existing repository (writing files is forbidden, auto-migration is forbidden); needs to publish to a remote (\u2192 release-skill).</p>"},{"location":"en/recipes/adopt-existing-repository/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capability: <code>foundation.kit.adopt-plan</code> (strictly read-only inventory and completion judgment). It only outputs, writes no files, runs no git write commands.</p>"},{"location":"en/recipes/adopt-existing-repository/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The target repository exists and is read-only accessible.</li> <li>Trust boundary: <code>adopt-plan</code> makes zero byte changes to the input repository; legacy-implementation deletion is the caller's responsibility, and the tool never deletes on its behalf.</li> </ul>"},{"location":"en/recipes/adopt-existing-repository/#4-Minimal-Command","title":"4. Minimal Command","text":"<pre><code>npm install --save-dev skill-family-engineering-kit@0.3.0\nnpm exec -- skill-family-kit adopt-plan --root &lt;repo&gt;\n</code></pre>"},{"location":"en/recipes/adopt-existing-repository/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p>The output includes the current state (<code>target</code>), target Profile and traceability (<code>project</code>/<code>traceability</code>), read-only Git pre-state (<code>git</code>), exact write set (<code>writeSet</code>), conflicts (<code>conflicts</code>), risks (<code>risks</code>), migration state machine (<code>migration</code>), and acceptance command sequence (<code>verificationPlan</code>). Evidence from <code>packages/skill-family-engineering-kit/test/adopt-plan.test.mjs</code> and <code>test/migration.test.mjs</code>.</p>"},{"location":"en/recipes/adopt-existing-repository/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<p>Before and after running <code>adopt-plan</code> on a dirty repository, the input repository's bytes must be exactly identical (provable by hash walk-through); the tool writes no temp files and touches no remote. If the migration manifest is missing a required <code>exceptions</code> field, the plan fails directly (completion false), and the tool does not renew.</p>"},{"location":"en/recipes/adopt-existing-repository/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code># Positive case: read-only inventory of a public fixture existing-repository\nnpm exec -- skill-family-kit adopt-plan --root fixtures/m0-consumer\n\n# Read-only diagnostics, no fix\nnpm exec -- skill-family-kit check --root fixtures/m0-consumer\n</code></pre>"},{"location":"en/recipes/adopt-existing-repository/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Whether the legacy implementation exits, and when to delete it (the tool only evaluates existence and lists the exit manifest).</li> <li><code>business-logic-to-keep</code> and <code>legacy-removal-recovery</code> are always INCOMPLETE and must be provided by a human owner.</li> </ul>"},{"location":"en/recipes/adopt-existing-repository/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li><code>adopt-plan</code> is read-only, has no write risk, and needs no rollback.</li> <li>Actual disk writes are performed by <code>scaffold</code>/<code>projection</code>; rollback relies on the dual-digest binding of <code>adoptionProof</code> and <code>foundationPlanDigest</code>; an overwrite action that does not declare the <code>expect.sha256</code> pre-state is refused at the <code>projection</code> stage.</li> <li>When adopting the Quickstart Profile candidate, pin all three packages to one profile: 0.3.0 for v2 or 0.2.1 for v1. Do not mix them.</li> </ul>"},{"location":"en/recipes/deterministic-human-report/","title":"English \u00b7 Deterministic human report","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/deterministic-human-report/#Recipe-Deterministic-Human-Report","title":"Recipe: Deterministic Human Report","text":""},{"location":"en/recipes/deterministic-human-report/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to deterministically render machine results into a human-readable report (Markdown + digest binding + graded checks), writing the paired dual outputs as a group and refusing path aliases and input overwrites.</p> <p>Not applicable: needs to freely author a report from open business outputs (forbidden); needs model invocation or business orchestration.</p>"},{"location":"en/recipes/deterministic-human-report/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.harness.report</code> (validate \u2192 render \u2192 bind \u2192 check, pure functions) and <code>foundation.kit.report</code> (CLI sub-action orchestrating rendering and grading).</p>"},{"location":"en/recipes/deterministic-human-report/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>A Contracts-validated report-model and operation-result already exist.</li> <li>Trust boundary: deterministic Markdown escaping; a three-digest binding of model/result/report; the caller must first construct a valid model, and Kit does not derive facts from business outputs.</li> </ul>"},{"location":"en/recipes/deterministic-human-report/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import {\n validateReportModel,\n renderReportMarkdown,\n buildBinding,\n checkReport,\n} from \"skill-family-harness-node\";\n\nvalidateReportModel(model);\nconst markdown = renderReportMarkdown(model, { locale: \"zh-CN\" });\nconst binding = buildBinding(model, result, markdown);\nconst graded = checkReport(model, result, markdown, binding); // graded check findings\n</code></pre> <p>The code above shows the four-step order of model validation, rendering, binding, and graded check.</p>"},{"location":"en/recipes/deterministic-human-report/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>renderReportMarkdown</code> returns deterministic Markdown; <code>buildBinding</code> produces the three-digest binding; <code>checkReport</code> returns graded check findings. Evidence: <code>packages/skill-family-harness-node/test/report.test.mjs</code> and <code>packages/skill-family-engineering-kit/test/report.test.mjs</code>.</p>"},{"location":"en/recipes/deterministic-human-report/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: report bytes deviate from deterministic re-render -&gt; SFC3003 (REPORT_FACT_DRIFT)\n// after manually editing markdown then bind/check, the digest mismatch fails\ncheckReport(model, result, tamperedMarkdown, binding);\n// throws HarnessError, errorCode = \"SFC3003\"\n</code></pre> <p><code>SFC3001</code> (digest mismatch) and <code>SFC3002</code> (missing mandatory element) are likewise hard failures.</p>"},{"location":"en/recipes/deterministic-human-report/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/report.test.mjs \\\n packages/skill-family-engineering-kit/test/report.test.mjs\n</code></pre>"},{"location":"en/recipes/deterministic-human-report/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Interpretation of the report's business conclusions.</li> <li>The caller must first construct a valid report-model (Kit does not derive facts from business outputs).</li> </ul>"},{"location":"en/recipes/deterministic-human-report/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The report is deterministically rendered from machine results, not freely authored; upgrade follows the <code>skill-family-harness-node</code> and <code>skill-family-engineering-kit</code> versions.</li> <li>The paired dual outputs are written as a group, refusing path aliases and input overwrites; rollback restores from the <code>expect.sha256</code> pre-state written before the write.</li> </ul>"},{"location":"en/recipes/domain-schema-validation/","title":"English \u00b7 Domain Schema validation","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/domain-schema-validation/#Recipe-Domain-Agnostic-Contract-Object-Validation","title":"Recipe: Domain-Agnostic Contract Object Validation","text":""},{"location":"en/recipes/domain-schema-validation/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to validate whether a document conforms to a Foundation-registered contract object (e.g., project-manifest), choosing a validation strategy by dialect.</p> <p>Not applicable: needs to validate the consumer's own business Schema (the consumer should hold it itself; Foundation does not replace it); needs to mix domain-semantic validation into the generic contract.</p> <p>Quickstart Profile v2 is a separate candidate path. The consumer still owns its business schemas; Engineering Kit only compiles an explicit schema collection into offline validators selected by <code>$id</code>, and does not own the method-to-schema choice.</p>"},{"location":"en/recipes/domain-schema-validation/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capability: <code>foundation.contracts.object-validation</code> (<code>validateDocument</code> / <code>compileSchema</code> / <code>detectDialect</code>). A pure Ajv implementation, supporting draft-07 and 2020-12.</p>"},{"location":"en/recipes/domain-schema-validation/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The document to be validated carries the <code>$id</code> of a registered contract object.</li> <li>Trust boundary: <code>validateDocument</code> never modifies the caller's input; a normalized copy is returned only in the result's <code>data</code> field.</li> </ul>"},{"location":"en/recipes/domain-schema-validation/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import { validateDocument } from \"skill-family-contracts\";\n\nconst document = {\n schemaVersion: 1,\n kind: \"skill-family.project-manifest\",\n project: { id: \"my-project\", name: \"My Project\", description: \"Example\" },\n contracts: { version: \"1.0.0\", profile: \"generic\" },\n managedFiles: [\"package.json\"],\n updatedAt: \"2026-01-01T00:00:00Z\",\n};\n\nconst result = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/project-manifest.json\",\n dialect: \"2020-12\",\n});\nif (!result.valid) console.error(result.errorCode);\n</code></pre> <p>The code above shows using <code>$id</code> to specify the target Schema and retrieving <code>{ valid, errorCode, errors, data }</code>.</p>"},{"location":"en/recipes/domain-schema-validation/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p>On successful validation <code>result.valid</code> is true; on failure <code>errorCode</code> is a stable code such as <code>SFC1001</code>. Evidence: <code>packages/skill-family-contracts/test/validator.test.mjs</code> and <code>test/schemas.test.mjs</code>.</p>"},{"location":"en/recipes/domain-schema-validation/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: unknown $id -&gt; returns valid:false, errorCode = SFC1002 (UNKNOWN_SCHEMA_ID)\nconst bad = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/does-not-exist.json\",\n dialect: \"2020-12\",\n});\n// does not throw, returns a structured result:\n// { valid: false, errorCode: \"SFC1002\",\n// errors: [{ message: \"unknown schema $id: https://contracts.skill-family.example/v1/does-not-exist.json\" }] }\nif (!bad.valid) console.error(bad.errorCode); // SFC1002\n</code></pre>"},{"location":"en/recipes/domain-schema-validation/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-contracts/test/validator.test.mjs \\\n packages/skill-family-contracts/test/schemas.test.mjs\n</code></pre>"},{"location":"en/recipes/domain-schema-validation/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Semantic interpretation of specific business fields.</li> <li>Domain-level validation rules (not within the Foundation generic contract).</li> </ul>"},{"location":"en/recipes/domain-schema-validation/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The contract authority version <code>CONTRACTS_VERSION = 1.4.0</code>, and the npm package version <code>0.3.0</code> run in parallel and are not mixed.</li> <li>Error codes are frozen and do not drift; Schema changes are handled as a new contract-version task, not by modifying frozen content in place.</li> <li>Candidate v2 must be pinned to exactly 0.3.0; integrations that still require v1 must remain pinned to exactly 0.2.1.</li> </ul>"},{"location":"en/recipes/durable-local-state/","title":"English \u00b7 Durable local state","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/durable-local-state/#Recipe-Durable-Local-State-Substrate","title":"Recipe: Durable Local State Substrate","text":""},{"location":"en/recipes/durable-local-state/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to persist an event log while guaranteeing order and integrity, rebuild or verify a derived snapshot, and inspect or recover a cooperative single-writer lock.</p> <p>Not applicable: needs to define a workflow state machine in Foundation (forbidden); needs to resist same-privilege malicious processes (fencing does not promise this scenario).</p>"},{"location":"en/recipes/durable-local-state/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capability: <code>foundation.harness.state-store</code> (append-only events, hash chain, snapshot, and lock inspect/recover). Event meaning and reducer transitions are owned by the caller.</p>"},{"location":"en/recipes/durable-local-state/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li><code>STATE_GENESIS_DIGEST</code> as the chain starting point.</li> <li>Trust boundary: the event log is the sole authority, and the snapshot is a derived cache; <code>confirmOwnerTerminated</code> is an external trust anchor provided by the caller and does not promise resistance against same-privilege malicious processes.</li> </ul>"},{"location":"en/recipes/durable-local-state/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport {\n openStateStore,\n appendEvent,\n readEvents,\n writeSnapshot,\n readSnapshot,\n inspectStateStoreLock,\n recoverStateStoreLock,\n} from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-state-\"));\nconst store = openStateStore(root, { owner: \"writer-a\", expectedSchemas: [] });\nappendEvent(store, { eventType: \"demo\", payload: { n: 1 } });\nwriteSnapshot(store, readEvents(store));\nconst snap = readSnapshot(store);\nconst lock = inspectStateStoreLock(root); // { owner, fencing, ageMs, recovering }\nawait recoverStateStoreLock(root, {\n expectedOwner: lock.owner,\n expectedFencing: lock.fencing,\n confirmOwnerTerminated: true,\n});\n</code></pre> <p>The code above shows the order of opening the store, appending events, writing a snapshot, inspecting the lock, and explicitly recovering.</p>"},{"location":"en/recipes/durable-local-state/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>readEvents</code> returns the appended events, <code>readSnapshot</code> returns the derived snapshot, and <code>inspectStateStoreLock</code> returns <code>owner</code>/<code>fencing</code>/<code>ageMs</code>/<code>recovering</code>. Evidence: <code>packages/skill-family-harness-node/test/state-store.test.mjs</code> (with 34 assertions).</p>"},{"location":"en/recipes/durable-local-state/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: a second writer immediately receives store-locked\nconst other = openStateStore(root, { owner: \"writer-b\", expectedSchemas: [] });\n// throws HarnessError: details.kind = \"store-locked\"\n</code></pre> <p>A broken hash chain, a mismatched lock fencing, or recovery missing <code>confirmOwnerTerminated</code> all fail-closed.</p>"},{"location":"en/recipes/durable-local-state/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/state-store.test.mjs\n</code></pre>"},{"location":"en/recipes/durable-local-state/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Event business meaning, reducer transitions.</li> <li>The <code>confirmOwnerTerminated</code> trust anchor (confirm outside Foundation that the old writer has terminated).</li> </ul>"},{"location":"en/recipes/durable-local-state/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The state substrate provides only the mechanism; the business state machine / terminal state belongs to loop-agent.</li> <li>A crash-left lock requires external evidence-gathering before explicit recovery, with no silent lock-stealing; the system stays diagnosable as a lock-out rather than silently overwriting.</li> </ul>"},{"location":"en/recipes/host-profile-integration/","title":"English \u00b7 Host Profile integration","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/host-profile-integration/#Recipe-Host-Access-and-Profile-Injection","title":"Recipe: Host Access and Profile Injection","text":""},{"location":"en/recipes/host-profile-integration/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to describe a registered host (claude/codex), probe or plan host access, verify peer-adapter directories, or use the package API for digest-bound local install/update.</p> <p>Not applicable: needs Kit CLI apply, generic or remote apply, or automatic deleting uninstall; needs the full Qoder driver (that host is unsupported).</p>"},{"location":"en/recipes/host-profile-integration/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.kit.host</code> (<code>describeHost</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>verifyHostPeers</code> / <code>planHost</code> / <code>applyHostPlan</code>) and <code>foundation.profile.extension-spi</code> (<code>verifyProfile</code>). Host-difference declarations are in <code>foundation.profile.hosts</code>.</p>"},{"location":"en/recipes/host-profile-integration/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The host Profile is registered in <code>profiles/hosts</code>; from 0.11.0, the Kit package carries a managed projection of that closure. The only trusted drivers are <code>claude-version-v1</code> / <code>codex-version-v1</code>. Local install/update additionally require a verified build, a digest-consistent plan, a contained <code>targetRoot</code>, and an explicit <code>authorizationRef</code>.</li> <li>Trust boundary: the Profile entry point must be a JSON data resource, and the public core does not import <code>profiles/</code>; <code>coreOwned</code> is a forbidden target.</li> </ul>"},{"location":"en/recipes/host-profile-integration/#4-Minimal-Command-and-Code","title":"4. Minimal Command and Code","text":"<pre><code># Describe a registered host\nnpm exec -- skill-family-kit adopt-plan host-describe --host claude --hosts-root profiles/hosts\n\n# Read-only probe (no spawn by default)\nnpm exec -- skill-family-kit adopt-plan host-probe --host claude --hosts-root profiles/hosts\n</code></pre> <pre><code>import { bundledHostProfilesRoot, buildHostAdapter, describeHost, probeHost, planHost } from \"skill-family-engineering-kit\";\nimport { verifyProfile } from \"profiles/spi/index.mjs\";\n\nconst hostsRoot = bundledHostProfilesRoot();\nconst desc = await describeHost({ hostId: \"claude\", hostsRoot });\nconst facts = await probeHost({ hostId: \"claude\", hostsRoot, allowSpawn: false });\nconst build = await buildHostAdapter({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n input: {\n schemaVersion: 1,\n kind: \"skill-family.adapter-source\",\n skillFamilyId: \"example-family\",\n skills: [{ id: \"demo\", files: [{ path: \"SKILL.md\", content: \"# Demo\\n\" }] }],\n },\n hostsRoot,\n});\nconst plan = await planHost({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n buildManifest: build.manifest,\n probeFacts: facts.facts,\n hostsRoot,\n});\nconst spi = verifyProfile({ profileRoot: \"profiles/public-plugin\" }); // SPE0000\n</code></pre> <p>The commands explicitly select the workspace Profile root. The code resolves the canonical packaged root before describe/probe, in-memory build, and plan, then validates a Profile declaration through <code>verifyProfile</code>; none of these operations executes install/update.</p>"},{"location":"en/recipes/host-profile-integration/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>describeHost</code> returns the host description, <code>probeHost</code> returns read-only probe facts, <code>planHost</code> returns the access plan, and <code>verifyProfile</code> returns result codes such as <code>SPE0000</code>. Evidence: <code>packages/skill-family-engineering-kit/test/host.test.mjs</code> and <code>fixtures/generic-profile-extension-conformance/verify.mjs</code>.</p>"},{"location":"en/recipes/host-profile-integration/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code># Negative case: CLI apply stably refused\nnpm exec -- skill-family-kit adopt-plan host-apply --host claude --hosts-root profiles/hosts\n# exit code 2: host apply is not implemented in the read-only Phase D slice\n</code></pre> <pre><code>// Negative case: qoder is unsupported\ndescribeHost(\"qoder\"); // throws: support = \"unsupported\"\n</code></pre>"},{"location":"en/recipes/host-profile-integration/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-engineering-kit/test/host.test.mjs \\\n fixtures/generic-profile-extension-conformance/verify.mjs\n</code></pre>"},{"location":"en/recipes/host-profile-integration/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>The host's concrete business semantics.</li> <li>Business authorization and completion criteria for local install/update; manual recovery and file deletion for uninstall.</li> </ul>"},{"location":"en/recipes/host-profile-integration/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>The package API <code>applyHostPlan</code> supports registered, digest-bound local install/update. Executing an uninstall plan only returns <code>manual-recovery-required</code> and does not delete files. Kit CLI apply, generic apply, and remote apply remain stably refused.</li> <li><code>verifyHostPeers</code> only performs read-only peer-adapter directory verification; it grants no install, release, or domain decision.</li> <li><code>bundledHostProfilesRoot()</code> only exposes the managed Profile root. Host APIs still require an explicit <code>hostsRoot</code>, and callers may select another conforming Profile root.</li> <li>The full Qoder driver is unsupported; only its structure is referenced, and it is not claimed to have been run on Qoder; adding a supported host on upgrade requires registering a descriptor and binding a trusted driver.</li> </ul>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/","title":"English \u00b7 Safe filesystem and atomic write","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#Recipe-Safe-File-Access-and-Atomic-Write","title":"Recipe: Safe File Access and Atomic Write","text":""},{"location":"en/recipes/safe-filesystem-and-atomic-write/#1-Scenario-and-Non-Scenario","title":"1. Scenario and Non-Scenario","text":"<p>Applicable: you need to constrain, within Node, an externally-provided path to within some root directory, and atomically write an ordinary file to a contained path, rolling back on failure without leaving residue.</p> <p>Not applicable: needs to put file-selection business rules into Foundation (business rules are owned by the caller); needs to write to an uncontained path.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#2-Architecture-Choice-and-Capability-ID","title":"2. Architecture Choice and Capability ID","text":"<p>Preferred capabilities: <code>foundation.harness.path-containment</code> (path classification and contained resolution) and <code>foundation.harness.atomic-write</code> (atomic write within contained paths). Both implement only the mechanism, owning no semantics.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#3-Preconditions-and-Trust-Boundary","title":"3. Preconditions and Trust Boundary","text":"<ul> <li>The caller provides an explicit root directory (containment boundary).</li> <li>Trust boundary: all resolution results must fall within the root directory; out-of-bounds, symlink escape, and realpath escape are all refused.</li> </ul>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#4-Minimal-Code","title":"4. Minimal Code","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { resolveContained, writeFileAtomic } from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-safe-\"));\nconst target = resolveContained(root, \"nested/config.json\"); // contained absolute path\nawait writeFileAtomic(target, JSON.stringify({ ok: true }));\n</code></pre> <p>The code above shows the basic order of first containing the path, then atomically writing; <code>writeFileAtomic</code> uses temp-file + fsync + rename, rolling back on failure.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#5-Expected-Output-and-Evidence","title":"5. Expected Output and Evidence","text":"<p><code>resolveContained</code> returns an absolute path within the root; <code>writeFileAtomic</code> writes the completed file, whose bytes are consistent with the input. Evidence: <code>packages/skill-family-harness-node/test/containment.test.mjs</code> and <code>test/atomic.test.mjs</code>.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#6-Safety--Failure-Negative-Case","title":"6. Safety / Failure Negative Case","text":"<pre><code>// Negative case: attempting to escape the root -&gt; SFC2004 (path-traversal)\nimport { resolveContained } from \"skill-family-harness-node\";\nresolveContained(root, \"../escape.json\"); // throws HarnessError, details.kind = \"path-traversal\"\n</code></pre> <p>Out-of-bounds, symlink-escape, and realpath-escape all map to <code>SFC2004</code> with a stable <code>details.kind</code>; atomic write throws on an out-of-bounds path or illegal data type and rolls back the temp file.</p>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#7-Copy-Paste-Verification-Command","title":"7. Copy-Paste Verification Command","text":"<pre><code>node --test packages/skill-family-harness-node/test/containment.test.mjs \\\n packages/skill-family-harness-node/test/atomic.test.mjs\n</code></pre>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#8-Business-Logic-the-Caller-Continues-to-Own","title":"8. Business Logic the Caller Continues to Own","text":"<ul> <li>Which paths are business-allowed selection rules (not within Foundation).</li> <li>The business correctness of the written content.</li> </ul>"},{"location":"en/recipes/safe-filesystem-and-atomic-write/#9-Upgrade-and-Rollback-Notes","title":"9. Upgrade and Rollback Notes","text":"<ul> <li>Path containment and atomic write are contained mechanisms; on failure they roll back without leaving half-products, so no external rollback is needed.</li> <li>Upgrade follows the <code>skill-family-harness-node</code> version; <code>HARNESS_EXCLUSIONS</code> introduces no remote or git writes.</li> </ul>"},{"location":"en/reference/compatibility/","title":"English \u00b7 Compatibility","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/reference/compatibility/#Compatibility-and-Support-Matrix","title":"Compatibility and Support Matrix","text":"<p>This page records the current source versions, runtime support, and the one-time migration rule for historical candidate entrypoints. Package manifests, the Contracts registry, and the capability catalog are the machine authorities.</p>"},{"location":"en/reference/compatibility/#Current-Versions","title":"Current Versions","text":"Package Current source version Role <code>skill-family-contracts</code> 0.14.0 Contracts 1.14.0 machine contracts <code>skill-family-harness-node</code> 0.14.0 Node implementation of Contracts mechanisms <code>skill-family-engineering-kit</code> 0.14.0 Four engineering commands and build-time projection Private parent workspace 0.14.0 Sole development source of truth <p>The three leaf packages release in lockstep and must not be mixed. The Contracts specification and npm packages use separate version lines.</p>"},{"location":"en/reference/compatibility/#Two-Generation-Maturity-Rule","title":"Two-Generation Maturity Rule","text":"<p>Historical candidate APIs migrate once to canonical entrypoints. Legacy entrypoints continue to resolve to the same module during the compatibility window. Removing one requires a published deprecation, zero references in known real consumers, at least one release cycle, and a separate major-version decision.</p> <p>APIs introduced from 0.10.0 onward use their final canonical identity from the first candidate release. An active candidate upgrade can still require adaptation. Candidate-to-stable promotion, however, may change only the provider's compatibility promise. It cannot change the entrypoint, capability ID, Schema <code>$id</code>, operation, request, result, or error semantics. A consumer must still update all three exact package pins to obtain the newly published stable promise. Existing package-identity, source-digest, and provenance bindings determine whether a Bundle rebuild is required; the maturity label adds no separate rebuild condition. FND-ADR-016 and <code>CANDIDATE_PROMOTION_POLICY</code> define the machine rule.</p>"},{"location":"en/reference/compatibility/#Historical-Candidate-Migration-Matrix","title":"Historical Candidate Migration Matrix","text":"Historical coordinate or capability 0.10.0 migration target Current treatment <code>skill-family-contracts/candidate/quickstart-profile</code> <code>skill-family-contracts/quickstart-profile</code> Same source module; migrate once <code>skill-family-harness-node/candidate/quickstart-profile</code> <code>skill-family-harness-node/quickstart-profile</code> Same source module; operations unchanged <code>skill-family-harness-node/candidate/rename-directory-no-replace</code> <code>skill-family-harness-node/rename-directory-no-replace</code> Same source module; distinct from high-level fixed-set publication <code>skill-family-engineering-kit/candidate/quickstart-profile</code> <code>skill-family-engineering-kit/quickstart-profile</code> One-time Quickstart builder migration Adoption from the old Quickstart namespace <code>skill-family-engineering-kit/adoption</code> Responsibility-specific canonical entrypoint backed by the same source Package-local or projected skill-naming candidate <code>skill-family-engineering-kit/skill-naming</code> Canonical package entrypoint; no fifth Kit command 0.4.0 fixed-set candidate schemas and primitive 0.9.0 stable Schema <code>$id</code> values and <code>skill-family-harness-node/fixed-set-publication</code> Legacy schemas remain packaged while consumers migrate to the high-level API 0.9.0 <code>validate-many-by-schema-id</code> candidate schemas <code>/foundation-mechanisms/v1/schema-validation-batch-{request,result}.json</code> One canonical Schema copy; legacy and canonical IDs dispatch to the same compiled validator, with no operation or echoed-result change <p>The six Quickstart v2 identities for Resource, Task, Result, consumer inventory, and Harness surface inventory/detectors also migrate once from <code>/candidate/quickstart-profile/v2/</code> to <code>/quickstart-profile/v2/</code>. Contracts loaders return only canonical <code>$id</code> values. During the compatibility window, Bundles accept both old and new IDs without a second Schema set or a general alias registry.</p> <p>Quickstart v1 had already been replaced by v2 before 0.3.0. Consumers that still require v1 must remain pinned to 0.2.1. Version 0.10.0 neither rewrites historical artifacts nor repackages v1.</p>"},{"location":"en/reference/compatibility/#R05-and-legacy-platform-manifest-migration","title":"R05 and legacy platform-manifest migration","text":"<p>The R05 request/result Schemas are the sole structural owners of <code>logicalMappings</code>. A consumer keeps only fields that belong to its own domain, then removes duplicated closure, digest, and file-list structures after real-directory verification. It does not maintain permanent dual writes.</p> Legacy field Migration decision <code>familyId</code> Map to <code>skillFamilyId</code>. <code>platformId</code> Map to canonical <code>hostId</code> only after a registered Descriptor proves the identity. A request declaration is not proof. <code>version</code> Keep as the consumer package version. <code>sourceDigest</code> Map to <code>commonSourceClosure.digest</code>. <code>projectionDigest</code> No automatic equivalence; <code>manifest.digest</code> must not stand in for it. <code>fileCount</code> / <code>files</code> Derive from the standard manifest. The peer root's <code>skills/</code> does not include a legacy manifest in its parent directory; remove the old list after migration. <code>logicalMappings</code> Owned only by request/result. <code>lifecycleStatus</code> / <code>blocked</code> / <code>blockingReasons</code> / <code>advisories</code> Remain in the consumer domain. <code>verified</code> Does not derive product, Audit, or release state."},{"location":"en/reference/compatibility/#Node-and-Toolchain","title":"Node and Toolchain","text":"<ul> <li>Node: <code>&gt;=22.22.2 &lt;23</code>; <code>.node-version</code> fixes the exact floor at <code>22.22.2</code>.</li> <li>pnpm: <code>10.30.0</code>.</li> <li>projen: <code>0.101.23</code>, the sole generator for managed engineering files.</li> <li>Schema validator: Ajv <code>8.20.0</code>, supporting draft-07 and 2020-12.</li> </ul> <p>Results from Node below the floor or above the locked major cannot replace authoritative gate results.</p>"},{"location":"en/reference/compatibility/#Contracts-and-Engineering-Boundaries","title":"Contracts and Engineering Boundaries","text":"<ul> <li>The Contracts registry contains 42 top-level object classes and is the sole authority for that set.</li> <li>The stable kernel protocol is <code>skill-family.kernel.operation</code>; the Contracts specification is 1.14.0, while the kernel document remains byte-pinned at its 1.8.0 lifecycle coordinate.</li> <li>Error codes are append-only and are never reassigned.</li> <li>Kit top-level commands remain <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, and <code>check</code>.</li> <li>Host apply, install/update/uninstall, a full Qoder driver, remote publication, business state machines, model orchestration, and domain-audit semantics are outside the stable support surface. Local install/update remain within the 0.10.0 unstable plan-API boundary; an unsupported host receives no automatic lifecycle capability and no remote-publication guarantee.</li> </ul> <p>Current host support comes from the capability catalog, Profile descriptors, and real drivers. A directory convention or CLI identity alone does not establish a supported lifecycle.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/","title":"English \u00b7 Failures and side effects","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Failure-and-Side-Effect-Matrix","title":"Failure and Side-Effect Matrix","text":"<p>This page lists, per public entry point, read/write, spawn, Git, network, residual state, and stable error codes. It serves callers judging risk before integrating, and is the human-readable projection of the <code>sideEffects</code> and <code>failureSemantics</code> fields in <code>capability-catalog.json</code>. All facts are based on the real implementation and negative tests.</p> <p>Symbol convention: read = reads the filesystem; write = writes the filesystem; spawn = launches a subprocess; Git = reads/writes Git; network = accesses a remote; residual = state still left on disk/in-process after the call ends.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Contracts-Pure-Function-Layer","title":"Contracts (Pure-Function Layer)","text":"Entry read write spawn Git network residual state stable error code <code>validateDocument</code> no no no no no none (compile cache memory-resident only) <code>SFC1001</code>/<code>SFC1002</code>/<code>SFC1006</code> <code>compileSchema</code> / <code>detectDialect</code> no no no no no none <code>SFC1006</code>/<code>SFC1012</code> <code>loadRegistry</code> / <code>findSchemaByObject</code> / <code>findProtocol</code> no no no no no none <code>SFC1003</code>/<code>SFC1004</code> <code>runChecks</code> / <code>collectUnresolvedRefs</code> no no no no no none <code>SFC1002</code>\u2013<code>SFC1010</code> <code>verifyAllFixtures</code> / <code>verifyFixture</code> no no no? no no no none <code>SFC1010</code> <code>ERROR_CODES</code> / <code>stableError</code> no no no no no none frozen registry, no additions <p>Contracts are all pure functions, with no file/Git/network/process side effects; error objects contain <code>stableError</code> and <code>details.kind</code> for easy caller classification.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Harness-Mechanism-Layer-Contained","title":"Harness (Mechanism Layer, Contained)","text":"Entry read write spawn Git network residual state stable error code <code>validateContractDocument</code> no no no no no none (validator cache in memory) <code>SFC</code> validation failure <code>resolveContained</code> / <code>readFileContained</code> yes (read-only) no no no no none <code>SFC2004</code> (<code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>) <code>writeFileAtomic</code> no yes (contained) no no no failed rollback temp file <code>SFC2004</code> (<code>atomic-write-failed</code>) <code>TemporaryWorkspace</code> / <code>withTemporaryWorkspace</code> no yes (temp directory) no no no temp directory cleaned on exit <code>SFC2004</code> (<code>workspace-disposed</code>) <code>computeResourceClosure</code> / <code>digestBytes</code> no no no no no none <code>SFC</code> (declaration/content violation) <code>parseRequest</code> / <code>processRequest</code> no no no no no none (pure-function pipeline) <code>SFC2004</code> <code>validateReportModel</code> / <code>renderReportMarkdown</code> / <code>buildBinding</code> / <code>checkReport</code> no no no no no none (pure function) <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>buildAdapterClosure</code> / <code>verifyAdapterBuildManifest</code> no no no no no none <code>SFC2004</code> (<code>missing-resource</code>) <code>verifyPeerAdapterDirectories</code> yes (bound peer roots) no no no no none <code>SFC2003</code>/<code>SFC2004</code> (identity, mapping, closure, or path failure) <code>materializeAdapterBuild</code> no yes (contained, sibling + rename) no no no none (atomic rename) <code>SFC2004</code> <code>probeVersionVector</code> no no default no (requires explicit <code>--allow-host-spawn</code>) no no none <code>SFC2004</code> <code>openStateStore</code> / <code>appendEvent</code> / <code>readEvents</code> / <code>writeSnapshot</code> yes yes (event/snapshot/lock files) no no no event log + lock file <code>SFC2004</code> (<code>store-locked</code>/chain broken) <code>inspectStateStoreLock</code> / <code>recoverStateStoreLock</code> yes yes (recovery write-lock only) no no no lock file (monotonic fencing) <code>SFC2004</code> <code>runMechanismCliBatch</code> / <code>mechanisms-cli.mjs --batch</code> (since 0.19.0, candidate) no no no no no none (only the caller-provided output/error streams are written) exit code 0 (all succeeded) / 2 (at least one item failed or whole batch refused); <code>details.kind</code> closed to <code>batch-structure-invalid</code>/<code>batch-item-limit</code>/<code>batch-input-limit</code>/<code>batch-output-limit</code> <p>The failure stage determines the observable effects of the batch entry point. Request-byte, item-count, and structure preflight rejection invokes no mechanism and leaves stdout empty. Output capacity can be checked only after the current item returns, so that item may already have executed; later items are not executed and stdout remains empty. An output-channel failure may leave partial bytes sent and returns 2. If the error channel also fails, delivery of the error object is not guaranteed.</p> <p>Harness's <code>HARNESS_EXCLUSIONS</code> explicitly excludes release-state, remote-network-access, business-semantics, workflow-orchestration, model-calls, git-writes.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Engineering-Kit-Engineering-Command-Layer","title":"Engineering Kit (Engineering Command Layer)","text":"Entry read write spawn Git network residual state stable error code / exit code <code>scaffoldTarget</code> no yes (contained skeleton, atomic + contained) no no no none (no half-product on failure) <code>SFC2004</code> (<code>target-not-empty</code>) <code>planAdoption</code> yes no default may spawn one frozen read-only Git status probe (disableable) read-only probe no none (stdout output) <code>SFC</code> completion false <code>buildProfileDraft</code> no no no no no none (stdout output) <code>SFC</code> completion false <code>runProjection</code> yes (reads manifest) yes (managed path, two-phase) no no no none (zero write/rollback on failure) <code>SFC2004</code> (<code>unauthorized-path</code>/<code>handwritten-overwrite</code>/<code>conflict-drift</code>) <code>runChecks</code> (<code>check</code>) yes no default may spawn one frozen read-only Git status probe; <code>--no-git-spawn</code> disables it read-only allowlist no none exit code 1 (findings) / 2 (mechanism) <code>check relock</code> yes yes (explicit controlled write) no no no controlled relock transaction state exit code 0/1/2 <code>check qualification</code> / <code>runQualification</code> reads request and bindings writes private evidence under caller-bound roots yes, after preflight no bound executable may access the network evidence is retained when the end state is indeterminate exit code 0/1/2; four-state result <code>runPluginVerification</code> yes (bound roots) yes (fresh workspace, host state, private evidence) yes, local executable only no bound executable may access the network uncertain evidence is retained four-state <code>plugin-verification-result</code> <code>runSkillFamilyDirectoryVerification</code> yes (bound roots) yes (private raw evidence) yes, local executable only no bound executable may access the network uncertain evidence is retained four-state directory result <code>renderReportAction</code> / <code>checkReportAction</code> yes only <code>--out</code>/<code>--binding</code> no no no default stdout only <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>probeGitState</code> / <code>probeGitFacts</code> yes no default may spawn one frozen read-only Git subprocess; disableable read-only allowlist no none <code>SFC</code> (over-privileged parameter refused) <code>describeHost</code> / <code>resolveHostId</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>verifyHostPeers</code> / <code>planHost</code> yes build writes (contained) probe default no no no none <code>SFC2003</code>/<code>SFC2004</code> <code>applyHostPlan</code> yes bounded local install/update no no no staging is cleaned; result records partial/indeterminate publication <code>SFC2003</code>/<code>SFC2004</code>; uninstall returns <code>manual-recovery-required</code> without deleting <code>loadLicensingProfile</code> / <code>generateLicenseContent</code> etc. no no (pure-function generation) no no no none <code>SFC</code> (illegal Profile) <code>checkIdentityDrift</code> / <code>validateIdentityAgainstProfile</code> yes no no no no none findings <code>cliMain</code> / <code>runCommand</code> per action per action per action per action per action (bound executable may access the network) per action exit code 0/1/2 <p>Kit's <code>FORBIDDEN_SIDE_EFFECTS</code> includes git-init/commit/push/tag, publish, remote-write; <code>REFUSED_MUTATION_FLAGS</code> (including <code>--apply</code>) are refused at the CLI entry point. The package API <code>applyHostPlan</code> does not add a fifth command or grant generic/remote apply.</p> <p>Foundation itself does not issue network requests, but a bound executable may access the network. Foundation provides no sandbox or egress blocking; callers and the execution environment own that isolation. The Qoder, WorkBuddy, and Kimi entries remain <code>manual/candidate</code>; controlled fixtures prove production wiring only and do not grant real-host qualification.</p>"},{"location":"en/reference/failure-and-side-effect-matrix/#Residual-State-Collection","title":"Residual-State Collection","text":"<ul> <li>Atomic write: on failure, rolls back the temp file, leaving no half-product in the target directory.</li> <li>Temporary workspaces are cleaned on exit, including exception paths.</li> <li>State store: the event log is the sole authority, and the snapshot is a derived cache; a crash-left lock requires the caller, outside Foundation, to confirm the old writer has terminated before explicitly recovering; no silent lock-stealing.</li> <li>Projection: any validation failure rejects wholesale, zero writes; overwriting an existing file requires declaring the <code>expect.sha256</code> pre-state.</li> <li>adopt-plan, ordinary runChecks, and ordinary check are structurally read-only and write no files; by default they may spawn one frozen read-only Git status subprocess, disabled by <code>--no-git-spawn</code> (or API <code>allowGitSpawn: false</code>), with byte-level zero change before and after running. The side effects of check relock and check qualification are listed above.</li> </ul>"},{"location":"en/reference/failure-and-side-effect-matrix/#What-the-Caller-Should-Do-After-Failure","title":"What the Caller Should Do After Failure","text":"<ul> <li>Validation failure (<code>SFC1001</code>/<code>SFC2002</code>/<code>SFC2003</code>): check whether the input satisfies the target Schema or parameter contract; do not retry a registration that has been frozen-refused.</li> <li>Containment failure (<code>SFC2004</code> + <code>path-traversal</code>, etc.): confirm whether the root directory and path are out of bounds; do not cram business-selection rules into Foundation.</li> <li>State-lock conflict (<code>store-locked</code>): outside Foundation, confirm the old writer has terminated, then call recovery with the exactly-matching owner/fencing.</li> <li>check findings (exit code 1): address the findings; Kit does not auto-fix.</li> </ul>"},{"location":"en/reference/api/","title":"English \u00b7 API reference","text":"<p>\u7b80\u4f53\u4e2d\u6587</p>"},{"location":"en/reference/api/#Public-API-Reference","title":"Public API Reference","text":"<p>This page is the English entry point for the public APIs of the three Foundation packages. It is a human-readable route into the machine facts in the capability catalog; package exports, schemas, protocols, and stable error codes remain authoritative.</p>"},{"location":"en/reference/api/#Choose-the-Owning-Layer","title":"Choose the Owning Layer","text":"Package Use it for Start with <code>skill-family-contracts</code> Object schemas, protocol registries, validation, stable error codes, fixtures, and deterministic audit surfaces <code>foundation.contracts.object-validation</code>, <code>foundation.contracts.registry-protocol</code>, <code>foundation.contracts.audit-surface</code> <code>skill-family-harness-node</code> Business-neutral Node mechanisms such as contained paths, atomic writes, subprocess requests, durable local state, and deterministic reports <code>foundation.harness.path-containment</code>, <code>foundation.harness.atomic-write</code>, <code>foundation.harness.state-store</code>, <code>foundation.harness.report</code> <code>skill-family-engineering-kit</code> The four engineering commands and controlled host/Profile integration <code>foundation.kit.scaffold</code>, <code>foundation.kit.adopt-plan</code>, <code>foundation.kit.projection</code>, <code>foundation.kit.check</code>, <code>foundation.kit.host-integration</code> <p>The dependency direction is Contracts \u2192 Harness \u2192 Engineering Kit. A Profile declares host or project-shape differences horizontally; public core code does not depend on a concrete Profile.</p>"},{"location":"en/reference/api/#Verified-Capability-Details","title":"Verified Capability Details","text":"<p>Use the following public data files before selecting an entry point:</p> <ol> <li>Core capability facts contain stable IDs, packages, layers, entry points, stability, source references, and test references.</li> <li>English capability explanations add intent, use and non-use conditions, inputs, outputs, failure semantics, caller ownership, and external routing for the same IDs.</li> <li>Catalog schema defines the closed structure of both files.</li> </ol> <p>The failure and side-effect matrix compares filesystem, process, Git, network, residual-state, and error behavior across public entry points. The architecture routing guide starts from design intent when the package or capability is not yet known.</p>"},{"location":"en/reference/api/#Key-Failure-Rules","title":"Key Failure Rules","text":"<ul> <li>Contracts document validation returns <code>{ valid: false, errorCode, errors }</code> for ordinary validation failures. Callers inspect <code>valid</code>; <code>validateDocument</code> does not turn those failures into exceptions.</li> <li>Harness mechanism failures use <code>SFC2004</code> (<code>EXECUTION_FAILED</code>) and distinguish the failure with a frozen <code>details.kind</code> value.</li> <li>Engineering Kit keeps exactly four top-level commands: <code>scaffold</code>, <code>adopt-plan</code>, <code>projection</code>, and <code>check</code>. Each command retains its documented read-only or controlled-write boundary.</li> <li>Candidate capabilities are marked <code>stability: candidate</code> in the catalog. Their presence in the public package does not promote them to the stable surface.</li> </ul>"},{"location":"en/reference/api/#Quickstart-Profile-v2-Candidate","title":"Quickstart Profile v2 Candidate","text":"<p>All three packages expose v2 through their existing candidate subpaths. Contracts defines the business-neutral <code>execute-method</code> exchange, Harness verifies bytes and bindings, and Kit turns explicit consumer schemas into an offline Bundle with standalone validators selected by schema <code>$id</code>. Version 0.3.0 candidate v2 is incompatible with the 0.2.1 candidate v1; consumers must pin the selected package versions exactly.</p>"},{"location":"en/reference/api/#Detailed-Package-Pages","title":"Detailed Package Pages","text":"<p>The current signature-level package pages are maintained in Chinese because they enumerate every verified export and test reference:</p> <ul> <li>Contracts API details</li> <li>Harness API details</li> <li>Engineering Kit API details</li> </ul> <p>These pages are part of the same public site and link to source and test evidence. The English catalog overlay provides the complete English intent and failure semantics for every capability, so an agent can route and design against Foundation without inferring meaning from the Chinese prose.</p>"},{"location":"en/reference/api/#Boundary","title":"Boundary","text":"<p>Foundation does not own domain schemas, business state machines, audit conclusions, task/retry orchestration, artifact relationships, or remote publishing. Keep those semantics with the caller, or route them to the external project named by the capability catalog.</p>"},{"location":"integration/audit/","title":"\u72ec\u7acb\u5ba1\u8ba1\u96c6\u6210\uff08FND-060\uff09","text":"<p>\u672c\u76ee\u5f55\u662f\u72ec\u7acb\u5ba1\u8ba1\uff08Audit\uff09\u6d88\u8d39\u5df2\u53d1\u5e03 Contracts \u7684\u6700\u5c0f\u96c6\u6210\u9762\u3002\u5ba1\u8ba1\u7684\u804c\u8d23\u662f\uff1a\u4ee5\u72ec\u7acb\u4e8e\u751f\u6210\u5668\u4e0e oracle \u7684 fixture\u3001\u9884\u671f\u503c\u548c\u88c1\u51b3\uff0c\u9a8c\u8bc1\u88ab\u6d88\u8d39\u7684 <code>skill-family-contracts</code> \u5305\u6ca1\u6709\u88ab\u7be1\u6539\u3001\u524a\u5f31\u6216\u6f0f\u68c0\u3002</p>"},{"location":"integration/audit/#\u6743\u5a01\u8fb9\u754c","title":"\u6743\u5a01\u8fb9\u754c","text":"<ul> <li>\u5ba1\u8ba1\u53ea\u6d88\u8d39 Contracts \u7684\u516c\u5f00\u63a5\u53e3\uff08<code>describeAuditSurface</code>\u3001<code>validateDocument</code>\u3001<code>checkOperation</code>\u3001<code>findProtocol</code>\u3001<code>isRegisteredErrorCode</code>\u3001<code>digestDocument</code> \u7b49\uff09\uff0c\u4f9d\u8d56\u65b9\u5411\u6052\u4e3a Audit \u2192 Contracts\uff1b</li> <li>\u5ba1\u8ba1\u4e0d\u4f9d\u8d56 engineering-kit\uff0c\u4e5f\u4e0d\u4f9d\u8d56 harness\uff08\u89c1 independence.md \u7684\u673a\u68b0\u8bc1\u660e\uff09\uff1b</li> <li>Contracts \u4e0d\u53cd\u5411\u4f9d\u8d56\u5ba1\u8ba1\uff1aContracts \u4fa7\u53ea\u65b0\u589e\u4e86\u53ea\u8bfb\u6295\u5f71\u6a21\u5757 <code>src/audit-surface.mjs</code>\uff0c\u4e0d\u63a5\u53d7\u4efb\u4f55\u56de\u8c03\u3001\u6ce8\u518c\u6216\u5ba1\u8ba1\u4fa7\u8f93\u5165\uff1b</li> <li>\u5ba1\u8ba1 fixture\u3001\u9884\u671f\u4e0e\u88c1\u51b3\u5168\u90e8\u7531\u4ea7\u54c1\u4fa7\u7ef4\u62a4\uff08\u5939\u5177 provenance <code>product-fixture</code>\uff0cpin provenance <code>product-compatibility-fixture</code>\uff09\uff0c\u4e0d\u590d\u7528\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\uff0c\u4e5f\u4e0d\u8bfb\u53d6 oracle \u5224\u636e\uff08\u8be5\u9694\u79bb\u7531 independence.md \u7684\u673a\u68b0\u8bc1\u660e\u5f3a\u5236\uff09\u3002</li> </ul>"},{"location":"integration/audit/#\u76ee\u5f55\u7ed3\u6784","title":"\u76ee\u5f55\u7ed3\u6784","text":"<pre><code>docs/integration/audit/\n README.md \u672c\u6587\u4ef6\n mutation-taxonomy.md \u4e94\u7c7b\u53d8\u5f02\u5206\u7c7b\u5b66\uff08\u51bb\u7ed3\uff09\n failure-evidence.md \u5931\u8d25\u8bc1\u636e\u683c\u5f0f\u4e0e AUD \u7801\u767b\u8bb0\u8868\n version-compatibility.md \u7248\u672c\u517c\u5bb9\u5b9a\u4e49\n isolation-and-lockfile.md \u9694\u79bb\u5b89\u88c5\u4e0e\u5305\u9501\u9a8c\u8bc1\u8bbe\u8ba1\n independence.md \u72ec\u7acb\u6027\u58f0\u660e\u4e0e\u673a\u68b0\u8bc1\u660e\n schemas/audit-evidence.schema.json \u8bc1\u636e\u6587\u6863\u7684 JSON Schema\uff08\u5ba1\u8ba1\u81ea\u6709\uff09\n baseline/contracts-1.15.0.pin.json Contracts 1.15.0 \u5f53\u524d\u57fa\u7ebf pin\uff08\u6458\u8981+\u4e8b\u5b9e\uff09\n baseline/contracts-1.14.0.pin.json Contracts 1.14.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.13.0.pin.json Contracts 1.13.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.12.0.pin.json Contracts 1.12.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.11.0.pin.json Contracts 1.11.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.10.0.pin.json Contracts 1.10.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.9.0.pin.json Contracts 1.9.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.8.0.pin.json Contracts 1.8.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.6.0.pin.json Contracts 1.6.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.5.0.pin.json Contracts 1.5.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.1.1.pin.json Contracts 1.1.1 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.1.0.pin.json Contracts 1.1.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/contracts-1.0.0.pin.json Contracts 1.0.0 \u53ea\u8bfb\u517c\u5bb9\u5b58\u6863 pin\n baseline/audit-codes.json AUD \u7801\u767b\u8bb0\u8868\uff08append-only\uff09\n fixtures/{structure,semantics,digest,omission,engine}/ 18 \u4e2a\u53d8\u5f02 fixture\n runner/ \u5ba1\u8ba1\u8fd0\u884c\u5668\uff08\u53ea\u8bfb\uff0c\u8bc1\u636e\u8f93\u51fa\u5230 stdout\uff09\n</code></pre>"},{"location":"integration/audit/#\u8fd0\u884c","title":"\u8fd0\u884c","text":"<pre><code># \u5b8c\u6574\u7ba1\u7ebf\uff1a\u72ec\u7acb\u6027\u8bc1\u660e \u2192 \u5305\u9501\u9a8c\u8bc1 \u2192 \u53d8\u5f02\u91cd\u653e \u2192 \u6f0f\u62a5\u8d1f\u4f8b\u81ea\u68c0\nnode docs/integration/audit/runner/run-all.mjs\n\n# \u5206\u6b65\u8fd0\u884c\nnode docs/integration/audit/runner/proof-independence.mjs # \u72ec\u7acb\u6027\u673a\u68b0\u8bc1\u660e\nnode docs/integration/audit/runner/verify-lock.mjs # \u6d88\u8d39\u5305 pin/\u9501\u9a8c\u8bc1\nnode docs/integration/audit/runner/run-audit.mjs # \u53d8\u5f02\u91cd\u653e + \u8bc1\u636e\nnode docs/integration/audit/runner/selftest-negative.mjs # \u6f0f\u62a5\u8d1f\u4f8b\u63a7\u5236\n</code></pre> <p>\u9000\u51fa\u7801\u7ea6\u5b9a\uff1a<code>0</code> \u901a\u8fc7\uff1b<code>1</code> \u6709\u53d1\u73b0\uff08verdict fail\uff09\uff1b<code>2</code> \u7528\u6cd5\u6216\u673a\u5236\u9519\u8bef\u3002\u6240\u6709\u62a5\u544a\u4ee5 JSON \u8f93\u51fa\u5230 stdout\uff0c\u8fd0\u884c\u5668\u5bf9\u4ed3\u5e93\u96f6\u5199\u5165\u3002</p>"},{"location":"integration/audit/#\u88c1\u51b3\u89c4\u5219","title":"\u88c1\u51b3\u89c4\u5219","text":"<ul> <li>\u4e94\u7c7b\u53d8\u5f02\uff08\u7ed3\u6784\u3001\u8bed\u4e49\u3001\u6458\u8981\u3001\u9057\u6f0f\u3001\u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31\uff09\u6bcf\u7c7b\u81f3\u5c11 3 \u4e2a fixture\uff0c\u4e14\u81f3\u5c11\u68c0\u51fa 1 \u4e2a\uff1b</li> <li>\u4efb\u4e00\u7c7b\u6f0f\u62a5\u5373\u5931\u8d25\uff1a\u8986\u76d6\u95e8\uff08AUD-MISS-001\uff09\u673a\u68b0\u5f3a\u5236\uff0c\u6f0f\u62a5\u7c7b\u7684\u5b58\u5728\u4f7f\u6574\u4f53 verdict \u5fc5\u4e3a fail\uff1b</li> <li>\u4efb\u4e00 fixture \u672a\u88ab\u5982\u9884\u671f\u68c0\u51fa\u3001\u57fa\u7ebf pin \u6f02\u79fb\u3001fixture \u4fe1\u5c01\u4e0d\u5408\u6cd5\uff0c\u90fd\u4ea7\u751f mandatory \u7ea7\u53d1\u73b0\u5e76\u4f7f verdict fail\u3002</li> </ul>"},{"location":"integration/audit/failure-evidence/","title":"\u5931\u8d25\u8bc1\u636e\u683c\u5f0f\u4e0e AUD \u7801\u767b\u8bb0\u8868","text":"<p>\u5ba1\u8ba1\u53d1\u73b0\u5fc5\u987b\u4ee5\u673a\u5668\u53ef\u8bfb\u7684\u8bc1\u636e\u6587\u6863\u8bb0\u5f55\u3002\u8bc1\u636e\u6587\u6863\u7531 <code>runner/run-audit.mjs</code> \u8f93\u51fa\u5230 stdout\uff0c\u683c\u5f0f\u7531 schemas/audit-evidence.schema.json \u51bb\u7ed3\uff0c\u5e76\u901a\u8fc7\u88ab\u6d88\u8d39 Contracts \u7684 <code>validateDocument</code>\uff082020-12 \u65b9\u8a00\u3001strict \u7b56\u7565\uff09\u81ea\u6821\u9a8c\u2014\u2014\u8bc1\u636e\u6587\u6863\u672c\u8eab\u4e0d\u5408\u683c\u662f\u673a\u5236\u9519\u8bef\uff08\u9000\u51fa\u7801 2\uff09\u3002</p>"},{"location":"integration/audit/failure-evidence/#\u8bc1\u636e\u6587\u6863\u5f62\u72b6","title":"\u8bc1\u636e\u6587\u6863\u5f62\u72b6","text":"<pre><code>{\n \"schemaVersion\": 1,\n \"kind\": \"skill-family.audit.evidence\",\n \"auditId\": \"fnd-060-independent-audit\",\n \"generatedAt\": \"RFC 3339 date-time\",\n \"consumer\": {\n \"contractsVersion\": \"1.0.0\",\n \"auditSurfaceVersion\": 1,\n \"surfaceDigest\": { \"algorithm\": \"sha256\", \"value\": \"64 \u4f4d\u5341\u516d\u8fdb\u5236\" }\n },\n \"verdict\": \"pass | fail\",\n \"classCoverage\": {\n \"&lt;class&gt;\": { \"fixtures\": 0, \"detected\": 0, \"required\": 3, \"satisfied\": false }\n },\n \"fixtureResults\": [\n { \"fixtureId\": \"AUD-M1-01\", \"mutationClass\": \"structure\", \"expectedAuditCode\": \"AUD-M1-STRUCT\", \"detected\": true, \"observed\": {} }\n ],\n \"findings\": [\n {\n \"findingId\": \"F-0001\",\n \"auditCode\": \"AUD-BASE-001\",\n \"severity\": \"mandatory\",\n \"mutationClass\": null,\n \"fixtureId\": null,\n \"detected\": true,\n \"summary\": \"\u4eba\u7c7b\u53ef\u8bfb\u6458\u8981\",\n \"details\": {}\n }\n ]\n}\n</code></pre> <p>\u8981\u70b9\uff1a</p> <ul> <li><code>consumer</code> \u7528\u7248\u672c\u5750\u6807 + surface \u6458\u8981\u9489\u6b7b\u88ab\u6d88\u8d39\u7684 Contracts \u5305\uff0c\u8bc1\u636e\u56e0\u6b64\u53ef\u56de\u6eaf\u5230\u7cbe\u786e\u5b57\u8282\uff1b</li> <li><code>fixtureResults</code> \u662f\u5168\u90e8 fixture \u7684\u91cd\u653e\u8bb0\u5f55\uff08\u542b\u901a\u8fc7\u9879\uff09\uff0c<code>findings</code> \u53ea\u6536\u8fdd\u89c4\u9879\uff1b</li> <li>v1 \u51bb\u7ed3\u5355\u4e00\u4e25\u91cd\u7ea7 <code>mandatory</code>\uff1a\u4efb\u4f55\u53d1\u73b0\u90fd\u4f7f <code>verdict</code> \u4e3a <code>fail</code>\uff1b</li> <li><code>classCoverage</code> \u4e94\u7c7b\u9f50\u5168\uff1b<code>satisfied = fixtures \u2265 3 \u4e14 detected \u2265 1</code>\u3002</li> </ul>"},{"location":"integration/audit/failure-evidence/#\u88c1\u51b3\u89c4\u5219","title":"\u88c1\u51b3\u89c4\u5219","text":"<ol> <li><code>findings</code> \u4e3a\u7a7a \u2192 <code>verdict = pass</code>\uff0c\u9000\u51fa\u7801 0\uff1b</li> <li>\u4efb\u4e00\u53d1\u73b0\u5b58\u5728 \u2192 <code>verdict = fail</code>\uff0c\u9000\u51fa\u7801 1\uff1b</li> <li>\u7528\u6cd5\u6216\u673a\u5236\u9519\u8bef\uff08\u542b\u8bc1\u636e\u81ea\u6821\u9a8c\u5931\u8d25\uff09\u2192 \u9000\u51fa\u7801 2\uff0c\u4e0d\u4ea7\u751f\u8bc1\u636e\u6216\u4ea7\u751f\u4f5c\u5e9f\u8bc1\u636e\uff1b</li> <li>\u6f0f\u62a5\u5f8b\uff1a\u4efb\u4e00\u7c7b <code>satisfied = false</code> \u5fc5\u987b\u4ea7\u751f AUD-MISS-001 \u53d1\u73b0\uff0c\u6574\u4f53 verdict \u5fc5\u4e3a fail\u3002</li> </ol>"},{"location":"integration/audit/failure-evidence/#AUD-\u7801\u767b\u8bb0\u8868append-only","title":"AUD \u7801\u767b\u8bb0\u8868\uff08append-only\uff09","text":"<p>\u5ba1\u8ba1\u7801\u5c5e\u4e8e\u5ba1\u8ba1\u81ea\u6709\u547d\u540d\u7a7a\u95f4 <code>AUD-</code>\uff0c\u4e0d\u8fdb\u5165 Contracts \u7684 SFC \u767b\u8bb0\uff1b\u5ba1\u8ba1\u5bf9 SFC \u7801\u53ea\u8bfb\u6d88\u8d39\u3002\u673a\u5668\u53ef\u8bfb\u526f\u672c\u89c1 baseline/audit-codes.json\u3002</p> \u7801 \u540d\u79f0 \u542b\u4e49 AUD-M1-STRUCT STRUCTURE_MUTATION_DETECTED \u7ed3\u6784\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u89c2\u5bdf\u7801\u7b49\u4e8e\u9884\u671f\u7a33\u5b9a\u7801\uff09 AUD-M2-SEM SEMANTIC_MUTATION_DETECTED \u8bed\u4e49\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa AUD-M3-DIGEST DIGEST_MISMATCH_DETECTED \u6458\u8981\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u89c4\u8303\u5316\u6458\u8981\u4e0e pin \u4e0d\u4e00\u81f4\uff09 AUD-M4-OMIT OMISSION_DETECTED \u9057\u6f0f\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u7f3a\u5931\u6e05\u5355\u4e0e\u9884\u671f\u4e00\u81f4\uff09 AUD-M5-ENGINE ENGINE_WEAKENING_DETECTED \u5f15\u64ce\u524a\u5f31\u7c7b\u53d8\u5f02\u88ab\u68c0\u51fa\uff08\u88ab\u524a\u5f31\u5b57\u6bb5\u4e0e\u9884\u671f\u4e00\u81f4\uff09 AUD-MISS-001 MUTATION_CLASS_MISSED \u67d0\u7c7b fixture \u6570\u4f4e\u4e8e\u51bb\u7ed3\u4e0b\u9650\u6216\u96f6\u68c0\u51fa\uff1b\u6f0f\u62a5\u5373\u6574\u4f53\u5931\u8d25 AUD-BASE-001 BASELINE_DRIFT \u6d88\u8d39\u7684 Contracts \u6d3b\u8dc3 surface \u4e0e\u51bb\u7ed3\u57fa\u7ebf pin \u4e0d\u4e00\u81f4 AUD-FMT-001 EVIDENCE_OR_FIXTURE_FORMAT_INVALID fixture \u4fe1\u5c01\u6216\u8bc1\u636e\u6587\u6863\u683c\u5f0f\u975e\u6cd5 AUD-LOCK-001 LOCK_VERIFICATION_FAILED \u6d88\u8d39\u5305\u7684\u8eab\u4efd\u3001\u4f9d\u8d56\u95ed\u5305\u6216 pin \u5bf9\u6bd4\u5931\u8d25 AUD-IND-001 INDEPENDENCE_VIOLATION \u5ba1\u8ba1\u8bfb\u53d6\u6216\u5bfc\u5165\u8d8a\u51fa\u5141\u8bb8\u96c6\u5408 <p>\u767b\u8bb0\u7eaa\u5f8b\uff1a\u7801\u53ea\u589e\u4e0d\u6539\u4e0d\u590d\u7528\uff1b\u65b0\u589e\u7801\u5fc5\u987b\u540c\u6b65\u66f4\u65b0\u672c\u8868\u4e0e <code>baseline/audit-codes.json</code>\uff0c\u4e14\u4e0d\u5f97\u4e0e SFC \u547d\u540d\u7a7a\u95f4\u4ea7\u751f\u4efb\u4f55\u4ea4\u53c9\u62e5\u6709\u3002</p>"},{"location":"integration/audit/independence/","title":"\u72ec\u7acb\u6027\u58f0\u660e\u4e0e\u673a\u68b0\u8bc1\u660e","text":"<p>FND-060 \u7684\u9a8c\u6536\u8981\u6c42\uff1a\u5ba1\u8ba1 fixture\u3001\u9884\u671f\u503c\u548c\u88c1\u51b3\u4e0d\u6765\u81ea\u751f\u6210\u5668\uff1bAudit \u4e0d\u4f9d\u8d56 Kit\u3002\u672c\u9875\u7684\u73b0\u884c\u4e8b\u5b9e\u662f\uff1a\u672c\u4ed3\u5e93\u4e0d\u5b58\u5728\u72ec\u7acb\u7684\u7b2c\u4e8c\u5ba1\u9605\u4f1a\u8bdd\uff0c\u5ba1\u8ba1\u6811\u662f\u4ea7\u54c1\u4fa7\u7684\u673a\u68b0\u9a8c\u8bc1\u8bbe\u65bd\u3002\u673a\u68b0\u8bc1\u660e\u80fd\u591f\u8bc1\u660e\u7684\u662f\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u4e0e\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\uff1b\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002</p>"},{"location":"integration/audit/independence/#provenance-\u73b0\u884c\u4e8b\u5b9e","title":"provenance \u73b0\u884c\u4e8b\u5b9e","text":"<ul> <li>\u5168\u90e8 18 \u4e2a\u53d8\u5f02 fixture \u7684 provenance \u4e3a <code>product-fixture</code>\uff1a\u4ea7\u54c1\u4fa7\u7ef4\u62a4\u7684\u6d4b\u8bd5\u8bed\u6599\u3002\u9884\u671f\u7531\u4ea7\u54c1\u4fa7\u5bf9\u7167\u5408\u540c\u6587\u6863\u63a8\u5bfc\uff08schema \u7ea6\u675f required/pattern/additionalProperties\u3001\u767b\u8bb0\u8868\u6210\u5458\u8d44\u683c\u3001kernel \u8bcd\u8868\u4e0e params \u5951\u7ea6\u3001\u9519\u8bef\u7801 append-only \u8bed\u4e49\uff09\uff0c\u4e0d\u590d\u7528\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\uff0c\u4e0d\u8bfb\u53d6 oracle \u5224\u636e\uff1b\u8fd9\u4e00\u8f93\u5165\u9694\u79bb\u7531\u4e0b\u65b9 P4/P5/P6 \u673a\u68b0\u5f3a\u5236\u3002</li> <li>\u57fa\u7ebf pin \u7684 provenance \u4e3a <code>product-compatibility-fixture</code>\uff1a\u4ea7\u54c1\u4fa7\u7ef4\u62a4\u7684\u517c\u5bb9\u57fa\u7ebf\u3002\u6458\u8981\u6765\u81ea\u5bf9\u5df2\u51bb\u7ed3\u4ea7\u7269\u7684 <code>digestAuditSurface()</code> \u673a\u68b0\u8ba1\u7b97\uff0c\u4e8b\u5b9e\u6e05\u5355\u76f4\u63a5\u5bf9\u7167\u5408\u540c\u6587\u6863\u63a8\u5bfc\u3002</li> <li>\u5b83\u4eec\u8bc1\u660e\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u548c\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\u3002fixture \u4e0e pin \u80cc\u540e\u7684\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u8fc7\u7a0b\u662f\u5426\u72ec\u7acb\u4e8e\u5176\u4ed6\u9879\u76ee\u53c2\u4e0e\u8005\uff0c\u4e0d\u662f\u4ed3\u5185\u673a\u68b0\u68c0\u67e5\u53ef\u4ee5\u8bc1\u660e\u7684\u5bf9\u8c61\u3002</li> <li>\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\uff1a\u5b9e\u73b0\u8005\u81ea\u6d4b\u4e0e\u672c\u9875\u673a\u68b0\u8bc1\u660e\u90fd\u53ea\u5f62\u6210\u5f85\u5ba1\u8bc1\u636e\uff0c\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002</li> <li>\u8bda\u5b9e\u6027\u7ea0\u9519\uff1a\u65e7 fixture \u4e0e pin \u66fe\u643a\u5e26 <code>independent-r2</code> provenance \u548c\u72ec\u7acb\u4f5c\u8005\u53d9\u4e8b\uff08\u542b\u4f5c\u8005\u9605\u8bfb\u53f2\u58f0\u660e\uff09\uff0c\u4e0e\u672c\u4ed3\u4e8b\u5b9e\u4e0d\u7b26\uff1bprovenance \u5df2\u4fee\u6b63\u4e3a\u4e0a\u8ff0\u5982\u5b9e\u8bcd\u6c47\uff0c\u672c\u9875\u968f\u4e4b\u91cd\u5199\u3002\u7ea0\u9519\u53ea\u89e6\u53ca provenance\u3001note \u4e0e\u6587\u6848\u7b49\u8bda\u5b9e\u6027\u5b57\u6bb5\uff0c\u4e0d\u6539\u53d8\u4efb\u4f55 digest\u3001facts\u3001fixture \u5185\u5bb9\u6216\u673a\u68b0\u8bc1\u660e\u884c\u4e3a\u3002</li> </ul>"},{"location":"integration/audit/independence/#\u673a\u68b0\u8bc1\u660e\u5165\u53e3","title":"\u673a\u68b0\u8bc1\u660e\u5165\u53e3","text":"<pre><code>node docs/integration/audit/runner/proof-independence.mjs\n</code></pre> <p>\u8bc1\u660e\u68c0\u67e5\u4e0e\u7ed3\u8bba\uff1a</p> \u68c0\u67e5 \u7ed3\u8bba P0-modules \u6536\u96c6\u5230\u5168\u90e8\u5ba1\u8ba1\u6a21\u5757\uff08\u8bc1\u660e\u8303\u56f4\u5b8c\u5907\uff09 P1-imports \u5168\u90e8 import \u53ea\u5141\u8bb8 <code>node:</code> \u5185\u5efa\u4e0e\u76f8\u5bf9\u8def\u5f84\uff0c\u4e14\u76f8\u5bf9\u8bf4\u660e\u7b26\u7684\u89e3\u6790\u57df\u88ab\u9650\u5236\u5728\u5ba1\u8ba1\u6811\u6216 contracts \u5305\u5185\uff08\u675c\u7edd\u76f8\u5bf9\u8def\u5f84\u7ed5\u5230\u751f\u6210\u5668/oracle \u6a21\u5757\uff09\uff1b\u7981\u6b62 engineering-kit / harness / \u7b2c\u4e09\u65b9\u5305 \u2192 Audit \u4e0d\u4f9d\u8d56 Kit P2-contracts-site Contracts \u53ea\u5728\u552f\u4e00\u58f0\u660e\u70b9\uff08<code>lib/contracts-client.mjs</code>\uff09\u88ab\u5bfc\u5165 P3-chokepoint \u6587\u4ef6\u8bfb\u53d6\u53ea\u7ecf\u8fc7\u4e24\u4e2a\u58f0\u660e\u8bfb\u53d6\u70b9\uff1a<code>lib/guard.mjs</code>\uff08\u5ba1\u8ba1\u6811\u5185\uff0c\u88c1\u51b3\u8f93\u5165\uff09\u4e0e <code>lib/consumed-package.mjs</code>\uff08\u88ab\u6d88\u8d39\u5305\u6839\u5185\uff0c\u9501\u9a8c\u8bc1\uff09\uff1b\u53ea\u8bfb API\uff1b\u5168\u6811\u65e0\u4efb\u4f55\u5199 API P4-refusal \u73b0\u573a\u62d2\u8bfb\u6f14\u793a\uff1a\u5bf9\u751f\u6210\u5668\u81ea\u6d4b\u8fd0\u884c\u5668\u3001oracle \u5224\u636e\u3001oracle \u8fd0\u884c\u5668\u3001fixture README\u3001profiles\u3001kit \u5165\u53e3\u3001harness \u5165\u53e3\u9010\u4e00\u5c1d\u8bd5\u8bfb\u53d6\uff0c\u5168\u90e8\u88ab guard \u4ee5 AUD-IND-001 \u62d2\u7edd P5-provenance \u5168\u90e8\u53d8\u5f02 fixture \u7684 provenance \u4e3a <code>product-fixture</code>\uff0c\u57fa\u7ebf pin \u7684 provenance \u5728\u58f0\u660e\u8bcd\u6c47\u8868\u5185\uff08\u5f53\u524d\u552f\u4e00\u6210\u5458 <code>product-compatibility-fixture</code>\uff09\uff1b\u4efb\u4f55\u6cbf\u7528\u65e7\u72ec\u7acb\u89d2\u8272 provenance \u8bcd\u6c47\u7684\u5de5\u4ef6\u90fd\u4f1a\u88ab\u5224\u8fdd\u89c4 P6-literals \u9664\u8bc1\u660e\u811a\u672c\u81ea\u8eab\uff08\u62d2\u8bfb\u6f14\u793a\u8005\uff0c\u53d7 P4 \u7ea6\u675f\uff09\u5916\uff0c\u4efb\u4f55\u5ba1\u8ba1\u6a21\u5757\u7684\u5b57\u7b26\u4e32\u5b57\u9762\u91cf\u90fd\u4e0d\u5f97\u70b9\u540d\u751f\u6210\u5668\u81ea\u6d4b\u8868\u6216 oracle \u5224\u636e\u6587\u4ef6 <p>\u63a8\u7406\u94fe\u4e0e\u80fd\u529b\u8fb9\u754c\uff1aP3 \u4fdd\u8bc1\u88c1\u51b3\u8f93\u5165\u53ea\u80fd\u6765\u81ea\u5ba1\u8ba1\u6811\uff1bP4 \u8bc1\u660e\u751f\u6210\u5668/oracle \u5de5\u4ef6\u5728\u8fd0\u884c\u65f6\u4e0d\u53ef\u8bfb\uff1bP6 \u8bc1\u660e\u5176\u6587\u4ef6\u540d\u5728\u4ee3\u7801\u4e2d\u4e0d\u53ef\u5f15\u7528\uff1bP5 \u673a\u68b0\u7981\u6b62\u65e7\u72ec\u7acb\u89d2\u8272 provenance \u8bcd\u6c47\u56de\u6f6e\u3002\u56e0\u6b64\u8fd0\u884c\u65f6\u4e0d\u5b58\u5728\u4efb\u4f55\u628a\u751f\u6210\u5668\u9884\u671f\u53d8\u6210\u5ba1\u8ba1\u5224\u636e\u7684\u8def\u5f84\u2014\u2014\u8fd9\u8bc1\u660e\u7684\u662f\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u3002\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u662f\u5426\u72ec\u7acb\u4e0d\u5728\u673a\u68b0\u8bc1\u660e\u80fd\u529b\u4e4b\u5185\uff0c\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u6700\u7ec8\u63a5\u53d7\u3002</p>"},{"location":"integration/audit/independence/#\u53cd\u5411\u62e5\u6709\u7981\u4ee4","title":"\u53cd\u5411\u62e5\u6709\u7981\u4ee4","text":"<p>Contracts \u4fa7\u65b0\u589e\u7684 <code>src/audit-surface.mjs</code> \u662f\u7eaf\u53ea\u8bfb\u6295\u5f71\uff1a\u4e0d\u63a5\u6536\u56de\u8c03\u3001\u4e0d\u6ce8\u518c\u4efb\u4f55\u4e1c\u897f\u3001\u4e0d import \u4efb\u4f55\u5ba1\u8ba1\u5de5\u4ef6\uff1b<code>packages/skill-family-contracts/test/audit-surface.test.mjs</code> \u542b\u4e00\u6761\u673a\u68b0\u6d4b\u8bd5\uff0c\u65ad\u8a00\u8be5\u6a21\u5757\u7684 import \u5168\u90e8\u4e3a <code>node:</code> \u6216\u672c\u5730\u76f8\u5bf9\u6a21\u5757\uff0c\u4e14\u6e90\u7801\u4e0d\u51fa\u73b0 integration/audit\u3001engineering-kit\u3001harness \u5b57\u6837\u3002\u4f9d\u8d56\u65b9\u5411\u6052\u4e3a Audit \u2192 Contracts\u3002</p>"},{"location":"integration/audit/independence/#\u517c\u5bb9\u6027\u8bc1\u660e\u5165\u53e3","title":"\u517c\u5bb9\u6027\u8bc1\u660e\u5165\u53e3","text":"<p>\u53d8\u5f02\u91cd\u653e\u4e0e\u57fa\u7ebf pin \u7684\u6bd4\u5bf9\uff08\u6458\u8981\u3001\u4e8b\u5b9e\u6e05\u5355\u3001\u5f15\u64ce\u53c2\u6570\u5b8c\u6574\u6027\uff09\u89c1 version-compatibility.md \u4e0e isolation-and-lockfile.md\uff1b\u5206\u7c7b\u5b66\u89c1 mutation-taxonomy.md\u3002pin \u662f\u4ea7\u54c1\u4fa7\u517c\u5bb9\u57fa\u7ebf\uff08<code>product-compatibility-fixture</code>\uff09\uff0c\u8bc1\u660e\u88ab\u6d88\u8d39\u7684 Contracts \u5305\u4e0e\u51bb\u7ed3\u57fa\u7ebf\u5b57\u8282\u4e00\u81f4\u3001\u6821\u9a8c\u8bed\u4e49\u4e00\u81f4\uff0c\u540c\u6837\u4e0d\u4f5c\u4efb\u4f55\u72ec\u7acb\u89d2\u8272\u58f0\u79f0\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/","title":"\u53d8\u5f02\u5206\u7c7b\u5b66\uff08\u51bb\u7ed3\uff09","text":"<p>FND-060 \u51bb\u7ed3\u4e94\u7c7b\u53d8\u5f02\u3002\u6bcf\u4e00\u7c7b\u90fd\u6709\u72ec\u7acb\u7684\u68c0\u6d4b\u673a\u5236\u4e0e\u6bcf\u7c7b \u22653 \u4f8b\u7684\u53d8\u5f02 fixture\uff1bfixture \u4e0e\u9884\u671f\u662f\u4ea7\u54c1\u4fa7\u7ef4\u62a4\u7684\u6d4b\u8bd5\u8bed\u6599\uff08provenance <code>product-fixture</code>\uff0c\u89c1\u4e0b\u65b9 fixture \u4fe1\u5c01\uff09\uff0c\u4e0d\u590d\u7528\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\uff0c\u4e0d\u8bfb\u53d6 oracle \u5224\u636e\uff08\u8be5\u8f93\u5165\u9694\u79bb\u7531 independence.md \u7684\u673a\u68b0\u8bc1\u660e\u5f3a\u5236\uff09\u3002\u5b83\u4eec\u8bc1\u660e\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u548c\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\uff1b\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002\u5206\u7c7b\u96c6\u5408\u662f\u95ed\u5408\u7684\uff1a\u65b0\u589e\u7c7b\u522b\u5c5e\u4e8e\u5ba1\u8ba1\u5206\u7c7b\u5b66\u53d8\u66f4\uff0c\u5fc5\u987b\u8d70\u65b0\u7684\u88c1\u51b3\u5e76\u66f4\u65b0\u672c\u6587\u4ef6\u4e0e <code>runner/lib/paths.mjs</code> \u7684 <code>MUTATION_CLASSES</code>\u3002</p> \u7c7b\u522b \u679a\u4e3e\u503c \u68c0\u6d4b\u673a\u5236 \u6d88\u8d39\u63a5\u53e3 \u5ba1\u8ba1\u7801 \u7ed3\u6784 <code>structure</code> \u4e25\u683c\u65b9\u8a00\u4e0b\u7684 schema \u6821\u9a8c\u62d2\u7edd <code>validateDocument</code>\uff08strict, 2020-12\uff09 AUD-M1-STRUCT \u8bed\u4e49 <code>semantics</code> \u7ed3\u6784\u5408\u6cd5\u4f46\u8fdd\u53cd\u51bb\u7ed3\u8bed\u4e49\uff08\u534f\u8bae\u767b\u8bb0\u3001\u64cd\u4f5c\u8bcd\u8868\u3001params \u5951\u7ea6\u3001\u9519\u8bef\u7801\u6210\u5458\u8d44\u683c\uff09 <code>findProtocol</code>\u3001<code>checkOperation</code>\u3001<code>isRegisteredErrorCode</code> AUD-M2-SEM \u6458\u8981 <code>digest</code> \u89c4\u8303\u5316 JSON \u7684 SHA-256 \u4e0e\u51bb\u7ed3 pin \u4e0d\u4e00\u81f4 <code>digestDocument</code> AUD-M3-DIGEST \u9057\u6f0f <code>omission</code> \u51bb\u7ed3\u5fc5\u5907\u90e8\u4ef6\u7f3a\u5931\uff08\u767b\u8bb0\u3001\u89c4\u5219\u8986\u76d6\u3001\u9519\u8bef\u7801\u6210\u5458\uff09 \u57fa\u7ebf pin \u4e8b\u5b9e\u6e05\u5355\u5bf9\u6bd4 AUD-M4-OMIT \u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31 <code>engine</code> \u5f15\u64ce\u53c2\u6570\u5b8c\u6574\u6027\u5bf9\u6bd4\uff08\u9884\u7b97\u3001\u6821\u9a8c\u7b56\u7565\u3001\u68c0\u67e5\u7c7b\u578b\u95ed\u96c6\u3001\u7a33\u5b9a\u6027\u653f\u7b56\uff09 <code>describeAuditSurface</code> + \u57fa\u7ebf pin AUD-M5-ENGINE"},{"location":"integration/audit/mutation-taxonomy/#\u5404\u7c7b\u522b\u5b9a\u4e49\u4e0e\u5224\u636e","title":"\u5404\u7c7b\u522b\u5b9a\u4e49\u4e0e\u5224\u636e","text":""},{"location":"integration/audit/mutation-taxonomy/#M1-\u7ed3\u6784structure","title":"M1 \u7ed3\u6784\uff08structure\uff09","text":"<p>\u53d8\u5f02\u6539\u53d8\u6587\u6863\u7684\u5f62\u72b6\uff1a\u7f3a\u5fc5\u586b\u6210\u5458\u3001\u7c7b\u578b\u6f02\u79fb\u3001\u672a\u58f0\u660e\u6210\u5458\u3001\u6a21\u5f0f\u8fdd\u89c4\u3002\u5224\u636e\uff1a\u5728 <code>2020-12</code> \u65b9\u8a00\u3001<code>strict</code> \u7b56\u7565\u4e0b\uff0c\u6587\u6863\u5fc5\u987b\u88ab\u62d2\u7edd\uff0c\u4e14\u7a33\u5b9a\u7801\u7b49\u4e8e fixture \u58f0\u660e\u7684 <code>expect.observedErrorCode</code>\uff08\u672c\u7c7b\u5168\u90e8\u4e3a SFC1001\uff09\u3002\u9884\u671f\u7531\u4ea7\u54c1\u4fa7\u5bf9\u7167\u76f8\u5e94 schema \u7684 required/pattern/additionalProperties \u63a8\u5bfc\uff0c\u4e0d\u53d6\u81ea\u751f\u6210\u5668\u81ea\u6d4b\u9884\u671f\u8868\u6216 oracle \u5224\u636e\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#M2-\u8bed\u4e49semantics","title":"M2 \u8bed\u4e49\uff08semantics\uff09","text":"<p>\u53d8\u5f02\u4fdd\u6301 schema \u5408\u6cd5\u6027\uff0c\u4f46\u8fdd\u53cd\u51bb\u7ed3\u7684\u767b\u8bb0\u8bed\u4e49\u3002\u4e09\u4e2a\u8bed\u4e49\u68c0\u67e5\u70b9\uff08fixture \u7528 <code>expect.semanticCheck</code> \u58f0\u660e\uff09\uff1a</p> <ul> <li><code>protocol-registered</code>\uff1a\u534f\u8bae\u540d/\u7248\u672c\u5fc5\u987b\u5728\u767b\u8bb0\u8868\u4e2d\uff0c\u5426\u5219 SFC1011\uff1b</li> <li><code>operation-vocabulary</code>\uff1a\u64cd\u4f5c\u540d\u5fc5\u987b\u5728\u534f\u8bae\u7248\u672c\u7684\u51bb\u7ed3\u8bcd\u8868\u5185\uff08\u5426\u5219 SFC2002\uff09\uff0cparams \u5fc5\u987b\u6ee1\u8db3\u8be5\u64cd\u4f5c\u7684\u51bb\u7ed3 params \u5951\u7ea6\uff08\u5426\u5219 SFC2003\uff09\uff1b</li> <li><code>error-code-registered</code>\uff1aoperation-result \u4e2d\u7684\u9519\u8bef\u7801\u5fc5\u987b\u662f\u51bb\u7ed3\u767b\u8bb0\u8868\u6210\u5458\uff08\u5f62\u72b6\u5408\u6cd5\u4f46\u672a\u767b\u8bb0 \u2192 SFC1009\uff09\u3002</li> </ul>"},{"location":"integration/audit/mutation-taxonomy/#M3-\u6458\u8981digest","title":"M3 \u6458\u8981\uff08digest\uff09","text":"<p>\u53d8\u5f02\u4fdd\u6301\u7ed3\u6784\u4e0e\u8bed\u4e49\uff0c\u4ec5\u6539\u53d8\u89c4\u8303\u5316\u5b57\u8282\uff08\u63aa\u8f9e\u6539\u5199\u3001\u540c\u4e49\u66ff\u6362\uff09\u3002\u5224\u636e\uff1a<code>digestDocument(input)</code> \u5fc5\u987b\u4e0d\u7b49\u4e8e\u57fa\u7ebf pin \u4e2d <code>documentDigests[expect.pinField]</code>\u3002\u8fd9\u662f\u552f\u4e00\u80fd\u6355\u83b7\"\u542b\u4e49\u4e0d\u53d8\u3001\u5b57\u8282\u6539\u53d8\"\u7684\u7c7b\u522b\u3002\u89c4\u8303\u5316\u89c4\u5219\u7531 Contracts \u7684 <code>canonicalJson</code> \u51bb\u7ed3\uff1a\u5bf9\u8c61\u952e\u9010\u7ea7\u5b57\u5178\u5e8f\u6392\u5e8f\u3001\u6570\u7ec4\u4fdd\u5e8f\u3001\u53ea\u63a5\u53d7 JSON \u6570\u636e\u7c7b\u578b\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#M4-\u9057\u6f0fomission","title":"M4 \u9057\u6f0f\uff08omission\uff09","text":"<p>\u53d8\u5f02\u4ece\u51bb\u7ed3\u6587\u6863\u4e2d\u5220\u9664\u5fc5\u5907\u90e8\u4ef6\u3002\u4e09\u4e2a\u8986\u76d6\u68c0\u67e5\uff08fixture \u7528 <code>expect.check</code> \u58f0\u660e\uff09\uff1a</p> <ul> <li><code>registry-schema-coverage</code>\uff1a\u5f53\u524d\u57fa\u7ebf pin \u4e2d\u7684\u5168\u90e8\u9876\u5c42\u5bf9\u8c61\u90fd\u5fc5\u987b\u767b\u8bb0\uff1b</li> <li><code>rules-checktype-coverage</code>\uff1a\u4e5d\u4e2a\u68c0\u67e5\u7c7b\u578b\u6bcf\u4e2a\u90fd\u5fc5\u987b\u88ab\u81f3\u5c11\u4e00\u6761 mandatory \u89c4\u5219\u8986\u76d6\uff1b</li> <li><code>error-code-coverage</code>\uff1a\u51bb\u7ed3\u9519\u8bef\u7801\u6e05\u5355\u4e00\u4e2a\u4e0d\u80fd\u5c11\u3002</li> </ul> <p>\u5224\u636e\uff1a\u89c2\u5bdf\u5230\u7684\u7f3a\u5931\u6e05\u5355\u5fc5\u987b\u4e0e <code>expect.missing</code> \u5b8c\u5168\u4e00\u81f4\uff08\u591a\u62a5\u3001\u6f0f\u62a5\u90fd\u7b97 fixture \u5931\u8d25\uff09\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#M5-\u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31engine","title":"M5 \u68c0\u67e5\u5f15\u64ce\u88ab\u524a\u5f31\uff08engine\uff09","text":"<p>\u53d8\u5f02\u4e0d\u5220\u9664\u90e8\u4ef6\uff0c\u800c\u662f\u653e\u5bbd\u5f15\u64ce\u53c2\u6570\u3002\u56db\u4e2a\u5b8c\u6574\u6027\u68c0\u67e5\uff08fixture \u7528 <code>expect.check</code> \u58f0\u660e\uff09\uff1a</p> <ul> <li><code>rules-budget</code>\uff1a\u9884\u7b97\u6570\u503c\uff08firstVersionMax=20\u3001absoluteMax=30\uff09\u4e0d\u5f97\u53d8\u5316\uff1b</li> <li><code>validation-policies</code>\uff1astrict \u7b56\u7565\u5fc5\u987b\u4fdd\u6301 coerceTypes=false\u3001useDefaults=false\u3001allErrors=true\u3001validateFormats=true\uff1btolerant \u7b56\u7565\u9010\u952e\u5bf9\u6bd4\uff1b</li> <li><code>check-type-set</code>\uff1a\u4e5d\u4e2a\u68c0\u67e5\u7c7b\u578b\u662f\u95ed\u96c6\uff0c\u7f3a\u4e00\u4e0d\u53ef\uff1b</li> <li><code>error-code-stability</code>\uff1a\u9519\u8bef\u7801 append-only \u7a33\u5b9a\u6027\u653f\u7b56\u539f\u6587\u4e0d\u5f97\u6539\u5199\u3002</li> </ul> <p>\u5224\u636e\uff1a\u89c2\u5bdf\u5230\u7684\u88ab\u524a\u5f31\u5b57\u6bb5\u6e05\u5355\u5fc5\u987b\u4e0e <code>expect.weakened</code> \u5b8c\u5168\u4e00\u81f4\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#fixture-\u4fe1\u5c01\u51bb\u7ed3","title":"fixture \u4fe1\u5c01\uff08\u51bb\u7ed3\uff09","text":"<p>\u6bcf\u4e2a fixture \u662f\u4e00\u4e2a JSON \u6587\u4ef6\uff1a</p> \u5b57\u6bb5 \u8981\u6c42 <code>schemaVersion</code> \u5e38\u91cf <code>1</code> <code>kind</code> \u5e38\u91cf <code>skill-family.audit.mutation-fixture</code> <code>fixtureId</code> <code>^AUD-M[1-5]-[0-9]{2}$</code>\uff0c\u7b2c 6 \u4f4d\u6570\u5b57\u5fc5\u987b\u4e0e\u7c7b\u522b\u4e00\u81f4 <code>mutationClass</code> \u4e94\u7c7b\u4e4b\u4e00\uff0c\u4e14\u5fc5\u987b\u4e0e\u6240\u5728\u76ee\u5f55\u4e00\u81f4 <code>provenance</code> \u5fc5\u987b\u4e3a <code>product-fixture</code>\uff08\u673a\u68b0\u68c0\u67e5 P5\uff09 <code>description</code> \u53d8\u5f02\u610f\u56fe\u8bf4\u660e <code>target</code> \u88ab\u6d4b\u5bf9\u8c61\uff08schema/\u6587\u4ef6/\u6295\u5f71\uff09 <code>input</code> \u53d8\u5f02\u540e\u7684\u5b8c\u6574\u6587\u6863\u6216\u6295\u5f71 <code>expect.detected</code> \u5fc5\u987b\u4e3a <code>true</code>\uff08\u53d8\u5f02\u5fc5\u987b\u88ab\u68c0\u51fa\uff09 <code>expect.auditCode</code> \u5fc5\u987b\u7b49\u4e8e\u8be5\u7c7b\u522b\u7684\u5ba1\u8ba1\u7801 <p>provenance \u73b0\u884c\u4e8b\u5b9e\uff1a\u53d8\u5f02 fixture \u662f\u4ea7\u54c1\u4fa7\u6d4b\u8bd5\u8bed\u6599\uff08<code>product-fixture</code>\uff09\uff0c\u57fa\u7ebf pin \u662f\u4ea7\u54c1\u4fa7\u517c\u5bb9\u57fa\u7ebf\uff08<code>product-compatibility-fixture</code>\uff0c\u89c1 version-compatibility.md\uff09\uff1b\u5b83\u4eec\u8bc1\u660e\u4ea7\u54c1\u4fa7\u8f93\u5165\u9694\u79bb\u548c\u517c\u5bb9\u6027\uff0c\u4e0d\u8bc1\u660e\u4f5c\u8005\u3001\u6a21\u578b\u6216\u8ba4\u77e5\u72ec\u7acb\u3002\u5916\u90e8\u6700\u7ec8\u63a5\u53d7\u7531\u4ed3\u5916\u72ec\u7acb\u590d\u5ba1\u627f\u62c5\u3002\u5386\u53f2\u7ea0\u9519\uff1afixture \u4e0e pin \u66fe\u643a\u5e26\u65e7\u503c <code>independent-r2</code> \u4e0e\u72ec\u7acb\u4f5c\u8005\u53d9\u4e8b\uff0c\u8be5\u58f0\u79f0\u4e0e\u672c\u4ed3\u4e8b\u5b9e\u4e0d\u7b26\uff0c\u5df2\u4fee\u6b63\u4e3a\u4e0a\u8ff0\u5982\u5b9e\u8bcd\u6c47\uff1b\u7ea0\u9519\u4e0d\u6539\u53d8\u4efb\u4f55 fixture \u7684 <code>input</code>/<code>expect</code>\u3001digest \u6216 facts \u5b57\u6bb5\u3002</p>"},{"location":"integration/audit/mutation-taxonomy/#\u6570\u91cf\u51bb\u7ed3\u4e0e\u6f0f\u62a5\u5f8b","title":"\u6570\u91cf\u51bb\u7ed3\u4e0e\u6f0f\u62a5\u5f8b","text":"<ul> <li>\u6bcf\u7c7b fixture \u2265 3\uff08\u5f53\u524d\u5b9e\u9645\uff1a\u7ed3\u6784 4\u3001\u8bed\u4e49 4\u3001\u6458\u8981 3\u3001\u9057\u6f0f 3\u3001\u5f15\u64ce 4\uff0c\u5171 18\uff09\uff1b</li> <li>\u8986\u76d6\u95e8\u8981\u6c42\u6bcf\u7c7b <code>fixtures \u2265 3 \u4e14 detected \u2265 1</code>\uff0c\u4e0d\u6ee1\u8db3\u4ea7\u751f AUD-MISS-001 \u5e76\u5f3a\u5236 verdict fail\uff1b</li> <li>\u6f0f\u62a5\u5f8b\u7684\u8d1f\u4f8b\u9a8c\u8bc1\u7531 <code>runner/selftest-negative.mjs</code> \u6267\u884c\uff1a\u9010\u7c7b\u7981\u7528\u68c0\u6d4b\u5668\uff0c\u65ad\u8a00\u6bcf\u6b21\u7834\u574f\u90fd\u4f7f\u8fd0\u884c\u5931\u8d25\u3002</li> </ul>"},{"location":"integration/audit/version-compatibility/","title":"\u7248\u672c\u517c\u5bb9\u5b9a\u4e49","text":"<p>\u5ba1\u8ba1\u6d88\u8d39 Contracts \u4ee5\u4e24\u4e2a\u7248\u672c\u5750\u6807 + \u4e00\u4e2a\u6458\u8981\u4e3a\u51c6\uff1a</p> \u5750\u6807 \u6765\u6e90 \u542b\u4e49 <code>contractsVersion</code> Contracts \u51bb\u7ed3\u7248\u672c\uff08\u5f53\u524d <code>1.15.0</code>\uff09 \u673a\u5668\u5951\u7ea6\u5185\u5bb9\u7684\u7248\u672c <code>auditSurfaceVersion</code> \u5ba1\u8ba1\u6d88\u8d39\u63a5\u53e3\u81ea\u8eab\u7684\u7248\u672c\uff08\u5f53\u524d <code>1</code>\uff09 \u6d88\u8d39\u9762\u5f62\u72b6\u7684\u7248\u672c <code>surfaceDigest</code> <code>digestAuditSurface()</code>\uff08SHA-256\uff09 \u6d88\u8d39\u9762\u7684\u7cbe\u786e\u5b57\u8282\u6307\u7eb9 <p>\u4e09\u8005\u90fd\u7531 <code>describeAuditSurface()</code> \u4e00\u6b21\u6027\u7ed9\u51fa\uff0c\u5ba1\u8ba1\u4fa7\u628a\u5b83\u4eec\u4e0e\u5f53\u524d Contracts \u7248\u672c\u5bf9\u5e94\u7684\u57fa\u7ebf pin \u6bd4\u5bf9\uff08\u5f53\u524d\u4e3a <code>baseline/contracts-1.15.0.pin.json</code>\uff09\u3002</p>"},{"location":"integration/audit/version-compatibility/#\u517c\u5bb9\u89c4\u5219","title":"\u517c\u5bb9\u89c4\u5219","text":"<p>\u4e00\u4e2a\u88ab\u6d88\u8d39\u7684 Contracts \u5305\u4e0e\u67d0\u4e2a\u57fa\u7ebf pin \u517c\u5bb9\uff0c\u5f53\u4e14\u4ec5\u5f53\u540c\u65f6\u6ee1\u8db3\uff1a</p> <ol> <li><code>contractsVersion</code> \u4e0e pin \u76f8\u540c\uff1b</li> <li><code>auditSurfaceVersion</code> \u4e0e pin \u76f8\u540c\uff1b</li> <li><code>digestAuditSurface()</code> \u4e0e pin \u7684 <code>surfaceDigest</code> \u76f8\u540c\u3002</li> </ol> <p>\u7531\u4e8e surface \u6458\u8981\u8986\u76d6\u4e86\u767b\u8bb0\u8868\u3001\u9519\u8bef\u7801\u3001\u89c4\u5219\u3001kernel \u534f\u8bae\u3001\u5168\u90e8 schema \u6587\u6863\u4e0e\u5f15\u64ce\u53c2\u6570\uff0c\u6458\u8981\u76f8\u540c\u8574\u542b\u5185\u5bb9\u9010\u5b57\u8282\u7b49\u4ef7\uff08\u89c4\u8303\u5316\u610f\u4e49\u4e0b\uff09\u3002\u4e09\u4e2a\u6761\u4ef6\u4efb\u4e00\u4e0d\u6ee1\u8db3\u5373\u4e0d\u517c\u5bb9\uff1a\u5ba1\u8ba1\u5fc5\u987b\u62a5\u544a AUD-BASE-001\uff08\u8fd0\u884c\u671f\u57fa\u7ebf\u68c0\u67e5\uff09\u6216 AUD-LOCK-001\uff08\u5305\u9501\u9a8c\u8bc1\uff09\uff0c\u5e76\u62d2\u7edd\u7ed9\u51fa\u901a\u8fc7\u88c1\u51b3\u3002</p>"},{"location":"integration/audit/version-compatibility/#\u53d8\u66f4\u5206\u7ea7","title":"\u53d8\u66f4\u5206\u7ea7","text":"\u53d8\u66f4 \u5206\u7ea7 \u9700\u8981\u7684\u52a8\u4f5c \u4e0d\u6539\u53d8 surface \u5b57\u8282\u7684\u53d8\u66f4\uff08\u5982\u6ce8\u91ca\u3001\u6d4b\u8bd5\uff09 \u65e0\u5f71\u54cd \u65e0\u9700\u65b0 pin \u6539\u53d8 surface \u5b57\u8282\u4f46\u4e0d\u6539\u53d8\u542b\u4e49\u7684\u53d8\u66f4 \u4e0d\u517c\u5bb9 \u7981\u6b62\u4ee5\"\u540c\u4e49\"\u4e3a\u7531\u514d\u68c0\uff1b\u5fc5\u987b\u8d70\u5408\u540c\u53d8\u66f4\u5e76\u91cd\u65b0\u6279\u51c6 pin \u65b0\u589e\u5ba1\u8ba1\u6d88\u8d39\u63a5\u53e3\uff08\u53ea\u8bfb\u3001\u589e\u91cf\uff09 auditSurfaceVersion \u9012\u589e \u65b0 pin + \u672c\u6587\u4ef6\u66f4\u65b0 \u6539\u53d8\u65e2\u6709\u6d88\u8d39\u63a5\u53e3\u542b\u4e49 auditSurfaceVersion \u9012\u589e + \u5408\u540c\u53d8\u66f4 \u65b0 pin\uff1b\u65e7 pin \u5b58\u6863\u4e0d\u5220 Contracts \u7248\u672c\u6f14\u8fdb\uff081.0.0 \u2192 \u4e0b\u4e00\u7248\u672c\uff09 contractsVersion \u53d8\u5316 \u65b0\u7684\u57fa\u7ebf pin \u6587\u4ef6\uff1b\u65e7 pin \u6587\u4ef6\u53ea\u8bfb\u5b58\u6863"},{"location":"integration/audit/version-compatibility/#pin-\u751f\u547d\u5468\u671f","title":"pin \u751f\u547d\u5468\u671f","text":"<ul> <li>\u6bcf\u4e2a\u7ecf\u7248\u672c\u5316\u6279\u51c6\u7684 Contracts \u53d1\u5e03\u5bf9\u5e94\u4e00\u4e2a pin \u6587\u4ef6\uff1a<code>baseline/contracts-&lt;version&gt;.pin.json</code>\uff1b</li> <li>pin \u662f append-only\uff1a\u6279\u51c6\u540e\u4e0d\u518d\u539f\u5730\u7f16\u8f91\uff0c\u4f5c\u5e9f\u4ee5\u65b0 pin \u53d6\u4ee3\u5e76\u5728 <code>note</code> \u4e2d\u8bf4\u660e\uff1b</li> <li>pin \u7531\u4ea7\u54c1\u4fa7\u5728\u51bb\u7ed3\u65f6\u523b\u6784\u9020\uff08provenance <code>product-compatibility-fixture</code>\uff09\uff1a\u6458\u8981\u6765\u81ea\u5bf9\u5df2\u51bb\u7ed3\u4ea7\u7269\u7684 <code>digestAuditSurface()</code> \u673a\u68b0\u8ba1\u7b97\uff0c\u4e8b\u5b9e\u6e05\u5355\u76f4\u63a5\u5bf9\u7167\u5408\u540c\u6587\u6863\u63a8\u5bfc\uff0c\u4e0d\u53d6\u81ea\u751f\u6210\u5668\u6216 oracle\uff1b\u672c\u4ed3\u5e93\u4e0d\u5b58\u5728\u72ec\u7acb\u7684\u7b2c\u4e8c\u5ba1\u9605\u4f1a\u8bdd\uff0cpin \u4e0d\u4f5c\u4efb\u4f55\u72ec\u7acb\u89d2\u8272\u58f0\u79f0\uff1b</li> <li>\u8bda\u5b9e\u6027\u4fee\u6b63\uff082026-08-05\uff09\uff1a\u65e7 pin\uff081.0.0\u30011.1.0\uff09\u66fe\u643a\u5e26 <code>independent-r2</code> provenance \u4e0e\u72ec\u7acb\u91cd\u7b7e\u53d9\u4e8b\uff0c\u8be5\u58f0\u79f0\u4e0e\u672c\u4ed3\u4e8b\u5b9e\u4e0d\u7b26\uff0c\u5df2\u5c31\u5730\u4fee\u6b63 provenance \u4e0e note\uff1b\u4fee\u6b63\u53ea\u89e6\u53ca provenance/note \u4e24\u5904\u8bda\u5b9e\u6027\u5b57\u6bb5\uff0c\u4e0d\u6539\u53d8\u4efb\u4f55 digest \u6216 facts \u5b57\u6bb5\uff0c\u65e7 pin \u7ee7\u7eed\u4f5c\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\uff1b</li> <li>Contracts 1.1.1\uff082026-08-05\uff09\uff1a\u4ec5\u63cf\u8ff0\u8865\u4e01\uff08migration-manifest schema \u4e09\u5904 description \u6539\u5199\u4e3a\u7a33\u5b9a\u4ea7\u54c1\u8bed\u4e49\uff1b\u65e0\u4efb\u4f55\u6821\u9a8c\u5173\u952e\u5b57\u3001\u516c\u5f00 API\u3001\u9519\u8bef\u7801\u3001\u89c4\u5219\u6216\u5f15\u64ce\u53c2\u6570\u53d8\u5316\uff09\u3002\u6309\u672c\u751f\u547d\u5468\u671f\u65b0\u589e <code>contracts-1.1.1.pin.json</code> \u4e3a\u73b0\u884c\u57fa\u7ebf\uff0c<code>contracts-1.1.0.pin.json</code> \u8f6c\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u30021.1.1 pin \u76f8\u5bf9 1.1.0 pin \u7684\u51c6\u786e\u4e8b\u5b9e\uff1a\u6821\u9a8c\u8bed\u4e49\u548c\u4e8b\u5b9e\u6e05\u5355\u4e0d\u53d8\uff08<code>facts</code> \u9010\u9879\u4e00\u81f4\uff09\uff1b\u56db\u4e2a Contracts \u6587\u6863\uff08registry\u3001error-codes\u3001rules\u3001kernel-protocol\uff09\u56e0\u5185\u5d4c <code>contractsVersion</code> \u4ece <code>1.1.0</code> \u66f4\u65b0\u5230 <code>1.1.1</code> \u800c\u6539\u53d8\u6458\u8981\uff1bmigration-manifest Schema \u56e0\u4e0a\u8ff0\u4e09\u5904 description \u66f4\u65b0\u800c\u6539\u53d8\u6458\u8981\uff1b\u5176\u4f59\u4e94\u4e2a Schema\uff08project-manifest\u3001profile-descriptor\u3001managed-file-lock\u3001operation-request\u3001operation-result\uff09\u6458\u8981\u4e0d\u53d8\u3002<code>proof-independence.mjs</code> \u7684 P5 \u5f3a\u5236\u8fd9\u5957\u5982\u5b9e\u58f0\u660e\u7684 provenance \u8bcd\u6c47\uff08pin\uff1a<code>product-compatibility-fixture</code>\uff1b\u53d8\u5f02\u5939\u5177\uff1a<code>product-fixture</code>\uff09\uff1b</li> <li>Contracts 1.2.0\uff082026-08-09\uff09\uff1a\u62a5\u544a\u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>report-model</code>\u3001<code>report-binding</code> \u4e24\u4e2a\u9876\u5c42\u5951\u7ea6\u548c SFC3001\uff5eSFC3003 \u62a5\u544a\u9519\u8bef\u7801\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002</li> <li>Contracts 1.3.0\uff082026-08-09\uff09\uff1a\u5bbf\u4e3b\u63a5\u5165\u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>host-descriptor</code>\u3001<code>host-capability-fact</code>\u3001<code>adapter-build-manifest</code>\u3001<code>host-operation-plan</code>\u3001<code>host-operation-receipt</code> \u4e94\u4e2a\u9876\u5c42\u5951\u7ea6\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002</li> <li>Contracts 1.4.0\uff082026-08-09\uff09\uff1a\u6301\u4e45\u72b6\u6001\u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>state-event-envelope</code>\u3001<code>state-snapshot-metadata</code> \u4e24\u4e2a\u9876\u5c42\u5951\u7ea6\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002</li> <li>Contracts 1.5.0\uff082026-08-16\uff09\uff1aFND-ADR-010/011 \u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>declared-read-surface-result</code>\u3001<code>structured-scan-policy</code> \u4e24\u4e2a\u9876\u5c42\u5951\u7ea6\uff08\u9876\u5c42\u5bf9\u8c61\u96c6\u5408 20 \u2192 22\uff09\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\u3002\u8be5 pin \u7684\u6458\u8981\u4e0e\u4e8b\u5b9e\u5747\u4ece\u5f53\u524d <code>describeAuditSurface()/digestAuditSurface()</code> \u673a\u68b0\u6295\u5f71\uff0cprovenance \u4ecd\u4e3a <code>product-compatibility-fixture</code>\u3002</li> <li>Contracts 1.6.0\uff082026-08-18\uff09\uff1a\u5ba1\u8ba1\u6574\u6539 C5 \u80fd\u529b\u7ebf\u589e\u91cf\uff0c\u4e0d\u662f\u63cf\u8ff0\u8865\u4e01\uff1a\u65b0\u589e <code>public-boundary-declaration</code>\u3001<code>platform-difference-registry</code>\u3001<code>observation-scope</code>\u3001<code>profile-adoption-declaration</code>\u3001<code>audit-baseline-pin</code>\u3001<code>token-estimate-record</code> \u516d\u4e2a\u9876\u5c42\u5951\u7ea6\uff08\u9876\u5c42\u5bf9\u8c61\u96c6\u5408 24 \u2192 30\uff09\uff0c\u6539\u53d8\u4e86\u516c\u5f00\u673a\u5668\u5408\u540c\u4e0e\u5ba1\u8ba1\u4e8b\u5b9e\uff1b\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\uff0c\u89c4\u5219\u4e0e kernel \u534f\u8bae\u4ec5\u968f <code>contractsVersion</code> \u5b57\u6bb5\u66f4\u65b0\u3002pin \u5408\u540c\u672c\u8eab\uff08<code>audit-baseline-pin</code>\uff09\u4e0e\u6d88\u8d39\u9762\u6821\u9a8c\u51fd\u6570 <code>verifyBaselinePin()</code>\uff08AUD-BASE-001 / AUD-LOCK-001 \u7f16\u7801\uff09\u5728\u672c\u7248\u672c\u843d\u5730\uff08GAP-5 / SG-28\uff09\u3002</li> <li>Contracts 1.7.0\uff082026-08-22\uff09\uff1aFND-ADR-013 \u7684 Project Profile \u80fd\u529b\u7ebf\u589e\u91cf\u3002\u65b0\u589e <code>project-profile</code> \u9876\u5c42\u5951\u7ea6\uff08\u9876\u5c42\u5bf9\u8c61\u96c6\u5408 30 \u2192 31\uff09\uff0c\u7edf\u4e00 scaffold \u9879\u76ee\u6839\u58f0\u660e\u7684\u673a\u5668\u7ed3\u6784\uff1b\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\u3002<code>contracts-1.7.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece <code>describeAuditSurface()/describeBaselinePin()</code> \u673a\u68b0\u751f\u6210\uff0c\u5e76\u7ecf\u8fc7\u5408\u540c\u6821\u9a8c\u548c <code>verifyBaselinePin()</code> \u81ea\u6821\u9a8c\uff1b\u73b0\u4f5c\u4e3a\u5386\u53f2\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u4fdd\u7559\u3002</li> <li>Contracts 1.8.0\uff082026-08-24\uff09\uff1a\u65b0\u589e\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>source-authority-receipt</code> \u9876\u5c42\u5951\u7ea6\uff0831 \u2192 32\uff09\uff0c\u4ee5\u53ca\u7eaf\u6821\u9a8c\u3001\u89e3\u6790 API\uff1b\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\u3002<code>contracts-1.8.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.7.0 \u53ca\u66f4\u65e9 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.9.0\uff082026-08-24\uff09\uff1a\u65b0\u589e\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>filesystem-root-binding</code>\u3001<code>fixed-set-publication-manifest</code> \u548c <code>fixed-set-publication-receipt</code> \u4e09\u4e2a\u9876\u5c42\u5951\u7ea6\uff0832 \u2192 35\uff09\u3002\u9519\u8bef\u7801\u3001\u89c4\u5219\u3001\u68c0\u67e5\u7c7b\u578b\u3001\u9884\u7b97\u3001Kernel \u64cd\u4f5c\u548c\u6821\u9a8c\u7b56\u7565\u5747\u672a\u53d8\u5316\u3002<code>contracts-1.9.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.8.0 \u53ca\u66f4\u65e9 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.10.0\uff082026-08-24\uff09\uff1aFoundation 0.10.0 \u6269\u5c55\u5df2\u767b\u8bb0\u7684 <code>host-descriptor</code>\u3001<code>host-probe-result</code> \u548c <code>host-operation-plan</code> stable Schema\uff0c\u52a0\u5165\u6709\u9650 <code>manual</code> \u652f\u6301\u3001<code>maturity/sourceAliases</code> \u4e0e digest \u7ed1\u5b9a\u7684\u672c\u5730\u751f\u547d\u5468\u671f\u8ba1\u5212\u8bed\u4e49\uff1b\u540c\u65f6\u65b0\u589e\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>adapter-peer-verification-request</code> \u4e0e <code>adapter-peer-verification-result</code> R05 Schema\uff0c\u9876\u5c42\u5bf9\u8c61\u7531 35 \u7c7b\u589e\u81f3 37 \u7c7b\u3002\u672a\u65b0\u589e SFC \u9519\u8bef\u7801\uff0cregistry\u3001rules\u3001error-codes \u91cd\u65b0\u8bb0\u5f55 1.10.0 \u5750\u6807\uff0cKernel \u534f\u8bae\u4ecd\u6309\u65e2\u6709\u751f\u547d\u5468\u671f\u4fdd\u6301 1.8.0 \u5b57\u8282\u57fa\u7ebf\u3002<code>contracts-1.10.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.9.0 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.11.0\uff082026-08-25\uff09\uff1aFoundation 0.11.0 \u65b0\u589e <code>host-verification-request</code> \u4e0e <code>host-verification-result</code> \u4e1a\u52a1\u4e2d\u7acb Schema\uff0c\u9876\u5c42\u5bf9\u8c61\u7531 37 \u7c7b\u589e\u81f3 39 \u7c7b\uff1bHarness \u589e\u52a0\u539f\u59cb\u5b57\u8282 sink\uff0cEngineering Kit \u63d0\u4f9b candidate \u53d7\u7ea6\u675f\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5165\u53e3\uff08Kimi \u4e0e WorkBuddy \u4e24\u4e2a\u5185\u7f6e driver\uff0c\u590d\u7528\u73b0\u6709\u767b\u5f55\u6001\uff09\u3002<code>contracts-1.11.0.pin.json</code> \u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00 Contracts \u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.10.0 \u53ca\u66f4\u65e9 pin \u4fdd\u7559\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.12.0\uff082026-08-26\uff09\uff1a\u6269\u5c55\u65e2\u6709 <code>host-descriptor</code> \u7684\u56fa\u5b9a\u5bbf\u4e3b\u9a8c\u8bc1\u7ec4\u5408\uff0c\u5e76\u5141\u8bb8 <code>host-verification-result</code> \u5728\u9000\u51fa\u7801\u4e3a\u96f6\u4f46\u8f93\u51fa\u534f\u8bae\u4e0d\u5408\u6cd5\u65f6\u8868\u8fbe\u6267\u884c\u5931\u8d25\u3002\u9876\u5c42\u5bf9\u8c61\u4ecd\u4e3a 39 \u7c7b\uff0c\u65e0\u65b0\u589e Schema ID \u6216\u9519\u8bef\u7801\u3002registry\u3001rules\u3001error-codes \u66f4\u65b0\u7248\u672c\u5750\u6807\uff0cKernel \u4fdd\u6301 1.8.0 \u5b57\u8282\u57fa\u7ebf\u3002\u65b0 pin \u53ea\u7531 <code>scripts/baseline-pin-gen.mjs --update</code> \u4ece\u516c\u5f00\u8868\u9762\u751f\u6210\u5e76\u81ea\u6821\u9a8c\uff1b1.11.0 \u53ca\u66f4\u65e9 pin \u4e0d\u6539\u5199\u3002</li> <li>Contracts 1.13.0\uff082026-08-26\uff09\uff1a\u589e\u52a0 <code>plugin-verification-request</code>\u3001<code>plugin-verification-result</code> \u548c <code>filesystem-tree-observation</code> \u4e09\u4e2a\u5019\u9009\u9876\u5c42\u5951\u7ea6\uff0c\u9876\u5c42\u5bf9\u8c61\u7531 39 \u7c7b\u589e\u81f3 42 \u7c7b\uff1b\u540c\u65f6\u4e3a watchdog \u4fe1\u5c01\u589e\u52a0\u53ef\u9009\u7684\u6bcf\u6d41\u8f93\u51fa\u9650\u989d\u4e8b\u5b9e\uff0c\u672a\u542f\u7528\u9650\u989d\u7684\u65e7\u8c03\u7528\u4fdd\u6301\u539f\u5f62\u72b6\u3002<code>contracts-1.13.0.pin.json</code> \u7531\u516c\u5f00\u8868\u9762\u673a\u68b0\u751f\u6210\u5e76\u4fdd\u7559\u4e3a\u5386\u53f2\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.14.0\uff082026-08-28\uff09\uff1a\u589e\u52a0\u6d88\u8d39\u8005\u5951\u7ea6\u6d4b\u8bd5\u5411\u91cf\u4e0e\u80fd\u529b\u91c7\u7528\u5b57\u6bb5\uff0c\u660e\u786e\u533a\u5206\u5019\u9009\u53d1\u73b0\u3001\u8fc1\u79fb\u5b8c\u6210\u3001\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u548c\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\uff1b\u6d88\u8d39\u8005\u5411\u91cf\u4ecd\u662f\u5019\u9009\u6d4b\u8bd5\u5408\u540c\uff0c\u4e0d\u6539\u53d8\u65e2\u6709\u5bbf\u4e3b\u9a8c\u8bc1\u8eab\u4efd\u3002<code>contracts-1.14.0.pin.json</code> \u4fdd\u7559\u4e3a\u5386\u53f2\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>Contracts 1.15.0\uff082026-08-29\uff09\uff1a\u589e\u52a0 <code>executable-identity-observation</code>\u3001<code>skill-family-directory-verification-request</code> \u548c <code>skill-family-directory-verification-result</code> \u4e09\u4e2a\u5019\u9009\u9876\u5c42\u5951\u7ea6\uff0c\u5e76\u5c06 Kimi <code>driverVersion=1.0.0</code> \u4e0e\u95ed\u5408 <code>cliVersion=0.39.1</code> \u5206\u5f00\u3002\u9876\u5c42\u5bf9\u8c61\u7531 42 \u7c7b\u589e\u81f3 45 \u7c7b\uff1bKernel \u4ecd\u4e3a 1.8.0\uff0c\u5ba1\u8ba1\u6d88\u8d39\u9762\u4ecd\u4e3a <code>auditSurfaceVersion=1</code>\u3002\u5f53\u524d pin \u4e3a <code>baseline/contracts-1.15.0.pin.json</code>\uff0c\u5176 <code>supersedes</code> \u6307\u5411\u4e0d\u53ef\u53d8\u7684 <code>contracts-1.14.0.pin.json</code>\uff1b\u66f4\u65e9 pin \u5747\u7ee7\u7eed\u4f5c\u4e3a\u53ea\u8bfb\u517c\u5bb9\u5b58\u6863\u3002</li> <li>\u5ba1\u8ba1\u8fd0\u884c\u65f6\u5148\u505a\u5305\u9501\u9a8c\u8bc1\uff08\u89c1 isolation-and-lockfile.md\uff09\uff0c\u518d\u505a\u53d8\u5f02\u91cd\u653e\uff1bpin \u4e0d\u5339\u914d\u65f6\uff0c\u53d8\u5f02\u91cd\u653e\u7ed3\u679c\u4e0d\u5f97\u88ab\u91c7\u4fe1\u3002</li> </ul>"},{"location":"integration/audit/version-compatibility/#profile-\u884c\u4e3a\u53d8\u66f4\u7eaa\u5f8b2026-08-19D6","title":"profile \u884c\u4e3a\u53d8\u66f4\u7eaa\u5f8b\uff082026-08-19\uff0cD6\uff09","text":"<p>Foundation \u5bf9\u5916\u66b4\u9732\u7684 profile \u673a\u5236\u9762\u662f\u6d88\u8d39\u65b9 pin \u7684\u884c\u4e3a\u5951\u7ea6\uff0c\u5305\u62ec <code>FOUNDATION_MECHANISM_OPERATIONS</code> 8 \u4e2a operations \u4e0e <code>runner.mjs</code> \u76f4\u63a5\u5bfc\u51fa\uff08\u542b <code>publishFileExclusive</code> \u7b49\u51fd\u6570\u7684\u9009\u9879\u9762\uff09\u3002profile \u884c\u4e3a\u53d8\u66f4 = profile \u7248\u672c\u53d8\u66f4\uff1a\u884c\u4e3a\u8bed\u4e49\u6f02\u79fb\u4e0d\u5f97\u5728\u4e0d\u5347\u7248\u672c\u7684\u524d\u63d0\u4e0b\u53d1\u751f\u3002stability \u7ef4\u6301 candidate-only\uff08D6\uff09\u671f\u95f4\u540c\u6837\u9002\u7528\u2014\u2014candidate profile \u7684\u5b57\u8282\u4e00\u81f4\u6027\u7531 pin digest \u7ea6\u675f\uff0c\u884c\u4e3a\u8bed\u4e49\u53d8\u66f4\u5fc5\u987b\u8d70\u7248\u672c\u5750\u6807\uff0c\u4e0d\u56e0 candidate \u72b6\u6001\u800c\u8c41\u514d\u3002</p> \u53d8\u66f4 \u5206\u7ea7 \u9700\u8981\u7684\u52a8\u4f5c 8 \u4e2a operations \u4e4b\u4e00\u7684\u5206\u6d3e\u8bed\u4e49\u53d8\u5316\uff08\u53c2\u6570\u3001\u7ed3\u679c\u3001\u9519\u8bef kind\uff09 profile \u884c\u4e3a\u53d8\u66f4 \u5305\u7248\u672c\u9012\u589e\uff08candidate \u9636\u6bb5\u4e3a candidate \u7248\u672c\u9012\u589e\uff09+ \u672c\u6587\u4ef6\u66f4\u65b0 runner \u76f4\u63a5\u5bfc\u51fa\u9762\u53d8\u5316\uff08\u65b0\u589e/\u5220\u9664/\u6539\u53d8\u5bfc\u51fa\uff0c\u542b publish \u51fd\u6570\u65cf\uff09 profile \u884c\u4e3a\u53d8\u66f4 \u5305\u7248\u672c\u9012\u589e + \u672c\u6587\u4ef6\u66f4\u65b0 publish \u9009\u9879\u9762\u53d8\u5316\uff082026-08-19 D5 \u4e3a <code>publishFileExclusive</code> \u65b0\u589e <code>createParents</code> \u9009\u9879\u5373\u6b64\u7c7b\uff1b\u9009\u9879\u662f Foundation \u4fa7\u5951\u7ea6\uff0c\u6d88\u8d39\u9762\u53ea\u4f20\u53c2\uff09 profile \u884c\u4e3a\u53d8\u66f4 \u5305\u7248\u672c\u9012\u589e + \u672c\u6587\u4ef6\u66f4\u65b0 \u4e0d\u6539\u53d8\u884c\u4e3a\u7684\u5b57\u8282\u53d8\u66f4\uff08\u6ce8\u91ca\u3001\u683c\u5f0f\u5316\uff09 \u65e0\u5f71\u54cd \u65e0\u9700\u7248\u672c\u52a8\u4f5c\uff08pin digest \u4ecd\u6309\u65e2\u6709\u673a\u5236\u53d8\u5316\uff09 <p>\u6d88\u8d39\u65b9\u54cd\u5e94\u52a8\u4f5c\uff1a</p> <ol> <li>pin \u5347\u7ea7\uff1a\u6d88\u8d39\u65b9\u628a foundation-pin\uff08\u6216\u7b49\u4ef7\u9489\u624e\uff09\u5347\u7ea7\u5230\u542b\u8be5\u884c\u4e3a\u53d8\u66f4\u7684\u7248\u672c\uff1b\u7981\u6b62\u5728\u65e7 pin \u4e0a\u5047\u8bbe\u65b0\u884c\u4e3a\u3002</li> <li>adoption-lock \u91cd\u751f\u6210\uff1a\u53d7\u5f71\u54cd\u6d88\u8d39\u65b9\u91cd\u65b0\u751f\u6210 adoption-lock\uff08\u6216\u7b49\u4ef7\u58f0\u660e\u8f7d\u4f53\uff09\uff0c\u4f7f <code>declared_foundation_surface</code> \u4e0e <code>foundation_versions</code> \u53cd\u6620\u65b0 pin \u5b57\u8282\u3002</li> <li>\u5148\u5efa\u540e\u5220\uff1a\u884c\u4e3a\u53d8\u66f4\u4ee5 Foundation \u4fa7\u884c\u4e3a\u6d4b\u8bd5\uff08\u542b bundle \u5b57\u8282\u5bf9\u8c61\u6d4b\u8bd5\uff09\u843d\u5730\u4e3a\u5148\uff0c\u6d88\u8d39\u65b9\u5220\u9664\u81ea\u8eab\u91cd\u9a8c\u6d4b\u8bd5\u5728\u540e\uff08D2 \u987a\u5e8f\uff09\u3002</li> </ol> <p>\u884c\u4e3a\u5f52\u5c5e\u8bb0\u5f55\uff082026-08-19\uff09\uff1a\u300c\u5bbf\u4e3b\u8fd0\u884c\u65f6\uff08node\uff09\u4e0d\u53ef\u7528 \u2192 \u65e0\u56de\u9000\u3001fail-closed\u300d\u7684\u89e6\u53d1\u9762\uff08node \u89e3\u6790/env \u68c0\u67e5\uff09\u5c5e\u4e8e\u6d88\u8d39\u65b9\u8c03\u7528\u8fb9\u754c\uff08SFA \u4fa7\u4e3a D3 \u5df2\u88c1\u51b3\u63a5\u53d7\u7684\u6b8b\u4f59\u98ce\u9669\uff0c\u4ec5\u4fdd\u7559\u8c03\u7528\u70b9\u58f0\u660e\u68c0\u67e5\uff09\uff1bFoundation \u4fa7\u7b49\u4ef7\u8bed\u4e49 = \u5199\u5165\u73af\u8282\u5931\u8d25\u65f6 fail-closed\uff08\u65e0\u90e8\u5206\u4ea7\u7269\u3001\u9519\u8bef\u7801\u6b63\u786e\u3001\u65e0\u672c\u5730\u56de\u9000\uff09\uff0c\u7531 atomic \u884c\u4e3a\u6d4b\u8bd5\u627f\u63a5\uff0c\u4e0d\u5728 Foundation \u5efa\u5bbf\u4e3b spawn \u6d4b\u8bd5\u3002</p>"},{"location":"migration/","title":"\u4e2d\u6587 \u00b7 \u5b58\u91cf\u91c7\u7528\u4e0e\u8fc1\u79fb","text":"<p>English</p>"},{"location":"migration/#\u5b58\u91cf\u91c7\u7528\u4e0e\u8fc1\u79fbFND-070","title":"\u5b58\u91cf\u91c7\u7528\u4e0e\u8fc1\u79fb\uff08FND-070\uff09","text":"<p>\u672c\u9875\u63cf\u8ff0\u5b58\u91cf\u9879\u76ee\u5982\u4f55\u91c7\u7528 Skill Family \u57fa\u7840\u8bbe\u65bd\uff0c\u4ee5\u53ca\u8fc1\u79fb\u5b8c\u6210\u5224\u5b9a\u7684\u95e8\u7981\u3002\u5b83\u670d\u52a1\u4e8e\u4e24\u7c7b\u8bfb\u8005\uff1a\u4eba\u7c7b\u8d1f\u8d23\u4eba\u636e\u6b64\u5224\u65ad\u91c7\u7528\u8def\u5f84\u4e0e\u98ce\u9669\uff1b\u667a\u80fd\u4f53\u636e\u6b64\u7528 <code>adopt-plan</code> \u505a\u53ea\u8bfb\u76d8\u70b9\uff0c\u4e0d\u5728\u672c\u9875\u590d\u5236\u5199\u5165\u52a8\u4f5c\u3002</p> <p>0.14.0 \u628a\u56db\u79cd\u7ed3\u8bba\u5206\u5f00\u8bb0\u5f55\u3002\u80fd\u529b\u76ee\u5f55\u67e5\u8be2\u53ea\u53d1\u73b0\u5019\u9009\uff1b\u8fc1\u79fb\u72b6\u6001 <code>complete</code> \u53ea\u8bc1\u660e\u8fc1\u79fb\u95ed\u73af\uff1b\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u7531\u6d88\u8d39\u8005\u81ea\u5df1\u7684\u9002\u914d\u5668\u6d4b\u8bd5\u4e0e\u9886\u57df\u95e8\u7981\u58f0\u660e\uff1b\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u53ea\u7531\u663e\u5f0f\u7684 <code>check qualification --native</code> \u6267\u884c\u8bc1\u660e\u3002\u4efb\u4f55\u4e00\u4e2a\u7ed3\u8bba\u90fd\u4e0d\u80fd\u66ff\u4ee3\u53e6\u5916\u4e09\u4e2a\u3002</p>"},{"location":"migration/#0140-\u6700\u77ed\u5165\u53e3","title":"0.14.0 \u6700\u77ed\u5165\u53e3","text":"<p>\u5148\u5728 migration manifest \u4e2d\u58f0\u660e\u7528\u9014\uff0c\u518d\u7528\u540c\u4e00\u7528\u9014\u77e9\u9635\u67e5\u770b\u5019\u9009\u3002<code>adopt-plan</code> \u59cb\u7ec8\u53ea\u8bfb\uff0c\u547d\u4ee4\u4e0d\u4f1a\u81ea\u52a8\u751f\u6210 decision \u6216\u4fee\u6539 Profile\u3002</p> <pre><code>npm exec -- skill-family-kit adopt-plan --root ./existing-repo\nnpm exec -- skill-family-kit adopt-plan --root ./existing-repo --list-capabilities --all --scope all --locale zh-CN --uses ./uses.json\n</code></pre> <p>\u6bcf\u4e2a\u7528\u9014\u90fd\u5fc5\u987b\u660e\u786e\u9009\u62e9 <code>direct-adoption</code>\u3001<code>compatibility-layer</code>\u3001<code>keep-business</code> \u6216 <code>foundation-gap</code>\u3002\u53ea\u6709\u524d\u4e24\u9879\u9700\u8981 <code>targetCapability</code>\uff1b\u540e\u4e24\u9879\u7528\u4e8e\u4fdd\u7559\u6d88\u8d39\u8005\u8d23\u4efb\u6216\u767b\u8bb0 Foundation \u7f3a\u53e3\u3002\u7528\u9014\u6587\u672c\u547d\u4e2d capability ID \u4e5f\u4e0d\u4f1a\u81ea\u52a8\u5f62\u6210\u91c7\u7528\u58f0\u660e\u3002</p> <p>\u5b8c\u6210\u8fc1\u79fb\u540e\uff0c\u7ee7\u7eed\u7531\u6d88\u8d39\u8005\u9a8c\u8bc1\u5951\u7ea6\u63a5\u7ebf\u548c\u9886\u57df\u4fdd\u8bc1\u3002\u9700\u8981\u771f\u5b9e\u5bbf\u4e3b\u65f6\uff0c\u624d\u663e\u5f0f\u8fd0\u884c\uff1a</p> <pre><code>npm exec -- skill-family-kit check qualification \\\n --root &lt;consumer-repo&gt; \\\n --capability foundation.kit.plugin-verification \\\n --request &lt;request-json&gt; \\\n --bindings &lt;private-bindings-json&gt; \\\n --native\n</code></pre> <p><code>--request</code> \u548c <code>--bindings</code> \u662f\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 JSON\uff1b\u547d\u4ee4\u4f1a\u5148\u505a\u7cbe\u786e\u7248\u672c\u3001\u76ee\u5f55\u80fd\u529b\u548c\u53c2\u6570\u9884\u68c0\uff0c\u518d\u51b3\u5b9a\u662f\u5426\u89e6\u78b0\u5bbf\u4e3b\u3002\u7f3a\u5c11\u8bc1\u636e\u3001\u8df3\u8fc7\u6267\u884c\u6216\u7ec8\u6001\u4e0d\u786e\u5b9a\u65f6\uff0c\u4e0d\u80fd\u5f97\u5230 <code>real-host-qualified</code>\u3002</p>"},{"location":"migration/#\u5206\u7c7b\u65b9\u6cd5","title":"\u5206\u7c7b\u65b9\u6cd5","text":"<p>\u5b58\u91cf\u4ed3\u63a5\u5165 Foundation \u524d\uff0c\u5148\u6309\u4e0b\u9762\u56db\u7c7b\u5f52\u7c7b\u3002\u5206\u7c7b\u51b3\u5b9a\u8d70\u54ea\u6761\u8def\u5f84\u3001\u662f\u5426\u5199\u6587\u4ef6\u3001\u65e7\u5b9e\u73b0\u5982\u4f55\u5904\u7406\u3002</p> \u7c7b\u522b \u542b\u4e49 \u5904\u7406\u8def\u5f84 \u662f\u5426\u5199\u6587\u4ef6 <code>direct-adoption</code> \u4ed3\u5185\u5df2\u6709\u80fd\u529b\u53ef\u88ab Foundation \u539f\u6837\u66ff\u4ee3\uff0c\u65e0\u4e1a\u52a1\u8bed\u4e49\u8026\u5408 \u76f4\u63a5\u91c7\u7528\uff1a<code>adopt-plan</code> \u76d8\u70b9 \u2192 <code>scaffold</code>/<code>projection</code> \u843d\u76d8 \u662f\uff08\u53d7\u6536\u5bb9\uff09 <code>compatibility-layer</code> \u4ed3\u5185\u5df2\u6709\u5b9e\u73b0\u4e0e Foundation \u63a5\u53e3\u5b58\u5728\u5dee\u5f02\uff0c\u9700\u4e00\u5c42\u517c\u5bb9\u9002\u914d \u5199\u517c\u5bb9\u5c42\u540e\u91c7\u7528\uff0c\u65e7\u5b9e\u73b0\u7ecf\u517c\u5bb9\u5c42\u9000\u51fa \u662f\uff08\u517c\u5bb9\u5c42\u53d7\u6536\u5bb9\uff09 <code>keep-business</code> \u80fd\u529b\u542b\u9886\u57df\u8bed\u4e49\u6216\u4e1a\u52a1\u72b6\u6001\u673a\uff0c\u5c5e\u4e8e\u8c03\u7528\u65b9\u62e5\u6709\uff0cFoundation \u4e0d\u63a5 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u53ea\u63a5\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236 \u5426\uff08Foundation \u4fa7\uff09 <code>foundation-gap</code> \u9700\u8981\u7684\u80fd\u529b Foundation \u5c1a\u672a\u63d0\u4f9b\uff08\u5982 host apply\u3001Qoder driver\uff09 \u7559\u5728\u6d88\u8d39\u8005\u6216\u540e\u7eed\u7248\u672c\uff0c\u4e0d\u5f3a\u884c\u6269\u5f20 Foundation \u5426 <p>\u5206\u7c7b\u662f\u91c7\u7528\u51b3\u7b56\u7684\u524d\u63d0\u3002\u843d\u5165 <code>keep-business</code> \u6216 <code>foundation-gap</code> \u7684\u80fd\u529b\uff0c\u4e0d\u5e94\u4e3a\u4e86\u300c\u5b8c\u6210\u91c7\u7528\u300d\u800c\u585e\u8fdb Foundation\uff1b\u8fd9\u6b63\u597d\u662f\u67b6\u6784\u8def\u7531\u7b2c 1\u30018 \u6b65\u7684\u843d\u5730\u3002</p>"},{"location":"migration/#\u539f\u5219","title":"\u539f\u5219","text":"<ol> <li>\u8ba1\u5212\u5148\u884c\uff1a\u4efb\u4f55\u5b58\u91cf\u4ed3\u5148\u8fd0\u884c\u53ea\u8bfb <code>adopt-plan</code>\uff0c\u62ff\u5230\u73b0\u72b6\u3001\u76ee\u6807 Profile\u3001\u7cbe\u786e\u5199\u96c6\u3001\u51b2\u7a81\u3001\u65e7\u5b9e\u73b0\u9000\u51fa\u6e05\u5355\u4e0e\u9a8c\u6536\u547d\u4ee4\uff0c\u518d\u51b3\u5b9a\u662f\u5426\u6267\u884c\u5199\u5165\u3002</li> <li>\u53ea\u8bfb\u8ba1\u5212\u96f6\u53d8\u5316\uff1a<code>adopt-plan</code> \u4e0d\u5199\u4efb\u4f55\u6587\u4ef6\uff08\u542b\u4e34\u65f6\u6587\u4ef6\uff09\u3001\u4e0d\u8fd0\u884c git \u5199\u547d\u4ee4\u3001\u4e0d\u6539\u540d\u3001\u4e0d\u89e6\u78b0\u8fdc\u7aef\uff1b\u5bf9\u8f93\u5165\u4ed3\u5b57\u8282\u96f6\u53d8\u5316\uff08\u524d\u540e\u54c8\u5e0c\u8d70\u67e5\u53ef\u8bc1\uff09\u3002</li> <li>\u91c7\u7528\u4e0e\u6539\u540d\u5206\u79bb\uff1a\u57fa\u7840\u8bbe\u65bd\u91c7\u7528\u7edd\u4e0d\u8fde\u5e26\u4ed3\u5e93\u6539\u540d\u6216\u8fdc\u7aef\u5750\u6807\u53d8\u66f4\uff1b\u4e24\u8005\u662f\u72ec\u7acb\u51b3\u7b56\uff0c\u5de5\u5177\u4e0d\u63d0\u4f9b\u4efb\u4f55\u6539\u540d\u80fd\u529b\u3002</li> <li>\u53cc\u8f68\u4e0d\u7b97\u5b8c\u6210\uff1a\u8fc1\u79fb\u5b8c\u6210\u5224\u5b9a\u8981\u6c42\u65e7\u91cd\u590d\u5b9e\u73b0\u5df2\u5220\u9664\uff1b\u53ea\u63a5\u5165\u65b0\u57fa\u7840\u8bbe\u65bd\u800c\u65e7\u5b9e\u73b0\u4ecd\u5728\uff0c\u5224\u5b9a\u6052\u4e3a false\u3002</li> </ol>"},{"location":"migration/#adopt-plan-\u8f93\u51fa\u7ed3\u6784","title":"adopt-plan \u8f93\u51fa\u7ed3\u6784","text":"\u6bb5\u843d \u5185\u5bb9 <code>target</code> \u73b0\u72b6\uff1a\u5165\u53e3\u6570\u3001\u76ee\u6807\u81ea\u6709\u53d7\u7ba1\u58f0\u660e <code>project</code> / <code>traceability</code> \u76ee\u6807 Profile \u4e0e\u6bcf\u9879\u5199\u5165\u7684\u771f\u6e90\uff08Contracts \u7248\u672c\u3001skeleton \u751f\u6210\u51fd\u6570\u3001\u8bb8\u53ef\u8bc1 Profile \u4e0e\u53d8\u4f53\uff09 <code>git</code> \u53ea\u8bfb Git \u524d\u7f6e\u72b6\u6001\uff08\u4ed3\u5e93\u3001HEAD\u3001clean\uff09 <code>writeSet</code> \u7cbe\u786e\u5199\u96c6\uff1a\u6bcf\u8def\u5f84\u7684 action\uff08\u4ec5 <code>create</code>/<code>unchanged</code>\uff09\u3001fileClass\u3001sha256 <code>conflicts</code> \u624b\u5199\u51b2\u7a81\u3001\u53d7\u7ba1\u6f02\u79fb\u3001\u7b26\u53f7\u94fe\u63a5\u5360\u4f4d\u3001\u7f3a\u5b57\u6bb5\u4e34\u65f6\u4f8b\u5916 <code>risks</code> dirty\u3001\u5d4c\u5957\u4ed3\u3001tracked-but-ignored\u3001\u5230\u671f\u4f8b\u5916\u7b49 <code>migration</code> \u8fc1\u79fb\u72b6\u6001\u673a\uff1a\u7ed1\u5b9a\uff08binding\uff09\u3001\u5728\u76d8\u8bc1\u660e\uff08adoptionProof\uff09\u3001\u5f85\u5199\u5165\u6570\u3001check \u95e8\u7981\u3001\u56db\u7c7b\u9a8c\u8bc1\u8bc1\u636e\u3001\u72b6\u6001\u4e0e\u5b8c\u6210\u5224\u5b9a <code>verificationPlan</code> \u9a8c\u6536\u547d\u4ee4\u5e8f\u5217\uff08check \u2192 projection \u2192 \u590d\u67e5\uff09"},{"location":"migration/#\u8fc1\u79fb\u6e05\u5355skill-familymigrationjson","title":"\u8fc1\u79fb\u6e05\u5355\uff08skill-family.migration.json\uff09","text":"<p>\u76ee\u6807\u4ed3\u5728\u6839\u76ee\u5f55\u58f0\u660e\u81ea\u5df1\u7684\u8fc1\u79fb\u72b6\u6001\uff1a</p> <pre><code>{\n \"schemaVersion\": 1,\n \"kind\": \"skill-family.migration-manifest\",\n \"manifestVersion\": 4,\n \"capabilityUseContext\": { \"scope\": \"harness\", \"locale\": \"zh-CN\" },\n \"capabilityUses\": [\n {\n \"useId\": \"safe-output-write\",\n \"problemStatement\": \"\u5199\u5165\u8f93\u51fa\u65f6\u4e0d\u80fd\u7559\u4e0b\u6b8b\u7f3a\u6587\u4ef6\",\n \"constraints\": [\"\u6d4b\u8bd5\u4e0d\u5f97\u5199\u5165\u771f\u5b9e\u9879\u76ee\u76ee\u5f55\"],\n \"retainedGuarantees\": [\"\u8f93\u51fa\u5236\u54c1\u4ecd\u7531\u6d88\u8d39\u8005\u9009\u62e9\"],\n \"catalogFilters\": [\"\u539f\u5b50\u5199\"]\n }\n ],\n \"capabilityDecisions\": [\n {\n \"useId\": \"safe-output-write\",\n \"disposition\": \"direct-adoption\",\n \"targetCapability\": \"foundation.harness.atomic-write\",\n \"reason\": \"\u4e1a\u52a1\u4e2d\u7acb\u7684\u539f\u5b50\u5199\u673a\u5236\u8986\u76d6\u8be5\u9700\u6c42\uff0c\u5236\u54c1\u9009\u62e9\u4ecd\u7531\u6d88\u8d39\u8005\u8d1f\u8d23\"\n }\n ],\n \"legacyInfra\": [\n {\n \"path\": \"scripts/old-validator.mjs\",\n \"replacedBy\": null,\n \"useId\": \"safe-output-write\",\n \"recoveryRef\": \"docs/recovery/old-validator.md\"\n }\n ],\n \"legacyReferences\": [\n {\n \"path\": \"src/index.mjs\",\n \"text\": \"legacyWrite()\",\n \"replacedBy\": \"foundation.harness.atomic-write\",\n \"useId\": \"safe-output-write\"\n }\n ],\n \"exceptions\": []\n}\n</code></pre> <p>\u4ee5\u4e0a\u793a\u4f8b\u4e0e <code>positive-04-capability-adoption.json</code> \u7684\u673a\u5668 fixture \u5bf9\u9f50\uff1a<code>replacedBy: null</code> \u8868\u793a\u65e7\u5b9e\u73b0\u5c1a\u672a\u66ff\u4ee3\uff0c<code>recoveryRef</code> \u8bb0\u5f55\u6062\u590d\u6307\u5f15\uff1b\u5de5\u5177\u53ea\u8bfb\u8bc4\u4f30\u5b58\u5728\u6027\uff0c\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\u3002</p> <p>0.3.0 \u4e2d\u7684 Quickstart Profile candidate \u5df2\u5347\u7ea7\u5230 v2\u3002\u8fc1\u79fb\u6e05\u5355\u82e5\u7ed1\u5b9a candidate \u80fd\u529b\uff0c\u4e09\u4e2a Foundation \u5305\u5fc5\u987b\u7edf\u4e00\u7cbe\u786e\u9501\u5b9a\u4e3a 0.3.0\uff1b\u4ecd\u9700 v1 \u7684\u5b58\u91cf\u63a5\u5165\u7ee7\u7eed\u7edf\u4e00\u9501\u5b9a 0.2.1\uff0c\u4e0d\u6df7\u88c5\u4e24\u7ec4\u7248\u672c\u3002</p> <ul> <li><code>legacyInfra</code> \u6bcf\u9879\u7ed9\u51fa\u65e7\u5b9e\u73b0\u8def\u5f84\u4e0e\u66ff\u4ee3\u7269\uff1b\u5de5\u5177\u53ea\u8bfb\u8bc4\u4f30\u5b58\u5728\u6027\uff0c\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\u3002</li> <li><code>exceptions</code> \u662f\u4e34\u65f6\u4f8b\u5916\uff1a\u5fc5\u987b\u540c\u65f6\u542b\u8d1f\u8d23\u4eba\uff08owner\uff09\u3001\u539f\u56e0\uff08reason\uff09\u3001\u622a\u6b62\u65f6\u95f4\uff08deadline\uff09\u3001\u8fc1\u79fb\u76ee\u6807\uff08migrationTarget\uff09\u56db\u9879\uff0c\u7f3a\u4efb\u4e00\u5b57\u6bb5\u5373\u8ba1\u4e3a\u51b2\u7a81\uff08\u8ba1\u5212\u5931\u8d25\uff09\uff1b\u5230\u671f\u4f8b\u5916\u4e0d\u81ea\u52a8\u7eed\u671f\uff0c\u6301\u7eed\u963b\u65ad\u5b8c\u6210\u5224\u5b9a\u3002</li> <li><code>targetProfile</code> / <code>foundationPackages</code>\uff1a\u91c7\u7528\u7ed1\u5b9a\u3002\u76ee\u6807 Profile \u5fc5\u987b\u4e0e\u8ba1\u5212 Profile \u4e00\u81f4\uff1b\u4e09\u4e2a Foundation \u5305\uff08contracts\u3001harness-node\u3001engineering-kit\uff09\u5fc5\u987b\u5404\u81ea\u7ed1\u5b9a\u7cbe\u786e\u7248\u672c\u53f7\uff08\u4e0d\u63a5\u53d7\u6d6e\u52a8\u8303\u56f4\uff09\u4e0e <code>sha256:</code> \u6458\u8981\u3002</li> <li><code>verification</code>\uff1a\u56db\u7c7b\u9a8c\u8bc1\u8bc1\u636e\u6587\u6863\u8def\u5f84\uff08unit\u3001integration\u3001consumer\u3001independentAudit\uff09\u3002\u6bcf\u4efd\u8bc1\u636e\u5fc5\u987b\u662f\u53ef\u89e3\u6790 JSON \u4e14\u5176 <code>projectId</code> \u4e0e\u76ee\u6807\u9879\u76ee\u8eab\u4efd\u4e00\u81f4\uff0c\u624d\u8ba1\u4e3a proven\uff1b\u8def\u5f84\u8d8a\u754c\u3001\u7f3a\u5931\u3001\u4e0d\u53ef\u89e3\u6790\u3001\u8eab\u4efd\u4e0d\u7b26\u5747\u4e3a\u672a\u8bc1\u660e\uff0cfail-closed\u3002</li> </ul>"},{"location":"migration/#\u8fc1\u79fb\u72b6\u6001\u673a","title":"\u8fc1\u79fb\u72b6\u6001\u673a","text":"<p>\u72b6\u6001\u5355\u8c03\u9012\u8fdb\uff0c\u53ea\u7531\u53ea\u8bfb\u8bc1\u636e\u63a8\u5bfc\uff0c\u4efb\u4f55\u5de5\u5177\u90fd\u4e0d\u901a\u8fc7\u5199\u5165\u63a8\u8fdb\u72b6\u6001\uff1a</p> <pre><code>not-declared \u2192 declared \u2192 adopted \u2192 verified \u2192 complete\n</code></pre> \u72b6\u6001 \u542b\u4e49 <code>not-declared</code> \u4e0d\u5b58\u5728\u5951\u7ea6\u6709\u6548\u7684\u8fc1\u79fb\u6e05\u5355 <code>declared</code> \u6e05\u5355\u5951\u7ea6\u6709\u6548\uff0c\u4f46\u91c7\u7528\u4e8b\u5b9e\u8bc1\u660e\u4e0d\u5168 <code>adopted</code> Foundation \u5b57\u8282\u5df2\u5728\u76d8\u4e14\u65e7\u5b9e\u73b0\u5df2\u9000\u51fa\uff0ccheck \u95e8\u7981\u672a\u7eff <code>verified</code> check \u95e8\u7981\u7eff\uff0c\u9a8c\u8bc1\u8bc1\u636e\u672a\u5168\u90e8 proven <code>complete</code> \u516b\u9879\u5b8c\u6210\u6761\u4ef6\u5168\u90e8\u6ee1\u8db3\uff1b<code>complete</code> \u4e3a\u771f\u5f53\u4e14\u4ec5\u5f53\u72b6\u6001\u4e3a <code>complete</code>"},{"location":"migration/#\u5b8c\u6210\u5224\u5b9a\u95e8\u7981","title":"\u5b8c\u6210\u5224\u5b9a\u95e8\u7981","text":"<p><code>migration.completion.complete</code> \u4e3a true \u5f53\u4e14\u4ec5\u5f53\u5168\u90e8\u516b\u9879\u6210\u7acb\uff1a</p> <ol> <li>\u5df2\u58f0\u660e\u5951\u7ea6\u6709\u6548\u7684\u8fc1\u79fb\u6e05\u5355\uff08kind/\u5b57\u6bb5\u7ecf Contracts schema \u6821\u9a8c\uff09\uff1b</li> <li>\u91c7\u7528\u7ed1\u5b9a\u5df2\u8bc1\u660e\uff1a\u76ee\u6807 Profile \u4e0e\u8ba1\u5212\u4e00\u81f4\uff0c\u4e09\u4e2a Foundation \u5305\u5747\u7ed1\u5b9a\u7cbe\u786e\u7248\u672c\u4e0e sha256 \u6458\u8981\uff1b</li> <li>Project Manifest\u3001managed lock\u3001identity \u4e0e\u5168\u90e8\u53d7\u7ba1\u9aa8\u67b6\u6587\u4ef6\u5728\u76d8\u4e14\u6458\u8981\u4e0e\u8ba1\u5212\u4e00\u81f4\uff08<code>adoptionProof.missing</code>/<code>mismatched</code> \u4e3a\u7a7a\uff09\uff1b</li> <li>\u5199\u96c6\u4e2d\u65e0\u5f85\u6267\u884c\u7684 create/replace/project \u52a8\u4f5c\uff08<code>pendingWrites</code> \u4e3a 0\uff09\uff1b</li> <li>Foundation check \u95e8\u7981\u7eff\uff1b</li> <li>\u6bcf\u9879\u65e7\u5b9e\u73b0\u5747\u5df2\u9000\u51fa\uff08absent\uff09\u2014\u2014containment \u62d2\u7edd\u6216\u7578\u5f62\u6761\u76ee\u4e0e present \u540c\u7b49 fail-closed\uff1b</li> <li>\u65e0\u7f3a\u5b57\u6bb5\u3001\u65e0\u4e0d\u53ef\u89e3\u6790\u622a\u6b62\u65f6\u95f4\u3001\u65e0\u5df2\u5230\u671f\u7684\u4e34\u65f6\u4f8b\u5916\uff1b\u65e0\u672a\u89e3\u51b3\u7684\u91c7\u7528\u51b2\u7a81\uff1b</li> <li>\u56db\u7c7b\u9a8c\u8bc1\u8bc1\u636e\uff08unit/integration/consumer/independentAudit\uff09\u5168\u90e8 proven \u4e14\u8eab\u4efd\uff08projectId\uff09\u5339\u914d\u3002</li> </ol> <p>\u672a\u8bc4\u4f30\u7684\u8f93\u5165\u4e0e\u672a\u8bc1\u660e\u7b49\u4ef7\uff1a\u95e8\u7981\u53ea\u4f9d\u636e\u51fa\u793a\u7684\u8bc1\u636e\u524d\u8fdb\u3002\u963b\u65ad\u7406\u7531\uff08<code>blockers</code>\uff09\u4e3a\u7a33\u5b9a\u53ef\u8bfb\u5b57\u7b26\u4e32\uff0c\u53ef\u76f4\u63a5\u8fdb\u5165\u8fc1\u79fb\u8bc4\u5ba1\u8bb0\u5f55\u3002</p>"},{"location":"migration/#\u5f3a\u5236\u8d1f\u4f8b\u4efb\u4e00\u573a\u666f-completion-\u5fc5\u987b\u4e3a-false","title":"\u5f3a\u5236\u8d1f\u4f8b\uff08\u4efb\u4e00\u573a\u666f completion \u5fc5\u987b\u4e3a false\uff09","text":"<ul> <li>\u7a7a\u4ed3 + \u7a7a\u6e05\u5355\uff08\u65e0\u5951\u7ea6\u6709\u6548\u6e05\u5355 \u2192 <code>not-declared</code>\uff09\uff1b</li> <li>\u6e05\u5355 kind \u9519\u8bef\uff08schema-invalid \u2192 \u89c6\u540c\u672a\u58f0\u660e\uff09\uff1b</li> <li>9 \u4e2a\u9aa8\u67b6\u6587\u4ef6\u4ecd\u5f85 create\uff08<code>declared</code>\uff0c\u5217\u51fa\u5168\u90e8\u7f3a\u5931\u8def\u5f84\uff09\uff1b</li> <li>managed lock \u6f02\u79fb\uff08<code>mismatched</code> \u975e\u7a7a\uff09\uff1b</li> <li>\u53ea\u63a5\u5165\u65b0\u5b9e\u73b0\u3001\u65e7\u5b9e\u73b0\u4ecd\u5728\uff08\u53cc\u8f68 \u2192 <code>declared</code>\uff09\uff1b</li> <li>\u6d88\u8d39\u8005\u9a8c\u8bc1\u8bc1\u636e\u7f3a\u5931\u6216\u8eab\u4efd\u4e0d\u7b26\uff08<code>verified</code>\uff0c\u4e0d\u5f97 complete\uff09\uff1b</li> <li>\u4e34\u65f6\u4f8b\u5916\u8fc7\u671f\uff08\u5de5\u5177\u7edd\u4e0d\u7eed\u671f\uff09\u3002</li> </ul>"},{"location":"migration/#\u65e7\u5b9e\u73b0\u5220\u9664\u4e0e\u56de\u6eda\u5408\u540c","title":"\u65e7\u5b9e\u73b0\u5220\u9664\u4e0e\u56de\u6eda\u5408\u540c","text":"<ul> <li>\u5220\u9664\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff1a<code>adopt-plan</code> \u53ea\u8bc4\u4f30\u65e7\u5b9e\u73b0\u5b58\u5728\u6027\u5e76\u5217\u51fa\u9000\u51fa\u6e05\u5355\uff0c\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\uff1b<code>foundation-gap</code> \u4e0e <code>keep-business</code> \u7c7b\u80fd\u529b\u4e0d\u8981\u6c42\u5220\u9664\u3002</li> <li>\u56de\u6eda\u4ee5\u8bc1\u636e\u4e3a\u51c6\uff1a\u91c7\u7528\u843d\u76d8\u524d\u5fc5\u987b\u5148\u6709 <code>adoptionProof</code> \u4e0e <code>foundationPlanDigest</code> \u53cc\u6458\u8981\u7ed1\u5b9a\uff1b\u56de\u6eda\u65f6\u4ee5\u8ba1\u5212\u5199\u96c6\u7684 <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u8fd8\u539f\uff0c\u672a\u58f0\u660e\u524d\u7f6e\u72b6\u6001\u7684\u8986\u76d6\u52a8\u4f5c\u5728 <code>projection</code> \u9636\u6bb5\u5373\u62d2\u7edd\u3002</li> <li>fail-closed \u9ed8\u8ba4\uff1a\u4efb\u4f55\u4e0d\u53ef\u89e3\u6790\u3001\u8d8a\u754c\u3001\u8eab\u4efd\u4e0d\u7b26\u6216\u8bc1\u636e\u7f3a\u5931\u7684\u8f93\u5165\uff0c\u90fd\u4f7f\u5bf9\u5e94\u5224\u5b9a\u4e3a\u672a\u8bc1\u660e\uff0c\u4e0d\u5047\u8bbe\u6210\u529f\u3002</li> </ul>"},{"location":"migration/#Profile-\u8349\u7a3f","title":"Profile \u8349\u7a3f","text":"<p><code>adopt-plan</code> \u8f93\u51fa\u643a\u5e26 <code>profileDraft</code> \u5b50\u5757\uff08kind=<code>skill-family.profile-draft</code>\uff0cschemaVersion=1\uff09\uff1a\u4e00\u4efd\u9884\u586b\u7684 profile.json \u63cf\u8ff0\u7b26\u8349\u7a3f\uff08<code>descriptorRelPath</code>=<code>profile.json</code>\uff09\u3002adoption-lock \u6982\u5ff5\u4e0e\u5176\u5de5\u4ef6\u5f62\u6001\u5df2\u5e9f\u5f03\uff08\u6574\u6539\u4ea4\u63a5 D-8\uff09\uff1a\u8f7b\u91cf\u91c7\u7528\u8bc1\u660e\u5c31\u662f\u63cf\u8ff0\u7b26\u81ea\u8eab\u7684\u91c7\u7528\u58f0\u660e\uff0c\u7531 <code>verifyProfile</code>\uff08Profile SPI v3\uff09\u673a\u68b0\u6838\u9a8c\u2014\u2014\u5b57\u6bb5\u5b8c\u6574\u6027\u4e0e pin \u5f62\u6001\u5728\u63cf\u8ff0\u7b26 Schema \u6b65\u628a\u5173\uff08SPE1001\uff09\uff0cpin \u6458\u8981\u6309 GK-4 \u7eaa\u5f8b\u5bf9\u5199\u96c6\u5185\u771f\u5b9e\u5de5\u4ef6\u5b57\u8282\u9010\u4e00\u6bd4\u5bf9\uff08SPE1006\uff09\uff0coverrides \u53ea\u6536\u7d27\u7b56\u7565\u72ec\u7acb\u88c1\u51b3\uff08SPE1007\uff09\u3002</p> <p>\u8349\u7a3f\u9884\u586b\u4e00\u5207\u53ef\u7531\u53ea\u8bfb\u4e8b\u5b9e\u673a\u68b0\u63a8\u5bfc\u7684\u5185\u5bb9\uff1a</p> <ul> <li>\u63cf\u8ff0\u7b26\u8eab\u4efd\u4e0e\u57fa\u7ebf\uff1a<code>profile.id</code>/<code>profile.name</code> \u6765\u81ea\u8ba1\u5212\u8f93\u5165\uff0c<code>base.contractsVersion</code> \u4e3a\u5df2\u52a0\u8f7d\u7684\u51bb\u7ed3 Contracts \u7248\u672c\uff1b<code>differences</code>/<code>spi</code> \u4e3a\u7a7a\u6570\u7ec4\u8d77\u70b9\u3002</li> <li>\u91c7\u7528\u58f0\u660e\uff08D-8 \u6700\u5c0f\u5b57\u6bb5\u96c6\uff0c\u6743\u5a01\u5b9a\u4e49\u5728 <code>profiles/spi/extension-spi.json</code> \u7684 <code>adoptionDeclaration</code>\uff09\uff1a</li> <li><code>foundation_profile.id</code> \u4e3a\u8ba1\u5212\u91c7\u7528\u7684 Foundation Profile id\uff1b<code>version</code>/<code>stability</code> \u5c5e\u4eba\u7c7b\u51b3\u7b56\uff0c\u4fdd\u6301 null\u3002</li> <li><code>foundation_pin.algorithm</code> \u6052\u4e3a <code>sha256</code>\uff1b\u4e09\u4e2a Foundation \u5305\u7684 <code>version</code> \u6309\u300c\u8fc1\u79fb\u6e05\u5355\u58f0\u660e\u4f18\u5148\uff0c\u5176\u6b21\u52a0\u8f7d\u5e38\u91cf\u300d\u9884\u586b\uff1b<code>path</code>/<code>sha256</code> \u5728\u771f\u5b9e\u5de5\u4ef6\u653e\u5165 Profile \u5199\u96c6\u4e4b\u524d\u4fdd\u6301 null\uff08\u6458\u8981\u53ea\u80fd\u6765\u81ea\u771f\u5b9e\u5b57\u8282\uff0c\u7edd\u4e0d\u731c\u6d4b\uff09\u3002</li> <li><code>adopted_at</code> \u5728\u91c7\u7528\u65f6\u523b\u624d\u4ea7\u751f\uff0c\u89c4\u5212\u671f\u4fdd\u6301 null\u3002</li> <li><code>overrides</code> \u4e3a\u7a7a\u6570\u7ec4\uff08\u7a7a\u793a\u4f8b\uff09\uff1a\u8986\u76d6\u662f\u53ef\u9009\u7684\u81ea\u6536\u7d27\u58f0\u660e\uff0cKit \u4e0d\u679a\u4e3e\u89c4\u5219\u793a\u4f8b\uff08\u6838\u5fc3\u4e0d\u5bfc\u5165 Profile \u5c42\uff09\uff1b\u8349\u7a3f\u9644\u5e26 <code>overridesGuidance</code> \u8bf4\u660e\u53ea\u6536\u7d27\u8bed\u4e49\u3002</li> </ul>"},{"location":"migration/#\u4e0d\u5b8c\u6574\u963b\u65ad\u89c4\u5219","title":"\u4e0d\u5b8c\u6574\u963b\u65ad\u89c4\u5219","text":"<ul> <li>\u4efb\u4f55\u4e0d\u53ef\u673a\u68b0\u63a8\u5bfc\u7684\u5b57\u6bb5\u4fdd\u6301 null \u5e76\u5217\u5165 <code>incompleteFields</code>\uff1b\u53ea\u8981 <code>incompleteFields</code> \u975e\u7a7a\u5373 <code>ready=false</code>\uff1a\u5e26\u7f3a\u53e3\u7684\u8349\u7a3f\u4e0d\u5f97\u76f4\u63a5\u843d\u76d8\u4e3a\u91c7\u7528\u58f0\u660e\u3002</li> <li>\u5de5\u5177\u7edd\u4e0d\u731c\u6d4b\uff1a\u4eba\u5de5\u9700\u8865\u9f50 <code>foundation_profile.version</code>/<code>stability</code>\u3001\u5404\u5305\u5de5\u4ef6\u7684 <code>path</code>/<code>sha256</code>\u3001<code>adopted_at</code> \u4e0e <code>profile.version</code>\u3002</li> </ul>"},{"location":"migration/#\u7ed1\u5b9a","title":"\u7ed1\u5b9a","text":"<p>\u8349\u7a3f\u643a\u5e26\u53cc sha256 \u6458\u8981\uff08<code>binding</code> \u5757\uff09\uff1a<code>targetSetDigest</code> \u6c47\u603b\u76ee\u6807\u4ed3\u6587\u4ef6\u96c6\u5408\uff0c<code>foundationPlanDigest</code> \u6c47\u603b Foundation \u8ba1\u5212\u5199\u96c6\u3002\u540c\u4e00\u76ee\u6807\u4e24\u6b21\u8ba1\u5212\u5f97\u5230\u76f8\u540c\u6458\u8981\uff0c\u8349\u7a3f\u4e0e\u8ba1\u5212\u65f6\u523b\u7684\u76ee\u6807\u72b6\u6001\u7cbe\u786e\u7ed1\u5b9a\u3002</p>"},{"location":"migration/#\u8fb9\u754c","title":"\u8fb9\u754c","text":"<ul> <li><code>adopt-plan</code> \u4e25\u683c\u53ea\u8bfb\uff1a\u8349\u7a3f\u53ea\u968f\u8ba1\u5212\u8f93\u51fa\u5230 stdout\uff0c\u7edd\u4e0d\u5199\u6d88\u8d39\u8005\u4ed3\uff1b</li> <li>\u4e0d\u65b0\u589e\u7b2c\u4e94\u4e2a Kit \u9876\u5c42\u547d\u4ee4\uff1aKit \u9876\u5c42\u547d\u4ee4\u6052\u4e3a scaffold\u3001adopt-plan\u3001projection\u3001check \u56db\u4e2a\uff0c<code>profileDraft</code> \u53ea\u662f <code>adopt-plan</code> \u8f93\u51fa\u7684\u5b50\u5757\u3002</li> </ul>"},{"location":"migration/#\u5371\u5bb3\u7c7b-fixture","title":"\u5371\u5bb3\u7c7b fixture","text":"<p><code>fixtures/adoption/cases/</code> \u8986\u76d6\u4e03\u4e2a\u5371\u5bb3\u7c7b\uff1adirty \u4ed3\u3001\u5d4c\u5957\u4ed3\u3001tracked-but-ignored\u3001\u7b26\u53f7\u94fe\u63a5\u5360\u4f4d\u3001\u751f\u6210\u7269\u6f02\u79fb\u3001\u65e7\u5b9e\u73b0\u9000\u51fa\u95e8\u7981\u3001\u4e34\u65f6\u4f8b\u5916\u5b57\u6bb5\u3002\u6bcf\u4e2a\u6848\u4f8b\u4ee5\u5b57\u8282\u7ea7\u524d\u540e\u5feb\u7167\u8bc1\u660e\u8ba1\u5212\u53ea\u8bfb\uff1b\u6848\u4f8b\u8bf4\u660e\u89c1\u4ed3\u5185 <code>fixtures/adoption/README.md</code>\u3002</p>"},{"location":"public/status/","title":"Skill Family Foundation \u2014 \u516c\u5f00\u72b6\u6001","text":"<p>\u672c\u9875\u662f\u672c\u9759\u6001\u53d1\u5e03\u5feb\u7167\u7684\u76ee\u6807\u5750\u6807\u548c\u9a8c\u8bc1\u5165\u53e3\u3002\u9875\u9762\u53ea\u4ece\u5404\u5305 package.json \u7684\u7248\u672c\u771f\u6e90\u673a\u68b0\u751f\u6210\uff0c\u7531 <code>node scripts/render-public-status.mjs --check</code> \u96f6\u5199\u5165\u91cd\u7b97\u5e76\u9010\u5b57\u8282\u6821\u9a8c\u3002</p>"},{"location":"public/status/#\u5305","title":"\u5305","text":"\u5305 \u7248\u672c \u516c\u5f00\u53d1\u5e03\u955c\u50cf <code>skill-family-contracts</code> 0.19.3 ifoohoo/skill-family-contracts <code>skill-family-harness-node</code> 0.19.3 ifoohoo/skill-family-harness-node <code>skill-family-engineering-kit</code> 0.19.3 ifoohoo/skill-family-engineering-kit"},{"location":"public/status/#\u6587\u6863","title":"\u6587\u6863","text":"<ul> <li>\u516c\u5f00\u6587\u6863\u7ad9</li> </ul>"},{"location":"public/status/#\u9a8c\u8bc1\u5165\u53e3","title":"\u9a8c\u8bc1\u5165\u53e3","text":"<ul> <li>\u672c\u9875\uff1a<code>node scripts/render-public-status.mjs --check</code>\uff08\u96f6\u5199\u5165\u91cd\u7b97\uff0c\u4e0e\u5df2\u63d0\u4ea4\u9875\u9762\u9010\u5b57\u8282\u4e00\u81f4\uff09</li> <li>\u9759\u6001\u7ad9\u4e0e\u57fa\u7ebf\uff1a<code>node scripts/render-public-site.mjs --check</code>\uff08\u51bb\u7ed3 MkDocs \u73af\u5883\u91cd\u7b97\uff0c\u4e0e\u5df2\u63d0\u4ea4\u57fa\u7ebf\u9010\u9879\u4e00\u81f4\uff09</li> <li>\u5de5\u4f5c\u533a\u6839\u95e8\u7981\uff1a<code>pnpm check</code>\uff0811 \u4e2a\u7a33\u5b9a\u4ea7\u54c1\u95e8\u7981\u6309\u56fa\u5b9a\u987a\u5e8f\u4e32\u8054\uff09</li> <li>registry\u3001Pages \u4e0e Release \u7684\u5b9e\u65f6\u8fdc\u7aef\u72b6\u6001\uff1a\u7531\u53d1\u5e03\u540e\u9a8c\u8bc1\u62a5\u544a\u8bc1\u660e\uff0c\u4e0d\u5728\u672c\u9875\u8bb0\u5f55</li> </ul>"},{"location":"public/status/#\u8bf4\u660e","title":"\u8bf4\u660e","text":"<ul> <li>\u672c\u9875\u4e0d\u5ba3\u79f0\u4efb\u4f55\u7248\u672c\u5df2\u5728\u8fdc\u7aef\u53d1\u5e03\uff1b\u53d1\u5e03\u52a8\u4f5c\u662f\u5426\u5df2\u6267\u884c\u7531\u53d1\u5e03\u540e\u7684\u8fdc\u7aef\u9a8c\u8bc1\u62a5\u544a\u8bc1\u660e\u3002</li> <li>\u4e09\u4e2a\u5305\u5747\u4e3a\u72ec\u7acb\u53d1\u5e03\u5230 npm \u7684\u516c\u5f00\u53d1\u5e03\u76ee\u6807\u3002</li> <li>\u8bb8\u53ef\u8bc1\uff1aApache-2.0</li> <li>\u79c1\u6709\u5de5\u4f5c\u533a\u4ed3\u4e0d\u5bf9\u5916\u53ef\u89c1\uff1b\u516c\u5f00\u53d1\u5e03\u7269\u53ea\u7ecf\u5404\u5305 public \u53d1\u5e03\u955c\u50cf\u4ed3\u4e0e npm tarball \u5206\u53d1\u3002</li> </ul>"},{"location":"recipes/","title":"\u4e2d\u6587 \u00b7 Recipes","text":"<p>English</p>"},{"location":"recipes/#Recipe-\u7d22\u5f15","title":"Recipe \u7d22\u5f15","text":"<p>\u672c\u76ee\u5f55\u7ed9\u5e38\u89c1\u67b6\u6784\u9700\u6c42\u63d0\u4f9b\u53ef\u76f4\u63a5\u590d\u5236\u6267\u884c\u7684\u6700\u5c0f\u505a\u6cd5\u3002\u6bcf\u4e2a recipe \u6309\u56fa\u5b9a\u4e5d\u6bb5\u7ec4\u7ec7\uff1a\u573a\u666f\u4e0e\u975e\u573a\u666f\u3001\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c\u3001\u6700\u5c0f\u4ee3\u7801\u6216\u547d\u4ee4\u3001\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e\u3001\u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b\u3001\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4\u3001\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91\u3001\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879\u3002</p>"},{"location":"recipes/#\u9009\u62e9\u89c4\u5219","title":"\u9009\u62e9\u89c4\u5219","text":"<ul> <li>\u9700\u6c42\u542b\u9886\u57df\u8bed\u4e49 / \u72b6\u6001\u673a / \u5ba1\u8ba1 oracle \u2192 \u7559\u5728\u6d88\u8d39\u8005\uff0c\u4e0d\u5728\u8fd9\u91cc\u627e Foundation \u80fd\u529b\u3002</li> <li>\u9700\u8981\u7ed3\u6784\u6216\u534f\u8bae\u6821\u9a8c \u2192 \u770b <code>domain-schema-validation</code>\u3002</li> <li>\u9700\u8981\u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u6216\u539f\u5b50\u5199 \u2192 \u770b <code>safe-filesystem-and-atomic-write</code>\u3002</li> <li>\u9700\u8981\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a \u2192 \u770b <code>deterministic-human-report</code>\u3002</li> <li>\u9700\u8981\u6301\u4e45\u4e8b\u4ef6\u4e0e\u6d3e\u751f\u5feb\u7167 \u2192 \u770b <code>durable-local-state</code>\u3002</li> <li>\u9700\u8981\u5b58\u91cf\u91c7\u7528\u76d8\u70b9 \u2192 \u770b <code>adopt-existing-repository</code>\u3002</li> <li>\u9700\u8981\u6587\u672c\u8d44\u6e90\u95ed\u5305\u6216\u5bbf\u4e3b\u63a5\u5165 \u2192 \u770b <code>adapter-text-closure</code> / <code>host-profile-integration</code>\u3002</li> <li>\u9700\u8981\u8bd5\u7528 Quickstart Profile v2 \u2192 \u7cbe\u786e\u9501\u5b9a\u4e09\u4e2a\u5305\u7684 0.3.0 candidate \u5b50\u8def\u5f84\uff1b\u9700\u8981 v1 \u65f6\u7ee7\u7eed\u9501\u5b9a 0.2.1\u3002</li> </ul>"},{"location":"recipes/#\u5171\u540c\u9a8c\u8bc1\u7ea6\u5b9a","title":"\u5171\u540c\u9a8c\u8bc1\u7ea6\u5b9a","text":"<ul> <li>\u6240\u6709\u793a\u4f8b\u5728\u65b0\u7684\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u6267\u884c\uff0c\u4e0d\u7559\u4e2a\u4eba\u8def\u5f84\u6216\u51ed\u636e\u3002</li> <li>\u793a\u4f8b\u4e0d\u542b\u4f01\u4e1a\u6807\u8bc6\u3001\u79c1\u6709 Profile\u3001\u771f\u5b9e\u4e1a\u52a1\u6570\u636e\u6216\u4e2a\u4eba\u8def\u5f84\u3002</li> <li>\u6bcf\u4e2a recipe \u81f3\u5c11\u7ed9\u51fa\u4e00\u4e2a\u6b63\u4f8b\u4e0e\u4e00\u4e2a\u8d1f\u4f8b\uff1b\u8d1f\u4f8b\u5fc5\u987b\u4ea7\u751f\u7a33\u5b9a\u5931\u8d25\u7801\u6216\u62d2\u7edd\u3002</li> <li>\u9a8c\u8bc1\u547d\u4ee4\u53ef\u76f4\u63a5\u590d\u5236\u8fd0\u884c\uff1b\u9700\u8981\u5305\u65f6\u5148 <code>npm install</code> \u5bf9\u5e94 <code>@0.3.0</code>\u3002</li> </ul>"},{"location":"recipes/#\u80fd\u529b-ID-\u603b\u89c8","title":"\u80fd\u529b ID \u603b\u89c8","text":"Recipe \u9996\u9009\u80fd\u529b ID adopt-existing-repository <code>foundation.kit.adopt-plan</code> safe-filesystem-and-atomic-write <code>foundation.harness.path-containment</code>\u3001<code>foundation.harness.atomic-write</code> domain-schema-validation <code>foundation.contracts.object-validation</code> adapter-text-closure <code>foundation.harness.resource-closure</code>\u3001<code>foundation.harness.host-adapter</code> deterministic-human-report <code>foundation.harness.report</code>\u3001<code>foundation.kit.report</code> durable-local-state <code>foundation.harness.state-store</code> host-profile-integration <code>foundation.kit.host</code>\u3001<code>foundation.profile.extension-spi</code>"},{"location":"recipes/adapter-text-closure/","title":"\u4e2d\u6587 \u00b7 Adapter \u6587\u672c\u95ed\u5305","text":"<p>English</p>"},{"location":"recipes/adapter-text-closure/#Recipe\u6587\u672c\u8d44\u6e90\u95ed\u5305\u4e0e\u5bbf\u4e3b\u6784\u5efa","title":"Recipe\uff1a\u6587\u672c\u8d44\u6e90\u95ed\u5305\u4e0e\u5bbf\u4e3b\u6784\u5efa","text":""},{"location":"recipes/adapter-text-closure/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u628a\u4e00\u7ec4\u6587\u672c\u8d44\u6e90\u5f52\u4e00\u6210\u53ef\u590d\u7b97\u7684\u95ed\u5305\uff0c\u5e76\u636e\u6b64\u5728\u53d7\u6536\u5bb9\u5904 materialize \u4e00\u4e2a\u5bbf\u4e3b\u9002\u914d\u6784\u5efa\uff0c\u4e14\u6784\u5efa\u6e05\u5355\u53ef\u5168\u6458\u8981\u590d\u9a8c\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u628a\u4e8c\u8fdb\u5236\u8d44\u6e90\u7eb3\u5165 adapter \u6295\u5f71\uff08\u4ec5\u652f\u6301\u6587\u672c\u95ed\u5305\uff09\uff1b\u9700\u8981 Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply\u3001\u81ea\u52a8\u5220\u9664\u5f0f uninstall\u3002</p>"},{"location":"recipes/adapter-text-closure/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.resource-closure</code>\uff08\u786e\u5b9a\u6027\u95ed\u5305\u4e0e sha256 \u6458\u8981\uff09\u4e0e <code>foundation.harness.host-adapter</code>\uff08adapter source closure / build / manifest \u6821\u9a8c / materialize / <code>verifyPeerAdapterDirectories</code> \u53ea\u8bfb\u540c\u7ea7\u9a8c\u8bc1\uff09\u3002</p>"},{"location":"recipes/adapter-text-closure/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>adapter source \u4e3a\u5df2\u58f0\u660e\u7684\u6587\u672c\u95ed\u5305\uff08<code>content</code> \u53ea\u63a5\u53d7 string\uff0cutf8\uff09\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1amaterialize \u7528 sibling staging + \u5355\u6b21 rename\uff0c\u76ee\u6807\u5df2\u5b58\u5728\u5219\u62d2\u7edd\uff1bprobe \u9ed8\u8ba4\u4e0d spawn\u3001\u4e0d\u8d70 PATH\u3002</li> </ul>"},{"location":"recipes/adapter-text-closure/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import {\n computeResourceClosure,\n buildAdapterClosure,\n verifyAdapterBuildManifest,\n materializeAdapterBuild,\n} from \"skill-family-harness-node\";\n\nconst closure = computeResourceClosure([\n { path: \"skill.json\", content: \"{}\" },\n { path: \"readme.md\", content: \"# demo\" },\n]);\nconst built = buildAdapterClosure(closure);\nverifyAdapterBuildManifest(built.manifest); // \u5168\u6458\u8981\u590d\u9a8c\nawait materializeAdapterBuild(built, { outDir: \"./out\" }); // \u53d7\u6536\u5bb9\u843d\u76d8\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u5148\u7b97\u95ed\u5305\u3001\u518d\u6821\u9a8c\u6e05\u5355\u3001\u6700\u540e\u539f\u5b50 materialize \u7684\u987a\u5e8f\u3002</p>"},{"location":"recipes/adapter-text-closure/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>computeResourceClosure</code> \u8fd4\u56de\u786e\u5b9a\u6027\u95ed\u5305\u5bf9\u8c61\u4e0e sha256 \u6458\u8981\uff1b<code>materializeAdapterBuild</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u51fa\u4ea7\u7269\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/closure.test.mjs</code> \u4e0e <code>test/host.test.mjs</code>\u3002</p>"},{"location":"recipes/adapter-text-closure/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u4e8c\u8fdb\u5236 content \u4e0d\u652f\u6301 -&gt; \u6821\u9a8c/\u6784\u5efa\u62d2\u7edd\nbuildAdapterClosure({ path: \"x.bin\", content: Buffer.from([0, 1, 2]) });\n// \u629b HarnessError\uff1aadapter source content \u4ec5\u652f\u6301 string (utf8)\n</code></pre> <p>\u6e05\u5355\u6458\u8981\u4e0d\u7b26\u3001\u76ee\u6807\u5df2\u5b58\u5728\u3001\u975e\u53d7\u4fe1\u53ef\u6267\u884c\u6587\u4ef6\u4e5f\u4f1a\u629b\u9519\u3002</p>"},{"location":"recipes/adapter-text-closure/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/closure.test.mjs \\\n packages/skill-family-harness-node/test/host.test.mjs\n</code></pre>"},{"location":"recipes/adapter-text-closure/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u5bbf\u4e3b\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\u3002</li> <li>\u5bbf\u4e3b\u5dee\u5f02\u58f0\u660e\u7531 Profile + Kit host \u5b50\u52a8\u4f5c\u6ce8\u5165\u3002</li> </ul>"},{"location":"recipes/adapter-text-closure/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>Harness \u53ea\u8d1f\u8d23\u6784\u5efa\u548c\u53ea\u8bfb\u540c\u7ea7\u9a8c\u8bc1\u3002\u5305 API <code>applyHostPlan</code> \u5728 Kit \u5c42\u652f\u6301\u5df2\u767b\u8bb0\u3001\u6458\u8981\u7ed1\u5b9a\u7684\u672c\u5730 install/update\uff1b\u6267\u884c uninstall \u8ba1\u5212\u4e0d\u5220\u9664\u6587\u4ef6\u3002Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply \u4ecd\u7a33\u5b9a\u62d2\u7edd\uff0cQoder \u5b8c\u6574 driver \u4e3a unsupported\u3002</li> <li><code>verifyPeerAdapterDirectories</code> \u53ea\u8bc1\u660e\u540c\u7ea7\u76ee\u5f55\u7684\u95ed\u5305\u3001\u5b57\u8282\u548c <code>logicalMappings</code> \u4e00\u81f4\uff0c\u4e0d\u63a8\u5bfc\u5b89\u88c5\u3001\u53d1\u5e03\u6216\u9886\u57df\u72b6\u6001\u3002</li> <li>materialize \u4e3a\u539f\u5b50 sibling + rename\uff0c\u5931\u8d25\u65f6\u4e0d\u5f71\u54cd\u65e2\u6709\u76ee\u6807\uff1b\u5347\u7ea7\u8ddf\u968f <code>skill-family-harness-node</code> \u7248\u672c\u3002</li> </ul>"},{"location":"recipes/adopt-existing-repository/","title":"\u4e2d\u6587 \u00b7 \u91c7\u7528\u5b58\u91cf\u4ed3\u5e93","text":"<p>English</p>"},{"location":"recipes/adopt-existing-repository/#Recipe\u5b58\u91cf\u4ed3\u53ea\u8bfb\u91c7\u7528\u76d8\u70b9","title":"Recipe\uff1a\u5b58\u91cf\u4ed3\u53ea\u8bfb\u91c7\u7528\u76d8\u70b9","text":""},{"location":"recipes/adopt-existing-repository/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u5bf9\u4e00\u4e2a\u5df2\u5b58\u5728\u7684\u5b58\u91cf\u4ed3\u5224\u65ad\u662f\u5426\u53ef\u91c7\u7528 Foundation\uff0c\u5e76\u62ff\u5230\u7cbe\u786e\u5199\u96c6\u3001\u51b2\u7a81\u4e0e\u65e7\u5b9e\u73b0\u9000\u51fa\u6e05\u5355\uff0c\u4e14\u4e0d\u6539\u52a8\u4efb\u4f55\u5b57\u8282\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u81ea\u52a8\u6539\u5199\u5b58\u91cf\u4ed3\uff08\u7981\u6b62\u5199\u6587\u4ef6\u3001\u7981\u6b62\u81ea\u52a8\u8fc1\u79fb\uff09\uff1b\u9700\u8981\u53d1\u5e03\u5230\u8fdc\u7aef\uff08\u5f52 release-skill\uff09\u3002</p>"},{"location":"recipes/adopt-existing-repository/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.kit.adopt-plan</code>\uff08\u4e25\u683c\u53ea\u8bfb\u76d8\u70b9\u4e0e\u5b8c\u6210\u5224\u5b9a\uff09\u3002\u5b83\u53ea\u8f93\u51fa\uff0c\u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u8fd0\u884c git \u5199\u547d\u4ee4\u3002</p>"},{"location":"recipes/adopt-existing-repository/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u76ee\u6807\u4ed3\u5b58\u5728\u4e14\u53ef\u88ab\u53ea\u8bfb\u8bbf\u95ee\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a<code>adopt-plan</code> \u5bf9\u8f93\u5165\u4ed3\u5b57\u8282\u96f6\u53d8\u5316\uff1b\u65e7\u5b9e\u73b0\u5220\u9664\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff0c\u5de5\u5177\u7edd\u4e0d\u4ee3\u4e3a\u5220\u9664\u3002</li> </ul>"},{"location":"recipes/adopt-existing-repository/#4-\u6700\u5c0f\u547d\u4ee4","title":"4. \u6700\u5c0f\u547d\u4ee4","text":"<pre><code>npm install --save-dev skill-family-engineering-kit@0.3.0\nnpm exec -- skill-family-kit adopt-plan --root &lt;repo&gt;\n</code></pre>"},{"location":"recipes/adopt-existing-repository/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p>\u8f93\u51fa\u5305\u542b\u73b0\u72b6\uff08<code>target</code>\uff09\u3001\u76ee\u6807 Profile \u4e0e\u8ffd\u6eaf\uff08<code>project</code>/<code>traceability</code>\uff09\u3001\u53ea\u8bfb Git \u524d\u7f6e\u72b6\u6001\uff08<code>git</code>\uff09\u3001\u7cbe\u786e\u5199\u96c6\uff08<code>writeSet</code>\uff09\u3001\u51b2\u7a81\uff08<code>conflicts</code>\uff09\u3001\u98ce\u9669\uff08<code>risks</code>\uff09\u3001\u8fc1\u79fb\u72b6\u6001\u673a\uff08<code>migration</code>\uff09\u4e0e\u9a8c\u6536\u547d\u4ee4\u5e8f\u5217\uff08<code>verificationPlan</code>\uff09\u3002\u8bc1\u636e\u6765\u81ea <code>packages/skill-family-engineering-kit/test/adopt-plan.test.mjs</code> \u4e0e <code>test/migration.test.mjs</code>\u3002</p>"},{"location":"recipes/adopt-existing-repository/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<p>dirty \u4ed3\u8fd0\u884c <code>adopt-plan</code> \u524d\u540e\uff0c\u8f93\u5165\u4ed3\u5b57\u8282\u5fc5\u987b\u5b8c\u5168\u4e00\u81f4\uff08\u54c8\u5e0c\u8d70\u67e5\u53ef\u8bc1\uff09\uff1b\u5de5\u5177\u4e0d\u5199\u4e34\u65f6\u6587\u4ef6\u3001\u4e0d\u89e6\u78b0\u8fdc\u7aef\u3002\u82e5\u8fc1\u79fb\u6e05\u5355\u7f3a <code>exceptions</code> \u5fc5\u586b\u5b57\u6bb5\uff0c\u8ba1\u5212\u76f4\u63a5\u5931\u8d25\uff08\u5b8c\u6210\u5224\u5b9a false\uff09\uff0c\u5de5\u5177\u4e0d\u7eed\u671f\u3002</p>"},{"location":"recipes/adopt-existing-repository/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code># \u6b63\u4f8b\uff1a\u5bf9\u516c\u5f00 fixture \u5b58\u91cf\u4ed3\u505a\u53ea\u8bfb\u76d8\u70b9\nnpm exec -- skill-family-kit adopt-plan --root fixtures/m0-consumer\n\n# \u53ea\u8bfb\u8bca\u65ad\uff0c\u4e0d\u4fee\u590d\nnpm exec -- skill-family-kit check --root fixtures/m0-consumer\n</code></pre>"},{"location":"recipes/adopt-existing-repository/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u65e7\u5b9e\u73b0\u662f\u5426\u9000\u51fa\u3001\u4f55\u65f6\u5220\u9664\uff08\u5de5\u5177\u53ea\u8bc4\u4f30\u5b58\u5728\u6027\u5e76\u5217\u51fa\u9000\u51fa\u6e05\u5355\uff09\u3002</li> <li><code>business-logic-to-keep</code> \u4e0e <code>legacy-removal-recovery</code> \u6052\u4e3a INCOMPLETE\uff0c\u5fc5\u987b\u7531\u4eba\u7c7b\u8d1f\u8d23\u4eba\u7ed9\u51fa\u3002</li> </ul>"},{"location":"recipes/adopt-existing-repository/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li><code>adopt-plan</code> \u53ea\u8bfb\uff0c\u65e0\u5199\u98ce\u9669\uff0c\u65e0\u9700\u56de\u6eda\u3002</li> <li>\u771f\u6b63\u843d\u76d8\u7531 <code>scaffold</code>/<code>projection</code> \u6267\u884c\uff0c\u56de\u6eda\u4ee5 <code>adoptionProof</code> \u4e0e <code>foundationPlanDigest</code> \u53cc\u6458\u8981\u7ed1\u5b9a\u4e3a\u51c6\uff1b\u672a\u58f0\u660e <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u7684\u8986\u76d6\u52a8\u4f5c\u5728 <code>projection</code> \u9636\u6bb5\u5373\u62d2\u7edd\u3002</li> <li>\u82e5\u91c7\u7528 Quickstart Profile candidate\uff0c\u4e09\u4e2a\u5305\u6309\u540c\u4e00 profile \u7cbe\u786e\u9501\u5b9a\uff1av2 \u4f7f\u7528 0.3.0\uff0cv1 \u7ee7\u7eed\u4f7f\u7528 0.2.1\uff0c\u4e0d\u6df7\u88c5\u3002</li> </ul>"},{"location":"recipes/deterministic-human-report/","title":"\u4e2d\u6587 \u00b7 \u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a","text":"<p>English</p>"},{"location":"recipes/deterministic-human-report/#Recipe\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a","title":"Recipe\uff1a\u786e\u5b9a\u6027\u4eba\u7c7b\u62a5\u544a","text":""},{"location":"recipes/deterministic-human-report/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u4ece\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\u6210\u4eba\u7c7b\u53ef\u8bfb\u62a5\u544a\uff08Markdown + digest \u7ed1\u5b9a + \u5206\u7ea7\u68c0\u67e5\uff09\uff0c\u53cc\u8f93\u51fa\u6210\u7ec4\u5199\u5165\u5e76\u62d2\u7edd\u8def\u5f84\u522b\u540d\u4e0e\u8f93\u5165\u8986\u76d6\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u4ece\u5f00\u653e\u4e1a\u52a1 outputs \u81ea\u7531\u7f16\u62a5\u544a\uff08\u7981\u6b62\uff09\uff1b\u9700\u8981\u6a21\u578b\u8c03\u7528\u6216\u4e1a\u52a1\u7f16\u6392\u3002</p>"},{"location":"recipes/deterministic-human-report/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.report</code>\uff08validate \u2192 render \u2192 bind \u2192 check\uff0c\u7eaf\u51fd\u6570\uff09\u4e0e <code>foundation.kit.report</code>\uff08CLI \u5b50\u52a8\u4f5c\u7f16\u6392\u6e32\u67d3\u4e0e\u5206\u7ea7\uff09\u3002</p>"},{"location":"recipes/deterministic-human-report/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u5df2\u5b58\u5728\u7ecf Contracts \u6821\u9a8c\u7684 report-model \u4e0e operation-result\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1aMarkdown \u786e\u5b9a\u6027\u8f6c\u4e49\uff1bmodel/result/report \u4e09\u6458\u8981\u7ed1\u5b9a\uff1b\u8c03\u7528\u65b9\u5fc5\u987b\u5148\u6784\u9020\u5408\u6cd5 model\uff0cKit \u4e0d\u4ece\u4e1a\u52a1 outputs \u63a8\u5bfc\u4e8b\u5b9e\u3002</li> </ul>"},{"location":"recipes/deterministic-human-report/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import {\n validateReportModel,\n renderReportMarkdown,\n buildBinding,\n checkReport,\n} from \"skill-family-harness-node\";\n\nvalidateReportModel(model);\nconst markdown = renderReportMarkdown(model, { locale: \"zh-CN\" });\nconst binding = buildBinding(model, result, markdown);\nconst graded = checkReport(model, result, markdown, binding); // \u5206\u7ea7\u68c0\u67e5\u53d1\u73b0\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u6a21\u578b\u6821\u9a8c\u3001\u6e32\u67d3\u3001\u7ed1\u5b9a\u4e0e\u5206\u7ea7\u68c0\u67e5\u7684\u56db\u6b65\u987a\u5e8f\u3002</p>"},{"location":"recipes/deterministic-human-report/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>renderReportMarkdown</code> \u8fd4\u56de\u786e\u5b9a\u6027 Markdown\uff1b<code>buildBinding</code> \u4ea7\u51fa\u4e09\u6458\u8981\u7ed1\u5b9a\uff1b<code>checkReport</code> \u8fd4\u56de\u5206\u7ea7\u68c0\u67e5\u53d1\u73b0\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/report.test.mjs</code> \u4e0e <code>packages/skill-family-engineering-kit/test/report.test.mjs</code>\u3002</p>"},{"location":"recipes/deterministic-human-report/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u62a5\u544a\u5b57\u8282\u504f\u79bb\u786e\u5b9a\u6027\u91cd\u6e32\u67d3 -&gt; SFC3003 (REPORT_FACT_DRIFT)\n// \u624b\u5de5\u6539\u4e86 markdown \u518d bind/check\uff0c\u6458\u8981\u5bf9\u4e0d\u4e0a\u5373\u5931\u8d25\ncheckReport(model, result, tamperedMarkdown, binding);\n// \u629b HarnessError\uff0cerrorCode = \"SFC3003\"\n</code></pre> <p><code>SFC3001</code>\uff08\u6458\u8981\u4e0d\u4e00\u81f4\uff09\u3001<code>SFC3002</code>\uff08\u7f3a\u5f3a\u5236\u5143\u7d20\uff09\u540c\u6837\u4e3a\u786c\u5931\u8d25\u3002</p>"},{"location":"recipes/deterministic-human-report/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/report.test.mjs \\\n packages/skill-family-engineering-kit/test/report.test.mjs\n</code></pre>"},{"location":"recipes/deterministic-human-report/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u62a5\u544a\u4e1a\u52a1\u7ed3\u8bba\u7684\u89e3\u8bfb\u3002</li> <li>\u8c03\u7528\u65b9\u5fc5\u987b\u5148\u6784\u9020\u5408\u6cd5 report-model\uff08Kit \u4e0d\u4ece\u4e1a\u52a1 outputs \u63a8\u5bfc\u4e8b\u5b9e\uff09\u3002</li> </ul>"},{"location":"recipes/deterministic-human-report/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\uff0c\u4e0d\u81ea\u7531\u64b0\u5199\uff1b\u5347\u7ea7\u8ddf\u968f <code>skill-family-harness-node</code> \u4e0e <code>skill-family-engineering-kit</code> \u7248\u672c\u3002</li> <li>\u53cc\u8f93\u51fa\u6210\u7ec4\u5199\u5165\uff0c\u62d2\u7edd\u8def\u5f84\u522b\u540d\u4e0e\u8f93\u5165\u8986\u76d6\uff0c\u56de\u6eda\u4ee5\u5199\u5165\u524d\u7684 <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u8fd8\u539f\u3002</li> </ul>"},{"location":"recipes/domain-schema-validation/","title":"\u4e2d\u6587 \u00b7 \u9886\u57df Schema \u6821\u9a8c","text":"<p>English</p>"},{"location":"recipes/domain-schema-validation/#Recipe\u9886\u57df\u65e0\u5173\u7684\u5951\u7ea6\u5bf9\u8c61\u6821\u9a8c","title":"Recipe\uff1a\u9886\u57df\u65e0\u5173\u7684\u5951\u7ea6\u5bf9\u8c61\u6821\u9a8c","text":""},{"location":"recipes/domain-schema-validation/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u6821\u9a8c\u4e00\u4efd\u6587\u6863\u662f\u5426\u7b26\u5408 Foundation \u5df2\u767b\u8bb0\u7684\u5951\u7ea6\u5bf9\u8c61\uff08\u5982 project-manifest\uff09\uff0c\u6309\u65b9\u8a00\u9009\u62e9\u6821\u9a8c\u7b56\u7565\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u6821\u9a8c\u6d88\u8d39\u8005\u81ea\u6709\u4e1a\u52a1 Schema\uff08\u6d88\u8d39\u8005\u5e94\u81ea\u884c\u6301\u6709\uff0cFoundation \u4e0d\u53d6\u4ee3\uff09\uff1b\u9700\u8981\u628a\u9886\u57df\u8bed\u4e49\u6821\u9a8c\u6df7\u5165\u901a\u7528\u5951\u7ea6\u3002</p> <p>Quickstart Profile v2 \u662f\u5355\u72ec\u7684 candidate \u8def\u5f84\u3002\u6d88\u8d39\u8005\u4ecd\u62e5\u6709\u4e1a\u52a1 Schema\uff1bEngineering Kit \u53ea\u5728\u6784\u5efa\u9636\u6bb5\u628a\u663e\u5f0f Schema \u96c6\u5408\u7f16\u8bd1\u6210\u6309 <code>$id</code> \u67e5\u8be2\u7684\u79bb\u7ebf validator\uff0c\u4e0d\u63a5\u7ba1 method \u5230 Schema \u7684\u9009\u62e9\u3002</p>"},{"location":"recipes/domain-schema-validation/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.contracts.object-validation</code>\uff08<code>validateDocument</code> / <code>compileSchema</code> / <code>detectDialect</code>\uff09\u3002\u7eaf Ajv \u5b9e\u73b0\uff0c\u652f\u6301 draft-07 \u4e0e 2020-12\u3002</p>"},{"location":"recipes/domain-schema-validation/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u5f85\u6821\u9a8c\u6587\u6863\u5e26\u6709\u5df2\u767b\u8bb0\u5951\u7ea6\u5bf9\u8c61\u7684 <code>$id</code>\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a<code>validateDocument</code> \u6c38\u4e0d\u4fee\u6539\u8c03\u7528\u8005\u8f93\u5165\uff1b\u89c4\u8303\u5316\u526f\u672c\u53ea\u5728\u7ed3\u679c <code>data</code> \u5b57\u6bb5\u8fd4\u56de\u3002</li> </ul>"},{"location":"recipes/domain-schema-validation/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import { validateDocument } from \"skill-family-contracts\";\n\nconst document = {\n schemaVersion: 1,\n kind: \"skill-family.project-manifest\",\n project: { id: \"my-project\", name: \"My Project\", description: \"Example\" },\n contracts: { version: \"1.0.0\", profile: \"generic\" },\n managedFiles: [\"package.json\"],\n updatedAt: \"2026-01-01T00:00:00Z\",\n};\n\nconst result = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/project-manifest.json\",\n dialect: \"2020-12\",\n});\nif (!result.valid) console.error(result.errorCode);\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u7528 <code>$id</code> \u6307\u5b9a\u76ee\u6807 Schema \u5e76\u53d6\u56de <code>{ valid, errorCode, errors, data }</code>\u3002</p>"},{"location":"recipes/domain-schema-validation/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p>\u6821\u9a8c\u901a\u8fc7\u65f6 <code>result.valid</code> \u4e3a true\uff1b\u5931\u8d25\u65f6 <code>errorCode</code> \u4e3a <code>SFC1001</code> \u7b49\u7a33\u5b9a\u7801\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-contracts/test/validator.test.mjs</code> \u4e0e <code>test/schemas.test.mjs</code>\u3002</p>"},{"location":"recipes/domain-schema-validation/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u672a\u77e5 $id -&gt; \u8fd4\u56de valid:false\uff0cerrorCode = SFC1002 (UNKNOWN_SCHEMA_ID)\nconst bad = validateDocument(document, {\n schemaId: \"https://contracts.skill-family.example/v1/does-not-exist.json\",\n dialect: \"2020-12\",\n});\n// \u4e0d\u629b\u5f02\u5e38\uff0c\u8fd4\u56de\u7ed3\u6784\u5316\u7ed3\u679c\uff1a\n// { valid: false, errorCode: \"SFC1002\",\n// errors: [{ message: \"unknown schema $id: https://contracts.skill-family.example/v1/does-not-exist.json\" }] }\nif (!bad.valid) console.error(bad.errorCode); // SFC1002\n</code></pre>"},{"location":"recipes/domain-schema-validation/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-contracts/test/validator.test.mjs \\\n packages/skill-family-contracts/test/schemas.test.mjs\n</code></pre>"},{"location":"recipes/domain-schema-validation/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u5177\u4f53\u4e1a\u52a1\u5b57\u6bb5\u7684\u8bed\u4e49\u89e3\u91ca\u3002</li> <li>\u9886\u57df\u7ea7\u6821\u9a8c\u89c4\u5219\uff08\u4e0d\u5728 Foundation \u901a\u7528\u5951\u7ea6\u5185\uff09\u3002</li> </ul>"},{"location":"recipes/domain-schema-validation/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u5951\u7ea6\u6743\u5a01\u7248\u672c <code>CONTRACTS_VERSION = 1.4.0</code>\uff0cnpm \u5305\u7248\u672c <code>0.3.0</code> \u5e76\u884c\uff0c\u4e0d\u6df7\u7528\u3002</li> <li>\u9519\u8bef\u7801\u51bb\u7ed3\u4e0d\u6f02\u79fb\uff1bSchema \u53d8\u66f4\u4f5c\u4e3a\u65b0\u7684\u5408\u540c\u7248\u672c\u4efb\u52a1\u8fdb\u884c\uff0c\u4e0d\u5c31\u5730\u6539\u51bb\u7ed3\u5185\u5bb9\u3002</li> <li>candidate v2 \u5fc5\u987b\u7cbe\u786e\u9501\u5b9a 0.3.0\uff1b\u4ecd\u9700 v1 \u7684\u63a5\u5165\u7ee7\u7eed\u7cbe\u786e\u9501\u5b9a 0.2.1\u3002</li> </ul>"},{"location":"recipes/durable-local-state/","title":"\u4e2d\u6587 \u00b7 \u6301\u4e45\u672c\u5730\u72b6\u6001","text":"<p>English</p>"},{"location":"recipes/durable-local-state/#Recipe\u6301\u4e45\u672c\u5730\u72b6\u6001\u5e95\u5ea7","title":"Recipe\uff1a\u6301\u4e45\u672c\u5730\u72b6\u6001\u5e95\u5ea7","text":""},{"location":"recipes/durable-local-state/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u6301\u4e45\u5316\u4e8b\u4ef6\u65e5\u5fd7\u5e76\u4fdd\u8bc1\u987a\u5e8f\u4e0e\u5b8c\u6574\u6027\uff0c\u91cd\u5efa\u6216\u6821\u9a8c\u6d3e\u751f\u5feb\u7167\uff0c\u4ee5\u53ca\u68c0\u67e5\u6216\u6062\u590d\u534f\u4f5c\u5f0f\u5355\u5199\u8005\u9501\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u5728 Foundation \u5b9a\u4e49 workflow \u72b6\u6001\u673a\uff08\u7981\u6b62\uff09\uff1b\u9700\u8981\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\uff08fencing \u4e0d\u627f\u8bfa\u8be5\u573a\u666f\uff09\u3002</p>"},{"location":"recipes/durable-local-state/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.state-store</code>\uff08append-only \u4e8b\u4ef6\u3001hash chain\u3001\u5feb\u7167\u4e0e\u9501\u68c0\u67e5/\u6062\u590d\uff09\u3002\u4e8b\u4ef6\u542b\u4e49\u4e0e reducer \u8f6c\u79fb\u7531\u8c03\u7528\u65b9\u62e5\u6709\u3002</p>"},{"location":"recipes/durable-local-state/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li><code>STATE_GENESIS_DIGEST</code> \u4f5c\u4e3a\u94fe\u8d77\u70b9\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u662f\u552f\u4e00\u6743\u5a01\uff0csnapshot \u4e3a\u6d3e\u751f\u7f13\u5b58\uff1b<code>confirmOwnerTerminated</code> \u662f\u8c03\u7528\u65b9\u63d0\u4f9b\u7684\u5916\u90e8\u4fe1\u4efb\u951a\uff0c\u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\u3002</li> </ul>"},{"location":"recipes/durable-local-state/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport {\n openStateStore,\n appendEvent,\n readEvents,\n writeSnapshot,\n readSnapshot,\n inspectStateStoreLock,\n recoverStateStoreLock,\n} from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-state-\"));\nconst store = openStateStore(root, { owner: \"writer-a\", expectedSchemas: [] });\nappendEvent(store, { eventType: \"demo\", payload: { n: 1 } });\nwriteSnapshot(store, readEvents(store));\nconst snap = readSnapshot(store);\nconst lock = inspectStateStoreLock(root); // { owner, fencing, ageMs, recovering }\nawait recoverStateStoreLock(root, {\n expectedOwner: lock.owner,\n expectedFencing: lock.fencing,\n confirmOwnerTerminated: true,\n});\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u5f00\u5e93\u3001\u8ffd\u52a0\u4e8b\u4ef6\u3001\u5199\u5feb\u7167\u3001\u67e5\u9501\u4e0e\u663e\u5f0f\u6062\u590d\u7684\u987a\u5e8f\u3002</p>"},{"location":"recipes/durable-local-state/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>readEvents</code> \u8fd4\u56de\u8ffd\u52a0\u7684\u4e8b\u4ef6\uff0c<code>readSnapshot</code> \u8fd4\u56de\u6d3e\u751f\u5feb\u7167\uff0c<code>inspectStateStoreLock</code> \u8fd4\u56de <code>owner</code>/<code>fencing</code>/<code>ageMs</code>/<code>recovering</code>\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/state-store.test.mjs</code>\uff08\u542b 34 \u5904\u65ad\u8a00\uff09\u3002</p>"},{"location":"recipes/durable-local-state/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u7b2c\u4e8c\u5199\u8005\u7acb\u5373\u6536\u5230 store-locked\nconst other = openStateStore(root, { owner: \"writer-b\", expectedSchemas: [] });\n// \u629b HarnessError\uff1adetails.kind = \"store-locked\"\n</code></pre> <p>hash chain \u65ad\u88c2\u3001\u9501 fencing \u4e0d\u5339\u914d\u3001\u6062\u590d\u7f3a\u5c11 <code>confirmOwnerTerminated</code> \u5747\u5931\u8d25\u5173\u95ed\u3002</p>"},{"location":"recipes/durable-local-state/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/state-store.test.mjs\n</code></pre>"},{"location":"recipes/durable-local-state/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u4e8b\u4ef6\u4e1a\u52a1\u542b\u4e49\u3001reducer \u8f6c\u79fb\u3002</li> <li><code>confirmOwnerTerminated</code> \u4fe1\u4efb\u951a\uff08Foundation \u4e4b\u5916\u786e\u8ba4\u65e7\u5199\u8005\u5df2\u7ec8\u6b62\uff09\u3002</li> </ul>"},{"location":"recipes/durable-local-state/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u72b6\u6001\u5e95\u5ea7\u53ea\u63d0\u4f9b\u673a\u5236\uff1b\u4e1a\u52a1\u72b6\u6001\u673a/\u7ec8\u6001\u5f52 loop-agent\u3002</li> <li>\u5d29\u6e83\u9057\u7559\u9501\u9700\u5916\u90e8\u53d6\u8bc1\u540e\u663e\u5f0f\u6062\u590d\uff0c\u4e0d\u81ea\u52a8\u5077\u9501\uff1b\u7cfb\u7edf\u4fdd\u6301\u53ef\u8bca\u65ad\u9501\u6b7b\u800c\u975e\u9759\u9ed8\u8986\u76d6\u3002</li> </ul>"},{"location":"recipes/host-profile-integration/","title":"\u4e2d\u6587 \u00b7 \u5bbf\u4e3b Profile \u96c6\u6210","text":"<p>English</p>"},{"location":"recipes/host-profile-integration/#Recipe\u5bbf\u4e3b\u63a5\u5165\u4e0e-Profile-\u6ce8\u5165","title":"Recipe\uff1a\u5bbf\u4e3b\u63a5\u5165\u4e0e Profile \u6ce8\u5165","text":""},{"location":"recipes/host-profile-integration/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u63cf\u8ff0\u5df2\u767b\u8bb0\u5bbf\u4e3b\uff08claude/codex\uff09\u3001\u63a2\u6d4b\u6216\u89c4\u5212\u5bbf\u4e3b\u63a5\u5165\uff0c\u9a8c\u8bc1\u540c\u7ea7 adapter \u76ee\u5f55\uff0c\u6216\u8005\u901a\u8fc7\u5305 API \u6267\u884c\u6458\u8981\u7ed1\u5b9a\u7684\u672c\u5730 install/update\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981 Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply\u3001\u81ea\u52a8\u5220\u9664\u5f0f uninstall\uff1b\u9700\u8981 Qoder \u7684 install/update \u751f\u547d\u5468\u671f driver\uff08\u8be5\u5bbf\u4e3b\u4e3a <code>manual</code>\uff0c\u53ea\u652f\u6301\u53d7\u7ea6\u675f\u7684\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\uff0c\u4e0d\u6388\u4e88\u751f\u547d\u5468\u671f\u80fd\u529b\uff09\u3002</p>"},{"location":"recipes/host-profile-integration/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.kit.host</code>\uff08<code>describeHost</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>verifyHostPeers</code> / <code>planHost</code> / <code>applyHostPlan</code>\uff09\u4e0e <code>foundation.profile.extension-spi</code>\uff08<code>verifyProfile</code>\uff09\u3002\u5bbf\u4e3b\u5dee\u5f02\u58f0\u660e\u5728 <code>foundation.profile.hosts</code>\u3002</p>"},{"location":"recipes/host-profile-integration/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u5bbf\u4e3b Profile \u5df2\u5728 <code>profiles/hosts</code> \u767b\u8bb0\uff1b0.11.0 \u8d77\uff0cKit \u5b89\u88c5\u5305\u643a\u5e26\u8be5\u95ed\u5305\u7684\u53d7\u7ba1\u6295\u5f71\u3002\u53d7\u4fe1 driver \u4ec5 <code>claude-version-v1</code> / <code>codex-version-v1</code>\u3002\u672c\u5730 install/update \u8fd8\u8981\u6c42\u5df2\u9a8c\u8bc1 build\u3001\u6458\u8981\u4e00\u81f4\u7684 plan\u3001\u53d7\u6536\u5bb9 <code>targetRoot</code> \u4e0e\u663e\u5f0f <code>authorizationRef</code>\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1aProfile \u5165\u53e3\u5fc5\u987b\u662f JSON \u6570\u636e\u8d44\u6e90\uff0c\u516c\u5171\u6838\u5fc3\u4e0d\u5bfc\u5165 <code>profiles/</code>\uff1b<code>coreOwned</code> \u4e3a\u7981\u5165\u76ee\u6807\u3002</li> </ul>"},{"location":"recipes/host-profile-integration/#4-\u6700\u5c0f\u547d\u4ee4\u4e0e\u4ee3\u7801","title":"4. \u6700\u5c0f\u547d\u4ee4\u4e0e\u4ee3\u7801","text":"<pre><code># \u63cf\u8ff0\u5df2\u767b\u8bb0\u5bbf\u4e3b\nnpm exec -- skill-family-kit adopt-plan host-describe --host claude --hosts-root profiles/hosts\n\n# \u53ea\u8bfb\u63a2\u6d4b\uff08\u9ed8\u8ba4\u4e0d spawn\uff09\nnpm exec -- skill-family-kit adopt-plan host-probe --host claude --hosts-root profiles/hosts\n</code></pre> <pre><code>import { bundledHostProfilesRoot, buildHostAdapter, describeHost, probeHost, planHost } from \"skill-family-engineering-kit\";\nimport { verifyProfile } from \"profiles/spi/index.mjs\";\n\nconst hostsRoot = bundledHostProfilesRoot();\nconst desc = await describeHost({ hostId: \"claude\", hostsRoot });\nconst facts = await probeHost({ hostId: \"claude\", hostsRoot, allowSpawn: false });\nconst build = await buildHostAdapter({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n input: {\n schemaVersion: 1,\n kind: \"skill-family.adapter-source\",\n skillFamilyId: \"example-family\",\n skills: [{ id: \"demo\", files: [{ path: \"SKILL.md\", content: \"# Demo\\n\" }] }],\n },\n hostsRoot,\n});\nconst plan = await planHost({\n hostId: \"claude\",\n pathCategoryId: \"claude-project-skills\",\n buildManifest: build.manifest,\n probeFacts: facts.facts,\n hostsRoot,\n});\nconst spi = verifyProfile({ profileRoot: \"profiles/public-plugin\" }); // SPE0000\n</code></pre> <p>\u4ee5\u4e0a\u547d\u4ee4\u5c55\u793a\u4e86\u5982\u4f55\u663e\u5f0f\u9009\u62e9\u4ed3\u5185 Profile \u6839\u3002\u4ee3\u7801\u5219\u4ece\u5b89\u88c5\u5305\u53d6\u5f97\u89c4\u8303\u6839\uff0c\u518d\u8fd0\u884c describe/probe\u3001\u5185\u5b58\u6784\u5efa\u548c plan\uff0c\u5e76\u7528 <code>verifyProfile</code> \u6821\u9a8c Profile \u58f0\u660e\uff1b\u8fd9\u4e9b\u64cd\u4f5c\u6ca1\u6709\u6267\u884c install/update\u3002</p>"},{"location":"recipes/host-profile-integration/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>describeHost</code> \u8fd4\u56de\u5bbf\u4e3b\u63cf\u8ff0\uff0c<code>probeHost</code> \u8fd4\u56de\u53ea\u8bfb\u63a2\u6d4b\u4e8b\u5b9e\uff0c<code>planHost</code> \u8fd4\u56de\u63a5\u5165\u8ba1\u5212\uff0c<code>verifyProfile</code> \u8fd4\u56de <code>SPE0000</code> \u7b49\u7ed3\u679c\u7801\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-engineering-kit/test/host.test.mjs</code> \u4e0e <code>fixtures/generic-profile-extension-conformance/verify.mjs</code>\u3002</p>"},{"location":"recipes/host-profile-integration/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code># \u8d1f\u4f8b\uff1aCLI apply \u7a33\u5b9a\u62d2\u7edd\nnpm exec -- skill-family-kit adopt-plan host-apply --host claude --hosts-root profiles/hosts\n# \u9000\u51fa\u7801 2\uff1ahost apply is not implemented in the read-only Phase D slice\n</code></pre> <pre><code>// \u8d1f\u4f8b\uff1aqoder \u4e3a manual\uff0c\u4e0d\u6388\u4e88\u751f\u547d\u5468\u671f\u80fd\u529b\nconst qoder = await describeHost({ hostId: \"qoder\", hostsRoot }); // support = \"manual\"\uff0c\u65e0 driverId\nconst qoderFacts = await probeHost({ hostId: \"qoder\", hostsRoot }); // \u4e5d\u9879\u5747\u4e3a unknown / driver-limited\nconst qoderPlan = await planHost({ hostId: \"qoder\", hostsRoot }); // status = \"manual\"\uff0cactions \u4e3a\u7a7a\n</code></pre>"},{"location":"recipes/host-profile-integration/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-engineering-kit/test/host.test.mjs \\\n fixtures/generic-profile-extension-conformance/verify.mjs\n</code></pre>"},{"location":"recipes/host-profile-integration/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u5bbf\u4e3b\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\u3002</li> <li>\u672c\u5730 install/update \u7684\u4e1a\u52a1\u6388\u6743\u4e0e\u5b8c\u6210\u5224\u5b9a\uff1b\u5378\u8f7d\u65f6\u7684\u4eba\u5de5\u6062\u590d\u548c\u6587\u4ef6\u5220\u9664\u3002</li> </ul>"},{"location":"recipes/host-profile-integration/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u5305 API <code>applyHostPlan</code> \u652f\u6301\u5df2\u767b\u8bb0\u3001\u6458\u8981\u7ed1\u5b9a\u7684\u672c\u5730 install/update\uff1b\u6267\u884c uninstall \u8ba1\u5212\u53ea\u8fd4\u56de <code>manual-recovery-required</code>\uff0c\u4e0d\u5220\u9664\u6587\u4ef6\u3002Kit CLI apply\u3001\u901a\u7528\u6216\u8fdc\u7aef apply \u4ecd\u7a33\u5b9a\u62d2\u7edd\u3002</li> <li><code>verifyHostPeers</code> \u53ea\u505a\u540c\u7ea7 adapter \u76ee\u5f55\u7684\u53ea\u8bfb\u590d\u9a8c\uff0c\u4e0d\u6388\u4e88\u5b89\u88c5\u3001\u53d1\u5e03\u6216\u9886\u57df\u88c1\u51b3\u80fd\u529b\u3002</li> <li><code>bundledHostProfilesRoot()</code> \u53ea\u63d0\u4f9b\u53d7\u7ba1 Profile \u6839\u3002\u5bbf\u4e3b\u5165\u53e3\u4ecd\u8981\u6c42\u663e\u5f0f\u4f20 <code>hostsRoot</code>\uff0c\u8c03\u7528\u65b9\u4e5f\u53ef\u4ee5\u9009\u62e9\u53e6\u4e00\u7ec4\u7b26\u5408\u5408\u540c\u7684 Profile\u3002</li> <li>Qoder \u4e3a <code>manual</code> \u5bbf\u4e3b\uff1aDescriptor <code>support</code> \u4e0e <code>maturity</code> \u5747\u4e3a <code>manual</code>\uff0c\u771f\u5b9e\u9a8c\u8bc1\u80fd\u529b\u7684\u7a33\u5b9a\u6027\u7531\u80fd\u529b\u76ee\u5f55\u7684 <code>stability=candidate</code> \u8868\u8fbe\u3002\u53ea\u767b\u8bb0\u53d7\u7ea6\u675f\u7684\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u80fd\u529b\uff0c\u4e0d\u6388\u4e88 build\u3001plan\u3001apply\u3001\u901a\u7528 install/update/uninstall \u6216 rollback\uff1b\u5347\u7ea7\u65b0\u589e\u53d7\u652f\u6301\u5bbf\u4e3b\u987b\u767b\u8bb0 descriptor \u5e76\u7ed1\u5b9a\u53d7\u4fe1 driver\u3002</li> </ul>"},{"location":"recipes/safe-filesystem-and-atomic-write/","title":"\u4e2d\u6587 \u00b7 \u5b89\u5168\u6587\u4ef6\u7cfb\u7edf\u4e0e\u539f\u5b50\u5199","text":"<p>English</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#Recipe\u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u4e0e\u539f\u5b50\u5199","title":"Recipe\uff1a\u5b89\u5168\u6587\u4ef6\u8bbf\u95ee\u4e0e\u539f\u5b50\u5199","text":""},{"location":"recipes/safe-filesystem-and-atomic-write/#1-\u573a\u666f\u4e0e\u975e\u573a\u666f","title":"1. \u573a\u666f\u4e0e\u975e\u573a\u666f","text":"<p>\u9002\u7528\uff1a\u9700\u8981\u5728 Node \u5185\u628a\u5916\u90e8\u63d0\u4f9b\u7684\u8def\u5f84\u9650\u5236\u5728\u67d0\u4e2a\u6839\u76ee\u5f55\u5185\uff0c\u5e76\u5411\u53d7\u6536\u5bb9\u8def\u5f84\u539f\u5b50\u5199\u5165\u666e\u901a\u6587\u4ef6\uff0c\u5931\u8d25\u65f6\u56de\u6eda\u4e0d\u7559\u6b8b\u5f71\u3002</p> <p>\u4e0d\u9002\u7528\uff1a\u9700\u8981\u628a\u6587\u4ef6\u9009\u62e9\u7684\u4e1a\u52a1\u89c4\u5219\u653e\u5165 Foundation\uff08\u4e1a\u52a1\u89c4\u5219\u7531\u8c03\u7528\u65b9\u62e5\u6709\uff09\uff1b\u9700\u8981\u5199\u5165\u672a\u53d7\u6536\u5bb9\u8def\u5f84\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#2-\u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b-ID","title":"2. \u67b6\u6784\u9009\u62e9\u53ca\u80fd\u529b ID","text":"<p>\u9996\u9009\u80fd\u529b\uff1a<code>foundation.harness.path-containment</code>\uff08\u8def\u5f84\u5206\u7c7b\u4e0e\u53d7\u6536\u5bb9\u89e3\u6790\uff09\u4e0e <code>foundation.harness.atomic-write</code>\uff08\u53d7\u6536\u5bb9\u8def\u5f84\u5185\u539f\u5b50\u5199\uff09\u3002\u4e24\u8005\u90fd\u53ea\u5b9e\u73b0\u673a\u5236\uff0c\u4e0d\u62e5\u6709\u8bed\u4e49\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#3-\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","title":"3. \u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u8fb9\u754c","text":"<ul> <li>\u8c03\u7528\u65b9\u63d0\u4f9b\u660e\u786e\u7684\u6839\u76ee\u5f55\uff08\u6536\u5bb9\u8fb9\u754c\uff09\u3002</li> <li>\u4fe1\u4efb\u8fb9\u754c\uff1a\u6240\u6709\u89e3\u6790\u7ed3\u679c\u5fc5\u987b\u843d\u5728\u6839\u76ee\u5f55\u5185\uff1b\u8d8a\u754c\u3001\u7b26\u53f7\u94fe\u63a5\u9003\u9038\u3001\u771f\u5b9e\u8def\u5f84\u9003\u9038\u5747\u88ab\u62d2\u7edd\u3002</li> </ul>"},{"location":"recipes/safe-filesystem-and-atomic-write/#4-\u6700\u5c0f\u4ee3\u7801","title":"4. \u6700\u5c0f\u4ee3\u7801","text":"<pre><code>import { mkdtempSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\nimport { resolveContained, writeFileAtomic } from \"skill-family-harness-node\";\n\nconst root = mkdtempSync(join(tmpdir(), \"sf-safe-\"));\nconst target = resolveContained(root, \"nested/config.json\"); // \u53d7\u6536\u5bb9\u7edd\u5bf9\u8def\u5f84\nawait writeFileAtomic(target, JSON.stringify({ ok: true }));\n</code></pre> <p>\u4ee5\u4e0a\u4ee3\u7801\u5c55\u793a\u4e86\u5148\u6536\u5bb9\u8def\u5f84\u3001\u518d\u539f\u5b50\u5199\u5165\u7684\u57fa\u672c\u987a\u5e8f\uff1b<code>writeFileAtomic</code> \u7528\u4e34\u65f6\u6587\u4ef6 + fsync + rename\uff0c\u5931\u8d25\u56de\u6eda\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#5-\u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","title":"5. \u9884\u671f\u8f93\u51fa\u4e0e\u8bc1\u636e","text":"<p><code>resolveContained</code> \u8fd4\u56de\u843d\u5728\u6839\u5185\u7684\u7edd\u5bf9\u8def\u5f84\uff1b<code>writeFileAtomic</code> \u5199\u5165\u5b8c\u6210\u7684\u6587\u4ef6\uff0c\u5b57\u8282\u4e0e\u8f93\u5165\u4e00\u81f4\u3002\u8bc1\u636e\uff1a<code>packages/skill-family-harness-node/test/containment.test.mjs</code> \u4e0e <code>test/atomic.test.mjs</code>\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#6-\u5b89\u5168\u5931\u8d25\u8d1f\u4f8b","title":"6. \u5b89\u5168/\u5931\u8d25\u8d1f\u4f8b","text":"<pre><code>// \u8d1f\u4f8b\uff1a\u8bd5\u56fe\u8d8a\u51fa\u6839\u76ee\u5f55 -&gt; SFC2004 (path-traversal)\nimport { resolveContained } from \"skill-family-harness-node\";\nresolveContained(root, \"../escape.json\"); // \u629b HarnessError\uff0cdetails.kind = \"path-traversal\"\n</code></pre> <p>\u8d8a\u754c\u3001symlink-escape\u3001realpath-escape \u5747\u5f52 <code>SFC2004</code> \u52a0\u7a33\u5b9a <code>details.kind</code>\uff1b\u539f\u5b50\u5199\u5bf9\u8d8a\u754c\u8def\u5f84\u6216\u975e\u6cd5\u6570\u636e\u7c7b\u578b\u629b\u9519\u5e76\u56de\u6eda\u4e34\u65f6\u6587\u4ef6\u3002</p>"},{"location":"recipes/safe-filesystem-and-atomic-write/#7-\u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","title":"7. \u53ef\u590d\u5236\u9a8c\u8bc1\u547d\u4ee4","text":"<pre><code>node --test packages/skill-family-harness-node/test/containment.test.mjs \\\n packages/skill-family-harness-node/test/atomic.test.mjs\n</code></pre>"},{"location":"recipes/safe-filesystem-and-atomic-write/#8-\u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","title":"8. \u8c03\u7528\u65b9\u7ee7\u7eed\u62e5\u6709\u7684\u4e1a\u52a1\u903b\u8f91","text":"<ul> <li>\u54ea\u4e9b\u8def\u5f84\u662f\u4e1a\u52a1\u5141\u8bb8\u7684\u9009\u62e9\u89c4\u5219\uff08\u4e0d\u5728 Foundation \u5185\uff09\u3002</li> <li>\u5199\u5165\u5185\u5bb9\u7684\u4e1a\u52a1\u6b63\u786e\u6027\u3002</li> </ul>"},{"location":"recipes/safe-filesystem-and-atomic-write/#9-\u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","title":"9. \u5347\u7ea7\u4e0e\u56de\u6eda\u6ce8\u610f\u4e8b\u9879","text":"<ul> <li>\u8def\u5f84\u6536\u5bb9\u4e0e\u539f\u5b50\u5199\u5747\u4e3a\u53d7\u6536\u5bb9\u673a\u5236\uff0c\u5931\u8d25\u56de\u6eda\u4e0d\u7559\u534a\u6210\u54c1\uff0c\u65e0\u5916\u90e8\u56de\u6eda\u9700\u6c42\u3002</li> <li>\u5347\u7ea7\u8ddf\u968f <code>skill-family-harness-node</code> \u7248\u672c\uff1b<code>HARNESS_EXCLUSIONS</code> \u4e0d\u5f15\u5165\u8fdc\u7aef\u6216 git \u5199\u3002</li> </ul>"},{"location":"reference/compatibility/","title":"\u4e2d\u6587 \u00b7 \u517c\u5bb9\u6027","text":"<p>English</p>"},{"location":"reference/compatibility/#\u517c\u5bb9\u6027\u4e0e\u652f\u6301\u77e9\u9635","title":"\u517c\u5bb9\u6027\u4e0e\u652f\u6301\u77e9\u9635","text":"<p>\u672c\u9875\u7ed9\u51fa\u5f53\u524d\u6e90\u7801\u7248\u672c\u3001\u8fd0\u884c\u65f6\u652f\u6301\u9762\uff0c\u4ee5\u53ca\u5386\u53f2 candidate\uff08\u5019\u9009\uff09\u5165\u53e3\u7684\u4e00\u6b21\u8fc1\u79fb\u89c4\u5219\u3002\u7248\u672c\u4e0e\u5165\u53e3\u7531 package.json\u3001 Contracts \u767b\u8bb0\u8868\u548c\u80fd\u529b\u76ee\u5f55\u590d\u6838\u3002</p>"},{"location":"reference/compatibility/#\u5f53\u524d\u7248\u672c","title":"\u5f53\u524d\u7248\u672c","text":"\u5305 \u5f53\u524d\u6e90\u7801\u7248\u672c \u89d2\u8272 <code>skill-family-contracts</code> 0.14.0 Contracts 1.14.0 \u673a\u5668\u5951\u7ea6 <code>skill-family-harness-node</code> 0.14.0 Contracts \u7684 Node \u673a\u5236\u5b9e\u73b0 <code>skill-family-engineering-kit</code> 0.14.0 \u56db\u4e2a\u5de5\u7a0b\u547d\u4ee4\u4e0e\u6784\u5efa\u671f\u6295\u5f71 \u79c1\u6709\u7236\u5de5\u4f5c\u533a 0.14.0 \u552f\u4e00\u5f00\u53d1\u771f\u6e90 <p>\u4e09\u4e2a\u53f6\u5b50\u5305\u9501\u6b65\u53d1\u5e03\uff0c\u4e0d\u80fd\u6df7\u7528\u7248\u672c\u3002Contracts \u89c4\u683c\u7248\u672c\u4e0e npm \u5305\u7248\u672c\u662f\u4e24\u6761\u4e0d\u540c\u7248\u672c\u7ebf\u3002</p>"},{"location":"reference/compatibility/#\u4e24\u4ee3\u6210\u719f\u5ea6\u89c4\u5219","title":"\u4e24\u4ee3\u6210\u719f\u5ea6\u89c4\u5219","text":"<p>\u5386\u53f2 candidate API \u5148\u8fc1\u79fb\u4e00\u6b21\u5230\u89c4\u8303\u5165\u53e3\u3002\u65e7\u5165\u53e3\u5728\u517c\u5bb9\u7a97\u53e3\u5185\u7ee7\u7eed\u89e3\u6790\u540c\u4e00\u6a21\u5757\uff1b\u6700\u7ec8\u5220\u9664\u5fc5\u987b\u6709\u516c\u5f00\u5f03\u7528\u3001\u771f\u5b9e\u6d88\u8d39\u8005 \u5f15\u7528\u6e05\u96f6\u3001\u81f3\u5c11\u4e00\u4e2a\u53d1\u5e03\u5468\u671f\u548c\u72ec\u7acb\u4e3b\u7248\u672c\u51b3\u7b56\u3002</p> <p>0.10.0 \u4ee5\u540e\u65b0\u589e\u7684 API \u4ece\u9996\u4e2a candidate \u7248\u672c\u8d77\u5c31\u4f7f\u7528\u6700\u7ec8\u89c4\u8303\u8eab\u4efd\u3002candidate \u9636\u6bb5\u4e3b\u52a8\u5347\u7ea7\u4ecd\u53ef\u80fd\u9700\u8981\u9002\u914d\uff1b\u4f46\u63d0\u4f9b\u65b9 \u51b3\u5b9a\u664b\u5347 stable \u65f6\uff0c\u53ea\u80fd\u6539\u53d8\u517c\u5bb9\u627f\u8bfa\uff0c\u4e0d\u80fd\u540c\u65f6\u66f4\u6362\u5165\u53e3\u3001\u80fd\u529b ID\u3001Schema <code>$id</code>\u3001operation\u3001\u8bf7\u6c42\u3001\u7ed3\u679c\u6216\u9519\u8bef\u8bed\u4e49\u3002 \u6d88\u8d39\u8005\u8981\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\uff0c\u4ecd\u9700\u66f4\u65b0\u4e09\u4e2a\u5305\u7684\u7cbe\u786e pin\uff1bBundle \u662f\u5426\u91cd\u5efa\u7531\u65e2\u6709 package identity\u3001\u6765\u6e90\u6458\u8981\u4e0e provenance \u7ed1\u5b9a\u8f93\u5165\u51b3\u5b9a\uff0c\u4e0d\u80fd\u4ec5\u56e0\u6210\u719f\u5ea6\u6807\u7b7e\u53e6\u52a0\u8981\u6c42\u3002\u673a\u5668\u89c4\u5219\u89c1 FND-ADR-016 \u548c Contracts <code>CANDIDATE_PROMOTION_POLICY</code>\u3002</p>"},{"location":"reference/compatibility/#\u5386\u53f2-candidate-\u8fc1\u79fb\u77e9\u9635","title":"\u5386\u53f2 candidate \u8fc1\u79fb\u77e9\u9635","text":"\u5386\u53f2\u5750\u6807\u6216\u80fd\u529b 0.10.0 \u8fc1\u79fb\u76ee\u6807 \u5f53\u524d\u5904\u7406 <code>skill-family-contracts/candidate/quickstart-profile</code> <code>skill-family-contracts/quickstart-profile</code> \u4e24\u4e2a\u5165\u53e3\u540c\u6e90\uff1b\u6d88\u8d39\u8005\u8fc1\u79fb\u4e00\u6b21 <code>skill-family-harness-node/candidate/quickstart-profile</code> <code>skill-family-harness-node/quickstart-profile</code> \u4e24\u4e2a\u5165\u53e3\u540c\u6e90\uff1boperation \u4e0d\u53d8 <code>skill-family-harness-node/candidate/rename-directory-no-replace</code> <code>skill-family-harness-node/rename-directory-no-replace</code> \u4e24\u4e2a\u5165\u53e3\u540c\u6e90\uff1b\u4e0d\u7b49\u540c\u4e8e\u9ad8\u5c42\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03 <code>skill-family-engineering-kit/candidate/quickstart-profile</code> <code>skill-family-engineering-kit/quickstart-profile</code> Quickstart builder \u8fc1\u79fb\u4e00\u6b21 \u65e7 Quickstart \u547d\u540d\u7a7a\u95f4\u4e2d\u7684 adoption <code>skill-family-engineering-kit/adoption</code> \u804c\u8d23\u660e\u786e\u7684\u89c4\u8303\u5165\u53e3\uff1b\u5b9e\u73b0\u4ecd\u4e0e\u65e7\u547d\u540d\u7a7a\u95f4\u540c\u6e90 \u5305\u5185\u6216\u6295\u5f71\u4e2d\u7684 skill naming candidate <code>skill-family-engineering-kit/skill-naming</code> \u65b0\u589e\u89c4\u8303\u5305\u5165\u53e3\uff1b\u4e0d\u589e\u52a0 Kit \u9876\u5c42\u547d\u4ee4 0.4.0 \u56fa\u5b9a\u96c6\u5408 candidate Schema \u4e0e\u539f\u8bed 0.9.0 stable Schema <code>$id</code>\u3001<code>skill-family-harness-node/fixed-set-publication</code> \u65e7 Schema \u7ee7\u7eed\u968f\u5305\u63d0\u4f9b\uff1b\u6d88\u8d39\u8005\u8fc1\u79fb\u5230\u9ad8\u5c42 API 0.9.0 <code>validate-many-by-schema-id</code> candidate Schema <code>/foundation-mechanisms/v1/schema-validation-batch-{request,result}.json</code> \u89c4\u8303 Schema \u53ea\u4fdd\u7559\u4e00\u4efd\uff1b\u65e7\u65b0 ID \u6307\u5411\u540c\u4e00\u7f16\u8bd1 validator\uff0coperation \u4e0e\u7ed3\u679c\u56de\u663e\u4e0d\u53d8 <p>Quickstart v2 \u7684 Resource\u3001Task\u3001Result\u3001consumer inventory\u3001Harness surface inventory/detectors \u516d\u4e2a\u8eab\u4efd\u4e5f\u4ece <code>/candidate/quickstart-profile/v2/</code> \u4e00\u6b21\u8fc1\u79fb\u5230 <code>/quickstart-profile/v2/</code>\u3002Contracts loader \u53ea\u8fd4\u56de\u89c4\u8303 <code>$id</code>\uff1bBundle \u5728 \u517c\u5bb9\u7a97\u53e3\u5185\u540c\u65f6\u63a5\u53d7\u65e7\u65b0 ID\uff0c\u4e0d\u5efa\u7acb\u7b2c\u4e8c\u5957 Schema \u6216\u901a\u7528 alias registry\u3002</p> <p>Quickstart v1 \u5728 0.3.0 \u4ee5\u524d\u5df2\u88ab v2 \u66ff\u6362\u3002\u9700\u8981 v1 \u7684\u6d88\u8d39\u8005\u53ea\u80fd\u7ee7\u7eed\u7cbe\u786e\u9501\u5b9a 0.2.1\uff1b0.10.0 \u4e0d\u91cd\u5199\u5386\u53f2\u53d1\u5e03\u7269\uff0c \u4e5f\u4e0d\u91cd\u65b0\u6253\u5305 v1\u3002</p>"},{"location":"reference/compatibility/#R05-\u4e0e\u65e7-platform-manifest-\u8fc1\u79fb","title":"R05 \u4e0e\u65e7 platform-manifest \u8fc1\u79fb","text":"<p>R05 \u7684 request/result Schema \u662f <code>logicalMappings</code> \u7684\u552f\u4e00\u7ed3\u6784\u4e8b\u5b9e\u6e90\u3002\u6d88\u8d39\u8005\u8fc1\u79fb\u65f6\u53ea\u4fdd\u7559\u81ea\u8eab\u9886\u57df\u5b57\u6bb5\uff0c\u5b8c\u6210\u771f\u5b9e\u76ee\u5f55\u9a8c\u8bc1\u540e\u5220\u9664\u91cd\u590d\u7684 closure\u3001digest \u548c\u6587\u4ef6\u6e05\u5355\u5b57\u6bb5\uff0c\u4e0d\u6c38\u4e45\u53cc\u5199\u3002</p> \u65e7\u5b57\u6bb5 \u8fc1\u79fb\u88c1\u51b3 <code>familyId</code> \u6620\u5c04\u4e3a <code>skillFamilyId</code>\u3002 <code>platformId</code> \u5148\u7531\u5df2\u767b\u8bb0 Descriptor \u8bc1\u660e\uff0c\u518d\u6620\u5c04\u4e3a canonical <code>hostId</code>\u3002request \u58f0\u660e\u672c\u8eab\u4e0d\u6784\u6210\u8bc1\u660e\u3002 <code>version</code> \u4fdd\u7559\u4e3a\u6d88\u8d39\u8005\u5305\u7248\u672c\u3002 <code>sourceDigest</code> \u6620\u5c04\u4e3a <code>commonSourceClosure.digest</code>\u3002 <code>projectionDigest</code> \u6ca1\u6709\u81ea\u52a8\u7b49\u4ef7\u5173\u7cfb\uff1b<code>manifest.digest</code> \u4e0d\u5f97\u4ee3\u66ff\u5b83\u3002 <code>fileCount</code> / <code>files</code> \u4ece\u6807\u51c6 manifest \u6d3e\u751f\uff1bpeer \u6839\u7684 <code>skills/</code> \u4e0d\u5305\u542b\u7236\u76ee\u5f55\u65e7 manifest\uff0c\u8fc1\u79fb\u540e\u5220\u9664\u65e7\u6e05\u5355\u3002 <code>logicalMappings</code> \u53ea\u7531 request/result \u6301\u6709\u3002 <code>lifecycleStatus</code> / <code>blocked</code> / <code>blockingReasons</code> / <code>advisories</code> \u7559\u5728\u6d88\u8d39\u8005\u9886\u57df\u3002 <code>verified</code> \u4e0d\u63a8\u5bfc\u4ea7\u54c1\u3001Audit \u6216\u53d1\u5e03\u72b6\u6001\u3002"},{"location":"reference/compatibility/#Node-\u4e0e\u5de5\u5177\u94fe","title":"Node \u4e0e\u5de5\u5177\u94fe","text":"<ul> <li>Node\uff1a<code>&gt;=22.22.2 &lt;23</code>\uff1b<code>.node-version</code> \u56fa\u5b9a\u7cbe\u786e floor <code>22.22.2</code>\u3002</li> <li>pnpm\uff1a<code>10.30.0</code>\u3002</li> <li>projen\uff1a<code>0.101.23</code>\uff0c\u662f\u53d7\u7ba1\u5de5\u7a0b\u6587\u4ef6\u552f\u4e00\u751f\u6210\u5165\u53e3\u3002</li> <li>Schema \u6821\u9a8c\u5668\uff1aAjv <code>8.20.0</code>\uff0c\u652f\u6301 draft-07 \u4e0e 2020-12\u3002</li> </ul> <p>\u4f4e\u4e8e Node floor \u6216\u9ad8\u4e8e\u9501\u5b9a major \u7684\u7ed3\u679c\u4e0d\u80fd\u66ff\u4ee3\u6743\u5a01\u95e8\u7981\u7ed3\u679c\u3002</p>"},{"location":"reference/compatibility/#Contracts-\u4e0e\u5de5\u7a0b\u8fb9\u754c","title":"Contracts \u4e0e\u5de5\u7a0b\u8fb9\u754c","text":"<ul> <li>\u9876\u5c42 Contracts \u5bf9\u8c61\u4e3a 42 \u7c7b\uff0c\u4ee5 <code>packages/skill-family-contracts/src/registry.json</code> \u4e3a\u552f\u4e00\u771f\u6e90\u3002</li> <li>Kernel \u534f\u8bae\u662f stable <code>skill-family.kernel.operation</code>\uff1b\u672c\u8f6e Contracts \u89c4\u683c\u4e3a 1.14.0\uff0cKernel \u6587\u6863\u4ecd\u6309\u65e2\u6709\u751f\u547d\u5468\u671f\u4fdd\u6301 1.8.0 \u5b57\u8282\u57fa\u7ebf\u3002</li> <li>\u9519\u8bef\u7801\u53ea\u589e\u4e0d\u6539\u3001\u4e0d\u590d\u7528\u3002</li> <li>Kit \u9876\u5c42\u547d\u4ee4\u56fa\u5b9a\u4e3a <code>scaffold</code>\u3001<code>adopt-plan</code>\u3001<code>projection</code>\u3001<code>check</code>\u3002</li> <li>\u8fdc\u7aef\u6216\u901a\u7528 <code>host apply</code>\u3001\u5220\u9664\u5f0f <code>uninstall</code>\u3001\u5b8c\u6574 Qoder driver\u3001\u8fdc\u7aef\u53d1\u5e03\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u4e0e\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\u4e0d\u5728\u7a33\u5b9a\u652f\u6301\u9762\uff1b\u672c\u5730 install/update \u4ecd\u5904\u4e8e 0.10.0 unstable \u8ba1\u5212 API \u8fb9\u754c\uff0cunsupported \u5bbf\u4e3b\u4e0d\u4f1a\u83b7\u5f97\u81ea\u52a8\u751f\u547d\u5468\u671f\u80fd\u529b\uff0c\u4e5f\u4e0d\u6784\u6210\u8fdc\u7aef\u53d1\u5e03\u4fdd\u8bc1\u3002</li> </ul> <p>\u5bbf\u4e3b\u7684\u5b9e\u65f6\u652f\u6301\u72b6\u6001\u4ee5\u80fd\u529b\u76ee\u5f55\u3001Profile descriptor \u548c\u771f\u5b9e driver \u4e3a\u51c6\uff1b\u4ec5\u6709\u76ee\u5f55\u7ed3\u6784\u6216 CLI \u8eab\u4efd\u4e8b\u5b9e\u4e0d\u7b49\u4e8e\u53d7\u652f\u6301\u95ed\u73af\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/","title":"\u4e2d\u6587 \u00b7 \u5931\u8d25\u4e0e\u526f\u4f5c\u7528","text":"<p>English</p>"},{"location":"reference/failure-and-side-effect-matrix/#\u5931\u8d25\u4e0e\u526f\u4f5c\u7528\u77e9\u9635","title":"\u5931\u8d25\u4e0e\u526f\u4f5c\u7528\u77e9\u9635","text":"<p>\u672c\u9875\u9010\u516c\u5171\u5165\u53e3\u5217\u51fa\u8bfb\u5199\u3001spawn\u3001Git\u3001\u7f51\u7edc\u3001\u6b8b\u4f59\u72b6\u6001\u4e0e\u7a33\u5b9a\u9519\u8bef\u7801\u3002\u5b83\u670d\u52a1\u4e8e\u8c03\u7528\u65b9\u5728\u63a5\u5165\u524d\u5224\u65ad\u98ce\u9669\uff0c\u5e76\u4f5c\u4e3a <code>capability-catalog.json</code> \u4e2d <code>sideEffects</code> \u4e0e <code>failureSemantics</code> \u5b57\u6bb5\u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\u3002\u6240\u6709\u4e8b\u5b9e\u4ee5\u771f\u5b9e\u5b9e\u73b0\u4e0e\u8d1f\u4f8b\u6d4b\u8bd5\u4e3a\u51c6\u3002</p> <p>\u7b26\u53f7\u7ea6\u5b9a\uff1a\u8bfb=\u8bfb\u53d6\u6587\u4ef6\u7cfb\u7edf\uff1b\u5199=\u5199\u5165\u6587\u4ef6\u7cfb\u7edf\uff1bspawn=\u542f\u52a8\u5b50\u8fdb\u7a0b\uff1bGit=\u8bfb\u5199 Git\uff1b\u7f51\u7edc=\u8bbf\u95ee\u8fdc\u7aef\uff1b\u6b8b\u4f59=\u8c03\u7528\u7ed3\u675f\u540e\u4ecd\u7559\u5728\u78c1\u76d8/\u8fdb\u7a0b\u4e2d\u7684\u72b6\u6001\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#Contracts\u7eaf\u51fd\u6570\u5c42","title":"Contracts\uff08\u7eaf\u51fd\u6570\u5c42\uff09","text":"\u5165\u53e3 \u8bfb \u5199 spawn Git \u7f51\u7edc \u6b8b\u4f59\u72b6\u6001 \u7a33\u5b9a\u9519\u8bef\u7801 <code>validateDocument</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u7f16\u8bd1\u7f13\u5b58\u4ec5\u9a7b\u7559\u5185\u5b58\uff09 <code>SFC1001</code>/<code>SFC1002</code>/<code>SFC1006</code> <code>compileSchema</code> / <code>detectDialect</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC1006</code>/<code>SFC1012</code> <code>loadRegistry</code> / <code>findSchemaByObject</code> / <code>findProtocol</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC1003</code>/<code>SFC1004</code> <code>runChecks</code> / <code>collectUnresolvedRefs</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC1002</code>\u2013<code>SFC1010</code> <code>verifyAllFixtures</code> / <code>verifyFixture</code> \u5426 \u5426 \u5426? \u5426 \u5426 \u5426 \u65e0 <code>SFC1010</code> <code>ERROR_CODES</code> / <code>stableError</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 \u51bb\u7ed3\u767b\u8bb0\u8868\uff0c\u4e0d\u65b0\u589e <p>Contracts \u5168\u90e8\u4e3a\u7eaf\u51fd\u6570\uff0c\u65e0\u6587\u4ef6/Git/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff1b\u9519\u8bef\u5bf9\u8c61\u542b <code>stableError</code> \u4e0e <code>details.kind</code>\uff0c\u4fbf\u4e8e\u8c03\u7528\u65b9\u5206\u7c7b\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#Harness\u673a\u5236\u5c42\u53d7\u6536\u5bb9","title":"Harness\uff08\u673a\u5236\u5c42\uff0c\u53d7\u6536\u5bb9\uff09","text":"\u5165\u53e3 \u8bfb \u5199 spawn Git \u7f51\u7edc \u6b8b\u4f59\u72b6\u6001 \u7a33\u5b9a\u9519\u8bef\u7801 <code>validateContractDocument</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u6821\u9a8c\u5668\u7f13\u5b58\u5185\u5b58\uff09 <code>SFC</code> \u6821\u9a8c\u5931\u8d25 <code>resolveContained</code> / <code>readFileContained</code> \u662f\uff08\u53ea\u8bfb\uff09 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC2004</code>\uff08<code>path-traversal</code>/<code>symlink-escape</code>/<code>realpath-escape</code>\uff09 <code>writeFileAtomic</code> \u5426 \u662f\uff08\u53d7\u6536\u5bb9\uff09 \u5426 \u5426 \u5426 \u5931\u8d25\u56de\u6eda\u4e34\u65f6\u6587\u4ef6 <code>SFC2004</code>\uff08<code>atomic-write-failed</code>\uff09 <code>TemporaryWorkspace</code> / <code>withTemporaryWorkspace</code> \u5426 \u662f\uff08\u4e34\u65f6\u76ee\u5f55\uff09 \u5426 \u5426 \u5426 \u9000\u51fa\u65f6\u6e05\u7406\u4e34\u65f6\u76ee\u5f55 <code>SFC2004</code>\uff08<code>workspace-disposed</code>\uff09 <code>computeResourceClosure</code> / <code>digestBytes</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC</code>\uff08\u58f0\u660e/\u5185\u5bb9\u8fdd\u89c4\uff09 <code>parseRequest</code> / <code>processRequest</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u7eaf\u51fd\u6570\u7ba1\u7ebf\uff09 <code>SFC2004</code> <code>validateReportModel</code> / <code>renderReportMarkdown</code> / <code>buildBinding</code> / <code>checkReport</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u7eaf\u51fd\u6570\uff09 <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>buildAdapterClosure</code> / <code>verifyAdapterBuildManifest</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0 <code>SFC2004</code>\uff08<code>missing-resource</code>\uff09 <code>materializeAdapterBuild</code> \u5426 \u662f\uff08\u53d7\u6536\u5bb9\uff0csibling + rename\uff09 \u5426 \u5426 \u5426 \u65e0\uff08\u539f\u5b50 rename\uff09 <code>SFC2004</code> <code>probeVersionVector</code> \u5426 \u5426 \u9ed8\u8ba4\u5426\uff08\u9700\u663e\u5f0f <code>--allow-host-spawn</code>\uff09 \u5426 \u5426 \u65e0 <code>SFC2004</code> <code>openStateStore</code> / <code>appendEvent</code> / <code>readEvents</code> / <code>writeSnapshot</code> \u662f \u662f\uff08\u4e8b\u4ef6/\u5feb\u7167/\u9501\u6587\u4ef6\uff09 \u5426 \u5426 \u5426 \u4e8b\u4ef6\u65e5\u5fd7 + \u9501\u6587\u4ef6 <code>SFC2004</code>\uff08<code>store-locked</code>/\u94fe\u65ad\u88c2\uff09 <code>inspectStateStoreLock</code> / <code>recoverStateStoreLock</code> \u662f \u662f\uff08\u4ec5\u6062\u590d\u5199\u9501\uff09 \u5426 \u5426 \u5426 \u9501\u6587\u4ef6\uff08\u5355\u8c03 fencing\uff09 <code>SFC2004</code> <code>runMechanismCliBatch</code> / <code>mechanisms-cli.mjs --batch</code>\uff08since 0.19.0\uff0ccandidate\uff09 \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08\u53ea\u5199\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 output/error \u6d41\uff09 \u9000\u51fa\u7801 0\uff08\u5168\u6210\u529f\uff09/ 2\uff08\u81f3\u5c11\u4e00\u9879\u5931\u8d25\u6216\u6574\u6279\u62d2\u7edd\uff09\uff1b<code>details.kind</code> \u5c01\u95ed\u4e3a <code>batch-structure-invalid</code>/<code>batch-item-limit</code>/<code>batch-input-limit</code>/<code>batch-output-limit</code> <p>\u6279\u91cf\u5165\u53e3\u7684\u5931\u8d25\u9636\u6bb5\u51b3\u5b9a\u53ef\u89c2\u5bdf\u526f\u4f5c\u7528\u3002\u8bf7\u6c42\u5b57\u8282\u3001\u8f93\u5165\u9879\u6570\u6216\u7ed3\u6784\u7684\u9884\u68c0\u62d2\u7edd\u4e0d\u4f1a\u8c03\u7528\u673a\u5236\uff0cstdout \u4e3a\u7a7a\uff1b\u8f93\u51fa\u5bb9\u91cf\u53ea\u80fd\u5728\u5f53\u524d\u9879\u8fd4\u56de\u540e\u786e\u8ba4\uff0c\u56e0\u6b64\u8be5\u9879\u53ef\u80fd\u5df2\u7ecf\u6267\u884c\uff0c\u4f46\u540e\u7eed\u9879\u4e0d\u4f1a\u518d\u6267\u884c\uff0cstdout \u4ecd\u4e3a\u7a7a\u3002\u8f93\u51fa\u901a\u9053\u5931\u8d25\u65f6\u53ef\u80fd\u5df2\u6709\u90e8\u5206\u5b57\u8282\u9001\u51fa\uff0c\u6574\u4f53\u9000\u51fa 2\uff1b\u82e5\u9519\u8bef\u901a\u9053\u4e5f\u5931\u8d25\uff0c\u9519\u8bef\u5bf9\u8c61\u4e0d\u4fdd\u8bc1\u80fd\u591f\u4ea4\u4ed8\u3002</p> <p>Harness \u7684 <code>HARNESS_EXCLUSIONS</code> \u660e\u786e\u6392\u9664 release-state\u3001remote-network-access\u3001business-semantics\u3001workflow-orchestration\u3001model-calls\u3001git-writes\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#Engineering-Kit\u5de5\u7a0b\u547d\u4ee4\u5c42","title":"Engineering Kit\uff08\u5de5\u7a0b\u547d\u4ee4\u5c42\uff09","text":"\u5165\u53e3 \u8bfb \u5199 spawn Git \u7f51\u7edc \u6b8b\u4f59\u72b6\u6001 \u7a33\u5b9a\u9519\u8bef\u7801 / \u9000\u51fa\u7801 <code>scaffoldTarget</code> \u5426 \u662f\uff08\u53d7\u6536\u5bb9\u9aa8\u67b6\uff0c\u539f\u5b50 + \u6536\u5bb9\uff09 \u5426 \u5426 \u5426 \u65e0\uff08\u5931\u8d25\u4e0d\u7559\u534a\u6210\u54c1\uff09 <code>SFC2004</code>\uff08<code>target-not-empty</code>\uff09 <code>planAdoption</code> \u662f \u5426 \u9ed8\u8ba4\u53ef\u80fd\uff08\u51bb\u7ed3\u53ea\u8bfb git status\uff1b\u53ef\u5173\u95ed\uff09 \u53ea\u8bfb\u63a2\u6d4b \u5426 \u65e0\uff08stdout \u8f93\u51fa\uff09 <code>SFC</code> \u5b8c\u6210\u5224\u5b9a false <code>buildProfileDraft</code> \u5426 \u5426 \u5426 \u5426 \u5426 \u65e0\uff08stdout \u8f93\u51fa\uff09 <code>SFC</code> \u5b8c\u6210\u5224\u5b9a false <code>runProjection</code> \u662f\uff08\u8bfb manifest\uff09 \u662f\uff08\u53d7\u7ba1\u8def\u5f84\uff0c\u4e24\u9636\u6bb5\uff09 \u5426 \u5426 \u5426 \u65e0\uff08\u5931\u8d25\u96f6\u5199/\u56de\u6eda\uff09 <code>SFC2004</code>\uff08<code>unauthorized-path</code>/<code>handwritten-overwrite</code>/<code>conflict-drift</code>\uff09 <code>runChecks</code>\uff08<code>check</code>\uff09 \u662f \u5426 \u9ed8\u8ba4\u53ef\u80fd\uff08\u51bb\u7ed3\u53ea\u8bfb git status\uff1b\u53ef\u7528 <code>--no-git-spawn</code> \u5173\u95ed\uff09 \u53ea\u8bfb\u767d\u540d\u5355 \u5426 \u65e0 \u9000\u51fa\u7801 1\uff08\u53d1\u73b0\uff09/ 2\uff08\u673a\u5236\uff09 <code>check relock</code> \u662f \u662f\uff08\u663e\u5f0f\u53d7\u63a7\u5199\uff09 \u5426 \u5426 \u5426 \u53d7\u63a7 relock \u4e8b\u52a1\u72b6\u6001 \u9000\u51fa\u7801 0/1/2 <code>check qualification</code> / <code>runQualification</code> \u8bfb\u53d6 request \u4e0e bindings \u5728\u8c03\u7528\u65b9\u7ed1\u5b9a\u6839\u4e0b\u5199\u79c1\u6709\u8bc1\u636e \u662f\uff0c\u9884\u68c0\u901a\u8fc7\u540e \u5426 \u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51 \u7ec8\u6001\u4e0d\u786e\u5b9a\u65f6\u4fdd\u7559\u8bc1\u636e \u9000\u51fa\u7801 0/1/2\uff1b\u56db\u6001\u7ed3\u679c <code>runPluginVerification</code> \u662f\uff08\u8c03\u7528\u65b9\u7ed1\u5b9a\u6839\uff09 \u662f\uff08fresh workspace\u3001\u5bbf\u4e3b\u72b6\u6001\u3001\u79c1\u6709\u8bc1\u636e\uff09 \u662f\uff0c\u4ec5\u672c\u5730 executable \u5426 \u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51 \u4e0d\u786e\u5b9a\u8bc1\u636e\u4f1a\u4fdd\u7559 \u56db\u6001 <code>plugin-verification-result</code> <code>runSkillFamilyDirectoryVerification</code> \u662f\uff08\u8c03\u7528\u65b9\u7ed1\u5b9a\u6839\uff09 \u662f\uff08\u79c1\u6709 raw evidence\uff09 \u662f\uff0c\u4ec5\u672c\u5730 executable \u5426 \u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51 \u4e0d\u786e\u5b9a\u8bc1\u636e\u4f1a\u4fdd\u7559 \u56db\u6001\u76ee\u5f55\u7ed3\u679c <code>renderReportAction</code> / <code>checkReportAction</code> \u662f \u4ec5 <code>--out</code>/<code>--binding</code> \u5426 \u5426 \u5426 \u9ed8\u8ba4\u53ea\u5199 stdout <code>SFC3001</code>/<code>SFC3002</code>/<code>SFC3003</code> <code>probeGitState</code> / <code>probeGitFacts</code> \u662f \u5426 \u9ed8\u8ba4\u53ef\u80fd\uff08\u51bb\u7ed3\u53ea\u8bfb Git \u5b50\u8fdb\u7a0b\uff1b\u53ef\u5173\u95ed\uff09 \u53ea\u8bfb\u767d\u540d\u5355 \u5426 \u65e0 <code>SFC</code>\uff08\u8d8a\u6743\u53c2\u6570\u62d2\u7edd\uff09 <code>describeHost</code> / <code>resolveHostId</code> / <code>probeHost</code> / <code>buildHostAdapter</code> / <code>planHost</code> / <code>applyHostPlan</code> \u662f build/install/update \u5199\uff08\u53d7\u6536\u5bb9\uff1buninstall \u4e0d\u5199\uff09 probe \u9ed8\u8ba4\u5426 \u5426 \u5426 \u4ec5\u663e\u5f0f <code>authorizationRef</code> <code>SFC2004</code>\uff1b\u8fdc\u7aef apply \u4e0e\u5220\u9664\u5f0f uninstall \u7a33\u5b9a\u62d2\u7edd <code>loadLicensingProfile</code> / <code>generateLicenseContent</code> \u7b49 \u5426 \u5426\uff08\u7eaf\u51fd\u6570\u751f\u6210\uff09 \u5426 \u5426 \u5426 \u65e0 <code>SFC</code>\uff08\u975e\u6cd5 Profile\uff09 <code>checkIdentityDrift</code> / <code>validateIdentityAgainstProfile</code> \u662f \u5426 \u5426 \u5426 \u5426 \u65e0 findings <code>cliMain</code> / <code>runCommand</code> \u4f9d\u5b50\u52a8\u4f5c \u4f9d\u5b50\u52a8\u4f5c \u4f9d\u5b50\u52a8\u4f5c \u4f9d\u5b50\u52a8\u4f5c \u7ed1\u5b9a executable \u53ef\u80fd\u8054\u7f51 \u4f9d\u5b50\u52a8\u4f5c \u9000\u51fa\u7801 0/1/2 <p>Kit \u7684 <code>FORBIDDEN_SIDE_EFFECTS</code> \u542b git-init/commit/push/tag\u3001publish\u3001remote-write\uff1b<code>REFUSED_MUTATION_FLAGS</code>\uff08\u542b <code>--apply</code>\uff09\u5728 CLI \u5165\u53e3\u5373\u62d2\u3002</p> <p>Foundation \u672c\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51\u3002Foundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002Qoder\u3001WorkBuddy \u4e0e Kimi \u5165\u53e3\u4ecd\u4e3a <code>manual/candidate</code>\uff1b\u53d7\u63a7 fixture \u53ea\u8bc1\u660e\u751f\u4ea7\u63a5\u7ebf\uff0c\u4e0d\u6388\u4e88\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u3002</p>"},{"location":"reference/failure-and-side-effect-matrix/#\u6b8b\u4f59\u72b6\u6001\u5408\u96c6","title":"\u6b8b\u4f59\u72b6\u6001\u5408\u96c6","text":"<ul> <li>\u539f\u5b50\u5199\uff1a\u5931\u8d25\u65f6\u56de\u6eda\u4e34\u65f6\u6587\u4ef6\uff0c\u76ee\u6807\u76ee\u5f55\u4e0d\u7559\u534a\u6210\u54c1\u3002</li> <li>\u4e34\u65f6\u5de5\u4f5c\u533a\uff1a\u9000\u51fa\uff08\u542b\u5f02\u5e38\u8def\u5f84\uff09\u65f6\u6e05\u7406\u3002</li> <li>\u72b6\u6001\u5b58\u50a8\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u662f\u552f\u4e00\u6743\u5a01\uff0csnapshot \u4e3a\u6d3e\u751f\u7f13\u5b58\uff1b\u5d29\u6e83\u9057\u7559\u9501\u9700\u8c03\u7528\u65b9\u5728 Foundation \u5916\u786e\u8ba4\u65e7\u5199\u8005\u7ec8\u6b62\u540e\u663e\u5f0f\u6062\u590d\uff0c\u4e0d\u81ea\u52a8\u5077\u9501\u3002</li> <li>\u6295\u5f71\uff1a\u4efb\u4e00\u6821\u9a8c\u5931\u8d25\u6574\u4f53\u62d2\u7edd\u3001\u96f6\u5199\u5165\uff1b\u8986\u76d6\u65e2\u6709\u6587\u4ef6\u9700\u58f0\u660e <code>expect.sha256</code> \u524d\u7f6e\u72b6\u6001\u3002</li> <li>adopt-plan\u3001\u666e\u901a runChecks \u4e0e\u666e\u901a check\uff1a\u7ed3\u6784\u6027\u53ea\u8bfb\u4e14\u4e0d\u5199\u6587\u4ef6\uff1b\u9ed8\u8ba4\u53ef\u80fd\u542f\u52a8\u4e00\u6761\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb Git status \u5b50\u8fdb\u7a0b\uff0c\u53ef\u7531 <code>--no-git-spawn</code>\uff08\u6216 API \u7684 <code>allowGitSpawn: false</code>\uff09\u5173\u95ed\uff0c\u8fd0\u884c\u524d\u540e\u5b57\u8282\u7ea7\u96f6\u53d8\u5316\u3002check relock \u4e0e check qualification \u7684\u526f\u4f5c\u7528\u89c1\u4e0a\u8868\u3002</li> </ul>"},{"location":"reference/failure-and-side-effect-matrix/#\u5931\u8d25\u540e\u8c03\u7528\u65b9\u8be5\u505a\u4ec0\u4e48","title":"\u5931\u8d25\u540e\u8c03\u7528\u65b9\u8be5\u505a\u4ec0\u4e48","text":"<ul> <li>\u6821\u9a8c\u5931\u8d25\uff08<code>SFC1001</code>/<code>SFC2002</code>/<code>SFC2003</code>\uff09\uff1a\u68c0\u67e5\u8f93\u5165\u662f\u5426\u6ee1\u8db3\u76ee\u6807 Schema \u6216\u53c2\u6570\u5408\u540c\uff0c\u4e0d\u91cd\u8bd5\u5df2\u88ab\u51bb\u7ed3\u62d2\u7edd\u7684\u767b\u8bb0\u3002</li> <li>\u6536\u5bb9\u5931\u8d25\uff08<code>SFC2004</code> + <code>path-traversal</code> \u7b49\uff09\uff1a\u786e\u8ba4\u6839\u76ee\u5f55\u4e0e\u8def\u5f84\u662f\u5426\u8d8a\u754c\uff0c\u4e0d\u8981\u628a\u4e1a\u52a1\u9009\u62e9\u89c4\u5219\u585e\u8fdb Foundation\u3002</li> <li>\u72b6\u6001\u9501\u51b2\u7a81\uff08<code>store-locked</code>\uff09\uff1a\u5728 Foundation \u4e4b\u5916\u786e\u8ba4\u65e7\u5199\u8005\u5df2\u7ec8\u6b62\uff0c\u518d\u7528\u7cbe\u786e\u5339\u914d\u7684 owner/fencing \u8c03\u7528\u6062\u590d\u3002</li> <li>check \u53d1\u73b0\uff08\u9000\u51fa\u7801 1\uff09\uff1a\u5904\u7f6e\u53d1\u73b0\u9879\uff0cKit \u4e0d\u81ea\u52a8\u4fee\u590d\u3002</li> </ul>"},{"location":"reference/api/","title":"\u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u76ee\u5f55\u4e3a Skill Family Foundation \u4e09\u5305\u5efa\u7acb\u673a\u5668\u53ef\u8bfb\u80fd\u529b\u76ee\u5f55\uff08<code>docs/agents/capability-catalog.json</code>\uff09\u7684\u4eba\u7c7b\u53ef\u8bfb\u6295\u5f71\u3002\u8303\u56f4\u6309 hand-off \u00a74.3\uff1a\u4f18\u5148\u4ece\u771f\u5b9e\u5bfc\u51fa\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684 API \u5168\u96c6\u3002</p>"},{"location":"reference/api/#\u8986\u76d6\u8303\u56f4","title":"\u8986\u76d6\u8303\u56f4","text":"\u5305 \u9875\u9762 \u516c\u5171\u5165\u53e3\u6027\u8d28 <code>skill-family-contracts</code> contracts.md \u673a\u5668\u5951\u7ea6\u3001\u534f\u8bae\u3001\u9519\u8bef\u7801\u3001fixture\u3001\u5ba1\u8ba1\u8868\u9762\uff08\u7eaf\u51fd\u6570\u4e3a\u4e3b\uff09 <code>skill-family-harness-node</code> harness.md \u4e1a\u52a1\u4e2d\u7acb Node \u673a\u5236\uff08\u6536\u5bb9\u3001\u539f\u5b50\u5199\u3001\u95ed\u5305\u3001\u8bf7\u6c42\u3001\u62a5\u544a\u3001\u72b6\u6001\u5e95\u5ea7\uff09 <code>skill-family-engineering-kit</code> engineering-kit.md \u56db\u4e2a\u9876\u5c42\u547d\u4ee4\u4e0e\u53ea\u8bfb/\u53d7\u63a7\u5199\u5b50\u52a8\u4f5c <p>\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 \u00a74.3 \u81f3\u5c11\u8bf4\u660e\uff1a\u7b7e\u540d\u4e0e\u8f93\u5165\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p>"},{"location":"reference/api/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u5173\u7cfb","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u5173\u7cfb","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID\uff08\u5982 <code>foundation.contracts.object-validation</code>\u3001<code>foundation.harness.state-store</code>\uff09\u5b9a\u4e49\u5728 <code>docs/agents/capability-catalog.json</code>\uff0c\u672c\u9875\u4ece\u4e2d\u6295\u5f71\u5e76\u94fe\u63a5\u56de <code>sourceRefs</code> \u4e0e\u6d4b\u8bd5\u5f15\u7528\u3002</li> <li>\u672c\u9875\u7b7e\u540d\u53d6\u81ea\u5404\u5305 <code>src/index.mjs</code> \u4e0e\u6e90\u6a21\u5757\u771f\u5b9e\u5bfc\u51fa\uff1b\u95e8\u7981 <code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code>\uff0c\u62d2\u7edd catalog \u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\u3002</li> <li>catalog \u662f\u6587\u6863\u5c42\u673a\u5668\u4e8b\u5b9e\uff0c\u4e0d\u662f\u65b0\u7684 Contracts \u516c\u5171\u5bf9\u8c61\u6216\u534f\u8bae\uff1b\u672a\u7ecf ADR \u4e0d\u5f97\u4e3a\u5199\u6587\u6863\u65b0\u589e\u7b2c\u56db\u5305\u6216 Contracts \u5bf9\u8c61\u3002</li> </ul>"},{"location":"reference/api/#\u5173\u952e\u7eaa\u5f8b","title":"\u5173\u952e\u7eaa\u5f8b","text":"<ul> <li>\u673a\u5236\u5931\u8d25\u7edf\u4e00 <code>SFC2004</code>\uff08<code>EXECUTION_FAILED</code>\uff09\uff0c\u7531 <code>details.kind</code> \u533a\u5206\uff08<code>HARNESS_ERROR_KINDS</code> \u51bb\u7ed3\u679a\u4e3e\uff09\uff1bContracts \u6821\u9a8c\u5931\u8d25\uff08<code>SFC1001</code> / <code>SFC1002</code>\uff09\u7ecf <code>validateDocument</code> \u8fd4\u56de\u503c\u8868\u8fbe\u3001\u4e0d\u629b\u5f02\u5e38\u3002</li> <li>Kit \u9876\u5c42\u547d\u4ee4\u96c6\u5408\u56fa\u5b9a\u4e3a 4 \u4e2a\uff08<code>scaffold</code> / <code>adopt-plan</code> / <code>projection</code> / <code>check</code>\uff09\uff0c\u4e0d\u6269\u5f20\uff1b\u8fdc\u7aef\u6216\u901a\u7528 <code>host apply</code>\u3001\u5220\u9664\u5f0f <code>uninstall</code>\u3001Qoder \u5b8c\u6574 driver\u3001\u4e8c\u8fdb\u5236 adapter source\u3001\u8fdc\u7aef\u53d1\u5e03\u3001\u4e1a\u52a1\u72b6\u6001\u673a\u3001\u6a21\u578b\u7f16\u6392\u3001\u9886\u57df\u5ba1\u8ba1\u8bed\u4e49\u5747\u660e\u786e unsupported\u3002\u5df2\u767b\u8bb0\u5bbf\u4e3b\u7684\u672c\u5730 install/update \u4ec5\u901a\u8fc7\u53d7\u6388\u6743\u7684 plan API \u63d0\u4f9b\u3002</li> <li>\u6240\u6709\u7248\u672c\u5b57\u6bb5\u4ece <code>package.json</code> \u4e0e Contracts \u771f\u6e90\u751f\u6210\u6216\u7531 fact-check \u6821\u9a8c\uff1b<code>CONTRACTS_VERSION=1.4.0</code> \u4e0e npm \u5305\u7248\u672c <code>0.3.0</code> \u5e76\u884c\u3002</li> </ul>"},{"location":"reference/api/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u4e09\u4e2a\u5305\u90fd\u901a\u8fc7\u65e2\u6709 candidate \u5b50\u8def\u5f84\u516c\u5f00 Quickstart Profile v2\u3002Contracts \u5b9a\u4e49 <code>execute-method</code> \u4ea4\u6362\u7ed3\u6784\uff0cHarness \u590d\u9a8c\u5b57\u8282\u548c\u7ed1\u5b9a\uff0cKit \u4ece\u663e\u5f0f\u6d88\u8d39\u8005 Schema \u751f\u6210\u79bb\u7ebf Bundle\u3002\u8be5\u80fd\u529b\u4ecd\u6807\u8bb0\u4e3a <code>candidate</code>\uff0c0.3.0 \u7684 v2 \u4e0e 0.2.1 \u7684 v1 \u4e0d\u517c\u5bb9\uff1b\u6d88\u8d39\u8005\u5fc5\u987b\u7cbe\u786e\u9501\u5b9a\u6240\u9009\u5305\u7248\u672c\u3002</p>"},{"location":"reference/api/contracts/","title":"skill-family-contracts \u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u9875\u4ece\u771f\u5b9e\u5bfc\u51fa\uff08<code>src/index.mjs</code> \u4e0e\u5404\u6e90\u6a21\u5757\uff09\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684\u5168\u96c6\u3002\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 hand-off \u00a74.3 \u8bf4\u660e\uff1a\u7b7e\u540d\u3001\u8f93\u5165\u4e0e\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p> <p>\u80fd\u529b\u5206\u7ec4\uff08\u4e0e <code>docs/agents/capability-catalog.json</code> \u5bf9\u5e94\uff09\uff1a</p> <ul> <li>\u5bf9\u8c61\u6821\u9a8c \u2192 <code>validateDocument</code> / <code>compileSchema</code> / <code>detectDialect</code></li> <li>\u6765\u6e90\u6743\u5a01\u6536\u636e \u2192 <code>validateSourceAuthorityReceipt</code> / <code>parseSourceAuthorityReceipt</code></li> <li>\u6587\u4ef6\u7cfb\u7edf\u5951\u7ea6 \u2192 \u6839\u7ed1\u5b9a\u4e0e\u56fa\u5b9a\u96c6\u5408 manifest/receipt Schema</li> <li>\u767b\u8bb0\u4e0e\u534f\u8bae \u2192 <code>loadRegistry</code> / <code>findSchemaByObject</code> / <code>findProtocol</code> / <code>registerSchema</code> / <code>registerProtocol</code></li> <li>\u5185\u6838\u534f\u8bae \u2192 <code>loadKernelProtocol</code> / <code>findOperation</code> / <code>checkOperation</code></li> <li>\u5f3a\u5236\u68c0\u67e5 \u2192 <code>runChecks</code> / <code>collectUnresolvedRefs</code></li> <li>fixture \u6821\u9a8c \u2192 <code>listFixtures</code> / <code>verifyFixture</code> / <code>verifyAllFixtures</code></li> <li>\u9519\u8bef\u7801 \u2192 <code>ContractsError</code> / <code>isRegisteredErrorCode</code> / <code>stableError</code></li> <li>\u5ba1\u8ba1\u8868\u9762 \u2192 <code>canonicalJson</code> / <code>digestDocument</code> / <code>digestAuditSurface</code></li> <li>\u5de5\u7a0b\u57fa\u7ebf \u2192 <code>validateEngineeringBaseline</code> / <code>describeEngineeringBaseline</code></li> <li>\u540c\u7ea7\u9002\u914d\u5668\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> <li>\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> <li>\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> <li>\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1\u5408\u540c \u2192 request/result Schema</li> </ul> <p>\u5305\u7ea7\u5e38\u91cf\uff08\u51bb\u7ed3\uff0c\u4ec5\u4f5c\u4e8b\u5b9e\u6295\u5f71\uff0c\u4e0d\u53e6\u7acb\u6743\u5a01\uff09\uff1a<code>CONTRACT_OBJECTS</code>\uff0846 \u7c7b\u9876\u5c42\u5bf9\u8c61\uff0c\u95ed\u96c6\uff09\u3001<code>CONTRACT_BOUNDARY</code>\u3001<code>CONTRACTS_VERSION = \"1.16.0\"</code>\u3001<code>SUPPORTED_DIALECTS</code>\u3001<code>VALIDATION_POLICIES</code>\u3001<code>CHECK_TYPES</code>\uff089 \u7c7b\u673a\u68b0\u68c0\u67e5\uff09\u3001<code>MANDATORY_RULES</code>\u3001<code>RULE_BUDGET</code>\u3001<code>ERROR_CODES</code>\u3002</p>"},{"location":"reference/api/contracts/#\u5bf9\u8c61\u6821\u9a8c-foundationcontractsobject-validation","title":"\u5bf9\u8c61\u6821\u9a8c (foundation.contracts.object-validation)","text":""},{"location":"reference/api/contracts/#validateDocument","title":"validateDocument","text":"<ul> <li>\u7b7e\u540d\uff1a<code>validateDocument(document, { schemaId, schema, dialect, policy = \"strict\" } = {})</code></li> <li>\u8f93\u5165\uff1a\u4efb\u610f JSON \u6587\u6863\uff1b\u76ee\u6807\u5951\u7ea6\u5bf9\u8c61 <code>$id</code> \u6216 schema \u5bf9\u8c61\uff1b\u65b9\u8a00\uff08<code>draft-07</code> / <code>2020-12</code>\uff09\uff1b\u7b56\u7565\uff08<code>strict</code> | <code>tolerant</code>\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u59cb\u7ec8\u8fd4\u56de <code>{valid, errorCode, errors, data}</code>\uff1b\u6821\u9a8c\u901a\u8fc7\u65f6 <code>valid=true</code>\uff0c\u5931\u8d25\u65f6 <code>valid=false</code> \u5e76\u5e26\u7a33\u5b9a <code>errorCode</code>\uff0c\u4e0d\u629b\u51fa\uff08\u5df2\u5b9e\u6d4b\uff1a\u672a\u77e5 <code>$id</code> \u8fd4\u56de <code>SFC1002</code>\uff0c\u6587\u6863\u4e0d\u7b26\u8fd4\u56de <code>SFC1001</code>\uff09\u3002<code>data</code> \u662f\u6821\u9a8c\u4f7f\u7528\u7684\u89c4\u8303\u5316\u526f\u672c\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002\u4ec5\u8bfb\u53d6\u8fdb\u7a0b\u5185 Ajv \u7f16\u8bd1\u7f13\u5b58\uff0c\u4e0d\u89e6\u5916\u90e8\u8d44\u6e90\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/Git/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff1b\u9996\u6b21\u7f16\u8bd1\u5199\u5165\u5185\u5b58\u7f16\u8bd1\u7f13\u5b58\uff0c\u540e\u7eed\u540c <code>(schemaId,dialect,policy)</code> \u590d\u7528\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1002</code>\uff08\u672a\u77e5 <code>$id</code>\uff09\u3001<code>SFC1001</code>\uff08\u6587\u6863\u4e0d\u7b26 Schema\uff09\u3002\u4e24\u8005\u5747\u7ecf\u8fd4\u56de\u503c <code>errorCode</code> \u8868\u8fbe\uff0c\u8c03\u7528\u65b9\u4ee5 <code>valid</code> \u5b57\u6bb5\u5224\u65ad\u6210\u8d25\uff0c\u4e0d\u4ee5 <code>try/catch</code> \u6355\u83b7\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5f85\u6821\u9a8c\u6587\u6863\u5e26\u5df2\u767b\u8bb0\u5951\u7ea6\u5bf9\u8c61 <code>$id</code>\uff1bNode &gt;= 22.22.2\uff1b\u6821\u9a8c\u5668\u56fa\u5b9a\u4e3a Ajv 8.20.0\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/validator.mjs</code>\u3002</li> <li>\u6b63\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/validator.test.mjs</code>\u3001<code>schemas.test.mjs</code>\u3001<code>host-contracts.test.mjs</code>\u3001<code>report-contracts.test.mjs</code>\u3002</li> <li>\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c\u4e0a\uff08\u672a\u77e5 <code>$id</code> \u4e0e\u4e0d\u7b26 Schema \u5747\u8fd4\u56de <code>valid:false</code>\uff09\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5177\u4f53\u4e1a\u52a1\u5b57\u6bb5\u7684\u8bed\u4e49\u89e3\u91ca\u3001\u9886\u57df\u7ea7\u6821\u9a8c\u89c4\u5219\u3002</li> </ul>"},{"location":"reference/api/contracts/#compileSchema","title":"compileSchema","text":"<ul> <li>\u7b7e\u540d\uff1a<code>compileSchema(target, { dialect, policy = \"strict\" } = {})</code></li> <li>\u8f93\u5165\uff1aschema \u5bf9\u8c61\u6216 <code>$id</code>\uff1b\u65b9\u8a00\uff1b\u7b56\u7565\u3002</li> <li>\u8f93\u51fa\uff1a\u7f16\u8bd1\u540e\u7684 Ajv <code>validate</code> \u51fd\u6570\uff1b\u6216\u629b <code>ContractsError</code>\uff08<code>SFC1012</code> <code>SCHEMA_COMPILE_FAILED</code>\uff0c\u5f53 schema \u81ea\u8eab\u65e0\u6cd5\u5728\u58f0\u660e\u65b9\u8a00\u4e0b\u7f16\u8bd1\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff0c\u4ec5\u5199\u5165\u7f16\u8bd1\u7f13\u5b58\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1012</code>\uff08Schema \u7f16\u8bd1\u5931\u8d25\uff0c\u629b\u5f02\u5e38\u2014\u2014\u4e0e <code>validateDocument</code> \u7684\u8fd4\u56de\u5f0f\u5931\u8d25\u4e0d\u540c\uff09\u3001<code>SFC1006</code>\uff08\u4e0d\u652f\u6301\u7684\u65b9\u8a00\uff1b<code>compileSchema</code> \u629b\u51fa\uff0c<code>validateDocument</code> \u4ee5\u8fd4\u56de\u503c\u62a5\u544a\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aAjv 8.20.0 \u56fa\u5b9a\uff1b<code>dialect</code> \u5c5e\u51bb\u7ed3\u652f\u6301\u96c6\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/validator.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c <code>validateDocument</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1aschema \u7684\u4e1a\u52a1\u542b\u4e49\u3002</li> </ul>"},{"location":"reference/api/contracts/#detectDialect","title":"detectDialect","text":"<ul> <li>\u7b7e\u540d\uff1a<code>detectDialect(schema)</code></li> <li>\u8f93\u5165\uff1a\u5e26 <code>$schema</code> \u5b57\u6bb5\u7684 schema \u5bf9\u8c61\u3002</li> <li>\u8f93\u51fa\uff1a\u65b9\u8a00\u5b57\u7b26\u4e32\uff08<code>draft-07</code> / <code>2020-12</code>\uff09\uff1b\u7f3a\u5c11\u6216\u672a\u77e5\u65b9\u8a00\u8fd4\u56de <code>null</code>\u3002<code>compileSchema</code> \u5bf9\u4e0d\u652f\u6301\u7684\u65b9\u8a00\u629b <code>SFC1006</code>\uff0c<code>validateDocument</code> \u5bf9\u540c\u4e00\u60c5\u51b5\u8fd4\u56de <code>errorCode: \"SFC1006\"</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8c03\u7528\u65b9\u76f4\u63a5\u8c03\u7528 <code>detectDialect</code> \u65f6\u672a\u77e5\u65b9\u8a00\u4e0d\u4ea7\u751f\u9519\u8bef\u7801\uff1b\u4e0b\u6e38\u7f16\u8bd1/\u6821\u9a8c\u5206\u522b\u6309\u4e0a\u8ff0\u89c4\u5219\u4ea7\u751f <code>SFC1006</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u65b9\u8a00\u96c6\u51bb\u7ed3\uff08<code>SUPPORTED_DIALECTS</code>\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/validator.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c\u4e0a\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u65b9\u8a00\u9009\u62e9\u7b56\u7565\uff08\u4f55\u65f6\u7528 tolerant\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u6765\u6e90\u6743\u5a01\u6536\u636e-foundationcontractssource-authority","title":"\u6765\u6e90\u6743\u5a01\u6536\u636e (foundation.contracts.source-authority)","text":""},{"location":"reference/api/contracts/#validateSourceAuthorityReceipt--parseSourceAuthorityReceipt","title":"validateSourceAuthorityReceipt / parseSourceAuthorityReceipt","text":"<ul> <li>\u7b7e\u540d\uff1a<code>validateSourceAuthorityReceipt(receipt)</code>\uff1b<code>parseSourceAuthorityReceipt(receipt, actualSubjects)</code>\u3002</li> <li>\u8f93\u5165\uff1a\u95ed\u5408\u7684\u5916\u7f6e receipt\uff0c\u4ee5\u53ca\u8c03\u7528\u65b9\u5b9e\u9645\u89c2\u6d4b\u7684 subjects\u3002\u6bcf\u4e2a subject \u53ea\u542b <code>packageName</code>\u3001<code>version</code>\u3001<code>filename</code> \u4e0e <code>sha256</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u4e24\u8005\u5747\u8fd4\u56de\u65e2\u6709 <code>{ valid, errorCode, errors, data }</code> \u7ed3\u679c\u5f62\u6001\u3002\u89e3\u6790\u6210\u529f\u65f6\uff0c<code>data</code> \u53ea\u542b <code>sourceRepository</code> \u4e0e <code>sourceBaseCommit</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002\u8f93\u5165\u4f1a\u590d\u5236\u540e\u6821\u9a8c\uff0c\u8c03\u7528\u65b9\u5bf9\u8c61\u4e0d\u88ab\u4fee\u6539\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u3001\u8fdb\u7a0b\u3001Git\u3001\u7f51\u7edc\u6216\u53d1\u5e03\u72b6\u6001\u526f\u4f5c\u7528\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\uff1a\u7ed3\u6784\u3001\u6392\u5e8f\u3001\u91cd\u590d\u5305\u540d\u3001\u5b9e\u9645 subjects \u5f62\u72b6\u6216\u9010\u5b57\u6bb5\u6838\u5bf9\u5931\u8d25\u5747\u8fd4\u56de <code>SFC1001</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1areceipt subjects \u81f3\u5c11\u4e00\u9879\uff0c\u6309 <code>packageName</code> \u552f\u4e00\u3001\u5347\u5e8f\u6392\u5217\uff1b<code>sourceBaseCommit</code> \u662f 40 \u4f4d\u5c0f\u5199\u5341\u516d\u8fdb\u5236\uff0cSHA-256 \u662f 64 \u4f4d\u5c0f\u5199\u5341\u516d\u8fdb\u5236\u3002\u8c03\u7528\u65b9\u8d1f\u8d23\u53d6\u5f97 receipt \u4e0e\u5b9e\u9645 subjects\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.8.4</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/source-authority.mjs</code>\u3001<code>src/schemas/source-authority-receipt.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/source-authority.test.mjs</code>\u3001<code>source-authority-public-consumer.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1areceipt \u7684\u7b7e\u53d1\u3001\u5b58\u50a8\u548c\u4f20\u8f93\uff1b\u5b9e\u9645\u5305\u53d1\u73b0\uff1b\u6821\u9a8c\u540e\u662f\u5426\u91c7\u7528\u8be5\u6765\u6e90\u3002Contracts \u4e0d\u6267\u884c\u76ee\u6807\uff0c\u4e5f\u4e0d\u89e3\u91ca\u79c1\u6709\u53d1\u5e03\u8ba1\u5212\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u6587\u4ef6\u7cfb\u7edf\u5951\u7ea6-foundationcontractsfilesystem","title":"\u6587\u4ef6\u7cfb\u7edf\u5951\u7ea6 (foundation.contracts.filesystem)","text":"<p>0.9.0 \u65b0\u589e\u4e09\u4e2a\u7a33\u5b9a\u9876\u5c42 Schema\uff1a<code>filesystem-root-binding</code>\u3001<code>fixed-set-publication-manifest</code> \u4e0e <code>fixed-set-publication-receipt</code>\u3002\u5b83\u4eec\u53ea\u63cf\u8ff0\u7ed3\u6784\u4e0e\u56de\u6267\uff0c\u4e0d\u63d0\u4f9b\u5220\u9664\u3001\u66ff\u6362\u6216\u901a\u7528\u6062\u590d\u72b6\u6001\u673a\u3002</p> <ul> <li>\u6839\u7ed1\u5b9a Schema\uff1a<code>https://contracts.skill-family.example/v1/filesystem-root-binding.json</code>\u3002\u503c\u56fa\u5b9a\u4e3a <code>kind</code>\u3001<code>digestAlgorithm</code>\u3001<code>basis</code>\u3001<code>digest</code> \u56db\u4e2a\u5b57\u6bb5\uff1b\u7ed1\u5b9a\u503c\u53ef\u5e8f\u5217\u5316\u4e14\u4e0d\u5305\u542b\u516c\u5f00\u76ee\u5f55\u53e5\u67c4\u3002</li> <li>\u56fa\u5b9a\u96c6\u5408 manifest/receipt Schema\uff1a<code>https://contracts.skill-family.example/v1/fixed-set-publication-manifest.json</code> \u4e0e <code>https://contracts.skill-family.example/v1/fixed-set-publication-receipt.json</code>\u3002\u53d1\u5e03\u56de\u6267\u7684\u7ec8\u6001\u53ea\u5141\u8bb8 <code>succeeded</code>\u3001<code>refused</code>\u3001<code>failed</code>\u3001<code>indeterminate</code>\u3002</li> <li>\u8fd9\u4e09\u4e2a Schema \u7684\u771f\u5b9e\u767b\u8bb0\u4e0e fixture \u7531 <code>packages/skill-family-contracts/src/registry.json</code>\u3001<code>src/schemas/</code> \u548c <code>test/</code> \u5171\u540c\u6838\u9a8c\uff1b\u6279\u91cf\u6821\u9a8c Schema \u4fdd\u6301 candidate\uff0c\u4e0d\u8fdb\u5165\u7a33\u5b9a Registry\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u767b\u8bb0\u4e0e\u534f\u8bae-foundationcontractsregistry-protocol","title":"\u767b\u8bb0\u4e0e\u534f\u8bae (foundation.contracts.registry-protocol)","text":""},{"location":"reference/api/contracts/#loadRegistry--listSchemas--listProtocols--findSchemaRegistration--findSchemaByObject--findProtocol","title":"loadRegistry / listSchemas / listProtocols / findSchemaRegistration / findSchemaByObject / findProtocol","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>loadRegistry()</code></li> <li><code>listSchemas(registry = REGISTRY)</code></li> <li><code>listProtocols(registry = REGISTRY)</code></li> <li><code>findSchemaRegistration(schemaId, registry = REGISTRY)</code></li> <li><code>findSchemaByObject(object, registry = REGISTRY)</code></li> <li><code>findProtocol(name, version, registry = REGISTRY)</code></li> <li>\u8f93\u5165\uff1a\u5bf9\u8c61\u540d\u3001<code>$id</code>\u3001\u534f\u8bae\u540d/\u7248\u672c\uff08\u5176\u4f59\u9ed8\u8ba4\u8bfb\u51bb\u7ed3 <code>REGISTRY</code>\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u5df2\u767b\u8bb0 schema \u5143\u4fe1\u606f\u6216\u534f\u8bae\u5b9a\u4e49\uff1b\u672a\u547d\u4e2d\u8fd4\u56de <code>null</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u767b\u8bb0\u7c7b\u51b2\u7a81\u7ecf <code>registerSchema</code> / <code>registerProtocol</code> \u629b <code>SFC1003</code>\uff08<code>DUPLICATE_SCHEMA_ID</code>\uff09/ <code>SFC1004</code>\uff08<code>DUPLICATE_PROTOCOL_NAME</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>registry.json</code> \u968f\u5305\u53d1\u5e03\uff1b<code>schemaVersion=1</code>\u3001<code>contractsVersion=1.16.0</code> \u4e3a\u552f\u4e00\u6743\u5a01\uff1b\u767b\u8bb0\u8868\u542b 46 \u7c7b Schema \u4e0e 1 \u4e2a Kernel Protocol\uff0c\u65b0\u589e\u9700 ADR\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/registry.mjs</code>\u3001<code>registry.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/registry.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5bf9\u8c61\u4e1a\u52a1\u542b\u4e49\u7684\u89e3\u91ca\u3002</li> </ul>"},{"location":"reference/api/contracts/#registerSchema--registerProtocol","title":"registerSchema / registerProtocol","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>registerSchema(entry, registry = REGISTRY)</code></li> <li><code>registerProtocol(entry, registry = REGISTRY)</code></li> <li>\u8f93\u5165\uff1aschema/protocol \u767b\u8bb0\u9879\u3002</li> <li>\u8f93\u51fa\uff1a\u5305\u542b\u65b0\u767b\u8bb0\u9879\u7684 registry \u65b0\u526f\u672c\uff1b\u8f93\u5165 registry \u4e0e\u9ed8\u8ba4\u51bb\u7ed3 <code>REGISTRY</code> \u5747\u4e0d\u4fee\u6539\u3002\u91cd\u590d <code>$id</code>/\u534f\u8bae\u540d\u629b <code>ContractsError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u4ec5\u8fd4\u56de\u590d\u5236\u540e\u7684\u5185\u5b58\u5bf9\u8c61\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u3001\u8fdb\u7a0b\u3001Git\u3001\u7f51\u7edc\u6216\u6301\u4e45\u5316\u526f\u4f5c\u7528\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1003</code>\uff08\u91cd\u590d <code>$id</code>\uff09\u3001<code>SFC1004</code>\uff08\u91cd\u590d\u534f\u8bae\u540d\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u767b\u8bb0\u8868\u542b 46 \u7c7b Schema \u4e0e 1 \u4e2a Kernel Protocol\uff0c\u65b0\u589e\u9700 ADR\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a\u540c\u4e0a\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a\u540c\u4e0a\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u767b\u8bb0\u9879\u7684\u4e1a\u52a1\u7406\u7531\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5185\u6838\u534f\u8bae-foundationcontractskernel-protocol","title":"\u5185\u6838\u534f\u8bae (foundation.contracts.kernel-protocol)","text":""},{"location":"reference/api/contracts/#loadKernelProtocol--findOperation--checkOperation","title":"loadKernelProtocol / findOperation / checkOperation","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>loadKernelProtocol()</code></li> <li><code>findOperation(name, kernel = KERNEL)</code></li> <li><code>checkOperation(operation, params)</code></li> <li>\u8f93\u5165\uff1a\u534f\u8bae\u540d\u3001\u64cd\u4f5c\u540d\u3001\u64cd\u4f5c\u53c2\u6570\u3002</li> <li>\u8f93\u51fa\uff1a\u534f\u8bae\u5b9a\u4e49\u6216\u64cd\u4f5c\u53c2\u6570\u6821\u9a8c\u7ed3\u679c\uff1b\u5931\u8d25\u65f6\u629b <code>ContractsError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u52a0\u8f7d\u4e3a\u53ea\u8bfb\u89e3\u6790\uff0c\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC2002</code>\uff08<code>UNKNOWN_OPERATION</code>\uff0c\u64cd\u4f5c\u540d\u4e0d\u5728\u51bb\u7ed3\u8bcd\u6c47\uff09\u3001<code>SFC2003</code>\uff08<code>INVALID_PARAMS</code>\uff0c\u53c2\u6570\u8fdd\u53cd\u64cd\u4f5c\u53c2\u6570\u5951\u7ea6\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>kernel-protocol.json</code> \u968f\u5305\u53d1\u5e03\uff1b\u5185\u6838\u534f\u8bae\u7248\u672c\u4e0e Contracts \u7248\u672c\u7ed1\u5b9a\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/kernel.mjs</code>\u3001<code>kernel-protocol.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/kernel.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u64cd\u4f5c\u7684\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\uff08\u72b6\u6001\u673a/\u91cd\u8bd5/\u7ec8\u6001\u8f6c <code>loop-agent</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5f3a\u5236\u68c0\u67e5-foundationcontractsmandatory-checks","title":"\u5f3a\u5236\u68c0\u67e5 (foundation.contracts.mandatory-checks)","text":""},{"location":"reference/api/contracts/#runChecks--collectUnresolvedRefs","title":"runChecks / collectUnresolvedRefs","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runChecks({ schemaEntries, ... } = {})</code></li> <li><code>collectUnresolvedRefs(schemaEntries)</code></li> <li>\u8f93\u5165\uff1a\u5f85\u68c0\u67e5\u5951\u7ea6\u96c6\u6216\u5408\u6210 registry/fixtures\u3002</li> <li>\u8f93\u51fa\uff1a\u68c0\u67e5\u7ed3\u8bba\u4e0e\u672a\u89e3\u6790\u5f15\u7528\u6e05\u5355\uff1b\u8fdd\u53cd\u89c4\u5219\u629b <code>ContractsError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1002</code>/<code>1003</code>/<code>1004</code>/<code>1005</code>/<code>1006</code>/<code>1008</code>/<code>1009</code>/<code>1010</code> \u5bf9\u5e94\u5404\u89c4\u5219 violated\uff1b<code>SFC1005</code>\uff08<code>UNRESOLVED_REF</code>\uff09\u3001<code>SFC1008</code>\uff08<code>RULE_BUDGET_EXCEEDED</code>\uff09\u3001<code>SFC1010</code>\uff08<code>FIXTURE_EXPECTATION_MISMATCH</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aregistry \u4e0e rules \u5df2\u52a0\u8f7d\uff1b<code>CHECK_TYPES</code> \u4e3a 9 \u7c7b\u95ed\u96c6\uff1b<code>RULE_BUDGET</code> \u9650\u5236 <code>firstVersionMax</code> \u4e0e <code>absoluteMax</code>\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/checker.mjs</code>\u3001<code>rules.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/checker.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u89c4\u5219\u4e1a\u52a1\u7406\u7531\u7684\u89e3\u91ca\uff08\u8bed\u4e49\u63a5\u53d7/\u62d2\u7edd\u5c5e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#fixture-\u6821\u9a8c-foundationcontractsfixture-verification","title":"fixture \u6821\u9a8c (foundation.contracts.fixture-verification)","text":""},{"location":"reference/api/contracts/#listFixtures--fixtureClasses--verifyFixture--verifyAllFixtures","title":"listFixtures / fixtureClasses / verifyFixture / verifyAllFixtures","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>listFixtures()</code></li> <li><code>fixtureClasses()</code></li> <li><code>verifyFixture(fixture)</code></li> <li><code>verifyAllFixtures()</code></li> <li>\u8f93\u5165\uff1afixture \u7c7b\u6216\u5355\u4e2a fixture \u6807\u8bc6\u3002</li> <li>\u8f93\u51fa\uff1a\u9010 fixture \u7684\u6821\u9a8c\u7ed3\u679c\uff08\u6b63\u4f8b\u987b\u901a\u8fc7\u3001\u8d1f\u4f8b\u987b\u4ee5\u58f0\u660e\u7a33\u5b9a\u7801\u5931\u8d25\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u53ea\u8bfb fixture \u76ee\u5f55\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u8bbf\u95ee fixture\uff0c\u65e0\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC1010</code>\uff08<code>FIXTURE_EXPECTATION_MISMATCH</code>\uff0c\u8d1f\u4f8b\u672a\u4ea7\u751f\u9884\u671f\u5931\u8d25\uff09\uff1b<code>SFC1009</code>\uff08<code>UNKNOWN_ERROR_CODE</code>\uff0cfixture \u5f15\u7528\u672a\u767b\u8bb0\u7801\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1afixtures \u76ee\u5f55\u4e3a\u516c\u5f00\u6216\u5b8c\u5168\u865a\u6784\u6570\u636e\uff1bfixture \u4e0e\u5ba1\u8ba1\u5668\u9884\u671f\u7ed3\u679c\u4e0d\u5171\u4eab\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/fixtures.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/fixtures.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1afixture \u80cc\u540e\u7684\u4e1a\u52a1\u610f\u56fe\uff08fixture \u53ea\u8bc1\u7ed3\u6784\u3001\u4e0d\u8bc1\u8bed\u4e49\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u9519\u8bef\u7801-foundationcontractserror-codes","title":"\u9519\u8bef\u7801 (foundation.contracts.error-codes)","text":""},{"location":"reference/api/contracts/#ContractsError--errorCodeRegistry--errorCodeInfo--isRegisteredErrorCode--assertRegisteredErrorCode--stableError","title":"ContractsError / errorCodeRegistry / errorCodeInfo / isRegisteredErrorCode / assertRegisteredErrorCode / stableError","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>class ContractsError extends Error</code>\uff08\u6784\u9020 <code>(code, message, details)</code>\uff09</li> <li><code>errorCodeRegistry()</code></li> <li><code>errorCodeInfo(code)</code></li> <li><code>isRegisteredErrorCode(code)</code></li> <li><code>assertRegisteredErrorCode(code)</code></li> <li><code>stableError(code, message, details)</code></li> <li>\u8f93\u5165\uff1a\u9519\u8bef\u7801\u5b57\u7b26\u4e32\u3001\u9519\u8bef\u4e0a\u4e0b\u6587\u3002</li> <li>\u8f93\u51fa\uff1a\u5e26\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details</code> \u7684\u9519\u8bef\u5bf9\u8c61\uff1b<code>assertRegisteredErrorCode</code> \u5bf9\u672a\u767b\u8bb0\u7801\u629b <code>TypeError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08<code>ContractsError</code> \u6784\u9020\u4e3a\u7eaf\u5bf9\u8c61\uff0c\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u9519\u8bef\u7801\u4f53\u7cfb\u672c\u8eab\u51bb\u7ed3\uff08<code>error-codes.json</code>\uff09\uff0c\u65b0\u589e\u7801\u5c5e Contracts \u53d8\u66f4\uff1b<code>SFC1009</code> \u7528\u4e8e\u672a\u767b\u8bb0\u7801\u65ad\u8a00\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>error-codes.json</code> \u968f\u5305\u53d1\u5e03\uff1b\u51bb\u7ed3\u5bf9\u8c61\u4e0d\u53ef\u53d8\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/errors.mjs</code>\u3001<code>error-codes.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/boundary.test.mjs</code>\u3001<code>immutability.test.mjs</code>\u3001<code>audit-surface.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9519\u8bef\u7801\u7684\u4e1a\u52a1\u5f52\u56e0\u3002</li> </ul> <p>Contracts \u9519\u8bef\u7801\u4e00\u89c8\uff08\u7a33\u5b9a\u3001append-only\uff09\uff1a</p> \u7801 \u540d\u79f0 \u7c7b\u522b SFC1001 SCHEMA_VALIDATION_FAILED contract SFC1002 UNKNOWN_SCHEMA_ID contract SFC1003 DUPLICATE_SCHEMA_ID contract SFC1004 DUPLICATE_PROTOCOL_NAME contract SFC1005 UNRESOLVED_REF contract SFC1006 UNSUPPORTED_DIALECT contract SFC1007 UNKNOWN_CHECK_TYPE contract SFC1008 RULE_BUDGET_EXCEEDED contract SFC1009 UNKNOWN_ERROR_CODE contract SFC1010 FIXTURE_EXPECTATION_MISMATCH contract SFC1011 UNKNOWN_PROTOCOL contract SFC1012 SCHEMA_COMPILE_FAILED contract SFC1013 CONSUMER_CONTRACT_VERSION_MISMATCH contract SFC2002 UNKNOWN_OPERATION kernel SFC2003 INVALID_PARAMS kernel SFC2004 EXECUTION_FAILED kernel\uff08\u673a\u5236\u5931\u8d25\u7edf\u4e00\u7801\uff0c\u627f\u8f7d <code>details.kind</code>\uff09 SFC3001 REPORT_DIGEST_MISMATCH report SFC3002 REPORT_ELEMENT_MISSING report SFC3003 REPORT_FACT_DRIFT report"},{"location":"reference/api/contracts/#\u5ba1\u8ba1\u8868\u9762-foundationcontractsaudit-surface","title":"\u5ba1\u8ba1\u8868\u9762 (foundation.contracts.audit-surface)","text":""},{"location":"reference/api/contracts/#canonicalJson--digestDocument--describeAuditSurface--digestAuditSurface","title":"canonicalJson / digestDocument / describeAuditSurface / digestAuditSurface","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>canonicalJson(value)</code></li> <li><code>digestDocument(value, { algorithm = \"sha256\" } = {})</code></li> <li><code>describeAuditSurface()</code></li> <li><code>digestAuditSurface(surface = describeAuditSurface())</code></li> <li>\u8f93\u5165\uff1a\u4efb\u610f JSON \u6587\u6863\u3002</li> <li>\u8f93\u51fa\uff1acanonical \u5b57\u7b26\u4e32\u4e0e sha256 \u6458\u8981\uff1b\u5ba1\u8ba1\u8868\u9762\u7ed3\u6784\u63cf\u8ff0\u4e0e\u5176\u6458\u8981\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e JSON \u503c\u3001\u672a\u77e5\u7b97\u6cd5\uff08<code>AUDIT_DIGEST_ALGORITHMS</code> \u4ec5 <code>sha256</code>\uff09\u3001\u51bb\u7ed3\u8fdd\u89c4\u629b <code>ContractsError</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>AUDIT_SURFACE_VERSION=1</code>\uff1b\u6458\u8981\u7b97\u6cd5\u4ec5 <code>sha256</code>\uff1b\u4f9d\u8d56\u65b9\u5411 Audit \u2192 Contracts\uff0c\u672c\u6a21\u5757\u4e0d\u53cd\u5411\u5bfc\u5165\u5ba1\u8ba1\u4ea7\u7269\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/audit-surface.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/audit-surface.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5ba1\u8ba1\u8bed\u4e49\u7ed3\u8bba\uff08\u63a5\u53d7/\u62d2\u7edd\u5c5e\u5916\u90e8\u72ec\u7acb\u5ba1\u9605\uff09\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5de5\u7a0b\u57fa\u7ebf-foundationcontractsengineering-baseline","title":"\u5de5\u7a0b\u57fa\u7ebf (foundation.contracts.engineering-baseline)","text":""},{"location":"reference/api/contracts/#validateEngineeringBaseline--describeEngineeringBaseline","title":"validateEngineeringBaseline / describeEngineeringBaseline","text":"<ul> <li>\u7b7e\u540d\uff1a<code>validateEngineeringBaseline(baseline)</code>\uff1b<code>describeEngineeringBaseline({ provider, id, version, canonicalRuleRefs, referenceImplementation })</code>\u3002</li> <li>\u8f93\u5165\uff1a\u95ed\u5408\u7684 <code>skill-family.engineering-baseline</code> \u6587\u6863\uff0c\u6216\u6784\u9020\u8be5\u6587\u6863\u6240\u9700\u7684\u63d0\u4f9b\u65b9\u8eab\u4efd\u3001\u5df2\u6392\u5e8f\u89c4\u5219\u8c31\u7cfb\u5f15\u7528\u548c Foundation \u53c2\u8003\u9aa8\u67b6\u8eab\u4efd\u3002<code>referenceImplementation</code> \u53ea\u542b <code>foundationVersion</code>\u3001<code>profile</code> \u4e0e <code>skeletonDigest</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u6821\u9a8c\u5165\u53e3\u8fd4\u56de\u65e2\u6709 <code>{ valid, errorCode, errors, data }</code> \u7ed3\u679c\uff1b\u6784\u9020\u5165\u53e3\u6309\u89c4\u5219 ID \u6392\u5e8f\u3001\u8ba1\u7b97\u53bb\u6389 <code>digest</code> \u5b57\u6bb5\u540e\u7684\u89c4\u8303 JSON \u6458\u8981\uff0c\u5e76\u8fd4\u56de\u6df1\u5ea6\u51bb\u7ed3\u7684\u6587\u6863\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002\u53ea\u590d\u7528 Contracts \u7684 Schema \u6821\u9a8c\u3001\u60f0\u6027 JSON \u9884\u68c0\u3001<code>digestDocument()</code> \u4e0e\u8fdb\u7a0b\u5185\u7f16\u8bd1\u7f13\u5b58\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u3001\u8fdb\u7a0b\u3001Git \u6216\u7f51\u7edc\u526f\u4f5c\u7528\uff1b\u4e0d\u8bfb\u53d6\u57fa\u7ebf\u63d0\u4f9b\u65b9\u7684\u5305\u3001\u4ed3\u5e93\u6216\u89c4\u5219\u6587\u4ef6\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u7ed3\u6784\u3001\u91cd\u590d\u89c4\u5219 ID\u3001\u975e\u786e\u5b9a\u6027\u987a\u5e8f\u6216\u6458\u8981\u4e0d\u4e00\u81f4\u8fd4\u56de\u6216\u629b\u51fa <code>SFC1001</code>\uff1b\u672a\u77e5 Schema \u4ecd\u6309\u901a\u7528\u6821\u9a8c\u89c4\u5219\u8fd4\u56de <code>SFC1002</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aSchema <code>$id</code> \u4e3a <code>https://contracts.skill-family.example/v1/engineering-baseline.json</code>\uff1b<code>canonicalRuleRefs</code> \u81f3\u5c11\u4e00\u9879\uff0c\u6309 <code>id</code> \u552f\u4e00\u4e14\u5347\u5e8f\uff1b<code>digest</code> \u5fc5\u987b\u7ed1\u5b9a\u6587\u6863\u81ea\u8eab\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.17.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/engineering-baseline.mjs</code>\u3001<code>src/schemas/engineering-baseline.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/engineering-baseline.test.mjs</code>\u3001<code>schemas.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u57fa\u7ebf\u63d0\u4f9b\u65b9\u8d1f\u8d23\u89c4\u5219\u6b63\u6587\u3001\u89c4\u5219\u6548\u679c\u3001\u7b49\u4ef7\u5173\u7cfb\u3001\u8c41\u514d\u548c\u6b63\u5f0f\u57fa\u7ebf\u53d1\u5e03\u3002Foundation \u4e0d\u89e3\u91ca\u8fd9\u4e9b\u8bed\u4e49\uff0c\u4e5f\u4e0d\u5ba3\u79f0 Audit \u5df2\u7ecf\u53d1\u5e03\u6b63\u5f0f\u57fa\u7ebf\uff1b\u4f9d\u8d56\u65b9\u5411\u4fdd\u6301\u4e3a\u57fa\u7ebf\u63d0\u4f9b\u65b9\u4f9d\u8d56 Foundation\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u540c\u7ea7\u9002\u914d\u5668\u9a8c\u8bc1\u5408\u540c-foundationcontractspeer-adapter-verification","title":"\u540c\u7ea7\u9002\u914d\u5668\u9a8c\u8bc1\u5408\u540c (foundation.contracts.peer-adapter-verification)","text":"<p>Contracts 1.10.0 \u767b\u8bb0 <code>adapter-peer-verification-request</code> \u4e0e <code>adapter-peer-verification-result</code> \u4e24\u4e2a\u7a33\u5b9a Schema\u3002request \u81f3\u5c11\u5305\u542b\u4e24\u4e2a\u663e\u5f0f peer\uff1b\u6bcf\u4e2a peer \u643a\u5e26\u95ed\u96c6 <code>hostId</code>\u3001\u8def\u5f84\u7c7b\u522b\u548c\u5b8c\u6574 <code>logicalMappings</code>\u3002result \u56fa\u5b9a\u4e3a <code>verified</code> \u4e0e <code>peer-verification</code>\uff0c\u5e76\u643a\u5e26\u5171\u540c\u6765\u6e90\u95ed\u5305\u3001\u6bcf\u4e2a peer \u7684\u6807\u51c6 manifest \u548c mapping\u3002</p> <p>\u8fd9\u4e24\u4e2a\u5408\u540c\u53ea\u63cf\u8ff0\u4e1a\u52a1\u4e2d\u7acb\u7684\u53ea\u8bfb\u9a8c\u8bc1\uff0c\u4e0d\u62e5\u6709 canonical source\u3001\u76ee\u5f55\u5199\u5165\u3001\u8fc1\u79fb\u3001receipt\u3001\u91cd\u8bd5\u6216\u751f\u547d\u5468\u671f\u72b6\u6001\u3002 peer \u987a\u5e8f\u4e0d\u5f97\u6539\u53d8\u5171\u540c\u95ed\u5305\u6458\u8981\u6216\u7ed3\u8bba\uff1b\u672a\u77e5\u5b57\u6bb5\u3001\u91cd\u590d/\u7f3a\u5931/\u60ac\u7a7a mapping \u548c\u65e0\u6cd5\u7531\u771f\u5b9e\u76ee\u5f55\u8bc1\u660e\u7684\u8f93\u5165\u5fc5\u987b\u5931\u8d25\u5173\u95ed\u3002</p> <ul> <li><code>since</code> / <code>stability</code>\uff1a<code>0.10.0</code> / <code>stable</code>\u3002</li> <li>Schema \u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/schemas/adapter-peer-verification-request.schema.json</code>\u3001<code>adapter-peer-verification-result.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/peer-adapter.test.mjs</code>\u3001<code>packages/skill-family-engineering-kit/test/host.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1apeer \u7684 canonical \u9009\u62e9\u3001\u65e7 manifest \u8fc1\u79fb\u89e3\u91ca\u3001\u6d88\u8d39\u8005 smoke \u548c\u53d1\u5e03\u540e\u9a8c\u8bc1\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5408\u540c-foundationcontractshost-verification","title":"\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u5408\u540c (foundation.contracts.host-verification)","text":"<p>Contracts 1.11.0 \u767b\u8bb0 <code>host-verification-request</code> \u4e0e <code>host-verification-result</code>\u3002\u4e24\u4e2a Schema \u7684 <code>$id</code>\u3001 <code>operation=host-verification</code> \u548c\u56db\u6001\u7ed3\u679c\u8eab\u4efd\u4ece\u9996\u7248\u56fa\u5b9a\uff0c\u4f46\u8be5\u80fd\u529b\u5f53\u524d\u662f <code>candidate</code>\uff0c\u4e0d\u80fd\u636e\u6b64\u5ba3\u79f0\u5bbf\u4e3b\u3001\u9886\u57df\u7ed3\u679c\u6216\u53d1\u5e03\u5df2\u901a\u8fc7\u3002</p> <ul> <li>request \u628a\u5171\u540c\u5019\u9009\u7ed1\u5b9a\u4e0e\u6bcf\u5bbf\u4e3b binding \u5206\u5f00\uff1b\u6240\u6709 <code>*Sha256</code> \u4e0e <code>*ClosureDigest</code> \u5747\u4e3a 64 \u4f4d\u5c0f\u5199\u5341\u516d\u8fdb\u5236\u3002\u8c03\u7528\u65b9\u5fc5\u987b\u4ece\u79c1\u6709 roots \u4e25\u683c\u91cd\u7b97\u8fd9\u4e9b\u503c\uff0c\u4e0d\u80fd\u628a\u81ea\u62a5\u6458\u8981\u5f53\u4f5c\u8bc1\u660e\u3002<code>auth</code> \u56fa\u5b9a\u4e3a <code>existing-user-state + host-managed</code>\uff0c\u53ea\u8bf4\u660e\u590d\u7528\u7528\u6237\u73b0\u6709 \u767b\u5f55\u72b6\u6001\uff1b<code>execution.modelOverridePolicy</code> \u56fa\u5b9a\u4e3a <code>forbidden</code>\u3002</li> <li>result \u53ea\u5141\u8bb8 <code>observed</code>\u3001<code>rejected</code>\u3001<code>failed</code>\u3001<code>indeterminate</code>\u3002\u5b83\u4e0d\u542b credential\u3001\u7edd\u5bf9\u8def\u5f84\u3001\u73af\u5883\u53d8\u91cf\u3001Prompt\u3001\u539f\u59cb stream \u6216 durable receipt\uff1b<code>observed</code> \u53ea\u8868\u793a\u57fa\u7840\u8bbe\u65bd\u89c2\u5bdf\u5b8c\u6574\uff0c\u4e0d\u8868\u793a\u6d88\u8d39\u8005\u9886\u57df PASS\u3002<code>requiredActions</code> \u53ea\u5141\u8bb8 <code>manual-temporary-root-inspection-required</code>\u3002</li> <li>request auth \u5fc5\u987b\u7cbe\u786e\u5bf9\u5e94\u5df2\u767b\u8bb0 Descriptor \u7684\u5355\u503c <code>driverId/authStrategy/credentialMutation</code>\uff1bDescriptor \u662f\u8ba4\u8bc1\u7ec4\u5408\u7684 \u552f\u4e00\u4e8b\u5b9e\u6e90\u3002Schema \u5206\u522b\u7ed1\u5b9a <code>kimi-code \u2192 kimi-code-print-v1</code>\u3001<code>workbuddy \u2192 workbuddy-codebuddy-print-v1</code>\u3001 <code>codebuddy \u2192 codebuddy-print-v1</code>\u3001<code>claude \u2192 claude-code-print-v1</code>\u3001<code>codex \u2192 codex-exec-v1</code> \u4e0e <code>qoder \u2192 qodercli-print-v1</code>\uff0cCodeBuddy \u4e0e WorkBuddy \u7684\u8def\u7531\u4e0d\u53ef\u4e92\u6362\u3002 Schema \u4e0d\u63d0\u4f9b\u901a\u7528 driver Registry \u6216\u8ba4\u8bc1 SPI\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.11.0</code> / <code>candidate</code>\u3002Schema \u6587\u4ef6\uff1a <code>packages/skill-family-contracts/src/schemas/host-verification-request.schema.json</code>\u3001 <code>packages/skill-family-contracts/src/schemas/host-verification-result.schema.json</code>\u3002\u6b63\u53cd\u4f8b\uff1a <code>packages/skill-family-contracts/test/schemas.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1acandidate \u89e3\u5f15\u7528\u3001workload\u3001\u9886\u57df\u8f93\u51fa\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u3001\u9886\u57df PASS/FAIL \u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1\u5408\u540c-foundationcontractsplugin-verification","title":"\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1\u5408\u540c (foundation.contracts.plugin-verification)","text":"<p>Contracts 1.15.0 \u5728\u4fdd\u7559 <code>install-only</code> \u4e0e <code>install-and-invoke</code> \u4e24\u4e2a\u65e2\u6709 goal \u7684\u540c\u65f6\uff0c\u589e\u52a0 <code>native-lifecycle</code> \u5206\u652f\u3002request \u53ea\u63cf\u8ff0\u95ed\u5408\u7684\u5bbf\u4e3b\u3001\u6765\u6e90\u3001\u8ba4\u8bc1\u3001\u8f7d\u8377\u4e0e\u5de5\u4f5c\u8d1f\u8f7d\u6458\u8981\uff0c\u4e0d\u643a\u5e26 runner\u3001parser\u3001\u9884\u5236 observation \u6216\u81ea\u7531 <code>hostState</code>\u3002</p> <p>\u539f\u751f\u547d\u5468\u671f result \u7684 <code>facts.lifecycle.stages</code> \u6070\u597d\u6309\u4ee5\u4e0b\u987a\u5e8f\u5305\u542b\u5341\u4e8c\u9879\uff1a<code>preflight</code>\u3001<code>validate-v1</code>\u3001<code>marketplace-add</code>\u3001<code>install-v1</code>\u3001<code>discover-v1</code>\u3001<code>invoke-v1</code>\u3001<code>disable</code>\u3001<code>enable</code>\u3001<code>update-v2</code>\u3001<code>invoke-v2</code>\u3001<code>uninstall</code>\u3001<code>absent-after-uninstall</code>\u3002Contracts \u53ea\u68c0\u67e5\u95ed\u5b57\u6bb5\u3001\u9636\u6bb5\u987a\u5e8f\u3001\u5c40\u90e8\u7ed3\u6784\u4e0e\u505c\u6b62\u4f20\u64ad\uff1b\u9996\u4e2a\u975e <code>observed</code> \u9636\u6bb5\u4e4b\u540e\uff0c\u540e\u7eed\u9636\u6bb5\u53ea\u80fd\u4e3a <code>not-performed</code>\uff0c\u4e14 <code>commands</code> \u4e0e <code>trees</code> \u4e3a\u7a7a\u3002</p> <p>Schema \u4e0d\u56fa\u5b9a\u8de8\u5bbf\u4e3b\u7edf\u4e00\u547d\u4ee4\u6570\u6216 argv \u8ba1\u5212\uff0c\u4e0d\u6839\u636e command step\u3001\u9000\u51fa\u7801\u3001\u81ea\u7136\u8bed\u8a00\u6216 marker \u89e3\u91ca\u5382\u5546\u8bed\u4e49\uff0c\u4e5f\u4e0d\u62e5\u6709 Qoder/WorkBuddy Oracle\u3002\u6bcf\u4e2a\u5bbf\u4e3b\u7684\u547d\u4ee4\u8ba1\u5212\u3001tree evidence \u9009\u62e9\u4e0e raw stream \u5224\u5b9a\u7531 Engineering Kit \u7684\u4e13\u5c5e driver \u8d1f\u8d23\u3002</p> <ul> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u5408\u540c\u81ea <code>0.13.0</code> / <code>candidate</code>\uff1b<code>native-lifecycle</code> \u5206\u652f\u81ea <code>0.15.0</code>\u3002</li> <li>Schema \u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/schemas/plugin-verification-request.schema.json</code>\u3001<code>plugin-verification-result.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/foundation-015-contracts.test.mjs</code>\u3001<code>schemas.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6765\u6e90\u63a5\u53d7\u3001\u9886\u57df\u7ed3\u679c\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u3001\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1\u5408\u540c-foundationcontractsskill-family-directory-verification","title":"\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1\u5408\u540c (foundation.contracts.skill-family-directory-verification)","text":"<p>Contracts 1.15.0 \u767b\u8bb0 Kimi \u4e13\u7528\u7684 skill-family-directory request/result\u3002request \u7ed1\u5b9a <code>hostId=kimi-code</code>\u3001\u56fa\u5b9a driver/CLI \u8eab\u4efd\u3001\u6280\u80fd\u65cf\u6811\u6458\u8981\u3001\u9884\u671f\u6280\u80fd\u6765\u6e90\u6458\u8981\u4e0e\u5de5\u4f5c\u8d1f\u8f7d\u6458\u8981\uff1b\u5b83\u4e0d\u63a5\u6536 caller observation\u3001runner\u3001parser \u7ed3\u8bba\u6216 plugin lifecycle \u5b57\u6bb5\u3002</p> <p>result \u4fdd\u6301\u65e2\u6709\u56db\u6001\uff0c\u9010\u6280\u80fd\u4e8b\u5b9e\u53ea\u80fd\u660e\u786e\u5199\u4e3a <code>observed</code>\u3001<code>absent</code> \u6216 <code>unknown</code>\u3002\u7f3a\u5c11\u53ef\u9a8c\u8bc1\u7684\u5b98\u65b9 typed observation \u6620\u5c04\u65f6\uff0c\u5141\u8bb8 <code>status=indeterminate</code>\u3001<code>reason=official-observation-unavailable</code>\uff0c\u9010\u6280\u80fd discovery/load \u4e3a <code>unknown</code>\uff0ccall/result id \u4e3a <code>null</code>\u3002Schema \u4e0d\u4ece raw marker \u731c\u6d4b\u5382\u5546\u8bed\u4e49\u3002</p> <p>\u8fdb\u7a0b\u542f\u52a8\u3001\u56fa\u5b9a <code>--skills-dir</code> argv\u3001\u7a84\u73af\u5883\u3001\u539f\u59cb\u6d41\u6536\u96c6\u4e0e parser \u5c5e Engineering Kit\u3002Contracts \u53ea\u9a8c\u8bc1\u95ed\u5408\u7ed3\u6784\u548c\u5c40\u90e8\u4e00\u81f4\u6027\uff0c\u4e0d\u628a Foundation \u81ea\u6709\u53d7\u63a7 fixture \u534f\u8bae\u767b\u8bb0\u6210 Kimi \u5b98\u65b9 grammar\u3002</p> <ul> <li><code>since</code> / <code>stability</code>\uff1a<code>0.15.0</code> / <code>candidate</code>\u3002</li> <li>Schema \u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/schemas/skill-family-directory-verification-request.schema.json</code>\u3001<code>skill-family-directory-verification-result.schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/foundation-015-contracts.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6280\u80fd\u65cf\u6765\u6e90\u63a5\u53d7\u3001\u9886\u57df\u8f93\u51fa\u3001\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/contracts/#\u80fd\u529b\u6210\u719f\u5ea6\u4e0e\u5386\u53f2\u8fc1\u79fb\u653f\u7b56","title":"\u80fd\u529b\u6210\u719f\u5ea6\u4e0e\u5386\u53f2\u8fc1\u79fb\u653f\u7b56","text":"<p>\u5305\u6839\u5bfc\u51fa <code>CAPABILITY_MATURITY_LEVELS</code>\u3001<code>CANDIDATE_PROMOTION_POLICY</code>\u3001 <code>HISTORICAL_CANDIDATE_MIGRATION_POLICY</code>\uff0c\u4ee5\u53ca\u4e24\u4e2a\u8fd4\u56de\u7ed3\u6784\u5316\u526f\u672c\u7684 <code>describe*Policy()</code>\u3002\u5b83\u4eec\u4e0d\u8bfb\u53d6\u6587\u4ef6\u3001\u4e0d\u5199\u72b6\u6001\uff0c \u4e5f\u4e0d\u66ff\u6d88\u8d39\u8005\u6267\u884c\u8fc1\u79fb\u3002\u653f\u7b56\u56fa\u5b9a\u5386\u53f2\u5165\u53e3\u53ea\u8fc1\u79fb\u4e00\u6b21\uff1b\u65b0\u80fd\u529b\u91c7\u7528\u89c4\u8303\u8eab\u4efd\u540e\uff0ccandidate\u2192stable \u4e0d\u518d\u6539\u53d8\u6d88\u8d39\u8005\u5408\u540c\u3002 \u6d88\u8d39\u8005\u8981\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\u4ecd\u9700\u66f4\u65b0\u4e09\u5305\u7cbe\u786e pin\uff1b\u53d7\u7ba1\u6295\u5f71\u662f\u5426\u91cd\u5efa\u6cbf\u7528\u65e2\u6709\u7ed1\u5b9a\u8f93\u5165\u5408\u540c\u3002</p> <p><code>since</code> / <code>stability</code>\uff1a<code>0.10.0</code> / <code>stable</code>\u3002\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-contracts/src/stability.mjs</code>\u3002\u6b63\u53cd\u4f8b\u6d4b\u8bd5\uff1a <code>packages/skill-family-contracts/test/candidate-promotion-compatibility.test.mjs</code>\u3002</p>"},{"location":"reference/api/contracts/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u89c4\u8303\u5165\u53e3 <code>skill-family-contracts/quickstart-profile</code> \u5bfc\u51fa v2 \u534f\u8bae\u3001\u6309\u89c4\u8303 <code>$id</code> \u7d22\u5f15\u7684 Resource/Task/Result Schema \u96c6\u5408\uff0c \u4ee5\u53ca <code>validateQuickstartProfileDocument</code>\u3002\u5386\u53f2\u5165\u53e3 <code>skill-family-contracts/candidate/quickstart-profile</code> \u5728\u5f03\u7528\u7a97\u53e3\u5185\u89e3\u6790\u5230 \u540c\u4e00\u6a21\u5757\uff0c\u73b0\u6709\u6d88\u8d39\u8005\u5e94\u8fc1\u79fb\u4e00\u6b21\u3002\u552f\u4e00 operation \u662f\u4e1a\u52a1\u4e2d\u7acb\u7684 <code>execute-method</code>\uff1bFoundation \u4e0d\u767b\u8bb0 method \u8bcd\u8868\uff0c \u4e5f\u4e0d\u89e3\u91ca parameters\u3001evidence \u6216 domainResult \u7684\u9886\u57df\u542b\u4e49\u3002</p> <p>0.10.0 \u628a Quickstart \u516d\u4e2a\u5386\u53f2 Schema \u8eab\u4efd\u548c 0.9.0 \u7684\u4e24\u4e2a batch Schema \u8eab\u4efd\u4e00\u6b21\u8fc1\u79fb\u5230\u4e0d\u542b <code>/candidate/</code> \u7684\u89c4\u8303 <code>$id</code>\u3002<code>HISTORICAL_CANDIDATE_SCHEMA_ID_MIGRATIONS</code> \u56fa\u5b9a\u516b\u9879\u65e7 ID\u2192\u89c4\u8303 ID\uff1bloader \u53ea\u8fd4\u56de\u89c4\u8303 Schema\u3002Quickstart Bundle \u8ba9\u65e7\u65b0 ID \u6307\u5411\u540c\u4e00\u7f16\u8bd1 validator\uff0c\u4e0d\u590d\u5236 Schema\uff0c\u4e5f\u4e0d\u767b\u8bb0\u8fdb stable Registry\u3002\u4e24\u4e2a batch Schema \u4ecd\u53ea\u4f9b <code>validate-many-by-schema-id</code> \u4f7f\u7528\uff1b\u672a\u77e5 <code>schemaId</code> \u6216\u4efb\u4e00\u7ed3\u6784\u7578\u5f62\u90fd\u4f7f\u6574\u6279\u8bf7\u6c42\u5931\u8d25\u3002</p> <p>\u8be5\u80fd\u529b\u4ece <code>0.2.1</code> \u8d77\u516c\u5f00\uff0c\u7a33\u5b9a\u6027\u4ecd\u4e3a <code>candidate</code>\u30020.3.0 \u5df2\u7528 v2 \u66ff\u6362 v1\uff0c\u4e24\u8005\u4e0d\u517c\u5bb9\uff1a\u4ecd\u9700 v1 \u7684\u63a5\u5165\u7ee7\u7eed\u7cbe\u786e \u9501\u5b9a <code>0.2.1</code>\uff1bv2 \u65b0\u63a5\u5165\u5e94\u4f7f\u7528 0.10.0 \u89c4\u8303\u5165\u53e3\u5e76\u7cbe\u786e\u9501\u5b9a\u4e09\u5305\u3002candidate Schema \u4e0d\u8fdb\u5165\u7a33\u5b9a <code>src/registry.json</code>\u3002 \u4e3b\u52a8\u5347\u7ea7\u5019\u9009\u7248\u672c\u4ecd\u9700\u590d\u9a8c\uff1b\u4ee5\u540e\u4ec5\u664b\u5347 stable \u65f6\u4e0d\u518d\u5207\u5165\u53e3\u6216 Schema \u8eab\u4efd\u3002\u53d6\u5f97 stable \u53d1\u5e03\u627f\u8bfa\u4ecd\u9700\u66f4\u65b0\u4e09\u5305\u7cbe\u786e pin\u3002</p>"},{"location":"reference/api/contracts/#\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u5411\u91cf-Foundation-0140","title":"\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u5411\u91cf (Foundation 0.14.0)","text":"<p><code>listConsumerContractVectors({ capabilityId, foundationVersion, vectorSetId? })</code> \u8fd4\u56de\u6309 <code>vectorId</code> \u7684 Unicode \u7801\u70b9\u987a\u5e8f\u6392\u5217\u4e14\u6df1\u5ea6\u51bb\u7ed3\u7684\u516c\u5f00\u5411\u91cf\u3002<code>capabilityId</code> \u548c <code>foundationVersion</code> \u5fc5\u586b\uff1b\u672a\u627e\u5230\u5339\u914d\u5411\u91cf\u65f6\u8fd4\u56de\u7a7a\u6570\u7ec4\u3002</p> <p><code>verifyConsumerContractVector(vector, { capabilityId, foundationVersion, vectorSetId? })</code> \u53ea\u6838\u5bf9\u5411\u91cf\u8eab\u4efd\u3001\u7cbe\u786e\u7248\u672c\u548c\u516c\u5f00 request/expected \u7ed3\u6784\uff0c\u8fd4\u56de <code>{ vectorId, ok, expected, observed, mismatchCode }</code>\u3002\u8eab\u4efd\u6216\u7248\u672c\u4e0d\u5339\u914d\u65f6 <code>ok=false</code>\u3001<code>mismatchCode=SFC1013</code>\uff1b\u6821\u9a8c\u5668\u4e0d\u4f1a\u8c03\u7528\u6d88\u8d39\u65b9\u3001Harness\u3001\u6d4b\u8bd5\u66ff\u8eab\uff08<code>fake</code>\uff09\u6216\u5bbf\u4e3b\u3002</p> <p>0.14.0 \u63d0\u4f9b <code>foundation.contracts.object-validation.consumer-v1</code> \u4e0e <code>foundation.harness.atomic-write.consumer-v1</code> \u4e24\u7ec4\u5411\u91cf\u3002\u5411\u91cf\u58f0\u660e\u7684\u662f\u5408\u540c\u53ef\u89c2\u5bdf\u7ed3\u679c\uff1b \u539f\u5b50\u5199\u6b63\u4f8b\u7684 <code>valueRelation</code> \u7531 Harness \u4e0e\u6d88\u8d39\u65b9\u6d4b\u8bd5\u9a8c\u8bc1\uff0cContracts \u4e0d\u89e3\u91ca\u8be5\u5173\u7cfb\u3002</p>"},{"location":"reference/api/contracts/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID \u89c1 <code>docs/agents/capability-catalog.json</code>\uff08<code>foundation.contracts.*</code>\uff09\u3002</li> <li>\u673a\u68b0\u6821\u9a8c\uff1a<code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code>\uff0c\u62d2\u7edd\u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\uff1b<code>sourceRefs</code> \u4e0e\u6d4b\u8bd5\u5f15\u7528\u5747\u6307\u5411\u672c\u9875\u6240\u5217\u771f\u5b9e\u6587\u4ef6\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/","title":"skill-family-engineering-kit \u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u9875\u4ece\u771f\u5b9e\u5bfc\u51fa\uff08<code>src/index.mjs</code> \u4e0e\u5404\u6e90\u6a21\u5757\u3001CLI \u5165\u53e3\uff09\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684\u5168\u96c6\u3002\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 hand-off \u00a74.3 \u8bf4\u660e\uff1a\u7b7e\u540d\u3001\u8f93\u5165\u4e0e\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p> <p>Kit \u6d88\u8d39 Contracts \u4e0e Harness\uff0c\u53ea\u62e5\u6709\u56db\u4e2a\u9876\u5c42\u547d\u4ee4\u4e0e\u5b83\u4eec\u7684\u53ea\u8bfb/\u53d7\u63a7\u5199\u8fb9\u754c\u3002\u5305\u7ea7\u5e38\u91cf\uff1a<code>TOP_LEVEL_COMMANDS</code>\uff08\u51bb\u7ed3 4 \u4e2a\uff1a<code>scaffold</code> / <code>adopt-plan</code> / <code>projection</code> / <code>check</code>\uff09\u3001<code>FORBIDDEN_SIDE_EFFECTS</code>\u3001<code>COMMAND_SIDE_EFFECTS</code>\u3001<code>KIT_EXIT_CODES</code>\uff08<code>ok=0</code> / <code>findings=1</code> / <code>rejected=2</code>\uff09\u3002Kit \u6c38\u4e0d\u6267\u884c Git \u5199\u3001\u53d1\u5e03\u6216\u5220\u9664\u7528\u6237\u5185\u5bb9\u3002</p> <p>Foundation \u672c\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u4ecd\u53ef\u80fd\u8054\u7f51\u3002Foundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff1b\u9694\u79bb\u8d23\u4efb\u7531\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u627f\u62c5\u3002\u4ed3\u5185\u53d7\u63a7 fixture \u6309\u8bbe\u8ba1\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\u3002</p> <p>\u5916\u7f6e source authority \u4e0d\u589e\u52a0 Kit API\u3002\u8c03\u7528\u65b9\u5148\u7528 Contracts <code>parseSourceAuthorityReceipt(receipt, actualSubjects)</code> \u6838\u5bf9\u6536\u636e\uff0c\u518d\u628a\u6210\u529f\u7ed3\u679c\u4e2d\u7684 <code>sourceRepository</code> \u4e0e <code>sourceBaseCommit</code> \u4f20\u7ed9\u65e2\u6709 Quickstart builder\u3002Kit \u4e0d\u8bfb\u53d6\u79c1\u6709\u53d1\u5e03 plan\uff0c\u4e0d\u53d1\u73b0\u5b9e\u9645\u5305\uff0c\u4e5f\u4e0d\u7b7e\u53d1 receipt\u3002</p> <p>provider Profile descriptor \u4f7f\u7528 Contracts 1.16.0 \u65f6\uff0c\u987b\u628a\u81ea\u8eab\u7684 <code>base.contractsVersion</code> \u5b57\u6bb5\u66f4\u65b0\u4e3a <code>1.16.0</code>\u3002 Kit \u4ecd\u53ea\u6709\u56db\u4e2a\u9876\u5c42\u547d\u4ee4\uff1bQuickstart Bundle \u7ee7\u7eed\u662f candidate \u7cbe\u786e\u7248\u672c\uff0c\u5e76\u5728\u540c\u4e00 mechanisms CLI \u4e2d\u63d0\u4f9b\u6709\u5e8f <code>validate-many-by-schema-id</code>\u3002</p> <p>\u80fd\u529b\u5206\u7ec4\uff08\u4e0e <code>docs/agents/capability-catalog.json</code> \u5bf9\u5e94\uff09\uff1a</p> <ul> <li>scaffold \u2192 <code>scaffoldTarget</code> / <code>describeSkeletonReferenceImplementation</code></li> <li>adopt-plan \u2192 <code>planAdoption</code> / <code>evaluateMigrationCompletion</code> / \u6309\u9700\u542f\u7528\u7684\u5de5\u7a0b\u57fa\u7ebf\u7ed3\u6784\u6bd4\u8f83</li> <li>projection \u2192 <code>buildProjectionClosure</code> / <code>runProjection</code> / <code>loadProjectionManifest</code></li> <li>check \u2192 <code>runChecks</code> / <code>runCoreCheck</code></li> <li>report \u2192 <code>renderReportAction</code> / <code>checkReportAction</code></li> <li>git-probe \u2192 <code>probeGitState</code> / <code>probeGitFacts</code></li> <li>host \u2192 <code>describeHost</code> / <code>resolveHostId</code> / <code>probeHost</code> / <code>planHost</code> / <code>applyHostPlan</code> \u2026</li> <li>\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1 \u2192 <code>runPluginVerification</code></li> <li>\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1 \u2192 <code>runSkillFamilyDirectoryVerification</code></li> <li>\u663e\u5f0f\u8d44\u683c\u5165\u53e3 \u2192 <code>runQualification</code></li> <li>licensing \u2192 <code>loadLicensingProfile</code> / <code>generateLicenseContent</code> \u2026</li> <li>identity-check \u2192 <code>checkIdentityDrift</code> / <code>validateIdentityAgainstProfile</code></li> <li>CLI \u2192 <code>runCommand</code> / <code>cliMain</code></li> </ul>"},{"location":"reference/api/engineering-kit/#scaffold-foundationkitscaffold","title":"scaffold (foundation.kit.scaffold)","text":""},{"location":"reference/api/engineering-kit/#scaffoldTarget--describeSkeletonFiles--describeSkeletonReferenceImplementation--normalizeSkeletonInputs","title":"scaffoldTarget / describeSkeletonFiles / describeSkeletonReferenceImplementation / normalizeSkeletonInputs","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>scaffoldTarget({ root, projectId, projectName, profileId, licensingProfile, licensingVariant, licensingProfileData, profilesRoot, identityProjections, capabilities } = {})</code>\uff08async\uff09</li> <li><code>describeSkeletonFiles(inputs)</code>\uff08async\uff09</li> <li><code>describeSkeletonReferenceImplementation({ profile })</code>\uff08async\uff09</li> <li><code>normalizeSkeletonInputs({ projectId, projectName, profileId, licensingProfile, licensingVariant, rootBasename })</code></li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3001\u9aa8\u67b6\u9009\u9879\uff08<code>projectId</code> \u7b49\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u7cbe\u786e\u96c6\u5408\u7684\u6258\u7ba1\u9aa8\u67b6\u6587\u4ef6\uff08\u539f\u5b50 + \u8def\u5f84\u6536\u5bb9\uff09\u3002<code>scaffoldTarget()</code> \u7684\u7ed3\u679c\u53e6\u542b <code>referenceImplementation</code>\uff0c\u5b57\u6bb5\u56fa\u5b9a\u4e3a\u5f53\u524d <code>foundationVersion</code>\u3001\u6240\u9009 <code>profile</code> \u4e0e\u7531\u89c4\u8303\u6587\u4ef6\u6e05\u5355\u8ba1\u7b97\u7684 <code>skeletonDigest</code>\u3002\u8be5\u8eab\u4efd\u7528\u4e8e\u6bd4\u8f83\uff0c\u4e0d\u8868\u793a Audit \u5408\u89c4\uff0c\u4e5f\u4e0d\u8981\u6c42\u5b58\u91cf\u9879\u76ee\u9010\u5b57\u8282\u590d\u5236\u53c2\u8003\u9aa8\u67b6\u3002\u9aa8\u67b6\u542b\u4e24\u4e2a\u76ee\u6807\u4fa7\u624b\u5199\u79cd\u5b50\uff08<code>handwritten</code> \u7c7b\uff0cadopt \u6c38\u4e0d\u8986\u5199\uff09\uff1a<code>SOURCE-OF-TRUTH.md</code>\uff08\u552f\u4e00\u58f0\u660e\u70b9\u3001\u771f\u6e90\u6e05\u5355\u4e0e\u751f\u6210\u8c31\u7cfb\u3001\u8fd0\u884c\u4e0e\u8bc1\u636e\u76ee\u5f55\u7ea6\u5b9a\uff09\u4e0e <code>profile.json</code>\uff08<code>foundation_profile</code> / <code>foundation_pin</code> \u91c7\u7528\u5b57\u6bb5\u52a0\u53ea\u6536\u7d27\u65b9\u5411\u7684 overrides \u793a\u4f8b\uff09\uff1b<code>.gitignore</code> / <code>.projenrc.js</code> / file-registry \u4e09\u5904\u540c\u6b65\u643a\u5e26\u6839\u7ea7\u552f\u4e00\u5ffd\u7565\u57fa\u7ebf <code>/site/</code>\u3001<code>/.qoder/</code>\u3001<code>/.artifacts/</code>\u3001<code>/.runs/</code>\u3001<code>/.evidence/</code>\uff08\u5d4c\u5957\u540c\u540d\u76ee\u5f55\u4e0d\u88ab\u5ffd\u7565\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>normalizeSkeletonInputs</code> \u662f\uff1b<code>describeSkeletonReferenceImplementation</code> \u53ea\u8bfb\u53d6\u5305\u5185\u8bb8\u53ef\u8bc1 Profile \u5e76\u786e\u5b9a\u6027\u8ba1\u7b97\u8eab\u4efd\uff1b<code>scaffoldTarget</code> \u843d\u76d8\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u76ee\u6807\u521b\u5efa\u6587\u4ef6\uff08\u539f\u5b50 + \u6536\u5bb9\uff09\uff1b\u76ee\u6807\u975e\u7a7a\u5219\u62d2\u7edd\u3001\u4e0d\u8986\u76d6\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u6cd5 kebab <code>projectId</code> / \u975e\u7a7a\u76ee\u6807\u629b <code>KitError</code>\uff08<code>KIT_ERROR_KINDS</code> \u7684 <code>invalid-params</code> / <code>rejected</code>\uff09\uff1b\u975e\u6cd5\u53c2\u6570 <code>+ INVALID_PARAMS</code>\uff08<code>SFC2003</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u76ee\u6807\u4e3a\u53ef\u5199\u7a7a\u76ee\u5f55\uff1bNode &gt;= 22.22.2\uff1b\u9aa8\u67b6\u96c6\u5408\u4e0e <code>scaffold-conformance</code> fixture \u4e00\u81f4\uff0833 \u4e2a\u8ba1\u5212\u6587\u4ef6\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u9aa8\u67b6\u5165\u53e3\u81ea <code>0.2.0</code> / <code>stable</code>\uff1b<code>describeSkeletonReferenceImplementation</code> \u4e0e scaffold \u7ed3\u679c\u4e2d\u7684\u53c2\u8003\u8eab\u4efd\u81ea <code>0.17.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/scaffold.mjs</code>\u3001<code>skeleton.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/scaffold.test.mjs</code>\u3001<code>skeleton-contract.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e1a\u52a1\u9879\u76ee\u5185\u5bb9\uff08\u5b58\u91cf\u4ed3\u6539\u7528 <code>adopt-plan</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#adopt-plan-foundationkitadopt-plan","title":"adopt-plan (foundation.kit.adopt-plan)","text":""},{"location":"reference/api/engineering-kit/#planAdoption--buildProfileDraft--evaluateMigrationCompletion--validateException--assessLegacyExitList--findNestedRepositories","title":"planAdoption / buildProfileDraft / evaluateMigrationCompletion / validateException / assessLegacyExitList / findNestedRepositories","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>planAdoption({ root, manifest, engineeringBaseline, compareSkeleton, ... } = {})</code>\uff08async\uff09</li> <li><code>buildProfileDraft({ inputs, migrationManifest, writeSet, entries })</code></li> <li><code>evaluateMigrationCompletion({ ... })</code></li> <li><code>validateException(exception, index, nowMs)</code></li> <li><code>assessLegacyExitList(root, legacyItems)</code>\uff08async\uff09</li> <li><code>findNestedRepositories(entries)</code></li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3001\u8fc1\u79fb\u6e05\u5355\u8def\u5f84\u3002\u5de5\u7a0b\u57fa\u7ebf\u6bd4\u8f83\u662f\u6309\u9700\u529f\u80fd\uff1b\u5e93\u8c03\u7528\u5fc5\u987b\u540c\u65f6\u4f20\u5165\u5df2\u9a8c\u8bc1\u7684 <code>engineeringBaseline</code> \u4e0e <code>compareSkeleton: true</code>\uff0cCLI \u5fc5\u987b\u6210\u5bf9\u4f7f\u7528 <code>--engineering-baseline &lt;relative-json-path&gt;</code> \u4e0e <code>--compare-skeleton</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u9ed8\u8ba4\u4ecd\u8fd4\u56de\u91c7\u7528\u5206\u7c7b\uff08<code>direct-adoption</code> / <code>compatibility-layer</code> / <code>keep-business</code> / <code>foundation-gap</code>\uff09\u3001\u5b8c\u6210\u5224\u5b9a\u3001profile \u8349\u7a3f\uff08kind=<code>skill-family.profile-draft</code>\uff1a\u9884\u586b D-8 \u6700\u5c0f\u91c7\u7528\u58f0\u660e + \u7a7a overrides \u793a\u4f8b\uff0c\u4ec5\u8f93\u51fa\uff0c\u4e0d\u843d\u76d8\uff1badoption-lock \u5f62\u6001\u5df2\u5e9f\u5f03\uff09\u3002\u663e\u5f0f\u542f\u7528\u6bd4\u8f83\u65f6\u624d\u589e\u52a0 <code>engineeringBaselineComparison</code>\uff1a\u5b83\u5305\u542b\u57fa\u7ebf\u8eab\u4efd\u3001Foundation \u53c2\u8003\u8eab\u4efd\uff0c\u4ee5\u53ca\u53c2\u8003\u4fa7\u72ec\u6709\u3001\u76ee\u6807\u4fa7\u72ec\u6709\u3001\u6761\u76ee\u7c7b\u578b\u548c\u6587\u4ef6\u7c7b\u522b\u56db\u7c7b\u7ed3\u6784\u5dee\u5f02\uff1b\u4e0d\u8f93\u51fa\u5408\u89c4\u3001\u7b49\u4ef7\u3001\u4e25\u91cd\u7a0b\u5ea6\u3001finding\u3001action\u3001waiver \u6216 exemption \u7ed3\u8bba\uff0c\u4e5f\u4e0d\u8fd4\u56de\u89c4\u5219\u6b63\u6587\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5206\u7c7b\u4e0e\u8bc4\u4f30\u51fd\u6570\u4e3a\u7eaf\u51fd\u6570\uff1b<code>planAdoption</code> \u542b\u53ea\u8bfb\u63a2\u6d4b\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u4e25\u683c\u53ea\u8bfb\u2014\u2014\u4e0d\u5199\u6587\u4ef6\uff08\u4e34\u65f6\u6587\u4ef6\u4e5f\u4e0d\u5199\uff09\u3001\u4e0d Git \u5199\u3001\u4e0d rename\u3001\u4e0d\u89e6\u7f51\uff1b\u9ed8\u8ba4\u53ef\u80fd\u542f\u52a8\u4e00\u6761\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb Git \u63a2\u6d4b\uff0c\u4f20\u5165 <code>allowGitSpawn: false</code> \u53ef\u5173\u95ed\u8be5\u5b50\u8fdb\u7a0b\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u4f8b\u5916\u7f3a\u5b57\u6bb5 / \u672a\u9000\u51fa\u65e7\u5b9e\u73b0\u5219\u5b8c\u6210\u5224\u5b9a <code>false</code>\uff1b\u65e0\u6548\u6216\u672a\u6210\u5bf9\u7684\u6bd4\u8f83\u53c2\u6570\u4f7f\u7528 <code>SFC2003</code>\uff0c\u65e0\u6548\u57fa\u7ebf\u5408\u540c\u4f7f\u7528 <code>SFC1001</code>\uff0c\u57fa\u7ebf\u4e2d\u7684 Foundation \u7248\u672c\u6216\u53c2\u8003\u9aa8\u67b6\u6458\u8981\u4e0e\u5f53\u524d Kit \u4e0d\u4e00\u81f4\u65f6\u4f7f\u7528 <code>SFC1013</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u76ee\u6807\u4ed3\u5b58\u5728\u4e14\u53ef\u53ea\u8bfb\u8bbf\u95ee\uff1b<code>MIGRATION_MANIFEST_PATH</code> / <code>MIGRATION_MANIFEST_SCHEMA_ID</code> \u6307\u5411\u5951\u7ea6\u3002\u6bd4\u8f83\u524d\u7531 Contracts \u9a8c\u8bc1\u57fa\u7ebf\uff0cKit \u53ea\u63a5\u53d7\u7ed1\u5b9a\u5f53\u524d Foundation \u7248\u672c\u4e0e\u53c2\u8003\u9aa8\u67b6\u6458\u8981\u7684\u6587\u6863\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u91c7\u7528\u89c4\u5212\u81ea <code>0.2.0</code> / <code>stable</code>\uff1b\u5de5\u7a0b\u57fa\u7ebf\u7ed3\u6784\u6bd4\u8f83\u81ea <code>0.17.0</code> / <code>stable</code>\uff0c\u9ed8\u8ba4\u5173\u95ed\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/adopt-plan.mjs</code>\u3001<code>migration.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/adopt-plan.test.mjs</code>\u3001<code>migration.test.mjs</code>\u3001<code>engineering-baseline-adopt-plan.test.mjs</code>\u3001<code>cli.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5b58\u91cf\u4e1a\u52a1\u4ee3\u7801\u7684\u8fc1\u79fb\u51b3\u7b56\uff08\u771f\u6b63\u8fc1\u79fb\u6267\u884c\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#projection-foundationkitprojection","title":"projection (foundation.kit.projection)","text":""},{"location":"reference/api/engineering-kit/#runProjection--loadProjectionManifest","title":"runProjection / loadProjectionManifest","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runProjection({ root, manifest: manifestRelPath } = {})</code>\uff08async\uff09</li> <li><code>loadProjectionManifest(rootAbs, manifestRelPath)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u6295\u5f71\u6e05\u5355\u3001\u76ee\u6807\u6839\u3002</li> <li>\u8f93\u51fa\uff1a\u6295\u5f71\u6587\u4ef6\uff08\u4ec5\u5728\u6821\u9a8c\u5168\u90e8\u901a\u8fc7\u65f6\u5199\u5165\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>loadProjectionManifest</code> \u662f\uff1b<code>runProjection</code> \u4e24\u9636\u6bb5\uff08\u5168\u6821\u9a8c\u540e\u624d\u5199\uff0c\u5931\u8d25\u56de\u6eda\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u6295\u5f71\u6587\u4ef6\uff1b\u4e0d\u8986\u76d6 handwritten \u6587\u4ef6\uff1b\u4efb\u4e00\u6821\u9a8c\u5931\u8d25\u96f6\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u672a\u6388\u6743 / \u624b\u5199\u51b2\u7a81 / \u8d8a\u754c / \u5185\u5bb9\u51b2\u7a81\u629b <code>KitError</code>\uff08<code>rejected</code> / <code>unauthorized</code> \u7c7b <code>kind</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u6295\u5f71\u6e05\u5355\u5df2\u767b\u8bb0\uff08<code>PROJECTION_MANIFEST_PATH</code>\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/projection.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/projection.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6295\u5f71\u5185\u5bb9\u7684\u4e1a\u52a1\u542b\u4e49\uff08\u8fdc\u7aef\u53d1\u5e03\u8f6c <code>release-skill</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#buildProjectionClosure","title":"buildProjectionClosure","text":"<ul> <li>\u7b7e\u540d\uff1a<code>buildProjectionClosure(resources)</code></li> <li>\u8f93\u5165\uff1a\u8d44\u6e90\u6570\u7ec4\uff0c\u6210\u5458\u4e3a <code>{path, sha256, mode}</code>\uff08\u663e\u5f0f <code>type: \"file\"</code> \u88ab\u5bb9\u5fcd\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u89c4\u8303\u6295\u5f71\u95ed\u5305 <code>{digestAlgorithm: \"sha256\", digest, resourceCount, resources}</code>\uff08\u6210\u5458\u89c4\u8303\u5316\u4e3a <code>{path, type: \"file\", sha256, mode}</code>\uff0c\u6309 path \u786e\u5b9a\u6027\u6392\u5e8f\uff0c<code>digest = sha256(JSON.stringify(resources))</code>\uff09\uff0c\u53ef\u539f\u6837\u4f5c\u4e3a <code>compileProjectionPlan()</code> \u7684 <code>previousOwnedClosure</code> \u6216 <code>externalCandidateClosure</code>\uff1b\u7a7a\u6570\u7ec4\u662f\u5408\u6cd5\u7a7a\u95ed\u5305\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u65e0\u6587\u4ef6\u8bfb\u5199\u3001\u65e0\u7f51\u7edc\u3001\u65e0\u5b50\u8fdb\u7a0b\uff1b\u5165\u53c2\u4e0d\u88ab\u6539\u5199\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u6570\u7ec4\u8f93\u5165\u3001\u91cd\u590d\u8def\u5f84\u3001\u53ef\u79fb\u690d\u8def\u5f84\u78b0\u649e\u3001\u975e\u6cd5 path/type/sha256/mode \u5728\u65e2\u6709 <code>projection plan input invalid</code> \u9519\u8bef\u57df\u5185\u5931\u8d25\u5173\u95ed\uff08<code>SFC2004</code>\uff0c<code>details.kind</code> \u4e3a <code>invalid-manifest</code>\uff09\u3002</li> <li>\u8fb9\u754c\uff1a\u672c\u51fd\u6570\u6784\u9020\u7684\u662f\u6295\u5f71/\u8ba1\u5212\u95ed\u5305\uff0c\u4e0e Harness <code>computeResourceClosure()</code> \u7684\u8d44\u6e90\u95ed\u5305\uff08\u6210\u5458 <code>{path, role, exists, sha256}</code>\u3001\u6574\u4f53\u4fe1\u5c01\u6458\u8981\uff09\u5f62\u72b6\u4e0e\u7528\u9014\u4e0d\u540c\uff0c\u4e24\u8005\u4e0d\u53ef\u4e92\u6362\uff1b\u4e0e <code>normalizePlanClosure()</code>\u3001\u5019\u9009\u679a\u4e3e\u95ed\u5305\u5171\u4eab\u540c\u4e00\u89c4\u8303\u5316\u4e0e\u6458\u8981\u4e8b\u5b9e\u6e90\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u65e0\uff1b\u7ed3\u679c\u76f4\u63a5\u6ee1\u8db3 <code>compileProjectionPlan()</code> \u7684\u95ed\u5305\u5408\u540c\uff0c\u4e0d\u65b0\u589e\u7b2c\u4e8c\u4e2a\u7f16\u8bd1\u5165\u53e3\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.7.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/projection.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/projection-closure-builder.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6295\u5f71\u5185\u5bb9\u7684\u4e1a\u52a1\u542b\u4e49\u4e0e\u8d44\u6e90\u5b57\u8282\u7684\u6765\u6e90\u8bc1\u660e\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#check-foundationkitcheck","title":"check (foundation.kit.check)","text":""},{"location":"reference/api/engineering-kit/#runChecks--runCoreCheck--isContainedDeclaration","title":"runChecks / runCoreCheck / isContainedDeclaration","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runChecks({ root, allowGitSpawn = true, only, profilesRoot } = {})</code>\uff08async\uff09</li> <li><code>runCoreCheck({ root, allowGitSpawn = true, profilesRoot } = {})</code>\uff08async\uff09</li> <li><code>isContainedDeclaration(rel)</code></li> <li>\u8f93\u5165\uff1a<code>--only</code> \u53d6\u503c <code>contracts|drift|closure|version|docs|git|identity|boundary|platform</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u53d1\u73b0\u6e05\u5355\uff1b\u9000\u51fa\u7801 <code>findings=1</code>\uff08\u6709\u53d1\u73b0\uff09\u3001<code>mechanism=2</code>\uff08\u67d0\u7c7b\u68c0\u67e5\u65e0\u6cd5\u5b8c\u6210\uff09\u3001<code>ok=0</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\u4e0e\u53ea\u8bfb Git \u72b6\u6001\uff09\uff1b\u4f46\u53ea\u8bca\u65ad\u3001\u4e0d\u4fee\u590d\u3001\u4e0d\u5199\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6\u5199\u5165\uff1b\u9ed8\u8ba4\u53ef\u80fd\u542f\u52a8\u4e00\u6761\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb Git \u63a2\u6d4b\uff08\u81f3\u591a\u4e00\u6b21\u51bb\u7ed3 <code>status</code> \u67e5\u8be2\uff09\uff0c\u4f20\u5165 <code>allowGitSpawn: false</code> \u53ef\u5173\u95ed\u8be5\u5b50\u8fdb\u7a0b\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>CHECK_CLASSES</code> \u4e3a\u4e5d\u7c7b\u95ed\u96c6\uff0c\u4e0d\u6269\u5f20\uff08\u5ba1\u8ba1\u6574\u6539 C2 \u4f9d\u88c1\u51b3 SG-13/14\u3001SG-17\u3001SFA-PLAT-002 \u589e\u8bbe <code>boundary</code>\u3001<code>platform</code> \u4e24\u7c7b\uff0c\u5e76\u4e3a <code>version</code> \u7c7b\u52a0\u88c5\u7248\u672c\u5355\u6e90\u4e00\u81f4\u6027\u4e8b\u5b9e\uff1b\u6269\u7c7b\u7ecf\u6cbb\u7406\u6279\u51c6\uff0c\u6b64\u540e\u4ecd\u4e0d\u6269\u5f20\uff09\uff1b\u673a\u5236\u5931\u8d25\u629b <code>KitError</code>\uff08<code>mechanism</code> \u7c7b\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>GIT_READ_ONLY_ALLOWLIST</code> \u9650\u5b9a\u53ef\u8c03\u7528\u5b50\u547d\u4ee4\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/check.mjs</code>\u3001<code>core-check.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/check.test.mjs</code>\u3001<code>core-check.test.mjs</code>\u3001<code>check-equivalence.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u53d1\u73b0\u9879\u7684\u4e1a\u52a1\u5904\u7f6e\uff08\u81ea\u52a8\u4fee\u590d\u6267\u884c\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#report-foundationkitreport","title":"report (foundation.kit.report)","text":""},{"location":"reference/api/engineering-kit/#renderReportAction--checkReportAction","title":"renderReportAction / checkReportAction","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>renderReportAction(options = {})</code>\uff08async\uff09</li> <li><code>checkReportAction(options = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a<code>report-model</code>\u3001<code>--out</code> / <code>--binding</code> \u9009\u9879\u3002</li> <li>\u8f93\u51fa\uff1aMarkdown \u6587\u672c\uff1b\u663e\u5f0f <code>--out</code> / <code>--binding</code> \u624d\u843d\u76d8\uff0c\u5426\u5219\u53ea\u5199 stdout\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u9ed8\u8ba4\u53ea\u5199 stdout\uff1b\u663e\u5f0f\u9009\u9879\u624d\u5199\u53d7\u6536\u5bb9\u6587\u4ef6\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u9ed8\u8ba4\u65e0\u6587\u4ef6\u5199\u5165\uff1b\u663e\u5f0f <code>--out</code> / <code>--binding</code> \u624d\u5199\u53d7\u6536\u5bb9\u6587\u4ef6\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u786c\u5931\u8d25\u8ba1\u4e3a\u53d1\u73b0\uff1b\u975e\u6cd5\u53c2\u6570 <code>reject</code>\uff08<code>invalid-params</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5df2\u5b58\u5728 Harness <code>report-model</code>\uff1b\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u786e\u5b9a\u6027\u6e32\u67d3\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/report.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/report.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u62a5\u544a\u7ed3\u8bba\u89e3\u8bfb\uff08\u673a\u5236\u5728 Harness <code>report</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#git-probe-foundationkitgit-probe","title":"git-probe (foundation.kit.git-probe)","text":""},{"location":"reference/api/engineering-kit/#probeGitState--probeGitFacts","title":"probeGitState / probeGitFacts","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>probeGitState(root, { allowSpawn = true } = {})</code>\uff08async\uff09</li> <li><code>probeGitFacts(root, candidatePaths, { allowSpawn = true } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3002</li> <li>\u8f93\u51fa\uff1aGit \u72b6\u6001\u4e0e\u4e8b\u5b9e\uff08\u53ea\u8bfb\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8c03\u7528 <code>git</code> \u53ea\u8bfb\u5b50\u547d\u4ee4\uff09\uff1b\u4e0d\u542b\u4efb\u4f55\u5199\u64cd\u4f5c\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u8c03\u7528 <code>git status</code> / <code>ls-files</code> / <code>check-ignore</code>\uff1b\u9ed8\u8ba4\u5141\u8bb8\u542f\u52a8\u51bb\u7ed3\u53c2\u6570\u7684\u53ea\u8bfb\u5b50\u8fdb\u7a0b\uff0c<code>allowSpawn: false</code> \u53ef\u5173\u95ed\uff1b\u53c2\u6570\u5411\u91cf\u51bb\u7ed3\u4e8e <code>GIT_STATUS_ARGS</code> / <code>GIT_LS_FILES_ARGS</code> / <code>GIT_CHECK_IGNORE_ARGS</code>\uff0c\u4e0d\u5728\u767d\u540d\u5355\u5373\u62d2\u7edd\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u767d\u540d\u5355\u53c2\u6570\u5411\u91cf\u629b <code>KitError</code>\uff08<code>unauthorized-git</code> \u7c7b\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>GIT_READ_ONLY_ALLOWLIST</code> \u9650\u5b9a\u53ef\u8c03\u7528\u5b50\u547d\u4ee4\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/gitprobe.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/git-probe.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1aGit \u5199\u64cd\u4f5c\u6388\u6743\uff08Git \u5199\u5f52 Git \u751f\u547d\u5468\u671f\u6307\u5357\uff0cFoundation \u4e0d\u62e5\u6709\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#host-foundationkithost","title":"host (foundation.kit.host)","text":""},{"location":"reference/api/engineering-kit/#bundledHostProfilesRoot--describeHost--resolveHostId--loadHostRegistry--probeHost--buildHostAdapter--verifyHostPeers--runHostVerification--verifyHostVerificationBindings--materializeHostBuild--planHost--assertPlanConsistency--applyHostPlan--probeTrustedVersionDriver","title":"bundledHostProfilesRoot / describeHost / resolveHostId / loadHostRegistry / probeHost / buildHostAdapter / verifyHostPeers / runHostVerification / verifyHostVerificationBindings / materializeHostBuild / planHost / assertPlanConsistency / applyHostPlan / probeTrustedVersionDriver","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff1b<code>bundledHostProfilesRoot</code> \u4e0e <code>assertPlanConsistency</code> \u4e3a\u540c\u6b65\u51fd\u6570\uff0c\u5176\u4f59\u5165\u53e3\u6309\u4e0b\u5217 async \u5408\u540c\u6267\u884c\uff09\uff1a</li> <li><code>bundledHostProfilesRoot()</code>\uff1a\u8fd4\u56de Engineering Kit \u5b89\u88c5\u5305\u5185\u5bbf\u4e3b Profile \u95ed\u5305\u7684\u89c4\u8303\u7edd\u5bf9\u8def\u5f84\u3002</li> <li><code>describeHost({ hostId, hostsRoot, registry } = {})</code></li> <li><code>resolveHostId({ hostId, hostsRoot, registry } = {})</code>\uff08async\uff09\uff1a\u8bfb\u53d6\u5df2\u767b\u8bb0\u7684\u6709\u9650 Profile \u96c6\u5408\uff0c\u89e3\u6790 canonical <code>hostId</code> \u4e0e <code>sourceAliases</code>\uff1b\u4e0d\u8bfb\u53d6\u6216\u5199\u5165\u5168\u5c40\u522b\u540d\u8868\u3002</li> <li><code>loadHostRegistry({ hostsRoot, registry } = {})</code></li> <li><code>probeHost({ hostId, hostsRoot, registry, executable, allowSpawn = false, timeoutMs = 5000, runner } = {})</code></li> <li><code>buildHostAdapter({ hostId, pathCategoryId, input, hostsRoot, registry } = {})</code></li> <li><code>verifyHostPeers({ request, peerRoots, hostsRoot, registry } = {})</code>\uff08async\uff09\uff1a<code>hostsRoot</code> \u4e3a\u5fc5\u9700\u7684 Profile \u8bc1\u660e\u6839\uff0c<code>registry</code> \u53ef\u9009\uff1bnpm \u6d88\u8d39\u8005\u53ef\u4ee5\u663e\u5f0f\u4f20 <code>bundledHostProfilesRoot()</code>\uff0c\u8584\u5305\u88c5 Harness \u7684\u540c\u7ea7\u9002\u914d\u5668\u53ea\u8bfb\u9a8c\u8bc1\uff0c\u4e0d\u5199\u5165\u76ee\u5f55\u3002</li> <li><code>runHostVerification({ request, bindings, hostsRoot } = {})</code>\uff08async\uff09\uff1a\u6309\u5df2\u767b\u8bb0\u7684\u5c01\u95ed\u5185\u7f6e driver \u8868\uff08<code>kimi-code-print-v1</code>\u3001<code>workbuddy-codebuddy-print-v1</code>\u3001<code>codebuddy-print-v1</code>\u3001<code>claude-code-print-v1</code>\u3001<code>codex-exec-v1</code>\u3001<code>qodercli-print-v1</code>\uff0c\u5747\u7ed1\u5b9a <code>existing-user-state + host-managed</code>\uff09\u6267\u884c\u4e00\u6b21\u53d7\u7ea6\u675f\u8c03\u7528\u3002\u8bf7\u6c42\u3001\u5019\u9009\u3001fixture\u3001workspace\u3001\u73b0\u6709\u7528\u6237\u72b6\u6001\u6839\u548c\u4e34\u65f6\u6839\u5747\u7531\u8c03\u7528\u65b9\u7ed1\u5b9a\uff1b\u516c\u5171\u7ed3\u679c\u53ea\u8fd4\u56de\u8131\u654f\u7684\u9010\u5bbf\u4e3b\u4e8b\u5b9e\u3002</li> <li><code>verifyHostVerificationBindings({ results, expectedCommon, expectedRequestDigestByHost } = {})</code>\uff1a\u53ea\u7ec4\u5408\u5df2\u9a8c\u8bc1\u7684 <code>observed</code> \u7ed3\u679c\uff0c\u8981\u6c42\u5171\u540c\u5b57\u6bb5\u548c\u9010\u5bbf\u4e3b request digest \u7cbe\u786e\u5339\u914d\uff1b\u4e0d\u540c\u5bbf\u4e3b\u7684 driver\u3001\u5b89\u88c5\u3001Prompt \u548c\u53ef\u6267\u884c\u6587\u4ef6\u4e8b\u5b9e\u4fdd\u6301\u72ec\u7acb\u3002</li> <li><code>materializeHostBuild(options)</code></li> <li><code>planHost({ hostId, pathCategoryId, buildManifest, probeFacts, operation = \"install\", previousMembers = [], hostsRoot, registry } = {})</code></li> <li><code>assertPlanConsistency(planInput)</code></li> <li><code>applyHostPlan({ plan, build, targetRoot, authorizationRef } = {})</code>\uff1a\u590d\u7528 Harness \u7684\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6\u3001\u4e25\u683c\u4e0d\u66ff\u6362\u53d1\u5e03\u548c\u539f\u5b50\u66ff\u6362\uff1b\u5378\u8f7d\u59cb\u7ec8\u8fd4\u56de <code>manual-recovery-required</code>\uff0c\u4e0d\u5220\u9664\u6587\u4ef6\u3002</li> <li><code>probeTrustedVersionDriver({ hostId, driverId, capabilities = CAPABILITIES, executable, allowSpawn = false, timeoutMs = 5000, runner } = {})</code></li> <li>\u8f93\u5165\uff1a\u5bbf\u4e3b\u6807\u8bc6\u3001\u6709\u9650 Profile\u3001probe/plan \u9009\u9879\uff1b\u66f4\u65b0\u548c\u5378\u8f7d\u8ba1\u5212\u5fc5\u987b\u643a\u5e26\u5df2\u62e5\u6709\u6210\u5458\u7684\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u5bbf\u4e3b\u63cf\u8ff0\u3001canonical \u8eab\u4efd\u3001\u9010\u9879\u72ec\u7acb\u7684\u4e5d\u7c7b probe fact\u3001\u6784\u5efa\u4ea7\u7269\u3001plan \u6216\u672c\u5730\u64cd\u4f5c\u7ed3\u679c\u3002<code>runHostVerification()</code> \u76f4\u63a5\u8fd4\u56de Contracts \u6821\u9a8c\u540e\u7684\u9010\u5bbf\u4e3b\u56db\u6001 result\uff1b<code>verifyHostVerificationBindings()</code> \u6210\u529f\u65f6\u4e25\u683c\u8fd4\u56de <code>{ status: \"bound\" }</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u53ea\u6709 <code>assertPlanConsistency</code> \u662f\uff1b<code>resolveHostId</code> \u901a\u8fc7\u53d7\u6536\u5bb9\u7684\u53ea\u8bfb I/O \u8bfb\u53d6 Profile\uff0c\u4e0d\u80fd\u5f53\u4f5c\u7eaf\u51fd\u6570\u3002\u5176\u4f59\u5165\u53e3\u6309\u804c\u8d23\u542b\u843d\u76d8\u6216\u8fdb\u7a0b\u8c03\u7528\u3002</li> <li>\u526f\u4f5c\u7528\uff1a<code>resolveHostId</code> / <code>verifyHostPeers</code> \u53ea\u8bfb\uff1b<code>build</code> / <code>materialize</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u4ea7\u7269\uff1b<code>probe</code> \u9ed8\u8ba4 <code>allowSpawn=false</code>\uff0c\u4e0d\u53d6 PATH\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u53ea\u5728\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 fresh \u79c1\u6709\u6839\u5185\u5199\u539f\u59cb\u8bc1\u636e\uff1b\u516c\u5171 result \u4e0d\u843d\u76d8\u4e3a Foundation receipt\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u7f3a probe facts \u629b <code>KitError</code>\uff08<code>missing-probe-facts</code>\uff09\uff1b\u5199\u5165\u5931\u8d25\u6309 Harness \u7684 <code>publicationState</code> \u8fd4\u56de <code>partially_applied</code> \u6216 <code>indeterminate</code>\u3002<code>HOST_DRIVER_IDS</code> \u4ec5\u4e24\u4e2a\u53d7\u4fe1\u7248\u672c driver\uff08<code>claude-version-v1</code> / <code>codex-version-v1</code>\uff09\uff1b<code>manual</code> \u5bbf\u4e3b\uff08\u542b Qoder\uff09\u7531 <code>probeHost</code> \u751f\u6210\u4e5d\u9879 <code>driver-limited</code> \u4e8b\u5b9e\u3001\u7531 <code>planHost</code> \u8fd4\u56de <code>manual</code> \u8ba1\u5212\uff0c\u4e0d\u6388\u4e88\u751f\u547d\u5468\u671f\u80fd\u529b\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5bbf\u4e3b Profile \u5df2\u5728 <code>profiles/hosts</code> \u767b\u8bb0\uff0c\u5e76\u7531 synth \u6295\u5f71\u8fdb Kit \u7684 <code>data/hosts</code>\uff1b\u522b\u540d\u5fc5\u987b\u6765\u81ea\u8be5\u6709\u9650\u96c6\u5408\uff1b\u53d7\u4fe1 driver \u9650\u5b9a\uff1b<code>applyHostPlan</code> \u8981\u6c42\u663e\u5f0f <code>authorizationRef</code>\u3001\u5df2\u9a8c\u8bc1 build \u4e0e\u76ee\u6807\u6839\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u8fd8\u8981\u6c42\u663e\u5f0f <code>hostsRoot</code>\u3001\u53d7 Descriptor \u7ea6\u675f\u7684\u516d\u4e2a\u5c01\u95ed\u5185\u7f6e driver\u3001canonical \u7684 <code>existingUserStateRoot</code>\uff08\u53ea\u8bfb\u6839\u53ef\u4f4d\u4e8e\u5176\u4e0b\uff1b\u4e0d\u5f97\u7b49\u4e8e\u6216\u4f4d\u4e8e output\u3001temporary\u3001private evidence\u3001\u5b89\u88c5\u76ee\u6807\u3001WorkBuddy config root \u6216 Qoder fresh workspace \u5185\u90e8\uff09\uff0c\u4ee5\u53ca\u4e92\u4e0d\u91cd\u53e0\u7684 fresh \u6839\u4e0e\u6700\u5c0f\u53d1\u73b0\u5e03\u5c40\u9884\u68c0\u3002WorkBuddy \u4f7f\u7528\u81ea\u8eab\u914d\u7f6e\u6839\u4e0b\u7684 <code>skills</code> \u76ee\u5f55\u4e0e <code>CODEBUDDY_CONFIG_DIR</code> \u6295\u5f71\uff1bCodeBuddy \u4f7f\u7528 fresh \u9879\u76ee\u7684 <code>.codebuddy/skills</code>\uff0c\u8fdb\u7a0b\u5de5\u4f5c\u76ee\u5f55\u6307\u5411\u8be5\u9879\u76ee\uff0c\u73b0\u6709\u767b\u5f55\u6001\u53ea\u7ecf <code>HOME</code> \u6295\u5f71\uff0c\u4e24\u8005\u7684 driver \u548c\u5e03\u5c40\u4e0d\u53ef\u4e92\u6362\u3002Codex \u4f7f\u7528 <code>&lt;workspace&gt;/.codex/skills</code>\uff0cQoder \u4f7f\u7528 <code>&lt;fresh-ws&gt;/.qoder/skills</code>\uff1bCodex \u53e6\u8981\u6c42 <code>repositoryRoot/.git</code> \u5b58\u5728\uff0c\u4e0d\u4f7f\u7528 <code>--skip-git-repo-check</code>\uff0c\u4e0d\u6267\u884c\u4efb\u4f55 git \u547d\u4ee4\u3002\u5bbf\u4e3b\u5165\u53e3\u4e0d\u8bbe\u7f6e\u9ed8\u8ba4 <code>hostsRoot</code>\u3002</li> <li>\u53ef\u6267\u884c\u6587\u4ef6\u8eab\u4efd\u8fb9\u754c\uff1a<code>executableSha256</code> \u53ea\u7ed1\u5b9a\u542f\u52a8\u524d\u4e25\u683c\u8bfb\u53d6\u5230\u7684\u5b57\u8282\uff0c\u662f\u70b9\u65f6\u89c2\u5bdf\uff1b\u5b9e\u9645\u8fdb\u7a0b\u4ecd\u6309 pathname \u542f\u52a8\uff0c\u4e0d\u8bc1\u660e\u8fdb\u7a0b\u6620\u50cf\u3002\u8c03\u7528\u65b9\u5fc5\u987b\u5728 probe \u4e0e\u6b63\u5f0f\u8c03\u7528\u671f\u95f4\u72ec\u5360\u53ef\u6267\u884c\u6587\u4ef6\u7684\u547d\u540d\u7a7a\u95f4\u3002</li> <li>\u4e34\u65f6\u76ee\u5f55\u751f\u547d\u5468\u671f\uff1aFoundation \u4fdd\u7559\u672c\u6b21\u8c03\u7528\u7684 <code>session-*</code> \u76ee\u5f55\uff0c\u4e0d\u6309\u8def\u5f84\u81ea\u52a8\u5220\u9664\u3002\u8c03\u7528\u65b9\u5b8c\u6210\u68c0\u67e5\u540e\uff0c\u7edf\u4e00\u6e05\u7406\u5176\u72ec\u5360\u7684\u5916\u5c42 <code>temporaryRoot</code>\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u65e2\u6709\u5bbf\u4e3b\u80fd\u529b\u81ea <code>0.10.0</code> \u63d0\u4f9b\uff1b<code>bundledHostProfilesRoot</code> \u4e0e\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u81ea <code>0.11.0</code> \u63d0\u4f9b\uff1b0.12.0 \u628a\u5c01\u95ed driver \u8868\u6269\u5c55\u5230\u4e94\u4e2a\uff08Kimi \u4e0e WorkBuddy \u4fdd\u6301\u56de\u5f52\u57fa\u7ebf\uff0cClaude Code\u3001Codex\u3001Qoder \u4e3a\u65b0\u589e\uff09\uff1b0.17.0 \u518d\u589e\u52a0\u72ec\u7acb\u7684 CodeBuddy driver\u3002\u771f\u5b9e\u5bbf\u4e3b\u9a8c\u8bc1\u4ecd\u4e3a <code>candidate</code>\uff1b\u751f\u4ea7 driver\u3001\u6e90\u7801\u6d4b\u8bd5\u6216\u53d7\u63a7 fixture \u90fd\u4e0d\u80fd\u66ff\u4ee3\u6d88\u8d39\u8005\u7684\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u8bc1\u636e\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/host.mjs</code>\u3001<code>host-profiles.mjs</code>\u3001<code>host-drivers.mjs</code>\u3001<code>host-verification.mjs</code>\u3001<code>host-verification-drivers.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/host.test.mjs</code>\u3001<code>host-verification.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5bbf\u4e3b\u80fd\u529b\u662f\u5426\u53ef\u7528\u3001\u624b\u52a8\u4e8b\u5b9e\u7684\u89e3\u91ca\u4e0e\u751f\u547d\u5468\u671f\u6388\u6743\uff1bFoundation \u4e0d\u58f0\u660e\u6d88\u8d39\u8005 smoke \u6216\u8fdc\u7aef\u53d1\u5e03\u6210\u529f\uff0c\u4e5f\u4e0d\u5ba3\u79f0\u8ba4\u8bc1\u72b6\u6001\u9694\u79bb\u3001\u51ed\u8bc1\u672a\u53d8\u5316\u3001\u6a21\u578b\u8eab\u4efd\u56fa\u5b9a\u6216\u5bbf\u4e3b\u5de5\u5177\u80fd\u529b\u5df2\u5173\u95ed\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#licensing-foundationkitlicensing","title":"licensing (foundation.kit.licensing)","text":""},{"location":"reference/api/engineering-kit/#loadLicensingProfile--listLicensingProfiles--validateLicensingProfile--generateLicenseContent--generateNoticeContent--generateIdentityRecord--bundledProfilesRoot","title":"loadLicensingProfile / listLicensingProfiles / validateLicensingProfile / generateLicenseContent / generateNoticeContent / generateIdentityRecord / bundledProfilesRoot","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>loadLicensingProfile({ profilesRoot, profileId, variant } = {})</code>\uff08async\uff09</li> <li><code>listLicensingProfiles(profilesRoot)</code></li> <li><code>validateLicensingProfile(profile)</code></li> <li><code>generateLicenseContent(profile)</code> / <code>generateNoticeContent(profile, { projectName })</code> / <code>generateIdentityRecord(profile, { projectId, projectName, projections } = {})</code></li> <li><code>bundledProfilesRoot()</code></li> <li>\u8f93\u5165\uff1aProfile \u6807\u8bc6\u3001\u53d8\u4f53\u9009\u62e9\u3002</li> <li>\u8f93\u51fa\uff1a\u8bb8\u53ef\u8bc1 / \u58f0\u660e / \u8eab\u4efd\u8bb0\u5f55\u6587\u672c\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>validateLicensingProfile</code> \u4e0e\u5404 <code>generate*</code> \u662f\uff1b<code>load*</code> \u542b\u53ea\u8bfb\u8bfb\u53d6 Profile \u6570\u636e\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\uff08\u7eaf\u51fd\u6570\u751f\u6210 + \u53ea\u8bfb\u8bfb\u53d6\uff09\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u591a\u53d8\u4f53\u672a\u6307\u5b9a / \u975e\u6cd5 Profile \u629b <code>KitError</code>\uff08<code>invalid-licensing-profile</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>profiles/licensing/registry.json</code> + <code>schema.json</code> \u5b58\u5728\uff1b\u9ed8\u8ba4\u53d6 registry \u7b2c\u4e00\u53d8\u4f53\uff0c\u591a\u53d8\u4f53\u987b\u663e\u5f0f\u9009\u62e9\uff1b\u6240\u6709\u5546\u4e1a\u8f7d\u8377\u5f53\u524d\u5173\u95ed\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/licensing.mjs</code>\u3001<code>profiles/licensing/registry.json</code>\u3001<code>profiles/licensing/schema.json</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/licensing.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6388\u6743\u4e1a\u52a1\u8bed\u4e49\uff08\u6388\u6743\u6267\u884c\u51b3\u7b56\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#identity-check-foundationkitidentity-check","title":"identity-check (foundation.kit.identity-check)","text":""},{"location":"reference/api/engineering-kit/#loadIdentityRecord--checkIdentityDrift--validateIdentityAgainstProfile","title":"loadIdentityRecord / checkIdentityDrift / validateIdentityAgainstProfile","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>loadIdentityRecord(rootAbs)</code>\uff08async\uff09</li> <li><code>checkIdentityDrift({ rootAbs, identityRecord } = {})</code>\uff08async\uff09</li> <li><code>validateIdentityAgainstProfile(record, profilesRoot)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u76ee\u6807\u6839\u3001Profile \u6807\u8bc6\u3002</li> <li>\u8f93\u51fa\uff1a\u6f02\u79fb\u53d1\u73b0\u3001\u6821\u9a8c\u7ed3\u8bba\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>validateIdentityAgainstProfile</code> \u662f\uff1b<code>load*</code> / <code>check*</code> \u542b\u53ea\u8bfb\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\uff1b\u4e0d\u4fee\u6539\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6f02\u79fb\u6216\u6821\u9a8c\u5931\u8d25\u4ea7\u51fa findings\uff08\u4e0d\u629b\u9519\uff0c\u7531 <code>check</code> \u9000\u51fa\u7801 <code>1</code> \u8868\u8fbe\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>IDENTITY_RECORD_PATH</code> \u6307\u5411\u8eab\u4efd\u8bb0\u5f55\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/identity-check.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/identity-check.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6f02\u79fb\u4e1a\u52a1\u5904\u7f6e\uff08\u81ea\u52a8\u4fee\u590d\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#CLI-foundationkitcli","title":"CLI (foundation.kit.cli)","text":""},{"location":"reference/api/engineering-kit/#runCommand--cliMain--\u62d2\u7edd\u53d8\u66f4\u65d7\u6807","title":"runCommand / cliMain / \u62d2\u7edd\u53d8\u66f4\u65d7\u6807","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runCommand(command, options = {})</code>\uff08async\uff09\u2014\u2014 \u6309 <code>TOP_LEVEL_COMMANDS</code> \u5206\u6d3e\uff0c\u8fd4\u56de <code>{ exitCode, output }</code></li> <li><code>cliMain(argv)</code>\uff08async\uff09\u2014\u2014 CLI \u5165\u53e3</li> <li>\u8f93\u5165\uff1a<code>argv</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u547d\u4ee4\u7ed3\u679c\uff1b\u9000\u51fa\u7801 <code>ok=0</code> / <code>findings=1</code> / <code>rejected=2</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u4f9d\u547d\u4ee4\u4ea7\u751f\u53d7\u6536\u5bb9\u6587\u4ef6\u5199\u5165\u6216\u53ea\u8bfb\u63a2\u6d4b\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u4f9d\u5b50\u52a8\u4f5c\u800c\u5b9a\uff1a<code>scaffold</code> / <code>projection</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u5199\u5165\uff1b<code>adopt-plan</code> \u4e0e\u666e\u901a <code>check</code> \u53ea\u8bfb\uff1b<code>check relock</code> \u662f\u663e\u5f0f\u53d7\u63a7\u5199\u4e8b\u52a1\uff1b<code>check qualification</code> \u9884\u68c0\u901a\u8fc7\u540e\u53ef\u80fd\u542f\u52a8\u7ed1\u5b9a\u7684 executable\u3002Foundation \u81ea\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u53ef\u80fd\u8054\u7f51\uff1bFoundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002<code>REFUSED_MUTATION_FLAGS</code>\uff08\u5982 <code>--apply</code>\uff09\u5728 <code>parseOptions</code> \u5165\u53e3\u5373\u62d2\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u672a\u77e5\u547d\u4ee4 / \u62d2\u7edd\u65d7\u6807\u9000\u51fa\u7801 <code>2</code>\uff08<code>unknown-command</code> / <code>refused-mutation</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aNode &gt;= 22.22.2\uff1b<code>TOP_LEVEL_COMMANDS</code> \u56fa\u5b9a 4 \u4e2a\uff0c\u7b2c 5 \u4e2a\u547d\u4ee4\u7981\u6b62\u65b0\u589e\uff1b<code>REFUSED_MUTATION_FLAGS</code> \u5728\u89e3\u6790\u5165\u53e3\u5373\u62d2\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-engineering-kit/src/index.mjs</code>\u3001<code>cli.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-engineering-kit/test/cli.test.mjs</code>\u3001<code>boundary.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u547d\u4ee4\u7684\u4e1a\u52a1\u76ee\u6807\uff08\u547d\u4ee4\u96c6\u5408\u4e0d\u6269\u5f20\uff09\u3002</li> </ul> <p>Kit \u9519\u8bef\u7c7b\u578b\uff1a<code>KitError extends ContractsError</code>\uff08\u6784\u9020\u672a\u767b\u8bb0\u7801\u7acb\u5373\u629b <code>TypeError</code>\uff09\uff1b<code>KIT_ERROR_KINDS</code> \u4e3a\u7a33\u5b9a kind \u679a\u4e3e\uff1b<code>kitError</code> / <code>invalidParamsError</code> / <code>unknownCommandError</code> / <code>mutationModeError</code> / <code>refusalError</code> \u4e3a\u6784\u9020\u8f85\u52a9\u3002<code>REFUSED_MUTATION_FLAGS</code> \u5217\u51fa\u5165\u53e3\u5373\u62d2\u7684\u53d8\u66f4\u65d7\u6807\uff08\u5982 <code>--apply</code>\uff09\u3002</p>"},{"location":"reference/api/engineering-kit/#Profile-SPI-\u516c\u5171\u6295\u5f71","title":"Profile SPI \u516c\u5171\u6295\u5f71","text":"<p><code>skill-family-engineering-kit/profile-spi</code> \u662f Profile SPI v3 \u7684\u516c\u5171\u6570\u636e\u5165\u53e3\u3002\u5b83\u7531 Profiles \u6e90\u5b9e\u73b0\u6295\u5f71\u751f\u6210\uff0c\u5305\u5185\u540c\u65f6\u643a\u5e26\u4e09\u4e2a SPI JSON \u8d44\u6e90\u4e0e Contracts \u7684 <code>profile-descriptor.schema.json</code>\uff1b\u6295\u5f71\u811a\u672c\u53ea\u66ff\u6362\u4e24\u4e2a\u516c\u5171\u5305\u5bfc\u5165\u548c\u4e00\u4e2a\u672c\u5730 Schema URL\uff0c\u8d44\u6e90\u5b57\u8282\u4fdd\u6301\u7ed1\u5b9a\u3002</p>"},{"location":"reference/api/engineering-kit/#\u516c\u5171\u5165\u53e3","title":"\u516c\u5171\u5165\u53e3","text":"<ul> <li><code>loadSpiDefinition()</code>\uff1a\u8bfb\u53d6 <code>extension-spi.json</code>\uff0c\u8fd4\u56de\u5f00\u653e\u6269\u5c55\u70b9\u3001\u6838\u5fc3\u6240\u6709\u6743\u548c entrypoint \u89c4\u5219\u3002</li> <li><code>loadExtendedDescriptorSchema()</code>\uff1a\u8bfb\u53d6 <code>profile-descriptor.schema.json</code>\uff0c\u8fd4\u56de\u6269\u5c55 Profile descriptor Schema\u3002</li> <li><code>loadRuleBaselineCatalog()</code>\uff1a\u8bfb\u53d6 <code>rule-baseline-catalog.json</code>\uff0c\u8fd4\u56de overrides-policy \u7684\u57fa\u7ebf\u76ee\u5f55\u3002</li> <li><code>verifyProfile({ profileRoot, descriptorRelPath = \"profile.json\" } = {})</code>\uff08async\uff09\uff1a\u53ea\u8bfb\u6821\u9a8c Profile descriptor\u3001\u8d44\u6e90\u6536\u5bb9\u3001\u6838\u5fc3\u53cd\u5411\u4f9d\u8d56\u3001\u91c7\u7528 pin \u4e0e overrides\uff1b\u8fd4\u56de <code>SPE0000</code> \u6216 <code>SPE1001</code>\u2013<code>SPE1007</code> \u7ed3\u679c\u7801\uff0c\u4e0d\u6267\u884c Profile entrypoint\u3002</li> <li><code>verifyAdoptionDigests({ profileRoot, adoption })</code> \u4e0e <code>assessOverridesPolicy(overrides)</code>\uff1a\u5206\u522b\u6821\u9a8c\u91c7\u7528 pin \u6458\u8981\u548c\u53ea\u6536\u7d27\u7684 overrides\u3002</li> </ul> <p>\u516c\u5171\u6295\u5f71\u5165\u53e3\u6ca1\u6709\u6587\u4ef6\u5199\u5165\u3001Git\u3001\u7f51\u7edc\u6216\u8fdb\u7a0b\u526f\u4f5c\u7528\u3002<code>profileRoot</code> \u5fc5\u987b\u662f\u53ef\u8bfb\u53d6\u76ee\u5f55\uff0c\u8d44\u6e90 entrypoint \u5fc5\u987b\u7559\u5728\u8be5\u76ee\u5f55\u5185\u4e14\u4e3a JSON \u6570\u636e\u6587\u4ef6\uff1b\u7b26\u53f7\u94fe\u63a5\u548c\u8def\u5f84\u9003\u9038\u5747\u5931\u8d25\u5173\u95ed\u3002Profile \u7684\u9886\u57df\u8bed\u4e49\u4ecd\u7531\u8c03\u7528\u65b9\u62e5\u6709\u3002</p> <p><code>profiles/spi</code> \u662f\u552f\u4e00\u624b\u5199\u771f\u6e90\uff1b<code>packages/skill-family-engineering-kit/profile-spi</code> \u7531 projen \u673a\u68b0\u751f\u6210\uff0c\u4e0d\u5f97\u76f4\u63a5\u7f16\u8f91\u6295\u5f71\u6587\u4ef6\u3002</p>"},{"location":"reference/api/engineering-kit/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u89c4\u8303\u5165\u53e3 <code>skill-family-engineering-kit/quickstart-profile</code> \u5bfc\u51fa <code>buildQuickstartProfileProjection</code>\u3001 <code>buildQuickstartProfileProjectionFromInventory</code> \u4e0e <code>QUICKSTART_PROFILE_TARGET_PREFIX</code>\u3002builder \u63a5\u6536\u663e\u5f0f\u6d88\u8d39\u8005 Schema \u8def\u5f84 \u4e0e\u51bb\u7ed3\u6765\u6e90\u8eab\u4efd\uff0c\u751f\u6210\u6309 Schema <code>$id</code> \u67e5\u8be2\u7684 standalone validator\u3001\u673a\u68b0\u6295\u5f71\u7684 Contracts/Harness runtime\u3001\u8bb8\u53ef\u8bc1\u548c \u5b8c\u6574 provenance\u3002\u5386\u53f2 <code>skill-family-engineering-kit/candidate/quickstart-profile</code> \u5728\u5f03\u7528\u7a97\u53e3\u5185\u89e3\u6790\u540c\u4e00\u6a21\u5757\u3002</p> <p>Bundle \u79bb\u7ebf\u8fd0\u884c\u65f6\u4e0d\u9700\u8981 Foundation \u5305\u3001<code>node_modules</code> \u6216 Ajv\u3002builder \u53ea\u8fd4\u56de\u7a33\u5b9a projection manifest\uff0c\u4e0d\u5199\u76ee\u6807\u6587\u4ef6\uff0c \u4e5f\u4e0d\u589e\u52a0\u7b2c\u4e94\u4e2a Kit \u9876\u5c42\u547d\u4ee4\uff1b\u8c03\u7528\u65b9\u4ecd\u9700\u628a manifest \u4ea4\u7ed9 <code>runProjection</code> \u5b8c\u6210\u6388\u6743\u5199\u5165\u30020.3.0 \u7684 v2 \u4e0e 0.2.1 \u7684\u4f9d\u8d56 \u95ed\u5305 Bundle \u4e0d\u517c\u5bb9\uff0c\u5fc5\u987b\u7cbe\u786e\u9501\u5b9a\u7248\u672c\u3002</p> <p>\u5386\u53f2 Quickstart \u547d\u540d\u7a7a\u95f4\u8fd8\u5bfc\u51fa adoption \u673a\u5236\uff1b0.10.0 \u7684\u89c4\u8303\u5165\u53e3\u662f <code>skill-family-engineering-kit/adoption</code>\u3002 skill naming \u4f7f\u7528 <code>skill-family-engineering-kit/skill-naming</code>\u3002\u4e24\u4e2a\u5165\u53e3\u90fd\u4e0d\u589e\u52a0 Kit \u9876\u5c42\u547d\u4ee4\uff1b\u5386\u53f2\u6d88\u8d39\u8005\u8fc1\u79fb\u4e00\u6b21\u540e\uff0c \u4ee5\u540e\u53ea\u6539\u53d8\u6210\u719f\u5ea6\u6807\u7b7e\u65f6\u4e0d\u518d\u8fc1\u79fb\u5408\u540c\u8eab\u4efd\u3002\u6d88\u8d39\u8005\u91c7\u7528\u65b0 Foundation \u7248\u672c\u4ecd\u9700\u66f4\u65b0\u7cbe\u786e pin\uff0cBundle \u662f\u5426\u91cd\u5efa\u6309\u65e2\u6709 package identity\u3001\u6765\u6e90\u6458\u8981\u4e0e provenance \u7ed1\u5b9a\u5408\u540c\u5224\u65ad\u3002</p>"},{"location":"reference/api/engineering-kit/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID \u89c1 <code>docs/agents/capability-catalog.json</code>\uff08<code>foundation.kit.*</code>\u3001<code>foundation.unsupported.*</code>\uff09\u3002</li> <li>\u673a\u68b0\u6821\u9a8c\uff1a<code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code> \u4e0e <code>cli.mjs</code>\uff0c\u62d2\u7edd\u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\uff0c\u5e76\u6821\u9a8c <code>TOP_LEVEL_COMMANDS</code> \u672a\u6269\u5f20\u4e3a\u8d85 4 \u4e2a\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#\u80fd\u529b\u53d1\u73b0\u4e0e\u8fc1\u79fb\u6307\u5f15-Foundation-0140","title":"\u80fd\u529b\u53d1\u73b0\u4e0e\u8fc1\u79fb\u6307\u5f15 (Foundation 0.14.0)","text":"<p><code>adopt-plan --list-capabilities</code> \u662f\u80fd\u529b\u53d1\u73b0\u7684\u552f\u4e00 CLI \u5165\u53e3\uff0c\u4e0d\u589e\u52a0\u7b2c\u4e94\u4e2a\u9876\u5c42\u547d\u4ee4\u3002 \u8986\u76d6\u53c2\u8003\u548c\u9879\u76ee\u8bc4\u4f30\u4f7f\u7528 <code>--all --scope &lt;scope&gt; --locale &lt;en|zh-CN&gt;</code>\uff1b\u9879\u76ee\u8bc4\u4f30\u53e6\u52a0 <code>--uses &lt;relative-json-path&gt;</code>\uff0c\u65e5\u5e38\u5355\u9700\u6c42\u67e5\u8be2\u4f7f\u7528 <code>--filter &lt;text&gt;</code>\u3002\u8f93\u51fa\u4e2d\u7684 <code>supportedMatches</code> \u53ea\u662f\u5019\u9009\uff0c<code>needsDecision=true</code> \u8868\u793a\u9879\u76ee\u4ecd\u9700\u660e\u786e disposition\uff1b <code>boundary-found</code> \u548c <code>no-text-match</code> \u90fd\u4e0d\u81ea\u52a8\u751f\u6210 <code>foundation-gap</code>\u3002</p> <p><code>planAdoption()</code> \u8fd4\u56de\u7684 <code>capabilityAssessment</code> \u548c <code>capabilityGuidance</code> \u4ecd\u662f\u53ea\u8bfb\u6295\u5f71\u3002 <code>direct-adoption</code>\u3001<code>compatibility-layer</code>\u3001<code>keep-business</code> \u4e0e <code>foundation-gap</code> \u7684 decision \u7531\u6d88\u8d39\u8005\u8bb0\u5f55\u3002\u8fc1\u79fb <code>complete</code> \u53ea\u8868\u793a\u8fc1\u79fb\u95e8\u7981\u95ed\u5408\uff0c<code>consumerVerification.claim</code> \u4fdd\u6301 <code>null</code>\uff1b\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u987b\u7531\u6d88\u8d39\u8005\u9002\u914d\u5668\u6d4b\u8bd5\u4e0e\u9886\u57df\u95e8\u7981\u58f0\u660e\u3002</p>"},{"location":"reference/api/engineering-kit/#\u663e\u5f0f\u8d44\u683c\u5165\u53e3","title":"\u663e\u5f0f\u8d44\u683c\u5165\u53e3","text":"<p><code>check qualification</code> \u662f\u6302\u5728 <code>check</code> \u4e0b\u7684\u663e\u5f0f\u5b50\u52a8\u4f5c\uff0c\u8981\u6c42\u540c\u65f6\u63d0\u4f9b <code>--root</code>\u3001\u53d7\u652f\u6301\u7684 <code>--capability</code>\uff08\u63d2\u4ef6\u751f\u547d\u5468\u671f\u6216\u6280\u80fd\u65cf\u76ee\u5f55\uff09\u3001<code>--request</code>\u3001<code>--bindings</code> \u4e0e <code>--native</code>\u3002\u5b83\u5148\u8bfb\u53d6\u4e09\u5305\u7cbe\u786e\u7248\u672c\u3001\u80fd\u529b\u76ee\u5f55\u3001request/result Schema \u548c\u53c2\u6570\u5b8c\u6574\u6027\uff0c \u518d\u8c03\u7528\u56fa\u5b9a\u8d44\u683c\u5165\u53e3\u3002\u7f3a\u5c11\u8bc1\u636e\u3001\u8df3\u8fc7\u6267\u884c\u6216\u7ec8\u6001\u4e0d\u786e\u5b9a\u65f6\uff0c\u4e0d\u5f97\u8f93\u51fa <code>real-host-qualified</code>\uff1b\u5019\u9009\u53d1\u73b0\u3001\u8fc1\u79fb <code>complete</code> \u548c\u5951\u7ea6\u63a5\u5165\u5b8c\u6210\u90fd\u4e0d\u80fd\u66ff\u4ee3\u771f\u5b9e\u8d44\u683c\u3002</p> <p>\u516c\u5171\u5e93\u5165\u53e3\u4e3a <code>runQualification({ root, capability, requestPath, bindingsPath, native })</code>\u3002\u53c2\u6570\u952e\u96c6\u95ed\u5408\uff1b<code>runner</code>\u3001catalog loader\u3001parser\u3001\u9884\u5236 observation \u6216\u5176\u5b83\u6d4b\u8bd5\u63a5\u7f1d\u4f1a\u5728\u8bfb\u53d6\u76ee\u6807\u6587\u4ef6\u548c\u521b\u5efa\u4e34\u65f6\u6839\u4e4b\u524d\u88ab\u62d2\u7edd\u3002\u5305\u5185\u6d4b\u8bd5\u63a5\u7f1d\u4e0d\u4ece package root \u5bfc\u51fa\uff0c\u4e5f\u4e0d\u5c5e\u4e8e\u516c\u5171 API\u3002</p> <p>0.15.0 \u7684 <code>foundation.kit.plugin-verification</code> \u53ea\u4fdd\u7559 Qoder \u4e0e WorkBuddy \u7684 <code>native-lifecycle</code> \u5206\u652f\uff0c\u4f7f\u7528\u5bbf\u4e3b\u4e13\u5c5e\u751f\u4ea7 driver \u4e0e\u56fa\u5b9a\u5341\u4e8c\u9636\u6bb5\u751f\u547d\u5468\u671f\u7ed3\u6784\uff1b <code>foundation.kit.skill-family-directory-verification</code> \u662f Kimi \u7684\u56fa\u5b9a\u76ee\u5f55\u5206\u652f\uff0c\u5185\u7f6e <code>driverVersion</code> \u4e3a <code>1.0.0</code>\uff0cCLI <code>cliVersion</code> \u4e3a <code>0.39.1</code>\u3002\u53d7\u63a7 fixture executable \u5fc5\u987b\u8d70\u540c\u4e00\u751f\u4ea7 driver\u3001<code>superviseProcess</code> \u548c\u539f\u59cb\u6d41\u8def\u5f84\uff0c\u53ea\u8bc1\u660e\u9694\u79bb\u63a5\u7ebf\uff0c\u4e0d\u662f\u5382\u5546\u5b98\u65b9 grammar\uff0c\u4e5f\u4e0d\u80fd\u4ece\u516c\u5171\u8d44\u683c\u5165\u53e3\u4f2a\u9020\u6b63\u5f0f\u5bbf\u4e3b\u89c2\u5bdf\u3002\u8c03\u7528\u65b9\u8d1f\u8d23\u9886\u57df\u63a5\u53d7\u4e0e\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\uff0c\u4e0d\u5f97\u590d\u5236\u901a\u7528 runner\u3001Schema\u3001Registry \u6216 receipt \u94fe\u3002</p>"},{"location":"reference/api/engineering-kit/#\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1-foundationkitplugin-verification","title":"\u5b8c\u6574\u63d2\u4ef6\u9a8c\u8bc1 (foundation.kit.plugin-verification)","text":""},{"location":"reference/api/engineering-kit/#runPluginVerification","title":"runPluginVerification","text":"<ul> <li>\u7b7e\u540d\uff1a<code>runPluginVerification({ request, bindings, hostsRoot })</code>\uff08async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u6ce8\u518c\u7684 <code>plugin-verification-request</code>\u3001\u79c1\u6709\u8def\u5f84\u7ed1\u5b9a\u53ca\u663e\u5f0f\u5bbf\u4e3b Profile \u6839\u3002\u8bf7\u6c42\u4fdd\u7559 <code>install-only</code> \u4e0e <code>install-and-invoke</code>\uff0c\u5e76\u589e\u52a0\u53ea\u5141\u8bb8\u672c\u5730 source \u7684 <code>native-lifecycle</code>\u3002\u539f\u5206\u652f\u7ee7\u7eed\u533a\u5206 <code>local-staged</code> \u4e0e\u6709\u9650 <code>public-channel</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u6ce8\u518c\u7684 <code>plugin-verification-result</code>\u3002\u539f\u5206\u652f\u5206\u522b\u62a5\u544a\u8f93\u5165\u3001\u5b89\u88c5\u3001\u53d1\u73b0\u548c\u8c03\u7528\u4e8b\u5b9e\uff1b\u539f\u751f\u547d\u5468\u671f\u5206\u652f\u6070\u597d\u62a5\u544a <code>preflight</code> \u5230 <code>absent-after-uninstall</code> \u7684\u5341\u4e8c\u4e2a\u6709\u5e8f\u8bed\u4e49\u9636\u6bb5\u3002\u5b8c\u6574\u6811\u89c2\u5bdf\u548c\u539f\u59cb\u8f93\u51fa\u53ea\u4fdd\u5b58\u5728\u79c1\u6709\u8bc1\u636e\u6839\u3002</li> <li>\u751f\u4ea7 driver\uff1aQoder \u4e0e WorkBuddy \u5404\u81ea\u62e5\u6709 argv \u8ba1\u5212\u3001command step\u3001tree evidence \u4e0e raw stream Oracle\uff0c\u9636\u6bb5\u5185\u6700\u591a\u4e09\u6761\u547d\u4ee4\uff0c\u4e24\u4e2a\u5bbf\u4e3b\u8ba1\u5212\u53ef\u4ee5\u4e0d\u540c\u3002\u6bcf\u6b21 spawn \u524d\u90fd\u91cd\u65b0\u8c03\u7528 <code>observeExecutableIdentity</code>\uff1b\u8eab\u4efd\u6216\u89e3\u91ca\u5668\u94fe\u6f02\u79fb\u4f1a\u963b\u65ad\u4e0b\u4e00\u6b21\u542f\u52a8\u3002Contracts \u4e0d\u4fdd\u5b58\u8de8\u5bbf\u4e3b\u7edf\u4e00\u547d\u4ee4\u8868\uff0c\u4e5f\u4e0d\u89e3\u91ca\u5382\u5546\u8f93\u51fa\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u539f\u751f\u547d\u5468\u671f\u5206\u652f\u53ea\u8fd0\u884c\u8c03\u7528\u65b9\u7ed1\u5b9a\u7684\u672c\u5730 executable\uff0c\u521b\u5efa fresh workspace\u3001\u4e00\u6b21\u6027\u5bbf\u4e3b\u72b6\u6001\u4e0e\u79c1\u6709\u8bc1\u636e\u3002Foundation \u81ea\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u53ef\u80fd\u8054\u7f51\uff1bFoundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002\u6240\u6709\u5206\u652f\u4e0d\u8986\u76d6\u5df2\u6709\u5b89\u88c5\uff0c\u4e0d\u81ea\u52a8\u91cd\u8bd5\u3001\u56de\u6eda\u6216\u6e05\u7406\u4e0d\u786e\u5b9a\u73b0\u573a\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a<code>rejected</code> \u8868\u793a\u524d\u63d0\u62d2\u7edd\uff0c<code>failed</code> \u8868\u793a\u786e\u5b9a\u5931\u8d25\uff0c<code>indeterminate</code> \u8868\u793a\u8fb9\u754c\u7ec8\u6001\u65e0\u6cd5\u8bc1\u660e\u3002\u539f\u751f\u547d\u5468\u671f\u7684\u9996\u4e2a\u975e <code>observed</code> \u9636\u6bb5\u4f1a\u4f7f\u540e\u7eed\u9636\u6bb5\u4fdd\u6301\u7a7a\u7684 <code>not-performed</code>\uff1b\u8f93\u51fa\u672a\u77e5\u3001\u91cd\u590d\u3001\u7f3a\u5931\u3001\u8eab\u4efd\u6f02\u79fb\u3001\u6839\u8d8a\u754c\u6216\u5378\u8f7d\u6b8b\u7559\u5747\u5931\u8d25\u5173\u95ed\u3002</li> <li>fixture \u8fb9\u754c\uff1a\u53d7\u63a7 Qoder/WorkBuddy executable \u4f7f\u7528 Foundation \u81ea\u6709\u7684\u5c01\u95ed\u6d4b\u8bd5\u534f\u8bae\uff0c\u5e76\u901a\u8fc7\u771f\u5b9e\u751f\u4ea7 driver \u4e0e raw-stream \u8def\u5f84\u6267\u884c\u3002\u8be5\u534f\u8bae\u4e0d\u662f\u5382\u5546\u5b98\u65b9 grammar\uff0c\u4e0d\u6784\u6210\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u6216\u9886\u57df\u63a5\u53d7\u3002</li> <li>\u524d\u63d0\uff1a\u4e09\u5305\u7cbe\u786e\u9501\u6b65\uff1b\u8c03\u7528\u65b9\u7ed1\u5b9a\u51bb\u7ed3\u672c\u5730\u6e90\u3001\u53ef\u6267\u884c\u6587\u4ef6\u3001\u89e3\u91ca\u5668\u3001\u4e92\u4e0d\u91cd\u53e0\u7684 fresh \u6839\u4e0e\u73b0\u6709\u7528\u6237\u72b6\u6001\u8fb9\u754c\u3002\u6bcf\u4e2a\u771f\u5b9e\u5bbf\u4e3b\u4e0e\u6765\u6e90\u7ec4\u5408\u5fc5\u987b\u53e6\u6709\u8d44\u683c\u8bc1\u636e\uff0c\u5165\u53e3\u5b58\u5728\u4e0d\u7b49\u4e8e\u5168\u90e8\u7ec4\u5408\u83b7\u51c6\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.13.0</code> / <code>candidate</code>\u3002\u6c38\u4e45\u5165\u53e3\u8eab\u4efd\u4e0d\u56e0\u6210\u719f\u5ea6\u6807\u7b7e\u53d8\u5316\u800c\u8fc1\u79fb\uff1b\u73b0\u6709\u5355 Skill \u5165\u53e3\u53ca\u5408\u540c\u4fdd\u7559\u3002</li> <li>\u6e90\u6587\u4ef6\u4e0e\u6b63\u53cd\u4f8b\uff1a<code>packages/skill-family-engineering-kit/src/plugin-verification.mjs</code>\u3001<code>src/host-verification-drivers.mjs</code>\u3001<code>test/plugin-verification.test.mjs</code>\u3001<code>test/foundation-015-kit.test.mjs</code>\u3001<code>test/isolated-install.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u8d23\u4efb\uff1a\u6e90\u63a5\u53d7\u3001\u9886\u57df\u7ed3\u679c\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u548c\u72b6\u6001\u3001\u6d88\u8d39\u8005\u8fc1\u79fb\u53ca\u673a\u5236\u9000\u51fa\u8bc1\u660e\u3002</li> </ul>"},{"location":"reference/api/engineering-kit/#\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1-foundationkitskill-family-directory-verification","title":"\u6280\u80fd\u65cf\u76ee\u5f55\u9a8c\u8bc1 (foundation.kit.skill-family-directory-verification)","text":""},{"location":"reference/api/engineering-kit/#runSkillFamilyDirectoryVerification","title":"runSkillFamilyDirectoryVerification","text":"<ul> <li>\u7b7e\u540d\uff1a<code>runSkillFamilyDirectoryVerification({ request, bindings })</code>\uff08async\uff09\u3002\u516c\u5171\u952e\u96c6\u53ea\u6709 <code>request</code> \u4e0e <code>bindings</code>\uff1bcaller observation\u3001runner\u3001parser \u6216\u9884\u5236 result \u5747\u88ab\u62d2\u7edd\u3002</li> <li>\u8f93\u5165\uff1a\u6ce8\u518c\u7684 skill-family-directory request\uff0c\u4ee5\u53ca\u8c03\u7528\u65b9\u7ed1\u5b9a\u7684 Kimi executable/interpreter\u3001\u6280\u80fd\u65cf\u6839\u3001\u5de5\u4f5c\u533a\u3001\u73b0\u6709\u7528\u6237\u72b6\u6001\u6839\u3001\u4e34\u65f6\u6839\u4e0e\u79c1\u6709\u8bc1\u636e\u6839\u3002\u5165\u53e3\u56fa\u5b9a <code>hostId=kimi-code</code>\u3001<code>driverVersion=1.0.0</code>\u3001<code>cliVersion=0.39.1</code>\u3002</li> <li>\u542f\u52a8\uff1a\u5148\u4ee5\u56fa\u5b9a\u7248\u672c\u53c2\u6570\u68c0\u67e5 CLI\uff1b\u6b63\u5f0f\u8c03\u7528\u56fa\u5b9a\u4e3a <code>-p &lt;prompt&gt; --output-format stream-json --skills-dir &lt;family-root&gt;</code>\u3002\u73af\u5883\u53ea\u6295\u5f71 <code>NO_COLOR</code>\u3001<code>HOME</code>\u3001<code>TMPDIR</code> \u4e0e <code>KIMI_CODE_HOME</code>\uff0c\u4e0d\u5c55\u5f00\u7ee7\u627f <code>process.env</code>\u3002\u6bcf\u6b21 spawn \u524d\u91cd\u65b0\u89c2\u5bdf\u53ef\u6267\u884c\u6587\u4ef6\u53ca\u89e3\u91ca\u5668\u8eab\u4efd\u3002</li> <li>\u8f93\u51fa\uff1a\u6ce8\u518c\u7684\u56db\u6001 directory result\uff0c\u4ee5\u53ca\u53d7\u4fdd\u62a4\u6280\u80fd\u65cf\u6811\u3001\u5de5\u4f5c\u533a\u548c\u539f\u59cb\u6d41\u6458\u8981\u3002\u79c1\u6709 raw stdout/stderr\u3001\u7edd\u5bf9\u8def\u5f84\u4e0e\u5b8c\u6574 observation \u4e0d\u8fdb\u5165\u516c\u5171\u7ed3\u679c\u3002</li> <li>\u5f53\u524d\u5224\u5b9a\u8fb9\u754c\uff1aFoundation \u81ea\u6709\u53d7\u63a7 raw fixture \u534f\u8bae\u53ef\u9a8c\u8bc1\u751f\u4ea7 parser \u63a5\u7ebf\uff0c\u4f46\u4e0d\u662f Kimi \u5b98\u65b9 stream-json grammar\u3002\u5f53\u524d\u7f3a\u5c11\u53ef\u9a8c\u8bc1\u7684\u5b98\u65b9 typed call/result \u6620\u5c04\uff0c\u56e0\u6b64\u5373\u4f7f\u53d7\u63a7\u4e8b\u4ef6\u5b8c\u6574\u914d\u5bf9\uff0c\u516c\u5171\u7ed3\u679c\u4ecd\u4e3a <code>indeterminate</code>\uff0c\u539f\u56e0\u4e3a <code>official-observation-unavailable</code>\uff0c\u9010\u6280\u80fd discovery/load \u4fdd\u6301 <code>unknown</code>\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u8c03\u7528\u65b9 observation\u3001\u6839\u91cd\u53e0\u6216\u8d8a\u754c\u3001\u975e fresh evidence \u6839\u3001\u6765\u6e90\u6458\u8981\u4e0d\u7b26\u3001\u53ef\u6267\u884c\u6587\u4ef6/\u89e3\u91ca\u5668\u6f02\u79fb\u3001raw evidence \u53d8\u5316\u548c protected snapshot \u6f02\u79fb\u5747\u5931\u8d25\u5173\u95ed\u3002\u8fb9\u754c\u7ec8\u6001\u65e0\u6cd5\u8bc1\u660e\u65f6\u4fdd\u7559\u73b0\u573a\u5e76\u8981\u6c42\u4eba\u5de5\u68c0\u67e5\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u542f\u52a8\u672c\u5730\u53d7\u7ea6\u675f\u8fdb\u7a0b\uff0c\u5e76\u5728\u8c03\u7528\u65b9\u7ed1\u5b9a\u7684\u79c1\u6709\u4e34\u65f6\u6839\u5199 raw evidence\u3002Foundation \u81ea\u8eab\u4e0d\u53d1\u8d77\u7f51\u7edc\u8bf7\u6c42\uff0c\u4f46\u7ed1\u5b9a\u7684 executable \u53ef\u80fd\u8054\u7f51\uff1bFoundation \u4e0d\u63d0\u4f9b sandbox \u6216 egress \u963b\u65ad\uff0c\u8c03\u7528\u65b9\u4e0e\u8fd0\u884c\u73af\u5883\u8d1f\u8d23\u9694\u79bb\u3002Foundation \u4e0d\u7ba1\u7406\u8ba4\u8bc1\u3001\u4e0d\u5199\u5168\u5c40\u914d\u7f6e\u6216\u8fdc\u7aef\u72b6\u6001\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.15.0</code> / <code>candidate</code>\u3002</li> <li>\u6e90\u6587\u4ef6\u4e0e\u6b63\u53cd\u4f8b\uff1a<code>packages/skill-family-engineering-kit/src/skill-family-directory-verification.mjs</code>\u3001<code>test/foundation-015-kit.test.mjs</code>\u3001<code>test/isolated-install.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u8d23\u4efb\uff1a\u6280\u80fd\u65cf\u6765\u6e90\u63a5\u53d7\u3001\u9886\u57df\u7ed3\u679c\u3001\u771f\u5b9e\u5bbf\u4e3b\u8d44\u683c\u3001\u53d1\u5e03\u65b0\u9c9c\u5ea6\u4e0e\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/harness/","title":"skill-family-harness-node \u516c\u5171 API \u53c2\u8003","text":"<p>\u672c\u9875\u4ece\u771f\u5b9e\u5bfc\u51fa\uff08<code>src/index.mjs</code> \u4e0e\u5404\u6e90\u6a21\u5757\uff09\u6838\u5bf9\uff0c\u4e0d\u624b\u5199\u65e0\u6cd5\u8bc1\u660e\u65b0\u9c9c\u5ea6\u7684\u5168\u96c6\u3002\u6bcf\u4e2a\u516c\u5171\u5165\u53e3\u6309 hand-off \u00a74.3 \u8bf4\u660e\uff1a\u7b7e\u540d\u3001\u8f93\u5165\u4e0e\u8f93\u51fa\u3001\u662f\u5426\u7eaf\u51fd\u6570\u3001\u6587\u4ef6/\u8fdb\u7a0b/Git/\u7f51\u7edc\u526f\u4f5c\u7528\u3001\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\u3001\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\u3001<code>since</code> \u4e0e <code>stability</code>\u3001\u6e90\u6587\u4ef6\u4e0e\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\u3001\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\u3002</p> <p>Harness \u662f\u8584\u8fd0\u884c\u65f6\uff1a\u6d88\u8d39 Contracts\uff0c\u53ea\u5b9e\u73b0\u4e1a\u52a1\u4e2d\u7acb\u673a\u5236\uff1b\u4e0d\u62e5\u6709\u4e1a\u52a1\u8bed\u4e49\u3001\u7f16\u6392\u3001Git\u3001\u7f51\u7edc\u4e0e\u7b2c\u4e8c\u8bed\u8a00\u3002\u5305\u7ea7\u5e38\u91cf\uff1a<code>HARNESS_CAPABILITIES</code>\uff0823 \u9879\u80fd\u529b\uff0c\u95ed\u96c6\uff09\u3001<code>HARNESS_EXCLUSIONS</code>\uff08\u660e\u786e\u6392\u9664 <code>business-semantics</code> / <code>workflow-orchestration</code> / <code>git-writes</code> / <code>model-calls</code> / <code>release-state</code> / <code>remote-network-access</code>\uff09\u3002</p> <p>\u80fd\u529b\u5206\u7ec4\uff08\u4e0e <code>docs/agents/capability-catalog.json</code> \u5bf9\u5e94\uff09\uff1a</p> <ul> <li>\u5951\u7ea6\u6821\u9a8c \u2192 <code>validateContractDocument</code> / <code>getValidator</code></li> <li>\u8def\u5f84\u6536\u5bb9 \u2192 <code>classifyPathInput</code> / <code>resolveContained</code> / <code>readFileContained</code></li> <li>\u4e25\u683c\u8bfb\u53d6 \u2192 <code>readFileStrict</code></li> <li>\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6 \u2192 <code>createFilesystemRootBinding</code> / <code>readFileBound</code></li> <li>\u5b8c\u6574\u6811\u89c2\u5bdf \u2192 <code>observeFilesystemTree</code></li> <li>\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03 \u2192 <code>createFixedSetPublicationManifest</code> / <code>publishFixedSet</code> / <code>replaceFixedSetAtomic</code></li> <li>\u539f\u5b50\u5199 \u2192 <code>writeFileAtomic</code></li> <li>\u4e34\u65f6\u5de5\u4f5c\u533a \u2192 <code>TemporaryWorkspace</code> / <code>withTemporaryWorkspace</code></li> <li>\u8d44\u6e90\u95ed\u5305 \u2192 <code>computeResourceClosure</code> / <code>digestBytes</code> / <code>closureContains</code></li> <li>\u8fdb\u7a0b\u76d1\u7763 \u2192 <code>superviseProcess</code> / <code>validateTimeoutPolicy</code></li> <li>\u8bf7\u6c42\u7ba1\u7ebf \u2192 <code>parseRequest</code> / <code>processRequest</code></li> <li>\u62a5\u544a \u2192 <code>validateReportModel</code> / <code>renderReportMarkdown</code> / <code>buildBinding</code> / <code>verifyBinding</code> / <code>checkReport</code></li> <li>\u5bbf\u4e3b\u9002\u914d\u673a\u5236 \u2192 <code>normalizeAdapterSource</code> / <code>buildAdapterClosure</code> / <code>materializeAdapterBuild</code> / <code>probeVersionVector</code></li> <li>\u53ef\u6267\u884c\u8eab\u4efd\u89c2\u5bdf \u2192 <code>observeExecutableIdentity</code></li> <li>\u673a\u5236\u6279\u91cf \u2192 <code>runMechanismCliBatch</code> / <code>--batch</code>\uff080.19.0 candidate\uff09</li> <li>\u6301\u4e45\u72b6\u6001\u5e95\u5ea7 \u2192 <code>openStateStore</code> / <code>appendEvent</code> / <code>readSnapshot</code> / <code>verifyStateStore</code> \u2026</li> <li>\u57fa\u7ebf\u7269\u5316 \u2192 <code>computeDirectoryDigest</code> / <code>materializeBaseline</code>\uff08FND-ADR-009\uff09</li> <li>\u53ea\u8bfb chokepoint \u2192 <code>createReadChokepoint</code>\uff08FND-ADR-009\uff09</li> <li>\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf \u2192 <code>scanSurface</code>\uff08FND-ADR-009\uff09</li> <li>token \u4e0a\u754c\u4f30\u7b97 \u2192 <code>estimateTokenUpperBound</code> / <code>estimateTokens</code>\uff08FND-ADR-009\uff09</li> <li>\u901a\u7528\u4e0a\u9650\u5b88\u536b \u2192 <code>openUsageGuard</code> / <code>appendUsageEvent</code> / <code>readUsage</code> / <code>closeUsageGuard</code>\uff08FND-ADR-009\uff09</li> <li>\u673a\u5236\u9519\u8bef \u2192 <code>HarnessError</code> / <code>mechanismError</code> / <code>HARNESS_ERROR_KINDS</code></li> </ul>"},{"location":"reference/api/harness/#\u5951\u7ea6\u6821\u9a8c-foundationharnesscontract-validation","title":"\u5951\u7ea6\u6821\u9a8c (foundation.harness.contract-validation)","text":""},{"location":"reference/api/harness/#validateContractDocument--getValidator--resolveSchemaContext--validatorCacheSize","title":"validateContractDocument / getValidator / resolveSchemaContext / validatorCacheSize","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>validateContractDocument(document, { schemaId, dialect, policy = \"strict\" } = {})</code></li> <li><code>getValidator({ schemaId, dialect, policy = \"strict\" } = {})</code></li> <li><code>resolveSchemaContext({ schemaId, dialect, policy = \"strict\" } = {})</code></li> <li><code>validatorCacheSize()</code></li> <li>\u8f93\u5165\uff1aschema \u4e0a\u4e0b\u6587\u6216\u5951\u7ea6\u6587\u6863\u3002</li> <li>\u8f93\u51fa\uff1a\u6821\u9a8c\u7ed3\u679c\uff08\u8bed\u4e49\u540c Contracts <code>validateDocument</code>\uff0c\u4f46\u7ecf Node \u8fd0\u884c\u65f6\u590d\u7528\u7f13\u5b58\uff09\uff1b\u7f13\u5b58\u5927\u5c0f\u67e5\u8be2\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08<code>getValidator</code> / <code>validateContractDocument</code> \u5199\u5165\u8fdb\u7a0b\u5185\u4ee5 schema \u4e3a\u952e\u7684\u6821\u9a8c\u5668\u7f13\u5b58\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u8fdb\u7a0b\u5185\u5185\u5b58\u7f13\u5b58\u6821\u9a8c\u5668\u5b9e\u4f8b\uff1b\u65e0\u6587\u4ef6/Git/\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6cbf\u7528 Contracts <code>SFC1001</code> / <code>SFC1002</code> / <code>SFC1006</code>\uff1b\u5e95\u5c42\u673a\u5236\u5931\u8d25\u7edf\u4e00 <code>SFC2004</code> + <code>HARNESS_ERROR_KINDS</code> \u7684 <code>kind</code>\uff08\u5982 <code>INVALID_PATH</code>\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5df2\u5b89\u88c5 <code>skill-family-contracts</code>\uff1bAjv 8.20.0\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/validation.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/validation.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5951\u7ea6\u4e1a\u52a1\u5b57\u6bb5\u8bed\u4e49\uff08\u8bed\u4e49\u5b9a\u4e49\u4ecd\u5728 Contracts\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8def\u5f84\u6536\u5bb9-foundationharnesspath-containment","title":"\u8def\u5f84\u6536\u5bb9 (foundation.harness.path-containment)","text":""},{"location":"reference/api/harness/#classifyPathInput--resolveContained--readFileContained","title":"classifyPathInput / resolveContained / readFileContained","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>classifyPathInput(input, platform = process.platform)</code></li> <li><code>resolveContained(root, relPath)</code></li> <li><code>readFileContained(root, relPath, { encoding } = {})</code></li> <li>\u8f93\u5165\uff1a\u6839\u76ee\u5f55\uff08\u6536\u5bb9\u8fb9\u754c\uff09\u4e0e\u5f85\u89e3\u6790\u7684\u76f8\u5bf9/\u7edd\u5bf9\u8def\u5f84\u3002</li> <li>\u8f93\u51fa\uff1a\u53d7\u6536\u5bb9\u7edd\u5bf9\u8def\u5f84\u6216\u8bfb\u5230\u7684\u6587\u4ef6\u5185\u5bb9\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>classifyPathInput</code> \u662f\uff1b<code>resolveContained</code> / <code>readFileContained</code> \u4e3a <code>async</code>\uff0c\u542b\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff08\u8bfb\u53d6/\u89e3\u6790\uff09\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u673a\u5236\u5931\u8d25\u629b <code>HarnessError</code>\uff08<code>SFC2004</code>\uff09+ <code>details.kind</code> \u2208 <code>{PATH_TRAVERSAL, SYMLINK_ESCAPE, REALPATH_ESCAPE, INVALID_ROOT, ABSOLUTE_PATH, WINDOWS_DRIVE_PATH, WINDOWS_PATH, UNC_PATH, INVALID_PATH, READ_FAILED}</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8c03\u7528\u65b9\u63d0\u4f9b\u660e\u786e\u6839\u76ee\u5f55\uff1b\u6240\u6709\u89e3\u6790\u7ed3\u679c\u5fc5\u987b\u843d\u5728\u6839\u76ee\u5f55\u5185\uff1bWindows \u76d8\u7b26/UNC \u9003\u9038\u540c\u6837\u62d2\u7edd\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/paths.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/containment.test.mjs</code>\u3001<code>boundaries.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u54ea\u4e9b\u8def\u5f84\u662f\u4e1a\u52a1\u5141\u8bb8\u7684\u9009\u62e9\u89c4\u5219\uff08\u4e1a\u52a1\u9009\u62e9\u8bed\u4e49\u7559\u5728\u8c03\u7528\u65b9\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u4e25\u683c\u8bfb\u53d6-foundationharnessstrict-read","title":"\u4e25\u683c\u8bfb\u53d6 (foundation.harness.strict-read)","text":""},{"location":"reference/api/harness/#readFileStrict","title":"readFileStrict","text":"<ul> <li>\u7b7e\u540d\uff1a<code>readFileStrict(root, relPath, { encoding?, expectedSha256? } = {})</code>\uff08async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u6536\u5bb9\u6839\u76ee\u5f55\u3001\u76f8\u5bf9\u6587\u4ef6\u8def\u5f84\uff0c\u53ef\u9009\u7684 <code>utf8</code> \u7f16\u7801\u4e0e\u5c0f\u5199 sha256 \u9884\u671f\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u51bb\u7ed3\u56de\u6267 <code>{ path, content, sha256, bytes, mode }</code>\u3002\u6307\u5b9a <code>utf8</code> \u65f6\uff0c<code>content</code> \u662f\u5b57\u7b26\u4e32\uff1b\u7701\u7565\u7f16\u7801\u65f6\uff0c<code>content</code> \u662f <code>Buffer</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff0c\u51fd\u6570\u53ea\u8bfb\u4e00\u4e2a\u53d7\u6536\u5bb9\u7684\u666e\u901a\u6587\u4ef6\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u6267\u884c <code>lstat</code>\u3001<code>open</code>\u3001<code>read</code> \u4e0e\u6587\u4ef6\u8eab\u4efd\u590d\u6838\uff1b\u4e0d\u5199\u6587\u4ef6\uff0c\u4e0d\u8bbf\u95ee Git \u6216\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u5931\u8d25\u4f7f\u7528 <code>SFC2004</code>\u3002\u7f3a\u5931\u6587\u4ef6\u8fd4\u56de <code>missing-resource</code>\uff0c\u6458\u8981\u4e0d\u7b26\u8fd4\u56de <code>content-guard-rejected</code>\uff0c\u76ee\u5f55\u8fd4\u56de <code>read-failed</code>\uff0c\u8d8a\u754c\u8def\u5f84\u6cbf\u7528\u8def\u5f84\u6536\u5bb9\u7684\u5931\u8d25\u79cd\u7c7b\u3002</li> <li>\u7b26\u53f7\u94fe\u63a5\u8fb9\u754c\uff1a\u53f6\u8282\u70b9\u7b26\u53f7\u94fe\u63a5\u59cb\u7ec8\u62d2\u7edd\u3002\u7956\u5148\u76ee\u5f55\u53ef\u4ee5\u662f\u6307\u5411\u6839\u5185\u76ee\u5f55\u7684\u7b26\u53f7\u94fe\u63a5\uff1b\u5176\u89c4\u8303\u8def\u5f84\u4ecd\u987b\u53d7 <code>root</code> \u6536\u5bb9\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>expectedSha256</code> \u7684\u6765\u6e90\u4e0e\u4fe1\u4efb\u7531\u8c03\u7528\u65b9\u8d1f\u8d23\uff1b\u6458\u8981\u53ea\u8986\u76d6\u5b9e\u9645\u8bfb\u5230\u7684\u5b57\u8282\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.6.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/strict-read.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/strict-read.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9009\u62e9\u54ea\u4e2a\u6743\u5a01\u6587\u4ef6\u3001\u6458\u8981\u4ece\u4f55\u800c\u6765\uff0c\u4ee5\u53ca\u8bfb\u53d6\u5931\u8d25\u540e\u7684\u5904\u7f6e\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6-foundationharnessbound-read","title":"\u8eab\u4efd\u7ed1\u5b9a\u8bfb\u53d6 (foundation.harness.bound-read)","text":""},{"location":"reference/api/harness/#createFilesystemRootBinding--readFileBound","title":"createFilesystemRootBinding / readFileBound","text":"<ul> <li>\u7b7e\u540d\uff1a<code>createFilesystemRootBinding(root)</code>\uff1b<code>readFileBound(root, relPath, { rootBinding, encoding?, expectedSha256? } = {})</code>\uff08\u5747\u4e3a async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u5df2\u89c4\u8303\u5316\u7684\u7edd\u5bf9\u771f\u5b9e\u76ee\u5f55\u3001\u53d7\u6536\u5bb9\u7684\u76f8\u5bf9 POSIX \u8def\u5f84\uff0c\u4ee5\u53ca\u8c03\u7528\u65b9\u5148\u524d\u6279\u51c6\u7684\u51bb\u7ed3\u6839\u7ed1\u5b9a\u3002<code>encoding</code> \u4ec5\u652f\u6301 <code>utf8</code>\uff1b\u6743\u5a01\u8bfb\u53d6\u53ef\u5e26\u5c0f\u5199 sha256 \u9884\u671f\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u6839\u7ed1\u5b9a\u4e3a\u51bb\u7ed3\u53ef\u5e8f\u5217\u5316\u503c\uff1b\u8bfb\u53d6\u56de\u6267\u4e3a\u51bb\u7ed3 <code>{ path, content, sha256, bytes, mode, statMode }</code>\u3002<code>mode</code> \u4fdd\u6301\u65e7\u517c\u5bb9\u542b\u4e49\uff08<code>st_mode &amp; 0o777</code>\uff09\uff1b<code>statMode</code> \u662f\u540c\u6b21\u539f\u751f\u6253\u5f00\u63cf\u8ff0\u7b26 <code>fstat</code> \u5f97\u5230\u7684\u5b8c\u6574 POSIX <code>st_mode</code>\uff0c\u5305\u62ec\u6587\u4ef6\u7c7b\u578b\u4e0e\u7279\u6b8a\u6743\u9650\u4f4d\u3002</li> <li>\u8bed\u4e49\u8fb9\u754c\uff1a\u6839\u4e0e\u4e2d\u95f4\u76ee\u5f55\u7531\u56fa\u5b9a\u56db\u5e73\u53f0 N-API \u95ed\u5305\u4ee5\u4e0d\u8ddf\u968f\u7b26\u53f7\u94fe\u63a5\u7684\u53e5\u67c4\u76f8\u5bf9\u65b9\u5f0f\u83b7\u53d6\uff1b\u53f6\u5b50\u5fc5\u987b\u662f\u5355\u94fe\u63a5\u666e\u901a\u6587\u4ef6\u3002\u53e5\u67c4\u4e0d\u4f1a\u9003\u9038\uff0c\u8c03\u7528\u7ed3\u675f\u524d\u5173\u95ed\u3002\u7ed1\u5b9a\u8bfb\u53d6\u4e0d\u63d0\u4f9b\u5220\u9664\u6216\u6062\u590d\u72b6\u6001\u673a\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff1b\u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u89e6 Git\u3001\u7f51\u7edc\u6216\u8fdb\u7a0b\u3002</li> <li>\u9519\u8bef\uff1a\u6839\u8eab\u4efd\u4e0d\u7b26\u3001\u7b26\u53f7\u94fe\u63a5\u7ec4\u4ef6\u3001\u7f3a\u5931\u8d44\u6e90\u548c\u6458\u8981\u4e0d\u7b26\u5747\u5931\u8d25\u5173\u95ed\uff1b\u4e0d\u652f\u6301\u7684 Darwin/Linux \u67b6\u6784\u4e0d\u63d0\u4f9b JavaScript \u56de\u9000\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.9.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/bound-read.mjs</code> \u4e0e <code>src/native/</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/bound-read.test.mjs</code>\u3002</li> </ul>"},{"location":"reference/api/harness/#\u5b8c\u6574\u6811\u89c2\u5bdf-foundationharnessfilesystem-tree-observation","title":"\u5b8c\u6574\u6811\u89c2\u5bdf (foundation.harness.filesystem-tree-observation)","text":""},{"location":"reference/api/harness/#observeFilesystemTree","title":"observeFilesystemTree","text":"<ul> <li>\u7b7e\u540d\uff1a<code>observeFilesystemTree({ root, rootBinding, symlinkPolicy?: { mode: \"reject\" | \"record\" } })</code>\uff08async\uff09\u3002\u8c03\u7528\u65b9\u5148\u7528\u65e2\u6709 <code>createFilesystemRootBinding</code> \u6279\u51c6\u6839\u76ee\u5f55\u3002</li> <li>\u8f93\u5165\uff1a\u5df2\u89c4\u8303\u5316\u7684\u771f\u5b9e\u7edd\u5bf9\u76ee\u5f55\u53ca\u5176\u6839\u7ed1\u5b9a\u3002\u6bcf\u6b21\u8c03\u7528\u91cd\u65b0\u8bfb\u53d6\u76ee\u5f55\u548c\u666e\u901a\u6587\u4ef6\uff0c\u7a7a\u6811\u5408\u6cd5\u3002</li> <li>\u8f93\u51fa\uff1a\u79c1\u6709 <code>filesystem-tree-observation</code>\uff0c\u542b\u6309\u8def\u5f84\u6392\u5e8f\u7684\u5b8c\u6574\u6210\u5458\u3001\u6839\u7ed1\u5b9a\u548c <code>membersDigest</code>\u3002\u6587\u4ef6\u6210\u5458\u5305\u542b\u540c\u6b21\u8bfb\u53d6\u7684 <code>contentBase64</code>\u3001<code>sha256</code>\u3001<code>bytes</code> \u4e0e\u5b8c\u6574 POSIX <code>statMode</code>\uff1b\u76ee\u5f55\u6210\u5458\u53ea\u542b\u8def\u5f84\u3001\u7c7b\u578b\u548c\u6a21\u5f0f\uff0c\u4e0d\u4f2a\u9020\u6587\u4ef6\u6458\u8981\u3002\u7701\u7565 <code>symlinkPolicy</code> \u6216\u4f7f\u7528 <code>reject</code> \u65f6\u4fdd\u6301 0.14 \u7684 UTF-16 \u5173\u7cfb\u987a\u5e8f\u548c\u65e2\u6709\u539f\u751f\u8bed\u4e49\uff1b<code>record</code> \u5728\u7a33\u5b9a\u3001\u8c03\u7528\u65b9\u9694\u79bb\u4e14\u65e0\u5e76\u53d1 namespace writer \u7684\u672c\u5730\u6811\u4e0a\u8d70 Node/JS \u5206\u652f\uff0c\u4f7f\u7528 Unicode \u7801\u70b9\u987a\u5e8f\uff0c\u8bb0\u5f55 symlink \u81ea\u8eab\u7684 <code>targetBase64</code>\u3001<code>bytes</code>\u3001<code>statMode</code>\uff0c\u7edd\u4e0d\u8bfb\u53d6\u6216\u9012\u5f52 target\u3002<code>membersDigest</code> \u6309\u6240\u9009\u6a21\u5f0f\u7684\u6210\u5458\u987a\u5e8f\u63a8\u5bfc\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\uff0c\u4e0d\u5b89\u88c5\u3001\u4e0d\u542f\u52a8\u8fdb\u7a0b\u3001\u4e0d\u8bbf\u95ee\u7f51\u7edc\u3002\u7ed3\u679c\u542b\u539f\u59cb\u6587\u4ef6\u5185\u5bb9\uff0c\u8c03\u7528\u65b9\u5fc5\u987b\u4fdd\u62a4\u654f\u611f\u6570\u636e\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u53c2\u6570\u4e0d\u5408\u6cd5\u629b <code>TypeError</code>\uff0c\u673a\u5236\u5931\u8d25\u6cbf <code>SFC2004</code> \u5173\u95ed\uff0c\u4e0d\u628a\u90e8\u5206\u89c2\u5bdf\u62a5\u544a\u4e3a\u6210\u529f\u3002record \u68c0\u6d4b\u5230\u89c2\u5bdf\u671f\u95f4\u7684\u6f02\u79fb\u5373\u5931\u8d25\u5173\u95ed\uff0c\u666e\u901a\u6587\u4ef6\u590d\u7528 <code>readFileBound</code>\uff0c\u786c\u94fe\u63a5\u4e0e\u7279\u6b8a\u6587\u4ef6\u7ee7\u7eed\u62d2\u7edd\u3002</li> <li>\u4fdd\u8bc1\u8fb9\u754c\uff1a\u6bcf\u6b21\u68c0\u67e5\u540c\u4e00\u6839\u7ed1\u5b9a\uff0c\u4e0d\u4f7f\u7528\u65e7\u7f13\u5b58\uff1brecord \u662f best-effort candidate\uff0c\u4e0d\u627f\u8bfa\u4e8b\u52a1\u5feb\u7167\u3001\u540c UID \u6076\u610f\u5e76\u53d1\u6216 ABA \u5b89\u5168\u3002\u6d88\u8d39\u8005\u8d1f\u8d23\u5728\u5bbf\u4e3b\u547d\u4ee4\u5b8c\u6210\u540e\u8c03\u7528\uff0c\u5e76\u4fdd\u7559 npm <code>.bin</code> \u7b49\u9886\u57df\u63a5\u53d7\u89c4\u5219\uff1b\u771f\u5b9e\u6076\u610f\u5e76\u53d1\u5a01\u80c1\u5e94\u4ea4\u56de Foundation\uff0c\u4e0d\u5728\u672c\u5730\u590d\u5236 walker\u3001native addon\u3001Harness\u3001schema\u3001Registry\u3001runner \u6216 receipt \u94fe\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.13.0</code> / <code>candidate</code>\u3002\u89c2\u5bdf\u5b8c\u6210\u4e0d\u7b49\u4e8e\u6d88\u8d39\u8005\u63a5\u53d7\u8f7d\u8377\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/filesystem-observation.mjs</code> \u4e0e <code>src/native/bound_read.c</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\uff1a<code>packages/skill-family-engineering-kit/test/plugin-verification.test.mjs</code> \u7684\u5b9e\u9645\u6811\u89c2\u5bdf\u4e0e\u8f7d\u8377\u653f\u7b56\u7ec4\u5408\u6d4b\u8bd5\u3002</li> </ul>"},{"location":"reference/api/harness/#\u53ef\u6267\u884c\u8eab\u4efd\u89c2\u5bdf-foundationharnessexecutable-identity-observation","title":"\u53ef\u6267\u884c\u8eab\u4efd\u89c2\u5bdf (foundation.harness.executable-identity-observation)","text":""},{"location":"reference/api/harness/#observeExecutableIdentity","title":"observeExecutableIdentity","text":"<ul> <li>\u7b7e\u540d\uff1a<code>observeExecutableIdentity({ boundRoots, lookup, interpreterPolicy? })</code>\uff08async\uff09\u3002</li> <li>\u8f93\u5165\uff1a\u8c03\u7528\u65b9\u63d0\u4f9b\u7684\u975e\u91cd\u53e0\u771f\u5b9e\u6839\u7ed1\u5b9a\u3001\u7edd\u5bf9\u8def\u5f84\u6216\u663e\u5f0f <code>pathEntries</code> \u67e5\u627e\uff0c\u4ee5\u53ca\u53ef\u9009\u7684\u663e\u5f0f\u89e3\u91ca\u5668\u6839\u7b56\u7565\uff1b\u4e0d\u8bfb\u53d6 ambient <code>PATH</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u9010\u6b21\u53ea\u8bfb\u7684\u53ef\u6267\u884c\u5165\u53e3\u89c2\u5bdf\uff0c\u542b <code>canonicalEntry</code>\u3001symlinkChain\u3001<code>sha256</code>\u3001<code>bytes</code>\u3001<code>statMode</code>\u3001<code>entryKind</code>\u3001\u89e3\u91ca\u5668\u4e0e <code>launch</code> \u8ba1\u5212\u3002<code>/usr/bin/env</code> shebang \u901a\u8fc7\u663e\u5f0f <code>pathEntries</code> \u627e\u5230\u89e3\u91ca\u5668\u65f6\uff0c\u89e3\u91ca\u5668\u89c2\u5bdf\u4fdd\u7559\u5019\u9009\u5165\u53e3\u7684\u5b8c\u6574 symlink chain\uff0c\u4e0d\u6298\u53e0\u6210\u6700\u7ec8\u6587\u4ef6\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb <code>lstat</code> / <code>readlink</code> \u4e0e\u65e2\u6709 <code>readFileBound</code>\uff1b\u4e0d\u542f\u52a8\u8fdb\u7a0b\u3001\u4e0d\u5199\u6587\u4ef6\u3001\u4e0d\u4f7f\u7528\u8de8\u8c03\u7528\u7f13\u5b58\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u8def\u5f84\u8d8a\u754c\u3001\u7b26\u53f7\u94fe\u63a5\u6f02\u79fb\u6216\u5faa\u73af\u3001\u975e\u5355\u94fe\u63a5\u53ef\u6267\u884c\u666e\u901a\u6587\u4ef6\u3001\u89e3\u91ca\u5668\u7b56\u7565\u4e0d\u7b26\u53ca\u5b57\u8282\u53d8\u5316\u5747\u5931\u8d25\u5173\u95ed\uff1b\u4e0d\u8fd4\u56de\u90e8\u5206\u8eab\u4efd\u7ed3\u679c\u3002</li> <li>\u4fdd\u8bc1\u8fb9\u754c\uff1a\u8fd9\u662f\u9010\u6b21\u70b9\u65f6\u89c2\u5bdf\uff0c\u8c03\u7528\u65b9\u5fc5\u987b\u5728\u6b63\u5f0f\u542f\u52a8\u524d\u7d27\u90bb\u91cd\u89c2\u5bdf\u3002\u5b83\u4e0d\u8bc1\u660e wrapper \u63a7\u5236\u6d41\u3001ambient PATH\u3001fd-exec\u3001\u5185\u6838\u6700\u7ec8\u6620\u50cf\u3001\u7b7e\u540d\u4fe1\u4efb\u3001\u8de8\u8c03\u7528\u8fde\u7eed\u8eab\u4efd\u3001\u5bbf\u4e3b\u652f\u6301/\u751f\u547d\u5468\u671f\u6216\u9886\u57df\u63a5\u53d7\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.15.0</code> / <code>candidate</code>\u3002\u89c2\u5bdf\u5b8c\u6210\u4e0d\u7b49\u4e8e\u5bbf\u4e3b\u8d44\u683c\u6216\u542f\u52a8\u6388\u6743\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/executable-identity.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\uff1a<code>packages/skill-family-harness-node/test/foundation-015-harness.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u547d\u4ee4\u9009\u62e9\u3001\u6b63\u5f0f\u542f\u52a8\u3001wrapper/argv \u8bed\u4e49\u3001\u7b7e\u540d\u4e0e\u8ba4\u8bc1\u4fe1\u4efb\u3001\u5bbf\u4e3b\u652f\u6301/\u751f\u547d\u5468\u671f\u8d44\u683c\u3001\u9886\u57df\u63a5\u53d7\u53ca\u91cd\u89c2\u5bdf\u65f6\u673a\u3002</li> </ul>"},{"location":"reference/api/harness/#\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03-foundationharnessfixed-set-publication","title":"\u56fa\u5b9a\u96c6\u5408\u53d1\u5e03 (foundation.harness.fixed-set-publication)","text":""},{"location":"reference/api/harness/#createFixedSetPublicationManifest--publishFixedSet","title":"createFixedSetPublicationManifest / publishFixedSet","text":"<ul> <li>\u7b7e\u540d\uff1a<code>createFixedSetPublicationManifest({ sourceRoot, targetParent, targetSegment })</code>\uff1b<code>publishFixedSet({ sourceRoot, targetParent, targetSegment, manifest })</code>\uff08\u5747\u4e3a async\uff09\u3002\u7a33\u5b9a\u5165\u53e3\u4e5f\u7531 <code>skill-family-harness-node/fixed-set-publication</code> \u5bfc\u51fa\u3002</li> <li>\u8f93\u5165\uff1a\u540c\u4e00\u89c4\u8303\u7236\u76ee\u5f55\u4e0b\u7684\u6e90\u76ee\u5f55\u3001\u76ee\u6807\u7236\u76ee\u5f55\u3001\u4e00\u4e2a\u5b89\u5168\u76ee\u6807\u6bb5\u548c\u6b64\u524d\u51bb\u7ed3\u7684\u5b8c\u6574\u96c6\u5408 manifest\u3002</li> <li>\u8f93\u51fa\uff1a\u5b8c\u6574\u96c6\u5408 manifest \u4e0e\u7ed3\u6784\u5316 publication receipt\u3002receipt \u7ec8\u6001\u4e3a <code>succeeded</code>\u3001<code>refused</code>\u3001<code>failed</code> \u6216 <code>indeterminate</code>\u3002</li> <li>\u8bed\u4e49\u8fb9\u754c\uff1a\u53d1\u5e03\u4f7f\u7528 Darwin <code>renameatx_np(RENAME_EXCL)</code> \u6216 Linux <code>renameat2(RENAME_NOREPLACE)</code> \u7684\u56fa\u5b9a\u539f\u751f\u95ed\u5305\uff1b\u4e0d\u4f7f\u7528\u68c0\u67e5\u540e <code>rename</code> \u7684 JavaScript \u66ff\u4ee3\uff0c\u4e0d\u63d0\u4f9b\u8eab\u4efd\u4fdd\u62a4\u5220\u9664\uff0c\u4e0d\u81ea\u52a8\u91cd\u8bd5\u3001\u56de\u6eda\u6216\u6062\u590d <code>indeterminate</code>\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u4ec5\u5728\u6210\u529f\u65f6\u5bf9\u76ee\u6807\u76ee\u5f55\u6267\u884c\u4e00\u6b21\u4e0d\u66ff\u6362\u53d1\u5e03\uff1b\u5931\u8d25\u5173\u95ed\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.9.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/fixed-set-publication.mjs</code> \u4e0e\u56fa\u5b9a\u539f\u751f\u52a0\u8f7d\u5668\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/stable-filesystem-operations.test.mjs</code> \u4e0e\u65e2\u6709\u56fa\u5b9a\u96c6\u5408\u8fb9\u754c\u6d4b\u8bd5\u3002</li> </ul>"},{"location":"reference/api/harness/#replaceFixedSetAtomic","title":"replaceFixedSetAtomic","text":"<ul> <li>\u7b7e\u540d\uff1a<code>replaceFixedSetAtomic({ sourceRoot, targetParent, targetSegment })</code>\uff08async\uff09\u3002\u5305\u6839\u4e0e <code>skill-family-harness-node/fixed-set-publication</code> \u5b50\u8def\u5f84\u5747\u5bfc\u51fa\u3002</li> <li>\u8f93\u5165\uff1a\u5df2\u7ecf\u5b8c\u6574\u751f\u6210\u7684\u771f\u5b9e <code>sourceRoot</code>\u3001\u89c4\u8303 <code>targetParent</code> \u548c\u4e00\u4e2a\u5b89\u5168 <code>targetSegment</code>\u3002\u6e90\u76ee\u5f55\u4e0e\u65e2\u6709\u76ee\u6807\u5fc5\u987b\u662f\u540c\u4e00\u89c4\u8303\u7236\u76ee\u5f55\u4e0b\u7684\u5144\u5f1f\u76ee\u5f55\uff1b\u4e24\u68f5\u6811\u53ea\u5141\u8bb8\u771f\u5b9e\u76ee\u5f55\u4e0e\u5355\u94fe\u63a5\u666e\u901a\u6587\u4ef6\u3002</li> <li>\u8f93\u51fa\uff1a\u786e\u8ba4\u6210\u529f\u65f6\u8fd4\u56de\u76ee\u6807\u8def\u5f84\u3001\u4fdd\u7559\u65e7\u76ee\u6807\u7684 <code>displacedTargetPath</code>\uff0c\u4ee5\u53ca <code>publicationState=published</code>\u3001<code>commitState=exchange-committed</code>\u3001<code>verification=verified</code>\u3001<code>durability=namespace-synced</code> \u548c\u4e24\u68f5\u6811\u7684\u95ed\u5305\u6458\u8981\u3002</li> <li>\u63d0\u4ea4\u8bed\u4e49\uff1a\u590d\u9a8c\u7236\u76ee\u5f55\u3001\u6e90\u548c\u76ee\u6807\u8eab\u4efd\u540e\uff0c\u5728\u540c\u4e00\u7236\u76ee\u5f55\u53e5\u67c4\u4e0b\u53ea\u6267\u884c\u4e00\u6b21 Darwin <code>RENAME_SWAP</code> \u6216 Linux <code>RENAME_EXCHANGE</code>\u3002\u6210\u529f\u540e\uff0c\u65b0\u96c6\u5408\u5b8c\u6574\u4f4d\u4e8e\u76ee\u6807\u8def\u5f84\uff0c\u88ab\u7f6e\u6362\u7684\u65e7\u76ee\u6807\u5b8c\u6574\u7559\u5728\u539f <code>sourceRoot</code>\uff1bFoundation \u4e0d\u5220\u9664\u4efb\u4e00\u76ee\u5f55\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u53d7\u652f\u6301\u7684\u63d0\u4ea4\u524d\u5931\u8d25\u4fdd\u6301\u539f\u76ee\u6807\u8def\u5f84\u548c\u5b57\u8282\u4e0d\u53d8\u3002\u673a\u5236\u5931\u8d25\u629b <code>SFC2004</code> + <code>details.kind=atomic-replace-failed</code>\uff1b<code>details</code> \u540c\u65f6\u7ed9\u51fa <code>phase</code>\u3001<code>publicationState</code>\u3001<code>commitState</code>\u3001<code>verification</code> \u4e0e <code>durability</code>\u3002\u4e0d\u652f\u6301\u7684\u5e73\u53f0\u4f7f\u7528 <code>details.kind=unsupported-platform</code>\u3002</li> <li>\u91cd\u8bd5\u8fb9\u754c\uff1a\u8be5\u64cd\u4f5c\u4e0d\u662f\u5e42\u7b49\u64cd\u4f5c\u3002\u76f8\u540c\u53c2\u6570\u518d\u6b21\u8c03\u7528\u4f1a\u4ea4\u6362\u56de\u539f\u72b6\u6001\uff1b\u786e\u8ba4\u6210\u529f\u540e\uff0c\u6216\u6536\u5230\u63d0\u4ea4\u540e\u53ca\u4e0d\u786e\u5b9a\u9519\u8bef\u65f6\uff0c\u4e0d\u5f97\u76f2\u76ee\u91cd\u8bd5\u3002Foundation \u4e0d\u81ea\u52a8\u6267\u884c\u7b2c\u4e8c\u6b21\u4ea4\u6362\u3001\u56de\u6eda\u6216\u6e05\u7406\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.18.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/fixed-set-publication.mjs</code>\u3001\u7a33\u5b9a\u539f\u751f\u52a0\u8f7d\u5668\u4e0e\u56fa\u5b9a\u9884\u6784\u5efa\u95ed\u5305\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/stable-filesystem-operations.test.mjs</code>\uff1bEngineering Kit \u79bb\u7ebf\u6295\u5f71\u7531 <code>packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs</code> \u8986\u76d6\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6682\u5b58\u76ee\u5f55\u7684\u751f\u547d\u5468\u671f\u3001\u6210\u529f\u540e\u7684\u65e7\u76ee\u6807\u6e05\u7406\uff0c\u4ee5\u53ca\u63d0\u4ea4\u540e\u6216\u4e0d\u786e\u5b9a\u5931\u8d25\u7684\u53d6\u8bc1\u4e0e\u6062\u590d\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/harness/#\u539f\u5b50\u5199-foundationharnessatomic-write","title":"\u539f\u5b50\u5199 (foundation.harness.atomic-write)","text":""},{"location":"reference/api/harness/#writeFileAtomic","title":"writeFileAtomic","text":"<ul> <li>\u7b7e\u540d\uff1a<code>writeFileAtomic(root, relPath, data, { mode = 0o644 } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u5df2\u6536\u5bb9\u76ee\u6807\u8def\u5f84\u3001\u6587\u4ef6\u5185\u5bb9\uff08<code>string</code> \u6216 <code>Buffer</code>\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u5199\u5165\u5b8c\u6210\u7684\u6587\u4ef6\uff0c\u5b57\u8282\u4e0e\u8f93\u5165\u4e00\u81f4\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u843d\u76d8\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u6839\u76ee\u5f55\u5185\u521b\u5efa\u4e34\u65f6\u6587\u4ef6\uff0c\u5148 <code>fsync</code> \u518d <code>rename</code> \u8986\u76d6\u76ee\u6807\uff1b\u5931\u8d25\u65f6\u56de\u6eda\u4e34\u65f6\u6587\u4ef6\u3001\u4e0d\u7559\u6b8b\u5f71\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8d8a\u754c\u8def\u5f84\u629b <code>SFC2004</code> + <code>PATH_TRAVERSAL</code>/\u8d8a\u754c\u7c7b <code>kind</code>\uff1b\u975e\u6cd5\u6570\u636e\u7c7b\u578b / \u5199\u5931\u8d25 <code>+ ATOMIC_WRITE_FAILED</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u76ee\u6807\u8def\u5f84\u7ecf <code>path-containment</code> \u9a8c\u8bc1\u5728\u6839\u76ee\u5f55\u5185\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/atomic.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/atomic.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5199\u5165\u5185\u5bb9\u7684\u4e1a\u52a1\u6b63\u786e\u6027\u3002</li> </ul>"},{"location":"reference/api/harness/#\u4e34\u65f6\u5de5\u4f5c\u533a-foundationharnesstemporary-workspace","title":"\u4e34\u65f6\u5de5\u4f5c\u533a (foundation.harness.temporary-workspace)","text":""},{"location":"reference/api/harness/#TemporaryWorkspace--createTemporaryWorkspace--withTemporaryWorkspace","title":"TemporaryWorkspace / createTemporaryWorkspace / withTemporaryWorkspace","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>class TemporaryWorkspace</code>\uff08\u6784\u9020 <code>(options)</code>\uff09</li> <li><code>createTemporaryWorkspace(options)</code>\uff08async\uff09</li> <li><code>withTemporaryWorkspace(fn, options)</code>\uff08async\uff0c\u56de\u8c03\u5f0f\u751f\u547d\u5468\u671f\uff09</li> <li>\u8f93\u5165\uff1a\u53ef\u9009\u524d\u7f00/\u6807\u7b7e\u3002</li> <li>\u8f93\u51fa\uff1a\u4e34\u65f6\u5de5\u4f5c\u76ee\u5f55\u53e5\u67c4\uff1b<code>with</code> \u5728\u56de\u8c03\u7ed3\u675f\u540e\u6e05\u7406\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u521b\u5efa\u5e76\u5220\u9664\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u5b50\u76ee\u5f55\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u5bbf\u4e3b\u4e34\u65f6\u76ee\u5f55\u521b\u5efa\u5b50\u76ee\u5f55\uff0c\u9000\u51fa/\u5f02\u5e38\u65f6\u5220\u9664\uff1b\u4e0d\u6301\u4e45\u5316\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u521b\u5efa\u5931\u8d25 <code>+ WORKSPACE_CREATE_FAILED</code>\uff1b\u6e05\u7406\u5931\u8d25 <code>+ WORKSPACE_DISPOSE_FAILED</code>\uff1b\u5df2\u91ca\u653e\u540e\u4f7f\u7528 <code>+ WORKSPACE_DISPOSED</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u5bbf\u4e3b\u63d0\u4f9b\u53ef\u5199\u4e34\u65f6\u76ee\u5f55\uff08\u5982 <code>os.tmpdir</code>\uff09\uff1b\u8def\u5f84\u4e0d\u9003\u9038\u51fa\u5bbf\u4e3b\u4e34\u65f6\u6839\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/workspace.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/workspace.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e34\u65f6\u4ea7\u7269\u7684\u6700\u7ec8\u53bb\u5904\uff08\u6301\u4e45\u6001\u8f6c <code>state-store</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8d44\u6e90\u95ed\u5305-foundationharnessresource-closure","title":"\u8d44\u6e90\u95ed\u5305 (foundation.harness.resource-closure)","text":""},{"location":"reference/api/harness/#computeResourceClosure--digestBytes--closureContains","title":"computeResourceClosure / digestBytes / closureContains","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>computeResourceClosure({ root, resources } = {})</code>\uff08async\uff09</li> <li><code>digestBytes(bytes)</code></li> <li><code>closureContains(closure, relPath)</code></li> <li>\u8f93\u5165\uff1a\u8d44\u6e90\u5217\u8868\uff08\u8def\u5f84 + \u5185\u5bb9\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u786e\u5b9a\u6027\u95ed\u5305\u5bf9\u8c61\u4e0e sha256 \u6458\u8981\uff1b<code>closureContains</code> \u5224\u5b9a\u67d0\u76f8\u5bf9\u8def\u5f84\u662f\u5426\u5728\u95ed\u5305\u5185\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>digestBytes</code> / <code>closureContains</code> \u662f\uff1b<code>computeResourceClosure</code> \u542b\u6309 <code>root</code> \u8bfb\u53d6\u8d44\u6e90\uff0c\u5c5e\u53d7\u63a7\u53ea\u8bfb\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u6309 <code>root</code> \u53ea\u8bfb\u8bfb\u53d6\u8d44\u6e90\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u6cd5/\u91cd\u590d\u8d44\u6e90\u58f0\u660e\u629b <code>SFC2004</code> + <code>CLOSURE_CONFLICT</code> / <code>MISSING_RESOURCE</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8d44\u6e90\u4e3a\u53ef\u5e8f\u5217\u5316\u6587\u672c\u6761\u76ee\uff08\u4e8c\u8fdb\u5236\u6295\u5f71\u660e\u786e unsupported\uff09\uff1b\u53bb\u91cd\u4e0e\u6392\u5e8f\u56fa\u5b9a\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/closure.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/closure.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u8d44\u6e90\u4e1a\u52a1\u542b\u4e49\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8fdb\u7a0b\u76d1\u7763-foundationharnesssupervise-process","title":"\u8fdb\u7a0b\u76d1\u7763 (foundation.harness.supervise-process)","text":""},{"location":"reference/api/harness/#superviseProcess--validateTimeoutPolicy","title":"superviseProcess / validateTimeoutPolicy","text":"<ul> <li>\u7b7e\u540d\uff1a<code>superviseProcess(options, deps = {})</code>\uff08async\uff09\uff1b<code>validateTimeoutPolicy(policy)</code>\u3002</li> <li>\u8f93\u5165\uff1a\u53d7\u7ea6\u675f\u7684 command\u3001args\u3001cwd\u3001\u73af\u5883\u3001\u8d85\u65f6\u7b56\u7565\u4e0e\u65e2\u6709\u76d1\u7763\u9009\u9879\u30020.11.0 \u53ef\u9009 <code>rawSink</code> \u53ea\u63a5\u53d7 <code>{ root, stdoutFile, stderrFile, onClosed? }</code>\uff1a\u6839\u5fc5\u987b\u5728\u6253\u5f00\u65f6\u5df2\u662f fresh canonical \u76ee\u5f55\uff0c\u4e24\u4e2a\u6587\u4ef6\u540d\u5fc5\u987b\u662f\u4e0d\u540c\u7684\u5355\u6bb5\u76f8\u5bf9\u540d\u3002</li> <li>\u53ef\u9009\u6bcf\u6d41\u4e0a\u9650\uff1a<code>outputByteLimits</code> \u4e3a <code>{ stdout?, stderr? }</code>\uff0c\u81f3\u5c11\u58f0\u660e\u4e00\u6d41\uff0c\u5404\u503c\u4e3a 0 \u5230 <code>Number.MAX_SAFE_INTEGER</code> \u7684\u6574\u6570\u3002\u6309\u539f\u59cb\u5b57\u8282\u72ec\u7acb\u8ba1\u6570\uff0c\u7b49\u4e8e\u4e0a\u9650\u5141\u8bb8\uff0c\u9996\u6b21\u8d85\u8fc7\u4e0a\u9650\u8fdb\u5165\u65e2\u6709\u8fdb\u7a0b\u7ec4\u7ec8\u6b62\u6d41\u7a0b\u3002</li> <li>\u8f93\u51fa\uff1a\u4e00\u4e2a\u65e2\u6709\u7684 <code>watchdog-termination-envelope</code>\u3002<code>rawSink.onClosed</code> \u53ea\u63a5\u6536\u51bb\u7ed3\u7684 stdout/stderr <code>{ sha256, bytes }</code> \u6458\u8981\uff1b \u5b83\u4e0d\u521b\u5efa\u7b2c\u4e8c\u79cd\u516c\u5f00 envelope \u6216 receipt\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u542f\u52a8\u4e00\u4e2a\u53d7\u76d1\u7763\u5b50\u8fdb\u7a0b\u3002raw sink \u5728 spawn \u524d\u4ee5 exclusive/no-follow\u30010600 \u6253\u5f00\u4e24\u4e2a\u6587\u4ef6\uff0c\u76f4\u5230 child <code>close</code>\u3001\u4e24\u4e2a stream <code>close</code>\u3001\u5168\u90e8\u6392\u961f\u5199\u5165\u3001<code>fsync</code> \u548c handle <code>close</code> \u90fd\u5b8c\u6210\u624d\u7ed3\u675f\uff1bexit \u540e\u5230\u8fbe\u7684\u5b57\u8282\u4ecd\u8ba1\u5165\u6458\u8981\u3002</li> <li>\u9650\u989d\u7ed3\u679c\uff1a\u4ec5\u914d\u7f6e\u4e0a\u9650\u65f6\uff0c<code>evidence</code> \u589e\u52a0 <code>outputByteLimits</code> \u548c <code>outputLimitExceeded</code>\uff1b\u8d85\u9650\u91c7\u7528 <code>output_limit_exceeded</code> \u7ec8\u6b62\u539f\u56e0\u3002\u4fdd\u5b58\u7684\u622a\u65ad\u6d41\u6458\u8981\u53ea\u8986\u76d6\u5df2\u4fdd\u5b58\u5b57\u8282\u3002\u6d41\u3001\u8fdb\u7a0b\u6216\u5199\u5165\u7ec8\u6001\u672a\u77e5\u65f6\u4ecd\u4f18\u5148\u5931\u8d25\u5173\u95ed\u3002\u672a\u914d\u7f6e\u4e0a\u9650\u4fdd\u7559\u65e7\u884c\u4e3a\u3002</li> <li>\u8eab\u4efd\u8fb9\u754c\uff1a\u8c03\u7528\u65b9\u5fc5\u987b\u5728\u6574\u4e2a\u8c03\u7528\u671f\u95f4\u72ec\u5360 raw sink \u7684\u547d\u540d\u7a7a\u95f4\u3002\u6587\u4ef6\u53e5\u67c4\u4fdd\u62a4\u4e0d\u4f1a\u8bc1\u660e\u8c03\u7528\u671f\u95f4 pathname \u6216\u6839\u76ee\u5f55\u8eab\u4efd\u59cb\u7ec8\u4e0d\u53d8\uff1b \u524d\u540e\u68c0\u67e5\u53ea\u7528\u4e8e\u5c3d\u65e9\u5931\u8d25\u3002</li> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u9009\u9879\u5f62\u72b6\u9519\u8bef\u629b <code>TypeError</code>\uff1b\u673a\u5236\u5931\u8d25\u629b <code>SFC2004</code>\uff0c\u6cbf\u65e2\u6709 <code>supervise-process-failed</code> \u9519\u8bef\u57df\u5931\u8d25\u5173\u95ed\u3002<code>rawStreamSink</code> \u4ecd\u662f\u660e\u786e\u62d2\u7edd\u7684\u540d\u79f0\uff1b\u517c\u5bb9\u522b\u540d\u3001\u7edd\u5bf9\u8def\u5f84\u3001\u591a\u6bb5\u6587\u4ef6\u540d\u3001\u76f8\u540c stdout/stderr \u540d\u79f0\u4e0e\u975e fresh \u6839\u5747\u88ab\u62d2\u7edd\u3002</li> <li>\u63a5\u7ebf\u8fb9\u754c\uff1a\u4e0d\u8981\u56e0\u4e3a\u5355\u4e00\u6d88\u8d39\u8005\u60f3\u5728\u5199\u6b63\u5f0f\u8bc1\u636e\u524d\u8131\u654f\uff0c\u5c31\u65b0\u589e <code>rawStreamSink</code>\u3001transform sink\u3001\u901a\u7528 sanitizer\u3001\u7b2c\u4e8c\u4e2a\u8fdb\u7a0b runner \u6216\u65b0\u7684\u516c\u5f00 stdout \u5b57\u6bb5/\u56de\u8c03\u3002\u73b0\u6709 <code>rawSink</code> \u9002\u5408\u8c03\u7528\u65b9\u63a5\u53d7\u5728 fresh canonical \u4e34\u65f6\u6839\u4e2d\u4ee5 0600 \u4fdd\u5b58\u539f\u59cb stdout/stderr \u6587\u4ef6\u7684\u573a\u666f\uff1bFoundation \u4e0d\u627f\u8bfa zero-plaintext-on-filesystem\uff0c\u4e5f\u4e0d\u62e5\u6709\u9886\u57df\u8131\u654f\u3001\u8de8\u6d41\u79d8\u5bc6\u53d1\u73b0\u6216\u4e8b\u540e\u906e\u76d6\u3002</li> <li>\u82e5\u6d88\u8d39\u8005\u6709\u786c\u6027\u96f6\u660e\u6587\u843d\u76d8\u8981\u6c42\uff0c\u5e94\u7531\u6d88\u8d39\u8005\u57fa\u4e8e\u660e\u786e\u5a01\u80c1\u6a21\u578b\u62e5\u6709\u8be5\u65b9\u6848\u5e76\u6682\u505c\u76f8\u5173\u8def\u5f84\u3002\u81f3\u5c11\u51fa\u73b0\u7b2c\u4e8c\u4e2a\u72ec\u7acb\u6d88\u8d39\u8005\u548c\u6e05\u6670\u5171\u540c\u5408\u540c\u524d\uff0c \u4e0d\u91cd\u5f00 Foundation \u7684\u516c\u5171\u80fd\u529b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a\u76d1\u7763\u5165\u53e3\u81ea <code>0.5.0</code> / <code>stable</code>\uff1b\u53d7\u7ea6\u675f raw sink \u81ea <code>0.11.0</code>\uff0c\u4ec5\u63d0\u4f9b\u673a\u5236\uff0c\u4e0d\u627f\u8bfa\u5bbf\u4e3b\u8d44\u683c\u3001\u8ba4\u8bc1\u3001\u9886\u57df \u5224\u65ad\u6216\u53d1\u5e03\u72b6\u6001\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/supervise-process.mjs</code>\u3002\u6b63\u53cd\u4f8b\u6d4b\u8bd5\uff1a <code>packages/skill-family-harness-node/test/supervise-process-validation.test.mjs</code>\u3001 <code>packages/skill-family-harness-node/test/supervise-process-evidence.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u53ef\u6267\u884c\u7a0b\u5e8f\u9009\u62e9\u3001\u8d85\u65f6\u7b56\u7565\u503c\u3001\u8f93\u51fa\u89e3\u91ca\u3001\u8ba4\u8bc1\u3001\u91cd\u8bd5\u548c\u53d1\u5e03\u51b3\u5b9a\u3002</li> </ul>"},{"location":"reference/api/harness/#\u8bf7\u6c42\u7ba1\u7ebf-foundationharnessrequest-processing","title":"\u8bf7\u6c42\u7ba1\u7ebf (foundation.harness.request-processing)","text":""},{"location":"reference/api/harness/#parseRequest--processRequest","title":"parseRequest / processRequest","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>parseRequest(raw)</code></li> <li><code>processRequest(raw, { now = () =&gt; new Date() } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u539f\u59cb\u8bf7\u6c42\u8d1f\u8f7d\uff08\u5e94\u7b26\u5408 kernel \u534f\u8bae\u7ed3\u6784\uff09\u3002</li> <li>\u8f93\u51fa\uff1a\u89c4\u8303\u5316 <code>operation-request</code> \u4e0e\u7ec8\u6001 <code>operation-result</code>\uff08\u7ec8\u6001\u96c6\u5408\u56fa\u5b9a\u4e3a <code>REJECTED</code> / <code>FAILED</code> / <code>SUCCESS</code>\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>parseRequest</code> \u662f\uff1b<code>processRequest</code> \u4e3a\u7eaf\u51fd\u6570\u7ba1\u7ebf\uff08\u65e0\u5916\u90e8\u526f\u4f5c\u7528\uff0c\u9ed8\u8ba4 <code>now</code> \u53ef\u6ce8\u5165\u4ee5\u4fdd\u8bc1\u786e\u5b9a\u6027\u6d4b\u8bd5\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/Git/\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u89e3\u6790\u5931\u8d25\u8fdb\u5165 <code>REJECTED</code>/<code>FAILED</code> \u7ec8\u6001\u5e76\u5e26 <code>SFC2002</code> / <code>SFC2003</code> / <code>SFC2004</code>\uff1b\u673a\u5236\u5931\u8d25 <code>+ EXECUTION_FAILED</code> <code>kind</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8bf7\u6c42\u7b26\u5408 kernel \u534f\u8bae\u7ed3\u6784\uff1b\u4e1a\u52a1\u8bed\u4e49\u7531\u6d88\u8d39\u8005\u62e5\u6709\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/request.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/request.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u64cd\u4f5c\u7684\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\uff08\u72b6\u6001\u673a/\u91cd\u8bd5\u8f6c <code>loop-agent</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u62a5\u544a-foundationharnessreport","title":"\u62a5\u544a (foundation.harness.report)","text":""},{"location":"reference/api/harness/#validateReportModel--renderReportMarkdown--computeResultDigest--computeModelDigest--digestReport--buildBinding--verifyBinding--checkReport--collectStyleWarnings","title":"validateReportModel / renderReportMarkdown / computeResultDigest / computeModelDigest / digestReport / buildBinding / verifyBinding / checkReport / collectStyleWarnings","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>validateReportModel(reportModel, { resultDocument } = {})</code></li> <li><code>renderReportMarkdown(model)</code></li> <li><code>computeResultDigest(resultDocument)</code> / <code>computeModelDigest(reportModel)</code> / <code>digestReport(reportMarkdown)</code></li> <li><code>buildBinding(reportModel, resultDocument, reportMarkdown)</code></li> <li><code>verifyBinding(binding, { reportModel, resultDocument, reportMarkdown } = {})</code></li> <li><code>checkReport({ reportMarkdown, reportModel, resultDocument, binding } = {})</code></li> <li><code>collectStyleWarnings(reportMarkdown)</code></li> <li>\u8f93\u5165\uff1a<code>report-model</code>\u3001\u6e32\u67d3\u9009\u9879\uff08<code>locale</code> / <code>audience</code> / <code>style</code>\uff09\uff1b<code>SUPPORTED_REPORT_LOCALES = [zh-CN, en-US]</code>\u3002</li> <li>\u8f93\u51fa\uff1aMarkdown \u6587\u672c\u3001\u7ed1\u5b9a\u5bf9\u8c61\u3001\u5206\u7ea7\u68c0\u67e5\u53d1\u73b0\uff1b\u4eba\u7c7b\u62a5\u544a\u7531\u673a\u5668\u7ed3\u679c\u6d3e\u751f\uff0c\u7981\u6b62\u81ea\u7531\u64b0\u5199\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u65e0\u65f6\u949f\u3001\u65e0\u73af\u5883\u3001\u65e0\u7f51\u7edc\u3001\u65e0\u6a21\u578b\u8c03\u7528\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/Git/\u7f51\u7edc\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a<code>SFC3001</code>\uff08<code>REPORT_DIGEST_MISMATCH</code>\uff0c\u7ed1\u5b9a\u6458\u8981\u4e0d\u7b26\u6216\u62a5\u544a\u975e\u6a21\u578b\u89c4\u8303\u6e32\u67d3\uff09\u3001<code>SFC3002</code>\uff08<code>REPORT_ELEMENT_MISSING</code>\uff0c\u5f3a\u5236\u5143\u7d20\u7f3a\u5931\uff09\u3001<code>SFC3003</code>\uff08<code>REPORT_FACT_DRIFT</code>\uff0c\u62a5\u544a\u6539\u5199\u7ed1\u5b9a\u7ed3\u679c\u4e8b\u5b9e\u6216\u5b57\u8282\u4e0e\u786e\u5b9a\u6027\u518d\u6e32\u67d3\u4e0d\u4e00\u81f4\uff09\u3002\u98ce\u683c\u544a\u8b66\u7531 <code>collectStyleWarnings</code> \u4ea7\u51fa\uff0c\u4ec5\u5efa\u8bae\u3001\u4e0d\u7f16\u7801\u3001\u4e0d\u963b\u65ad\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>REPORT_RENDERER_NAME</code> / <code>VERSION</code> \u53d6\u81ea\u5404\u81ea package\uff08\u5f53\u524d <code>0.3.0</code>\uff09\uff1b\u53cc\u8f93\u51fa\u6210\u7ec4\u5199\u5165\u5e76\u62d2\u7edd\u8def\u5f84\u522b\u540d\u4e0e\u8f93\u5165\u8986\u76d6\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/report.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/report.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u62a5\u544a\u4e1a\u52a1\u7ed3\u8bba\u7684\u89e3\u8bfb\uff08\u7f16\u6392\u7531 Kit <code>report</code> \u5b50\u52a8\u4f5c\u8d1f\u8d23\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u5bbf\u4e3b\u9002\u914d\u673a\u5236-foundationharnesshost-adapter","title":"\u5bbf\u4e3b\u9002\u914d\u673a\u5236 (foundation.harness.host-adapter)","text":""},{"location":"reference/api/harness/#normalizeAdapterSource--buildAdapterClosure--verifyAdapterBuildManifest--verifyPeerAdapterDirectories--materializeAdapterBuild--probeVersionVector","title":"normalizeAdapterSource / buildAdapterClosure / verifyAdapterBuildManifest / verifyPeerAdapterDirectories / materializeAdapterBuild / probeVersionVector","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>normalizeAdapterSource(input)</code></li> <li><code>buildAdapterClosure({ hostId, pathCategory, input } = {})</code></li> <li><code>verifyAdapterBuildManifest(manifestInput, { hostId, pathCategory } = {})</code></li> <li><code>verifyPeerAdapterDirectories({ request, peerRoots } = {})</code>\uff08async\uff09\uff1a\u4ece\u4e24\u4e2a\u6216\u66f4\u591a\u771f\u5b9e peer \u6839\u76ee\u5f55\u91cd\u7b97\u5171\u540c\u95ed\u5305\u3001\u6807\u51c6 manifest \u548c\u5b8c\u6574 <code>logicalMappings</code>\u3002</li> <li><code>materializeAdapterBuild({ targetRoot, build, writer = writeFileAtomic } = {})</code>\uff08async\uff09</li> <li><code>probeVersionVector({ hostId, capabilities, executable, argv, allowSpawn = false, timeoutMs = 5000, runner = spawnSync } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1aadapter source\u3001\u76ee\u6807\u8def\u5f84\u3001probe \u9009\u9879\u3002</li> <li>\u8f93\u51fa\uff1a\u6784\u5efa\u95ed\u5305\u3001\u6821\u9a8c\u540e\u7684\u6e05\u5355\u3001materialize \u4ea7\u7269\u3001\u7248\u672c\u5411\u91cf\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a<code>normalizeAdapterSource</code> / <code>buildAdapterClosure</code> / <code>verifyAdapterBuildManifest</code> \u662f\uff1b<code>materializeAdapterBuild</code> / <code>probeVersionVector</code> \u542b\u843d\u76d8\u6216\u8fdb\u7a0b\u8c03\u7528\u3002</li> <li>\u526f\u4f5c\u7528\uff1a<code>materializeAdapterBuild</code> \u5728\u53d7\u6536\u5bb9\u76ee\u6807\u521b\u5efa sibling staging \u5e76\u5355\u6b21 rename\uff1b<code>probeVersionVector</code> \u9ed8\u8ba4 <code>allowSpawn=false</code>\uff0c\u4e0d\u53d6 PATH\u3001\u4e0d\u81ea\u52a8\u6267\u884c\u5bbf\u4e3b\u4e8c\u8fdb\u5236\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6e05\u5355\u6458\u8981\u4e0d\u7b26 <code>+ MANIFEST_MISMATCH</code>\uff1b\u76ee\u6807\u5df2\u5b58\u5728 <code>+ PORTABLE_PATH_COLLISION</code>\uff1b\u975e\u53d7\u4fe1\u53ef\u6267\u884c\u6587\u4ef6 <code>+ UNTRUSTED_EXECUTABLE</code>\uff1b\u6784\u5efa/\u63a2\u6d4b\u5931\u8d25 <code>+ HOST_BUILD_FAILED</code> / <code>HOST_PROBE_FAILED</code>\uff1b\u5951\u7ea6\u4e0d\u7b26 <code>+ HOST_CONTRACT_INVALID</code>\uff1b\u4ee5\u4e0a\u5747\u5305\u4e8e <code>SFC2004</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aadapter source \u4e3a\u5df2\u58f0\u660e\u6587\u672c\u95ed\u5305\uff08<code>content</code> \u7c7b\u578b\u56fa\u5b9a <code>string</code>\uff0c\u4ec5 utf8\uff1b\u4e8c\u8fdb\u5236\u6295\u5f71 unsupported\uff09\uff1b\u53d7\u4fe1\u53ef\u6267\u884c\u6587\u4ef6\u65b9\u53ef materialize\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/host.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/host.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5bbf\u4e3b\u5177\u4f53\u4e1a\u52a1\u8bed\u4e49\u4e0e\u672c\u5730\u751f\u547d\u5468\u671f\u51b3\u7b56\uff1bKit \u53ea\u590d\u7528\u672c\u8282\u7684\u7ed1\u5b9a\u8bfb\u53d6\u3001\u4e25\u683c\u4e0d\u66ff\u6362\u53d1\u5e03\u548c\u539f\u5b50\u5199\u673a\u5236\uff0c\u4e0d\u7531 Harness \u6ce8\u518c\u5bbf\u4e3b\u522b\u540d\u6216 driver\u3002</li> </ul> <p><code>verifyPeerAdapterDirectories</code> \u662f\u53ea\u8bfb\u5165\u53e3\u3002\u5b83\u9010\u7ea7\u679a\u4e3e\u548c\u8bfb\u53d6\u771f\u5b9e\u76ee\u5f55\uff0c\u62d2\u7edd\u7b26\u53f7\u94fe\u63a5\u3001\u8def\u5f84\u9003\u9038\u3001\u975e\u666e\u901a\u6587\u4ef6\u3001\u7f3a\u5931/\u591a\u51fa\u6216\u9010\u5b57\u8282\u6458\u8981\u4e0d\u4e00\u81f4\uff1bmapping \u5fc5\u987b\u552f\u4e00\u8986\u76d6\u6bcf\u4e2a\u771f\u5b9e <code>SKILL.md</code>\u3002\u5b83\u6309 <code>peerId</code> \u5f52\u4e00\u5316\u6bd4\u8f83\u95ed\u5305\uff0c\u56e0\u6b64\u8bf7\u6c42\u987a\u5e8f\u4e0d\u4f1a\u5f71\u54cd\u7ed3\u679c\u3002\u5931\u8d25\u4f7f\u7528\u65e2\u6709 <code>SFC2003</code>/<code>SFC2004</code> \u4e0e <code>details.kind</code>\uff0c\u4e0d\u8fd4\u56de\u90e8\u5206\u6210\u529f\uff0c\u4e5f\u4e0d\u5199\u5165 peer \u6839\u76ee\u5f55\u3002</p>"},{"location":"reference/api/harness/#\u6301\u4e45\u72b6\u6001\u5e95\u5ea7-foundationharnessstate-store","title":"\u6301\u4e45\u72b6\u6001\u5e95\u5ea7 (foundation.harness.state-store)","text":""},{"location":"reference/api/harness/#openStateStore--appendEvent--readEvents--readSnapshot--writeSnapshot--verifyStateStore--rebuildSnapshot--inspectStateStoreLock--recoverStateStoreLock--closeStateStore--close","title":"openStateStore / appendEvent / readEvents / readSnapshot / writeSnapshot / verifyStateStore / rebuildSnapshot / inspectStateStoreLock / recoverStateStoreLock / closeStateStore / close","text":"<ul> <li>\u7b7e\u540d\uff08\u8282\u9009\uff09\uff1a</li> <li><code>openStateStore(root, { owner, payloadSchemas, clock } = {})</code>\uff08async\uff09</li> <li><code>appendEvent(store, event)</code>\uff08async\uff09</li> <li><code>readEvents(store, { afterSequence = 0 } = {})</code>\uff08async\uff09</li> <li><code>readSnapshot(store, { reducer, initial = null } = {})</code>\uff08async\uff09</li> <li><code>writeSnapshot(store, state, { hostSessionRef, reducer, initial = null } = {})</code>\uff08async\uff09</li> <li><code>verifyStateStore(store, { reducer, initial = null } = {})</code>\uff08async\uff09</li> <li><code>rebuildSnapshot(store, reducer, { initial = null } = {})</code>\uff08async\uff09</li> <li><code>inspectStateStoreLock(root, { clock } = {})</code>\uff08async\uff09</li> <li><code>recoverStateStoreLock(root, { ... } = {})</code>\uff08async\uff09</li> <li><code>closeStateStore(store)</code> / <code>close(store)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u4e8b\u4ef6\u8d1f\u8f7d\u3001\u5feb\u7167\u3001\u9501\u4ee4\u724c\u3002</li> <li>\u8f93\u51fa\uff1a\u4e8b\u4ef6\u3001hash chain \u6821\u9a8c\u7ed3\u679c\u3001\u5feb\u7167\uff1b<code>STATE_GENESIS_DIGEST</code> \u4f5c\u4e3a\u94fe\u8d77\u70b9\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8bfb\u5199\u4e8b\u4ef6\u65e5\u5fd7\u4e0e\u5feb\u7167\u6587\u4ef6\uff0c\u5199\u534f\u4f5c\u5f0f\u5355\u5199\u8005\u9501\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u8def\u5f84\u8bfb\u5199\u4e8b\u4ef6\u65e5\u5fd7\u4e0e\u5feb\u7167\uff1b\u5199\u9501\u6587\u4ef6\u7528\u4e8e\u672c\u5730\u534f\u4f5c\u5f0f\u5355\u5199\u8005\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1ahash chain \u65ad\u88c2 <code>+ CHAIN_BROKEN</code>\uff1b\u9501 fencing \u51b2\u7a81 <code>+ STORE_LOCKED</code>\uff1b\u9501\u635f\u574f <code>+ LOCK_CORRUPT</code>\uff1b\u6062\u590d\u62d2\u7edd <code>+ LOCK_RECOVERY_REFUSED</code>\uff1b\u975e\u6cd5\u4e8b\u4ef6 <code>+ UNSAFE_STATE_ENTRY</code> / <code>EVENT_SCHEMA_INVALID</code>\uff1b\u91cd\u590d\u5e8f\u53f7 <code>+ DUPLICATE_SEQUENCE</code>\uff1b\u5e42\u7b49\u51b2\u7a81 <code>+ IDEMPOTENCY_CONFLICT</code>\uff1b\u5feb\u7167\u4e0d\u4e00\u81f4 <code>+ SNAPSHOT_MISMATCH</code>\uff1b\u5df2\u5173\u95ed <code>+ STORE_CLOSED</code>\uff1b\u4ee5\u4e0a\u5747\u5305\u4e8e <code>SFC2004</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u4e8b\u4ef6\u65e5\u5fd7\u4e3a\u552f\u4e00\u6743\u5a01\uff0csnapshot \u4e3a\u6d3e\u751f\u7f13\u5b58\uff1bfencing \u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\uff1b<code>confirmOwnerTerminated</code> \u4fe1\u4efb\u951a\u7531\u8c03\u7528\u65b9\u63d0\u4f9b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/state-store.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/state-store.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e8b\u4ef6\u4e1a\u52a1\u542b\u4e49\u3001reducer \u8f6c\u79fb\u3001owner-terminated \u4fe1\u4efb\u951a\uff08\u4e1a\u52a1\u72b6\u6001\u673a/\u7ec8\u6001\u8f6c <code>loop-agent</code>\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#\u673a\u5236\u9519\u8bef-foundationharnesserrors","title":"\u673a\u5236\u9519\u8bef (foundation.harness.errors)","text":""},{"location":"reference/api/harness/#HarnessError--mechanismError--HARNESS_ERROR_KINDS","title":"HarnessError / mechanismError / HARNESS_ERROR_KINDS","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>class HarnessError extends ContractsError</code>\uff08\u6784\u9020 <code>(code, message, details)</code>\uff0c\u672a\u767b\u8bb0\u7801\u7acb\u5373\u629b <code>TypeError</code>\uff09</li> <li><code>mechanismError(kind, message, extraDetails)</code>\uff08\u8fd4\u56de <code>SFC2004</code> + \u7a33\u5b9a <code>details.kind</code>\uff09</li> <li><code>HARNESS_ERROR_KINDS</code>\uff08\u51bb\u7ed3\u5bf9\u8c61\uff09</li> <li>\u8f93\u5165\uff1a\u9519\u8bef <code>kind</code>\u3001\u4e0a\u4e0b\u6587\u3002</li> <li>\u8f93\u51fa\uff1a\u5e26\u7a33\u5b9a <code>kind</code> \u7684\u9519\u8bef\u5bf9\u8c61\uff1b\u975e\u6cd5 <code>kind</code> \u629b <code>TypeError</code>\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u672c\u6a21\u5757\u4e0d\u53d1\u660e\u65b0\u7801\u2014\u2014\u673a\u5236\u5931\u8d25\u7edf\u4e00 <code>SFC2004</code>\uff08<code>EXECUTION_FAILED</code>\uff09\uff0c\u5176\u6ce8\u518c\u542b\u4e49\u4e3a\u300c\u673a\u5236\u8fd0\u884c\u65f6\u6267\u884c\u5408\u89c4\u64cd\u4f5c\u65f6\u5931\u8d25\uff1bdetails \u643a\u5e26\u673a\u5236\u8bc1\u636e\u300d\uff1b<code>details.kind</code> \u53d6\u4e0b\u5217\u51bb\u7ed3\u679a\u4e3e\u4e4b\u4e00\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>HARNESS_ERROR_KINDS</code> \u51bb\u7ed3\uff0c\u65b0\u589e SFC \u7801\u5c5e Contracts \u53d8\u66f4\uff08\u4e0d\u5728\u672c\u5305\u5199\u96c6\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.2.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/errors.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/boundary.test.mjs</code>\u3001<code>boundaries.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9519\u8bef\u4e1a\u52a1\u5f52\u56e0\u3002</li> </ul> <p><code>HARNESS_ERROR_KINDS</code> \u51bb\u7ed3\u679a\u4e3e\uff08v1\uff09\uff1a</p> kind \u542b\u4e49 <code>invalid-path</code> / <code>absolute-path</code> / <code>windows-drive-path</code> / <code>windows-path</code> / <code>unc-path</code> \u8def\u5f84\u5f62\u6001\u975e\u6cd5 <code>path-traversal</code> / <code>symlink-escape</code> / <code>realpath-escape</code> \u6536\u5bb9\u9003\u9038 <code>invalid-root</code> \u6839\u76ee\u5f55\u975e\u6cd5 <code>atomic-write-failed</code> / <code>read-failed</code> \u6587\u4ef6\u8bfb\u5199\u5931\u8d25 <code>missing-resource</code> \u8d44\u6e90\u7f3a\u5931 <code>workspace-create-failed</code> / <code>workspace-dispose-failed</code> / <code>workspace-disposed</code> \u4e34\u65f6\u5de5\u4f5c\u533a\u5f02\u5e38 <code>closure-conflict</code> / <code>unsupported-policy</code> \u95ed\u5305/\u7b56\u7565\u51b2\u7a81 <code>execution-failed</code> / <code>invalid-result</code> \u6267\u884c/\u7ed3\u679c\u5f02\u5e38 <code>store-closed</code> / <code>store-locked</code> / <code>lock-corrupt</code> / <code>lock-recovery-refused</code> \u72b6\u6001\u9501\u5f02\u5e38 <code>unsafe-state-entry</code> / <code>event-schema-invalid</code> / <code>duplicate-sequence</code> / <code>idempotency-conflict</code> / <code>chain-broken</code> / <code>snapshot-mismatch</code> \u72b6\u6001\u4e8b\u4ef6\u5f02\u5e38 <code>host-contract-invalid</code> / <code>host-build-failed</code> / <code>host-probe-failed</code> / <code>untrusted-executable</code> / <code>portable-path-collision</code> / <code>manifest-mismatch</code> \u5bbf\u4e3b\u9002\u914d\u5f02\u5e38 <code>baseline-mismatch</code> / <code>content-guard-rejected</code> \u57fa\u7ebf\u7269\u5316\u5931\u8d25\u5173\u95ed <code>read-chokepoint-rejected</code> \u53ea\u8bfb\u51c6\u5165\u62d2\u7edd <code>surface-scan-violation</code> / <code>scan-policy-invalid</code> \u8868\u9762\u626b\u63cf\u5931\u8d25\u5173\u95ed <code>upper-bound-exceeded</code> \u4e0a\u9650\u5b88\u536b\u8d8a\u9650"},{"location":"reference/api/harness/#\u57fa\u7ebf\u7269\u5316-foundationharnessbaseline-materialization","title":"\u57fa\u7ebf\u7269\u5316 (foundation.harness.baseline-materialization)","text":"<p>FND-ADR-009\u3002\u628a\u51bb\u7ed3\u57fa\u7ebf\u7269\u5316\u4e3a\u5b57\u8282\u4fdd\u771f\u7684\u4e34\u65f6\u526f\u672c\uff1a\u7269\u5316\u524d\u6821\u9a8c\u6e90\u6458\u8981\u3001\u7269\u5316\u540e\u540c\u65f6\u6821\u9a8c\u526f\u672c\u6458\u8981\u4e0e\u6e90\u6458\u8981\uff08\u6355\u83b7\u7269\u5316\u4e2d\u9014\u7684\u4efb\u4e00\u4fa7\u53d8\u5316\uff09\uff1b\u526f\u672c\u5185\u7b26\u53f7\u94fe\u63a5\u4e00\u5f8b\u62d2\u7edd\u3002</p>"},{"location":"reference/api/harness/#computeDirectoryDigest--materializeBaseline","title":"computeDirectoryDigest / materializeBaseline","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>computeDirectoryDigest(rootDir)</code>\uff08async\uff0c\u8fd4\u56de 64 \u4f4d\u5c0f\u5199 sha256 \u5341\u516d\u8fdb\u5236\u6458\u8981\uff09</li> <li><code>materializeBaseline({ baselineDir, baselineDigest, prefix = \"sf-baseline-\" } = {})</code>\uff08async\uff0c\u8fd4\u56de\u7269\u5316\u6839\u8def\u5f84\uff09</li> <li>\u8f93\u5165\uff1a\u57fa\u7ebf\u76ee\u5f55\u4e0e\u51bb\u7ed3\u6458\u8981\u3002</li> <li>\u8f93\u51fa\uff1a\u786e\u5b9a\u6027\u76ee\u5f55\u6458\u8981\uff1b\u7269\u5316\u540e\u7684\u4e34\u65f6\u76ee\u5f55\u6839\u8def\u5f84\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u8bfb\u6e90\u6811\u3001\u5728\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u521b\u5efa\u526f\u672c\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u6e90\u57fa\u7ebf\uff1b\u5199\u7cfb\u7edf\u4e34\u65f6\u76ee\u5f55\u5e76\u5728\u5931\u8d25\u65f6\u6e05\u7406\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u6458\u8981\u4e0d\u7b26\uff08\u7269\u5316\u524d\u6216\u7269\u5316\u540e\uff09\u629b <code>SFC2004</code> + <code>baseline-mismatch</code>\uff08details \u542b <code>phase</code>\uff1a<code>pre-materialization</code> / <code>post-materialization</code>\uff09\uff1b\u76ee\u5f55\u4e0d\u53ef\u7528\u629b <code>invalid-root</code>\uff1b\u5efa\u76ee\u5f55\u5931\u8d25\u629b <code>workspace-create-failed</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8c03\u7528\u65b9\u6301\u6709\u51bb\u7ed3\u6458\u8981\uff1b\u540c\u4e00\u6743\u9650\u7ea7\u8fdb\u7a0b\u53ef\u5728\u7269\u5316\u7a97\u53e3\u5185\u6539\u52a8\u6e90\uff0c\u673a\u5236\u4ee5\u53cc\u7aef\u6458\u8981\u6355\u83b7\u5e76\u5931\u8d25\u5173\u95ed\uff0c\u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/baseline.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/baseline.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u6b8b\u7559\u5185\u5bb9\u5224\u5b9a\uff08<code>contentGuard</code> \u8c13\u8bcd\uff09\u4e0e\u526f\u672c\u6700\u7ec8\u53bb\u5904\u3002</li> </ul> <p><code>TemporaryWorkspace.fromBaseline({ baselineDir, baselineDigest, prefix, contentGuard })</code> \u4e0e <code>createTemporaryWorkspace({ baseline: { ... } })</code> \u628a\u7269\u5316\u63a5\u5165\u5de5\u4f5c\u533a\u751f\u547d\u5468\u671f\uff1a<code>contentGuard</code> \u7f3a\u7701\u4e3a\u5141\u8bb8\uff08\u5b57\u8282\u4fdd\u771f\u662f\u673a\u5236\u5951\u7ea6\uff0c\u6b8b\u7559\u5224\u5b9a\u5f52\u6d88\u8d39\u8005\uff09\uff1b\u5b88\u536b\u629b\u9519\u5305\u88c5\u4e3a <code>content-guard-rejected</code> \u5e76 dispose \u526f\u672c\u3002</p>"},{"location":"reference/api/harness/#\u53ea\u8bfb-chokepoint-foundationharnessread-chokepoint","title":"\u53ea\u8bfb chokepoint (foundation.harness.read-chokepoint)","text":"<p>FND-ADR-009\u3002\u628a\u53d7\u4fdd\u62a4\u533a\u57df\u7684\u8bfb\u53d6\u96c6\u4e2d\u5230\u4e00\u4e2a\u51c6\u5165\u5165\u53e3\uff1a\u5141\u8bb8\u6839\u96c6\u5408 + \u53ef\u9009\u8eab\u4efd\u8c13\u8bcd\uff1b\u8d8a\u754c\u3001\u94fe\u63a5\u9003\u9038\u4e0e\u975e\u6388\u6743\u8eab\u4efd\u4e00\u5f8b <code>read-chokepoint-rejected</code>\u3002</p>"},{"location":"reference/api/harness/#createReadChokepoint","title":"createReadChokepoint","text":"<ul> <li>\u7b7e\u540d\uff1a<code>createReadChokepoint({ allowRoots, allowIdentity } = {})</code> \u2192 <code>{ assertReadAllowed, read }</code></li> <li>\u8f93\u5165\uff1a\u975e\u7a7a\u5141\u8bb8\u6839\u96c6\u5408\uff1b\u53ef\u9009\u8eab\u4efd\u8c13\u8bcd <code>(identity) =&gt; boolean</code>\u3002</li> <li>\u8f93\u51fa\uff1a\u51c6\u5165\u540e\u7684 <code>{ root, relPath, absolute }</code> \u6216\u53d7\u6536\u5bb9\u8bfb\u53d6\u7ed3\u679c\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08<code>async</code>\uff0c\u542b\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb realpath / \u6536\u5bb9\u8bfb\u53d6\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8d8a\u754c/\u9003\u9038/\u975e\u6388\u6743\u629b <code>SFC2004</code> + <code>read-chokepoint-rejected</code>\uff1b\u8d44\u6e90\u7f3a\u5931\u629b <code>missing-resource</code>\uff1b\u53c2\u6570\u975e\u6cd5\u629b <code>TypeError</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8c03\u7528\u65b9\u58f0\u660e\u5141\u8bb8\u6839\u96c6\u5408\u4e0e\u8eab\u4efd\u89c4\u5219\uff1b\u673a\u5236\u4e0d\u89e3\u91ca\u4efb\u4f55\u79c1\u6709\u8eab\u4efd\u6216\u8def\u5f84\u8bed\u4e49\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/chokepoint.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/chokepoint.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u5141\u8bb8\u6839\u96c6\u5408\u3001\u8eab\u4efd\u8c13\u8bcd\u3001\u51c6\u5165\u540e\u8bfb\u53d6\u8bed\u4e49\u3002</li> </ul> <p>\u5b57\u7b26\u4e32\u8f93\u5165\u4e0e <code>{ root, relPath }</code> \u8f93\u5165\u8d70\u540c\u4e00 <code>resolveContained</code> \u6536\u5bb9\u5206\u7c7b\uff08\u542b macOS <code>/var \u2192 /private/var</code> \u7b49\u7b26\u53f7\u94fe\u63a5\u524d\u7f00\u6839\u7684\u7edf\u4e00\u89c4\u8303\u5316\uff09\u3002</p>"},{"location":"reference/api/harness/#\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf-foundationharnesssurface-scan","title":"\u7b56\u7565\u5316\u8868\u9762\u626b\u63cf (foundation.harness.surface-scan)","text":"<p>FND-ADR-009\u3002\u6309 <code>surface-scan-policy</code> \u5951\u7ea6\u6587\u6863\u5bf9\u58f0\u660e\u8868\u9762\u505a\u8def\u5f84\u4e0e\u5185\u5bb9\u6a21\u5f0f\u626b\u63cf\uff1a\u9996\u4e2a\u547d\u4e2d\u5373\u5931\u8d25\u5173\u95ed\uff1b\u7b56\u7565\u975e\u6cd5\u6216\u6a21\u5f0f\u4e0d\u53ef\u7f16\u8bd1\u540c\u6837\u5931\u8d25\u5173\u95ed\uff1b\u7f3a\u5931\u626b\u63cf\u6587\u4ef6\u4e0d\u9759\u9ed8\u8df3\u8fc7\u3002</p>"},{"location":"reference/api/harness/#scanSurface","title":"scanSurface","text":"<ul> <li>\u7b7e\u540d\uff1a<code>scanSurface({ root, relPaths, policy, encoding = \"utf8\" } = {})</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u626b\u63cf\u6839\u3001\u76f8\u5bf9\u8def\u5f84\u6e05\u5355\u3001\u7b56\u7565\u5951\u7ea6\u6587\u6863\u3002</li> <li>\u8f93\u51fa\uff1a<code>{ scanned, bytes, policy }</code>\uff08\u51bb\u7ed3\u5bf9\u8c61\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u53ea\u8bfb\u6587\u4ef6\u7cfb\u7edf\u8bbf\u95ee\uff1b\u8fdb\u7a0b\u5185\u6b63\u5219\u7f16\u8bd1\uff0c\u65e0\u6301\u4e45\u72b6\u6001\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\uff1b\u4e0d\u5199\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u547d\u4e2d\u629b <code>SFC2004</code> + <code>surface-scan-violation</code>\uff08details \u542b <code>kindOfHit</code>\uff1a<code>path</code> / <code>content</code>\uff09\uff1b\u7b56\u7565\u975e\u6cd5\u6216\u6a21\u5f0f\u4e0d\u53ef\u7f16\u8bd1\u629b <code>scan-policy-invalid</code>\uff1b\u7f3a\u5931\u6587\u4ef6\u629b <code>missing-resource</code>\uff1b\u53c2\u6570\u975e\u6cd5\u629b <code>TypeError</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u7b56\u7565\u6587\u6863\u901a\u8fc7\u5951\u7ea6\u6821\u9a8c\uff1b<code>allowedUses</code> \u53ea\u643a\u5e26\u4e0d\u89e3\u91ca\uff0c\u547d\u4e2d\u4e0d\u88ab\u8c41\u514d\uff08\u8c41\u514d\u7531\u6d88\u8d39\u8005\u5c42\u5b9e\u73b0\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/surface-scan.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/surface-scan.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u7b56\u7565\u5185\u5bb9\u3001\u5141\u8bb8\u7528\u9014\u8bed\u4e49\u4e0e\u547d\u4e2d\u540e\u7684\u5904\u7f6e\u3002</li> </ul> <p>\u6ce8\u5165\u5f0f\u81ea\u6d4b\u7ea6\u5b9a\uff1a\u626b\u63cf\u5668\u65e0\u72b6\u6001\u2014\u2014\u6ce8\u5165\u6a21\u5f0f\u5e76\u626b\u63cf\u540e\u79fb\u9664\u6ce8\u5165\uff0c\u518d\u6b21\u626b\u63cf\u7ed3\u679c\u5b57\u8282\u4e00\u81f4\uff08\u81ea\u6d4b\u89c1\u6d4b\u8bd5\u6587\u4ef6\uff0c\u4e0d\u5192\u5145\u72ec\u7acb\u590d\u6838\uff09\u3002</p>"},{"location":"reference/api/harness/#token-\u4e0a\u754c\u4f30\u7b97-foundationharnesstoken-estimation","title":"token \u4e0a\u754c\u4f30\u7b97 (foundation.harness.token-estimation)","text":"<p>FND-ADR-009\u3002\u786e\u5b9a\u6027\u9886\u57df\u4f30\u7b97\u539f\u8bed\uff0c\u4e24\u4e2a\u4e92\u76f8\u72ec\u7acb\u7684\u4f30\u7b97\u5668\uff1aUTF-8 \u5b57\u8282\u6570\u4e0a\u754c\uff08<code>estimateTokenUpperBound</code>\uff09\u4e0e\u6309 CJK \u7801\u4f4d/\u7a7a\u767d\u5207\u5206\u7684\u8bcd\u5143\u6570\u4f30\u7b97\uff08<code>estimateTokens</code>\uff0c\u7b97\u6cd5 <code>cjk-char-whitespace-split</code>\uff09\u3002\u4e24\u8005\u5747\u4e3a\u65e0\u6a21\u578b\u3001\u65e0\u7f51\u7edc\u3001\u65e0 tokenizer \u4f9d\u8d56\u3001\u65e0\u6301\u4e45\u72b6\u6001\u5bfc\u5165\u7684\u7eaf\u51fd\u6570\uff1b\u5b57\u8282\u4e0a\u754c\u7ed3\u679c\u7b26\u5408 <code>token-estimate-result</code> \u5951\u7ea6\uff08\u65e0\u65f6\u95f4\u6233\uff0c<code>guarantees</code> \u4e3a\u5c01\u95ed\u679a\u4e3e\uff09\u3002\u6bcf\u6761\u8bcd\u5143\u4f30\u7b97\u8bb0\u5f55\u643a\u5e26\u4f30\u7b97\u5668 id \u4e0e\u7248\u672c\uff08SFA-CONTEXT-028\uff1a\u6d88\u8d39\u65b9\u5fc5\u987b\u80fd\u56de\u7b54\u7ed3\u679c\u51fa\u81ea\u54ea\u4e2a\u4f30\u7b97\u5668\uff09\uff0c\u4e24\u4e2a\u4f30\u7b97\u5668\u7684\u7ed3\u679c\u4e0d\u5f97\u9759\u9ed8\u6df7\u7528\u3001\u4e0d\u5f97\u4e92\u76f8\u66ff\u4ee3\u3002</p>"},{"location":"reference/api/harness/#estimateTokenUpperBound","title":"estimateTokenUpperBound","text":"<ul> <li>\u7b7e\u540d\uff1a<code>estimateTokenUpperBound(text)</code>\uff08\u7eaf\u51fd\u6570\uff09</li> <li>\u8f93\u5165\uff1a\u6587\u672c\u5b57\u7b26\u4e32\u3002</li> <li>\u8f93\u51fa\uff1a<code>token-estimate-result</code> \u5bf9\u8c61\uff08<code>upperBound === inputBytes</code>\uff09\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff1b\u96f6\u4f9d\u8d56\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u5b57\u7b26\u4e32\u8f93\u5165\u629b <code>TypeError</code>\uff08\u65e0 SFC \u7801\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u8f93\u5165\u4e3a JavaScript \u5b57\u7b26\u4e32\uff1b\u4f30\u7b97\u53ea\u627f\u8bfa\u4e0a\u754c\uff08\u5b57\u8282\u6570\u5373\u4e0a\u754c\uff09\uff0c\u4e0d\u627f\u8bfa\u771f\u5b9e token \u8ba1\u6570\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/token-estimate.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/token-estimate.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4f30\u7b97\u7ed3\u679c\u7684\u89e3\u91ca\u4e0e\u6d88\u8d39\u4fa7\u6362\u7b97\uff08\u6a21\u578b\u8c03\u7528\u4e0e\u771f\u5b9e token \u8ba1\u6570\u4e0d\u5728 Foundation\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#estimateTokens--isCjkCodePoint--\u4f30\u7b97\u5668\u5e38\u91cf","title":"estimateTokens / isCjkCodePoint / \u4f30\u7b97\u5668\u5e38\u91cf","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>estimateTokens(text)</code>\uff08\u7eaf\u51fd\u6570\uff09</li> <li><code>isCjkCodePoint(codePoint)</code>\uff08\u7eaf\u51fd\u6570\uff09</li> <li>\u5e38\u91cf\uff1a<code>TOKEN_ESTIMATOR_ID</code>\uff08<code>skill-family.token-estimator</code>\uff09\u3001<code>TOKEN_ESTIMATOR_VERSION</code>\uff08<code>1.0.0</code>\uff09\u3001<code>TOKEN_ESTIMATION_ALGORITHM</code>\uff08<code>cjk-char-whitespace-split</code>\uff09\u3001<code>CJK_CODE_POINT_RANGES</code>\uff08\u51bb\u7ed3\u7801\u4f4d\u533a\u95f4\u8868\uff09</li> <li>\u8f93\u5165\uff1a\u6587\u672c\u5b57\u7b26\u4e32\uff1b<code>isCjkCodePoint</code> \u63a5\u6536\u6574\u6570\u7801\u4f4d\u3002</li> <li>\u8f93\u51fa\uff1a\u51bb\u7ed3\u7684\u8bcd\u5143\u4f30\u7b97\u8bb0\u5f55\uff08<code>kind: skill-family.token-estimate-record</code>\uff0c<code>schemaVersion: 1</code>\uff09\uff0c\u643a\u5e26 <code>estimator.id</code> / <code>estimator.version</code> / <code>algorithm</code>\u3001\u8f93\u5165\u7edf\u8ba1\uff08<code>codePoints</code> / <code>inputBytes</code>\uff09\u3001\u5207\u5206\u7edf\u8ba1\uff08<code>cjkCharacters</code> / <code>whitespaceSeparators</code> / <code>otherRuns</code>\uff09\u4e0e <code>tokens</code>\uff1b<code>unit</code> \u4e3a <code>tokens</code>\uff0c<code>precision</code> \u4e3a <code>deterministic-heuristic</code>\uff0c<code>scope</code> \u4e3a <code>content-text-only</code>\u3002</li> <li>\u7b97\u6cd5\uff08<code>cjk-char-whitespace-split</code>\uff0c\u9010\u7801\u4f4d\u5355\u904d\u626b\u63cf\uff09\uff1a</li> <li>CJK \u7801\u4f4d\u533a\u95f4\uff08\u51bb\u7ed3\uff09\uff1aU+3400\u2013U+4DBF\uff08\u6269\u5c55 A\uff09\u3001U+4E00\u2013U+9FFF\uff08\u7edf\u4e00\u8868\u610f\u6587\u5b57\uff09\u3001U+F900\u2013U+FAFF\uff08\u517c\u5bb9\u8868\u610f\u6587\u5b57\uff09\u3001U+20000\u2013U+3134F\uff08\u6269\u5c55 B\u2013G\uff09\u3002</li> <li>\u6bcf\u4e2a CJK \u7801\u4f4d\u8ba1 1 \u8bcd\u5143\uff0c\u5e76\u7acb\u5373\u7ec8\u7ed3\u5176\u524d\u5c1a\u672a\u95ed\u5408\u7684 OTHER \u6bb5\u3002</li> <li>\u8fde\u7eed\u7684\u975e CJK\u3001\u975e\u7a7a\u767d\u7801\u4f4d\u6784\u6210 OTHER \u6bb5\uff0c\u88ab\u7a7a\u767d\u6216 CJK \u7801\u4f4d\u5206\u9694\u65f6\u6bcf\u6bb5\u8ba1 1 \u8bcd\u5143\u3002</li> <li>\u7a7a\u767d\uff08ECMAScript <code>\\s</code> \u7c7b\uff09\u53ea\u8d77\u5206\u9694\u4f5c\u7528\uff0c\u4e0d\u8d21\u732e\u8bcd\u5143\u3002</li> <li>\u6052\u7b49\u5f0f\uff1a<code>tokens === cjkCharacters + otherRuns</code>\uff1b\u4e2d\u82f1\u6df7\u6392\u3001\u7eaf CJK\u3001\u7eaf ASCII\u3001\u7a7a\u4e32\uff080 \u8bcd\u5143\uff09\u5168\u90e8\u9002\u7528\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff1b\u96f6\u4f9d\u8d56\u3001\u96f6 import\uff08\u6a21\u5757\u7eaf\u5ea6\u7531\u6d4b\u8bd5\u590d\u68c0\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u975e\u5b57\u7b26\u4e32\u8f93\u5165\u629b <code>TypeError</code>\uff08\u65e0 SFC \u7801\uff09\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a\u4f30\u7b97\u662f\u5bf9\u76ee\u6807 tokenizer \u7684\u786e\u5b9a\u6027\u542f\u53d1\u5f0f\u8fd1\u4f3c\uff0c\u4e0d\u627f\u8bfa\u4e0e\u4efb\u4f55\u5177\u4f53\u6a21\u578b tokenizer \u76f8\u7b49\uff1b\u6bd4\u8f83\u9608\u503c\u65f6\u540c\u4e00\u6279\u6b21\u5fc5\u987b\u4f7f\u7528\u540c\u4e00\u4f30\u7b97\u5668\uff08\u8bb0\u5f55\u5185\u7684 <code>estimator</code> \u4e0e <code>algorithm</code> \u5373\u88c1\u51b3\u4f9d\u636e\uff09\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.6.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/token-estimate.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/token-estimator.test.mjs</code>\uff08\u4e2d\u82f1\u6df7\u6392\u3001\u7eaf CJK\u3001\u7eaf ASCII\u3001\u7a7a\u4e32\u4e0e\u7a7a\u767d\u4e32\u3001\u6269\u5c55 B \u7801\u4f4d\u3001\u533a\u95f4\u8fb9\u754c\u3001\u8bb0\u5f55\u5c01\u95ed\u952e\u96c6\u3001\u6052\u7b49\u5f0f\u3001\u786e\u5b9a\u6027\u3001CLI \u5b50\u8fdb\u7a0b\u884c\u4e3a\uff09\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9608\u503c\u7b56\u7565\u4e0e\u8d85\u9650\u5904\u7f6e\uff1b\u628a\u542f\u53d1\u5f0f\u8bcd\u5143\u6570\u6362\u7b97\u4e3a\u76ee\u6807\u6a21\u578b\u7684\u771f\u5b9e\u6d88\u8017\u3002</li> </ul>"},{"location":"reference/api/harness/#CLIskill-family-token-estimate","title":"CLI\uff1askill-family-token-estimate","text":"<ul> <li>\u5165\u53e3\uff1aharness \u5305 bin <code>skill-family-token-estimate</code>\uff08<code>src/token-estimate-cli.mjs</code>\uff09\uff1b\u4e0e\u5de5\u7a0b Kit \u7684\u56db\u547d\u4ee4\u4e92\u4e0d\u6df7\u7528\u3002</li> <li>\u7528\u6cd5\uff1a<code>skill-family-token-estimate (--text &lt;s&gt; | --file &lt;p&gt; | --stdin) [--estimator tokens|upper-bound|both]</code>\uff1b\u9ed8\u8ba4 <code>--estimator tokens</code>\u3002<code>both</code> \u8f93\u51fa <code>{ tokens, upperBound }</code> \u4e24\u4e2a\u952e\uff0c\u660e\u793a\u4e24\u4e2a\u4f30\u7b97\u5668\u5e76\u5b58\u800c\u975e\u6df7\u5408\u3002</li> <li>\u8f93\u51fa\uff1astdout \u6253\u5370 JSON \u4f30\u7b97\u8bb0\u5f55\uff08<code>tokens</code> \u4e3a\u4f30\u7b97\u8bb0\u5f55\uff0c<code>upper-bound</code> \u4e3a <code>token-estimate-result</code>\uff09\uff0c\u6362\u884c\u7ed3\u5c3e\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u53ea\u8bfb\u53d6\u547d\u4ee4\u884c\u53c2\u6570\u3001<code>--file</code> \u6307\u5b9a\u6587\u4ef6\u6216 stdin\uff1b\u53ea\u5199 stdout\u3002</li> <li>\u7a33\u5b9a\u9000\u51fa\u7801\uff1a<code>0</code> \u6210\u529f\uff1b<code>2</code> \u7528\u6cd5\u9519\u8bef\uff08\u8f93\u5165\u6e90\u7f3a\u5931\u6216\u4e92\u65a5\u3001\u672a\u77e5\u53c2\u6570\u3001<code>--file</code> \u76ee\u6807\u4e0d\u662f\u666e\u901a\u6587\u4ef6\u7b49\uff0cstderr \u7ed9\u51fa\u539f\u56e0\uff09\uff1b<code>--help</code> \u6253\u5370\u7528\u6cd5\u540e\u9000\u51fa 0\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>--file</code> \u6309\u8c03\u7528\u65b9\u7ed9\u5b9a\u7684\u8def\u5f84\u539f\u6837\u8bfb\u53d6\uff0cCLI \u4e0d\u505a\u8def\u5f84\u6536\u5bb9\uff1b\u9700\u8981\u6536\u5bb9\u65f6\u5728\u5e93\u5185\u7528 <code>readFileContained</code>\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.6.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/token-estimate-cli.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/token-estimator.test.mjs</code>\uff08\u5b50\u8fdb\u7a0b CLI \u7528\u4f8b\uff1a\u786e\u5b9a\u6027\u3001<code>--file</code>/<code>--stdin</code>/<code>both</code>\u3001\u7528\u6cd5\u9519\u8bef\u9000\u51fa\u7801 2\u3001<code>--help</code>\uff09\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u8f93\u5165\u6587\u672c\u7684\u91c7\u96c6\u4e0e\u88c1\u526a\u7b56\u7565\u3001\u8f93\u51fa\u8bb0\u5f55\u7684\u5f52\u6863\u4f4d\u7f6e\u3002</li> </ul>"},{"location":"reference/api/harness/#\u901a\u7528\u4e0a\u9650\u5b88\u536b-foundationharnessupper-bound-guard","title":"\u901a\u7528\u4e0a\u9650\u5b88\u536b (foundation.harness.upper-bound-guard)","text":"<p>FND-ADR-009\u3002\u590d\u7528 state-store \u4e8b\u4ef6\u8d26\u4e0e token-lock \u663e\u5f0f\u5360\u7528\u5b9e\u73b0\u901a\u7528\u4e0a\u9650\u5b88\u536b\uff1a\u8d8a\u9650\u4e8b\u4ef6\u5931\u8d25\u5173\u95ed\u4e14\u4e0d\u5199\u5165\uff1b\u4e0a\u9650\u503c\u3001\u5355\u4f4d\u7c7b\u522b\u4e0e\u8d85\u9650\u7b56\u7565\u5168\u90e8\u7531\u6d88\u8d39\u8005\u914d\u7f6e\uff0c\u6a21\u5757\u4e0d\u643a\u5e26\u4efb\u4f55\u56fa\u5b9a\u6570\u989d\u6216\u5b9a\u4ef7\u8bcd\u6c47\u3002</p>"},{"location":"reference/api/harness/#openUsageGuard--appendUsageEvent--readUsage--closeUsageGuard","title":"openUsageGuard / appendUsageEvent / readUsage / closeUsageGuard","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>openUsageGuard({ stateRoot, owner, payloadSchemas, reducer, initial = 0, upperBound, lockRoot, lockPath, clock } = {})</code>\uff08async\uff09</li> <li><code>appendUsageEvent(guard, event, { beforeCommit } = {})</code>\uff08async\uff09</li> <li><code>readUsage(guard)</code>\uff08async\uff09</li> <li><code>closeUsageGuard(guard)</code>\uff08async\uff09</li> <li>\u8f93\u5165\uff1a\u4e8b\u4ef6\u8d1f\u8f7d\u3001\u7eaf\u5f52\u7ea6\u51fd\u6570\u3001\u975e\u8d1f\u4e0a\u9650\u3001\u72b6\u6001\u6839\u4e0e\u9501\u6839/\u9501\u8def\u5f84\u3002</li> <li>\u8f93\u51fa\uff1a\u8ffd\u52a0\u7ed3\u679c\u3001\u5f53\u524d\u7528\u91cf\u8bfb\u6570\u3001\u5b88\u536b\u53e5\u67c4\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u5426\uff08\u5199\u4e8b\u4ef6\u8d26\u4e0e\u9501\u6587\u4ef6\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u5728\u53d7\u6536\u5bb9\u8def\u5f84\u5199\u4e8b\u4ef6\u8d26\u4e0e\u9501\u6587\u4ef6\uff1b\u6253\u5f00\u65f6\u663e\u5f0f\u5360\u7528\u9501\u3001\u5173\u95ed\u65f6\u91ca\u653e\u3002</li> <li>\u7a33\u5b9a\u9519\u8bef\u7801\u4e0e <code>details.kind</code>\uff1a\u8d8a\u9650\u629b <code>SFC2004</code> + <code>upper-bound-exceeded</code>\uff08details \u542b <code>upperBound</code> / <code>projected</code>\uff0c\u4e8b\u4ef6\u4e0d\u5199\u5165\uff09\uff1b\u9501\u88ab\u5360\u7528\u629b <code>store-locked</code>\uff1b\u4e8b\u4ef6\u8d26\u65ad\u94fe\u629b <code>chain-broken</code>\uff1b\u4e8b\u4ef6 schema \u8fdd\u89c4\u629b <code>event-schema-invalid</code>\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1a<code>lockRoot</code>/<code>lockPath</code> \u7531\u6d88\u8d39\u8005\u6307\u5b9a\u5728 state store \u6839\u4e4b\u5916\uff1b\u4e8b\u4ef6\u8d26\u662f\u552f\u4e00\u6743\u5a01\uff1bfencing \u4e0d\u627f\u8bfa\u62b5\u5fa1\u540c\u6743\u9650\u6076\u610f\u8fdb\u7a0b\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.3.0</code> / <code>stable</code>\u3002</li> <li>\u6e90\u6587\u4ef6\uff1a<code>packages/skill-family-harness-node/src/budget-guard.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-harness-node/test/budget-guard.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u4e8b\u4ef6\u542b\u4e49\u3001\u5f52\u7ea6\u51fd\u6570\u3001\u4e0a\u9650\u6570\u503c\u4e0e\u8d85\u9650\u540e\u7684\u4e1a\u52a1\u5904\u7f6e\uff08\u5b9a\u4ef7\u4e0e\u8ba1\u8d39\u8bed\u4e49\u7559\u5728\u6d88\u8d39\u8005\uff09\u3002</li> </ul>"},{"location":"reference/api/harness/#Quickstart-Profile-v2-candidate","title":"Quickstart Profile v2 candidate","text":"<p>\u89c4\u8303\u5165\u53e3 <code>skill-family-harness-node/quickstart-profile</code> \u8d1f\u8d23\u521b\u5efa observation Resource\u3001Task \u4e0e\u7ec8\u6001 Result\uff0c\u5e76\u590d\u9a8c\u771f\u5b9e \u6587\u4ef6\u5b57\u8282\u3001Resource id \u5168\u5c40\u552f\u4e00\u6027\u3001Task digest\u3001operation \u8eab\u4efd\u3001\u9010\u5b57\u6bb5 <code>run/stage/attempt</code> \u4ee5\u53ca evidence \u7cbe\u786e\u56de\u6307\u3002 \u5386\u53f2\u5165\u53e3 <code>skill-family-harness-node/candidate/quickstart-profile</code> \u5728\u5f03\u7528\u7a97\u53e3\u5185\u89e3\u6790\u540c\u4e00\u6a21\u5757\uff1b\u6d88\u8d39\u8005\u5e94\u8fc1\u79fb\u4e00\u6b21\u3002 <code>verifyQuickstartExchange</code> \u628a\u673a\u5236\u62d2\u7edd\u8f6c\u6362\u6210\u7ed3\u6784\u5316\u7ed3\u679c\uff0c\u629b\u51fa\u5f0f\u5165\u53e3\u7ee7\u7eed\u4f7f\u7528\u5df2\u767b\u8bb0\u7684 <code>SFC2004</code> \u4e0e\u7a33\u5b9a <code>details.kind</code>\u3002</p>"},{"location":"reference/api/harness/#invokeFoundationMechanism","title":"invokeFoundationMechanism","text":"<p><code>invokeFoundationMechanism(request)</code> \u662f\u56fa\u5b9a\u673a\u5236\u6865\u63a5\u3002\u8c03\u7528\u65b9\u53ea\u80fd\u9009\u62e9\u9884\u5148\u767b\u8bb0\u7684 operation\uff0c\u4e0d\u80fd\u4f20\u5165\u6a21\u5757\u540d\u3001\u5bfc\u51fa\u540d\u6216\u4efb\u610f\u51fd\u6570\u30020.8.2 \u65b0\u589e\u7684 <code>read-file-strict</code> \u76f4\u63a5\u8c03\u7528\u4e0a\u6587\u7684 <code>readFileStrict</code>\uff1a</p> <pre><code>{\n \"operation\": \"read-file-strict\",\n \"params\": {\n \"root\": \"/absolute/consumer-root\",\n \"path\": \"authority/frozen.json\",\n \"encoding\": \"utf8\",\n \"expectedSha256\": \"&lt;lowercase-sha256&gt;\"\n }\n}\n</code></pre> <p><code>params</code> \u662f\u95ed\u5408\u5bf9\u8c61\u3002<code>root</code> \u4e0e <code>path</code> \u662f\u5fc5\u586b\u975e\u7a7a\u5b57\u7b26\u4e32\uff1b<code>encoding</code> \u53ea\u80fd\u662f <code>utf8</code> \u6216\u7701\u7565\uff1b<code>expectedSha256</code> \u7701\u7565\u65f6\u4e0d\u505a\u9884\u671f\u6458\u8981\u6bd4\u5bf9\uff0c\u63d0\u4f9b\u65f6\u6cbf\u7528\u6838\u5fc3\u4e25\u683c\u8bfb\u53d6\u5408\u540c\u3002</p> <p>\u6865\u63a5\u4fdd\u7559\u6838\u5fc3\u56de\u6267\u7684 <code>path</code>\u3001<code>sha256</code>\u3001<code>bytes</code> \u4e0e <code>mode</code>\u3002UTF-8 \u5185\u5bb9\u4ecd\u662f\u5b57\u7b26\u4e32\uff1b\u4e8c\u8fdb\u5236\u5185\u5bb9\u6295\u5f71\u6210 Node \u6807\u51c6\u7684 Buffer JSON \u5f62\u6001 <code>{ \"type\": \"Buffer\", \"data\": [...] }</code>\uff0c\u4ee5\u4fbf\u901a\u8fc7 JSON \u4f20\u8f93\u540e\u65e0\u635f\u8fd8\u539f\u5b57\u8282\u3002</p> <p>\u76f4\u63a5\u8c03\u7528\u5931\u8d25\u65f6\u6cbf\u7528\u6838\u5fc3\u5f02\u5e38\uff0c\u5305\u62ec <code>SFC2004</code> \u4e0e <code>details.kind</code>\u3002\u5019\u9009 <code>mechanisms-cli.mjs</code> \u7ee7\u7eed\u4f7f\u7528\u4e00\u8bf7\u6c42\u4e00\u54cd\u5e94 JSON\uff1a\u6210\u529f\u9000\u51fa 0\uff0c\u62d2\u7edd\u6216\u7528\u6cd5\u9519\u8bef\u9000\u51fa 2\uff1bCLI \u9519\u8bef JSON \u53ea\u627f\u8bfa <code>name</code> \u4e0e <code>message</code>\uff0c\u4e0d\u627f\u8bfa\u8de8\u8bed\u8a00\u4fdd\u7559 <code>details</code>\u3002</p> <p>\u8be5\u5165\u53e3\u4e0d\u9009\u62e9 method\uff0c\u4e0d\u89e3\u91ca domainResult\uff0c\u4e5f\u4e0d\u62e5\u6709\u91cd\u8bd5\u3001\u8c03\u5ea6\u6216\u751f\u547d\u5468\u671f\u3002\u6d88\u8d39\u8005\u5fc5\u987b\u628a Contracts\u3001Harness \u4e0e Engineering Kit \u7cbe\u786e\u9501\u5b9a\u5230\u540c\u4e00\u7248\u672c\uff1b\u4e0d\u80fd\u4ece Foundation \u5de5\u4f5c\u6811\u5bfc\u5165\u6e90\u7801\u30020.3.0 \u7684 v2 \u4e0e 0.2.1 \u7684 v1 \u4e0d\u517c\u5bb9\u3002 \u8fc1\u79fb\u5230\u89c4\u8303\u5165\u53e3\u548c Schema \u8eab\u4efd\u540e\uff0c\u540e\u7eed\u4ec5\u664b\u5347 stable \u4e0d\u518d\u8981\u6c42\u6539\u5408\u540c\u8eab\u4efd\uff1b\u6d88\u8d39\u8005\u4ecd\u9700\u66f4\u65b0\u7cbe\u786e pin \u624d\u80fd\u53d6\u5f97\u65b0\u53d1\u5e03\u7684 stable \u627f\u8bfa\uff0cBundle \u662f\u5426\u91cd\u5efa\u7531\u65e2\u6709\u5305\u5b57\u8282\u4e0e provenance \u7ed1\u5b9a\u8f93\u5165\u51b3\u5b9a\u3002</p> <p><code>rename-directory-no-replace</code> \u7684\u89c4\u8303\u5165\u53e3\u662f <code>skill-family-harness-node/rename-directory-no-replace</code>\uff1b\u5386\u53f2 <code>/candidate/rename-directory-no-replace</code> \u5165\u53e3\u89e3\u6790\u540c\u4e00\u539f\u751f\u539f\u8bed\u3002 \u8be5\u539f\u8bed\u4ecd\u4e0d\u7b49\u540c\u4e8e\u7a33\u5b9a\u7684\u9ad8\u5c42 <code>fixed-set-publication</code>\uff0c\u6d88\u8d39\u8005\u5e94\u6839\u636e\u6240\u9700\u5408\u540c\u9009\u62e9\uff0c\u4e0d\u5f97\u7528\u522b\u540d\u6df7\u6dc6\u4e24\u4e2a\u80fd\u529b\u5c42\u6b21\u3002</p>"},{"location":"reference/api/harness/#\u673a\u5236\u6279\u91cf-foundationharnessmechanism-batch","title":"\u673a\u5236\u6279\u91cf (foundation.harness.mechanism-batch)","text":"<p>FND-DES-022\u3002\u6709\u754c\u3001\u540c\u64cd\u4f5c\u3001\u987a\u5e8f\u7684\u8de8\u8fdb\u7a0b\u6279\u91cf\u4f20\u8f93\uff1a\u628a\u4e00\u7ec4\u76f8\u4e92\u72ec\u7acb\u7684 <code>canonical-json</code> \u8bf7\u6c42\u5408\u5e76\u4e3a\u4e00\u6b21\u8fdb\u7a0b\u542f\u52a8\u4e0e\u4f20\u8f93\uff0c\u9010\u9879\u7ed3\u679c\u4e0e\u9519\u8bef\u5b57\u8282\u7b49\u4ef7\u4e8e\u540c\u7248\u672c\u539f\u5355\u8bf7\u6c42\u8c03\u7528\u3002\u5df2\u7ecf\u4f4d\u4e8e\u540c\u4e00 Node \u8fdb\u7a0b\u5185\u7684\u8c03\u7528\u4e0d\u5f3a\u5236\u6539\u6279\u3002\u672c\u5207\u7247\u53ea\u5b9e\u73b0\u8be5\u6279\u91cf\u5408\u540c\uff0c\u4e0d\u65b0\u589e\u5e38\u9a7b\u670d\u52a1\u3001\u5e76\u53d1\u3001\u7f13\u5b58\u3001\u91cd\u8bd5\u3001\u8de8\u9879\u5f15\u7528\u3001\u5de5\u4f5c\u6d41\u3001\u6536\u636e\u6216\u6ce8\u518c\u8868\u3002</p>"},{"location":"reference/api/harness/#runMechanismCliBatch--mechanisms-climjs---batch","title":"runMechanismCliBatch / mechanisms-cli.mjs --batch","text":"<ul> <li>\u7b7e\u540d\uff1a</li> <li><code>runMechanismCliBatch({ input = stdin, output = stdout, error = stderr, invoke } = {})</code>\uff08async\uff0c\u8fd4\u56de\u6574\u4f53\u9000\u51fa\u7801\uff09</li> <li>CLI \u663e\u5f0f\u6a21\u5f0f\uff1a<code>node &lt;\u540c\u7248\u672c\u5b98\u65b9 Bundle \u5185\u7684 mechanisms-cli.mjs&gt; --batch</code>\uff0c\u4ece\u6807\u51c6\u8f93\u5165\u8bfb\u53d6\u6070\u597d\u4e00\u4e2a JSON \u6587\u6863\uff0c\u5199\u51fa\u4e00\u4e2a\u6279\u6b21\u54cd\u5e94\u540e\u9000\u51fa\u3002\u5e26 <code>--batch</code> \u4e14\u51fa\u73b0\u989d\u5916\u53c2\u6570\u65f6\u5728\u8bfb\u53d6\u8f93\u5165\u524d\u62d2\u7edd\uff1b\u65e0 <code>--batch</code> \u65f6\u4ecd\u8fd0\u884c\u65e7 <code>runMechanismCli</code> \u5355\u8bf7\u6c42\u5165\u53e3\uff0c\u4e0d\u5bf9\u65e7\u8bf7\u6c42\u65b0\u589e\u5bb9\u91cf\u9650\u5236\u3002</li> <li>\u8f93\u5165\uff1a\u6070\u597d\u542b <code>operation</code>\uff08\u56fa\u5b9a <code>canonical-json</code>\uff09\u4e0e <code>inputs</code>\uff08\u975e\u7a7a\u6709\u5e8f\u6570\u7ec4\uff0c\u6bcf\u9879\u6070\u597d <code>{ \"document\": &lt;\u4efb\u610f JSON \u503c&gt; }</code>\uff09\u7684\u4e00\u4e2a JSON \u6587\u6863\u3002\u4e0d\u652f\u6301 NDJSON\u3001\u4f1a\u8bdd\u534f\u8bae\u3001\u6570\u7ec4\u81ea\u52a8\u63a2\u6d4b\u3001\u6bcf\u9879\u81ea\u5e26\u64cd\u4f5c\u6216\u5d4c\u5957\u6279\u6b21\u3002\u9876\u5c42\u7f3a/\u591a\u5b57\u6bb5\u3001\u9879\u7f3a <code>document</code>\u3001\u7a7a\u6570\u7ec4\u4e0e\u672a\u77e5\u64cd\u4f5c\u5c5e\u4e8e\u6574\u6279\u7ed3\u6784\u5931\u8d25\u3002</li> <li>\u8f93\u51fa\uff1a<code>{ \"results\": [{ \"inputIndex\", \"exitCode\", \"response\" }] }</code>\uff0c\u957f\u5ea6\u4e0e\u8f93\u5165\u4e00\u81f4\u3001\u5e8f\u53f7\u4ece 0 \u8fde\u7eed\u9012\u589e\uff1b<code>exitCode</code> \u53ea\u53d6 0\uff08\u6210\u529f\uff09\u6216 2\uff08\u5931\u8d25\uff09\u3002\u6210\u529f\u9879 <code>response</code> \u4e3a\u539f\u673a\u5236\u7ed3\u679c\uff1b\u5931\u8d25\u9879\u4e3a\u539f CLI \u7684 <code>{ ok: false, error: { name, message, code?, details? } }</code> \u9519\u8bef\u5bf9\u8c61\u3002\u9010\u9879\u8fd8\u539f\u89c4\u5219\u56fa\u5b9a\u4e3a <code>JSON.stringify(response) + \"\\n\"</code>\uff0c\u9000\u51fa\u7801 0 \u5bf9\u5e94\u539f stdout\u30012 \u5bf9\u5e94\u539f stderr\uff0c\u53e6\u4e00\u901a\u9053\u4e3a\u7a7a\uff1b\u9519\u8bef\u5bf9\u8c61\u4e0d\u91cd\u65b0\u6392\u5e8f\u6216\u89c4\u8303\u5316\u3002</li> <li>\u7eaf\u51fd\u6570\uff1a\u662f\uff08\u9010\u9879\u7ecf\u65e2\u6709\u56fa\u5b9a\u5206\u6d3e\u5668 <code>invokeFoundationMechanism</code> \u6267\u884c\uff0c\u4e0d\u5f15\u5165\u7b2c\u4e8c\u5957\u7b97\u6cd5\uff1b\u6d4b\u8bd5\u53ef\u6ce8\u5165\u65e2\u6709\u53ef\u4fe1 <code>invoke</code>\uff0c\u4f46\u8f93\u5165 JSON \u4e0d\u5f97\u6307\u5b9a\u51fd\u6570\u3001\u6a21\u5757\u3001\u8def\u5f84\u6216\u8986\u76d6\u5206\u6d3e\u5668\uff09\u3002</li> <li>\u526f\u4f5c\u7528\uff1a\u65e0\u6587\u4ef6/\u7f51\u7edc/\u8fdb\u7a0b\u526f\u4f5c\u7528\uff0c\u65e0\u6b8b\u4f59\u72b6\u6001\uff1b\u53ea\u5199\u8c03\u7528\u65b9\u63d0\u4f9b\u7684 <code>output</code>/<code>error</code> \u6d41\uff08\u9ed8\u8ba4\u8fdb\u7a0b\u6807\u51c6\u6d41\uff09\u3002</li> <li>\u5bb9\u91cf\uff08\u56fa\u5b9a\u653f\u7b56\uff0c\u6743\u5a01\u503c\u7531 Contracts <code>mechanism-batch-policy.json</code> \u6301\u6709\uff0c\u672c\u9875\u4e0e Harness \u4ece\u8be5\u6743\u5a01\u6d3e\u751f\uff0c\u8c03\u7528\u65b9\u4e0d\u53ef\u8c03\u9ad8\uff09\uff1a</li> </ul> \u9650\u5236 \u542b\u8fb9\u754c\u7684\u6700\u5927\u503c \u8ba1\u91cf\u5bf9\u8c61\u4e0e\u68c0\u67e5\u65f6\u70b9 \u8f93\u5165\u9879\u6570 256 \u89e3\u6790\u540e\u3001\u9010\u9879\u8c03\u7528\u524d \u8bf7\u6c42\u5b57\u8282 16 MiB\uff0816,777,216\uff09 \u539f\u59cb UTF-8 \u6d41\u542b\u7a7a\u767d\uff0c\u62fc\u63a5\u4e0e\u89e3\u6790\u524d\u7d2f\u8ba1 \u54cd\u5e94\u5b57\u8282 32 MiB\uff0833,554,432\uff09 \u5b8c\u6574 JSON \u54cd\u5e94\u4e0e\u6700\u540e\u6362\u884c\uff0c\u53d1\u9001\u524d\u7d2f\u8ba1\u786e\u8ba4 <ul> <li>\u5931\u8d25\u8bed\u4e49\uff1a\u8bf7\u6c42\u5b57\u8282\u3001\u8f93\u5165\u9879\u6570\u6216\u7ed3\u6784\u7684\u9884\u68c0\u62d2\u7edd\u5728\u4efb\u4f55\u673a\u5236\u8c03\u7528\u524d\u53d1\u751f\uff0cstdout \u4e3a\u7a7a\uff0c<code>error</code> \u6d41\u5199\u4e00\u4e2a\u6279\u6b21\u9519\u8bef\u5bf9\u8c61\u5e76\u6574\u4f53\u9000\u51fa 2\u3002\u8f93\u51fa\u5bb9\u91cf\u53ea\u80fd\u5728\u5f53\u524d\u9879\u5df2\u7ecf\u8fd4\u56de\u540e\u786e\u8ba4\uff1b\u8d85\u9650\u65f6\u505c\u6b62\u540e\u7eed\u9879\uff0cstdout \u4ecd\u4e3a\u7a7a\uff0c<code>error</code> \u6d41\u5199\u6279\u6b21\u9519\u8bef\u5bf9\u8c61\u5e76\u9000\u51fa 2\u3002\u9519\u8bef\u4e3a <code>TypeError</code> \u6295\u5f71\uff0c<code>details.kind</code> \u5c01\u95ed\u4e3a <code>batch-structure-invalid</code>\u3001<code>batch-item-limit</code>\u3001<code>batch-input-limit</code>\u3001<code>batch-output-limit</code>\uff0c\u4e0d\u65b0\u589e SFC \u9519\u8bef\u7801\u3002\u7578\u5f62 UTF-8\u3001\u7578\u5f62 JSON \u4e0e\u8f93\u5165\u6d41\u9519\u8bef\u5c5e\u4f20\u8f93\u5931\u8d25\uff0c\u4fdd\u7559\u539f\u5f02\u5e38\u6295\u5f71\uff0c\u4e0d\u4f2a\u88c5\u4e3a\u673a\u5236\u4e1a\u52a1\u5931\u8d25\u3001\u4e0d\u4f2a\u9020\u67d0\u4e2a <code>inputIndex</code>\u3002\u5355\u9879\u673a\u5236\u5931\u8d25\uff08\u542b unsafe integer \u7b49\u7559\u7ed9\u539f\u5206\u6d3e\u5668\u6309\u9879\u5224\u65ad\u7684\u7ea6\u675f\uff09\u7ecf\u539f CLI \u9519\u8bef\u6295\u5f71\u5199\u5165\u8be5\u9879 <code>response</code> \u5e76\u7ee7\u7eed\u6267\u884c\u540e\u7eed\u9879\u3002\u8f93\u51fa\u901a\u9053\u5931\u8d25\u65f6\u53ef\u80fd\u5df2\u6709\u90e8\u5206\u5b57\u8282\u9001\u51fa\uff1b\u6574\u4f53\u9000\u51fa 2\uff0c\u6d88\u8d39\u8005\u5fc5\u987b\u628a\u622a\u65ad JSON\u3001\u901a\u9053\u9519\u8bef\u6216\u8fdb\u7a0b\u65e0\u6b63\u5e38\u5b8c\u6210\u7ed3\u679c\u5224\u4e3a\u4f20\u8f93\u5931\u8d25\uff0c\u4e0d\u80fd\u4ece\u524d\u7f00\u8ba4\u5b9a\u6279\u6b21\u6210\u529f\u3002\u82e5\u8fde\u9519\u8bef\u901a\u9053\u4e5f\u5199\u5165\u5931\u8d25\uff0c\u9519\u8bef\u5bf9\u8c61\u53ef\u80fd\u65e0\u6cd5\u4ea4\u4ed8\u3002</li> <li>\u6574\u4f53\u9000\u51fa\u7801\u4e09\u5206\u652f\uff1a\u6240\u6709\u673a\u5236\u9879\u6210\u529f \u2192 0\uff0cstdout \u4e3a\u5b8c\u6574\u6279\u6b21\u7ed3\u679c\u52a0\u4e00\u4e2a\u6362\u884c\u3001stderr \u7a7a\uff1b\u81f3\u5c11\u4e00\u4e2a\u673a\u5236\u9879\u5931\u8d25 \u2192 2\uff0cstdout \u4ecd\u4e3a\u5b8c\u6574\u6279\u6b21\u7ed3\u679c\u3001stderr \u7a7a\uff1b\u6279\u6b21\u9884\u68c0\u3001\u8f93\u51fa\u5bb9\u91cf\u6216\u4f20\u8f93\u5931\u8d25 \u2192 2\u3002\u9884\u68c0\u4e0e\u8f93\u51fa\u5bb9\u91cf\u5931\u8d25\u65f6 stdout \u7a7a\u3001stderr \u4e3a\u4e00\u4e2a\u6279\u6b21\u9519\u8bef\u5bf9\u8c61\u4e0e\u6362\u884c\uff1b\u8f93\u51fa\u901a\u9053\u5931\u8d25\u65f6\u4e0d\u627f\u8bfa\u6536\u56de\u5df2\u7ecf\u53d1\u9001\u7684\u5b57\u8282\u3002</li> <li>\u524d\u7f6e\u6761\u4ef6\u4e0e\u4fe1\u4efb\u951a\uff1aContracts\u3001Harness \u4e0e Engineering Kit \u7cbe\u786e\u9501\u5b9a\u540c\u4e00\u7248\u672c\uff1b\u7a0b\u5e8f\u5316\u51fd\u6570\u4e0e CLI \u90fd\u7ecf\u8c03\u7528\u65b9\u5df2\u5b89\u88c5\u5e76\u9a8c\u8bc1\u6765\u6e90\u7684\u5b98\u65b9 Bundle \u6d88\u8d39\uff08Bundle \u7531\u540c\u7248\u672c\u4e09\u5305\u751f\u6210\uff0c\u4fdd\u7559\u6765\u6e90\u8eab\u4efd\u3001\u6458\u8981\u4e0e\u5b8c\u6574\u6027\u68c0\u67e5\uff09\uff0c\u4e0d\u4ece Foundation \u5de5\u4f5c\u6811\u5bfc\u5165\u6e90\u7801\uff1b\u8c03\u7528\u65b9\u63d0\u4f9b input/output/error \u6d41\u3002\u5df2\u6709 Schema \u6279\u91cf\u6821\u9a8c\uff08<code>validate-many-by-schema-id</code>\uff09\u7ee7\u7eed\u4f7f\u7528\u539f\u5165\u53e3\uff0c\u4e0d\u5d4c\u5957\u3001\u4e0d\u91cd\u65b0\u5305\u88c5\u3002</li> <li><code>since</code> / <code>stability</code>\uff1a<code>0.19.0</code> / <code>candidate</code>\u3002<code>candidate</code> \u4e0d\u7b49\u4e8e <code>stable</code>\uff0c\u672c\u5730\u5019\u9009\u6d4b\u8bd5\u901a\u8fc7\u4e5f\u4e0d\u6539\u53d8\u6210\u719f\u5ea6\uff1b\u662f\u5426\u53d1\u5e03\u987b\u67e5\u5bf9\u5e94\u7248\u672c\u7684\u53d1\u5e03\u540e\u9a8c\u8bc1\u8bc1\u636e\uff0c\u4e0d\u80fd\u4ece <code>stability</code> \u63a8\u65ad\u3002</li> <li>\u6e90\u6587\u4ef6\uff1aContracts \u65b0 Schema <code>packages/skill-family-contracts/candidate/foundation-mechanisms/mechanism-batch-request.schema.json</code>\u3001<code>mechanism-batch-result.schema.json</code> \u4e0e\u5bb9\u91cf\u6743\u5a01 <code>mechanism-batch-policy.json</code>\uff1bHarness <code>packages/skill-family-harness-node/candidate/mechanisms-cli.mjs</code>\uff1bKit \u79bb\u7ebf Bundle \u6295\u5f71 <code>packages/skill-family-engineering-kit/candidate/profile-bundle.mjs</code>\u3002</li> <li>\u6b63\u4f8b/\u8d1f\u4f8b\u6d4b\u8bd5\uff1a<code>packages/skill-family-contracts/test/quickstart-profile.test.mjs</code>\u3001<code>packages/skill-family-harness-node/test/quickstart-profile.test.mjs</code>\u3001<code>packages/skill-family-engineering-kit/test/candidate-mechanisms-cli.test.mjs</code>\u3001<code>packages/skill-family-engineering-kit/test/candidate-profile-bundle.test.mjs</code>\u3002</li> <li>\u8c03\u7528\u65b9\u4ecd\u62e5\u6709\u7684\u4e1a\u52a1\u8bed\u4e49\uff1a\u9886\u57df\u5206\u7ec4\u4e0e\u5bb9\u91cf\u5207\u5206\u3001\u8bf7\u6c42\u95f4\u4f9d\u8d56\u5173\u7cfb\u5224\u65ad\u3001\u7cbe\u786e pin \u4e0e\u6765\u6e90\u8eab\u4efd\u7ed1\u5b9a\u3001\u6279\u6b21\u91c7\u7528\u5b8c\u6210\u4e0e\u9886\u57df\u56de\u5f52\u5224\u5b9a\u3002\u9010\u9879\u8fc1\u79fb\u793a\u4f8b\uff1a\u628a\u82e5\u5e72 <code>{ \"operation\": \"canonical-json\", \"params\": { \"document\": ... } }</code> \u5355\u8bf7\u6c42\u5408\u5e76\u4e3a <code>{ \"operation\": \"canonical-json\", \"inputs\": [{ \"document\": ... }, ...] }</code>\uff0c\u518d\u6309 <code>results[i].inputIndex</code> \u8bfb\u56de\u9010\u9879 <code>response</code> \u4e0e <code>exitCode</code>\uff1b\u540c\u4e00 Node \u8fdb\u7a0b\u5185\u7684\u76f4\u63a5\u8c03\u7528\u7ee7\u7eed\u4f7f\u7528 <code>invokeFoundationMechanism</code>\uff0c\u4e0d\u88ab\u5f3a\u5236\u6539\u6210\u6279\u91cf\u3002</li> </ul>"},{"location":"reference/api/harness/#\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","title":"\u4e0e\u673a\u5668\u4e8b\u5b9e\u5c42\u7684\u4e92\u94fe","text":"<ul> <li>\u80fd\u529b\u7a33\u5b9a ID \u89c1 <code>docs/agents/capability-catalog.json</code>\uff08<code>foundation.harness.*</code>\uff09\u3002</li> <li>\u673a\u68b0\u6821\u9a8c\uff1a<code>scripts/docs/capability-catalog-check.mjs</code> \u89e3\u6790 <code>src/index.mjs</code>\uff0c\u62d2\u7edd\u5f15\u7528\u4e0d\u5b58\u5728\u7684\u5165\u53e3\u3002</li> </ul>"},{"location":"reference/api/harness/#\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u66ff\u8eabfake-Foundation-0140","title":"\u6d88\u8d39\u65b9\u5951\u7ea6\u6d4b\u8bd5\u66ff\u8eab\uff08<code>fake</code>\uff09 (Foundation 0.14.0)","text":"<p><code>createAtomicWriteFake({ vector })</code> \u662f\u6309\u80fd\u529b\u5177\u540d\u5bfc\u51fa\u7684\u5b98\u65b9\u6d4b\u8bd5\u66ff\u8eab\uff0c\u5165\u53e3\u4e3a <code>skill-family-harness-node/contract-testing</code>\u3002\u5b83\u8981\u6c42\u4f20\u5165\u5df2\u7531 Contracts \u6821\u9a8c\u3001\u8eab\u4efd\u4e0e \u7cbe\u786e\u7248\u672c\u5339\u914d\u4e14\u5c1a\u672a\u6d88\u8d39\u7684 atomic-write \u5411\u91cf\uff1b\u8c03\u7528\u7b7e\u540d\u4fdd\u6301 <code>writeFileAtomic(root, relPath, data, options)</code>\uff0c\u4f46\u6d4b\u8bd5\u66ff\u8eab\u4e0d\u8bbf\u95ee\u771f\u5b9e\u6587\u4ef6\u7cfb\u7edf\u3002</p> <p><code>fake.identity</code> \u56fa\u5b9a\u66b4\u9732 <code>capabilityId</code>\u3001<code>vectorSetId</code> \u4e0e <code>foundationVersion</code>\u3002 <code>fake.observation()</code> \u8fd4\u56de\u51bb\u7ed3\u7684\u8c03\u7528\u53c2\u6570\u6458\u8981\u548c <code>return</code>\u3001<code>throw</code> \u6216 <code>indeterminate</code> \u7ed3\u679c\u3002\u6d4b\u8bd5\u66ff\u8eab\u8986\u76d6\u5411\u91cf\u58f0\u660e\u7684\u6210\u529f\u3001\u62d2\u7edd\u4e0e\u4e0d\u786e\u5b9a\u8def\u5f84\uff0c\u4e0d\u5224\u5b9a\u6d88\u8d39\u8005\u9886\u57df\u4fdd\u8bc1\uff1b\u6d88\u8d39\u8005\u987b \u53e6\u884c\u8fd0\u884c\u81f3\u5c11\u4e00\u6761\u53d7\u63a7\u771f\u5b9e\u516c\u5171\u8c03\u7528\u8def\u5f84\u3002</p>"}]}