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
@@ -55,9 +55,9 @@ import { digestBytes, publishFileOrReplace, readFileStrict, withTemporaryWorkspa
55
55
  import { canonicalJson } from '../core/digest.mjs';
56
56
 
57
57
  export const FOUNDATION_PACKAGES = Object.freeze({
58
- 'skill-family-contracts': '0.13.0',
59
- 'skill-family-engineering-kit': '0.13.0',
60
- 'skill-family-harness-node': '0.13.0',
58
+ 'skill-family-contracts': '0.14.0',
59
+ 'skill-family-engineering-kit': '0.14.0',
60
+ 'skill-family-harness-node': '0.14.0',
61
61
  });
62
62
 
63
63
  export const BINDING_RECORD_PATH = 'bin/foundation-resource-binding.json';
@@ -295,6 +295,19 @@ export async function computeFoundationProjection({ pkgRoot, bundleContent }) {
295
295
  continue;
296
296
  }
297
297
  }
298
+ // Foundation 0.14 keeps this example behind a capability-selection
299
+ // branch that esbuild removes from the release-skill bundle. The
300
+ // source scanner still sees the directory URL in the marked module,
301
+ // so admit this one exact directory only when its path survives in
302
+ // the built bundle.
303
+ if (
304
+ pkg === 'skill-family-engineering-kit'
305
+ && toPosix(relative(packages[pkg].root, sourceDir)) === 'data/examples/minimal-plugin-payload'
306
+ && !bundleContent.includes('data/examples/minimal-plugin-payload')
307
+ ) {
308
+ scopeOf(targetPosix);
309
+ continue;
310
+ }
298
311
  const files = await walkTree(sourceDir, `${pkg} directory read "${rel}"`);
299
312
  const members = [];
300
313
  for (const file of files) {
@@ -13,6 +13,138 @@
13
13
  "kind": {
14
14
  "const": "skill-family.migration-manifest"
15
15
  },
16
+ "capabilityUseContext": {
17
+ "type": "object",
18
+ "additionalProperties": false,
19
+ "required": ["scope", "locale"],
20
+ "properties": {
21
+ "scope": {
22
+ "type": "string",
23
+ "enum": ["contracts", "harness", "engineering-kit", "profile", "all"]
24
+ },
25
+ "locale": {
26
+ "type": "string",
27
+ "enum": ["en", "zh-CN"]
28
+ }
29
+ }
30
+ },
31
+ "capabilityUses": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "maxItems": 200,
35
+ "items": {
36
+ "type": "object",
37
+ "additionalProperties": false,
38
+ "required": ["useId", "problemStatement", "constraints", "retainedGuarantees"],
39
+ "properties": {
40
+ "useId": {
41
+ "type": "string",
42
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
43
+ "maxLength": 80
44
+ },
45
+ "problemStatement": {
46
+ "allOf": [
47
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
48
+ { "type": "string", "maxLength": 1000 }
49
+ ]
50
+ },
51
+ "constraints": {
52
+ "type": "array",
53
+ "maxItems": 20,
54
+ "uniqueItems": true,
55
+ "items": {
56
+ "allOf": [
57
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
58
+ { "type": "string", "maxLength": 500 }
59
+ ]
60
+ }
61
+ },
62
+ "retainedGuarantees": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "maxItems": 20,
66
+ "uniqueItems": true,
67
+ "items": {
68
+ "allOf": [
69
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
70
+ { "type": "string", "maxLength": 500 }
71
+ ]
72
+ }
73
+ },
74
+ "catalogFilters": {
75
+ "type": "array",
76
+ "maxItems": 20,
77
+ "uniqueItems": true,
78
+ "items": {
79
+ "allOf": [
80
+ { "$ref": "#/$defs/trimmedCapabilityUseText" },
81
+ { "type": "string", "maxLength": 200 }
82
+ ]
83
+ }
84
+ }
85
+ }
86
+ }
87
+ },
88
+ "capabilityDecisions": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "additionalProperties": false,
93
+ "required": ["useId", "disposition", "reason"],
94
+ "properties": {
95
+ "useId": {
96
+ "type": "string",
97
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
98
+ "maxLength": 80
99
+ },
100
+ "disposition": {
101
+ "type": "string",
102
+ "enum": ["direct-adoption", "compatibility-layer", "keep-business", "foundation-gap"]
103
+ },
104
+ "targetCapability": {
105
+ "type": "string",
106
+ "pattern": "^foundation\\.[a-z0-9\\-]+(\\.[a-z0-9\\-]+)+$"
107
+ },
108
+ "reason": {
109
+ "type": "string",
110
+ "minLength": 1,
111
+ "maxLength": 1000
112
+ }
113
+ },
114
+ "allOf": [
115
+ {
116
+ "if": {
117
+ "required": ["disposition"],
118
+ "properties": {
119
+ "disposition": {
120
+ "enum": ["direct-adoption", "compatibility-layer"]
121
+ }
122
+ }
123
+ },
124
+ "then": {
125
+ "required": ["targetCapability"],
126
+ "properties": { "targetCapability": { "type": "string" } }
127
+ }
128
+ },
129
+ {
130
+ "if": {
131
+ "required": ["disposition"],
132
+ "properties": {
133
+ "disposition": {
134
+ "enum": ["keep-business", "foundation-gap"]
135
+ }
136
+ }
137
+ },
138
+ "then": {
139
+ "not": {
140
+ "required": ["targetCapability"],
141
+ "properties": { "targetCapability": { "type": "string" } }
142
+ }
143
+ }
144
+ }
145
+ ]
146
+ }
147
+ },
16
148
  "manifestVersion": {
17
149
  "type": "integer",
18
150
  "minimum": 1,
@@ -31,11 +163,34 @@
31
163
  "description": "Relative POSIX path of one legacy implementation. Shape only: absolute paths, traversal, UNC/drive forms and symlink escapes are rejected by harness containment at assessment time, fail-closed."
32
164
  },
