skill-family-engineering-kit 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/CODE_OF_CONDUCT.md +131 -0
  2. package/CONTRIBUTING.md +69 -0
  3. package/LICENSE +201 -0
  4. package/README.md +74 -0
  5. package/SECURITY.md +34 -0
  6. package/data/licensing/registry.json +211 -0
  7. package/data/licensing/schema.json +207 -0
  8. package/docs/.nojekyll +0 -0
  9. package/docs/404.html +613 -0
  10. package/docs/architecture/index.html +904 -0
  11. package/docs/assets/images/favicon.png +0 -0
  12. package/docs/assets/javascripts/bundle.d7400e89.min.js +16 -0
  13. package/docs/assets/javascripts/lunr/min/lunr.ar.min.js +1 -0
  14. package/docs/assets/javascripts/lunr/min/lunr.da.min.js +18 -0
  15. package/docs/assets/javascripts/lunr/min/lunr.de.min.js +18 -0
  16. package/docs/assets/javascripts/lunr/min/lunr.du.min.js +18 -0
  17. package/docs/assets/javascripts/lunr/min/lunr.el.min.js +1 -0
  18. package/docs/assets/javascripts/lunr/min/lunr.es.min.js +18 -0
  19. package/docs/assets/javascripts/lunr/min/lunr.fi.min.js +18 -0
  20. package/docs/assets/javascripts/lunr/min/lunr.fr.min.js +18 -0
  21. package/docs/assets/javascripts/lunr/min/lunr.he.min.js +1 -0
  22. package/docs/assets/javascripts/lunr/min/lunr.hi.min.js +1 -0
  23. package/docs/assets/javascripts/lunr/min/lunr.hu.min.js +18 -0
  24. package/docs/assets/javascripts/lunr/min/lunr.hy.min.js +1 -0
  25. package/docs/assets/javascripts/lunr/min/lunr.it.min.js +18 -0
  26. package/docs/assets/javascripts/lunr/min/lunr.ja.min.js +1 -0
  27. package/docs/assets/javascripts/lunr/min/lunr.jp.min.js +1 -0
  28. package/docs/assets/javascripts/lunr/min/lunr.kn.min.js +1 -0
  29. package/docs/assets/javascripts/lunr/min/lunr.ko.min.js +1 -0
  30. package/docs/assets/javascripts/lunr/min/lunr.multi.min.js +1 -0
  31. package/docs/assets/javascripts/lunr/min/lunr.nl.min.js +18 -0
  32. package/docs/assets/javascripts/lunr/min/lunr.no.min.js +18 -0
  33. package/docs/assets/javascripts/lunr/min/lunr.pt.min.js +18 -0
  34. package/docs/assets/javascripts/lunr/min/lunr.ro.min.js +18 -0
  35. package/docs/assets/javascripts/lunr/min/lunr.ru.min.js +18 -0
  36. package/docs/assets/javascripts/lunr/min/lunr.sa.min.js +1 -0
  37. package/docs/assets/javascripts/lunr/min/lunr.stemmer.support.min.js +1 -0
  38. package/docs/assets/javascripts/lunr/min/lunr.sv.min.js +18 -0
  39. package/docs/assets/javascripts/lunr/min/lunr.ta.min.js +1 -0
  40. package/docs/assets/javascripts/lunr/min/lunr.te.min.js +1 -0
  41. package/docs/assets/javascripts/lunr/min/lunr.th.min.js +1 -0
  42. package/docs/assets/javascripts/lunr/min/lunr.tr.min.js +18 -0
  43. package/docs/assets/javascripts/lunr/min/lunr.vi.min.js +1 -0
  44. package/docs/assets/javascripts/lunr/min/lunr.zh.min.js +1 -0
  45. package/docs/assets/javascripts/lunr/tinyseg.js +206 -0
  46. package/docs/assets/javascripts/lunr/wordcut.js +6708 -0
  47. package/docs/assets/javascripts/workers/search.2c215733.min.js +42 -0
  48. package/docs/assets/stylesheets/main.ec1eaa64.min.css +1 -0
  49. package/docs/assets/stylesheets/palette.ab4e12ef.min.css +1 -0
  50. package/docs/git-lifecycle/index.html +976 -0
  51. package/docs/help/index.html +907 -0
  52. package/docs/index.html +837 -0
  53. package/docs/integration/audit/baseline/audit-codes.json +62 -0
  54. package/docs/integration/audit/failure-evidence/index.html +872 -0
  55. package/docs/integration/audit/independence/index.html +841 -0
  56. package/docs/integration/audit/index.html +826 -0
  57. package/docs/integration/audit/mutation-taxonomy/index.html +1022 -0
  58. package/docs/integration/audit/schemas/audit-evidence.schema.json +182 -0
  59. package/docs/integration/audit/version-compatibility/index.html +845 -0
  60. package/docs/migration/index.html +1213 -0
  61. package/docs/quickstart/index.html +842 -0
  62. package/docs/search/search_index.json +1 -0
  63. package/docs/setup/index.html +941 -0
  64. package/docs/sitemap.xml +51 -0
  65. package/package.json +42 -0
  66. package/src/adopt-plan.mjs +594 -0
  67. package/src/check.mjs +415 -0
  68. package/src/cli.mjs +230 -0
  69. package/src/errors.mjs +144 -0
  70. package/src/gitprobe.mjs +230 -0
  71. package/src/identity-check.mjs +563 -0
  72. package/src/index.mjs +233 -0
  73. package/src/license-texts/Apache-2.0.txt +201 -0
  74. package/src/license-texts/MIT.txt +21 -0
  75. package/src/licensing.mjs +299 -0
  76. package/src/migration.mjs +427 -0
  77. package/src/projection.mjs +397 -0
  78. package/src/scaffold.mjs +178 -0
  79. package/src/skeleton.mjs +886 -0
  80. package/src/workspace.mjs +236 -0
