release-skill 0.8.1 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +63 -0
  7. package/INSTALL.md +27 -2
  8. package/INSTALL.zh-CN.md +19 -2
  9. package/README.md +41 -22
  10. package/README.zh-CN.md +34 -20
  11. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/consumer-contract-vectors.json +110 -0
  14. package/adapters/claude/bin/error-codes.json +8 -1
  15. package/adapters/claude/bin/foundation-resource-binding.json +1 -1
  16. package/adapters/claude/bin/registry.json +1 -1
  17. package/adapters/claude/bin/release-skill-local-finish.mjs +4 -0
  18. package/adapters/claude/bin/release-skill.bundle.mjs +3955 -2431
  19. package/adapters/claude/bin/rules.json +1 -1
  20. package/adapters/claude/bin/schemas/consumer-contract-vector.schema.json +149 -0
  21. package/adapters/claude/schemas/release-plan.schema.json +40 -3
  22. package/adapters/claude/skills/release-finish/SKILL.md +65 -0
  23. package/adapters/claude/skills/release-help/SKILL.md +3 -2
  24. package/adapters/claude/skills/release-prepare/SKILL.md +2 -2
  25. package/adapters/claude/skills/release-publish/SKILL.md +3 -1
  26. package/adapters/claude/skills/release-verify/SKILL.md +6 -1
  27. package/adapters/claude/src/schemas/migration-manifest.schema.json +271 -7
  28. package/adapters/claude/src/schemas/profile-adoption-declaration.schema.json +8 -0
  29. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  30. package/adapters/codex/bin/consumer-contract-vectors.json +110 -0
  31. package/adapters/codex/bin/error-codes.json +8 -1
  32. package/adapters/codex/bin/foundation-resource-binding.json +1 -1
  33. package/adapters/codex/bin/registry.json +1 -1
  34. package/adapters/codex/bin/release-skill-local-finish.mjs +4 -0
  35. package/adapters/codex/bin/release-skill.bundle.mjs +3955 -2431
  36. package/adapters/codex/bin/rules.json +1 -1
  37. package/adapters/codex/bin/schemas/consumer-contract-vector.schema.json +149 -0
  38. package/adapters/codex/schemas/release-plan.schema.json +40 -3
  39. package/adapters/codex/skills/release-finish/SKILL.md +72 -0
  40. package/adapters/codex/skills/release-help/SKILL.md +3 -2
  41. package/adapters/codex/skills/release-prepare/SKILL.md +2 -2
  42. package/adapters/codex/skills/release-publish/SKILL.md +3 -1
  43. package/adapters/codex/skills/release-verify/SKILL.md +6 -1
  44. package/adapters/codex/src/schemas/migration-manifest.schema.json +271 -7
  45. package/adapters/codex/src/schemas/profile-adoption-declaration.schema.json +8 -0
  46. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  47. package/adapters/kimi/bin/consumer-contract-vectors.json +110 -0
  48. package/adapters/kimi/bin/error-codes.json +8 -1
  49. package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
  50. package/adapters/kimi/bin/registry.json +1 -1
  51. package/adapters/kimi/bin/release-skill-local-finish.mjs +4 -0
  52. package/adapters/kimi/bin/release-skill.bundle.mjs +3955 -2431
  53. package/adapters/kimi/bin/rules.json +1 -1
  54. package/adapters/kimi/bin/schemas/consumer-contract-vector.schema.json +149 -0
  55. package/adapters/kimi/schemas/release-plan.schema.json +40 -3
  56. package/adapters/kimi/skills/release-finish/SKILL.md +72 -0
  57. package/adapters/kimi/skills/release-help/SKILL.md +3 -2
  58. package/adapters/kimi/skills/release-prepare/SKILL.md +2 -2
  59. package/adapters/kimi/skills/release-publish/SKILL.md +3 -1
  60. package/adapters/kimi/skills/release-verify/SKILL.md +6 -1
  61. package/adapters/kimi/src/schemas/migration-manifest.schema.json +271 -7
  62. package/adapters/kimi/src/schemas/profile-adoption-declaration.schema.json +8 -0
  63. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  64. package/adapters/workbuddy/bin/consumer-contract-vectors.json +110 -0
  65. package/adapters/workbuddy/bin/error-codes.json +8 -1
  66. package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
  67. package/adapters/workbuddy/bin/registry.json +1 -1
  68. package/adapters/workbuddy/bin/release-skill-local-finish.mjs +4 -0
  69. package/adapters/workbuddy/bin/release-skill.bundle.mjs +3955 -2431
  70. package/adapters/workbuddy/bin/rules.json +1 -1
  71. package/adapters/workbuddy/bin/schemas/consumer-contract-vector.schema.json +149 -0
  72. package/adapters/workbuddy/schemas/release-plan.schema.json +40 -3
  73. package/adapters/workbuddy/skills/release-finish/SKILL.md +65 -0
  74. package/adapters/workbuddy/skills/release-help/SKILL.md +3 -2
  75. package/adapters/workbuddy/skills/release-prepare/SKILL.md +2 -2
  76. package/adapters/workbuddy/skills/release-publish/SKILL.md +3 -1
  77. package/adapters/workbuddy/skills/release-verify/SKILL.md +6 -1
  78. package/adapters/workbuddy/src/schemas/migration-manifest.schema.json +271 -7
  79. package/adapters/workbuddy/src/schemas/profile-adoption-declaration.schema.json +8 -0
  80. package/bin/consumer-contract-vectors.json +110 -0
  81. package/bin/error-codes.json +8 -1
  82. package/bin/foundation-resource-binding.json +1 -1
  83. package/bin/registry.json +1 -1
  84. package/bin/release-skill-cli.mjs +163 -2
  85. package/bin/release-skill-local-finish.mjs +4 -0
  86. package/bin/release-skill.bundle.mjs +3955 -2431
  87. package/bin/rules.json +1 -1
  88. package/bin/schemas/consumer-contract-vector.schema.json +149 -0
  89. package/package.json +4 -4
  90. package/platform-manifest.json +31 -5
  91. package/schemas/release-plan.schema.json +40 -3
  92. package/skills/release-finish/SKILL.md +65 -0
  93. package/skills/release-help/SKILL.md +3 -2
  94. package/skills/release-prepare/SKILL.md +2 -2
  95. package/skills/release-publish/SKILL.md +3 -1
  96. package/skills/release-verify/SKILL.md +6 -1
  97. package/skills-src/release-finish/SKILL.md +65 -0
  98. package/skills-src/release-help/SKILL.md +3 -2
  99. package/skills-src/release-prepare/SKILL.md +2 -2
  100. package/skills-src/release-publish/SKILL.md +3 -1
  101. package/skills-src/release-verify/SKILL.md +6 -1
  102. package/src/commands/approve.mjs +14 -2
  103. package/src/commands/distribute.mjs +562 -321
  104. package/src/commands/post-release-local.mjs +802 -0
  105. package/src/commands/postverify.mjs +262 -155
  106. package/src/commands/prepare.mjs +106 -56
  107. package/src/commands/publish.mjs +11 -10
  108. package/src/commands/reconcile.mjs +11 -10
  109. package/src/commands/setup.mjs +26 -13
  110. package/src/commands/ship.mjs +169 -28
  111. package/src/commands/verify.mjs +19 -8
  112. package/src/core/adoption-assessment.mjs +0 -3
  113. package/src/core/approval.mjs +11 -8
  114. package/src/core/derived-artifact-gates.mjs +32 -5
  115. package/src/core/hooks.mjs +0 -16
  116. package/src/core/plan.mjs +19 -11
  117. package/src/core/postpublish-approval.mjs +12 -2
  118. package/src/core/postpublish-bundle.mjs +51 -13
  119. package/src/core/postpublish.mjs +146 -6
  120. package/src/core/preset-executor.mjs +53 -0
  121. package/src/core/proposal-inbox.mjs +91 -27
  122. package/src/core/recovery.mjs +27 -12
  123. package/src/producers/build-adapters.mjs +10 -1
  124. package/src/producers/foundation-resource-projection.mjs +16 -3
  125. package/src/schemas/migration-manifest.schema.json +271 -7
  126. package/src/schemas/profile-adoption-declaration.schema.json +8 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "kind": "skill-family.contracts.rules",