33
165
  "replacedBy": {
34
- "type": "string",
35
- "minLength": 1,
166
+ "oneOf": [
167
+ { "type": "string", "minLength": 1 },
168
+ { "type": "null" }
169
+ ],
36
170
  "description": "The replacement facility (tool/command/module) that supersedes this legacy entry. An empty replacement is never a valid exit claim."
171
+ },
172
+ "useId": {
173
+ "type": "string",
174
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
175
+ "maxLength": 80
176
+ },
177
+ "recoveryRef": {
178
+ "type": "string",
179
+ "minLength": 1
37
180
  }
38
- }
181
+ },
182
+ "allOf": [
183
+ {
184
+ "if": {
185
+ "required": ["replacedBy"],
186
+ "properties": { "replacedBy": { "type": "null" } }
187
+ },
188
+ "then": {
189
+ "required": ["useId"],
190
+ "properties": { "useId": { "type": "string" } }
191
+ }
192
+ }
193
+ ]
39
194
  }
40
195
  },
41
196
  "legacyReferences": {
@@ -57,11 +212,30 @@
57
212
  "description": "Exact literal text that must be absent from the file. No regex; byte-exact UTF-8 match."
58
213
  },
59
214
  "replacedBy": {
60
- "type": "string",
61
- "minLength": 1,
215
+ "oneOf": [
216
+ { "type": "string", "minLength": 1 },
217
+ { "type": "null" }
218
+ ],
62
219
  "description": "The replacement facility that supersedes this old reference. Empty is never valid."
220
+ },
221
+ "useId": {
222
+ "type": "string",
223
+ "pattern": "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
224
+ "maxLength": 80
63
225
  }
