release-skill 0.2.5 → 0.2.7

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 (76) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +42 -0
  7. package/INSTALL.md +40 -16
  8. package/INSTALL.zh-CN.md +34 -12
  9. package/README.md +42 -15
  10. package/README.zh-CN.md +36 -15
  11. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/release-skill.bundle.mjs +2671 -1552
  14. package/adapters/claude/schemas/.render-manifest.json +6 -6
  15. package/adapters/claude/schemas/release-plan.schema.json +67 -0
  16. package/adapters/claude/schemas/release-project.schema.json +6 -0
  17. package/adapters/claude/schemas/release-run.schema.json +65 -0
  18. package/adapters/claude/skills/release-prepare/SKILL.md +5 -0
  19. package/adapters/claude/skills/release-setup/SKILL.md +10 -1
  20. package/adapters/claude/skills/release-verify/SKILL.md +4 -2
  21. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  22. package/adapters/codex/bin/release-skill.bundle.mjs +2671 -1552
  23. package/adapters/codex/schemas/.render-manifest.json +6 -6
  24. package/adapters/codex/schemas/release-plan.schema.json +67 -0
  25. package/adapters/codex/schemas/release-project.schema.json +6 -0
  26. package/adapters/codex/schemas/release-run.schema.json +65 -0
  27. package/adapters/codex/skills/release-prepare/SKILL.md +5 -0
  28. package/adapters/codex/skills/release-setup/SKILL.md +10 -1
  29. package/adapters/codex/skills/release-verify/SKILL.md +4 -2
  30. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  31. package/adapters/kimi/bin/release-skill.bundle.mjs +2671 -1552
  32. package/adapters/kimi/schemas/.render-manifest.json +6 -6
  33. package/adapters/kimi/schemas/release-plan.schema.json +67 -0
  34. package/adapters/kimi/schemas/release-project.schema.json +6 -0
  35. package/adapters/kimi/schemas/release-run.schema.json +65 -0
  36. package/adapters/kimi/skills/release-prepare/SKILL.md +5 -0
  37. package/adapters/kimi/skills/release-setup/SKILL.md +10 -1
  38. package/adapters/kimi/skills/release-verify/SKILL.md +4 -2
  39. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  40. package/adapters/workbuddy/bin/release-skill.bundle.mjs +2671 -1552
  41. package/adapters/workbuddy/schemas/.render-manifest.json +6 -6
  42. package/adapters/workbuddy/schemas/release-plan.schema.json +67 -0
  43. package/adapters/workbuddy/schemas/release-project.schema.json +6 -0
  44. package/adapters/workbuddy/schemas/release-run.schema.json +65 -0
  45. package/adapters/workbuddy/skills/release-prepare/SKILL.md +5 -0
  46. package/adapters/workbuddy/skills/release-setup/SKILL.md +10 -1
  47. package/adapters/workbuddy/skills/release-verify/SKILL.md +4 -2
  48. package/bin/release-skill.bundle.mjs +2671 -1552
  49. package/package.json +1 -1
  50. package/references/.render-manifest.json +4 -4
  51. package/references/02-project-config.md +28 -2
  52. package/references/05-evidence-and-errors.md +6 -0
  53. package/schemas/.render-manifest.json +6 -6
  54. package/schemas/release-plan.schema.json +67 -0
  55. package/schemas/release-project.schema.json +6 -0
  56. package/schemas/release-run.schema.json +65 -0
  57. package/skills/release-prepare/SKILL.md +5 -0
  58. package/skills/release-setup/SKILL.md +10 -1
  59. package/skills/release-verify/SKILL.md +4 -2
  60. package/skills-src/release-prepare/SKILL.md +5 -0
  61. package/skills-src/release-setup/SKILL.md +10 -1
  62. package/skills-src/release-verify/SKILL.md +4 -2
  63. package/src/adapters/npm.mjs +54 -2
  64. package/src/adapters/plugin-marketplace.mjs +4 -29
  65. package/src/commands/prepare.mjs +161 -4
  66. package/src/commands/publish.mjs +74 -2
  67. package/src/commands/reconcile.mjs +58 -0
  68. package/src/commands/setup.mjs +194 -0
  69. package/src/commands/verify.mjs +60 -1
  70. package/src/core/errors.mjs +12 -0
  71. package/src/core/source-authority.mjs +547 -0
  72. package/src/npm/npm-entry-closure.mjs +195 -0
  73. package/src/platforms/codebuddy.mjs +19 -11
  74. package/src/platforms/codex.mjs +18 -10
  75. package/src/platforms/kimi.mjs +26 -39
  76. package/src/snapshot/frozen.mjs +51 -19
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "release-skill",
11
11
  "source": "./",
12
- "version": "0.2.5",
12
+ "version": "0.2.7",
13
13
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification"
14
14
  }
15
15
  ]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "defaultPrompt": [
21
21
  "Assess this project for release readiness.",
22
- "Prepare a release plan for version 0.2.5.",
22
+ "Prepare a release plan for version 0.2.7.",
23
23
  "Help me understand the release workflow."
24
24
  ]
