release-skill 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +2 -2
  4. package/CHANGELOG.md +60 -0
  5. package/INSTALL.md +179 -5
  6. package/INSTALL.zh-CN.md +320 -0
  7. package/README.md +347 -67
  8. package/README.zh-CN.md +318 -59
  9. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  10. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  11. package/adapters/claude/skills/release-help/SKILL.md +7 -4
  12. package/adapters/claude/skills/release-prepare/SKILL.md +11 -1
  13. package/adapters/claude/skills/release-publish/SKILL.md +6 -3
  14. package/adapters/claude/skills/release-reconcile/SKILL.md +1 -1
  15. package/adapters/claude/skills/release-setup/SKILL.md +111 -0
  16. package/adapters/claude/skills/release-verify/SKILL.md +5 -2
  17. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  18. package/adapters/codex/skills/release-help/SKILL.md +7 -4
  19. package/adapters/codex/skills/release-prepare/SKILL.md +11 -1
  20. package/adapters/codex/skills/release-publish/SKILL.md +6 -3
  21. package/adapters/codex/skills/release-reconcile/SKILL.md +1 -1
  22. package/adapters/codex/skills/release-setup/SKILL.md +111 -0
  23. package/adapters/codex/skills/release-verify/SKILL.md +5 -2
  24. package/bin/release-skill.mjs +65 -9
  25. package/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  26. package/native/safe-write/prebuilds.json +22 -2
  27. package/native/safe-write/src/safe_write.cc +11 -2
  28. package/package.json +3 -1
  29. package/references/02-project-config.md +54 -3
  30. package/references/05-evidence-and-errors.md +6 -2
  31. package/schemas/release-plan.schema.json +550 -65
  32. package/schemas/release-project.schema.json +398 -29
  33. package/schemas/release-run.schema.json +165 -18
  34. package/skills/release-help/SKILL.md +7 -4
  35. package/skills/release-prepare/SKILL.md +11 -1
  36. package/skills/release-publish/SKILL.md +6 -3
  37. package/skills/release-reconcile/SKILL.md +1 -1
  38. package/skills/release-setup/SKILL.md +111 -0
  39. package/skills/release-verify/SKILL.md +5 -2
  40. package/skills-src/release-help/SKILL.md +7 -4
  41. package/skills-src/release-prepare/SKILL.md +11 -1
  42. package/skills-src/release-publish/SKILL.md +6 -3
  43. package/skills-src/release-reconcile/SKILL.md +1 -1
  44. package/skills-src/release-setup/SKILL.md +111 -0
  45. package/skills-src/release-verify/SKILL.md +5 -2
  46. package/src/adapters/contract.mjs +3 -0
  47. package/src/adapters/git-github.mjs +84 -2
  48. package/src/adapters/plugin-marketplace.mjs +65 -21
  49. package/src/adapters/push-snapshot.mjs +84 -17
  50. package/src/commands/prepare.mjs +223 -20
  51. package/src/commands/publish.mjs +45 -0
  52. package/src/commands/reconcile.mjs +152 -0
  53. package/src/commands/setup.mjs +886 -0
  54. package/src/commands/verify.mjs +122 -26
  55. package/src/core/config.mjs +34 -0
  56. package/src/core/errors.mjs +4 -0
  57. package/src/core/plan.mjs +123 -0
  58. package/src/core/previous-public-baseline.mjs +21 -1
  59. package/src/core/verification-gates.mjs +451 -0
  60. package/src/snapshot/frozen.mjs +89 -5
@@ -87,6 +87,21 @@
87
87
  },
88
88
  "releaseNotes": {
89
89
  "type": "string"
90
+ },
91
+ "branchStrategy": {
92
+ "type": "string",
93
+ "enum": [
94
+ "create-release-branch",
95
+ "advance-existing-branch",
96
+ "initialize-default-branch"
97
+ ]
98
+ },
99
+ "setAsDefaultBranch": {
100
+ "type": "boolean"
101
+ },
102
+ "expectedCurrentDefaultBranch": {
103
+ "type": "string",
104
+ "minLength": 1
90
105
  }
