release-skill 0.9.1 → 0.9.4
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 +78 -0
- package/INSTALL.md +2 -2
- package/INSTALL.zh-CN.md +2 -2
- package/README.md +56 -26
- package/README.zh-CN.md +47 -23
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/consumer-contract-vectors.json +7 -7
- package/adapters/claude/bin/error-codes.json +1 -1
- package/adapters/claude/bin/foundation-resource-binding.json +1 -1
- package/adapters/claude/bin/registry.json +22 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +4564 -1997
- package/adapters/claude/bin/rules.json +1 -1
- package/adapters/claude/schemas/release-project.schema.json +4 -0
- package/adapters/claude/schemas/release-run.schema.json +41 -1
- package/adapters/claude/skills/release-config/SKILL.md +5 -3
- package/adapters/claude/skills/release-docs/SKILL.md +4 -2
- package/adapters/claude/skills/release-finish/SKILL.md +2 -0
- package/adapters/claude/skills/release-help/SKILL.md +18 -3
- package/adapters/claude/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/claude/skills/release-prepare/SKILL.md +12 -2
- package/adapters/claude/skills/release-publish/SKILL.md +17 -10
- package/adapters/claude/skills/release-verify/SKILL.md +2 -0
- package/adapters/claude/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/claude/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/claude/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/claude/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/claude/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/claude/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/consumer-contract-vectors.json +7 -7
- package/adapters/codex/bin/error-codes.json +1 -1
- package/adapters/codex/bin/foundation-resource-binding.json +1 -1
- package/adapters/codex/bin/registry.json +22 -1
- package/adapters/codex/bin/release-skill.bundle.mjs +4564 -1997
- package/adapters/codex/bin/rules.json +1 -1
- package/adapters/codex/schemas/release-project.schema.json +4 -0
- package/adapters/codex/schemas/release-run.schema.json +41 -1
- package/adapters/codex/skills/release-config/SKILL.md +5 -3
- package/adapters/codex/skills/release-docs/SKILL.md +4 -2
- package/adapters/codex/skills/release-finish/SKILL.md +2 -0
- package/adapters/codex/skills/release-help/SKILL.md +18 -3
- package/adapters/codex/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/codex/skills/release-prepare/SKILL.md +12 -2
- package/adapters/codex/skills/release-publish/SKILL.md +17 -10
- package/adapters/codex/skills/release-verify/SKILL.md +2 -0
- package/adapters/codex/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/codex/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/codex/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/codex/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/codex/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/codex/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/consumer-contract-vectors.json +7 -7
- package/adapters/kimi/bin/error-codes.json +1 -1
- package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
- package/adapters/kimi/bin/registry.json +22 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +4564 -1997
- package/adapters/kimi/bin/rules.json +1 -1
- package/adapters/kimi/schemas/release-project.schema.json +4 -0
- package/adapters/kimi/schemas/release-run.schema.json +41 -1
- package/adapters/kimi/skills/release-config/SKILL.md +5 -3
- package/adapters/kimi/skills/release-docs/SKILL.md +4 -2
- package/adapters/kimi/skills/release-finish/SKILL.md +2 -0
- package/adapters/kimi/skills/release-help/SKILL.md +18 -3
- package/adapters/kimi/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/kimi/skills/release-prepare/SKILL.md +12 -2
- package/adapters/kimi/skills/release-publish/SKILL.md +17 -10
- package/adapters/kimi/skills/release-verify/SKILL.md +2 -0
- package/adapters/kimi/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/kimi/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/kimi/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/kimi/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/kimi/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/kimi/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/consumer-contract-vectors.json +7 -7
- package/adapters/workbuddy/bin/error-codes.json +1 -1
- package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
- package/adapters/workbuddy/bin/registry.json +22 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +4564 -1997
- package/adapters/workbuddy/bin/rules.json +1 -1
- package/adapters/workbuddy/schemas/release-project.schema.json +4 -0
- package/adapters/workbuddy/schemas/release-run.schema.json +41 -1
- package/adapters/workbuddy/skills/release-config/SKILL.md +5 -3
- package/adapters/workbuddy/skills/release-docs/SKILL.md +4 -2
- package/adapters/workbuddy/skills/release-finish/SKILL.md +2 -0
- package/adapters/workbuddy/skills/release-help/SKILL.md +18 -3
- package/adapters/workbuddy/skills/release-marketplace/SKILL.md +3 -1
- package/adapters/workbuddy/skills/release-prepare/SKILL.md +12 -2
- package/adapters/workbuddy/skills/release-publish/SKILL.md +17 -10
- package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -0
- package/adapters/workbuddy/src/schemas/executable-identity-observation.schema.json +162 -0
- package/adapters/workbuddy/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/adapters/workbuddy/src/schemas/plugin-verification-request.schema.json +147 -22
- package/adapters/workbuddy/src/schemas/plugin-verification-result.schema.json +436 -18
- package/adapters/workbuddy/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/adapters/workbuddy/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
- package/bin/consumer-contract-vectors.json +7 -7
- package/bin/error-codes.json +1 -1
- package/bin/foundation-resource-binding.json +1 -1
- package/bin/registry.json +22 -1
- package/bin/release-skill-cli.mjs +58 -2
- package/bin/release-skill.bundle.mjs +4564 -1997
- package/bin/rules.json +1 -1
- package/package.json +5 -5
- package/platform-manifest.json +4 -4
- package/references/.render-manifest.json +4 -4
- package/references/01-state-machine.md +34 -1
- package/references/02-project-config.md +20 -0
- package/references/05-evidence-and-errors.md +2 -2
- package/schemas/release-project.schema.json +4 -0
- package/schemas/release-run.schema.json +41 -1
- package/skills/release-config/SKILL.md +5 -3
- package/skills/release-docs/SKILL.md +4 -2
- package/skills/release-finish/SKILL.md +2 -0
- package/skills/release-help/SKILL.md +18 -3
- package/skills/release-marketplace/SKILL.md +3 -1
- package/skills/release-prepare/SKILL.md +12 -2
- package/skills/release-publish/SKILL.md +17 -10
- package/skills/release-verify/SKILL.md +2 -0
- package/skills-src/release-config/SKILL.md +5 -3
- package/skills-src/release-docs/SKILL.md +4 -2
- package/skills-src/release-finish/SKILL.md +2 -0
- package/skills-src/release-help/SKILL.md +18 -3
- package/skills-src/release-marketplace/SKILL.md +3 -1
- package/skills-src/release-prepare/SKILL.md +12 -2
- package/skills-src/release-publish/SKILL.md +17 -10
- package/skills-src/release-verify/SKILL.md +2 -0
- package/src/commands/post-release-local.mjs +169 -16
- package/src/commands/prepare.mjs +321 -11
- package/src/commands/route.mjs +597 -18
- package/src/commands/setup.mjs +2 -0
- package/src/commands/ship.mjs +183 -2
- package/src/commands/verify.mjs +21 -0
- package/src/core/adoption-assessment.mjs +59 -0
- package/src/core/foundation-plugin-verification.mjs +233 -1
- package/src/core/hook-cache.mjs +318 -26
- package/src/core/hooks.mjs +8 -1
- package/src/producers/foundation-resource-projection.mjs +3 -3
- package/src/schemas/executable-identity-observation.schema.json +162 -0
- package/src/schemas/filesystem-tree-observation.schema.json +18 -2
- package/src/schemas/plugin-verification-request.schema.json +147 -22
- package/src/schemas/plugin-verification-result.schema.json +436 -18
- package/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
- package/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
package/bin/rules.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "release-skill",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "广州市风荷科技有限公司"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"scripts": {
|
|
56
56
|
"build": "node --check src/**/*.mjs && node scripts/build-bundle.mjs",
|
|
57
57
|
"test": "node --test $(ls test/*.test.mjs | grep -v -E 'artifacts-safe-fs-native-seam')",
|
|
58
|
-
"test:no-dogfood": "node --test $(ls test/*.test.mjs | grep -v -E 'dogfood|artifacts-safe-fs-native-seam|setup-live-samples|reference-configs')",
|
|
58
|
+
"test:no-dogfood": "node --test $(ls test/*.test.mjs | grep -v -E 'dogfood|artifacts-safe-fs-native-seam|setup-live-samples|reference-configs|readme-contract') && node --test test/readme-contract.test.mjs",
|
|
59
59
|
"test:cli-contract": "node --test test/cli-contract.test.mjs",
|
|
60
60
|
"typecheck": "node --check src/**/*.mjs bin/*.mjs",
|
|
61
61
|
"sync:skills": "node scripts/sync-skills.mjs",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"ajv-formats": "3.0.1",
|
|
80
80
|
"libnpmpublish": "11.2.0",
|
|
81
81
|
"npm-registry-fetch": "18.0.2",
|
|
82
|
-
"skill-family-contracts": "0.
|
|
83
|
-
"skill-family-engineering-kit": "0.
|
|
84
|
-
"skill-family-harness-node": "0.
|
|
82
|
+
"skill-family-contracts": "0.16.0",
|
|
83
|
+
"skill-family-engineering-kit": "0.16.0",
|
|
84
|
+
"skill-family-harness-node": "0.16.0",
|
|
85
85
|
"yaml": "2.9.0"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
package/platform-manifest.json
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"schemaVersion": "1.0.0",
|
|
3
3
|
"platformId": "release-skill",
|
|
4
4
|
"platformName": "release-skill Plugin Platform",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.4",
|
|
6
6
|
"logicalRoot": "skills-src/",
|
|
7
|
-
"logicalRootDigest": "
|
|
8
|
-
"projectionDigest": "
|
|
9
|
-
"projectionId": "release-skill:platform:0.9.
|
|
7
|
+
"logicalRootDigest": "673e640c5e6b017bacc31649886805c879ac244b1b79b9917d2515f88f09e8ca",
|
|
8
|
+
"projectionDigest": "582e662d6f288725ffa09cd83034a339b8e05ec5c44a4989c16bf4e6a774e3c4",
|
|
9
|
+
"projectionId": "release-skill:platform:0.9.4",
|
|
10
10
|
"manifestRequired": true,
|
|
11
11
|
"projectionSources": {
|
|
12
12
|
"skills-src-root": {
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
"bytes": 6335
|
|
7
7
|
},
|
|
8
8
|
"01-state-machine.md": {
|
|
9
|
-
"digest": "
|
|
10
|
-
"bytes":
|
|
9
|
+
"digest": "85e20f4ba60a833325516b9ced9351f9e324cd7b386460d3fb108b79b8875265",
|
|
10
|
+
"bytes": 14857
|
|
11
11
|
},
|
|
12
12
|
"02-project-config.md": {
|
|
13
|
-
"digest": "
|
|
14
|
-
"bytes":
|
|
13
|
+
"digest": "50f9b775a4864270642b752d040546f6c365f0b49bf1bfe8a3aacefe88eae702",
|
|
14
|
+
"bytes": 26033
|
|
15
15
|
},
|
|
16
16
|
"03-readme-quality.md": {
|
|
17
17
|
"digest": "d74e41052592443ebbd450d0ace5f9b9b19c7a94db50f952b17c1c5a4c5dc230",
|
|
@@ -84,6 +84,24 @@ postPublish hooks 分两个阶段,各自对应独立的 distribute run:
|
|
|
84
84
|
- **postVerify 阶段**(`phase: postVerify`):主 run VERIFIED 后由 ship/verify 路由触发,产出独立的 distribute run(复用现有 run 记录与 checkpoint 机制);失败即该 run PARTIAL、reconcile 可续。主 run 的 VERIFIED 不回退,但 postVerify run 的失败必须以证据显著记录,绝不静默。
|
|
85
85
|
- **checkpoint 级批准**:`requiresApproval: true` 的 hook 执行前需要绑定 `(planDigest, hookId)` 的独立批准记录(24h 过期、5 分钟时钟偏移容忍)。批准未获时:尚无外部 checkpoint 成功 → checkpoint 标记 `AWAITING_APPROVAL`、run 进 NEEDS_INPUT;已有外部 checkpoint 成功 → run 保持 PARTIAL。
|
|
86
86
|
|
|
87
|
+
### 2.3 发布范围与延期单元(v0.9.4)
|
|
88
|
+
|
|
89
|
+
多发布单元项目可以在首次计划冻结前显式选择本轮发布范围。`prepare` 和新建的
|
|
90
|
+
`ship` 状态接受可重复的 `--unit <id>`;未传该参数时,范围仍是配置中的全部发布单元。
|
|
91
|
+
|
|
92
|
+
显式选择不会增加生命周期状态。未选中的单元只显示为延期单元,不进入本轮
|
|
93
|
+
`plan.units`,也不获得 PREPARED、APPROVED、PUBLISHED 或 VERIFIED 含义。完整项目配置、
|
|
94
|
+
生成物新鲜度和顶层 hooks 仍按项目级规则检查;按单元绑定的版本、文档、快照、分发和
|
|
95
|
+
验证门只处理选中单元。
|
|
96
|
+
|
|
97
|
+
计划冻结后,`plan.units` 是唯一发布范围权威。批准必须绑定计划内的全部动作,
|
|
98
|
+
`publish`、`reconcile`、`verify` 和 `distribute` 必须完整处理该计划,不接受单元选择参数。
|
|
99
|
+
`ship` 可以沿用首次保存的显式范围恢复,但不得在同一状态上改变范围。旧状态没有保存
|
|
100
|
+
显式范围时按全范围处理,不能在原状态上追加 `--unit`。
|
|
101
|
+
|
|
102
|
+
外部写入开始后不得缩小范围。任一检查点成功后出现失败,仍进入 PARTIAL,并由
|
|
103
|
+
`reconcile` 在原冻结计划内向前恢复;延期单元需要另行 prepare、审阅和批准。
|
|
104
|
+
|
|
87
105
|
---
|
|
88
106
|
|
|
89
107
|
## 3. 禁止转换
|
|
@@ -152,7 +170,22 @@ postPublish hooks 分两个阶段,各自对应独立的 distribute run:
|
|
|
152
170
|
|
|
153
171
|
失效后系统回退到 PREPARED 状态,要求重新批准。
|
|
154
172
|
|
|
155
|
-
### 4.5
|
|
173
|
+
### 4.5 路由诊断与当前恢复
|
|
174
|
+
|
|
175
|
+
`route` 负责选择 workflow 和展示 diagnostics,不承担发布授权。传入
|
|
176
|
+
`--target-version <ver>` 时,只有既有校验器确认 `release-run.json`、绑定 plan、摘要
|
|
177
|
+
身份和 lineage 完整,且计划目标等于该版本、仍有未完成动作的记录,才可生成
|
|
178
|
+
`reconcile`、`distribute` 或 `verify` 建议。目录名、mtime、producer 版本、`summary.json`、
|
|
179
|
+
错误文案和旧阶段名只能进入 diagnostics。
|
|
180
|
+
|
|
181
|
+
未传 target 时,route 始终依据当前 diff/baseline 选择 workflow。历史 `PARTIAL`、
|
|
182
|
+
`DIAGNOSE` 或损坏记录保持可见,但不能把 workflow 改成恢复阶段或诊断入口。多个当前
|
|
183
|
+
有效候选必须保留候选列表并要求明确选择,不生成猜测命令。
|
|
184
|
+
|
|
185
|
+
这些路由规则不改变状态机的发布门。`publish`、`reconcile` 和 `verify` 仍必须校验
|
|
186
|
+
plan、approval、冻结制品身份、远端状态、检查点和 `PARTIAL` 血缘。
|
|
187
|
+
|
|
188
|
+
### 4.6 发布检查点失败
|
|
156
189
|
|
|
157
190
|
发布按以下检查点顺序执行(详见 `06-adapter-contract.md`):
|
|
158
191
|
|
|
@@ -126,6 +126,26 @@ unit 恰好声明一个 npm distribution。prepare 等所有 subject tarball 冻
|
|
|
126
126
|
重新下载远端字节并核对 SHA-256。离线消费者只需该文件和其中 subjects 对应的精确 tarball,便可
|
|
127
127
|
核对包名、版本、文件名、tarball SHA-256、源码仓库与源码基线提交。
|
|
128
128
|
|
|
129
|
+
### 2.1 显式发布范围(v0.9.4)
|
|
130
|
+
|
|
131
|
+
发布范围不增加配置字段。`releaseUnits[]` 继续声明项目可发布的全部单元;操作者可以在
|
|
132
|
+
`prepare` 或新建 `ship` 状态时重复传入 `--unit <id>`,从中选择本轮范围。未传参数时
|
|
133
|
+
选择全部单元。显式参数至少包含一个已声明的唯一 ID,计划顺序始终按
|
|
134
|
+
`releaseUnits[]` 的声明顺序确定,不受命令行顺序影响。
|
|
135
|
+
|
|
136
|
+
选择只裁剪按单元绑定的工作,包括版本与发布文档检查、公开文件快照、分发合同、
|
|
137
|
+
`verificationGates[].scope.unit` 对应的验证门和发布后声明。配置 Schema、单元 ID
|
|
138
|
+
唯一性、生成物新鲜度和顶层 `hooks` 仍覆盖完整项目。顶层 Hook 没有单元作用域,
|
|
139
|
+
不得根据命令、路径或输出猜测归属。
|
|
140
|
+
|
|
141
|
+
`publicSourceAuthorityReceipt` 是现有的附加依赖闭包。显式范围只要包含 coordinator
|
|
142
|
+
或任一 subject,就必须同时包含该收据声明涉及的全部单元。prepare 不会自动扩大范围;
|
|
143
|
+
范围不完整时会在 Hook、快照和计划写入前停止,并返回缺少的单元和精确重试参数。
|
|
144
|
+
|
|
145
|
+
冻结计划只包含选中单元及其派生门、动作和发布后声明。`plan.units` 是冻结后的唯一
|
|
146
|
+
发布范围权威,完整配置摘要仍进入计划绑定。延期单元不写回项目配置,也不形成状态、
|
|
147
|
+
豁免或待办记录。`publish`、`reconcile`、`verify` 和 `distribute` 不接受单元选择参数。
|
|
148
|
+
|
|
129
149
|
`postPublish` 只能位于某个 `releaseUnits[]` 条目内。下面的完整结构样例会由 schema 契约测试直接读取并校验,避免文档层级再次漂移:
|
|
130
150
|
|
|
131
151
|
```yaml
|
|
@@ -95,7 +95,7 @@ v2 的顶层结构封闭(`additionalProperties: false`),只接受 Schema
|
|
|
95
95
|
|
|
96
96
|
### 2.4 摘要输出
|
|
97
97
|
|
|
98
|
-
`summary.json` 只是 evidence 的有界诊断投影:它必须可由 `evidence.jsonl` 重建,**不参与发布事实判断**。`route` 等发布判断只消费经过 Schema
|
|
98
|
+
`summary.json` 只是 evidence 的有界诊断投影:它必须可由 `evidence.jsonl` 重建,**不参与发布事实判断**。`route` 等发布判断只消费经过 Schema、digest/binding、计划和 lineage 校验的 `release-run.json` 与其绑定 plan;summary 丢失、损坏或被改写不能改变发布状态。
|
|
99
99
|
|
|
100
100
|
每次执行结束时产生一个面向用户的中文摘要,包含:
|
|
101
101
|
|
|
@@ -115,7 +115,7 @@ v2 的顶层结构封闭(`additionalProperties: false`),只接受 Schema
|
|
|
115
115
|
| `producer` | 生产者名称和版本,只用于归因 |
|
|
116
116
|
| `recoveryActionCode` | 恢复建议码(见下),只供展示;不持久化可执行 shell 命令字符串 |
|
|
117
117
|
|
|
118
|
-
恢复建议以本次 `readRunRecovery`
|
|
118
|
+
恢复建议以本次 `readRunRecovery` 对运行、计划、digest/binding、血缘、检查点和批准的校验结果为准,不能只按成功检查点数量、目录名、mtime、producer 版本、summary 或错误文案判断阶段。显式 target 下,只有计划目标一致且仍有未完成动作的完整校验记录才能生成当前恢复建议;其他版本、无法绑定、legacy 或损坏记录只进入 diagnostics。未传 target 时,route 按 diff/baseline 选择 workflow,历史恢复码只作展示。
|
|
119
119
|
|
|
120
120
|
0.8.0 候选已接齐恢复建议输出,仍待独立验收,尚未发布。有本次证据且 FAILED 摘要收到明确的领域建议时,顶层采用同一次计算结果。兼容 `details` 和返回错误如保留建议,只镜像同一结果。未提供领域建议时保留原通用回退,无证据时仍为 `unknown`,成功 verify 的 `null` 不得改成重试建议。不得从磁盘摘要或历史 `details` 反向读取授权事实。
|
|
121
121
|
|
|
@@ -601,7 +601,47 @@
|
|
|
601
601
|
"foundationStatus": { "const": "observed" },
|
|
602
602
|
"payloadMatches": { "const": true },
|
|
603
603
|
"observationDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
|
|
604
|
-
"observedAt": { "type": "string", "format": "date-time" }
|
|
604
|
+
"observedAt": { "type": "string", "format": "date-time" },
|
|
605
|
+
"extraInstalledPaths": {
|
|
606
|
+
"type": "array",
|
|
607
|
+
"minItems": 1,
|
|
608
|
+
"uniqueItems": true,
|
|
609
|
+
"items": {
|
|
610
|
+
"type": "string",
|
|
611
|
+
"pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*\\/\\/)(?!.*\\u0000)(?!.*\\/$).+$"
|
|
612
|
+
}
|
|
613
|
+
},
|
|
614
|
+
"extraInstalledLinks": {
|
|
615
|
+
"type": "array",
|
|
616
|
+
"minItems": 1,
|
|
617
|
+
"uniqueItems": true,
|
|
618
|
+
"items": {
|
|
619
|
+
"type": "object",
|
|
620
|
+
"additionalProperties": false,
|
|
621
|
+
"required": ["path", "targetBase64", "bytes", "statMode"],
|
|
622
|
+
"properties": {
|
|
623
|
+
"path": {
|
|
624
|
+
"type": "string",
|
|
625
|
+
"pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*\\/\\/)(?!.*\\u0000)(?!.*\\/$).+$"
|
|
626
|
+
},
|
|
627
|
+
"targetBase64": {
|
|
628
|
+
"type": "string",
|
|
629
|
+
"minLength": 4,
|
|
630
|
+
"pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$"
|
|
631
|
+
},
|
|
632
|
+
"bytes": {
|
|
633
|
+
"type": "integer",
|
|
634
|
+
"minimum": 1,
|
|
635
|
+
"maximum": 9007199254740991
|
|
636
|
+
},
|
|
637
|
+
"statMode": {
|
|
638
|
+
"type": "integer",
|
|
639
|
+
"minimum": 0,
|
|
640
|
+
"maximum": 65535
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
605
645
|
}
|
|
606
646
|
}
|
|
607
647
|
},
|
|
@@ -46,7 +46,7 @@ prepare 的真实输出是 plan 内的 `workflowDecision`。
|
|
|
46
46
|
|
|
47
47
|
## 正向执行路径
|
|
48
48
|
|
|
49
|
-
1. 运行 `release-skill route --root <path> --json` 获取 diff
|
|
49
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类;已知目标版本时显式传入,route 只是工作流建议
|
|
50
50
|
2. 若推荐 `workflowKind === 'config-only'`,则使用本技能
|
|
51
51
|
3. 执行步骤②:运行 `release-skill assess --root <path> --offline --json` 进行 schema validation
|
|
52
52
|
4. 执行步骤③:运行 `release-skill prepare --offline --workflow config --target-version <ver> --json`
|
|
@@ -61,8 +61,10 @@ prepare 的真实输出是 plan 内的 `workflowDecision`。
|
|
|
61
61
|
## 确定性脚本调用
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
# Step 1: Diff classification confirmation (config-only)
|
|
64
|
+
# Step 1: Diff classification confirmation (config-only; pass the known target)
|
|
65
65
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
66
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
67
|
+
--root <path> --target-version <version> --json
|
|
66
68
|
|
|
67
69
|
# Step 2: Assess with schema validation
|
|
68
70
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offline --json
|
|
@@ -96,7 +98,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" verify \
|
|
|
96
98
|
| prepare 检测到基线漂移 | BASELINE_DRIFT_DETECTED | 人工审查 drift 后决定是否继续或回滚 |
|
|
97
99
|
| workflowDecision 不可判定(无对比 plan) | indeterminable | fail-safe 到 publish-needed,走场景 B |
|
|
98
100
|
| approval expired | APPROVAL_EXPIRED | 重新执行 approve,digest 必须匹配 |
|
|
99
|
-
| remote conflict at publish | REMOTE_CONFLICT |
|
|
101
|
+
| remote conflict at publish | REMOTE_CONFLICT | 人工决策;不得 force override 或覆盖远端状态 |
|
|
100
102
|
|
|
101
103
|
## 决策树 (Step 4)
|
|
102
104
|
|
|
@@ -36,7 +36,7 @@ plan 记录 `workflowKind: 'docs'` 与 `workflowDecision`(绑定进 plan diges
|
|
|
36
36
|
|
|
37
37
|
## 正向执行路径
|
|
38
38
|
|
|
39
|
-
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff
|
|
39
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类和工作流建议;已知目标版本时显式传入,route 不承担发布授权
|
|
40
40
|
2. 若推荐 `workflowKind === 'docs-only'`,则使用本技能
|
|
41
41
|
3. 执行步骤②:调用 `check-style.mjs <doc-path>...` 执行事实/可读性/风格检查
|
|
42
42
|
4. 执行步骤③:调用 `render-public-site.mjs --check [--repo <name>]` 验证渲染无漂移
|
|
@@ -49,8 +49,10 @@ plan 记录 `workflowKind: 'docs'` 与 `workflowDecision`(绑定进 plan diges
|
|
|
49
49
|
## 确定性脚本调用
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
# Step 1: Diff classification (from release-skill route)
|
|
52
|
+
# Step 1: Diff classification (from release-skill route; pass the known target)
|
|
53
53
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
54
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
55
|
+
--root <path> --target-version <version> --json
|
|
54
56
|
|
|
55
57
|
# Step 2: Style-guard three gates (check-style.mjs takes file paths only)
|
|
56
58
|
node "${WORKBUDDY_ROOT}/adapters/workbuddy/skills/skill-family-docs-style-guard/scripts/check-style.mjs" \
|
|
@@ -21,6 +21,7 @@ description: 发布达到 VERIFIED 后处理可选的本地收尾:按发布分
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
24
|
+
--root <project-root> \
|
|
24
25
|
--plan <plan-path> \
|
|
25
26
|
--run <verified-run-path> \
|
|
26
27
|
--json
|
|
@@ -42,6 +43,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
42
43
|
|
|
43
44
|
```bash
|
|
44
45
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
46
|
+
--root <project-root> \
|
|
45
47
|
--plan <plan-path> \
|
|
46
48
|
--run <verified-run-path> \
|
|
47
49
|
--update-local-hosts \
|
|
@@ -17,6 +17,16 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
17
17
|
- 只读诊断:运行 dry-run 检查,不修改任何文件
|
|
18
18
|
- 故障引导:根据错误码指向对应的修复 Skill
|
|
19
19
|
|
|
20
|
+
## 0.9.4 候选边界
|
|
21
|
+
|
|
22
|
+
当前源码候选允许多发布单元项目在计划冻结前显式选择本轮范围。`prepare` 和新建的 `ship` 状态支持重复传入 `--unit <id>`;未传时继续选择全部配置单元。成功选择会列出选中与延期单元。延期单元不进入本轮计划,也不获得发布状态。
|
|
23
|
+
|
|
24
|
+
选择只影响按单元绑定的检查与动作。完整配置、生成物新鲜度和顶层 Hook 仍覆盖整个项目。`publicSourceAuthorityReceipt` 涉及的 coordinator 和 subjects 必须作为完整闭包共同选择,系统不会自动扩选。计划冻结后,`plan.units` 是唯一范围权威;publish、reconcile、verify 和 distribute 不接受 `--unit`。
|
|
25
|
+
|
|
26
|
+
0.9.3 引入的四项工作流保护、Hook cache v2 和稳定隔离安装树记录在 0.9.4 继续保留。0.9.4 精确消费 Foundation 0.16.0 的公开包根 API。Hook cache 只复用绝对路径或经真实 cwd 校验的 cwd-relative executable identity;裸 PATH、PATHEXT、Windows 和观察不可用时,Hook 仍冷执行,缓存复用失败关闭且不写入 v2 cache。缓存没有 TTL。
|
|
27
|
+
|
|
28
|
+
稳定隔离安装树记录只在宿主命令退出、目录已隔离且扫描期间没有并发写入时执行;宿主附加链接只记录、不跟随,声明载荷中的 symlink 失败关闭,legacy 全树语义保持不变。0.9.4 仍是源码候选,不能从本说明推断已批准、发布或验证。
|
|
29
|
+
|
|
20
30
|
**阶段通过规则**: `status` 与 `readiness.localPreparation.status` 只判断本地 help/assess/prepare;其充要条件是 `READY` 且 exit code 为 0。`missingRequired` 列出缺失的 Node/Git。生产发布必须另外读取 `readiness.productionPublish`:缺少 npm/gh 时为 `NOT_READY`,依赖存在时仍是 `AUTH_CHECK_REQUIRED`,因为 help 不访问网络、不验证认证。Agent 无权把本地就绪解释为生产就绪。
|
|
21
31
|
|
|
22
32
|
**边界**: help 不修改文件系统、不执行外部写操作、不生成发布计划。优先探测 PATH 上的全局安装命令 `release-skill`,不可用时回退到源码路径。每个 unit 必须配置 `previousPublicBaseline`:首次发布且确认无前序版本用 none,已有版本用 bound + repo/ref/commit;none 不是绕过 publish 唯一性预检的开关。v0.1.1 已完成 GitHub/npm 真实生产发布、冻结 Git ref 的 Claude/Codex 消费者安装、精确 npm 安装 smoke 与最终 VERIFIED;生产等价本地协议套件继续覆盖 fake gh/npm/Claude/Codex 和本地 bare Git。测试未做 OS 级禁网,且一次成功发布不能证明其他项目的认证、权限、限流或最终一致性行为;每个项目的首次生产发布仍应作为受监控 canary。
|
|
@@ -26,7 +36,7 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
26
36
|
1. 使用插件根相对路径运行 CLI:`node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" help --json`
|
|
27
37
|
2. 检查 `readiness.localPreparation`;需要生产发布时再检查 `readiness.productionPublish`
|
|
28
38
|
3. 若环境就绪且缺少 `.release-skill/project.yaml`,先路由 `release-setup`;配置已存在才运行 `release-assess`
|
|
29
|
-
4.
|
|
39
|
+
4. 默认在审阅本地计划和快照后停止;只有用户明确要求且完成摘要审批时才进入 `release-publish`。已持有合法批准的 production plan 时,publish 自行完成权威校验,不把 route 当作授权门
|
|
30
40
|
|
|
31
41
|
## 确定性脚本调用
|
|
32
42
|
|
|
@@ -38,6 +48,9 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offlin
|
|
|
38
48
|
# 日常发布快速路径:发布前确认可读计划摘要,状态文件可恢复。
|
|
39
49
|
# 受限 postPublish hook 的 checkpoint 批准与计划批准分开。
|
|
40
50
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> --target-version <version> --json
|
|
51
|
+
# 多发布单元项目显式选择本轮范围;未传 --unit 时仍为全部单元
|
|
52
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> \
|
|
53
|
+
--target-version <version> --unit <unit-a> --unit <unit-b> --json
|
|
41
54
|
# 开发阶段执行声明 hooks 并生成 prepare 可复用的内容绑定收据
|
|
42
55
|
# 配置时刻即授权(FM-16 处置 A):hook 是任意本地进程、无隔离、触发前无确认点,
|
|
43
56
|
# 命令调用本身即授权执行配置中的 hooks
|
|
@@ -76,7 +89,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
|
76
89
|
| CLI 入口不存在 | 确认 `${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs` 存在;不存在时重新安装插件 |
|
|
77
90
|
| 项目配置不存在 | 路由 `release-setup`,默认只读;不得直接生成或覆盖 README/配置 |
|
|
78
91
|
| assess 失败 | 运行 `node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --offline --json` 获取详情 |
|
|
79
|
-
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound
|
|
92
|
+
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound 基线;人工审阅后直接调用 `release-publish`,由 publish 自行完成计划、approval、digest、远端冲突和 `PARTIAL` 校验 |
|
|
80
93
|
| RELEASE_DOCS_INVALID | 配置或说明源语义非法(重复键、alias、未知字段、版本漂移等);修正配置或说明源后重新演练 |
|
|
81
94
|
| RELEASE_DOCS_TRANSLATION_MISSING | 配置语种缺失或多余;补齐说明源语种,与 `releaseDocuments.locales` 完全一致,不得回退 |
|
|
82
95
|
|
|
@@ -85,8 +98,10 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
|
85
98
|
对于不清楚如何开始的用户,推荐使用 `release-skill route` 命令进行自动化工作流选择:
|
|
86
99
|
|
|
87
100
|
```bash
|
|
88
|
-
#
|
|
101
|
+
# 快速分类变更并推荐工作流;已知目标版本时显式传入,未知时省略
|
|
89
102
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
103
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> \
|
|
104
|
+
--target-version <version> --json
|
|
90
105
|
|
|
91
106
|
# JSON 输出包含 classification 和 recommendation 字段
|
|
92
107
|
{
|
|
@@ -44,7 +44,7 @@ byte、platform manifest 是核心 gate,由 workspace 自己的生成器与
|
|
|
44
44
|
|
|
45
45
|
## 正向执行路径
|
|
46
46
|
|
|
47
|
-
1. 运行 `release-skill route --root <path> --json` 获取 diff
|
|
47
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类;已知目标版本时显式传入,route 只是工作流建议
|
|
48
48
|
2. 若推荐 `workflowKind === 'marketplace-only'`,则使用本技能
|
|
49
49
|
3. 执行步骤②:手动审查并更新 `plugins.mjs`(唯一 truth source)
|
|
50
50
|
4. 执行步骤③:调用 workspace 自己的生成器再生成 `public-snapshot/`
|
|
@@ -59,6 +59,8 @@ byte、platform manifest 是核心 gate,由 workspace 自己的生成器与
|
|
|
59
59
|
# Step 1: Diff classification confirmation (marketplace-only)
|
|
60
60
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
61
61
|
--root <workspace-root> --json
|
|
62
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
63
|
+
--root <workspace-root> --target-version <version> --json
|
|
62
64
|
|
|
63
65
|
# Step 2: Manual review and update plugins.mjs
|
|
64
66
|
# Human-in-the-loop: entry is the sole truth source
|
|
@@ -13,6 +13,10 @@ description: Freeze an immutable release plan with local configuration, document
|
|
|
13
13
|
|
|
14
14
|
运行项目构建/测试 hook,生成公开快照并扫描泄漏,冻结不可变发布计划。prepare 自身不调用发布 adapter,但会执行用户配置的 hook。
|
|
15
15
|
|
|
16
|
+
0.9.4 候选允许多发布单元项目在冻结前显式选择本轮范围。`--unit <id>` 可以重复传入;未传时仍选择全部单元。显式选择只跳过延期单元的单元级工作,完整配置校验、生成物新鲜度和顶层 Hook 仍全部执行。计划冻结后以 `plan.units` 为唯一范围权威,publish、reconcile、verify 和 distribute 不接受单元选择。
|
|
17
|
+
|
|
18
|
+
0.9.3 引入的 Hook cache v2 继续只复用有完整身份和输入证据的成功 Hook 结果。裸 PATH、PATHEXT、Windows、TTL、损坏记录或 Foundation 观察不可用时,缓存保持失败关闭,Hook 仍按完整路径冷执行;该机制不改变 prepare 的计划、批准和发布权威。
|
|
19
|
+
|
|
16
20
|
**Hook 授权契约(配置时刻即授权,FM-16 处置 A)**: hook 是任意本地进程——在 `.release-skill/project.yaml` 中配置 hook 命令即完成授权,构成「配置时刻即授权」的显式契约。hook 不提供沙箱、无文件系统/网络隔离、触发前无确认点,命令调用本身即授权执行已配置的 hook 和 gate,不再设置额外人工授权环节;hook 可能产生项目目录外的副作用或远端写入,配置者须对其内容负责。旧参数 `--acknowledge-hook-side-effects` 和 `--acknowledge-gate-side-effects` 仍可解析,但只作为无效果的兼容输入,不能改变授权或执行语义。恢复「触发前强制确认门」属于后续加固项(属设计变更,需随新版本引入),当前版本不提供该确认门。
|
|
17
21
|
|
|
18
22
|
**阶段通过规则**: 本阶段的通过只能由 CLI exit code 0 和结构化状态码 `PREPARED` 确认。Agent 无权自行宣布计划冻结成功。
|
|
@@ -23,11 +27,13 @@ description: Freeze an immutable release plan with local configuration, document
|
|
|
23
27
|
|
|
24
28
|
**发布文档新鲜度门**: 配置了 `releaseDocuments` 的单元在 hook 授权门前先执行同一只读规划器:`clean` 继续;`changes` 抛 `RELEASE_DOCS_STALE`,详情列出相对路径、语种、`refreshDigest` 和精确演练/写入参数数组。prepare 只检查、不写工作树。正式 prepare 前先运行只读演练;有变化时向用户展示文件/语种/版本/`refreshDigest`,只有在用户明确授权"本地发布文档写入"后,才执行带 `--write --confirm-refresh <refreshDigest> --ack-local-document-write` 三项绑定的写入,随后运行聚焦校验,要求维护者审阅并提交刷新结果,再重新 prepare。该授权不扩展为 hook、提交、push 或 publish 授权。
|
|
25
29
|
|
|
30
|
+
**显式发布范围**: 只有用户已经指出本轮要发布哪些单元时,才把这些 ID 逐个传给 `--unit`。release-skill 不根据失败自动排除单元。选择命中 `publicSourceAuthorityReceipt` 的 coordinator 或 subject 时,必须包含收据声明的完整单元闭包;缺少单元时按命令返回的精确 argv 重新选择,不自动扩选。成功后展示 `releaseScope.selectedUnitIds`、`releaseScope.deferredUnitIds` 和批准摘要。延期仅表示没有进入本轮计划,不表示通过或失败。
|
|
31
|
+
|
|
26
32
|
## 正向执行路径
|
|
27
33
|
|
|
28
34
|
1. 使用插件根相对路径运行 CLI:`CLI="node ${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs"`
|
|
29
35
|
2. 配置含 `releaseDocuments` 时,先运行只读演练 `${CLI} docs refresh --unit <id> --json`;`status: "changes"` 时展示逐文件路径/语种/版本/`refreshDigest`,取得"本地发布文档写入"明确授权后才执行 `nextCommand.argv` 写入,审阅并提交刷新结果后再继续;`status: "clean"` 时直接进入 prepare
|
|
30
|
-
3. 运行 `${CLI} prepare --root <path> --offline --json
|
|
36
|
+
3. 运行 `${CLI} prepare --root <path> --offline --json`;用户已明确选择范围时,为每个单元追加一个 `--unit <id>`
|
|
31
37
|
4. 检查 exit code 0,读取 JSON 返回的 immutable `planPath=plans/<planDigest>.json`,再从该文件读取 `status`、`units`、`externalActions`
|
|
32
38
|
5. 向用户展示可读的 `approvalSummary`:版本、公开仓库、分支策略、branch/tag、npm 与 GitHub Release 目标、全部外部动作、例外,以及需要独立 checkpoint 批准的 postPublish hook。`planDigest` 仅作为内部绑定字段,不要求用户复制或确认。后续 approve/publish 只能使用该 immutable planPath,等待确认后再 approve。计划批准不包含受限 postPublish hook 的 checkpoint 批准
|
|
33
39
|
|
|
@@ -62,6 +68,9 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> --js
|
|
|
62
68
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
63
69
|
--write --confirm-refresh <refreshDigest> --ack-local-document-write --json
|
|
64
70
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" prepare --root <path> --offline --json
|
|
71
|
+
# 显式选择发布范围;未传 --unit 时仍准备全部配置单元
|
|
72
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" prepare --root <path> --offline \
|
|
73
|
+
--unit <unit-a> --unit <unit-b> --json
|
|
65
74
|
# 生产 happy end:bound 基线必须 online;远端目标唯一性仍由 publish 全局预检
|
|
66
75
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" prepare --root <path> --online --production --json
|
|
67
76
|
```
|
|
@@ -79,11 +88,12 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" prepare --root <path> --onlin
|
|
|
79
88
|
| GATE_FAILED (bound + offline) | 改用 `--online --production`,不得把 unobserved-offline plan 交给 publish |
|
|
80
89
|
| GATE_FAILED (前序基线漂移) | 先取得并比较实际远端内容;人工选择 merge/adopt/reject。merge/adopt 都必须把接受内容落回 human-owned 权威源,并把 `previousPublicBaseline` 更新为接受状态的精确 repo/ref/commit 后重新 online production prepare;reject 停止调查,禁止改 `mode: none` 绕过 |
|
|
81
90
|
| GATE_FAILED (`npm-entry-closure`) | 修复打包内容或入口声明后重新 prepare;不得用 `requiredPublicFiles`/`smokeBin` 缺省绕过 |
|
|
91
|
+
| GATE_FAILED(发布范围依赖闭包不完整) | 按详情补齐 `publicSourceAuthorityReceipt` 声明涉及的 coordinator 和全部 subjects,再重新 prepare;不得自动扩选或忽略收据 |
|
|
82
92
|
| GATE_FAILED (其他) | 修复门失败原因后重试;以 CLI exit code 为准 |
|
|
83
93
|
| RELEASE_DOCS_STALE | 文档相对说明源已陈旧;按详情运行只读演练,展示文件/语种/版本/摘要,经用户授权“本地发布文档写入”后执行写入,审阅提交再重新 prepare |
|
|
84
94
|
| RELEASE_DOCS_INVALID / TRANSLATION_MISSING / CONFLICT / REFRESH_STALE | 修复配置/说明源/目标或重新演练取得新 `refreshDigest`;不得扩大写入范围绕过 |
|
|
85
95
|
| SECRET_DETECTED | 移除密钥并更新 allowlist |
|
|
86
|
-
| CONFIG_INVALID | 检查 version.source
|
|
96
|
+
| CONFIG_INVALID | 检查 version.source、package.json,以及 `--unit` 是否为空、重复或不在 `releaseUnits[]` 中 |
|
|
87
97
|
|
|
88
98
|
重试时只保留最新结构化错误码和失败门,不沿用早期猜测;重跑确定性命令获得新证据。
|
|
89
99
|
|
|
@@ -21,16 +21,23 @@ description: "从已批准的生产计划发布冻结 Git branch/tag、npm tarba
|
|
|
21
21
|
|
|
22
22
|
## 前置条件:工作流选择
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
24
|
+
调用方持有合法、未过期且绑定当前 production plan 的 approval record 时,
|
|
25
|
+
`release-publish` 直接执行自身的计划、批准、冻结制品身份和远端预检。`route` 只提供
|
|
26
|
+
工作流建议,不是已批准 production plan 的授权门。
|
|
27
|
+
|
|
28
|
+
尚未形成计划时,可以先使用 `release-skill route --root <path> --json` 确定变更类型。
|
|
29
|
+
已知目标版本时一并传入 `--target-version <version>`,使恢复建议只读取与该目标绑定的
|
|
30
|
+
完整运行血缘。未传目标时,route 仍按 diff/baseline 选择工作流;历史 diagnostics 只作
|
|
31
|
+
报告,不得覆盖当前建议。
|
|
32
|
+
|
|
33
|
+
根据推荐的 `workflowKind` 选择对应路径:
|
|
34
|
+
|
|
35
|
+
- `docs-only` → 先执行 `release-docs` 完整流程
|
|
36
|
+
- `config-only` → 先执行 `release-config`,仅在 public surface 变化时进入 publish
|
|
37
|
+
- `marketplace-only` → 先执行 `release-marketplace`,然后由 workspace exclusive skill 接管
|
|
38
|
+
- `full-happy-end` → 直接进入标准完整流程:`prepare → approve → publish → verify`
|
|
39
|
+
- `reconcile` → 先执行 `release-reconcile` 恢复 PARTIAL 状态
|
|
40
|
+
- `help` → 无变更,无需 publish
|
|
34
41
|
|
|
35
42
|
**注意**: `release-publish` 是标准工作流中的第⑦步,必须在以下步骤之后:
|
|
36
43
|
- 步骤⑤: `release-prepare` (或轻量级 prepare)
|
|
@@ -29,6 +29,8 @@ verify 只接受 `PUBLISHED` 状态的源 run;`VERIFIED` 是终态,不会再
|
|
|
29
29
|
|
|
30
30
|
验证远端所有自动化 action 的实际状态与冻结计划一致。执行精确 `<package>@<version>` npm 安装到隔离目录,验证包名、版本、静态入口闭包,并在配置时验证 bin 路径安全和 CLI 烟雾输出。对 Claude/Codex marketplace distribution 执行全新隔离消费者安装验证。新计划中的 Kimi/CodeBuddy 安装只返回 `manualFollowUps`,明确标记 `verifiedBySystem: false`,不阻塞 `VERIFIED`;缺少该策略字段的旧冻结计划继续走历史 attestation 兼容路径。
|
|
31
31
|
|
|
32
|
+
0.9.3 的稳定隔离安装树记录只消费宿主命令退出后的隔离树观察:宿主附加 link 记录自身但不跟随,声明载荷 symlink 失败关闭,legacy 全树语义保持不变。该观察属于安装树事实,不替代远端状态、发布计划或 `VERIFIED` 判断。
|
|
33
|
+
|
|
32
34
|
**attestation 证明力边界**: `attest` 命令记录的旧计划兼容人工证明(`humanConfirmed: true` → `PASSED_MANUAL`)是本地自声明收据,不是签名见证:`--actor` 仅做非空字符串校验,无外部签名或身份核验,任何能运行 CLI 的进程都能自称任意 actor;伪造收据需写 `.release-skill` authority 目录,与直接改写收据文件属同一信任边界。因此旧兼容路径的人工证明只用于旧冻结计划收尾,不构成独立可审计的人工见证。新计划的 Kimi/CodeBuddy 安装一律走 `manualFollowUps`(`verifiedBySystem: false`),不参与 `VERIFIED` 终态判定。
|
|
33
35
|
|
|
34
36
|
**阶段通过规则**: 只有 CLI exit code 0 和结构化状态码 `VERIFIED` 才是完整终态。
|
|
@@ -46,7 +46,7 @@ prepare 的真实输出是 plan 内的 `workflowDecision`。
|
|
|
46
46
|
|
|
47
47
|
## 正向执行路径
|
|
48
48
|
|
|
49
|
-
1. 运行 `release-skill route --root <path> --json` 获取 diff
|
|
49
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类;已知目标版本时显式传入,route 只是工作流建议
|
|
50
50
|
2. 若推荐 `workflowKind === 'config-only'`,则使用本技能
|
|
51
51
|
3. 执行步骤②:运行 `release-skill assess --root <path> --offline --json` 进行 schema validation
|
|
52
52
|
4. 执行步骤③:运行 `release-skill prepare --offline --workflow config --target-version <ver> --json`
|
|
@@ -61,8 +61,10 @@ prepare 的真实输出是 plan 内的 `workflowDecision`。
|
|
|
61
61
|
## 确定性脚本调用
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
# Step 1: Diff classification confirmation (config-only)
|
|
64
|
+
# Step 1: Diff classification confirmation (config-only; pass the known target)
|
|
65
65
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
66
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
67
|
+
--root <path> --target-version <version> --json
|
|
66
68
|
|
|
67
69
|
# Step 2: Assess with schema validation
|
|
68
70
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offline --json
|
|
@@ -96,7 +98,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" verify \
|
|
|
96
98
|
| prepare 检测到基线漂移 | BASELINE_DRIFT_DETECTED | 人工审查 drift 后决定是否继续或回滚 |
|
|
97
99
|
| workflowDecision 不可判定(无对比 plan) | indeterminable | fail-safe 到 publish-needed,走场景 B |
|
|
98
100
|
| approval expired | APPROVAL_EXPIRED | 重新执行 approve,digest 必须匹配 |
|
|
99
|
-
| remote conflict at publish | REMOTE_CONFLICT |
|
|
101
|
+
| remote conflict at publish | REMOTE_CONFLICT | 人工决策;不得 force override 或覆盖远端状态 |
|
|
100
102
|
|
|
101
103
|
## 决策树 (Step 4)
|
|
102
104
|
|
|
@@ -36,7 +36,7 @@ plan 记录 `workflowKind: 'docs'` 与 `workflowDecision`(绑定进 plan diges
|
|
|
36
36
|
|
|
37
37
|
## 正向执行路径
|
|
38
38
|
|
|
39
|
-
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff
|
|
39
|
+
1. 运行 `release-skill route --root <path> [--target-version <ver>] --json` 获取 diff 分类和工作流建议;已知目标版本时显式传入,route 不承担发布授权
|
|
40
40
|
2. 若推荐 `workflowKind === 'docs-only'`,则使用本技能
|
|
41
41
|
3. 执行步骤②:调用 `check-style.mjs <doc-path>...` 执行事实/可读性/风格检查
|
|
42
42
|
4. 执行步骤③:调用 `render-public-site.mjs --check [--repo <name>]` 验证渲染无漂移
|
|
@@ -49,8 +49,10 @@ plan 记录 `workflowKind: 'docs'` 与 `workflowDecision`(绑定进 plan diges
|
|
|
49
49
|
## 确定性脚本调用
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
# Step 1: Diff classification (from release-skill route)
|
|
52
|
+
# Step 1: Diff classification (from release-skill route; pass the known target)
|
|
53
53
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
54
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route \
|
|
55
|
+
--root <path> --target-version <version> --json
|
|
54
56
|
|
|
55
57
|
# Step 2: Style-guard three gates (check-style.mjs takes file paths only)
|
|
56
58
|
node "${WORKBUDDY_ROOT}/adapters/workbuddy/skills/skill-family-docs-style-guard/scripts/check-style.mjs" \
|
|
@@ -21,6 +21,7 @@ description: 发布达到 VERIFIED 后处理可选的本地收尾:按发布分
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
24
|
+
--root <project-root> \
|
|
24
25
|
--plan <plan-path> \
|
|
25
26
|
--run <verified-run-path> \
|
|
26
27
|
--json
|
|
@@ -42,6 +43,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
42
43
|
|
|
43
44
|
```bash
|
|
44
45
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
46
|
+
--root <project-root> \
|
|
45
47
|
--plan <plan-path> \
|
|
46
48
|
--run <verified-run-path> \
|
|
47
49
|
--update-local-hosts \
|
|
@@ -17,6 +17,16 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
17
17
|
- 只读诊断:运行 dry-run 检查,不修改任何文件
|
|
18
18
|
- 故障引导:根据错误码指向对应的修复 Skill
|
|
19
19
|
|
|
20
|
+
## 0.9.4 候选边界
|
|
21
|
+
|
|
22
|
+
当前源码候选允许多发布单元项目在计划冻结前显式选择本轮范围。`prepare` 和新建的 `ship` 状态支持重复传入 `--unit <id>`;未传时继续选择全部配置单元。成功选择会列出选中与延期单元。延期单元不进入本轮计划,也不获得发布状态。
|
|
23
|
+
|
|
24
|
+
选择只影响按单元绑定的检查与动作。完整配置、生成物新鲜度和顶层 Hook 仍覆盖整个项目。`publicSourceAuthorityReceipt` 涉及的 coordinator 和 subjects 必须作为完整闭包共同选择,系统不会自动扩选。计划冻结后,`plan.units` 是唯一范围权威;publish、reconcile、verify 和 distribute 不接受 `--unit`。
|
|
25
|
+
|
|
26
|
+
0.9.3 引入的四项工作流保护、Hook cache v2 和稳定隔离安装树记录在 0.9.4 继续保留。0.9.4 精确消费 Foundation 0.16.0 的公开包根 API。Hook cache 只复用绝对路径或经真实 cwd 校验的 cwd-relative executable identity;裸 PATH、PATHEXT、Windows 和观察不可用时,Hook 仍冷执行,缓存复用失败关闭且不写入 v2 cache。缓存没有 TTL。
|
|
27
|
+
|
|
28
|
+
稳定隔离安装树记录只在宿主命令退出、目录已隔离且扫描期间没有并发写入时执行;宿主附加链接只记录、不跟随,声明载荷中的 symlink 失败关闭,legacy 全树语义保持不变。0.9.4 仍是源码候选,不能从本说明推断已批准、发布或验证。
|
|
29
|
+
|
|
20
30
|
**阶段通过规则**: `status` 与 `readiness.localPreparation.status` 只判断本地 help/assess/prepare;其充要条件是 `READY` 且 exit code 为 0。`missingRequired` 列出缺失的 Node/Git。生产发布必须另外读取 `readiness.productionPublish`:缺少 npm/gh 时为 `NOT_READY`,依赖存在时仍是 `AUTH_CHECK_REQUIRED`,因为 help 不访问网络、不验证认证。Agent 无权把本地就绪解释为生产就绪。
|
|
21
31
|
|
|
22
32
|
**边界**: help 不修改文件系统、不执行外部写操作、不生成发布计划。优先探测 PATH 上的全局安装命令 `release-skill`,不可用时回退到源码路径。每个 unit 必须配置 `previousPublicBaseline`:首次发布且确认无前序版本用 none,已有版本用 bound + repo/ref/commit;none 不是绕过 publish 唯一性预检的开关。v0.1.1 已完成 GitHub/npm 真实生产发布、冻结 Git ref 的 Claude/Codex 消费者安装、精确 npm 安装 smoke 与最终 VERIFIED;生产等价本地协议套件继续覆盖 fake gh/npm/Claude/Codex 和本地 bare Git。测试未做 OS 级禁网,且一次成功发布不能证明其他项目的认证、权限、限流或最终一致性行为;每个项目的首次生产发布仍应作为受监控 canary。
|
|
@@ -26,7 +36,7 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
26
36
|
1. 使用插件根相对路径运行 CLI:`node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" help --json`
|
|
27
37
|
2. 检查 `readiness.localPreparation`;需要生产发布时再检查 `readiness.productionPublish`
|
|
28
38
|
3. 若环境就绪且缺少 `.release-skill/project.yaml`,先路由 `release-setup`;配置已存在才运行 `release-assess`
|
|
29
|
-
4.
|
|
39
|
+
4. 默认在审阅本地计划和快照后停止;只有用户明确要求且完成摘要审批时才进入 `release-publish`。已持有合法批准的 production plan 时,publish 自行完成权威校验,不把 route 当作授权门
|
|
30
40
|
|
|
31
41
|
## 确定性脚本调用
|
|
32
42
|
|
|
@@ -38,6 +48,9 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offlin
|
|
|
38
48
|
# 日常发布快速路径:发布前确认可读计划摘要,状态文件可恢复。
|
|
39
49
|
# 受限 postPublish hook 的 checkpoint 批准与计划批准分开。
|
|
40
50
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> --target-version <version> --json
|
|
51
|
+
# 多发布单元项目显式选择本轮范围;未传 --unit 时仍为全部单元
|
|
52
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> \
|
|
53
|
+
--target-version <version> --unit <unit-a> --unit <unit-b> --json
|
|
41
54
|
# 开发阶段执行声明 hooks 并生成 prepare 可复用的内容绑定收据
|
|
42
55
|
# 配置时刻即授权(FM-16 处置 A):hook 是任意本地进程、无隔离、触发前无确认点,
|
|
43
56
|
# 命令调用本身即授权执行配置中的 hooks
|
|
@@ -76,7 +89,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
|
76
89
|
| CLI 入口不存在 | 确认 `${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs` 存在;不存在时重新安装插件 |
|
|
77
90
|
| 项目配置不存在 | 路由 `release-setup`,默认只读;不得直接生成或覆盖 README/配置 |
|
|
78
91
|
| assess 失败 | 运行 `node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" assess --offline --json` 获取详情 |
|
|
79
|
-
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound
|
|
92
|
+
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound 基线;人工审阅后直接调用 `release-publish`,由 publish 自行完成计划、approval、digest、远端冲突和 `PARTIAL` 校验 |
|
|
80
93
|
| RELEASE_DOCS_INVALID | 配置或说明源语义非法(重复键、alias、未知字段、版本漂移等);修正配置或说明源后重新演练 |
|
|
81
94
|
| RELEASE_DOCS_TRANSLATION_MISSING | 配置语种缺失或多余;补齐说明源语种,与 `releaseDocuments.locales` 完全一致,不得回退 |
|
|
82
95
|
|
|
@@ -85,8 +98,10 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
|
85
98
|
对于不清楚如何开始的用户,推荐使用 `release-skill route` 命令进行自动化工作流选择:
|
|
86
99
|
|
|
87
100
|
```bash
|
|
88
|
-
#
|
|
101
|
+
# 快速分类变更并推荐工作流;已知目标版本时显式传入,未知时省略
|
|
89
102
|
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --json
|
|
103
|
+
node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> \
|
|
104
|
+
--target-version <version> --json
|
|
90
105
|
|
|
91
106
|
# JSON 输出包含 classification 和 recommendation 字段
|
|
92
107
|
{
|