25
25
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release-skill:changelog:start version=0.2.7 locale=en baseline=sha256:05d12ddcc435b3c4438561dba780481ead1ac7662d946c3c36ddf8123dcaebe3 -->
4
+ ## [0.2.7] - 2026-07-29
5
+
6
+ v0.2.7 prevents npm packages with missing declared runtime entries from being prepared, published, reconciled, or marked as verified.
7
+
8
+ ### Added
9
+
10
+ - **Static npm entry closure**: release-skill checks `bin`, `main`, `module`, `types`, `typings`, and concrete local `exports` targets against the exact frozen tarball and the freshly installed package.
11
+ - **Setup diagnostics**: setup reports declared npm entry candidates as tracked, untracked, ignored, missing, or non-regular without modifying project configuration.
12
+
13
+ ### Changed
14
+
15
+ - **Fail-closed unsupported exports**: wildcard exports and fallback arrays remain outside the minimal resolver boundary and now block release instead of being guessed or silently skipped.
16
+ - **Final write-boundary verification**: the npm adapter rechecks the same digest-verified tarball buffer immediately before registry publication.
17
+
18
+ ### Fixed
19
+
20
+ - **Empty-shell package verification**: a package can no longer reach `PREPARED`, remote publication, reconciliation, or `VERIFIED` when its declared runtime or type entry is absent.
21
+ <!-- release-skill:changelog:end version=0.2.7 locale=en -->
22
+
23
+
24
+ <!-- release-skill:changelog:start version=0.2.6 locale=en baseline=sha256:ba7fe1d8cbae8ea3a539016c1231acd066f6dbf30b6e1ebb9db50e7c04e69253 -->
25
+ ## [0.2.6] - 2026-07-29
26
+
27
+ v0.2.6 adds a source-authority content gate so a production release cannot succeed while the project workspace's real default branch still exposes stale public files.
28
+
29
+ ### Added
30
+
31
+ - **Source-authority content closure**: prepare freezes the exact public input paths and executable modes that must exist on the configured source repository's actual default branch.
32
+ - **Pre-publish remote proof**: publish compares the frozen closure with the remote default branch before any external write and records a digest-bound receipt that verify requires.
33
+
34
+ ### Changed
35
+
36
+ - **Branch topology tolerance**: projects may develop directly on the default branch or use release branches; compliance is based on final content, not merge ancestry or a hard-coded branch name.
37
+ - **Minimal conflict policy**: divergent or conflicting source state fails closed with diagnostics; Release Skill does not auto-merge, rebase, force-push, or create a replacement branch workflow.
38
+
39
+ ### Fixed
40
+
41
+ - **Stale workspace README after release**: production publishing now blocks when the source workspace's real default branch does not contain the frozen public README and other declared source inputs.
42
+ <!-- release-skill:changelog:end version=0.2.6 locale=en -->
43
+
44
+
3
45
  <!-- release-skill:changelog:start version=0.2.5 locale=en baseline=sha256:8bd4c268f65c72efeb3866ef4bcae7d1fa902e02833e622ca66670b633b124b1 -->
4
46
  ## [0.2.5] - 2026-07-28
5
47
 
package/INSTALL.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [简体中文](INSTALL.zh-CN.md)
4
4
 
5
- <!-- release-skill:release-version: 0.2.5 -->
5
+ <!-- release-skill:release-version: 0.2.7 -->
6
6
  ## Prerequisites
7
7
 
8
8
  - Node.js 22.0.0 or later
@@ -120,7 +120,7 @@ as a version-pinned **manual** install plus trusted observation/attestation:
120
120
  permanent writes are consistent. The run record gives the pinned install URL
121
121
  and the attestation path.
122
122
  2. Read the requirement at
123
- `<root>/.release-skill/kimi-attestations/<planDigest>/<plugin>/release-skill-kimi-manual-install.json`.
123
+ `<root>/.release-skill/kimi-attestations/<plugin>/release-skill-kimi-manual-install.json`.
124
124
  3. Launch Kimi Code and install from the release tag pinned to the exact
125
125
  version (never the bare repository URL, which installs the latest release or
126
126
  default branch), confirm the trust prompt, then reload. Before writing the
@@ -128,19 +128,19 @@ as a version-pinned **manual** install plus trusted observation/attestation:
128
128
  frozen version; otherwise do NOT issue an attestation.
129
129
 
130
130
  ```
131
- /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.5
131
+ /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.7
132
132
  /plugins reload
133
133
  ```
134
134
 
135
135
  4. Write the attestation JSON to
136
- `<root>/.release-skill/kimi-attestations/<planDigest>/<plugin>/release-skill-kimi-attestation.json`.
136
+ `<root>/.release-skill/kimi-attestations/<plugin>/release-skill-kimi-attestation.json`.
137
137
  `planDigest` MUST be the frozen **plan** digest; `result` accepts only
138
138
  `"passed"` or `"failed"`. Example:
139
139
 
140
140
  ```json
141
141
  {
142
142
  "platform": "kimi",
143
- "version": "0.2.5",
143
+ "version": "0.2.7",
144
144
  "planDigest": "<64-hex frozen plan digest>",
145
145
  "result": "passed",
146
146
  "actor": "<person who confirmed>",
@@ -150,8 +150,8 @@ as a version-pinned **manual** install plus trusted observation/attestation:
150
150
  ```
151
151
 
152
152
  5. Run `release-skill verify --run <publish-run>` (→
153
- `VERIFIED`). The verify command reads the attestation from the same
154
- plan-digest-keyed directory, so the fresh run directory does not lose the proof.
153
+ `VERIFIED`). The verify command reads the attestation from the stable
154
+ plugin-level directory, so the fresh run directory does not lose the proof.
155
155
 
156
156
  When a platform has no reliable automated verification, the bound human
157
157
  `passed`/`failed` attestation is authoritative. The `verify` command consumes
@@ -191,20 +191,20 @@ attestation (the same capability gap and closed loop as Kimi Code):
191
191
  install path fails closed. The run enters `PUBLISHED` after all remote