91
106
  }
92
107
  },
@@ -134,7 +149,10 @@
134
149
  },
135
150
  "access": {
136
151
  "type": "string",
137
- "enum": ["public", "restricted"]
152
+ "enum": [
153
+ "public",
154
+ "restricted"
155
+ ]
138
156
  },
139
157
  "provenance": {
140
158
  "type": "boolean"
@@ -176,7 +194,9 @@
176
194
  },
177
195
  "smokeArgs": {
178
196
  "type": "array",
179
- "items": { "type": "string" }
197
+ "items": {
198
+ "type": "string"
199
+ }
180
200
  },
181
201
  "smokeExpectedJson": {
182
202
  "type": "object"
@@ -185,29 +205,72 @@
185
205
  "allOf": [
186
206
  {
187
207
  "if": {
188
- "properties": { "type": { "const": "npm" } }
208
+ "properties": {
209
+ "type": {
210
+ "const": "npm"
211
+ }
212
+ }
189
213
  },
190
- "then": { "required": ["package", "registry", "publisher"] }
214
+ "then": {
215
+ "required": [
216
+ "package",
217
+ "registry",
218
+ "publisher"
219
+ ]
220
+ }
191
221
  },
192
222
  {
193
223
  "if": {
194
- "properties": { "type": { "enum": ["claude-plugin", "codex-plugin"] } }
224
+ "properties": {
225
+ "type": {
226
+ "enum": [
227
+ "claude-plugin",
228
+ "codex-plugin"
229
+ ]
230
+ }
231
+ }
195
232
  },
196
- "then": { "required": ["plugin", "marketplace", "entrySkill"] }
233
+ "then": {
234
+ "required": [
235
+ "plugin",
236
+ "marketplace",
237
+ "entrySkill"
238
+ ]
239
+ }
197
240
  },
198
241
  {
199
242
  "if": {
200
- "required": ["smokeExpectedJson"],
201
- "properties": { "smokeBin": { "minLength": 1 } }
243
+ "required": [
244
+ "smokeExpectedJson"
245
+ ],
246
+ "properties": {
247
+ "smokeBin": {
248
+ "minLength": 1
249
+ }
250
+ }
202
251
  },
203
- "then": { "required": ["smokeBin"] }
252
+ "then": {
253
+ "required": [
254
+ "smokeBin"
255
+ ]
256
+ }
204
257
  },
205
258
  {
206
259
  "if": {
207
- "required": ["smokeArgs"],
208
- "properties": { "smokeBin": { "minLength": 1 } }
260
+ "required": [
261
+ "smokeArgs"
262
+ ],
263
+ "properties": {
264
+ "smokeBin": {
265
+ "minLength": 1
266
+ }
267
+ }
209
268
  },
210
- "then": { "required": ["smokeBin"] }
269
+ "then": {
270
+ "required": [
271
+ "smokeBin"
272
+ ]
273
+ }
211
274
  }
212
275
  ]
213
276
  }
@@ -254,31 +317,216 @@
254
317
  },
