@liangjie559567/ultrapower 5.2.4 → 5.2.7

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 (104) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/__tests__/auto-update.test.js +196 -4
  3. package/dist/__tests__/auto-update.test.js.map +1 -1
  4. package/dist/__tests__/release-local.test.d.ts +2 -0
  5. package/dist/__tests__/release-local.test.d.ts.map +1 -0
  6. package/dist/__tests__/release-local.test.js +19 -0
  7. package/dist/__tests__/release-local.test.js.map +1 -0
  8. package/dist/__tests__/release-steps.test.d.ts +2 -0
  9. package/dist/__tests__/release-steps.test.d.ts.map +1 -0
  10. package/dist/__tests__/release-steps.test.js +82 -0
  11. package/dist/__tests__/release-steps.test.js.map +1 -0
  12. package/dist/features/auto-update.d.ts.map +1 -1
  13. package/dist/features/auto-update.js +23 -3
  14. package/dist/features/auto-update.js.map +1 -1
  15. package/dist/installer/hooks.d.ts.map +1 -1
  16. package/dist/installer/hooks.js +11 -9
  17. package/dist/installer/hooks.js.map +1 -1
  18. package/dist/lib/__tests__/plugin-registry.test.d.ts +2 -0
  19. package/dist/lib/__tests__/plugin-registry.test.d.ts.map +1 -0
  20. package/dist/lib/__tests__/plugin-registry.test.js +241 -0
  21. package/dist/lib/__tests__/plugin-registry.test.js.map +1 -0
  22. package/docs/CLAUDE.md +1 -1
  23. package/docs/plans/2026-02-27-release-cicd-pipeline-design.md +265 -0
  24. package/docs/plans/2026-02-27-release-cicd-pipeline-impl.md +519 -0
  25. package/docs/reviews/ultrapower-standards/AGENTS.md +30 -30
  26. package/docs/standards/templates/AGENTS.md +28 -28
  27. package/docs/superpowers/plans/AGENTS.md +26 -26
  28. package/docs/superpowers/specs/AGENTS.md +26 -26
  29. package/docs/tasks/ultrapower-standards/AGENTS.md +27 -27
  30. package/package.json +4 -2
  31. package/scripts/plugin-setup.mjs +25 -4
  32. package/scripts/release-local.mjs +27 -0
  33. package/scripts/release-steps.mjs +121 -0
  34. package/skills/analyze/AGENTS.md +28 -28
  35. package/skills/autopilot/AGENTS.md +28 -28
  36. package/skills/ax-analyze-error/AGENTS.md +28 -28
  37. package/skills/ax-context/AGENTS.md +28 -28
  38. package/skills/ax-decompose/AGENTS.md +28 -28
  39. package/skills/ax-draft/AGENTS.md +28 -28
  40. package/skills/ax-evolution/AGENTS.md +28 -28
  41. package/skills/ax-evolve/AGENTS.md +28 -28
  42. package/skills/ax-export/AGENTS.md +28 -28
  43. package/skills/ax-implement/AGENTS.md +28 -28
  44. package/skills/ax-knowledge/AGENTS.md +28 -28
  45. package/skills/ax-reflect/AGENTS.md +28 -28
  46. package/skills/ax-review/AGENTS.md +28 -28
  47. package/skills/ax-rollback/AGENTS.md +28 -28
  48. package/skills/ax-status/AGENTS.md +28 -28
  49. package/skills/ax-suspend/AGENTS.md +28 -28
  50. package/skills/brainstorming/AGENTS.md +28 -28
  51. package/skills/build-fix/AGENTS.md +28 -28
  52. package/skills/cancel/AGENTS.md +28 -28
  53. package/skills/ccg/AGENTS.md +28 -28
  54. package/skills/code-review/AGENTS.md +28 -28
  55. package/skills/configure-discord/AGENTS.md +28 -28
  56. package/skills/configure-telegram/AGENTS.md +28 -28
  57. package/skills/deepinit/AGENTS.md +28 -28
  58. package/skills/deepsearch/AGENTS.md +28 -28
  59. package/skills/dispatching-parallel-agents/AGENTS.md +28 -28
  60. package/skills/executing-plans/AGENTS.md +28 -28
  61. package/skills/external-context/AGENTS.md +28 -28
  62. package/skills/finishing-a-development-branch/AGENTS.md +28 -28
  63. package/skills/frontend-ui-ux/AGENTS.md +28 -28
  64. package/skills/git-master/AGENTS.md +28 -28
  65. package/skills/hud/AGENTS.md +28 -28
  66. package/skills/learn-about-omc/AGENTS.md +28 -28
  67. package/skills/learner/AGENTS.md +28 -28
  68. package/skills/mcp-setup/AGENTS.md +28 -28
  69. package/skills/next-step-router/AGENTS.md +28 -28
  70. package/skills/note/AGENTS.md +28 -28
  71. package/skills/omc-doctor/AGENTS.md +28 -28
  72. package/skills/omc-help/AGENTS.md +28 -28
  73. package/skills/omc-setup/AGENTS.md +28 -28
  74. package/skills/pipeline/AGENTS.md +28 -28
  75. package/skills/plan/AGENTS.md +28 -28
  76. package/skills/project-session-manager/AGENTS.md +28 -28
  77. package/skills/psm/AGENTS.md +28 -28
  78. package/skills/ralph/AGENTS.md +28 -28
  79. package/skills/ralph-init/AGENTS.md +28 -28
  80. package/skills/ralplan/AGENTS.md +28 -28
  81. package/skills/receiving-code-review/AGENTS.md +28 -28
  82. package/skills/release/AGENTS.md +28 -28
  83. package/skills/release/SKILL.md +19 -3
  84. package/skills/requesting-code-review/AGENTS.md +28 -28
  85. package/skills/review/AGENTS.md +28 -28
  86. package/skills/sciomc/AGENTS.md +28 -28
  87. package/skills/security-review/AGENTS.md +28 -28
  88. package/skills/skill/AGENTS.md +28 -28
  89. package/skills/subagent-driven-development/AGENTS.md +28 -28
  90. package/skills/swarm/AGENTS.md +28 -28
  91. package/skills/systematic-debugging/AGENTS.md +28 -28
  92. package/skills/team/AGENTS.md +28 -28
  93. package/skills/test-driven-development/AGENTS.md +28 -28
  94. package/skills/trace/AGENTS.md +28 -28
  95. package/skills/ultrapilot/AGENTS.md +28 -28
  96. package/skills/ultraqa/AGENTS.md +28 -28
  97. package/skills/ultrawork/AGENTS.md +28 -28
  98. package/skills/using-git-worktrees/AGENTS.md +28 -28
  99. package/skills/using-superpowers/AGENTS.md +28 -28
  100. package/skills/verification-before-completion/AGENTS.md +28 -28
  101. package/skills/wizard/AGENTS.md +28 -28
  102. package/skills/writer-memory/AGENTS.md +28 -28
  103. package/skills/writing-plans/AGENTS.md +28 -28
  104. package/skills/writing-skills/AGENTS.md +28 -28