192
192
  permanent writes are consistent. The run record gives the attestation path.
193
193
  2. Read the requirement at
194
- `<root>/.release-skill/codebuddy-attestations/<planDigest>/<plugin>/release-skill-codebuddy-manual-install.json`.
194
+ `<root>/.release-skill/codebuddy-attestations/<plugin>/release-skill-codebuddy-manual-install.json`.
195
195
  3. Install release-skill from the bundled-family marketplace `ifoohoo/release-skill`
196
196
  (https://github.com/ifoohoo/release-skill). Before writing the
197
197
  attestation you MUST confirm the installed plugin manifest version equals the
198
198
  frozen version; otherwise do NOT issue an attestation.
199
199
  4. Write the attestation JSON to
200
- `<root>/.release-skill/codebuddy-attestations/<planDigest>/<plugin>/release-skill-codebuddy-attestation.json`.
200
+ `<root>/.release-skill/codebuddy-attestations/<plugin>/release-skill-codebuddy-attestation.json`.
201
201
  `planDigest` MUST be the frozen **plan** digest; `result` accepts only
202
202
  `"passed"` or `"failed"`. Example:
203
203
 
204
204
  ```json
205
205
  {
206
206
  "platform": "codebuddy",
207
- "version": "0.2.5",
207
+ "version": "0.2.7",
208
208
  "planDigest": "<64-hex frozen plan digest>",
209
209
  "result": "passed",
210
210
  "actor": "<person who confirmed>",
@@ -214,8 +214,8 @@ attestation (the same capability gap and closed loop as Kimi Code):
214
214
  ```
215
215
 
216
216
  5. Run `release-skill verify --run <publish-run>` (→
217
- `VERIFIED`). The verify command reads the attestation from the same
218
- plan-digest-keyed directory, so the fresh run directory does not lose the proof.
217
+ `VERIFIED`). The verify command reads the attestation from the stable
218
+ plugin-level directory, so the fresh run directory does not lose the proof.
219
219
 
220
220
  When a platform has no reliable automated verification, the bound human
221
221
  `passed`/`failed` attestation is authoritative. The `verify` command consumes