255
318
  "previousPublicBaseline": {
256
319
  "type": "object",
257
- "required": ["mode"],
320
+ "required": [
321
+ "mode"
322
+ ],
258
323
  "additionalProperties": false,
259
324
  "properties": {
260
- "mode": { "type": "string", "enum": ["none", "bound"] },
261
- "githubHost": { "type": "string", "pattern": "^[a-zA-Z0-9.-]+$" },
262
- "repo": { "type": "string", "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$" },
263
- "ref": { "type": "string", "minLength": 1 },
264
- "commit": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
265
- "tree": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
266
- "manifestDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
325
+ "mode": {
326
+ "type": "string",
327
+ "enum": [
328
+ "none",
329
+ "bound"
330
+ ]
331
+ },
332
+ "githubHost": {
333
+ "type": "string",
334
+ "pattern": "^[a-zA-Z0-9.-]+$"
335
+ },
336
+ "repo": {
337
+ "type": "string",
338
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$"
339
+ },
340
+ "ref": {
341
+ "type": "string",
342
+ "minLength": 1
343
+ },
344
+ "commit": {
345
+ "type": "string",
346
+ "pattern": "^[a-f0-9]{40,64}$"
347
+ },
348
+ "tree": {
349
+ "type": "string",
350
+ "pattern": "^[a-f0-9]{40,64}$"
351
+ },
352
+ "manifestDigest": {
353
+ "type": "string",
354
+ "pattern": "^[a-f0-9]{64}$"
355
+ }
356
+ },
357
+ "if": {
358
+ "properties": {
359
+ "mode": {
360
+ "const": "bound"
361
+ }
362
+ }
363
+ },
364
+ "then": {
365
+ "required": [
366
+ "repo",
367
+ "ref",
368
+ "commit"
369
+ ]
267
370
  },
268
- "if": { "properties": { "mode": { "const": "bound" } } },
269
- "then": { "required": ["repo", "ref", "commit"] },
270
371
  "else": {
271
372
  "allOf": [
272
- { "not": { "required": ["repo"] } },
273
- { "not": { "required": ["githubHost"] } },
274
- { "not": { "required": ["ref"] } },
275
- { "not": { "required": ["commit"] } },
276
- { "not": { "required": ["tree"] } },
277
- { "not": { "required": ["manifestDigest"] } }
373
+ {
374
+ "not": {
375
+ "required": [
376
+ "repo"
377
+ ]
378
+ }
379
+ },
380
+ {
381
+ "not": {
382
+ "required": [
383
+ "githubHost"
384
+ ]
385
+ }
386
+ },
387
+ {
388
+ "not": {
389
+ "required": [
390
+ "ref"
391
+ ]
392
+ }
393
+ },
394
+ {
395
+ "not": {
396
+ "required": [
397
+ "commit"
398
+ ]
399
+ }
400
+ },
401
+ {
402
+ "not": {
403
+ "required": [
404
+ "tree"
405
+ ]
406
+ }
407
+ },
408
+ {
409
+ "not": {
410
+ "required": [
411
+ "manifestDigest"
412
+ ]
413
+ }
414
+ }
278
415
  ]
279
416
  }
280
417
  }
281
- }
418
+ },
419
+ "allOf": [
420
+ {
421
+ "if": {
422
+ "required": [
423
+ "production"
424
+ ],
425
+ "properties": {
426
+ "production": {
427
+ "required": [
428
+ "branchStrategy"
429
+ ],
430
+ "properties": {
431
+ "branchStrategy": {
432
+ "enum": [
433
+ "advance-existing-branch",
434
+ "initialize-default-branch"
435
+ ]
436
+ }
437
+ }
438
+ }
439
+ }
440
+ },
441
+ "then": {
442
+ "properties": {
443
+ "previousPublicBaseline": {
444
+ "properties": {
445
+ "mode": {
446
+ "const": "bound"
447
+ }
448
+ },
449
+ "required": [
450
+ "mode"
451
+ ]
452
+ }
453
+ }
454
+ }
455
+ },
456
+ {
457
+ "if": {
458
+ "required": [
459
+ "production"
460
+ ],
461
+ "properties": {
462
+ "production": {
463
+ "required": [
464
+ "branchStrategy"
465
+ ],
466
+ "properties": {
467
+ "branchStrategy": {
468
+ "const": "initialize-default-branch"
469
+ }
470
+ }
471
+ }
472
+ }
473
+ },
474
+ "then": {
475
+ "properties": {
476
+ "production": {
477
+ "required": [
478
+ "setAsDefaultBranch",
479
+ "expectedCurrentDefaultBranch"
480
+ ],
481
+ "properties": {
482
+ "setAsDefaultBranch": {
483
+ "const": true
484
+ }
485
+ }
486
+ }
487
+ }
488
+ }
489
+ },
490
+ {
491
+ "if": {
492
+ "required": [
493
+ "production"
494
+ ],
495
+ "properties": {
496
+ "production": {
497
+ "required": [
498
+ "setAsDefaultBranch"
499
+ ],
500
+ "properties": {
501
+ "setAsDefaultBranch": {
502
+ "const": true
503
+ }
504
+ }
505
+ }
506
+ }
507
+ },
508
+ "then": {
509
+ "properties": {
510
+ "production": {
511
+ "required": [
512
+ "branchStrategy"
513
+ ],
514
+ "properties": {
515
+ "branchStrategy": {
516
+ "const": "initialize-default-branch"
517
+ }
518
+ }
519
+ }
520
+ }
521
+ }
522
+ }
523
+ ]
524
+ }
525
+ },
526
+ "verificationGates": {
527
+ "type": "array",
528
+ "items": {
529
+ "$ref": "#/definitions/verificationGate"
282
530
  }
283
531
  },
