release-skill 0.6.1 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +1 -1
- package/CHANGELOG.md +40 -0
- package/CONTRIBUTING.md +1 -1
- package/INSTALL.md +47 -2
- package/INSTALL.zh-CN.md +29 -2
- package/README.md +129 -9
- package/README.zh-CN.md +111 -9
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +6596 -1586
- package/adapters/claude/schemas/.render-manifest.json +10 -6
- package/adapters/claude/schemas/postpublish-approval-record.schema.json +47 -0
- package/adapters/claude/schemas/release-plan.schema.json +74 -1
- package/adapters/claude/schemas/release-project.schema.json +73 -1
- package/adapters/claude/schemas/release-run.schema.json +11 -6
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +6596 -1586
- package/adapters/codex/schemas/.render-manifest.json +10 -6
- package/adapters/codex/schemas/postpublish-approval-record.schema.json +47 -0
- package/adapters/codex/schemas/release-plan.schema.json +74 -1
- package/adapters/codex/schemas/release-project.schema.json +73 -1
- package/adapters/codex/schemas/release-run.schema.json +11 -6
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +6596 -1586
- package/adapters/kimi/schemas/.render-manifest.json +10 -6
- package/adapters/kimi/schemas/postpublish-approval-record.schema.json +47 -0
- package/adapters/kimi/schemas/release-plan.schema.json +74 -1
- package/adapters/kimi/schemas/release-project.schema.json +73 -1
- package/adapters/kimi/schemas/release-run.schema.json +11 -6
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +6596 -1586
- package/adapters/workbuddy/schemas/.render-manifest.json +10 -6
- package/adapters/workbuddy/schemas/postpublish-approval-record.schema.json +47 -0
- package/adapters/workbuddy/schemas/release-plan.schema.json +74 -1
- package/adapters/workbuddy/schemas/release-project.schema.json +73 -1
- package/adapters/workbuddy/schemas/release-run.schema.json +11 -6
- package/bin/release-skill-cli.mjs +181 -3
- package/bin/release-skill.bundle.mjs +6596 -1586
- package/package.json +2 -1
- package/platform-manifest.json +4 -4
- package/references/.render-manifest.json +5 -5
- package/references/01-state-machine.md +22 -2
- package/schemas/.render-manifest.json +10 -6
- package/schemas/postpublish-approval-record.schema.json +47 -0
- package/schemas/release-plan.schema.json +74 -1
- package/schemas/release-project.schema.json +73 -1
- package/schemas/release-run.schema.json +11 -6
- package/src/commands/approve.mjs +167 -1
- package/src/commands/distribute.mjs +411 -33
- package/src/commands/lineage.mjs +101 -32
- package/src/commands/postverify.mjs +734 -0
- package/src/commands/prepare.mjs +339 -43
- package/src/commands/publish.mjs +10 -1
- package/src/commands/setup.mjs +715 -0
- package/src/commands/ship.mjs +152 -5
- package/src/commands/verify.mjs +92 -15
- package/src/core/approval.mjs +93 -68
- package/src/core/bounded-output.mjs +46 -0
- package/src/core/derived-artifact-gates.mjs +258 -0
- package/src/core/docs-refresh-preset.mjs +167 -0
- package/src/core/errors.mjs +4 -0
- package/src/core/hooks.mjs +28 -0
- package/src/core/marketplace-registry-entry.mjs +174 -0
- package/src/core/notify-handoff.mjs +76 -0
- package/src/core/postpublish-approval.mjs +110 -0
- package/src/core/postpublish.mjs +424 -7
- package/src/core/preset-executor.mjs +156 -0
- package/src/core/preset-gitwrite.mjs +463 -0
- package/src/core/presets.mjs +706 -0
- package/src/core/proposal-inbox.mjs +630 -0
- package/src/core/run.mjs +91 -6
- package/src/core/skill-resource-closure.mjs +240 -10
- package/src/platforms/registry.mjs +12 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-skill",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
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.
|
|
22
|
+
"Prepare a release plan for version 0.6.3.",
|
|
23
23
|
"Help me understand the release workflow."
|
|
24
24
|
]
|
|
25
25
|
}
|
package/.kimi-plugin/plugin.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
<!-- release-skill:changelog:start version=0.6.3 locale=en baseline=sha256:a1b8f98d720cae60e0855677b22dd3fd75f6c43eb31123951a5129d149626e70 -->
|
|
4
|
+
## [0.6.3] - 2026-08-20
|
|
5
|
+
|
|
6
|
+
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.
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- **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.
|
|
11
|
+
- **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.
|
|
12
|
+
- **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.
|
|
13
|
+
- **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.
|
|
14
|
+
- **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.
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- **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.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- **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.
|
|
23
|
+
<!-- release-skill:changelog:end version=0.6.3 locale=en -->
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<!-- release-skill:changelog:start version=0.6.2 locale=en baseline=sha256:103dcbd11e52542a07da9a1220eb246cf812de79ede19ff63a374785393580b7 -->
|
|
27
|
+
## [0.6.2] - 2026-08-19
|
|
28
|
+
|
|
29
|
+
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.
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
|
|
33
|
+
- **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.
|
|
34
|
+
- **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.
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- **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.
|
|
39
|
+
- **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.
|
|
40
|
+
<!-- release-skill:changelog:end version=0.6.2 locale=en -->
|
|
41
|
+
|
|
42
|
+
|
|
3
43
|
<!-- release-skill:changelog:start version=0.6.1 locale=en baseline=sha256:dd7c991244d72db1247dda808057fda060b1e7bb03ff866aae691841828e6239 -->
|
|
4
44
|
## [0.6.1] - 2026-08-18
|
|
5
45
|
|
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.
|
|
5
|
+
<!-- release-skill:release-version: 0.6.3 -->
|
|
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.
|
|
117
|
+
/plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.6.3
|
|
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.
|
|
5
|
+
<!-- release-skill:release-version: 0.6.3 -->
|
|
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.
|
|
107
|
+
/plugins install https://github.com/ifoohoo/release-skill/releases/tag/release-skill-v0.6.3
|
|
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.
|
|
5
|
+
<!-- release-skill:release-version: 0.6.3 -->
|
|
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,20 +14,29 @@ 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.
|
|
17
|
+
**0.6.3** (2026-08-20)
|
|
18
18
|
|
|
19
|
-
v0.6.
|
|
19
|
+
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.
|
|
20
20
|
|
|
21
21
|
**Added**
|
|
22
22
|
|
|
23
|
-
- **
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
23
|
+
- **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.
|
|
24
|
+
- **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.
|
|
25
|
+
- **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.
|
|
26
|
+
- **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.
|
|
27
|
+
- **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.
|
|
28
|
+
|
|
29
|
+
**Changed**
|
|
30
|
+
|
|
31
|
+
- **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.
|
|
32
|
+
|
|
33
|
+
**Fixed**
|
|
34
|
+
|
|
35
|
+
- **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.
|
|
27
36
|
<!-- release-skill:managed:end id=latest-release -->
|
|
28
37
|
|
|
29
38
|
<!-- release-skill:capability:external-write-boundary -->
|
|
30
|
-
> **Current boundary:** v0.6.
|
|
39
|
+
> **Current boundary:** v0.6.3 is the current source candidate; v0.4.1 remains
|
|
31
40
|
> the latest published release (v0.2.2 previously held
|
|
32
41
|
> published status before the platform verification convergence fix was added).
|
|
33
42
|
> v0.1.1 completed a real production release to GitHub and npm — the first
|
|
@@ -46,7 +55,7 @@ v0.6.1 closes the four root causes of the 0.6.0 self-bootstrap release cycle, in
|
|
|
46
55
|
> publish global preflight.
|
|
47
56
|
|
|
48
57
|
<!-- release-skill:capability:safe-first-command -->
|
|
49
|
-
> **Production path verified since the v0.1.1 milestone; v0.6.
|
|
58
|
+
> **Production path verified since the v0.1.1 milestone; v0.6.3 is the current
|
|
50
59
|
> source candidate and v0.4.1 is the latest published release.** The npm-installed CLI is the supported user entry. Source checkout
|
|
51
60
|
> is the development/contributor fallback.
|
|
52
61
|
>
|
|
@@ -59,6 +68,52 @@ v0.6.1 closes the four root causes of the 0.6.0 self-bootstrap release cycle, in
|
|
|
59
68
|
> **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.
|
|
60
69
|
<!-- release-skill:capability:distribute -->
|
|
61
70
|
|
|
71
|
+
<!-- release-skill:maturity:postpublish-hooks-v2 -->
|
|
72
|
+
<!-- release-skill:capability:postpublish-hooks -->
|
|
73
|
+
> **postPublish hooks v2:** `releaseUnit.postPublish` accepts a declarative
|
|
74
|
+
> `hooks` array alongside the existing `targets`. Each hook is either a named
|
|
75
|
+
> preset or a custom command hook; custom command hooks follow the same rules
|
|
76
|
+
> as prepare hooks — executable/argument arrays, relative cwd, timeout, and an
|
|
77
|
+
> environment allowlist, with shell strings rejected — and, like all
|
|
78
|
+
> configured hooks and gates, they run as unsandboxed processes. Every
|
|
79
|
+
> declaration is normalized into the frozen plan, so a hook change changes the
|
|
80
|
+
> plan digest and invalidates existing approvals. A hook with
|
|
81
|
+
> `requiresApproval: true` (the default for public-write presets; projects may
|
|
82
|
+
> tighten this, never loosen it) needs its own checkpoint-level approval
|
|
83
|
+
> before execution: mint one with
|
|
84
|
+
> `release-skill approve --plan <plan> --hook <hookId> --actor <name>`, then
|
|
85
|
+
> consume it with `distribute --hook-approval <record>` or
|
|
86
|
+
> `ship --hook-approval <record>` (24-hour expiry, bound to the plan digest
|
|
87
|
+
> and the hook id). Git credentials come only from the host credential
|
|
88
|
+
> helper / OS keychain; release-skill never reads, stores, or prints them.
|
|
89
|
+
<!-- release-skill:capability:postpublish-hooks -->
|
|
90
|
+
|
|
91
|
+
<!-- release-skill:capability:postpublish-presets -->
|
|
92
|
+
> **postPublish presets:** six built-in presets ship with the bundle and are
|
|
93
|
+
> enumerated by `release-skill distribute --list-presets`: `git-mirror` and
|
|
94
|
+
> `marketplace-index-render` (declared in `targets` form), plus
|
|
95
|
+
> `proposal-inbox`, `marketplace-registry-entry`, `docs-refresh`, and
|
|
96
|
+
> `notify-handoff` (declared in `hooks` form). `proposal-inbox` delivers a
|
|
97
|
+
> machine-readable update proposal through a git-push or local-file transport
|
|
98
|
+
> for autonomous downstream consumption; without a target it degrades to
|
|
99
|
+
> `notify-handoff` behavior instead of failing. `notify-handoff` is the
|
|
100
|
+
> zero-write floor: it only renders a deterministic manual sync checklist.
|
|
101
|
+
> release-skill dogfoods this capability: this repository's own project
|
|
102
|
+
> configuration declares a `proposal-inbox` (git-push) hub-entry proposal
|
|
103
|
+
> toward the public `skill-family-hub` repository, to be delivered during the
|
|
104
|
+
> v0.6.3 release in the postVerify phase under its own checkpoint approval.
|
|
105
|
+
<!-- release-skill:capability:postpublish-presets -->
|
|
106
|
+
|
|
107
|
+
<!-- release-skill:capability:postverify-stage -->
|
|
108
|
+
> **postVerify stage:** hooks declared with `phase: postVerify` run only after
|
|
109
|
+
> the main run reaches VERIFIED; `ship` routes them into an independent
|
|
110
|
+
> postVerify run whose hook context carries the verification evidence
|
|
111
|
+
> (`verifyEvidence`, present in this phase only). A failed postVerify run
|
|
112
|
+
> stays PARTIAL and can be reconciled, but it never rolls the main run back
|
|
113
|
+
> from VERIFIED — the failure is recorded prominently in evidence, never
|
|
114
|
+
> silently.
|
|
115
|
+
<!-- release-skill:capability:postverify-stage -->
|
|
116
|
+
|
|
62
117
|
<!-- release-skill:maturity:v0.1-boundary -->
|
|
63
118
|
<!-- release-skill:maturity:boundary -->
|
|
64
119
|
> **Safe defaults:** the recommended path is `help → assess → prepare --offline →
|
|
@@ -197,6 +252,17 @@ ACTOR=your-name
|
|
|
197
252
|
Add a project-specific hook or gate only after human review: edit
|
|
198
253
|
`projectConfig.hooks`, or edit `verificationGates` and add the same id to
|
|
199
254
|
`selectedGateIds`, then rerun the bound dry-run.
|
|
255
|
+
Downstream postPublish guidance is also read-only until confirmed:
|
|
256
|
+
`setup --discover-downstream` enumerates downstream candidates (git
|
|
257
|
+
remotes, neighboring marketplace/docs repositories,
|
|
258
|
+
`artifact-graph.config.yaml`, and a foundation profile when present), and
|
|
259
|
+
`setup --propose-hooks` turns those cues into postPublish hook declaration
|
|
260
|
+
drafts bound by a `setupDigest`. For an already-configured project,
|
|
261
|
+
`setup --propose-hooks --write --confirm-setup <digest>` appends only the
|
|
262
|
+
target release unit's `postPublish.hooks` block and never regenerates or
|
|
263
|
+
rewrites any other part of the configuration (create-once is untouched). A
|
|
264
|
+
foundation profile is one proposal input among several and never
|
|
265
|
+
auto-applies.
|
|
200
266
|
See [INSTALL.md](INSTALL.md#first-use-setup) for the full multi-step flow.
|
|
201
267
|
3. **assess** — read-only readiness:
|
|
202
268
|
```bash
|
|
@@ -477,6 +543,60 @@ Hooks run when `prepare` is invoked; the command call itself authorizes
|
|
|
477
543
|
execution. Gates are the controlled extension point for release calibration
|
|
478
544
|
(see `references/02-project-config.md`).
|
|
479
545
|
|
|
546
|
+
### postPublish hooks
|
|
547
|
+
|
|
548
|
+
`postPublish.hooks` declares downstream delivery actions that run after
|
|
549
|
+
`publish`; each entry is a named preset or a custom command hook and follows
|
|
550
|
+
the same command rules as above (executable/argument arrays, not shell
|
|
551
|
+
strings). Presets receive a read-only projection of the frozen plan; custom
|
|
552
|
+
command hooks run in the frozen tag worktree:
|
|
553
|
+
|
|
554
|
+
```yaml
|
|
555
|
+
postPublish:
|
|
556
|
+
materialize:
|
|
557
|
+
command: [node, scripts/materialize-payload.mjs]
|
|
558
|
+
cwd: .
|
|
559
|
+
timeoutMs: 600000
|
|
560
|
+
outputMarker: "payload dir: "
|
|
561
|
+
commitIdentity:
|
|
562
|
+
name: release-bot
|
|
563
|
+
email: mzdbxqh@example.com
|
|
564
|
+
hooks:
|
|
565
|
+
- id: mirror-downstream
|
|
566
|
+
preset: git-mirror
|
|
567
|
+
config:
|
|
568
|
+
target:
|
|
569
|
+
remoteUrl: https://gitlab.example.internal/team/my-project.git
|
|
570
|
+
branch: main
|
|
571
|
+
- id: hub-entry-proposal
|
|
572
|
+
preset: proposal-inbox
|
|
573
|
+
phase: postVerify
|
|
574
|
+
requiresApproval: true
|
|
575
|
+
config:
|
|
576
|
+
delivery: git-push
|
|
577
|
+
target:
|
|
578
|
+
remoteUrl: https://github.com/example/hub.git
|
|
579
|
+
branch: main
|
|
580
|
+
- id: custom-notify
|
|
581
|
+
command: [node, scripts/notify-downstream.mjs]
|
|
582
|
+
timeoutMs: 300000
|
|
583
|
+
envAllowlist: [CI]
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
A hook with `requiresApproval: true` parks at `AWAITING_APPROVAL` until a
|
|
587
|
+
checkpoint approval is minted and consumed. The approval record is bound to
|
|
588
|
+
the plan digest and the hook id, and expires after 24 hours:
|
|
589
|
+
|
|
590
|
+
```bash
|
|
591
|
+
release-skill approve --plan "$PLAN_PATH" --hook hub-entry-proposal --actor "$ACTOR" --json
|
|
592
|
+
release-skill ship --root "$PROJECT" --hook-approval "$HOOK_APPROVAL_PATH" --json
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
For an already-configured project, `setup --discover-downstream` and
|
|
596
|
+
`setup --propose-hooks` draft these declarations for human review; the
|
|
597
|
+
append-only incremental flow is described in the setup step above and in
|
|
598
|
+
[INSTALL.md](INSTALL.md#first-use-setup).
|
|
599
|
+
|
|
480
600
|
## Skills
|
|
481
601
|
|
|
482
602
|
- `release-help`: environment check and next-step guidance.
|
package/README.zh-CN.md
CHANGED
|
@@ -2,26 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) · 安装指南:[中文](INSTALL.zh-CN.md) / [English](INSTALL.md)
|
|
4
4
|
|
|
5
|
-
<!-- release-skill:release-version: 0.6.
|
|
5
|
+
<!-- release-skill:release-version: 0.6.3 -->
|
|
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.6.
|
|
11
|
+
**0.6.3** (2026-08-20)
|
|
12
12
|
|
|
13
|
-
v0.6.
|
|
13
|
+
v0.6.3 新增 postPublish hooks v2 注册机制与六个内置预设、面向下游写 hook 的 checkpoint 级批准记录、只在主 run 到达 VERIFIED 后执行 hook 的 postVerify 阶段、为已接入项目起草 postPublish hook 声明的 setup 增量提案、O1–O7 发布周期提速,以及 release-skill 自身的 dogfood hub 提案声明——本次发布即在 postVerify 阶段经自身 checkpoint 批准向公开的 skill-family-hub 仓库投递该提案。
|
|
14
14
|
|
|
15
15
|
**新增**
|
|
16
16
|
|
|
17
|
-
- **hook
|
|
18
|
-
- **
|
|
19
|
-
-
|
|
20
|
-
-
|
|
17
|
+
- **postPublish hooks v2 与六个预设**:`releaseUnit.postPublish` 在既有 `targets` 之外接受声明式 `hooks` 数组;每个 hook 要么是命名预设,要么是遵循 prepare hooks 规则(可执行文件/参数数组、相对 cwd、timeout、环境变量白名单——拒绝 shell 字符串)的自定义 command hook。六个内置预设随 bundle 分发,由 `release-skill distribute --list-presets` 枚举:`git-mirror` 与 `marketplace-index-render`(以 `targets` 形态声明),以及 `proposal-inbox`、`marketplace-registry-entry`、`docs-refresh`、`notify-handoff`(以 `hooks` 形态声明);写下游预设共用 `remoteUrl`/`workspace` 双寻址,`proposal-inbox` 未声明 target 时退化为 `notify-handoff` 行为而非报错,`notify-handoff` 是零写地板,只渲染确定性的人工同步清单。所有声明归一化进冻结计划,hook 变化即 plan digest 变化,既有批准随之失效;既有 `targets` 配置原样可用,执行语义不变。
|
|
18
|
+
- **checkpoint 级 hook 批准**:`requiresApproval: true` 的 hook(公开写预设缺省为 true;项目可以收紧,不得放松)停留 `AWAITING_APPROVAL`、零远端写,直到用 `release-skill approve --plan <plan> --hook <hookId> --actor <name>` 铸造并经 `distribute --hook-approval` 或 `ship --hook-approval` 消费自己的 checkpoint 批准。批准记录遵循新的 `postpublish-approval-record` schema,绑定 `(planDigest, hookId)`,24 小时有效;hook 配置变化即 plan digest 变化,批准随之失效。run schema 新增 `AWAITING_APPROVAL` checkpoint 状态,批准界面展示被批准 hook 的归一化条目摘要。
|
|
19
|
+
- **postVerify 阶段**:声明 `phase: postVerify` 的 hook 只在主 run 到达 VERIFIED 之后执行;`ship` 把它们路由进一个独立的 postVerify run,其 hook 上下文携带验证证据(`verifyEvidence` 仅该阶段存在)。postVerify run 失败即保持 PARTIAL、可 reconcile,但绝不把主 run 从 VERIFIED 回退——失败在 evidence 中显著记录,绝不静默。
|
|
20
|
+
- **setup 增量 hook 提案**:面向已接入项目,`setup --discover-downstream` 只读发现下游候选(git remote、marketplace/docs 仓线索、`artifact-graph` 配置、foundation profile),`setup --propose-hooks` 起草 postPublish hook 声明供人工审阅;人工确认 `setupDigest` 后只追加 hooks 段,绝不重写既有配置的任何其他部分。create-once 边界保持:既有配置绝不重新生成。
|
|
21
|
+
- **dogfood hub 提案声明**:release-skill 自身的项目配置声明了一个 `proposal-inbox`(git-push)hub 提案,指向公开仓 `skill-family-hub`,在本次发布的 postVerify 阶段经自身 checkpoint 批准投递;投递成功加 evidence 中的确定性人工同步提示即闭环——hub 侧消费不在本期范围。
|
|
22
|
+
|
|
23
|
+
**变更**
|
|
24
|
+
|
|
25
|
+
- **发布周期提速(O1–O7)**:`build-adapters --check` 与 self-bootstrap 事实钉套件成为 prepare 快速前置门禁,先于 hooks 与全量测试门禁执行(快速前置,不替代全量测试);新增派生产物一键同步命令,按依赖顺序校验并按需重建 version/docs/bundle/adapters/manifest/public-files 各区,绝不写 src 与测试钉;`build-adapters --apply` 成为既有漂移 adapter 的受支持重建路径;`ship` happy-end 编排缺省 `prepare --production --online`,非生产与 offline 计划给出明确补救提示;online production prepare 在本地分支领先 origin 时给出 warning 级观测(不阻塞);`verify --run` 接受 run 目录并自动解析其中的 `release-run.json`(传文件行为不变);修复 `generate-platform-manifest --check` 的基线漂移。
|
|
26
|
+
|
|
27
|
+
**修复**
|
|
28
|
+
|
|
29
|
+
- **生产 CLI distribute adapter 注册**:两处生产 CLI adapter 注册表现在都注册 distribute-git adapter;修复前生产 `distribute`/`ship` 自动分发路径以 `no distribute adapter registered` 失败。状态机参考件补全 `DISTRIBUTING`/`DISTRIBUTED` 状态及其转移。
|
|
21
30
|
<!-- release-skill:managed:end id=latest-release -->
|
|
22
31
|
|
|
23
32
|
<!-- release-skill:capability:external-write-boundary -->
|
|
24
|
-
> **当前边界:** v0.6.
|
|
33
|
+
> **当前边界:** v0.6.3 是当前源码候选,v0.4.1 仍是最新已发布版本(v0.2.2 曾处于已发布状态,后因平台验证收敛修复而更新)。
|
|
25
34
|
> v0.1.1 已完成 GitHub 与 npm 的
|
|
26
35
|
> 真实生产发布,是首次生产验证的历史里程碑,并从冻结 Git ref 完成精确 npm
|
|
27
36
|
> 安装及 Claude/Codex 消费者安装验证;"当前发布版本"与"首次生产验证里程碑"
|
|
@@ -34,7 +43,7 @@ v0.6.1 收口 0.6.0 自举发布周期暴露的四个根因——该周期 25
|
|
|
34
43
|
> 远端唯一性检查在 `publish` 全局预检执行。
|
|
35
44
|
|
|
36
45
|
<!-- release-skill:capability:safe-first-command -->
|
|
37
|
-
> **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.6.
|
|
46
|
+
> **生产路径自 v0.1.1 里程碑起已完成真实生产验证;v0.6.3 是当前源码候选,v0.4.1 是最新已发布版本。**
|
|
38
47
|
> npm 安装的 CLI 是受支持的用户入口;源码 checkout 保留为开发/贡献者路径。
|
|
39
48
|
>
|
|
40
49
|
> **第一条命令:**
|
|
@@ -46,6 +55,45 @@ v0.6.1 收口 0.6.0 自举发布周期暴露的四个根因——该周期 25
|
|
|
46
55
|
> **分发能力 v1.0(W2 完成):** postPublish 分发作为独立的 `distribute` 命令可用,支持镜像和 Marketplace 索引动作。`publish` 达到 PUBLISHED 状态后,可运行 `ship distribute` 或手动调用 `release-skill distribute --plan <path> --approval <path> --json`。分发动作实现 fail-closed 语义:空差异时 NO_CHANGE(不创建 commit/tag/push),tag 移动尝试时 REMOTE_CONFLICT(永不 force-push),外部写未授权时 AUTH_MISSING。支持的模式:`--dry-run`(仅本地提交+tag)、`--json`(结构化输出)、`--help`(命令参考)。标签承诺保证版本一致性——分发的 plugin.json.version 必须与输入 tag 匹配。详见 [docs/design/2026-08-17-postpublish-distribution.md](../../docs/design/2026-08-17-postpublish-distribution.md) 中的架构说明。
|
|
47
56
|
<!-- release-skill:capability:distribute -->
|
|
48
57
|
|
|
58
|
+
<!-- release-skill:maturity:postpublish-hooks-v2 -->
|
|
59
|
+
<!-- release-skill:capability:postpublish-hooks -->
|
|
60
|
+
> **postPublish hooks v2:** `releaseUnit.postPublish` 在既有 `targets` 之外接受
|
|
61
|
+
> 声明式 `hooks` 数组。每个 hook 要么是命名预设,要么是自定义 command hook;
|
|
62
|
+
> 自定义 command hook 遵循与 prepare hooks 相同的规则——可执行文件/参数数组、
|
|
63
|
+
> 相对 cwd、timeout 与环境变量白名单,拒绝 shell 字符串——并与其他配置的
|
|
64
|
+
> hook 和 gate 一样是无操作系统沙箱的进程。所有声明归一化进冻结计划,因此
|
|
65
|
+
> hook 变化即 plan digest 变化,既有批准随之失效。`requiresApproval: true`
|
|
66
|
+
> 的 hook(公开写预设缺省为 true;项目可以收紧,不得放松)执行前需要自己的
|
|
67
|
+
> checkpoint 级批准:用
|
|
68
|
+
> `release-skill approve --plan <plan> --hook <hookId> --actor <name>`
|
|
69
|
+
> 铸造批准记录,再由 `distribute --hook-approval <record>` 或
|
|
70
|
+
> `ship --hook-approval <record>` 消费(24 小时有效期,绑定 plan digest
|
|
71
|
+
> 与 hook id)。Git 凭证只来自宿主 credential helper / OS keychain;
|
|
72
|
+
> release-skill 绝不读取、存储或打印凭证。
|
|
73
|
+
<!-- release-skill:capability:postpublish-hooks -->
|
|
74
|
+
|
|
75
|
+
<!-- release-skill:capability:postpublish-presets -->
|
|
76
|
+
> **postPublish 预设:** 六个内置预设随 bundle 分发,由
|
|
77
|
+
> `release-skill distribute --list-presets` 枚举:`git-mirror` 与
|
|
78
|
+
> `marketplace-index-render`(以 `targets` 形态声明),以及
|
|
79
|
+
> `proposal-inbox`、`marketplace-registry-entry`、`docs-refresh`、
|
|
80
|
+
> `notify-handoff`(以 `hooks` 形态声明)。`proposal-inbox` 通过 git-push 或
|
|
81
|
+
> local-file 传输投递机器可读更新提案,供下游自治消费;未声明 target 时
|
|
82
|
+
> 退化为 `notify-handoff` 行为而非报错。`notify-handoff` 是零写地板:
|
|
83
|
+
> 只渲染确定性的人工同步清单。release-skill 自己也在使用该能力:本仓库的
|
|
84
|
+
> 项目配置声明了一个 `proposal-inbox`(git-push)hub 提案,指向公开仓
|
|
85
|
+
> `skill-family-hub`,将在 v0.6.3 发布的 postVerify 阶段经自身的
|
|
86
|
+
> checkpoint 批准投递。
|
|
87
|
+
<!-- release-skill:capability:postpublish-presets -->
|
|
88
|
+
|
|
89
|
+
<!-- release-skill:capability:postverify-stage -->
|
|
90
|
+
> **postVerify 阶段:** 声明 `phase: postVerify` 的 hook 只在主 run 到达
|
|
91
|
+
> VERIFIED 之后执行;`ship` 把它们路由进一个独立的 postVerify run,其 hook
|
|
92
|
+
> 上下文携带验证证据(`verifyEvidence` 仅该阶段存在)。postVerify run 失败
|
|
93
|
+
> 即保持 PARTIAL、可 reconcile,但绝不把主 run 从 VERIFIED 回退——失败在
|
|
94
|
+
> evidence 中显著记录,绝不静默。
|
|
95
|
+
<!-- release-skill:capability:postverify-stage -->
|
|
96
|
+
|
|
49
97
|
<!-- release-skill:maturity:v0.1-boundary -->
|
|
50
98
|
<!-- release-skill:maturity:boundary -->
|
|
51
99
|
> **安全默认路径:** 推荐 `help → assess → prepare --offline → 人工审阅`。
|
|
@@ -177,6 +225,15 @@ ACTOR=your-name
|
|
|
177
225
|
`requiredPublicFiles`。只有在人工审阅之后才添加项目专属 hook 或 gate:
|
|
178
226
|
编辑 `projectConfig.hooks`,或编辑 `verificationGates` 并把同一个 id 加入
|
|
179
227
|
`selectedGateIds`,然后重新运行绑定 dry-run。配置已存在时跳过。
|
|
228
|
+
下游 postPublish 引导在确认前同样只读:`setup --discover-downstream`
|
|
229
|
+
枚举下游候选(git remote、邻近的 marketplace/docs 仓、
|
|
230
|
+
`artifact-graph.config.yaml`,以及存在时的 foundation profile);
|
|
231
|
+
`setup --propose-hooks` 把这些线索转为由 `setupDigest` 绑定的 postPublish
|
|
232
|
+
hook 声明草案。对已接入的项目,
|
|
233
|
+
`setup --propose-hooks --write --confirm-setup <digest>` 只追加目标发布
|
|
234
|
+
单元的 `postPublish.hooks` 段,绝不重新生成或改写配置的任何其他部分
|
|
235
|
+
(create-once 边界不受影响)。foundation profile 只是提案输入之一,绝不
|
|
236
|
+
自动生效。
|
|
180
237
|
完整多步流程见 [INSTALL.zh-CN.md](INSTALL.zh-CN.md#首次接入)。
|
|
181
238
|
3. **assess** — 只读就绪评估:
|
|
182
239
|
```bash
|
|
@@ -431,6 +488,51 @@ hooks:
|
|
|
431
488
|
|
|
432
489
|
hook 在 `prepare` 调用时运行,命令调用本身即授权执行。gate 是发布校准的受控扩展点(见 `references/02-project-config.md`)。
|
|
433
490
|
|
|
491
|
+
### postPublish hook
|
|
492
|
+
|
|
493
|
+
`postPublish.hooks` 声明 `publish` 之后执行的下游投递动作。每个条目要么是命名预设,要么是自定义 command hook,遵守与上文相同的命令规则(可执行文件/参数数组,不是 shell 字符串)。预设收到冻结计划的只读投影;自定义 command hook 在冻结 tag 工作树中执行:
|
|
494
|
+
|
|
495
|
+
```yaml
|
|
496
|
+
postPublish:
|
|
497
|
+
materialize:
|
|
498
|
+
command: [node, scripts/materialize-payload.mjs]
|
|
499
|
+
cwd: .
|
|
500
|
+
timeoutMs: 600000
|
|
501
|
+
outputMarker: "payload dir: "
|
|
502
|
+
commitIdentity:
|
|
503
|
+
name: release-bot
|
|
504
|
+
email: mzdbxqh@example.com
|
|
505
|
+
hooks:
|
|
506
|
+
- id: mirror-downstream
|
|
507
|
+
preset: git-mirror
|
|
508
|
+
config:
|
|
509
|
+
target:
|
|
510
|
+
remoteUrl: https://gitlab.example.internal/team/my-project.git
|
|
511
|
+
branch: main
|
|
512
|
+
- id: hub-entry-proposal
|
|
513
|
+
preset: proposal-inbox
|
|
514
|
+
phase: postVerify
|
|
515
|
+
requiresApproval: true
|
|
516
|
+
config:
|
|
517
|
+
delivery: git-push
|
|
518
|
+
target:
|
|
519
|
+
remoteUrl: https://github.com/example/hub.git
|
|
520
|
+
branch: main
|
|
521
|
+
- id: custom-notify
|
|
522
|
+
command: [node, scripts/notify-downstream.mjs]
|
|
523
|
+
timeoutMs: 300000
|
|
524
|
+
envAllowlist: [CI]
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
`requiresApproval: true` 的 hook 停留在 `AWAITING_APPROVAL`,直到 checkpoint 批准被铸造并消费。批准记录绑定 plan digest 与 hook id,24 小时后过期:
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
release-skill approve --plan "$PLAN_PATH" --hook hub-entry-proposal --actor "$ACTOR" --json
|
|
531
|
+
release-skill ship --root "$PROJECT" --hook-approval "$HOOK_APPROVAL_PATH" --json
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
对已接入的项目,`setup --discover-downstream` 与 `setup --propose-hooks` 起草这些声明供人工审阅;仅追加的增量流程见上文 setup 步骤与 [INSTALL.zh-CN.md](INSTALL.zh-CN.md#首次接入)。
|
|
535
|
+
|
|
434
536
|
## Skills
|
|
435
537
|
|
|
436
538
|
- `release-help`:环境检查和下一步引导。
|