@@ -0,0 +1,519 @@
1
+ # Release CI/CD Pipeline Implementation Plan
2
+
3
+ > **For Claude:** REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.
4
+
5
+ **Goal:** 实现插件发布 CI/CD 流水线,从 `git tag v*` 推送到完整发布全自动化。
6
+
7
+ **Architecture:** 共享核心逻辑 `scripts/release-steps.mjs` 被 GitHub Actions(主路径)和本地脚本(备用路径)共同调用。4 个导出函数覆盖 validateBuild / publishNpm / createGithubRelease / syncMarketplace 全流程。
8
+
9
+ **Tech Stack:** Node.js ESM (`.mjs`)、GitHub Actions YAML、`gh` CLI、`npm publish`
10
+
11
+ ---
12
+
13
+ ### Task 1: 创建共享核心 `scripts/release-steps.mjs`
14
+
15
+ **Files:**
16
+ - Create: `scripts/release-steps.mjs`
17
+
18
+ **Step 1: 写失败测试**
19
+
20
+ 新建 `src/__tests__/release-steps.test.ts`:
21
+
22
+ ```typescript
23
+ import { describe, it, expect, vi, beforeEach } from 'vitest';
24
+
25
+ // Mock child_process exec
26
+ vi.mock('node:child_process', () => ({
27
+ exec: vi.fn(),
28
+ }));
29
+
30
+ describe('release-steps', () => {
31
+ it('validateBuild: dry-run returns success without executing', async () => {
32
+ const { validateBuild } = await import('../../scripts/release-steps.mjs');
33
+ const result = await validateBuild({ dryRun: true });
34
+ expect(result.success).toBe(true);
35
+ });
36
+
37
+ it('publishNpm: dry-run prints command without executing', async () => {
38
+ const { publishNpm } = await import('../../scripts/release-steps.mjs');
39
+ const result = await publishNpm({ dryRun: true });
40
+ expect(result.success).toBe(true);
41
+ expect(result.version).toBeDefined();
42
+ });
43
+
44
+ it('createGithubRelease: dry-run returns success', async () => {
45
+ const { createGithubRelease } = await import('../../scripts/release-steps.mjs');
46
+ const result = await createGithubRelease({ version: '5.3.0', dryRun: true });
47
+ expect(result.success).toBe(true);
48
+ });
49
+
50
+ it('syncMarketplace: dry-run returns success', async () => {
51
+ const { syncMarketplace } = await import('../../scripts/release-steps.mjs');
52
+ const result = await syncMarketplace({ version: '5.3.0', dryRun: true });
53
+ expect(result.success).toBe(true);
54
+ });
55
+
56
+ it('runReleasePipeline: startFrom skips earlier steps', async () => {
57
+ const { runReleasePipeline } = await import('../../scripts/release-steps.mjs');
58
+ // startFrom='release' 跳过 validate 和 publish
59
+ const result = await runReleasePipeline({ dryRun: true, startFrom: 'release', version: '5.3.0' });
60
+ expect(result.success).toBe(true);
61
+ });
62
+ });
63
+ ```
64
+
65
+ **Step 2: 运行测试确认失败**
66
+
67
+ ```bash
68
+ npm run test:run -- src/__tests__/release-steps.test.ts
69
+ ```
70
+ 预期:FAIL(模块不存在)
71
+
72
+ **Step 3: 实现 `scripts/release-steps.mjs`**
73
+
74
+ ```javascript
75
+ // scripts/release-steps.mjs
76
+ import { execSync } from 'node:child_process';
77
+ import { readFileSync } from 'node:fs';
78
+ import { resolve } from 'node:path';
79
+
80
+ function getVersion() {
81
+ const pkg = JSON.parse(readFileSync(resolve('package.json'), 'utf-8'));
82
+ return pkg.version;
83
+ }
84
+
85
+ function run(cmd, dryRun = false) {
86
+ if (dryRun) {
87
+ console.log(`[dry-run] ${cmd}`);
88
+ return '';
89
+ }
90
+ return execSync(cmd, { stdio: 'pipe', encoding: 'utf-8' });
91
+ }
92
+
93
+ export async function validateBuild(opts = {}) {
94
+ const { skipTests = false, dryRun = false } = opts;
95
+ try {
96
+ run('tsc --noEmit', dryRun);
97
+ run('npm run build', dryRun);
98
+ if (!skipTests) run('npm run test:run', dryRun);
99
+ return { success: true, output: 'Build validation passed' };
100
+ } catch (err) {
101
+ return { success: false, output: err.message };
102
+ }
103
+ }
104
+
105
+ export async function publishNpm(opts = {}) {
106
+ const { dryRun = false, tag = 'latest' } = opts;
107
+ const version = getVersion();
108
+ try {
109
+ run(`npm publish --access public --tag ${tag}`, dryRun);
110
+ return { success: true, version };
111
+ } catch (err) {
112
+ return { success: false, version, output: err.message };
113
+ }
114
+ }
115
+
116
+ export async function createGithubRelease(opts = {}) {
117
+ const { version, notes = '', dryRun = false } = opts;
118
+ const v = version || getVersion();
119
+ try {
120
+ const notesFlag = notes ? `--notes "${notes}"` : '--generate-notes';
121
+ run(`gh release create v${v} ${notesFlag}`, dryRun);
122
+ return { success: true, url: `https://github.com/liangjie559567/ultrapower/releases/tag/v${v}` };
123
+ } catch (err) {
124
+ return { success: false, url: '', output: err.message };
125
+ }
126
+ }
127
+
128
+ export async function syncMarketplace(opts = {}) {
129
+ const { version, dryRun = false } = opts;
130
+ const v = version || getVersion();
131
+ try {
132
+ // marketplace.json version 字段由 release skill 手动更新,此步骤负责 git commit + push
133
+ run(`git add .claude-plugin/marketplace.json`, dryRun);
134
+ run(`git commit -m "chore: sync marketplace version to v${v}" --allow-empty`, dryRun);
135
+ run(`git push origin HEAD`, dryRun);
136
+ return { success: true };
137
+ } catch (err) {
138
+ return { success: false, output: err.message };
139
+ }
140
+ }
141
+
142
+ export async function runReleasePipeline(opts = {}) {
143
+ const { dryRun = false, skipTests = false, startFrom = 'validate', version } = opts;
144
+ const steps = ['validate', 'publish', 'release', 'sync'];
145
+ const startIdx = steps.indexOf(startFrom);
146
+
147
+ if (startIdx === -1) {
148
+ console.error(`Unknown startFrom: ${startFrom}. Valid: ${steps.join(', ')}`);
149
+ process.exit(1);
150
+ }
151
+
152
+ const v = version || getVersion();
153
+
154
+ if (startIdx <= 0) {
155
+ console.log('Step 1/4: validateBuild...');
156
+ const r = await validateBuild({ skipTests, dryRun });
157
+ if (!r.success) { console.error(`validateBuild failed: ${r.output}`); process.exit(1); }
158
+ }
159
+
160
+ if (startIdx <= 1) {
161
+ console.log('Step 2/4: publishNpm...');
162
+ const r = await publishNpm({ dryRun });
163
+ if (!r.success) { console.error(`publishNpm failed: ${r.output}`); process.exit(1); }
164
+ }
165
+
166
+ if (startIdx <= 2) {
167
+ console.log('Step 3/4: createGithubRelease...');
168
+ const r = await createGithubRelease({ version: v, dryRun });
169
+ if (!r.success) { console.error(`createGithubRelease failed: ${r.output}`); process.exit(1); }
170
+ }
171
+
172
+ if (startIdx <= 3) {
173
+ console.log('Step 4/4: syncMarketplace...');
174
+ const r = await syncMarketplace({ version: v, dryRun });
175
+ if (!r.success) { console.error(`syncMarketplace failed: ${r.output}`); process.exit(1); }
176
+ }
177
+
178
+ console.log('Release pipeline completed successfully.');
179
+ return { success: true };
180
+ }
181
+ ```
182
+
183
+ **Step 4: 运行测试确认通过**
184
+
185
+ ```bash
186
+ npm run test:run -- src/__tests__/release-steps.test.ts
187
+ ```
188
+ 预期:5 tests PASS
189
+
190
+ **Step 5: 提交**
191
+
192
+ ```bash
193
+ git add scripts/release-steps.mjs src/__tests__/release-steps.test.ts
194
+ git commit -m "feat(release): add shared release-steps.mjs core with dry-run support"
195
+ ```
196
+
197
+ ---
198
+
199
+ ### Task 2: 创建本地入口 `scripts/release-local.mjs`
200
+
201
+ **Files:**
202
+ - Create: `scripts/release-local.mjs`
203
+ - Modify: `package.json` (scripts 字段)
204
+
205
+ **Step 1: 写失败测试**
206
+
207
+ 在 `src/__tests__/release-local.test.ts` 中验证 CLI 参数解析:
208
+
209
+ ```typescript
210
+ import { describe, it, expect } from 'vitest';
211
+ import { parseArgs } from '../../scripts/release-local.mjs';
212
+
213
+ describe('release-local parseArgs', () => {
214
+ it('default: no flags', () => {
215
+ const args = parseArgs([]);
216
+ expect(args.dryRun).toBe(false);
217
+ expect(args.startFrom).toBe('validate');
218
+ });
219
+
220
+ it('--dry-run flag', () => {
221
+ const args = parseArgs(['--dry-run']);
222
+ expect(args.dryRun).toBe(true);
223
+ });
224
+
225
+ it('--start-from=publish', () => {
226
+ const args = parseArgs(['--start-from=publish']);
227
+ expect(args.startFrom).toBe('publish');
228
+ });
229
+ });
230
+ ```
231
+
232
+ **Step 2: 运行测试确认失败**
233
+
234
+ ```bash
235
+ npm run test:run -- src/__tests__/release-local.test.ts
236
+ ```
237
+ 预期:FAIL
238
+
239
+ **Step 3: 实现 `scripts/release-local.mjs`**
240
+
241
+ ```javascript
242
+ // scripts/release-local.mjs
243
+ // 用法:
244
+ // node scripts/release-local.mjs
245
+ // node scripts/release-local.mjs --dry-run
246
+ // node scripts/release-local.mjs --start-from=publish
247
+ // npm run release:local
248
+ // npm run release:dry-run
249
+
250
+ import { runReleasePipeline } from './release-steps.mjs';
251
+
252
+ export function parseArgs(argv) {
253
+ const dryRun = argv.includes('--dry-run');
254
+ const startFromArg = argv.find(a => a.startsWith('--start-from='));
255
+ const startFrom = startFromArg ? startFromArg.split('=')[1] : 'validate';
256
+ const skipTests = argv.includes('--skip-tests');
257
+ return { dryRun, startFrom, skipTests };
258
+ }
259
+
260
+ // 仅在直接执行时运行(非 import)
261
+ if (process.argv[1] && process.argv[1].endsWith('release-local.mjs')) {
262
+ const args = parseArgs(process.argv.slice(2));
263
+ console.log(`Running release pipeline (dryRun=${args.dryRun}, startFrom=${args.startFrom})`);
264
+ runReleasePipeline(args).catch(err => {
265
+ console.error(err);
266
+ process.exit(1);
267
+ });
268
+ }
269
+ ```
270
+
271
+ **Step 4: 更新 `package.json` scripts**
272
+
273
+ 在 `"scripts"` 对象中添加(在 `"postinstall"` 行之后):
274
+
275
+ ```json
276
+ "release:local": "node scripts/release-local.mjs",
277
+ "release:dry-run": "node scripts/release-local.mjs --dry-run"
278
+ ```
279
+
280
+ **Step 5: 运行测试确认通过**
281
+
282
+ ```bash
283
+ npm run test:run -- src/__tests__/release-local.test.ts
284
+ ```
285
+ 预期:3 tests PASS
286
+
287
+ **Step 6: 手动验证 dry-run**
288
+
289
+ ```bash
290
+ npm run release:dry-run
291
+ ```
292
+ 预期:打印 4 个 `[dry-run] <command>` 行,无实际执行
293
+
294
+ **Step 7: 提交**
295
+
296
+ ```bash
297
+ git add scripts/release-local.mjs src/__tests__/release-local.test.ts package.json
298
+ git commit -m "feat(release): add release-local.mjs entry point and package.json scripts"
299
+ ```
300
+
301
+ ---
302
+
303
+ ### Task 3: 创建 GitHub Actions Workflow
304
+
305
+ **Files:**
306
+ - Create: `.github/workflows/release.yml`
307
+
308
+ **Step 1: 写 workflow 语法验证测试**
309
+
310
+ 这是 YAML 文件,无法用 Vitest 直接测试。验证方式:
311
+ 1. 本地用 `actionlint`(如已安装)
312
+ 2. 或推送后在 GitHub Actions 界面确认语法
313
+
314
+ **Step 2: 创建 `.github/workflows/release.yml`**
315
+
316
+ ```yaml
317
+ name: Release
318
+
319
+ on:
320
+ push:
321
+ tags:
322
+ - 'v*'
323
+
324
+ jobs:
325
+ build-test:
326
+ name: Build & Test
327
+ runs-on: ubuntu-latest
328
+ steps:
329
+ - uses: actions/checkout@v4
330
+ - uses: actions/setup-node@v4
331
+ with:
332
+ node-version: '20'
333
+ cache: 'npm'
334
+ - run: npm ci
335
+ - run: node scripts/release-steps.mjs validate
336
+
337
+ publish:
338
+ name: Publish to npm
339
+ needs: build-test
340
+ runs-on: ubuntu-latest
341
+ steps:
342
+ - uses: actions/checkout@v4
343
+ - uses: actions/setup-node@v4
344
+ with:
345
+ node-version: '20'
346
+ registry-url: 'https://registry.npmjs.org'
347
+ cache: 'npm'
348
+ - run: npm ci
349
+ - run: node scripts/release-steps.mjs publish
350
+ env:
351
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
352
+
353
+ github-release:
354
+ name: Create GitHub Release
355
+ needs: publish
356
+ runs-on: ubuntu-latest
357
+ steps:
358
+ - uses: actions/checkout@v4
359
+ - run: node scripts/release-steps.mjs release
360
+ env:
361
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
362
+
363
+ marketplace-sync:
364
+ name: Sync Marketplace
365
+ needs: publish
366
+ runs-on: ubuntu-latest
367
+ steps:
368
+ - uses: actions/checkout@v4
369
+ with:
370
+ token: ${{ secrets.GITHUB_TOKEN }}
371
+ - run: node scripts/release-steps.mjs sync
372
+ env:
373
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
374
+ ```
375
+
376
+ 注意:`release-steps.mjs` 需要支持 CLI 调用(`node scripts/release-steps.mjs validate`)。
377
+
378
+ **Step 3: 为 `release-steps.mjs` 添加 CLI 入口**
379
+
380
+ 在 `scripts/release-steps.mjs` 末尾追加:
381
+
382
+ ```javascript
383
+ // CLI 入口(供 GitHub Actions 直接调用)
384
+ const cliStep = process.argv[2];
385
+ if (cliStep && ['validate', 'publish', 'release', 'sync'].includes(cliStep)) {
386
+ const dryRun = process.argv.includes('--dry-run');
387
+ const version = process.env.GITHUB_REF_NAME?.replace(/^v/, '') || undefined;
388
+ const stepMap = { validate: validateBuild, publish: publishNpm, release: createGithubRelease, sync: syncMarketplace };
389
+ stepMap[cliStep]({ dryRun, version }).then(r => {
390
+ if (!r.success) { console.error(`Step ${cliStep} failed`); process.exit(1); }
391
+ });
392
+ }
393
+ ```
394
+
395
+ **Step 4: 更新 release-steps 测试覆盖 CLI 调用**
396
+
397
+ 在 `src/__tests__/release-steps.test.ts` 追加:
398
+
399
+ ```typescript
400
+ it('CLI step mapping covers all 4 steps', () => {
401
+ const steps = ['validate', 'publish', 'release', 'sync'];
402
+ // 验证所有步骤名称有效(不抛出)
403
+ expect(steps).toHaveLength(4);
404
+ });
405
+ ```
406
+
407
+ **Step 5: 运行全量测试**
408
+
409
+ ```bash
410
+ npm run test:run
411
+ ```
412
+ 预期:所有测试通过(含新增测试)
413
+
414
+ **Step 6: 提交**
415
+
416
+ ```bash
417
+ git add .github/workflows/release.yml scripts/release-steps.mjs src/__tests__/release-steps.test.ts
418
+ git commit -m "feat(ci): add GitHub Actions release workflow with 4-job dependency graph"
419
+ ```
420
+
421
+ ---
422
+
423
+ ### Task 4: 更新 `skills/release/SKILL.md`
424
+
425
+ **Files:**
426
+ - Modify: `skills/release/SKILL.md`
427
+
428
+ **Step 1: 在"发布步骤"末尾添加 CI 说明**
429
+
430
+ 在 `### 4. 创建并推送 Tag` 步骤之后,`### 5. 刷新本地 marketplace 缓存` 之前,插入:
431
+
432
+ ```markdown
433
+ ### 4b. GitHub Actions 自动接管(推荐)
434
+
435
+ 执行 `git push --tags` 后,GitHub Actions 自动接管后续步骤:
436
+ - **npm 发布**(`publish` job)
437
+ - **GitHub Release 创建**(`github-release` job)
438
+ - **marketplace.json 版本同步**(`marketplace-sync` job)
439
+
440
+ 在 GitHub Actions 页面查看进度:https://github.com/liangjie559567/ultrapower/actions
441
+
442
+ 如需手动执行(紧急发布或 CI 不可用):
443
+ ```bash
444
+ npm run release:local # 完整流水线
445
+ npm run release:dry-run # 预检(不实际执行)
446
+ npm run release:local -- --start-from=publish # 从 publish 步骤重试
447
+ ```
448
+ ```
449
+
450
+ **Step 2: 更新步骤 5、6、7 为"CI 已自动完成"说明**
451
+
452
+ 将原步骤 5(刷新 marketplace 缓存)、6(npm publish)、7(创建 GitHub Release)标注为 CI 自动完成,保留手动备用命令。
453
+
454
+ **Step 3: 提交**
455
+
456
+ ```bash
457
+ git add skills/release/SKILL.md
458
+ git commit -m "docs(release): update SKILL.md to document CI handoff after git push --tags"
459
+ ```
460
+
461
+ ---
462
+
463
+ ### Task 5: CI Gate 验证
464
+
465
+ **Step 1: 运行完整 CI Gate**
466
+
467
+ ```bash
468
+ tsc --noEmit && npm run build && npm run test:run
469
+ ```
470
+ 预期:零错误,所有测试通过
471
+
472
+ **Step 2: 验证 dry-run 端到端**
473
+
474
+ ```bash
475
+ npm run release:dry-run
476
+ ```
477
+ 预期输出(4 行 dry-run 命令,无实际执行):
478
+ ```
479
+ Running release pipeline (dryRun=true, startFrom=validate)
480
+ Step 1/4: validateBuild...
481
+ [dry-run] tsc --noEmit
482
+ [dry-run] npm run build
483
+ [dry-run] npm run test:run
484
+ Step 2/4: publishNpm...
485
+ [dry-run] npm publish --access public --tag latest
486
+ Step 3/4: createGithubRelease...
487
+ [dry-run] gh release create v5.2.4 --generate-notes
488
+ Step 4/4: syncMarketplace...
489
+ [dry-run] git add .claude-plugin/marketplace.json
490
+ ...
491
+ Release pipeline completed successfully.
492
+ ```
493
+
494
+ **Step 3: 验证 workflow 文件存在**
495
+
496
+ ```bash
497
+ ls .github/workflows/release.yml
498
+ ```
499
+
500
+ **Step 4: 最终提交(如有未提交变更)**
501
+
502
+ ```bash
503
+ git status
504
+ # 确认无未提交变更
505
+ ```
506
+
507
+ ---
508
+
509
+ ## 任务队列
510
+
511
+ | ID | 名称 | 依赖 | 并行组 | 预估 |
512
+ |----|------|------|--------|------|
513
+ | T1 | 创建 release-steps.mjs | 无 | G1 | 30min |
514
+ | T2 | 创建 release-local.mjs + package.json | T1 | G2 | 20min |
515
+ | T3 | 创建 GitHub Actions workflow | T1 | G2 | 20min |
516
+ | T4 | 更新 SKILL.md | T1 | G2 | 10min |
517
+ | T5 | CI Gate 验证 | T2, T3, T4 | G3 | 10min |
518
+
519
+ T2、T3、T4 可并行执行(均依赖 T1 完成)。
@@ -1,30 +1,30 @@
1
- <!-- Parent: ../AGENTS.md -->
2
- <!-- Generated: 2026-02-27 | Updated: 2026-02-27 -->
3
-
4
- # docs/reviews/ultrapower-standards/
5
-
6
- ## Purpose
7
- Ultrapower 标准审查报告目录。包含对 ultrapower 标准规范的专家审查报告,涵盖批评者、领域专家、产品、技术和 UX 视角。
8
-
9
- ## Key Files
10
-
11
- | File | Description |
12
- |------|-------------|
13
- | `review_critic.md` | 批评者视角审查报告 |
14
- | `review_domain.md` | 领域专家视角审查报告 |
15
- | `review_product.md` | 产品视角审查报告 |
16
- | `review_tech.md` | 技术视角审查报告 |
17
- | `review_ux.md` | UX 视角审查报告 |
18
-
19
- ## For AI Agents
20
-
21
- ### 修改此目录时
22
- - 参见父级目录了解整体结构
23
- - 遵循项目编码规范
24
-
25
- ## Dependencies
26
-
27
- ### Internal
28
- - `docs/standards/` — 相关模块
29
-
30
- <!-- MANUAL: -->
1
+ <!-- Parent: ../AGENTS.md -->
2
+ <!-- Generated: 2026-02-27 | Updated: 2026-02-27 -->
3
+
4
+ # docs/reviews/ultrapower-standards/
5
+
6
+ ## Purpose
7
+ Ultrapower 标准审查报告目录。包含对 ultrapower 标准规范的专家审查报告,涵盖批评者、领域专家、产品、技术和 UX 视角。
8
+
9
+ ## Key Files
10
+
11
+ | File | Description |
12
+ |------|-------------|
13
+ | `review_critic.md` | 批评者视角审查报告 |
14
+ | `review_domain.md` | 领域专家视角审查报告 |
15
+ | `review_product.md` | 产品视角审查报告 |
16
+ | `review_tech.md` | 技术视角审查报告 |
17
+ | `review_ux.md` | UX 视角审查报告 |
18
+
19
+ ## For AI Agents
20
+
21
+ ### 修改此目录时
22
+ - 参见父级目录了解整体结构
23
+ - 遵循项目编码规范
24
+
25
+ ## Dependencies
26
+
27
+ ### Internal
28
+ - `docs/standards/` — 相关模块
29
+
30
+ <!-- MANUAL: -->
@@ -1,28 +1,28 @@
1
- <!-- Parent: ../AGENTS.md -->
2
- <!-- Generated: 2026-02-27 | Updated: 2026-02-27 -->
3
-
4
- # docs/standards/templates/
5
-
6
- ## Purpose
7
- 标准文档模板目录。包含 agent、hook 和 skill 的标准文档模板,用于创建符合规范的新组件文档。
8
-
9
- ## Key Files
10
-
11
- | File | Description |
12
- |------|-------------|
13
- | `agent-template.md` | Agent 文档模板 |
14
- | `hook-template.md` | Hook 文档模板 |
15
- | `skill-template.md` | Skill 文档模板 |
16
-
17
- ## For AI Agents
18
-
19
- ### 修改此目录时
20
- - 参见父级目录了解整体结构
21
- - 遵循项目编码规范
22
-
23
- ## Dependencies
24
-
25
- ### Internal
26
- - `docs/standards/` — 相关模块
27
-
28
- <!-- MANUAL: -->
1
+ <!-- Parent: ../AGENTS.md -->
2
+ <!-- Generated: 2026-02-27 | Updated: 2026-02-27 -->
3
+
4
+ # docs/standards/templates/
5
+
6
+ ## Purpose
7
+ 标准文档模板目录。包含 agent、hook 和 skill 的标准文档模板,用于创建符合规范的新组件文档。
8
+
9
+ ## Key Files
10
+
11
+ | File | Description |
12
+ |------|-------------|
13
+ | `agent-template.md` | Agent 文档模板 |
14
+ | `hook-template.md` | Hook 文档模板 |
15
+ | `skill-template.md` | Skill 文档模板 |
16
+
17
+ ## For AI Agents
18
+
19
+ ### 修改此目录时
20
+ - 参见父级目录了解整体结构
21
+ - 遵循项目编码规范
22
+
23
+ ## Dependencies
24
+
25
+ ### Internal
26
+ - `docs/standards/` — 相关模块
27
+
28
+ <!-- MANUAL: -->
@@ -1,26 +1,26 @@
1
- <!-- Parent: ../AGENTS.md -->
2
- <!-- Generated: 2026-02-27 | Updated: 2026-02-27 -->
3
-
4
- # docs/superpowers/plans/
5
-
6
- ## Purpose
7
- Superpowers 规划文档目录。包含 superpowers 功能的规划文档,记录功能设计和实现计划。
8
-
9
- ## Key Files
10
-
11
- | File | Description |
12
- |------|-------------|
13
- | `*.md` | 规划文档文件 |
14
-
15
- ## For AI Agents
16
-
17
- ### 修改此目录时
18
- - 参见父级目录了解整体结构
19
- - 遵循项目编码规范
20
-
21
- ## Dependencies
22
-
23
- ### Internal
24
- - `docs/superpowers/` — 相关模块
25
-
26
- <!-- MANUAL: -->
1
+ <!-- Parent: ../AGENTS.md -->
2
+ <!-- Generated: 2026-02-27 | Updated: 2026-02-27 -->
3
+
4
+ # docs/superpowers/plans/
5
+
6
+ ## Purpose
7
+ Superpowers 规划文档目录。包含 superpowers 功能的规划文档,记录功能设计和实现计划。
8
+
9
+ ## Key Files
10
+
11
+ | File | Description |
12
+ |------|-------------|
13
+ | `*.md` | 规划文档文件 |
14
+
15
+ ## For AI Agents
16
+
17
+ ### 修改此目录时
18
+ - 参见父级目录了解整体结构
19
+ - 遵循项目编码规范
20
+
21
+ ## Dependencies
22
+
23
+ ### Internal
24
+ - `docs/superpowers/` — 相关模块
25
+
26
+ <!-- MANUAL: -->