64
- }
226
+ },
227
+ "allOf": [
228
+ {
229
+ "if": {
230
+ "required": ["replacedBy"],
231
+ "properties": { "replacedBy": { "type": "null" } }
232
+ },
233
+ "then": {
234
+ "required": ["useId"],
235
+ "properties": { "useId": { "type": "string" } }
236
+ }
237
+ }
238
+ ]
65
239
  }
66
240
  },
67
241
  "exceptions": {
@@ -144,5 +318,95 @@
144
318
  }
145
319
  }
146
320
  }
147
- }
321
+ },
322
+ "$defs": {
323
+ "trimmedCapabilityUseText": {
324
+ "type": "string",
325
+ "minLength": 1,
326
+ "pattern": "^(?!\\s)(?![\\s\\S]*\\s$)(?![\\s\\S]*\\u0000)[\\s\\S]+$"
327
+ }
328
+ },
329
+ "allOf": [
330
+ {
331
+ "if": {
332
+ "required": ["capabilityUses"],
333
+ "properties": { "capabilityUses": { "type": "array" } }
334
+ },
335
+ "then": {
336
+ "required": ["capabilityUseContext"],
337
+ "properties": { "capabilityUseContext": { "type": "object" } }
338
+ },
339
+ "else": {
340
+ "not": {
341
+ "anyOf": [
342
+ {
343
+ "required": ["capabilityUseContext"],
344
+ "properties": { "capabilityUseContext": { "type": "object" } }
345
+ },
346
+ {
347
+ "required": ["capabilityDecisions"],
348
+ "properties": { "capabilityDecisions": { "type": "array" } }
349
+ }
350
+ ]
351
+ }
352
+ }
353
+ },
354
+ {
355
+ "if": {
356
+ "required": ["capabilityDecisions"],
357
+ "properties": { "capabilityDecisions": { "type": "array" } }
358
+ },
359
+ "then": {
360
+ "required": ["capabilityUses", "capabilityUseContext"],
361
+ "properties": {
362
+ "capabilityUses": { "type": "array" },
363
+ "capabilityUseContext": { "type": "object" }
364
+ }
365
+ }
366
+ },
367
+ {
368
+ "if": {
369
+ "required": ["legacyInfra"],
370
+ "properties": {
371
+ "legacyInfra": {
372
+ "type": "array",
373
+ "contains": {
374
+ "type": "object",
375
+ "required": ["useId"],
376
+ "properties": { "useId": { "type": "string" } }
377
+ }
378
+ }
379
+ }
380
+ },
381
+ "then": {
382
+ "required": ["capabilityUses", "capabilityUseContext"],
383
+ "properties": {
384
+ "capabilityUses": { "type": "array" },
385
+ "capabilityUseContext": { "type": "object" }
386
+ }
387
+ }
388
+ },
389
+ {
390
+ "if": {
391
+ "required": ["legacyReferences"],
392
+ "properties": {
393
+ "legacyReferences": {
394
+ "type": "array",
395
+ "contains": {
396
+ "type": "object",
397
+ "required": ["useId"],
398
+ "properties": { "useId": { "type": "string" } }
399
+ }
400
+ }
401
+ }
402
+ },
403
+ "then": {
404
+ "required": ["capabilityUses", "capabilityUseContext"],
405
+ "properties": {
406
+ "capabilityUses": { "type": "array" },
407
+ "capabilityUseContext": { "type": "object" }
408
+ }
409
+ }
410
+ }
411
+ ]
148
412
  }
@@ -54,6 +54,14 @@
54
54
  "stability": { "enum": ["stable", "candidate-only"] }
55
55
  }
56
56
  },
57
+ "capabilities": {
58
+ "type": "array",
59
+ "uniqueItems": true,
60
+ "items": {
61
+ "type": "string",
62
+ "pattern": "^foundation\\.[a-z0-9\\-]+(?:\\.[a-z0-9\\-]+)+$"
63
+ }
64
+ },
57
65
  "foundation_pin": {
58
66
  "type": "object",
59
67
  "additionalProperties": false,