release-skill 0.6.2 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) 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 +48 -0
  7. package/CONTRIBUTING.md +1 -1
  8. package/INSTALL.md +47 -2
  9. package/INSTALL.zh-CN.md +29 -2
  10. package/README.md +137 -12
  11. package/README.zh-CN.md +110 -9
  12. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  13. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  14. package/adapters/claude/bin/error-codes.json +1 -1
  15. package/adapters/claude/bin/kernel-protocol.json +1 -1
  16. package/adapters/claude/bin/license-texts/Apache-2.0.txt +201 -0
  17. package/adapters/claude/bin/license-texts/MIT.txt +21 -0
  18. package/adapters/claude/bin/registry.json +64 -1
  19. package/adapters/claude/bin/release-skill.bundle.mjs +50570 -42208
  20. package/adapters/claude/bin/rules.json +1 -1
  21. package/adapters/claude/schemas/.render-manifest.json +10 -6
  22. package/adapters/claude/schemas/postpublish-approval-record.schema.json +47 -0
  23. package/adapters/claude/schemas/release-plan.schema.json +200 -4
  24. package/adapters/claude/schemas/release-project.schema.json +86 -5
  25. package/adapters/claude/schemas/release-run.schema.json +11 -6
  26. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  27. package/adapters/codex/bin/error-codes.json +1 -1
  28. package/adapters/codex/bin/kernel-protocol.json +1 -1
  29. package/adapters/codex/bin/license-texts/Apache-2.0.txt +201 -0
  30. package/adapters/codex/bin/license-texts/MIT.txt +21 -0
  31. package/adapters/codex/bin/registry.json +64 -1
  32. package/adapters/codex/bin/release-skill.bundle.mjs +50570 -42208
  33. package/adapters/codex/bin/rules.json +1 -1
  34. package/adapters/codex/schemas/.render-manifest.json +10 -6
  35. package/adapters/codex/schemas/postpublish-approval-record.schema.json +47 -0
  36. package/adapters/codex/schemas/release-plan.schema.json +200 -4
  37. package/adapters/codex/schemas/release-project.schema.json +86 -5
  38. package/adapters/codex/schemas/release-run.schema.json +11 -6
  39. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  40. package/adapters/kimi/bin/error-codes.json +1 -1
  41. package/adapters/kimi/bin/kernel-protocol.json +1 -1
  42. package/adapters/kimi/bin/license-texts/Apache-2.0.txt +201 -0
  43. package/adapters/kimi/bin/license-texts/MIT.txt +21 -0
  44. package/adapters/kimi/bin/registry.json +64 -1
  45. package/adapters/kimi/bin/release-skill.bundle.mjs +50570 -42208
  46. package/adapters/kimi/bin/rules.json +1 -1
  47. package/adapters/kimi/schemas/.render-manifest.json +10 -6
  48. package/adapters/kimi/schemas/postpublish-approval-record.schema.json +47 -0
  49. package/adapters/kimi/schemas/release-plan.schema.json +200 -4
  50. package/adapters/kimi/schemas/release-project.schema.json +86 -5
  51. package/adapters/kimi/schemas/release-run.schema.json +11 -6
  52. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  53. package/adapters/workbuddy/bin/error-codes.json +1 -1
  54. package/adapters/workbuddy/bin/kernel-protocol.json +1 -1
  55. package/adapters/workbuddy/bin/license-texts/Apache-2.0.txt +201 -0
  56. package/adapters/workbuddy/bin/license-texts/MIT.txt +21 -0
  57. package/adapters/workbuddy/bin/registry.json +64 -1
  58. package/adapters/workbuddy/bin/release-skill.bundle.mjs +50570 -42208
  59. package/adapters/workbuddy/bin/rules.json +1 -1
  60. package/adapters/workbuddy/schemas/.render-manifest.json +10 -6
  61. package/adapters/workbuddy/schemas/postpublish-approval-record.schema.json +47 -0
  62. package/adapters/workbuddy/schemas/release-plan.schema.json +200 -4
  63. package/adapters/workbuddy/schemas/release-project.schema.json +86 -5
  64. package/adapters/workbuddy/schemas/release-run.schema.json +11 -6
  65. package/bin/error-codes.json +1 -1
  66. package/bin/kernel-protocol.json +1 -1
  67. package/bin/license-texts/Apache-2.0.txt +201 -0
  68. package/bin/license-texts/MIT.txt +21 -0
  69. package/bin/registry.json +64 -1
  70. package/bin/release-skill-cli.mjs +187 -9
  71. package/bin/release-skill.bundle.mjs +50570 -42208
  72. package/bin/rules.json +1 -1
  73. package/package.json +6 -4
  74. package/platform-manifest.json +4 -4
  75. package/references/.render-manifest.json +5 -5
  76. package/references/01-state-machine.md +22 -2
  77. package/references/02-project-config.md +1 -1
  78. package/references/06-adapter-contract.md +6 -3
  79. package/schemas/.render-manifest.json +10 -6
  80. package/schemas/postpublish-approval-record.schema.json +47 -0
  81. package/schemas/release-plan.schema.json +200 -4
  82. package/schemas/release-project.schema.json +86 -5
  83. package/schemas/release-run.schema.json +11 -6
  84. package/src/adapters/distribute-git.mjs +17 -11
  85. package/src/commands/approve.mjs +163 -1
  86. package/src/commands/distribute.mjs +649 -89
  87. package/src/commands/postverify.mjs +808 -0
  88. package/src/commands/prepare.mjs +456 -45
  89. package/src/commands/setup.mjs +715 -0
  90. package/src/commands/ship.mjs +152 -5
  91. package/src/commands/verify.mjs +92 -15
  92. package/src/core/approval.mjs +93 -68
  93. package/src/core/bounded-output.mjs +46 -0
  94. package/src/core/derived-artifact-gates.mjs +258 -0
  95. package/src/core/docs-refresh-preset.mjs +171 -0
  96. package/src/core/errors.mjs +4 -0
  97. package/src/core/evidence.mjs +8 -1
  98. package/src/core/git-url-policy.mjs +214 -0
  99. package/src/core/hooks.mjs +28 -0
  100. package/src/core/marketplace-registry-entry.mjs +175 -0
  101. package/src/core/notify-handoff.mjs +76 -0
  102. package/src/core/postpublish-approval.mjs +241 -0
  103. package/src/core/postpublish-bundle.mjs +342 -0
  104. package/src/core/postpublish-projection.mjs +210 -0
  105. package/src/core/postpublish.mjs +449 -25
  106. package/src/core/preset-executor.mjs +175 -0
  107. package/src/core/preset-gitwrite.mjs +484 -0
  108. package/src/core/presets.mjs +754 -0
  109. package/src/core/proposal-inbox.mjs +646 -0
  110. package/src/core/redact.mjs +16 -3
  111. package/src/core/run.mjs +91 -6
  112. package/src/producers/build-adapters.mjs +28 -14
