release-skill 0.1.3 → 0.1.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 +2 -2
- package/.codex-plugin/plugin.json +3 -3
- package/CHANGELOG.md +29 -0
- package/INSTALL.md +69 -32
- package/INSTALL.zh-CN.md +64 -26
- package/README.md +101 -37
- package/README.zh-CN.md +87 -28
- 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 +79284 -0
- package/adapters/claude/bin/release-skill.mjs +34 -0
- package/adapters/claude/native/safe-write/binding.gyp +40 -0
- package/adapters/claude/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
- package/adapters/claude/native/safe-write/prebuilds.json +24 -0
- package/adapters/claude/native/safe-write/src/safe_write.cc +2032 -0
- package/adapters/claude/schemas/.render-manifest.json +37 -0
- package/adapters/claude/schemas/approval-record.schema.json +115 -0
- package/adapters/claude/schemas/artifact-lock.schema.json +111 -0
- package/adapters/claude/schemas/artifact-plan.schema.json +52 -0
- package/adapters/claude/schemas/artifact-policy.schema.json +76 -0
- package/adapters/claude/schemas/evidence-event.schema.json +89 -0
- package/adapters/claude/schemas/release-plan.schema.json +860 -0
- package/adapters/claude/schemas/release-project.schema.json +736 -0
- package/adapters/claude/schemas/release-run.schema.json +342 -0
- package/adapters/claude/skills/release-assess/SKILL.md +5 -6
- package/adapters/claude/skills/release-help/SKILL.md +11 -18
- package/adapters/claude/skills/release-prepare/SKILL.md +6 -6
- package/adapters/claude/skills/release-publish/SKILL.md +1 -4
- package/adapters/claude/skills/release-reconcile/SKILL.md +5 -5
- package/adapters/claude/skills/release-setup/SKILL.md +64 -80
- package/adapters/claude/skills/release-verify/SKILL.md +4 -7
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +79284 -0
- package/adapters/codex/bin/release-skill.mjs +34 -0
- package/adapters/codex/native/safe-write/binding.gyp +40 -0
- package/adapters/codex/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
- package/adapters/codex/native/safe-write/prebuilds.json +24 -0
- package/adapters/codex/native/safe-write/src/safe_write.cc +2032 -0
- package/adapters/codex/schemas/.render-manifest.json +37 -0
- package/adapters/codex/schemas/approval-record.schema.json +115 -0
- package/adapters/codex/schemas/artifact-lock.schema.json +111 -0
- package/adapters/codex/schemas/artifact-plan.schema.json +52 -0
- package/adapters/codex/schemas/artifact-policy.schema.json +76 -0
- package/adapters/codex/schemas/evidence-event.schema.json +89 -0
- package/adapters/codex/schemas/release-plan.schema.json +860 -0
- package/adapters/codex/schemas/release-project.schema.json +736 -0
- package/adapters/codex/schemas/release-run.schema.json +342 -0
- package/adapters/codex/skills/release-assess/SKILL.md +12 -6
- package/adapters/codex/skills/release-help/SKILL.md +18 -18
- package/adapters/codex/skills/release-prepare/SKILL.md +13 -6
- package/adapters/codex/skills/release-publish/SKILL.md +8 -4
- package/adapters/codex/skills/release-reconcile/SKILL.md +12 -5
- package/adapters/codex/skills/release-setup/SKILL.md +71 -80
- package/adapters/codex/skills/release-verify/SKILL.md +11 -7
- package/bin/release-skill-cli.mjs +807 -0
- package/bin/release-skill.bundle.mjs +79284 -0
- package/bin/release-skill.mjs +23 -788
- package/package.json +6 -2
- package/references/02-project-config.md +2 -2
- package/schemas/release-plan.schema.json +7 -1
- package/schemas/release-project.schema.json +8 -0
- package/scripts/build-bundle.mjs +133 -0
- package/skills/release-assess/SKILL.md +5 -6
- package/skills/release-help/SKILL.md +11 -18
- package/skills/release-prepare/SKILL.md +6 -6
- package/skills/release-publish/SKILL.md +1 -4
- package/skills/release-reconcile/SKILL.md +5 -5
- package/skills/release-setup/SKILL.md +64 -80
- package/skills/release-verify/SKILL.md +4 -7
- package/skills-src/release-assess/SKILL.md +5 -6
- package/skills-src/release-help/SKILL.md +11 -18
- package/skills-src/release-prepare/SKILL.md +6 -6
- package/skills-src/release-publish/SKILL.md +1 -4
- package/skills-src/release-reconcile/SKILL.md +5 -5
- package/skills-src/release-setup/SKILL.md +64 -80
- package/skills-src/release-verify/SKILL.md +4 -7
- package/src/adapters/npm.mjs +5 -13
- package/src/adapters/plugin-marketplace.mjs +67 -31
- package/src/artifacts/policy.mjs +4 -7
- package/src/artifacts/safe-fs-backend-internal.mjs +69 -21
- package/src/commands/prepare.mjs +22 -1
- package/src/commands/publish.mjs +1 -0
- package/src/commands/setup.mjs +667 -28
- package/src/core/approval.mjs +4 -6
- package/src/core/config.mjs +8 -8
- package/src/core/pkg-root.mjs +22 -0
- package/src/core/plan.mjs +9 -4
- package/src/core/run.mjs +4 -4
- package/src/core/trusted-resource.mjs +96 -0
- package/src/docs/version-gate.mjs +164 -0
- package/src/producers/build-adapters.mjs +512 -55
- package/src/snapshot/frozen.mjs +133 -3
- package/src/snapshot/public-map.mjs +7 -4
- package/src/snapshot/scan.mjs +2 -1
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://release-skill.dev/schemas/release-run/v1",
|
|
4
|
+
"title": "Release Run",
|
|
5
|
+
"description": "Schema for a release run record capturing execution checkpoints",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"runId",
|
|
9
|
+
"command",
|
|
10
|
+
"planDigest",
|
|
11
|
+
"planPath",
|
|
12
|
+
"status",
|
|
13
|
+
"checkpoints"
|
|
14
|
+
],
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"runId": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"description": "Unique identifier for this run (UUID)"
|
|
21
|
+
},
|
|
22
|
+
"runDigest": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
25
|
+
"description": "SHA-256 digest of the final run state, excluding this field"
|
|
26
|
+
},
|
|
27
|
+
"stateSequence": {
|
|
28
|
+
"type": "integer",
|
|
29
|
+
"minimum": 0,
|
|
30
|
+
"description": "Monotonic sequence of an immutable in-flight run state snapshot"
|
|
31
|
+
},
|
|
32
|
+
"previousStateDigest": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
35
|
+
"description": "Digest of the immediately preceding stateSequence snapshot"
|
|
36
|
+
},
|
|
37
|
+
"status": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"enum": [
|
|
40
|
+
"PUBLISHING",
|
|
41
|
+
"PUBLISHED",
|
|
42
|
+
"VERIFIED",
|
|
43
|
+
"PARTIAL",
|
|
44
|
+
"BLOCKED"
|
|
45
|
+
],
|
|
46
|
+
"description": "Current status of the run"
|
|
47
|
+
},
|
|
48
|
+
"command": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"enum": [
|
|
51
|
+
"assess",
|
|
52
|
+
"prepare",
|
|
53
|
+
"publish",
|
|
54
|
+
"reconcile",
|
|
55
|
+
"verify"
|
|
56
|
+
],
|
|
57
|
+
"description": "The command that initiated this run"
|
|
58
|
+
},
|
|
59
|
+
"sourceRunId": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1,
|
|
62
|
+
"description": "Run ID of the source run (for reconcile runs)"
|
|
63
|
+
},
|
|
64
|
+
"sourceRunDigest": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
67
|
+
"description": "Digest of the immutable source run consumed by reconcile or verify"
|
|
68
|
+
},
|
|
69
|
+
"sourceRunPath": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"minLength": 1,
|
|
72
|
+
"description": "Path of the immutable source run authority consumed by reconcile or verify"
|
|
73
|
+
},
|
|
74
|
+
"planDigest": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"description": "SHA-256 digest of the release plan used"
|
|
77
|
+
},
|
|
78
|
+
"planPath": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"minLength": 1,
|
|
81
|
+
"description": "Immutable digest-addressed plan authority used by this run"
|
|
82
|
+
},
|
|
83
|
+
"approvalDigest": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
86
|
+
"description": "Digest of the immutable approval authority consumed by publish/reconcile"
|
|
87
|
+
},
|
|
88
|
+
"approvalPath": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"minLength": 1,
|
|
91
|
+
"description": "Immutable digest-addressed approval authority consumed by publish/reconcile"
|
|
92
|
+
},
|
|
93
|
+
"startedAt": {
|
|
94
|
+
"type": "string",
|
|
95
|
+
"format": "date-time",
|
|
96
|
+
"description": "ISO 8601 timestamp when the run started"
|
|
97
|
+
},
|
|
98
|
+
"finishedAt": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"format": "date-time",
|
|
101
|
+
"description": "ISO 8601 timestamp when the run finished"
|
|
102
|
+
},
|
|
103
|
+
"checkpoints": {
|
|
104
|
+
"type": "array",
|
|
105
|
+
"items": {
|
|
106
|
+
"type": "object",
|
|
107
|
+
"required": [
|
|
108
|
+
"actionId",
|
|
109
|
+
"actionType",
|
|
110
|
+
"status"
|
|
111
|
+
],
|
|
112
|
+
"additionalProperties": false,
|
|
113
|
+
"properties": {
|
|
114
|
+
"actionId": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"minLength": 1,
|
|
117
|
+
"description": "Identifier of the external action"
|
|
118
|
+
},
|
|
119
|
+
"actionType": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"enum": [
|
|
122
|
+
"push-commit",
|
|
123
|
+
"push-snapshot",
|
|
124
|
+
"create-tag",
|
|
125
|
+
"npm-publish",
|
|
126
|
+
"github-release",
|
|
127
|
+
"claude-marketplace-install",
|
|
128
|
+
"codex-marketplace-install",
|
|
129
|
+
"set-default-branch"
|
|
130
|
+
],
|
|
131
|
+
"description": "Type of external action"
|
|
132
|
+
},
|
|
133
|
+
"status": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"enum": [
|
|
136
|
+
"succeeded",
|
|
137
|
+
"failed",
|
|
138
|
+
"skipped",
|
|
139
|
+
"pending",
|
|
140
|
+
"uncertain"
|
|
141
|
+
],
|
|
142
|
+
"description": "Result status of this checkpoint (uncertain = started, result unknown)"
|
|
143
|
+
},
|
|
144
|
+
"preObserve": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"enum": [
|
|
147
|
+
"CONSISTENT",
|
|
148
|
+
"MISSING",
|
|
149
|
+
"CONFLICTING"
|
|
150
|
+
],
|
|
151
|
+
"description": "Remote state before execution"
|
|
152
|
+
},
|
|
153
|
+
"postObserve": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"enum": [
|
|
156
|
+
"CONSISTENT",
|
|
157
|
+
"MISSING",
|
|
158
|
+
"CONFLICTING"
|
|
159
|
+
],
|
|
160
|
+
"description": "Remote state after execution"
|
|
161
|
+
},
|
|
162
|
+
"startedAt": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"format": "date-time"
|
|
165
|
+
},
|
|
166
|
+
"finishedAt": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"format": "date-time"
|
|
169
|
+
},
|
|
170
|
+
"remoteRef": {
|
|
171
|
+
"type": "object",
|
|
172
|
+
"description": "Remote resource identifiers (commit, tag, version, URL)",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"properties": {
|
|
175
|
+
"commit": {
|
|
176
|
+
"type": "string"
|
|
177
|
+
},
|
|
178
|
+
"tag": {
|
|
179
|
+
"type": "string"
|
|
180
|
+
},
|
|
181
|
+
"version": {
|
|
182
|
+
"type": "string"
|
|
183
|
+
},
|
|
184
|
+
"url": {
|
|
185
|
+
"type": "string"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"error": {
|
|
190
|
+
"type": "object",
|
|
191
|
+
"description": "Error details when status is failed",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"properties": {
|
|
194
|
+
"code": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"enum": [
|
|
197
|
+
"CONFIG_INVALID",
|
|
198
|
+
"BASELINE_CHANGED",
|
|
199
|
+
"DIRTY_SCOPE_CONFLICT",
|
|
200
|
+
"GATE_FAILED",
|
|
201
|
+
"AUTH_MISSING",
|
|
202
|
+
"REMOTE_CONFLICT",
|
|
203
|
+
"HOOK_TIMEOUT",
|
|
204
|
+
"PARTIAL_RELEASE",
|
|
205
|
+
"POST_PUBLISH_VERIFY_FAILED"
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"message": {
|
|
209
|
+
"type": "string"
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
"gateResults": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"description": "Consumer verification gate results bound to this verify run",
|
|
219
|
+
"items": {
|
|
220
|
+
"type": "object",
|
|
221
|
+
"required": [
|
|
222
|
+
"id",
|
|
223
|
+
"phase",
|
|
224
|
+
"unitId",
|
|
225
|
+
"distribution",
|
|
226
|
+
"gateDigest",
|
|
227
|
+
"inputDigest",
|
|
228
|
+
"status",
|
|
229
|
+
"startedAt",
|
|
230
|
+
"finishedAt",
|
|
231
|
+
"exitCode",
|
|
232
|
+
"stdoutBytes",
|
|
233
|
+
"stdoutSha256",
|
|
234
|
+
"stderrBytes",
|
|
235
|
+
"stderrSha256"
|
|
236
|
+
],
|
|
237
|
+
"additionalProperties": false,
|
|
238
|
+
"properties": {
|
|
239
|
+
"id": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"pattern": "^[a-z0-9][a-z0-9._-]*$"
|
|
242
|
+
},
|
|
243
|
+
"phase": {
|
|
244
|
+
"const": "consumer-verify"
|
|
245
|
+
},
|
|
246
|
+
"unitId": {
|
|
247
|
+
"type": "string",
|
|
248
|
+
"minLength": 1
|
|
249
|
+
},
|
|
250
|
+
"distribution": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"enum": [
|
|
253
|
+
"npm",
|
|
254
|
+
"claude-plugin",
|
|
255
|
+
"codex-plugin"
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
"gateDigest": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
261
|
+
},
|
|
262
|
+
"inputDigest": {
|
|
263
|
+
"type": "string",
|
|
264
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
265
|
+
"description": "SHA-256 digest of the exact installed consumer tree immediately before gate execution"
|
|
266
|
+
},
|
|
267
|
+
"status": {
|
|
268
|
+
"const": "passed"
|
|
269
|
+
},
|
|
270
|
+
"startedAt": {
|
|
271
|
+
"type": "string",
|
|
272
|
+
"format": "date-time"
|
|
273
|
+
},
|
|
274
|
+
"finishedAt": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"format": "date-time"
|
|
277
|
+
},
|
|
278
|
+
"exitCode": {
|
|
279
|
+
"const": 0
|
|
280
|
+
},
|
|
281
|
+
"stdoutBytes": {
|
|
282
|
+
"type": "integer",
|
|
283
|
+
"minimum": 0
|
|
284
|
+
},
|
|
285
|
+
"stdoutSha256": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
288
|
+
},
|
|
289
|
+
"stderrBytes": {
|
|
290
|
+
"type": "integer",
|
|
291
|
+
"minimum": 0
|
|
292
|
+
},
|
|
293
|
+
"stderrSha256": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"pattern": "^[a-f0-9]{64}$"
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"allOf": [
|
|
302
|
+
{
|
|
303
|
+
"if": {
|
|
304
|
+
"properties": {
|
|
305
|
+
"command": {
|
|
306
|
+
"enum": [
|
|
307
|
+
"reconcile",
|
|
308
|
+
"verify"
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"command"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
"then": {
|
|
317
|
+
"required": [
|
|
318
|
+
"sourceRunId",
|
|
319
|
+
"sourceRunDigest",
|
|
320
|
+
"sourceRunPath"
|
|
321
|
+
]
|
|
322
|
+
}
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
"if": {
|
|
326
|
+
"properties": {
|
|
327
|
+
"stateSequence": {
|
|
328
|
+
"minimum": 1
|
|
329
|
+
}
|
|
330
|
+
},
|
|
331
|
+
"required": [
|
|
332
|
+
"stateSequence"
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
"then": {
|
|
336
|
+
"required": [
|
|
337
|
+
"previousStateDigest"
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
]
|
|
342
|
+
}
|
|
@@ -3,6 +3,13 @@ name: release-assess
|
|
|
3
3
|
description: Identify project topology and evaluate gaps in public documentation, configuration, supply chain, and release workflow against target state
|
|
4
4
|
---
|
|
5
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_ENTRY=PLUGIN_ROOT/bin/release-skill.mjs`,对入口执行 `realpath` containment、`lstat` 非符号链接且为普通文件校验。
|
|
10
|
+
> 每一次 shell 工具调用都必须在同一个调用中用上述已验证绝对值设置 `RELEASE_SKILL_ENTRY`,然后执行 `node "$RELEASE_SKILL_ENTRY" ...`;不得依赖前一次 shell 的变量。
|
|
11
|
+
>
|
|
12
|
+
|
|
6
13
|
# release-assess
|
|
7
14
|
|
|
8
15
|
## 触发
|
|
@@ -23,16 +30,15 @@ description: Identify project topology and evaluate gaps in public documentation
|
|
|
23
30
|
|
|
24
31
|
## 正向执行路径
|
|
25
32
|
|
|
26
|
-
1.
|
|
27
|
-
2.
|
|
28
|
-
3.
|
|
29
|
-
4.
|
|
30
|
-
5. 若 `NEEDS_INPUT`,根据报告补充配置后重跑,使用最新输出作为唯一证据
|
|
33
|
+
1. 使用插件根相对路径运行 CLI:`node "$RELEASE_SKILL_ENTRY" assess --root <path> --offline --json`
|
|
34
|
+
2. 检查 exit code:0 = 成功,非 0 = 根据错误码处理
|
|
35
|
+
3. 读取 JSON 报告中的 `status` 字段(`ASSESSED` / `NEEDS_INPUT` / `BLOCKED`)
|
|
36
|
+
4. 若 `NEEDS_INPUT`,根据报告补充配置后重跑,使用最新输出作为唯一证据
|
|
31
37
|
|
|
32
38
|
## 确定性脚本调用
|
|
33
39
|
|
|
34
40
|
```bash
|
|
35
|
-
"$
|
|
41
|
+
node "$RELEASE_SKILL_ENTRY" assess --root <path> --offline --json
|
|
36
42
|
# 输出到文件: 加 --output <report-path>
|
|
37
43
|
```
|
|
38
44
|
|
|
@@ -3,6 +3,13 @@ name: release-help
|
|
|
3
3
|
description: "Discoverable entry point for release-skill: dependency and environment checks, capability overview, minimal examples, read-only diagnosis, dry-run guidance, and failure triage"
|
|
4
4
|
---
|
|
5
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_ENTRY=PLUGIN_ROOT/bin/release-skill.mjs`,对入口执行 `realpath` containment、`lstat` 非符号链接且为普通文件校验。
|
|
10
|
+
> 每一次 shell 工具调用都必须在同一个调用中用上述已验证绝对值设置 `RELEASE_SKILL_ENTRY`,然后执行 `node "$RELEASE_SKILL_ENTRY" ...`;不得依赖前一次 shell 的变量。
|
|
11
|
+
>
|
|
12
|
+
|
|
6
13
|
# release-help
|
|
7
14
|
|
|
8
15
|
## 触发
|
|
@@ -23,25 +30,18 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
23
30
|
|
|
24
31
|
## 正向执行路径
|
|
25
32
|
|
|
26
|
-
1.
|
|
27
|
-
2.
|
|
28
|
-
3.
|
|
29
|
-
4.
|
|
30
|
-
5. 默认在审阅本地计划和快照后停止;只有用户明确要求且完成摘要审批时才路由到 `release-publish`
|
|
33
|
+
1. 使用插件根相对路径运行 CLI:`node "$RELEASE_SKILL_ENTRY" help --json`
|
|
34
|
+
2. 检查 `readiness.localPreparation`;需要生产发布时再检查 `readiness.productionPublish`
|
|
35
|
+
3. 若环境就绪且缺少 `.release-skill/project.yaml`,先路由 `release-setup`;配置已存在才运行 `release-assess`
|
|
36
|
+
4. 默认在审阅本地计划和快照后停止;只有用户明确要求且完成摘要审批时才路由到 `release-publish`
|
|
31
37
|
|
|
32
38
|
## 确定性脚本调用
|
|
33
39
|
|
|
34
40
|
```bash
|
|
35
|
-
#
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
# 从源码 checkout 运行
|
|
41
|
-
RELEASE_SKILL_HOME=/path/to/release-skill
|
|
42
|
-
node "$RELEASE_SKILL_HOME/packages/release-skill/bin/release-skill.mjs" help --json
|
|
43
|
-
node "$RELEASE_SKILL_HOME/packages/release-skill/bin/release-skill.mjs" setup --root <path> --json
|
|
44
|
-
node "$RELEASE_SKILL_HOME/packages/release-skill/bin/release-skill.mjs" assess --root <path> --offline --json
|
|
41
|
+
# 从插件根运行(自包含 bundle,无需 node_modules)
|
|
42
|
+
node "$RELEASE_SKILL_ENTRY" help --json
|
|
43
|
+
node "$RELEASE_SKILL_ENTRY" setup --root <path> --json
|
|
44
|
+
node "$RELEASE_SKILL_ENTRY" assess --root <path> --offline --json
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
## 故障路由
|
|
@@ -53,11 +53,11 @@ node "$RELEASE_SKILL_HOME/packages/release-skill/bin/release-skill.mjs" assess -
|
|
|
53
53
|
| pnpm 未安装 | 不影响本地准备;仅出现在 recommendations 中 |
|
|
54
54
|
| npm/gh 未安装 | 本地准备仍可就绪,但 `readiness.productionPublish.status` 为 `NOT_READY` |
|
|
55
55
|
| npm/gh 已安装 | 生产状态仍为 `AUTH_CHECK_REQUIRED`;发布前验证 `gh auth`、Git HTTPS credential 和 npm auth |
|
|
56
|
-
| CLI 入口不存在 |
|
|
56
|
+
| CLI 入口不存在 | 确认 `$RELEASE_SKILL_ENTRY` 存在;不存在时重新安装插件 |
|
|
57
57
|
| 项目配置不存在 | 路由 `release-setup`,默认只读;不得直接生成或覆盖 README/配置 |
|
|
58
|
-
| assess 失败 | 运行 `node "$
|
|
58
|
+
| assess 失败 | 运行 `node "$RELEASE_SKILL_ENTRY" assess --offline --json` 获取详情 |
|
|
59
59
|
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound 基线;人工审阅后再路由 `release-publish` |
|
|
60
60
|
|
|
61
61
|
## 后续引导
|
|
62
62
|
|
|
63
|
-
本地准备就绪后下一步运行 `release-assess
|
|
63
|
+
本地准备就绪后下一步运行 `release-assess`:`node "$RELEASE_SKILL_ENTRY" assess`。生产发布还要求 npm、gh 可用,并在发布前另行完成认证检查。
|
|
@@ -3,6 +3,13 @@ name: release-prepare
|
|
|
3
3
|
description: Freeze an immutable release plan with local configuration, documentation, snapshot builds, leakage scans, and gate evaluations — release-skill itself makes no external writes, but user-configured hooks may produce arbitrary local/remote side effects
|
|
4
4
|
---
|
|
5
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_ENTRY=PLUGIN_ROOT/bin/release-skill.mjs`,对入口执行 `realpath` containment、`lstat` 非符号链接且为普通文件校验。
|
|
10
|
+
> 每一次 shell 工具调用都必须在同一个调用中用上述已验证绝对值设置 `RELEASE_SKILL_ENTRY`,然后执行 `node "$RELEASE_SKILL_ENTRY" ...`;不得依赖前一次 shell 的变量。
|
|
11
|
+
>
|
|
12
|
+
|
|
6
13
|
# release-prepare
|
|
7
14
|
|
|
8
15
|
## 触发
|
|
@@ -25,8 +32,8 @@ description: Freeze an immutable release plan with local configuration, document
|
|
|
25
32
|
|
|
26
33
|
## 正向执行路径
|
|
27
34
|
|
|
28
|
-
1.
|
|
29
|
-
2. 运行
|
|
35
|
+
1. 使用插件根相对路径运行 CLI:`CLI="node $RELEASE_SKILL_ENTRY"`
|
|
36
|
+
2. 运行 `${CLI} prepare --root <path> --offline --json`
|
|
30
37
|
3. 若遇到 hook/gate 授权门失败,分别展示命令和风险,获取授权后只增加实际需要的 `--acknowledge-hook-side-effects` / `--acknowledge-gate-side-effects`
|
|
31
38
|
4. 检查 exit code 0,读取 JSON 返回的 immutable `planPath=plans/<planDigest>.json`,再从该文件读取 `status`、`units`、`externalActions`
|
|
32
39
|
5. 向用户展示 targetVersion、externalActions、planDigest 和 planPath;后续 approve/publish 只能使用该 immutable planPath,等待确认后再 approve
|
|
@@ -48,13 +55,13 @@ prepare 后若人工继续修改 README 或任何源文件,应保留修改并
|
|
|
48
55
|
## 确定性脚本调用
|
|
49
56
|
|
|
50
57
|
```bash
|
|
51
|
-
"$
|
|
58
|
+
node "$RELEASE_SKILL_ENTRY" prepare --root <path> --offline --json
|
|
52
59
|
# 生产 happy end:bound 基线必须 online;远端目标唯一性仍由 publish 全局预检
|
|
53
|
-
"$
|
|
60
|
+
node "$RELEASE_SKILL_ENTRY" prepare --root <path> --online --production --json
|
|
54
61
|
# 项目含 hook 时需显式授权:
|
|
55
|
-
"$
|
|
62
|
+
node "$RELEASE_SKILL_ENTRY" prepare --root <path> --offline --acknowledge-hook-side-effects --json
|
|
56
63
|
# 项目含 snapshot gate 时另行显式授权:
|
|
57
|
-
"$
|
|
64
|
+
node "$RELEASE_SKILL_ENTRY" prepare --root <path> --offline --acknowledge-gate-side-effects --json
|
|
58
65
|
```
|
|
59
66
|
|
|
60
67
|
## 执行顺序
|
|
@@ -3,6 +3,13 @@ name: release-publish
|
|
|
3
3
|
description: 从已批准且摘要确认的生产计划发布冻结 Git branch/tag、npm tarball 与 GitHub Release,并执行已配置的 Claude/Codex marketplace 隔离消费者安装检查以达到 PUBLISHED;随后必须路由 release-verify 才可能达到 VERIFIED;遇到冲突或不确定远端状态时失败关闭并要求人工介入
|
|
4
4
|
---
|
|
5
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_ENTRY=PLUGIN_ROOT/bin/release-skill.mjs`,对入口执行 `realpath` containment、`lstat` 非符号链接且为普通文件校验。
|
|
10
|
+
> 每一次 shell 工具调用都必须在同一个调用中用上述已验证绝对值设置 `RELEASE_SKILL_ENTRY`,然后执行 `node "$RELEASE_SKILL_ENTRY" ...`;不得依赖前一次 shell 的变量。
|
|
11
|
+
>
|
|
12
|
+
|
|
6
13
|
# release-publish
|
|
7
14
|
|
|
8
15
|
## 触发
|
|
@@ -31,13 +38,10 @@ description: 从已批准且摘要确认的生产计划发布冻结 Git branch/t
|
|
|
31
38
|
## 确定性执行
|
|
32
39
|
|
|
33
40
|
```bash
|
|
34
|
-
"$
|
|
41
|
+
node "$RELEASE_SKILL_ENTRY" publish --root <path> --plan <plan-path> \
|
|
35
42
|
--approval <approval-path> --confirm-production <planDigest> --json
|
|
36
43
|
```
|
|
37
44
|
|
|
38
|
-
`CLI` 必须复用 `release-help` 已解析的入口:registry 已有受支持版本且 PATH 可用时
|
|
39
|
-
为 `CLI=(release-skill)`;否则为源码 checkout 的 node 数组。
|
|
40
|
-
|
|
41
45
|
执行顺序:全局只读预检 → 配置的公开分支(按三种 `branchStrategy` 执行)→ 必要时
|
|
42
46
|
单独切换默认分支 → tag → npm tarball →
|
|
43
47
|
GitHub Release → Claude/Codex marketplace 隔离安装。每步 execute 后立即 observe;
|
|
@@ -3,6 +3,13 @@ name: release-reconcile
|
|
|
3
3
|
description: Query remote actual state, handle partial publish successes, safe retries, and post-publish verification after release execution
|
|
4
4
|
---
|
|
5
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_ENTRY=PLUGIN_ROOT/bin/release-skill.mjs`,对入口执行 `realpath` containment、`lstat` 非符号链接且为普通文件校验。
|
|
10
|
+
> 每一次 shell 工具调用都必须在同一个调用中用上述已验证绝对值设置 `RELEASE_SKILL_ENTRY`,然后执行 `node "$RELEASE_SKILL_ENTRY" ...`;不得依赖前一次 shell 的变量。
|
|
11
|
+
>
|
|
12
|
+
|
|
6
13
|
# release-reconcile
|
|
7
14
|
|
|
8
15
|
## 触发
|
|
@@ -29,8 +36,8 @@ marketplace 隔离消费者 checkpoint,但只恢复到 `PUBLISHED`;最终 np
|
|
|
29
36
|
|
|
30
37
|
## 正向执行路径
|
|
31
38
|
|
|
32
|
-
1.
|
|
33
|
-
2. 运行 `"$
|
|
39
|
+
1. 使用插件根相对路径运行 CLI,确认有 `--run` 路径(必需),且源 run 状态为 `PARTIAL`
|
|
40
|
+
2. 运行 `node "$RELEASE_SKILL_ENTRY" reconcile --root <path> --plan <plan-path> --run <run-path> --json`
|
|
34
41
|
3. 检查 exit code 和结构化状态:`PUBLISHED`(恢复完成,待 verify)/ `PARTIAL`(需重试)/ `BLOCKED`(需人工决策)
|
|
35
42
|
4. 若 PARTIAL 且需重试,加 `--approval`;生产计划还必须加 `--confirm-production <planDigest>`
|
|
36
43
|
|
|
@@ -38,11 +45,11 @@ marketplace 隔离消费者 checkpoint,但只恢复到 `PUBLISHED`;最终 np
|
|
|
38
45
|
|
|
39
46
|
```bash
|
|
40
47
|
# reconcile
|
|
41
|
-
"$
|
|
48
|
+
node "$RELEASE_SKILL_ENTRY" reconcile --root <path> --plan <plan-path> --run <run-path> --json
|
|
42
49
|
# verify
|
|
43
|
-
"$
|
|
50
|
+
node "$RELEASE_SKILL_ENTRY" verify --root <path> --plan <plan-path> --run <reconcile-run-path> --json
|
|
44
51
|
# 重试(需 --approval)
|
|
45
|
-
"$
|
|
52
|
+
node "$RELEASE_SKILL_ENTRY" reconcile --root <path> --plan <plan-path> --run <run-path> --approval <approval-path> --confirm-production <planDigest> --json
|
|
46
53
|
```
|
|
47
54
|
|
|
48
55
|
## 幂等跳过逻辑
|