@@ -345,7 +345,11 @@ setup; use the mechanically extracted `recommendedAnswers`.
345
345
  "projectConfig": {
346
346
  "apiVersion": "release-skill/v1",
347
347
  "kind": "ReleaseProject",
348
- "project": { "name": "my-project", "defaultBranch": "main" },
348
+ "project": {
349
+ "name": "my-project",
350
+ "defaultBranch": "main",
351
+ "sourceRepository": "owner/my-workspace"
352
+ },
349
353
  "releaseUnits": [{
350
354
  "id": "my-project",
351
355
  "source": ".",
@@ -428,6 +432,7 @@ kind: ReleaseProject
428
432
  project:
429
433
  name: my-project
430
434
  defaultBranch: main
435
+ sourceRepository: owner/my-workspace
431
436
 
432
437
  releaseUnits:
433
438
  - id: my-project
@@ -643,6 +648,23 @@ The last two strategies require online production prepare. Any mismatch stops
643
648
  for review; update the human-owned config only after inspecting real remote
644
649
  state, and never force-push or weaken the baseline.
645
650
 
651
+ ### Workspace source authority
652
+
653
+ `project.sourceRepository` is the GitHub `owner/repo` of the workspace that
654
+ owns the human source files; it may differ from every release unit's
655
+ `publicRepo`. `project.defaultBranch` is that repository's actual remote
656
+ default branch and is not assumed to be `main`.
657
+
658
+ Production prepare freezes a content-and-mode closure of every expanded
659
+ `publicFiles.from` input and each unit's `version.source`. It rejects only
660
+ uncommitted changes inside that closure. Before any publish adapter executes,
661
+ release-skill verifies the same closure on the remote default branch. Commit
662
+ ancestry is intentionally irrelevant: merge, squash, and rebase are accepted
663
+ when the bytes still match, while a reverted or conflict-lost README is
664
+ blocked by path. Resolve differences manually and put the accepted content on
665
+ the default branch; release-skill never merges, switches branches, pushes, or
666
+ creates a PR.
667
+
646
668
  ## Protect Human-Owned Content
647
669
 
648
670
  README text, slogans, examples, layout, and other manually curated source files
@@ -673,10 +695,12 @@ When an existing public copy has drifted, choose explicitly:
673
695
  a release plan.
674
696
  - Before production, configure every unit's `previousPublicBaseline`. Use
675
697
  `mode: bound` with the exact `repo`, `ref`, and `commit` for an existing
676
- public version, then run `"${CLI[@]}" prepare --root <your-project> --online --production`.
698
+ public version. Also configure the workspace `project.sourceRepository` and
699
+ its real `project.defaultBranch`, then run
700
+ `"${CLI[@]}" prepare --root <your-project> --online --production`.
677
701
  The default observer proves only the ref-to-commit mapping; remote content is
678
- not downloaded. Target branch/tag/Release/npm uniqueness is checked by the
679
- publish global preflight before any execute.
702
+ not downloaded during prepare. Source content authority and target
703
+ branch/tag/Release/npm uniqueness are checked by publish before any execute.
680
704
  - For production commands, use only the immutable `planPath` returned by
681
705
  `prepare --json` and immutable `approvalPath` returned by `approve --json`.
682
706
  Mutable latest aliases are for convenience and are not production authority.
package/INSTALL.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](INSTALL.md)
4
4
 
5
- <!-- release-skill:release-version: 0.2.5 -->
5
+ <!-- release-skill:release-version: 0.2.7 -->
6
6
  ## 前置条件
7
7
 
8
8
  - Node.js 22.0.0 或更高版本
@@ -106,25 +106,25 @@ release-skill 把 Kimi 安装建模为“版本钉死的手动安装 + 可信观
106
106
  1. `publish` 先完成自动化远端写入(Git branch/tag、npm、GitHub Release)。
107
107
  `kimi-marketplace-install` 动作在 publish 阶段记录为 `DEFERRED`,不调用市场适配器,自动化安装路径失败关闭。全部远端永久写入一致后运行进入 `PUBLISHED`。运行记录会给出钉死的安装 URL 与证明写入路径。
108
108
  2. 读取 requirement:
109
- `<root>/.release-skill/kimi-attestations/<planDigest>/<plugin>/release-skill-kimi-manual-install.json`。
109
+ `<root>/.release-skill/kimi-attestations/<plugin>/release-skill-kimi-manual-install.json`。
110
110
  3. 启动 Kimi Code,从钉死到精确版本的 release tag 安装(切勿使用裸仓库地址,
111
111
  它会安装最新 release 或默认分支),确认信任提示后重新加载。写出证明之前,
112
112
  必须核实已安装插件清单版本等于冻结版本;否则**不得**出具证明。
113
113
 
114
114
  ```
115
- /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.5
115
+ /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.2.7
116
116
  /plugins reload
117
117
  ```
118
118
 
119
119
  4. 把人工结果 JSON 写入
120
- `<root>/.release-skill/kimi-attestations/<planDigest>/<plugin>/release-skill-kimi-attestation.json`。
120
+ `<root>/.release-skill/kimi-attestations/<plugin>/release-skill-kimi-attestation.json`。
121
121
  `planDigest` 必须是冻结**计划**摘要;`result` 只接受 `"passed"` 或 `"failed"`。
122
122
  示例:
123
123
 
124
124
  ```json
125
125
  {
126
126
  "platform": "kimi",
127
- "version": "0.2.5",
127
+ "version": "0.2.7",
128
128
  "planDigest": "<64 位十六进制冻结计划摘要>",
129
129
  "result": "passed",
130
130
  "actor": "<确认人>",
@@ -134,7 +134,7 @@ release-skill 把 Kimi 安装建模为“版本钉死的手动安装 + 可信观
134
134
  ```
135
135
 
136
136
  5. 运行 `release-skill verify --run <publish-run>`(→
137
- `VERIFIED`)。verify 命令从同一个按计划摘要命名的目录读取证明,因此新的
137
+ `VERIFIED`)。verify 命令从稳定的插件级目录读取证明,因此新的
138
138
  run 目录不会丢失该证明。
139
139
 
140
140
  当平台没有可靠的自动化验证时,绑定后的人工 `passed`/`failed` 结果即为权威判定。
@@ -166,19 +166,19 @@ codebuddy CLI 可以添加市场并安装插件,但 **`plugin marketplace add`
166
166
  `codebuddy-marketplace-install` 动作在 publish 阶段记录为 `DEFERRED`,不调用
167
167
  市场适配器,自动化安装路径失败关闭。全部远端永久写入一致后运行进入 `PUBLISHED`。运行记录会给出证明写入路径。
168
168
  2. 读取 requirement:
169
- `<root>/.release-skill/codebuddy-attestations/<planDigest>/<plugin>/release-skill-codebuddy-manual-install.json`。
169
+ `<root>/.release-skill/codebuddy-attestations/<plugin>/release-skill-codebuddy-manual-install.json`。
170
170
  3. 从 bundled-family 市场 `ifoohoo/release-skill`
171
171
  (https://github.com/ifoohoo/release-skill)安装 release-skill。
172
172
  写出证明之前,必须核实已安装插件清单版本等于冻结版本;否则**不得**出具证明。
173
173
  4. 把人工结果 JSON 写入
174
- `<root>/.release-skill/codebuddy-attestations/<planDigest>/<plugin>/release-skill-codebuddy-attestation.json`。
174
+ `<root>/.release-skill/codebuddy-attestations/<plugin>/release-skill-codebuddy-attestation.json`。
175
175
  `planDigest` 必须是冻结**计划**摘要;`result` 只接受 `"passed"` 或 `"failed"`。
176
176
  示例:
177
177
 
178
178
  ```json
179
179
  {
180
180
  "platform": "codebuddy",
181
- "version": "0.2.5",
181
+ "version": "0.2.7",
182
182
  "planDigest": "<64 位十六进制冻结计划摘要>",
183
183
  "result": "passed",
184
184
  "actor": "<确认人>",
@@ -188,7 +188,7 @@ codebuddy CLI 可以添加市场并安装插件,但 **`plugin marketplace add`
188
188
  ```
189
189
 
190
190
  5. 运行 `release-skill verify --run <publish-run>`(→
191
- `VERIFIED`)。verify 命令从同一个按计划摘要命名的目录读取证明,因此新的
191
+ `VERIFIED`)。verify 命令从稳定的插件级目录读取证明,因此新的
192
192
  run 目录不会丢失该证明。
193
193
 
194
194
  当平台没有可靠的自动化验证时,绑定后的人工 `passed`/`failed` 结果即为权威判定。
@@ -297,7 +297,11 @@ node -e 'require("node:fs").rmSync(process.argv[1],{recursive:true,force:false})
297
297
  "projectConfig": {
298
298
  "apiVersion": "release-skill/v1",
299
299
  "kind": "ReleaseProject",
300
- "project": { "name": "my-project", "defaultBranch": "main" },
300
+ "project": {
301
+ "name": "my-project",
302
+ "defaultBranch": "main",
303
+ "sourceRepository": "owner/my-workspace"
304
+ },
301
305
  "releaseUnits": [{
302
306
  "id": "my-project",
303
307
  "source": ".",
@@ -362,6 +366,7 @@ kind: ReleaseProject
362
366
  project:
363
367
  name: my-project
364
368
  defaultBranch: main
369
+ sourceRepository: owner/my-workspace
365
370
 
366
371
  releaseUnits:
367
372
  - id: my-project
@@ -512,6 +517,19 @@ production:
512
517
 
513
518
  后两种策略必须在线执行 production prepare。任何不一致都应停止并审阅;只有检查真实远端状态后才能人工更新权威配置,禁止 force push 或弱化基线。
514
519
 
520
+ ### Workspace 源码权威
521
+
522
+ `project.sourceRepository` 是承载人工源文件的 workspace GitHub
523
+ `owner/repo`,可以与各 release unit 的 `publicRepo` 不同。
524
+ `project.defaultBranch` 是该仓库真实的远端默认分支,不假设一定为 `main`。
525
+
526
+ 生产 prepare 冻结所有 `publicFiles.from` 展开输入和各 unit
527
+ `version.source` 的内容与 Git mode,只拒绝这个闭包内的未提交变化。publish 在任何
528
+ adapter execute 前从远端默认分支比较同一闭包。判定不依赖 commit ancestry,因此
529
+ merge、squash、rebase 后字节仍一致即可通过;README 被 revert 或冲突解决丢失时按路径
530
+ 阻断。差异必须由人工处理并把接受内容放入默认分支;release-skill 不自动 merge、切分支、
531
+ push 或创建 PR。
532
+
515
533
  ## 保护人工维护内容
516
534
 
517
535
  README 文案、slogan、示例、排版及其他人工源文件始终是权威。release-skill 只按 `publicFiles` 映射做快照,不重新生成或覆盖源 README。每次人工编辑后重新 prepare,并批准新的不可变计划;不得编辑冻结快照或复用旧批准绕过变化。
@@ -528,5 +546,9 @@ README 文案、slogan、示例、排版及其他人工源文件始终是权威
528
546
  - 缺少配置时运行 `"${CLI[@]}" setup --root <your-project> --json`,在人工决策完成前保持默认 dry-run。
529
547
  - 运行 `"${CLI[@]}" assess --root <your-project> --offline` 检查发布就绪度。
530
548
  - 运行 `"${CLI[@]}" prepare --root <your-project> --offline` 生成发布计划;release-skill 自身只做本地写入,但项目 hook 可能执行远端操作。
531
- - 生产前为每个 unit 配置 `previousPublicBaseline`。已有公开版本必须使用 `mode: bound`,绑定精确 `repo`、`ref` 和 `commit`,再运行 `"${CLI[@]}" prepare --root <your-project> --online --production`。
549
+ - 生产前为每个 unit 配置 `previousPublicBaseline`。已有公开版本必须使用 `mode: bound`,
550
+ 绑定精确 `repo`、`ref` 和 `commit`;同时配置 workspace 的
551
+ `project.sourceRepository` 与真实 `project.defaultBranch`,再运行
552
+ `"${CLI[@]}" prepare --root <your-project> --online --production`。prepare 不下载源码
553
+ 内容;publish 会在任何 execute 前检查源码权威闭包与目标唯一性。
532
554
  - 生产命令只使用 `prepare --json` 返回的不可变 `planPath`,以及 `approve --json` 返回的不可变 `approvalPath`。
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [简体中文](README.zh-CN.md) · Installation: [English](INSTALL.md) / [简体中文](INSTALL.zh-CN.md)
4
4
 
5
- <!-- release-skill:release-version: 0.2.5 -->
5
+ <!-- release-skill:release-version: 0.2.7 -->
6
6
  Release preparation for Claude Code, CodeBuddy, WorkBuddy, Codex, and Kimi Code, with human-edited files kept intact.
7
7
 
8
8
  release-skill helps a maintainer answer three questions: what will be released,
@@ -14,30 +14,27 @@ Setup surfaces only the deterministic `compactSummary` review view; the full
14
14
  report stays in a temporary session directory.
15
15
 
16
16
  <!-- release-skill:managed:start id=latest-release -->
17
- **0.2.5** (2026-07-28)
17
+ **0.2.7** (2026-07-29)
18
18
 
19
- v0.2.5 adds a built-in skill resource-closure release gate. Release Skill now validates the actual frozen and installed plugin projections instead of treating repository-level file presence as proof that every skill can resolve its resources.
19
+ v0.2.7 prevents npm packages with missing declared runtime entries from being prepared, published, reconciled, or marked as verified.
20
20
 
21
21
  **Added**
22
22
 
23
- - **Skill resource-closure gate**: recursively discovers nested skills and validates skill-local references, assets, schemas, examples, and private scripts from each skill root.
24
- - **Frozen and installed receipts**: prepare records closure receipts for every distribution surface, publish rechecks the frozen artifact before external writes, and verify requires matching receipts from real npm and plugin installation roots.
25
- - **Adversarial path checks**: rejects current-working-directory fallbacks, source-tree backjumps, absolute machine paths, path escape, symbolic links, and non-regular resource targets.
23
+ - **Static npm entry closure**: release-skill checks `bin`, `main`, `module`, `types`, `typings`, and concrete local `exports` targets against the exact frozen tarball and the freshly installed package.
24
+ - **Setup diagnostics**: setup reports declared npm entry candidates as tracked, untracked, ignored, missing, or non-regular without modifying project configuration.
26
25
 
27
26
  **Changed**
28
27
 
29
- - **Shared runtime resolution is explicit**: plugin-level scripts and cross-skill resources must resolve from a validated plugin root; bounded source-only build tools remain auditable exceptions.
30
- - **Kimi Code and CodeBuddy verification tightened**: consumer verification plans now bind to actual isolated or managed plugin installation paths.
31
- - **Legacy plan compatibility preserved**: existing frozen plans remain readable, while newly prepared plans require resource-closure evidence.
28
+ - **Fail-closed unsupported exports**: wildcard exports and fallback arrays remain outside the minimal resolver boundary and now block release instead of being guessed or silently skipped.
29
+ - **Final write-boundary verification**: the npm adapter rechecks the same digest-verified tarball buffer immediately before registry publication.
32
30
 
33
31
  **Fixed**
34
32
 
35
- - **Nested skill blind spot removed**: author, review, repair, and other nested skills are no longer skipped by resource validation.
36
- - **Public baseline tests synchronized**: migration invariants now track the configured v0.2.4 public baseline commit.
33
+ - **Empty-shell package verification**: a package can no longer reach `PREPARED`, remote publication, reconciliation, or `VERIFIED` when its declared runtime or type entry is absent.
37
34
  <!-- release-skill:managed:end id=latest-release -->
38
35
 
39
36
  <!-- release-skill:capability:external-write-boundary -->
40
- > **Current boundary:** v0.2.5 is the current release (v0.2.2 previously held
37
+ > **Current boundary:** v0.2.7 is the current release (v0.2.2 previously held
41
38
  > published status before the platform verification convergence fix was added).
42
39
  > v0.1.1 completed a real production release to GitHub and npm — the first
43
40
  > production-verified milestone — followed by
@@ -55,7 +52,7 @@ v0.2.5 adds a built-in skill resource-closure release gate. Release Skill now va
55
52
  > publish global preflight.
56
53
 
57
54
  <!-- release-skill:capability:safe-first-command -->
58
- > **Production path verified since the v0.1.1 milestone; v0.2.5 is the current
55
+ > **Production path verified since the v0.1.1 milestone; v0.2.7 is the current
59
56
  > release.** The npm-installed CLI is the supported user entry. Source checkout
60
57
  > is the development/contributor fallback.
61
58
  >
@@ -170,7 +167,12 @@ ACTOR=your-name
170
167
  ```
171
168
  The write must return `CONFIG_CREATED`; the next setup must return
172
169
  `ALREADY_CONFIGURED`. Existing configuration is never regenerated — make only
173
- reviewed incremental edits. Discovered scripts are `SIDE_EFFECTS_UNPROVEN`.
170
+ reviewed incremental edits. For npm units, setup also reports each concrete
171
+ `bin`/`main`/`module`/`types`/`typings`/`exports` target and legacy
172
+ `npmRequiredPackagePaths` as tracked, untracked, ignored, missing, or
173
+ non-regular. These are review candidates only: setup never copies them into
174
+ `publicFiles` or `requiredPublicFiles`. Discovered scripts are
175
+ `SIDE_EFFECTS_UNPROVEN`.
174
176
  Add a project-specific hook or gate only after human review: edit
175
177
  `projectConfig.hooks`, or edit `verificationGates` and add the same id to
176
178
  `selectedGateIds`, then rerun the bound dry-run.
@@ -263,6 +265,15 @@ again; it never rebuilds from a template. Only files listed in `publicFiles` are
263
265
  copied. `prepare` never refreshes or rewrites human docs — maintainers update
264
266
  README, INSTALL, and CHANGELOG first, then prepare, review, and approve.
265
267
 
268
+ **Workspace source authority:** production config names the workspace source
269
+ repository with `project.sourceRepository` and its real remote default branch
270
+ with `project.defaultBranch`. Prepare binds the content and Git mode of every
271
+ expanded `publicFiles.from` input plus each `version.source`; publish compares
272
+ that frozen closure with the remote default branch before the first adapter
273
+ write. The check accepts merge, squash, and rebase when the bytes still match,
274
+ but blocks a lost or reverted README by path. It never merges, switches
275
+ branches, pushes, or creates a PR.
276
+
266
277
  **Write safety:** `setup` is read-only by default (create-once after digest
267
278
  confirmation). `prepare` writes only under `.release-skill/`. `publish` is the
268
279
  production write entry, requiring both approval and the current plan digest.
@@ -293,6 +304,7 @@ kind: ReleaseProject
293
304
  project:
294
305
  name: my-project
295
306
  defaultBranch: main
307
+ sourceRepository: owner/my-workspace
296
308
  releaseUnits:
297
309
  - id: my-project
298
310
  source: .
@@ -333,6 +345,7 @@ kind: ReleaseProject
333
345
  project:
334
346
  name: my-workspace
335
347
  defaultBranch: main
348
+ sourceRepository: owner/my-workspace
336
349
  releaseUnits:
337
350
  - id: my-app
338
351
  source: packages/app
@@ -390,7 +403,11 @@ and binding the same id in `selectedGateIds`:
390
403
  "projectConfig": {
391
404
  "apiVersion": "release-skill/v1",
392
405
  "kind": "ReleaseProject",
393
- "project": { "name": "my-project", "defaultBranch": "main" },
406
+ "project": {
407
+ "name": "my-project",
408
+ "defaultBranch": "main",
409
+ "sourceRepository": "owner/my-workspace"
410
+ },
394
411
  "releaseUnits": [{
395
412
  "id": "my-project",
396
413
  "source": ".",
@@ -473,6 +490,16 @@ npm tarballs, then checks remote commit/tree/tag integrity. Claude/Codex
473
490
  verification is automated; Kimi Code and CodeBuddy/WorkBuddy require a trusted
474
491
  attestation bound to the frozen plan digest.
475
492
 
493
+ For every npm distribution, `prepare` statically checks the exact packed
494
+ tarball against concrete `package.json` entry targets. `publish` and
495
+ `reconcile` repeat the same check on the frozen tarball before any remote
496
+ action, and `verify` repeats it against the exact installed package before
497
+ allowing `VERIFIED`. `smokeBin` remains optional: when configured it adds an
498
+ authorized runtime smoke test; when absent, the static entry-closure check is
499
+ still mandatory. Wildcard exports and fallback arrays are deliberately outside
500
+ the first minimal semantic boundary, so the static gate fails closed until the
501
+ declaration is narrowed to concrete targets.
502
+
476
503
  <!-- release-skill:capability:unsupported-scope -->
477
504
  - no automatic README generation or source-file overwrite;
478
505
  - no automatic conflict merge or rollback workflow;
package/README.zh-CN.md CHANGED
@@ -2,36 +2,33 @@
2
2
 
3
3
  [English](README.md) · 安装指南:[中文](INSTALL.zh-CN.md) / [English](INSTALL.md)
4
4
 
5
- <!-- release-skill:release-version: 0.2.5 -->
5
+ <!-- release-skill:release-version: 0.2.7 -->
6
6
  面向 Claude Code、CodeBuddy、WorkBuddy、Codex 和 Kimi Code 的发布准备工具,完整保留人工维护的文件内容。
7
7
 
8
8
  release-skill 帮助维护者回答三个问题:准备发布什么、还有哪些检查未通过、最终发布的内容是什么。它不重新生成、也不回写项目源文件。`prepare` 把每个配置的公开文件复制到隔离快照并验证字节——先冻结并供人工审阅,再从同一份冻结产物发布。`setup` 只显示确定性的 `compactSummary` 审阅视图,完整报告保留在临时会话目录中。
9
9
 
10
10
  <!-- release-skill:managed:start id=latest-release -->
11
- **0.2.5** (2026-07-28)
11
+ **0.2.7** (2026-07-29)
12
12
 
13
- v0.2.5 新增内置的技能资源闭包发布门禁。Release Skill 现在检查真实冻结产物与安装投影,不再把“仓库根目录存在文件”误当成“每个技能都能解析资源”的证据。
13
+ v0.2.7 阻止缺少已声明运行入口的 npm 包进入准备、发布、协调或已验证终态。
14
14
 
15
15
  **新增**
16
16
 
17
- - **技能资源闭包门禁**:递归发现嵌套技能,并从每个技能根验证技能私有的 references、assets、schemas、examples scripts。
18
- - **冻结态与安装态收据**:prepare 为每个分发面记录闭包收据,publish 在外部写入前复核冻结制品,verify 要求真实 npm 与插件安装根产生匹配收据。
19
- - **对抗性路径检查**:拒绝依赖当前工作目录、回跳源码树、机器绝对路径、路径逃逸、符号链接和非普通文件资源。
17
+ - **npm 静态入口闭包**:release-skill 针对精确冻结 tarball 和全新安装包检查 `bin`、`main`、`module`、`types`、`typings` 及具体本地 `exports` 目标。
18
+ - **setup 诊断**:setup 将声明的 npm 入口报告为已跟踪、未跟踪、已忽略、缺失或非普通文件,但不会修改项目配置。
20
19
 
21
20
  **变更**
22
21
 
23
- - **共享运行时显式解析**:插件级脚本和跨技能资源必须从已校验的插件根解析;有限的仅源码构建工具作为可审计例外保留。
24
- - **Kimi Code CodeBuddy 验证收紧**:消费者验证计划现在绑定真实的隔离或受管插件安装路径。
25
- - **保留旧计划兼容性**:既有冻结计划仍可读取,新生成计划必须包含资源闭包证据。
22
+ - **不支持的 exports 失败关闭**:通配符 exports 和 fallback array 仍处于最小解析边界之外,并改为阻断发布,不猜测展开或静默跳过。
23
+ - **最终写入边界复检**:npm 适配器在提交注册表前,对同一份已通过摘要校验的 tarball Buffer 再次检查入口闭包。
26
24
 
27
25
  **修复**
28
26
 
29
- - **消除嵌套技能盲区**:author、review、repair 等嵌套技能不再被资源验证遗漏。
30
- - **同步公开基线测试**:迁移不变量现与配置中的 v0.2.4 公开基线提交一致。
27
+ - **空壳包验证漏洞**:当已声明的运行入口或类型入口缺失时,包不再能够进入 `PREPARED`、远端发布、协调或 `VERIFIED`。
31
28
  <!-- release-skill:managed:end id=latest-release -->
32
29
 
33
30
  <!-- release-skill:capability:external-write-boundary -->
34
- > **当前边界:** v0.2.5 是当前发布版本(v0.2.2 曾处于已发布状态,后因平台验证收敛修复而更新)。
31
+ > **当前边界:** v0.2.7 是当前发布版本(v0.2.2 曾处于已发布状态,后因平台验证收敛修复而更新)。
35
32
  > v0.1.1 已完成 GitHub 与 npm 的
36
33
  > 真实生产发布,是首次生产验证的历史里程碑,并从冻结 Git ref 完成精确 npm
37
34
  > 安装及 Claude/Codex 消费者安装验证;"当前发布版本"与"首次生产验证里程碑"
@@ -44,7 +41,7 @@ v0.2.5 新增内置的技能资源闭包发布门禁。Release Skill 现在检
44
41
  > 远端唯一性检查在 `publish` 全局预检执行。
45
42
 
46
43
  <!-- release-skill:capability:safe-first-command -->
47
- > **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.2.5 是当前发布版本。**
44
+ > **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.2.7 是当前发布版本。**
48
45
  > npm 安装的 CLI 是受支持的用户入口;源码 checkout 保留为开发/贡献者路径。
49
46
  >
50
47
  > **第一条命令:**
@@ -155,7 +152,11 @@ ACTOR=your-name
155
152
  ```
156
153
  写入必须返回 `CONFIG_CREATED`,下一次 setup 必须返回 `ALREADY_CONFIGURED`。
157
154
  已有配置永不重新生成,后续只做经审阅的增量编辑。发现的脚本标记为
158
- `SIDE_EFFECTS_UNPROVEN`。只有在人工审阅之后才添加项目专属 hook gate:
155
+ `SIDE_EFFECTS_UNPROVEN`。对于 npm 单元,setup 还会把具体
156
+ `bin`/`main`/`module`/`types`/`typings`/`exports` 目标和旧
157
+ `npmRequiredPackagePaths` 标成已跟踪、未跟踪、已忽略、缺失或非普通文件。
158
+ 这些只是假设候选:setup 不会自动写入 `publicFiles` 或
159
+ `requiredPublicFiles`。只有在人工审阅之后才添加项目专属 hook 或 gate:
159
160
  编辑 `projectConfig.hooks`,或编辑 `verificationGates` 并把同一个 id 加入
160
161
  `selectedGateIds`,然后重新运行绑定 dry-run。配置已存在时跳过。
161
162
  完整多步流程见 [INSTALL.zh-CN.md](INSTALL.zh-CN.md#首次接入)。
@@ -235,6 +236,13 @@ DISCOVERED -> ASSESSED -> PREPARED -> APPROVED -> PUBLISHING -> PUBLISHED -> VER
235
236
 
236
237
  **写入安全:** `setup` 默认只读(摘要确认后仅首次创建配置)。`prepare` 只写 `.release-skill/`。`publish` 是生产写入入口,需要同时提供批准和当前计划摘要。项目 hook 和 gate 是已确认的本地进程,没有操作系统沙箱。
237
238
 
239
+ **Workspace 源码权威:** 生产配置使用 `project.sourceRepository` 指定 workspace
240
+ 源仓库,并用 `project.defaultBranch` 指定其真实远端默认分支。prepare 冻结所有
241
+ `publicFiles.from` 展开文件及各 `version.source` 的内容与 Git mode;publish 在第一个
242
+ adapter 写入前与远端默认分支比较。普通 merge、squash、rebase 后内容仍一致即可通过;
243
+ README 被冲突解决或 revert 丢失时会精确到路径阻断。系统不会自动合并、切分支、push
244
+ 或创建 PR。
245
+
238
246
  ## 文档导航
239
247
 
240
248
  | 文档 | 说明 |
@@ -259,6 +267,7 @@ kind: ReleaseProject
259
267
  project:
260
268
  name: my-project
261
269
  defaultBranch: main
270
+ sourceRepository: owner/my-workspace
262
271
  releaseUnits:
263
272
  - id: my-project
264
273
  source: .
@@ -297,6 +306,7 @@ kind: ReleaseProject
297
306
  project:
298
307
  name: my-workspace
299
308
  defaultBranch: main
309
+ sourceRepository: owner/my-workspace
300
310
  releaseUnits:
301
311
  - id: my-app
302
312
  source: packages/app
@@ -353,7 +363,11 @@ releaseUnits:
353
363
  "projectConfig": {
354
364
  "apiVersion": "release-skill/v1",
355
365
  "kind": "ReleaseProject",
356
- "project": { "name": "my-project", "defaultBranch": "main" },
366
+ "project": {
367
+ "name": "my-project",
368
+ "defaultBranch": "main",
369
+ "sourceRepository": "owner/my-workspace"
370
+ },
357
371
  "releaseUnits": [{
358
372
  "id": "my-project",
359
373
  "source": ".",
@@ -427,6 +441,13 @@ hook 仅在人工审阅后、以 `--acknowledge-hook-side-effects` 显式授权
427
441
 
428
442
  每个适配器闭包都自带 CLI、skills 和 schemas 副本,安装后无需外部依赖即可运行。Claude/Codex 验证是自动化的;Kimi Code 和 CodeBuddy/WorkBuddy 需要绑定冻结计划摘要的可信证明。
429
443
 
444
+ 每个 npm 分发在 `prepare` 时都会针对精确封装的 tarball 静态校验
445
+ `package.json` 声明的具体入口。`publish` 与 `reconcile` 在任何远端动作前对同一
446
+ 冻结 tarball 重复校验,`verify` 则在允许进入 `VERIFIED` 前对精确安装目录重复校验。
447
+ `smokeBin` 仍是可选的:配置后增加需授权的运行时烟雾测试;未配置时,静态入口闭包
448
+ 检查仍然是强制门禁。通配符 exports 与 fallback array 刻意不纳入首版最小语义边界,
449
+ 静态门禁会阻断,直到入口声明收窄为具体目标。
450
+
430
451
  <!-- release-skill:capability:unsupported-scope -->
431
452
  - 不自动生成 README,不覆盖项目源文件;
432
453
  - 不自动合并冲突,也不要求回滚工作流;