@@ -9,7 +9,7 @@
9
9
  {
10
10
  "name": "release-skill",
11
11
  "source": "./",
12
- "version": "0.6.2",
12
+ "version": "0.7.0",
13
13
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
14
14
  "author": {
15
15
  "name": "广州市风荷科技有限公司"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
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.6.2",
3
+ "version": "0.7.0",
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.6.2",
3
+ "version": "0.7.0",
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.6.2.",
22
+ "Prepare a release plan for version 0.7.0.",
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.6.2",
3
+ "version": "0.7.0",
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,53 @@
1
1
  # Changelog
2
2
 
3
+ <!-- release-skill:changelog:start version=0.7.0 locale=en baseline=sha256:a4d6989dd03d562c498344baf0dc1d0e1d0a225aecf0d48a7c4f9850c495b0ef -->
4
+ ## [0.7.0] - 2026-08-22
5
+
6
+ v0.7.0 closes the release architecture gaps identified after v0.6.3. Private postPublish inputs are now frozen into the approved plan, checkpoint approvals must be consumed from their authoritative immutable path, and downstream projection reuses the published Skill Family Foundation 0.8.0 contracts instead of workspace-local substitutes.
7
+
8
+ ### Added
9
+
10
+ - **Frozen postPublish execution bundles**: release units can declare private `executionFiles`; prepare freezes their exact bytes and resource closure into the immutable plan, and distribute or postVerify installs only that verified bundle into the detached execution worktree. Live workspace edits after approval cannot change the executed command.
11
+ - **Authoritative checkpoint approval consumption**: postPublish approvals are accepted only from the canonical path derived from the plan digest and hook id. The consumer rechecks the plan digest, approval digest, strict file bytes, and symlink-free authority chain before any hook or external write.
12
+ - **Foundation-managed downstream projection**: postPublish payload projection now uses the published `skill-family-engineering-kit` projection compiler and runner, with strict reads and resource-closure verification from `skill-family-harness-node`.
13
+
14
+ ### Changed
15
+
16
+ - **Separated workspace roles**: preset execution now distinguishes the maintainer's `releaseWorkspaceRoot` from the detached `executionWorktreeRoot`; ambiguous legacy root fallback is rejected, and presets cannot target the release workspace itself.
17
+ - **Exact Foundation 0.8.0 baseline**: `skill-family-contracts`, `skill-family-harness-node`, and `skill-family-engineering-kit` are pinned to 0.8.0. The package runtime is pinned to Node.js `>=22.22.2 <23`.
18
+ - **Explicit distribute authority**: `distribute` requires the plan-bound release approval record; postPublish hook approvals remain separate checkpoint records.
19
+
20
+ ### Fixed
21
+
22
+ - **Credential-bearing Git URL rejection and redaction**: configured Git remotes reject URL userinfo at schema and runtime boundaries. Errors, evidence, and summaries pass through the shared redaction path so embedded credentials are not persisted.
23
+ - **Fail-closed production gates**: `NODE_TEST_CONTEXT` can no longer exempt derived-artifact gates, adapter behavior is explicit for each plan version, and Node.js 22 test-reporter output is accepted without weakening assertions.
24
+ - **Public packaging and license closure**: the workspace documentation and public package now agree on Apache-2.0, and the public bundle carries the required Apache-2.0 and MIT license texts.
25
+ <!-- release-skill:changelog:end version=0.7.0 locale=en -->
26
+
27
+
28
+ <!-- release-skill:changelog:start version=0.6.3 locale=en baseline=sha256:a1b8f98d720cae60e0855677b22dd3fd75f6c43eb31123951a5129d149626e70 -->
29
+ ## [0.6.3] - 2026-08-20
30
+
31
+ v0.6.3 adds the postPublish hooks v2 registration mechanism with six built-in presets, checkpoint-level approval records for hooks that write downstream, a postVerify stage that runs hooks only after the main run reaches VERIFIED, an append-only setup proposal flow that drafts postPublish hook declarations for already-configured projects, the O1-O7 release-cycle speed-ups, and release-skill's own dogfood hub-entry proposal declaration — which this release delivers to the public skill-family-hub repository during its postVerify phase under its own checkpoint approval.
32
+
33
+ ### Added
34
+
35
+ - **postPublish hooks v2 and six presets**: `releaseUnit.postPublish` now accepts a declarative `hooks` array alongside the existing `targets`; each hook is a named preset or a custom command hook following the prepare-hook rules (executable/argument arrays, relative cwd, timeout, environment allowlist — shell strings rejected). Six built-in presets ship with the bundle and are enumerated by `release-skill distribute --list-presets`: `git-mirror` and `marketplace-index-render` (declared in `targets` form), plus `proposal-inbox`, `marketplace-registry-entry`, `docs-refresh`, and `notify-handoff` (declared in `hooks` form); writing presets share `remoteUrl`/`workspace` dual downstream addressing, `proposal-inbox` without a target degrades to `notify-handoff` behavior instead of failing, and `notify-handoff` is the zero-write floor rendering a deterministic manual sync checklist. Every declaration is normalized into the frozen plan, so a hook change changes the plan digest and invalidates existing approvals; existing `targets` configurations stay valid with unchanged execution semantics.
36
+ - **Checkpoint-level hook approval**: a hook with `requiresApproval: true` (the default for public-write presets; projects may tighten, never loosen) parks at `AWAITING_APPROVAL` with zero remote writes until its own checkpoint approval is minted with `release-skill approve --plan <plan> --hook <hookId> --actor <name>` and consumed via `distribute --hook-approval` or `ship --hook-approval`. Approval records follow the new `postpublish-approval-record` schema bound to `(planDigest, hookId)` with the 24-hour expiry; a hook configuration change changes the plan digest and invalidates the approval. The run schema gains the `AWAITING_APPROVAL` checkpoint status, and the approval interface displays the normalized entry summary of each approved hook.
37
+ - **postVerify stage**: hooks declared with `phase: postVerify` run only after the main run reaches VERIFIED; `ship` routes them into an independent postVerify run whose hook context carries the verification evidence (`verifyEvidence`, present in this phase only). A failed postVerify run stays PARTIAL and can be reconciled, but it never rolls the main run back from VERIFIED — the failure is recorded prominently in evidence, never silently.
38
+ - **Setup incremental hook proposal**: for already-configured projects, `setup --discover-downstream` performs read-only discovery of downstream candidates (git remotes, marketplace/docs repository clues, `artifact-graph` configuration, foundation profiles) and `setup --propose-hooks` drafts postPublish hook declarations for human review; after human confirmation of the `setupDigest` the flow appends only the hooks section and never rewrites any other part of the configuration. The create-once boundary is preserved: an existing configuration is never regenerated.
39
+ - **Dogfood hub proposal declaration**: release-skill's own project configuration declares a `proposal-inbox` (git-push) hub-entry proposal toward the public `skill-family-hub` repository, delivered during this release's postVerify phase under its own checkpoint approval; delivery plus the deterministic manual sync prompt in evidence is the closure criterion — hub-side consumption is out of scope for this release.
40
+
41
+ ### Changed
42
+
43
+ - **Release-cycle speed optimizations (O1-O7)**: `build-adapters --check` and the self-bootstrap fact-pin suite are now fail-closed prepare pre-gates that run before hooks and the full-test gate (a fast pre-gate, not a replacement for full tests); a new one-click derived-artifact sync command validates and rebuilds the version/docs/bundle/adapters/manifest/public-files areas in dependency order and never writes src or test pins; `build-adapters --apply` is the supported rebuild path for existing drifted adapters; the `ship` happy end now orchestrates `prepare --production --online` by default with explicit remediation prompts for non-production and offline plans; online production prepare reports a warning-level observation when the local branch leads origin (non-blocking); `verify --run` accepts a run directory and resolves its `release-run.json` automatically (file form unchanged); and the `generate-platform-manifest --check` baseline drift is fixed.
44
+
45
+ ### Fixed
46
+
47
+ - **Production CLI distribute adapter registration**: both production CLI adapter registries now register the distribute-git adapter; before this fix the production `distribute`/`ship` auto-distribution path failed with `no distribute adapter registered`. The state-machine reference completes the `DISTRIBUTING`/`DISTRIBUTED` states and their transitions.
48
+ <!-- release-skill:changelog:end version=0.6.3 locale=en -->
49
+
50
+
3
51
  <!-- release-skill:changelog:start version=0.6.2 locale=en baseline=sha256:103dcbd11e52542a07da9a1220eb246cf812de79ede19ff63a374785393580b7 -->
4
52
  ## [0.6.2] - 2026-08-19
5
53
 
package/CONTRIBUTING.md CHANGED
@@ -29,7 +29,7 @@ on the next regeneration.
29
29
  |---|---|---|
30
30
  | `references/` | `standards/` (workspace root) | `pnpm public:render` (workspace root) |
31
31
  | `schemas/` | `standards/` (workspace root) | `pnpm public:render` (workspace root) |
32
- | `adapters/` | `src/` + `skills-src/` | `npm run build:adapters` (this directory) |
32
+ | `adapters/` | `src/` + `skills-src/` | `npm run build:adapters:apply` (this directory; rebuilds existing targets, `build:adapters` creates fresh ones) |
33
33
  | `skills/` | `skills-src/` | `npm run sync:skills` (this directory) |
34
34
 
35
35
  To update a generated artifact:
package/INSTALL.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [简体中文](INSTALL.zh-CN.md)
4
4
 
5
- <!-- release-skill:release-version: 0.6.2 -->
5
+ <!-- release-skill:release-version: 0.7.0 -->
6
6
  ## Prerequisites
7
7
 
8
8
  - Node.js 22.0.0 or later
@@ -114,7 +114,7 @@ tag pinned to the exact version (never the bare repository URL, which installs
114
114
  the latest release or default branch), confirm the trust prompt, then reload:
115
115
 
116
116
  ```
117
- /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.6.2
117
+ /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.7.0
118
118
  /plugins reload
119
119
  ```
120
120
 
@@ -317,6 +317,51 @@ native prebuild shipped in v0.1.3. Other platforms fail closed with
317
317
  `SAFE_WRITE_UNAVAILABLE`; keep the dry-run report and create the reviewed file
318
318
  manually instead of enabling an unsafe pathname fallback.
319
319
 
320
+ ### Incremental postPublish hook proposals (existing configs)
321
+
322
+ An already-configured project never reruns create-once setup. Instead, setup
323
+ offers a strictly read-only downstream discovery and an append-only hook
324
+ proposal mode. Discovery reports git remote mirror candidates, marketplace and
325
+ docs clues in the workspace and its immediate neighbors,
326
+ `artifact-graph.config.yaml` presence, and the foundation profile metadata.
327
+ It never writes:
328
+
329
+ ```bash
330
+ PROJECT=/path/to/your/project
331
+ "${CLI[@]}" setup --root "$PROJECT" --discover-downstream --json
332
+ ```
333
+
334
+ The proposal dry-run renders legal postPublish hook declaration drafts plus the
335
+ candidate evidence, and binds the existing configuration bytes, the discovery
336
+ facts, and the selection into a `setupDigest`:
337
+
338
+ ```bash
339
+ PROJECT=/path/to/your/project
340
+ PROPOSAL_REPORT="$(mktemp "${TMPDIR:-/tmp}/release-hooks-proposal.XXXXXX")"
341
+ "${CLI[@]}" setup --root "$PROJECT" --propose-hooks --json > "$PROPOSAL_REPORT"
342
+ node -e 'const fs=require("node:fs");const r=JSON.parse(fs.readFileSync(process.argv[1],"utf8"));if(!r.setupDigest){console.error("setupDigest missing");process.exit(2)}process.stdout.write(JSON.stringify({status:r.status,targetUnitId:r.targetUnitId,appendableHookIds:r.appendableHookIds,conflicts:r.conflicts,setupDigest:r.setupDigest},null,2)+"\n")' "$PROPOSAL_REPORT"
343
+ ```
344
+
345
+ `--select-hooks <ids>` narrows the selection to the listed proposal ids;
346
+ `--foundation-profile <path>` adds an explicit foundation profile (proposal
347
+ input only — never auto-applied); `--unit <id>` chooses the release unit when
348
+ several declare the postPublish base. After one human review of the drafts,
349
+ the exact confirmed digest authorizes an append-only write of ONLY
350
+ `releaseUnits[<target>].postPublish.hooks`; the create-once boundary is never
351
+ touched by this mode:
352
+
353
+ ```bash
354
+ "${CLI[@]}" setup --root "$PROJECT" --propose-hooks \
355
+ --write --confirm-setup <confirmed-setupDigest> --json
356
+ ```
357
+
358
+ The write returns `HOOKS_APPENDED`, or `HOOKS_NO_CHANGE` with zero writes when
359
+ nothing is appendable. A wrong or stale digest fails closed with
360
+ `SETUP_DIGEST_MISMATCH`; rerun the dry-run and review the new digest again.
361
+ The incremental append requires the target release unit to already declare the
362
+ postPublish materialize/commitIdentity distribute base, and it re-validates the
363
+ merged declaration before any write.
364
+
320
365
  After the config exists, check release readiness:
321
366
 
322
367
  ```bash
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.6.2 -->
5
+ <!-- release-skill:release-version: 0.7.0 -->
6
6
  ## 前置条件
7
7
 
8
8
  - Node.js 22.0.0 或更高版本
@@ -104,7 +104,7 @@ Kimi Code 有交互式插件市场,但**没有可脚本化的非交互安装
104
104
  (切勿使用裸仓库地址,它会安装最新 release 或默认分支),确认信任提示后重新加载:
105
105
 
106
106
  ```
107
- /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.6.2
107
+ /plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.7.0
108
108
  /plugins reload
109
109
  ```
110
110
 
@@ -272,6 +272,33 @@ node -e 'require("node:fs").rmSync(process.argv[1],{recursive:true,force:false})
272
272
 
273
273
  自动 create-once 写入使用 v0.1.3 随包提供、带摘要登记的 `darwin-arm64` 原生预构建。其他平台以 `SAFE_WRITE_UNAVAILABLE` 失败关闭;此时保留只读报告,由人工首次创建经审阅的文件,不得启用不安全的路径写入兜底。
274
274
 
275
+ ### 增量 postPublish hook 提案(已有配置)
276
+
277
+ 已完成配置的项目不会重跑 create-once setup。setup 另外提供严格只读的下游发现与仅追加的 hook 提案模式。发现阶段报告 git 远端镜像候选、工作区及其直接邻居中的 marketplace 与 docs 线索、`artifact-graph.config.yaml` 存在性以及 foundation profile 元信息,全程不写入:
278
+
279
+ ```bash
280
+ PROJECT=/path/to/your/project
281
+ "${CLI[@]}" setup --root "$PROJECT" --discover-downstream --json
282
+ ```
283
+
284
+ 提案 dry-run 渲染合法的 postPublish hook 声明草案与候选证据,并把现有配置字节、发现事实与选择集合绑定进 `setupDigest`:
285
+
286
+ ```bash
287
+ PROJECT=/path/to/your/project
288
+ PROPOSAL_REPORT="$(mktemp "${TMPDIR:-/tmp}/release-hooks-proposal.XXXXXX")"
289
+ "${CLI[@]}" setup --root "$PROJECT" --propose-hooks --json > "$PROPOSAL_REPORT"
290
+ node -e 'const fs=require("node:fs");const r=JSON.parse(fs.readFileSync(process.argv[1],"utf8"));if(!r.setupDigest){console.error("setupDigest missing");process.exit(2)}process.stdout.write(JSON.stringify({status:r.status,targetUnitId:r.targetUnitId,appendableHookIds:r.appendableHookIds,conflicts:r.conflicts,setupDigest:r.setupDigest},null,2)+"\n")' "$PROPOSAL_REPORT"
291
+ ```
292
+
293
+ `--select-hooks <ids>` 将选择收窄到列出的提案 id;`--foundation-profile <path>` 追加显式 foundation profile(仅作为提案输入,绝不自动应用);当多个发布单元声明了 postPublish 基础时,`--unit <id>` 选定目标发布单元。人工审阅草案一次之后,精确确认的摘要授权一次仅追加 `releaseUnits[<target>].postPublish.hooks` 的写入;该模式绝不触碰 create-once 边界:
294
+
295
+ ```bash
296
+ "${CLI[@]}" setup --root "$PROJECT" --propose-hooks \
297
+ --write --confirm-setup <已确认的 setupDigest> --json
298
+ ```
299
+
300
+ 写入返回 `HOOKS_APPENDED`;没有可追加内容时返回 `HOOKS_NO_CHANGE` 且零写入。错误或过期的摘要以 `SETUP_DIGEST_MISMATCH` 失败关闭;重跑 dry-run 并重新审阅新的摘要。增量追加要求目标发布单元已声明 postPublish 的 materialize/commitIdentity 分发基础,且写入前会重新校验合并后的声明。
301
+
275
302
  配置存在后,检查发布就绪度:
276
303
 
277
304
  ```bash
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.6.2 -->
5
+ <!-- release-skill:release-version: 0.7.0 -->
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,25 +14,34 @@ 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.6.2** (2026-08-19)
17
+ **0.7.0** (2026-08-22)
18
18
 
19
- v0.6.2 promotes the skill resource closure checker to a fail-closed release gate spanning prepare, publish, and verify, closes the five gaps (G1–G5) confirmed by the clause-by-clause gate audit, and fixes lineage commit-identity parsing that corrupted rebuilt commits: missing or drifted skill resources, home-directory search paths, and undeclared host surfaces now block a release before plan freeze, and commit identities are parsed with an anchored regex that fails closed instead of fabricating identity fields.
19
+ v0.7.0 closes the release architecture gaps identified after v0.6.3. Private postPublish inputs are now frozen into the approved plan, checkpoint approvals must be consumed from their authoritative immutable path, and downstream projection reuses the published Skill Family Foundation 0.8.0 contracts instead of workspace-local substitutes.
20
20
 
21
21
  **Added**
22
22
 
23
- - **Skill-resource-closure v2 release gate**: the closure checker is now a fail-closed release gate across all three phases prepare scans the frozen snapshot and blocks plan freeze on any finding with `GATE_FAILED` (error code 13), publish Gate 2c recomputes closure against the verified frozen snapshots for production plans, and verify validates the real npm install tree and marketplace install directories with per-host receipts. Receipts now carry `unitId`, host/surface detail, digests, `checkerVersion` (`skill-resource-closure-v2`), and counts; the platform registry declares each adapter's host surface as an explicit adapter directory name, and the receipt schema is bound in all six release-plan schema copies. A version mismatch between an old frozen plan and the new checker fails closed.
24
- - **Closure gate gap closure (G1–G5)**: source-only (`SOURCE_ONLY_NOT_SHIPPED`) exemptions are now listed per reference in the receipt projection and in the prepare evidence — auditable and non-blocking; `~/`, `$HOME/`, and `${HOME}/` search paths inside code spans, fences, and link targets fail closed as `HOME_DIRECTORY_SEARCH`; identical surface-relative resources whose contents diverge across surfaces fail closed as `RESOURCE_DRIFT` with cross-surface reference locations; unreferenced regular files inside adapter skill closure directories fail closed as `STALE_RESOURCE`; every declared plugin distribution must be backed by a receipt host surface with at least one skill (declared-host reconciliation), so a dropped adapter tree can no longer skip the gate silently; and frozen receipts bind a deterministic `preparedAt` freeze timestamp (never a wall-clock sample) plus `exitCode: 0`, so identical sources freeze byte-identical receipts on every re-prepare.
23
+ - **Frozen postPublish execution bundles**: release units can declare private `executionFiles`; prepare freezes their exact bytes and resource closure into the immutable plan, and distribute or postVerify installs only that verified bundle into the detached execution worktree. Live workspace edits after approval cannot change the executed command.
24
+ - **Authoritative checkpoint approval consumption**: postPublish approvals are accepted only from the canonical path derived from the plan digest and hook id. The consumer rechecks the plan digest, approval digest, strict file bytes, and symlink-free authority chain before any hook or external write.
25
+ - **Foundation-managed downstream projection**: postPublish payload projection now uses the published `skill-family-engineering-kit` projection compiler and runner, with strict reads and resource-closure verification from `skill-family-harness-node`.
26
+
27
+ **Changed**
28
+
29
+ - **Separated workspace roles**: preset execution now distinguishes the maintainer's `releaseWorkspaceRoot` from the detached `executionWorktreeRoot`; ambiguous legacy root fallback is rejected, and presets cannot target the release workspace itself.
30
+ - **Exact Foundation 0.8.0 baseline**: `skill-family-contracts`, `skill-family-harness-node`, and `skill-family-engineering-kit` are pinned to 0.8.0. The package runtime is pinned to Node.js `>=22.22.2 <23`.
31
+ - **Explicit distribute authority**: `distribute` requires the plan-bound release approval record; postPublish hook approvals remain separate checkpoint records.
25
32
 
26
33
  **Fixed**
27
34
 
28
- - **Lineage commit-identity parsing (lineage-ident)**: `lineage rebuild` parsed author/committer ident lines with `split(/\s+>/)`, which never matched a legal ident line and corrupted the identities written to rebuilt commits (names containing spaces or `>` were mis-parsed as well). Idents are now parsed with an anchored regex whose greedy name capture lets the last `<email> ts tz` group win; unparseable lines fail closed instead of fabricating identity fields. Commit messages are fed to `commit-tree` via `-F -` stdin from untrimmed `cat-file` output, preserving arbitrary message bytes including trailing whitespace and blank lines.
29
- - **Assess npm-transport test stability (test-only)**: the assess npm-transport test flaked when the npm lifecycle injected a silent loglevel setting and ambient proxy variables into the child environment — emptying npm stderr and letting a released ephemeral localhost port be hijacked. The test now strips ambient npm-config-namespace environment keys and proxy variables (`isolateNpmTransportEnv`), holds the localhost port for the whole test (`startConnectionResetRegistry`), and asserts `ECONNRESET|ECONNREFUSED` deterministically. No production behavior changed.
35
+ - **Credential-bearing Git URL rejection and redaction**: configured Git remotes reject URL userinfo at schema and runtime boundaries. Errors, evidence, and summaries pass through the shared redaction path so embedded credentials are not persisted.
36
+ - **Fail-closed production gates**: `NODE_TEST_CONTEXT` can no longer exempt derived-artifact gates, adapter behavior is explicit for each plan version, and Node.js 22 test-reporter output is accepted without weakening assertions.
37
+ - **Public packaging and license closure**: the workspace documentation and public package now agree on Apache-2.0, and the public bundle carries the required Apache-2.0 and MIT license texts.
30
38
  <!-- release-skill:managed:end id=latest-release -->
31
39
 
32
40
  <!-- release-skill:capability:external-write-boundary -->
33
- > **Current boundary:** v0.6.2 is the current source candidate; v0.4.1 remains
34
- > the latest published release (v0.2.2 previously held
35
- > published status before the platform verification convergence fix was added).
41
+ > **Current boundary:** v0.7.0 is the current source candidate; v0.6.3 remains
42
+ > the latest published release. v0.4.1 was an earlier published milestone;
43
+ > v0.2.2 previously held published status before the platform verification
44
+ > convergence fix was added.
36
45
  > v0.1.1 completed a real production release to GitHub and npm — the first
37
46
  > production-verified milestone — followed by
38
47
  > exact npm installation and Claude/Codex consumer installation verification
@@ -49,8 +58,8 @@ v0.6.2 promotes the skill resource closure checker to a fail-closed release gate
49
58
  > publish global preflight.
50
59
 
51
60
  <!-- release-skill:capability:safe-first-command -->
52
- > **Production path verified since the v0.1.1 milestone; v0.6.2 is the current
53
- > source candidate and v0.4.1 is the latest published release.** The npm-installed CLI is the supported user entry. Source checkout
61
+ > **Production path verified since the v0.1.1 milestone; v0.7.0 is the current
62
+ > source candidate and v0.6.3 is the latest published release.** The npm-installed CLI is the supported user entry. Source checkout
54
63
  > is the development/contributor fallback.
55
64
  >
56
65
  > **Start here:**
@@ -62,6 +71,52 @@ v0.6.2 promotes the skill resource closure checker to a fail-closed release gate
62
71
  > **Distribute maturity v1.0 (W2 closure):** postPublish distribution is available as a separate `distribute` command for mirror and marketplace-index actions. After `publish` reaches PUBLISHED status, run `ship distribute` or manually invoke `release-skill distribute --plan <path> --approval <path> --json`. The distribute action implements fail-closed semantics: NO_CHANGE on empty diff (no commit/tag/push), REMOTE_CONFLICT on tag move attempts (never force-push), AUTH_MISSING when external writes are not authorized. Supported modes: `--dry-run` (local commit+tag only), `--json` (structured output), `--help` (command reference). Tag commitment guarantees version consistency — distributed plugin.json.version must match input tag. See [docs/design/2026-08-17-postpublish-distribution.md](../../docs/design/2026-08-17-postpublish-distribution.md) for detailed architecture.
63
72
  <!-- release-skill:capability:distribute -->
64
73
 
74
+ <!-- release-skill:maturity:postpublish-hooks-v2 -->
75
+ <!-- release-skill:capability:postpublish-hooks -->
76
+ > **postPublish hooks v2:** `releaseUnit.postPublish` accepts a declarative
77
+ > `hooks` array alongside the existing `targets`. Each hook is either a named
78
+ > preset or a custom command hook; custom command hooks follow the same rules
79
+ > as prepare hooks — executable/argument arrays, relative cwd, timeout, and an
80
+ > environment allowlist, with shell strings rejected — and, like all
81
+ > configured hooks and gates, they run as unsandboxed processes. Every
82
+ > declaration is normalized into the frozen plan, so a hook change changes the
83
+ > plan digest and invalidates existing approvals. A hook with
84
+ > `requiresApproval: true` (the default for public-write presets; projects may
85
+ > tighten this, never loosen it) needs its own checkpoint-level approval
86
+ > before execution: mint one with
87
+ > `release-skill approve --plan <plan> --hook <hookId> --actor <name>`, then
88
+ > consume it with `distribute --hook-approval <record>` or
89
+ > `ship --hook-approval <record>` (24-hour expiry, bound to the plan digest
90
+ > and the hook id). Git credentials come only from the host credential
91
+ > helper / OS keychain; release-skill never reads, stores, or prints them.
92
+ <!-- release-skill:capability:postpublish-hooks -->
93
+
94
+ <!-- release-skill:capability:postpublish-presets -->
95
+ > **postPublish presets:** six built-in presets ship with the bundle and are
96
+ > enumerated by `release-skill distribute --list-presets`: `git-mirror` and
97
+ > `marketplace-index-render` (declared in `targets` form), plus
98
+ > `proposal-inbox`, `marketplace-registry-entry`, `docs-refresh`, and
99
+ > `notify-handoff` (declared in `hooks` form). `proposal-inbox` delivers a
100
+ > machine-readable update proposal through a git-push or local-file transport
101
+ > for autonomous downstream consumption; without a target it degrades to
102
+ > `notify-handoff` behavior instead of failing. `notify-handoff` is the
103
+ > zero-write floor: it only renders a deterministic manual sync checklist.
104
+ > release-skill dogfoods this capability: this repository's own project
105
+ > configuration declares a `proposal-inbox` (git-push) hub-entry proposal
106
+ > toward the public `skill-family-hub` repository, to be delivered during the
107
+ > v0.7.0 release in the postVerify phase under its own checkpoint approval.
108
+ <!-- release-skill:capability:postpublish-presets -->
109
+
110
+ <!-- release-skill:capability:postverify-stage -->
111
+ > **postVerify stage:** hooks declared with `phase: postVerify` run only after
112
+ > the main run reaches VERIFIED; `ship` routes them into an independent
113
+ > postVerify run whose hook context carries the verification evidence
114
+ > (`verifyEvidence`, present in this phase only). A failed postVerify run
115
+ > stays PARTIAL and can be reconciled, but it never rolls the main run back
116
+ > from VERIFIED — the failure is recorded prominently in evidence, never
117
+ > silently.
118
+ <!-- release-skill:capability:postverify-stage -->
119
+
65
120
  <!-- release-skill:maturity:v0.1-boundary -->
66
121
  <!-- release-skill:maturity:boundary -->
67
122
  > **Safe defaults:** the recommended path is `help → assess → prepare --offline →
@@ -200,6 +255,17 @@ ACTOR=your-name
200
255
  Add a project-specific hook or gate only after human review: edit
201
256
  `projectConfig.hooks`, or edit `verificationGates` and add the same id to
202
257
  `selectedGateIds`, then rerun the bound dry-run.
258
+ Downstream postPublish guidance is also read-only until confirmed:
259
+ `setup --discover-downstream` enumerates downstream candidates (git
260
+ remotes, neighboring marketplace/docs repositories,
261
+ `artifact-graph.config.yaml`, and a foundation profile when present), and
262
+ `setup --propose-hooks` turns those cues into postPublish hook declaration
263
+ drafts bound by a `setupDigest`. For an already-configured project,
264
+ `setup --propose-hooks --write --confirm-setup <digest>` appends only the
265
+ target release unit's `postPublish.hooks` block and never regenerates or
266
+ rewrites any other part of the configuration (create-once is untouched). A
267
+ foundation profile is one proposal input among several and never
268
+ auto-applies.
203
269
  See [INSTALL.md](INSTALL.md#first-use-setup) for the full multi-step flow.
204
270
  3. **assess** — read-only readiness:
205
271
  ```bash
@@ -480,6 +546,65 @@ Hooks run when `prepare` is invoked; the command call itself authorizes
480
546
  execution. Gates are the controlled extension point for release calibration
481
547
  (see `references/02-project-config.md`).
482
548
 
549
+ ### postPublish hooks
550
+
551
+ `postPublish.hooks` declares downstream delivery actions that run after
552
+ `publish`; each entry is a named preset or a custom command hook and follows
553
+ the same command rules as above (executable/argument arrays, not shell
554
+ strings). Presets receive a read-only projection of the frozen plan; custom
555
+ command hooks run in the frozen tag worktree. The `materialize` hook is
556
+ optional: when it is omitted, `distribute` stages the payload from the
557
+ release unit's frozen `publicFiles` mapping through a Foundation managed
558
+ projection — a fresh payload root with full preflight, zero-write refusal,
559
+ and complete closure rollback — and live project configuration is never
560
+ re-read after the plan is frozen:
561
+
562
+ ```yaml
563
+ postPublish:
564
+ materialize:
565
+ command: [node, scripts/materialize-payload.mjs]
566
+ cwd: .
567
+ timeoutMs: 600000
568
+ outputMarker: "payload dir: "
569
+ commitIdentity:
570
+ name: release-bot
571
+ email: mzdbxqh@example.com
572
+ hooks:
573
+ - id: mirror-downstream
574
+ preset: git-mirror
575
+ config:
576
+ target:
577
+ remoteUrl: https://gitlab.example.internal/team/my-project.git
578
+ branch: main
579
+ - id: hub-entry-proposal
580
+ preset: proposal-inbox
581
+ phase: postVerify
582
+ requiresApproval: true
583
+ config:
584
+ delivery: git-push
585
+ target:
586
+ remoteUrl: https://github.com/example/hub.git
587
+ branch: main
588
+ - id: custom-notify
589
+ command: [node, scripts/notify-downstream.mjs]
590
+ timeoutMs: 300000
591
+ envAllowlist: [CI]
592
+ ```
593
+
594
+ A hook with `requiresApproval: true` parks at `AWAITING_APPROVAL` until a
595
+ checkpoint approval is minted and consumed. The approval record is bound to
596
+ the plan digest and the hook id, and expires after 24 hours:
597
+
598
+ ```bash
599
+ release-skill approve --plan "$PLAN_PATH" --hook hub-entry-proposal --actor "$ACTOR" --json
600
+ release-skill ship --root "$PROJECT" --hook-approval "$HOOK_APPROVAL_PATH" --json
601
+ ```
602
+
603
+ For an already-configured project, `setup --discover-downstream` and
604
+ `setup --propose-hooks` draft these declarations for human review; the
605
+ append-only incremental flow is described in the setup step above and in
606
+ [INSTALL.md](INSTALL.md#first-use-setup).
607
+
483
608
  ## Skills
484
609
 
485
610
  - `release-help`: environment check and next-step guidance.