@@ -0,0 +1,131 @@
1
+ # 贡献者公约(Contributor Covenant Code of Conduct)
2
+
3
+ 本行为准则采用 Contributor Covenant 2.1 标准文本,来源明确:
4
+ `https://www.contributor-covenant.org/version/2/1/code_of_conduct/`。
5
+ 译文与解读以英文原文为准;执行联系方式见文末。
6
+
7
+ ## Our Pledge
8
+
9
+ We as members, contributors, and leaders pledge to make participation in our
10
+ community a harassment-free experience for everyone, regardless of age, body
11
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
12
+ identity and expression, level of experience, education, socio-economic status,
13
+ nationality, personal appearance, race, religion, or sexual identity
14
+ and orientation.
15
+
16
+ We pledge to act and interact in ways that contribute to an open, welcoming,
17
+ diverse, inclusive, and healthy community.
18
+
19
+ ## Our Standards
20
+
21
+ Examples of behavior that contributes to a positive environment for our
22
+ community include:
23
+
24
+ * Demonstrating empathy and kindness toward other people
25
+ * Being respectful of differing opinions, viewpoints, and experiences
26
+ * Giving and gracefully accepting constructive feedback
27
+ * Accepting responsibility and apologizing to those affected by our mistakes,
28
+ and learning from the experience
29
+ * Focusing on what is best not just for us as individuals, but for the
30
+ overall community
31
+
32
+ Examples of unacceptable behavior include:
33
+
34
+ * The use of sexualized language or imagery, and sexual attention or
35
+ advances of any kind
36
+ * Trolling, insulting or derogatory comments, and personal or political attacks
37
+ * Public or private harassment
38
+ * Publishing others' private information, such as a physical or email
39
+ address, without their explicit permission
40
+ * Other conduct which could reasonably be considered inappropriate in a
41
+ professional setting
42
+
43
+ ## Enforcement Responsibilities
44
+
45
+ Community leaders are responsible for clarifying and enforcing our standards of
46
+ acceptable behavior and will take appropriate and fair corrective action in
47
+ response to any behavior that they deem inappropriate, threatening, offensive,
48
+ or harmful.
49
+
50
+ Community leaders have the right and responsibility to remove, edit, or reject
51
+ comments, commits, code, wiki edits, issues, and other contributions that are
52
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
53
+ decisions when appropriate.
54
+
55
+ ## Scope
56
+
57
+ This Code of Conduct applies within all community spaces, and also applies when
58
+ an individual is officially representing the community in public spaces.
59
+ Examples of representing our community include using an official e-mail address,
60
+ posting via an official social media account, or acting as an appointed
61
+ representative at an online or offline event.
62
+
63
+ ## Enforcement
64
+
65
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
66
+ reported to the community leaders responsible for enforcement through the
67
+ source repository's private channels (see SECURITY.md for private reporting).
68
+ All complaints will be reviewed and investigated promptly and fairly.
69
+
70
+ All community leaders are obligated to respect the privacy and security of the
71
+ reporter of any incident.
72
+
73
+ ## Enforcement Guidelines
74
+
75
+ Community leaders will follow these Community Impact Guidelines in determining
76
+ the consequences for any action they deem in violation of this Code of Conduct:
77
+
78
+ ### 1. Correction
79
+
80
+ **Community Impact**: Use of inappropriate language or other behavior deemed
81
+ unprofessional or unwelcome in the community.
82
+
83
+ **Consequence**: A private, written warning from community leaders, providing
84
+ clarity around the nature of the violation and an explanation of why the
85
+ behavior was inappropriate. A public apology may be requested.
86
+
87
+ ### 2. Warning
88
+
89
+ **Community Impact**: A violation through a single incident or series
90
+ of actions.
91
+
92
+ **Consequence**: A warning with consequences for continued behavior. No
93
+ interaction with the people involved, including unsolicited interaction with
94
+ those enforcing the Code of Conduct, for a specified period of time. This
95
+ includes avoiding interactions in community spaces as well as external channels
96
+ like social media. Violating these terms may lead to a temporary or
97
+ permanent ban.
98
+
99
+ ### 3. Temporary Ban
100
+
101
+ **Community Impact**: A serious violation of community standards, including
102
+ sustained inappropriate behavior.
103
+
104
+ **Consequence**: A temporary ban from any sort of interaction or public
105
+ communication with the community for a specified period of time. No public or
106
+ private interaction with the people involved, including unsolicited interaction
107
+ with those enforcing the Code of Conduct, is allowed during this period.
108
+ Violating these terms may lead to a permanent ban.
109
+
110
+ ### 4. Permanent Ban
111
+
112
+ **Community Impact**: Demonstrating a pattern of violation of community
113
+ standards, including sustained inappropriate behavior, harassment of an
114
+ individual, or aggression toward or disparagement of classes of individuals.
115
+
116
+ **Consequence**: A permanent ban from any sort of public interaction within
117
+ the community.
118
+
119
+ ## Attribution
120
+
121
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
122
+ version 2.1, available at
123
+ `https://www.contributor-covenant.org/version/2/1/code_of_conduct/`.
124
+
125
+ Community Impact Guidelines were inspired by Mozilla's code of conduct
126
+ enforcement ladder.
127
+
128
+ For answers to common questions about this code of conduct, see the FAQ at
129
+ `https://www.contributor-covenant.org/faq`.
130
+
131
+ [homepage]: https://www.contributor-covenant.org
@@ -0,0 +1,69 @@
1
+ # 贡献指南(Contributing)
2
+
3
+ 感谢关注 `skill-family-foundation-workspace`。本文件说明本地开发环境、
4
+ 验证流程与 PR 规则。行为准则见 [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md),
5
+ Git 写操作的授权边界见仓库内文档站的生命周期指南(`docs/git-lifecycle.md`)。
6
+
7
+ 拓扑说明:本工作区仓永久 private,是唯一开发真源;三个 public 仓
8
+ (`skill-family-contracts`、`skill-family-harness-node`、
9
+ `skill-family-engineering-kit`)是版本化发布镜像,不承载完整开发历史与
10
+ 测试,也不接受直接 PR 或 issue。本指南描述的是私有工作区内经授权的开发
11
+ 流程;消费坐标与发布状态唯一见 `docs/status/current.md`。
12
+
13
+ ## 本地安装
14
+
15
+ 必需工具(精确版本见仓库内 `docs/setup.md` 的安装合同):
16
+
17
+ - Node.js:`>=22.22.2 <23`(版本取自 `.node-version`)
18
+ - pnpm:10.30.0(`packageManager` 精确锁定)
19
+ - Python:3.10 或更高(仅文档站构建需要)
20
+
21
+ ```bash
22
+ pnpm install
23
+ pnpm synth
24
+ pnpm check
25
+ ```
26
+
27
+ - `pnpm synth` 再生成 projen 受管文件。受管文件只能通过修改
28
+ `.projenrc.js` 间接变更;手写源码、文档和 fixture 不会被 synth 覆盖。
29
+ - `pnpm check` 是统一根门禁:10 个稳定门禁 ID 按固定顺序串联执行,
30
+ 任一步骤非 0 即整体失败。
31
+
32
+ ## 提交 PR 前必须做到
33
+
34
+ 1. 只修改当前任务授权的文件,不顺手改动无关文件;
35
+ 2. 修改 `.projenrc.js` 后运行 `pnpm synth`,并保证连续两次 synth 零漂移;
36
+ 3. 本地完整通过根门禁:
37
+
38
+ ```bash
39
+ pnpm check
40
+ ```
41
+
42
+ 4. 涉及文档时额外运行文档事实与链接检查:
43
+
44
+ ```bash
45
+ node scripts/docs/fact-check.mjs
46
+ node scripts/docs/link-check.mjs
47
+ ```
48
+
49
+ 5. 涉及三个叶子包时,确认发布字节合同仍然成立:
50
+
51
+ ```bash
52
+ pnpm run release-artifacts:build -- --output .artifacts/publish-candidates
53
+ pnpm run release-artifacts:verify -- --root .artifacts/publish-candidates --manifest .artifacts/publish-candidates/release-artifacts.manifest.json
54
+ ```
55
+
56
+ ## PR 规则
57
+
58
+ - PR 描述须包含:动机、变更面、本地门禁结果(退出码)与剩余风险;
59
+ - 不得为转绿而弱化任何产品门禁、Action pin、权限、泄漏策略或 tarball 合同;
60
+ - 不新增运行时依赖,除非先经评审并显式修订泄漏策略中的公开依赖清单;
61
+ - 不提交生成物与本地状态:`node_modules`、`site/`、`.artifacts/`、缓存、
62
+ 日志、凭据或本机绝对路径一律不进入提交;
63
+ - 受管投影必须与产生它的源变更在同一 PR 内提交,禁止手改受管文件;
64
+ - 动态状态(实时发布状态、远端对象状态)不写入版本化文档,唯一产品状态
65
+ 口径见 `docs/status/current.md`。
66
+
67
+ ## 安全报告
68
+
69
+ 漏洞报告渠道与支持版本见 [SECURITY.md](SECURITY.md)。
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ <!-- release-skill:safe-first-command -->
2
+ <!-- release-skill:external-write-boundary -->
3
+
4
+ # skill-family-engineering-kit
5
+
6
+ 开发与 CI 阶段使用的工程工具包。**恰好四个**顶层命令,没有第五个:
7
+
8
+ | 命令 | 用途 | 副作用 |
9
+ | --- | --- | --- |
10
+ | `scaffold` | 在空目录生成 Skill Family 项目骨架 | 只向空目标目录写入骨架文件(原子写、路径收容);非空或冲突目标被拒绝且不被触碰 |
11
+ | `adopt-plan` | 严格只读地规划存量仓采用 | 无——不写任何文件(含临时文件),不运行 git 写命令;计划输出到 stdout |
12
+ | `projection` | 投影受管生成物 | 只写 manifest 授权且被目标声明为受管的路径;未授权、手写与越界路径一律拒绝(拒绝时零写入) |
13
+ | `check` | 契约/漂移/闭包/版本/文档事实/Git 前置状态诊断 | 无——只诊断、绝不自动修复;git 仅只读探测 |
14
+
15
+ ## 使用
16
+
17
+ ```sh
18
+ node packages/skill-family-engineering-kit/src/cli.mjs --help
19
+ node packages/skill-family-engineering-kit/src/cli.mjs scaffold --root <empty-dir> --project-id my-project
20
+ node packages/skill-family-engineering-kit/src/cli.mjs adopt-plan --root <repo>
21
+ node packages/skill-family-engineering-kit/src/cli.mjs projection --root <repo>
22
+ node packages/skill-family-engineering-kit/src/cli.mjs check --root <repo>
23
+ ```
24
+
25
+ ## 边界机制
26
+
27
+ - `scaffold` 的目标必须是**空目录**(任何条目含点文件都算非空),或其父目录已存在的不存在路径(只创建最后一级)。
28
+ 全部写入经 harness 的原子收容写(`writeFileAtomic`),失败不留半成品,路径不能越出目标根。
29
+ - `adopt-plan` 结构性只读:实现中不存在任何写调用,连临时文件都不产生;计划字节与 `scaffold`
30
+ 同源(`describeSkeletonFiles` 单一事实源),因此「计划即动作」。dirty 仓运行前后字节级零变化。
31
+ - `projection` 采用两阶段执行:先对每个条目做路径分类、收容预检、自投影检查、manifest 授权检查、
32
+ 手写保护与冲突守卫;任一条目违规则整体拒绝、零写入。覆盖既有文件必须声明精确的 `expect.sha256`
33
+ 前置状态;内容相同的既有文件是幂等 no-op。写入失败时尽力还原已覆盖文件的前置字节。
34
+ - `check` 只诊断:无写调用、无 `--fix/--apply/--repair` 模式(此类标志在入口处被拒绝)。
35
+ Git 前置状态仅用文件系统事实加至多一次冻结参数矢量的只读 `git status --porcelain=2`
36
+ (`--no-optional-locks` + `GIT_OPTIONAL_LOCKS=0`,不刷新索引)。
37
+
38
+ ## 错误码与退出码
39
+
40
+ 错误码复用 contracts 冻结的 SFC\* 体系,不新增码:
41
+
42
+ - `SFC2002`(UNKNOWN_OPERATION)——入口收到四命令词表之外的命令名;
43
+ - `SFC2003`(INVALID_PARAMS)——选项/参数值违规,或请求 `--fix` 等不存在的变更模式;
44
+ - `SFC2004`(EXECUTION_FAILED)——执行期失败,`details.kind` 为稳定的 kit 级 kind
45
+ (如 `target-not-empty`、`unauthorized-path`、`handwritten-overwrite`、`conflict-drift`);
46
+ harness 抛出的收容类 kind(`path-traversal`、`symlink-escape` 等)原样透传;
47
+ - `SFC1001`(SCHEMA_VALIDATION_FAILED)——`check` 发现的合同文档未通过注册 Schema。
48
+
49
+ 进程退出码:`0` 成功/无发现;`1` check 有发现;`2` 拒绝/用法/机制错误。
50
+
51
+ ## 目标工作区文档约定
52
+
53
+ - `skill-family.project-manifest.json` —— contracts 的 project-manifest 实例(项目身份与 managedFiles 声明);
54
+ - `skill-family.managed-file-lock.json` —— contracts 的 managed-file-lock 实例(受管路径与内容哈希锁定);
55
+ - `skill-family.projection.json` —— projection 的授权 manifest(kit 级文档)。
56
+
57
+ projection 只写同时满足两个条件的路径:manifest 列出,且目标自身的登记
58
+ (file-registry / project-manifest managedFiles / managed-file-lock)声明为受管。
59
+ 匹配手写模式的路径永不写入,即使有受管声明也拒绝。
60
+
61
+ ## 禁止项
62
+
63
+ 本包不得执行 git init、commit、push、tag、stash、分支切换、发布、删除、远端写入或发布状态复述;
64
+ 不实现第五个顶层命令;不做业务判断、模型调用、远程网络。
65
+
66
+ ## 安装
67
+
68
+ ```sh
69
+ npm install skill-family-engineering-kit
70
+ ```
71
+
72
+ ## 故障诊断
73
+
74
+ `check` 退出码 1 表示有发现,退出码 2 表示用法或机制错误。如失败,确认目标仓库存在且 `skill-family.project-manifest.json` 形状合法;路径越界或手写保护触发时命令会拒绝写入并报告 `SFC2004`。
package/SECURITY.md ADDED
@@ -0,0 +1,34 @@
1
+ # 安全策略(Security Policy)
2
+
3
+ ## 支持的版本
4
+
5
+ | 版本 | 安全支持状态 |
6
+ | --- | --- |
7
+ | 0.1.x | 当前维护线:接受安全报告 |
8
+ | 0.0.0 | 未发布的内部骨架版本,不在公开支持范围 |
9
+
10
+ 安全修复只承诺在最新的 0.1.x 线上提供;更早版本不回移修复。
11
+
12
+ ## 报告漏洞
13
+
14
+ 请勿通过公开 issue 直接披露未修复的安全漏洞。private workspace 仓永久
15
+ private,不是公开报告渠道;请通过任一 public 发布镜像仓(例如
16
+ `https://github.com/ifoohoo/skill-family-engineering-kit`)在 GitHub 上使用
17
+ **Private vulnerability reporting**(仓库 Security 页签的
18
+ "Report a vulnerability")私下报告;如该通道不可用,再通过仓库维护者
19
+ 提供的私下联系方式报告。
20
+
21
+ 报告时请尽量提供:
22
+
23
+ - 受影响的包与版本(`skill-family-contracts`、`skill-family-harness-node`、
24
+ `skill-family-engineering-kit`);
25
+ - 可复现的最小步骤或概念验证;
26
+ - 影响范围与利用前提。
27
+
28
+ ## 处置承诺
29
+
30
+ - 收到报告后先确认受理,再按影响面排期修复;
31
+ - 修复发布前不公开披露细节;
32
+ - 修复随下一个补丁版本发布,并在该版本的变更记录中说明。
33
+
34
+ 本文件只描述漏洞报告渠道与支持版本;实时发布状态不属于本文件范围。