4
- "contractsVersion": "1.13.0",
4
+ "contractsVersion": "1.14.0",
5
5
  "budget": {
6
6
  "firstVersionMax": 20,
7
7
  "absoluteMax": 30,
@@ -0,0 +1,149 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://contracts.skill-family.example/v1/consumer-contract-vector.json",
4
+ "title": "ConsumerContractVector",
5
+ "description": "A public, version-bound input and expected-observation vector for a Foundation consumer contract.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["schemaVersion", "kind", "vectorId", "vectorSetId", "capabilityId", "foundationVersion", "contractId", "caseClass", "strategy", "request", "expected"],
9
+ "properties": {
10
+ "schemaVersion": { "const": 1 },
11
+ "kind": { "const": "skill-family.consumer-contract-vector" },
12
+ "vectorId": { "type": "string", "minLength": 1 },
13
+ "vectorSetId": { "type": "string", "minLength": 1 },
14
+ "capabilityId": { "type": "string", "minLength": 1 },
15
+ "foundationVersion": { "type": "string", "pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+$" },
16
+ "contractId": { "type": "string", "minLength": 1 },
17
+ "caseClass": { "enum": ["positive", "negative", "indeterminate"] },
18
+ "strategy": { "enum": ["real-pure", "official-fake"] },
19
+ "request": { "type": "object" },
20
+ "expected": {
21
+ "oneOf": [
22
+ {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "required": ["outcome", "valueRelation"],
26
+ "properties": {
27
+ "outcome": { "const": "return" },
28
+ "valueRelation": { "const": "atomic-write-contained-absolute-target" }
29
+ }
30
+ },
31
+ {
32
+ "type": "object",
33
+ "additionalProperties": false,
34
+ "required": ["outcome", "value"],
35
+ "properties": {
36
+ "outcome": { "const": "return" },
37
+ "value": {}
38
+ }
39
+ },
40
+ {
41
+ "type": "object",
42
+ "additionalProperties": false,
43
+ "required": ["outcome", "errorCode"],
44
+ "properties": {
45
+ "outcome": { "const": "throw" },
46
+ "errorCode": { "type": "string", "pattern": "^SFC[0-9]{4}$" }
47
+ }
48
+ },
49
+ {
50
+ "type": "object",
51
+ "additionalProperties": false,
52
+ "required": ["outcome", "errorCode", "errorKind"],
53
+ "properties": {
54
+ "outcome": { "const": "throw" },
55
+ "errorCode": { "type": "string", "pattern": "^SFC[0-9]{4}$" },
56
+ "errorKind": { "const": "path-traversal" }
57
+ }
58
+ },
59
+ {
60
+ "type": "object",
61
+ "additionalProperties": false,
62
+ "required": ["outcome", "allowedStates", "failClosed"],
63
+ "properties": {
64
+ "outcome": { "const": "indeterminate" },
65
+ "allowedStates": {
66
+ "type": "array",
67
+ "minItems": 1,
68
+ "items": { "enum": ["return", "throw", "indeterminate"] },
69
+ "uniqueItems": true
70
+ },
71
+ "failClosed": { "const": true }
72
+ }
73
+ }
74
+ ]
75
+ }
76
+ },
77
+ "allOf": [
78
+ {
79
+ "if": {
80
+ "properties": { "capabilityId": { "const": "foundation.harness.atomic-write" } },
81
+ "required": ["capabilityId"]
82
+ },
83
+ "then": {
84
+ "properties": {
85
+ "request": {
86
+ "type": "object",
87
+ "required": ["root"],
88
+ "properties": { "root": { "$ref": "#/$defs/atomicRoot" } }
89
+ }
90
+ }
91
+ },
92
+ "else": {
93
+ "properties": {
94
+ "request": {
95
+ "type": "object",
96
+ "properties": {
97
+ "root": {
98
+ "not": {
99
+ "type": "object",
100
+ "required": ["runtimeBinding"],
101
+ "properties": { "runtimeBinding": { "const": "atomic-write-canonical-root" } }
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ },
109
+ {
110
+ "if": {
111
+ "properties": {
112
+ "capabilityId": { "const": "foundation.harness.atomic-write" },
113
+ "caseClass": { "const": "negative" }
114
+ },
115
+ "required": ["capabilityId", "caseClass"]
116
+ },
117
+ "then": {
118
+ "properties": {
119
+ "expected": {
120
+ "type": "object",
121
+ "required": ["errorKind"],
122
+ "properties": { "errorKind": { "const": "path-traversal" } }
123
+ }
124
+ }
125
+ },
126
+ "else": {
127
+ "properties": {
128
+ "expected": {
129
+ "type": "object",
130
+ "not": {
131
+ "required": ["errorKind"],
132
+ "properties": { "errorKind": true }
133
+ }
134
+ }
135
+ }
136
+ }
137
+ }
138
+ ],
139
+ "$defs": {
140
+ "atomicRoot": {
141
+ "type": "object",
142
+ "additionalProperties": false,
143
+ "required": ["runtimeBinding"],
144
+ "properties": {
145
+ "runtimeBinding": { "const": "atomic-write-canonical-root" }
146
+ }
147
+ }
148
+ }
149
+ }
@@ -17,9 +17,10 @@
17
17
  "type": "integer",
18
18
  "enum": [
19
19
  1,
20
- 2
20
+ 2,
21
+ 3
21
22
  ],
22
- "description": "Plan format and digest-scoping version. 1: legacy (every field except the top-level digest binds; commitTimestamp must equal createdAt). 2: T1.2 digest layering (record-layer fields status/createdAt/baseline/per-action status are excluded from the plan digest; commitTimestamp is derived from the HEAD commit committer date)."
23
+ "description": "Plan format and digest-scoping version. 1: legacy (every field except the top-level digest binds; commitTimestamp must equal createdAt). 2: T1.2 digest layering (record-layer fields status/createdAt/baseline/per-action status are excluded from the plan digest; commitTimestamp is derived from the HEAD commit committer date). 3: multi-release-unit postPublish v3 (postPublish is a declaration ARRAY, one entry per declaring unit in plan.units order, possibly empty; v3 inherits the v2 record-layer semantics and only changes the postPublish shape)."
23
24
  },
24
25
  "status": {
25
26
  "type": "string",
@@ -1121,7 +1122,11 @@
1121
1122
  }
1122
1123
  },
1123
1124
  "postPublish": {
1124
- "$ref": "#/definitions/planPostPublish"
1125
+ "type": [
1126
+ "object",
1127
+ "array"
1128
+ ],
1129
+ "description": "Frozen post-release distribution block. planVersion 1/2: a single declaration object, or absent (normalized to the empty array view at runtime). planVersion 3: a declaration ARRAY, one entry per declaring unit in plan.units order, possibly empty — never a single object, never absent. The exact allowed shape is enforced conditionally on planVersion (root allOf); readers must never guess the shape from the field value."
1125
1130
  },
1126
1131
  "digest": {
1127
1132
  "type": "string",
@@ -1844,6 +1849,38 @@
1844
1849
  }
1845
1850
  },
1846
1851
  "allOf": [
1852
+ {
1853
+ "if": {
1854
+ "properties": {
1855
+ "planVersion": {
1856
+ "const": 3
1857
+ }
1858
+ },
1859
+ "required": [
1860
+ "planVersion"
1861
+ ]
1862
+ },
1863
+ "then": {
1864
+ "properties": {
1865
+ "postPublish": {
1866
+ "type": "array",
1867
+ "items": {
1868
+ "$ref": "#/definitions/planPostPublish"
1869
+ }
1870
+ }
1871
+ },
1872
+ "required": [
1873
+ "postPublish"
1874
+ ]
1875
+ },
1876
+ "else": {
1877
+ "properties": {
1878
+ "postPublish": {
1879
+ "$ref": "#/definitions/planPostPublish"
1880
+ }
1881
+ }
1882
+ }
1883
+ },
1847
1884
  {
1848
1885
  "if": {
1849
1886
  "properties": {
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: release-finish
3
+ description: 发布达到 VERIFIED 后处理可选的本地收尾:按发布分支策略决定是否询问合并,并在用户确认后更新本机 Claude、Codex、Kimi、CodeBuddy/WorkBuddy 插件
4
+ ---
5
+
6
+ > **Codex 安装入口解析协议**:在调用 CLI 前,Agent 必须从宿主当前已加载技能的元数据中取得本 `SKILL.md` 的实际绝对路径,并将该字面量记为 `SKILL_FILE`。
7
+ > `SKILL_FILE` 不是环境变量;禁止从工作目录、可执行搜索路径、源码仓库或 shell 调用上下文猜测。若宿主未提供该绝对路径,立即停止并报告安装定位失败。
8
+ > 对 `SKILL_FILE` 执行 `realpath`,取其目录向上两级得到 `PLUGIN_ROOT`;校验真实技能路径匹配 `PLUGIN_ROOT/skills/*/SKILL.md` 且仍位于插件根内(路径包含检查)。
9
+ > 令 `RELEASE_SKILL_LOCAL_FINISH_ENTRY=PLUGIN_ROOT/bin/release-skill-local-finish.mjs`,对入口执行 `realpath` containment、`lstat` 非符号链接且为普通文件校验。
10
+ > 每一次 shell 工具调用都必须在同一个调用中用上述已验证绝对值设置 `RELEASE_SKILL_LOCAL_FINISH_ENTRY`,然后执行 `node "$RELEASE_SKILL_LOCAL_FINISH_ENTRY" ...`;不得依赖前一次 shell 的变量。
11
+ >
12
+
13
+ # release-finish
14
+
15
+ ## 触发
16
+
17
+ 发布刚达到 `VERIFIED`(已完成发布后验证),或用户要求处理发布后的分支合并、本机宿主插件更新。
18
+
19
+ ## 边界
20
+
21
+ 这是发布后的独立收尾,不属于 `prepare → approve → publish → verify` 状态机。它不能把本机更新结果写成新的发布状态,也不能因为本机更新失败而降低 `VERIFIED`。
22
+
23
+ 默认只读取冻结计划和 verify run。没有用户明确同意,不合并分支,不更新插件,不接受 Kimi 的安装信任提示。
24
+
25
+ ## 先生成收尾清单
26
+
27
+ 从插件根执行:
28
+
29
+ ```bash
30
+ node "$RELEASE_SKILL_LOCAL_FINISH_ENTRY" \
31
+ --plan <plan-path> \
32
+ --run <verified-run-path> \
33
+ --json
34
+ ```
35
+
36
+ 脚本只接受状态为 `VERIFIED`、且 `planDigest` 与冻结计划一致的 verify run。
37
+
38
+ ## 主动询问
39
+
40
+ 读取返回的 `merge` 和 `localHostUpdate`:
41
+
42
+ 1. `merge.promptRequired=false` 时,发布工作流已经推进或初始化目标分支,不再询问合并。
43
+ 2. `merge.promptRequired=true` 时,向用户说明尚未覆盖的发布分支,并询问是否需要合并。用户同意后,先只读核对源分支、目标分支、工作区状态和项目既有合并方式,再用明确的分支名执行;本脚本不猜分支,也不自动推送。
44
+ 3. `localHostUpdate.promptRequired=true` 时,列出计划覆盖的宿主,询问是否更新本机插件。两个问题可以一次问完。
45
+
46
+ ## 用户同意更新本机宿主
47
+
48
+ 把用户选择的宿主和清单返回的精确 `planDigest` 传回脚本:
49
+
50
+ ```bash
51
+ node "$RELEASE_SKILL_LOCAL_FINISH_ENTRY" \
52
+ --plan <plan-path> \
53
+ --run <verified-run-path> \
54
+ --update-local-hosts \
55
+ --hosts claude,codex,kimi,codebuddy,workbuddy \
56
+ --confirm-plan <planDigest> \
57
+ --json
58
+ ```
59
+
60
+ 只传用户选择且计划声明的宿主。宿主 CLI 不存在时返回 `SKIPPED_NOT_INSTALLED`。各宿主按以下规则处理:
61
+
62
+ - Claude 先重新绑定冻结市场,再重新观察安装状态;旧插件若仍存在,才调用正式更新命令。Codex 继续按正式市场协议移除并安装冻结的 Git 引用。两者都在安装后核对插件、市场、版本和市场检出提交。
63
+ - Kimi 的精确当前安装会在返回 `ALREADY_CURRENT` 前核对真实载荷;发生安装或迁移时,只在操作完成后核对结果。包名、版本、发布标签、已安装修订号和受管安装根必须与冻结计划一致;`.git` 只提供附加诊断,不是通过条件。旧的本地路径安装会在同一个受控终端交互界面(TUI)会话中先移除,再按发布标签安装、确认信任并重新加载。
64
+ - CodeBuddy/WorkBuddy 只处理同一 bundled-family 插件和市场。只有冻结标签与计划声明的可变分支都从同一远端解析到冻结提交时,才调用正式市场更新和插件更新命令;完成后重新读取安装列表,并精确核对唯一条目的市场、版本和修订号。目标未安装、来源不符、远端不可访问或身份不一致时返回 `MANUAL_REQUIRED`,不修改宿主。
65
+
66
+ 任何宿主失败都保留其他宿主的实际结果,不回滚,也不把失败冒充成功。
67
+
68
+ 完成后报告每个宿主的状态,并提醒用户重启已更新的宿主。本机结果只记录收尾事实,不改变发布状态。
69
+
70
+ ## 临时归属
71
+
72
+ 本能力目前只服务发布后的本机收尾,因此保留在 release-skill。第二个技能族需要复用宿主更新或 TUI 驱动,或 Foundation 发布等价公共入口时,再把通用机制上收 Foundation并删除这里的通用部分。release-skill 只保留发布计划到宿主更新输入的领域映射。
@@ -19,7 +19,7 @@ description: "Discoverable entry point for release-skill: dependency and environ
19
19
  ## 职责
20
20
 
21
21
  - 依赖和环境检查:Node.js >= 22、Git 决定本地准备就绪度;npm/gh 另行决定生产依赖就绪度
22
- - 能力说明:缺少配置时走 `help → setup → assess`;已有配置的安全默认路径是 `help → assess → prepare --offline`;日常生产发布优先使用可恢复的 `ship`,兼容的分阶段闭环仍是 `prepare --online --production → approve → publish → verify`
22
+ - 能力说明:缺少配置时走 `help → setup → assess`;已有配置的安全默认路径是 `help → assess → prepare --offline`;日常生产发布优先使用可恢复的 `ship`,兼容的分阶段闭环仍是 `prepare --online --production → approve → publish → verify`。冻结计划批准是正常发布级流程的唯一批准门;声明 `requiresApproval: true` 的 postPublish hook 仍须等待独立 checkpoint 批准
23
23
  - 最小示例:展示从 release-help 到 release-assess 的最短路径
24
24
  - 只读诊断:运行 dry-run 检查,不修改任何文件
25
25
  - 故障引导:根据错误码指向对应的修复 Skill
@@ -42,7 +42,8 @@ description: "Discoverable entry point for release-skill: dependency and environ
42
42
  node "$RELEASE_SKILL_ENTRY" help --json
43
43
  node "$RELEASE_SKILL_ENTRY" setup --root <path> --json
44
44
  node "$RELEASE_SKILL_ENTRY" assess --root <path> --offline --json
45
- # 日常发布快速路径:仅在发布前确认一次可读计划摘要,状态文件可恢复
45
+ # 日常发布快速路径:发布前确认可读计划摘要,状态文件可恢复。
46
+ # 受限 postPublish hook 的 checkpoint 批准与计划批准分开。
46
47
  node "$RELEASE_SKILL_ENTRY" ship --root <path> --target-version <version> --json
47
48
  # 开发阶段执行声明 hooks 并生成 prepare 可复用的内容绑定收据
48
49
  # 配置时刻即授权(FM-16 处置 A):hook 是任意本地进程、无隔离、触发前无确认点,
@@ -36,7 +36,7 @@ description: Freeze an immutable release plan with local configuration, document
36
36
  2. 配置含 `releaseDocuments` 时,先运行只读演练 `${CLI} docs refresh --unit <id> --json`;`status: "changes"` 时展示逐文件路径/语种/版本/`refreshDigest`,取得"本地发布文档写入"明确授权后才执行 `nextCommand.argv` 写入,审阅并提交刷新结果后再继续;`status: "clean"` 时直接进入 prepare
37
37
  3. 运行 `${CLI} prepare --root <path> --offline --json`
38
38
  4. 检查 exit code 0,读取 JSON 返回的 immutable `planPath=plans/<planDigest>.json`,再从该文件读取 `status`、`units`、`externalActions`
39
- 5. 向用户展示可读的 `approvalSummary`(版本、仓库/包、branch/tag、外部动作和例外);`planDigest` 仅作为内部绑定字段,不要求用户复制或确认。后续 approve/publish 只能使用该 immutable planPath,等待确认后再 approve
39
+ 5. 向用户展示可读的 `approvalSummary`:版本、公开仓库、分支策略、branch/tag、npm 与 GitHub Release 目标、全部外部动作、例外,以及需要独立 checkpoint 批准的 postPublish hook。`planDigest` 仅作为内部绑定字段,不要求用户复制或确认。后续 approve/publish 只能使用该 immutable planPath,等待确认后再 approve。计划批准不包含受限 postPublish hook 的 checkpoint 批准
40
40
 
41
41
  若用户明确要求 GitHub+npm 生产发布,加入 `--production`。该模式还会封存独立
42
42
  Git commit/tree 和 npm tarball,并把路径、SHA/integrity、branch/tag 写入计划。
@@ -96,4 +96,4 @@ node "$RELEASE_SKILL_ENTRY" prepare --root <path> --online --production --json
96
96
 
97
97
  ## 后续引导
98
98
 
99
- 计划冻结后,读取命令返回的 immutable `planPath` 和 `approvalSummary` 展示给用户,等待确认后再 approve。`planDigest` 由系统自动计算和绑定,不作为人工交互口令。`release-plan.json` 等 latest alias 只用于浏览,不得作为生产 authority 传递。
99
+ 计划冻结后,读取命令返回的 immutable `planPath` 和 `approvalSummary` 展示给用户,等待确认后再 approve。`planDigest` 由系统自动计算和绑定,不作为人工交互口令。`release-plan.json` 等 latest alias 只用于浏览,不得作为生产 authority 传递。冻结计划批准是正常发布级流程的唯一批准门;有效 `requiresApproval: true` 的 postPublish hook 仍须使用绑定 `(planDigest, hookId)` 且最长有效 24 小时的独立 checkpoint 批准。
@@ -51,10 +51,12 @@ description: "从已批准的生产计划发布冻结 Git branch/tag、npm tarba
51
51
 
52
52
  ## 授权门
53
53
 
54
- 1. 展示可读的 `approvalSummary`:版本、仓库/包名、branch/tag、全部 actions 和例外。
54
+ 1. 展示可读的 `approvalSummary`:版本、公开仓库、分支策略、branch/tag、npm 与 GitHub Release 目标、全部 actions、例外,以及需要独立 checkpoint 批准的 postPublish hook。
55
55
  2. 必须存在未过期且由系统绑定同一内部 digest 的 approval record;批准后不再要求用户复制摘要做二次确认。
56
56
  3. 只有 CLI exit code 0 且结构化状态为 `PUBLISHED` 才算外写阶段通过;随后必须运行 verify,只有 `VERIFIED` 才是完整终态。
57
57
 
58
+ 冻结计划批准是正常发布级流程的唯一批准门。它包含计划内的外部动作和验证门禁,不包含有效 `requiresApproval: true` 的 postPublish checkpoint。这类 hook 仍须使用绑定 `(planDigest, hookId)` 且最长有效 24 小时的独立批准记录。
59
+
58
60
  ## 确定性执行
59
61
 
60
62
  ```bash
@@ -49,7 +49,8 @@ verify 只接受 `PUBLISHED` 状态的源 run;`VERIFIED` 是终态,不会再
49
49
  1. 确认有 `--run` 路径(必需),且源 run 状态为 PUBLISHED
50
50
  2. 使用插件根相对路径运行 CLI;命令调用本身即授权执行已配置的 verification gate 和 smoke process
51
51
  3. 检查 exit code 和结构化状态:`VERIFIED`(全部通过)/ 失败(具体错误)
52
- 4. 只有 `VERIFIED` 才是 happy end
52
+ 4. 只有 `VERIFIED` 才是发布 happy end
53
+ 5. 达到 `VERIFIED` 后立即路由 `release-finish`:先生成只读收尾清单,再按清单主动询问分支合并和本机宿主插件更新;发布策略已包含分支动作时略过合并询问
53
54
 
54
55
  ## 确定性脚本调用
55
56
 
@@ -67,6 +68,10 @@ node "$RELEASE_SKILL_ENTRY" verify --root <path> --plan <plan-path> --run <run-p
67
68
  5. 对 Claude/Codex marketplace distribution 执行全新隔离消费者安装验证;收集 Kimi/CodeBuddy 的非阻塞 `manualFollowUps`
68
69
  6. 全部通过 → `VERIFIED`
69
70
 
71
+ ## 发布后收尾
72
+
73
+ `VERIFIED` 不代表要自动修改开发分支或本机宿主。进入 `release-finish` 后,只有用户明确同意,才执行对应的本地动作。本机插件更新失败不会改变发布终态。
74
+
70
75
  ## 烟雾测试
71
76
 
72
77
  - 在 `os.tmpdir()` 创建隔离目录