284
532
  "hooks": {
@@ -354,6 +602,127 @@
354
602
  "uniqueItems": true
355
603
  }
356
604
  }
605
+ },
606
+ "verificationGate": {
607
+ "type": "object",
608
+ "required": [
609
+ "id",
610
+ "phase",
611
+ "scope",
612
+ "command",
613
+ "cwd",
614
+ "timeoutMs",
615
+ "envAllowlist"
616
+ ],
617
+ "additionalProperties": false,
618
+ "properties": {
619
+ "id": {
620
+ "type": "string",
621
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
622
+ },
623
+ "phase": {
624
+ "type": "string",
625
+ "enum": [
626
+ "snapshot-verify",
627
+ "consumer-verify"
628
+ ]
629
+ },
630
+ "scope": {
631
+ "type": "object",
632
+ "required": [
633
+ "unit"
634
+ ],
635
+ "additionalProperties": false,
636
+ "properties": {
637
+ "unit": {
638
+ "type": "string",
639
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
640
+ },
641
+ "distribution": {
642
+ "type": "string",
643
+ "enum": [
644
+ "npm",
645
+ "claude-plugin",
646
+ "codex-plugin"
647
+ ]
648
+ }
649
+ }
650
+ },
651
+ "command": {
652
+ "type": "array",
653
+ "minItems": 1,
654
+ "items": {
655
+ "type": "string"
656
+ }
657
+ },
658
+ "cwd": {
659
+ "type": "string",
660
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
661
+ },
662
+ "timeoutMs": {
663
+ "type": "integer",
664
+ "minimum": 1000,
665
+ "maximum": 7200000
666
+ },
667
+ "envAllowlist": {
668
+ "type": "array",
669
+ "items": {
670
+ "type": "string",
671
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
672
+ },
673
+ "uniqueItems": true
674
+ },
675
+ "expectedJson": {
676
+ "type": "object"
677
+ }
678
+ },
679
+ "allOf": [
680
+ {
681
+ "if": {
682
+ "properties": {
683
+ "phase": {
684
+ "const": "consumer-verify"
685
+ }
686
+ },
687
+ "required": [
688
+ "phase"
689
+ ]
690
+ },
691
+ "then": {
692
+ "properties": {
693
+ "scope": {
694
+ "required": [
695
+ "unit",
696
+ "distribution"
697
+ ]
698
+ }
699
+ }
700
+ }
701
+ },
702
+ {
703
+ "if": {
704
+ "properties": {
705
+ "phase": {
706
+ "const": "snapshot-verify"
707
+ }
708
+ },
709
+ "required": [
710
+ "phase"
711
+ ]
712
+ },
713
+ "then": {
714
+ "properties": {
715
+ "scope": {
716
+ "not": {
717
+ "required": [
718
+ "distribution"
719
+ ]
720
+ }
721
+ }
722
+ }
723
+ }
724
+ }
725
+ ]
357
726
  }
358
727
  }
359
728
  }