release-skill 0.9.3 → 0.9.5

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 (79) 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 +58 -0
  7. package/INSTALL.md +2 -2
  8. package/INSTALL.zh-CN.md +2 -2
  9. package/README.md +52 -16
  10. package/README.zh-CN.md +46 -16
  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 +7 -7
  14. package/adapters/claude/bin/foundation-resource-binding.json +1 -1
  15. package/adapters/claude/bin/release-skill.bundle.mjs +1513 -352
  16. package/adapters/claude/schemas/release-plan.schema.json +36 -0
  17. package/adapters/claude/schemas/release-project.schema.json +31 -0
  18. package/adapters/claude/skills/release-finish/SKILL.md +5 -5
  19. package/adapters/claude/skills/release-help/SKILL.md +11 -4
  20. package/adapters/claude/skills/release-prepare/SKILL.md +11 -3
  21. package/adapters/claude/skills/release-verify/SKILL.md +2 -1
  22. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  23. package/adapters/codex/bin/consumer-contract-vectors.json +7 -7
  24. package/adapters/codex/bin/foundation-resource-binding.json +1 -1
  25. package/adapters/codex/bin/release-skill.bundle.mjs +1513 -352
  26. package/adapters/codex/schemas/release-plan.schema.json +36 -0
  27. package/adapters/codex/schemas/release-project.schema.json +31 -0
  28. package/adapters/codex/skills/release-finish/SKILL.md +5 -5
  29. package/adapters/codex/skills/release-help/SKILL.md +11 -4
  30. package/adapters/codex/skills/release-prepare/SKILL.md +11 -3
  31. package/adapters/codex/skills/release-verify/SKILL.md +2 -1
  32. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  33. package/adapters/kimi/bin/consumer-contract-vectors.json +7 -7
  34. package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
  35. package/adapters/kimi/bin/release-skill.bundle.mjs +1513 -352
  36. package/adapters/kimi/schemas/release-plan.schema.json +36 -0
  37. package/adapters/kimi/schemas/release-project.schema.json +31 -0
  38. package/adapters/kimi/skills/release-finish/SKILL.md +5 -5
  39. package/adapters/kimi/skills/release-help/SKILL.md +11 -4
  40. package/adapters/kimi/skills/release-prepare/SKILL.md +11 -3
  41. package/adapters/kimi/skills/release-verify/SKILL.md +2 -1
  42. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  43. package/adapters/workbuddy/bin/consumer-contract-vectors.json +7 -7
  44. package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
  45. package/adapters/workbuddy/bin/release-skill.bundle.mjs +1513 -352
  46. package/adapters/workbuddy/schemas/release-plan.schema.json +36 -0
  47. package/adapters/workbuddy/schemas/release-project.schema.json +31 -0
  48. package/adapters/workbuddy/skills/release-finish/SKILL.md +5 -5
  49. package/adapters/workbuddy/skills/release-help/SKILL.md +11 -4
  50. package/adapters/workbuddy/skills/release-prepare/SKILL.md +11 -3
  51. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -1
  52. package/bin/consumer-contract-vectors.json +7 -7
  53. package/bin/foundation-resource-binding.json +1 -1
  54. package/bin/release-skill-cli.mjs +113 -22
  55. package/bin/release-skill.bundle.mjs +1513 -352
  56. package/package.json +4 -4
  57. package/platform-manifest.json +4 -4
  58. package/references/.render-manifest.json +4 -4
  59. package/references/01-state-machine.md +18 -0
  60. package/references/02-project-config.md +20 -0
  61. package/schemas/release-plan.schema.json +36 -0
  62. package/schemas/release-project.schema.json +31 -0
  63. package/skills/release-finish/SKILL.md +5 -5
  64. package/skills/release-help/SKILL.md +11 -4
  65. package/skills/release-prepare/SKILL.md +11 -3
  66. package/skills/release-verify/SKILL.md +2 -1
  67. package/skills-src/release-finish/SKILL.md +5 -5
  68. package/skills-src/release-help/SKILL.md +11 -4
  69. package/skills-src/release-prepare/SKILL.md +11 -3
  70. package/skills-src/release-verify/SKILL.md +2 -1
  71. package/src/commands/post-release-local.mjs +373 -26
  72. package/src/commands/prepare.mjs +361 -16
  73. package/src/commands/ship.mjs +190 -13
  74. package/src/commands/verify.mjs +175 -2
  75. package/src/core/foundation-plugin-verification.mjs +22 -2
  76. package/src/core/plan.mjs +45 -1
  77. package/src/platforms/registry.mjs +97 -0
  78. package/src/producers/foundation-resource-projection.mjs +3 -3
  79. package/src/readme/contract.mjs +23 -3
@@ -438,6 +438,103 @@ export function getPlatform(id) {
438
438
  return platform;
439
439
  }
440
440
 
441
+ const STANDALONE_SHA_RE = /^[0-9a-f]{40}$/u;
442
+
443
+ function standaloneIdentityCore(platformOrId, fields) {
444
+ const platform = typeof platformOrId === 'string' ? getPlatform(platformOrId) : platformOrId;
445
+ const id = platform?.id;
446
+ if (id !== 'claude' && id !== 'codex') {
447
+ throw new Error(`standalone-index install identity is unsupported for platform "${id ?? '<unknown>'}"`);
448
+ }
449
+ const { name, source, version } = fields;
450
+ if (typeof name !== 'string' || name.length === 0
451
+ || !source || typeof source !== 'object' || Array.isArray(source)
452
+ || typeof source.source !== 'string'
453
+ || typeof source.ref !== 'string' || source.ref.length === 0
454
+ || typeof source.sha !== 'string' || !STANDALONE_SHA_RE.test(source.sha)) {
455
+ throw new Error(`${id} standalone-index install identity has invalid owned fields`);
456
+ }
457
+ if (id === 'claude') {
458
+ if (source.source !== 'github' || typeof source.repo !== 'string' || source.repo.length === 0
459
+ || typeof version !== 'string' || version.length === 0) {
460
+ throw new Error('Claude standalone-index install identity requires github repo, ref, sha, and version');
461
+ }
462
+ return {
463
+ name,
464
+ source: { source: 'github', repo: source.repo, ref: source.ref, sha: source.sha },
465
+ version,
466
+ };
467
+ }
468
+ if (source.source !== 'url' || typeof source.url !== 'string' || source.url.length === 0) {
469
+ throw new Error('Codex standalone-index install identity requires url, ref, and sha');
470
+ }
471
+ return {
472
+ name,
473
+ source: { source: 'url', url: source.url, ref: source.ref, sha: source.sha },
474
+ };
475
+ }
476
+
477
+ /** Build the expected install identity from the frozen plugin contract. */
478
+ export function buildExpectedStandaloneIndexInstallIdentity(platformOrId, frozenIdentity = {}) {
479
+ const platform = typeof platformOrId === 'string' ? getPlatform(platformOrId) : platformOrId;
480
+ const id = platform?.id;
481
+ const { name, repo, tag, sha, version } = frozenIdentity;
482
+ if (typeof repo !== 'string' || repo.length === 0 || typeof tag !== 'string' || tag.length === 0) {
483
+ throw new Error('standalone-index expected identity requires a plugin repository and tag');
484
+ }
485
+ if (id === 'claude') {
486
+ return standaloneIdentityCore(platform, {
487
+ name,
488
+ version,
489
+ source: { source: 'github', repo, ref: tag, sha },
490
+ });
491
+ }
492
+ if (id === 'codex') {
493
+ return standaloneIdentityCore(platform, {
494
+ name,
495
+ source: { source: 'url', url: `https://github.com/${repo}.git`, ref: `refs/tags/${tag}`, sha },
496
+ });
497
+ }
498
+ return standaloneIdentityCore(platform, { name, source: {}, version });
499
+ }
500
+
501
+ /** Project only the actual remote entry; frozen plan fields are never accepted. */
502
+ export function projectObservedStandaloneIndexInstallIdentity(platformOrId, entry) {
503
+ const platform = typeof platformOrId === 'string' ? getPlatform(platformOrId) : platformOrId;
504
+ const id = platform?.id;
505
+ if (!entry || typeof entry !== 'object' || Array.isArray(entry)) {
506
+ throw new Error('standalone-index observed identity requires an entry object');
507
+ }
508
+ const source = entry.source;
509
+ if (!source || typeof source !== 'object' || Array.isArray(source)) {
510
+ throw new Error('standalone-index observed identity requires a source object');
511
+ }
512
+ if (id === 'claude') {
513
+ return standaloneIdentityCore(platform, {
514
+ name: entry.name,
515
+ version: entry.version,
516
+ source: {
517
+ source: source.source,
518
+ repo: source.repo,
519
+ ref: source.ref,
520
+ sha: source.sha,
521
+ },
522
+ });
523
+ }
524
+ if (id === 'codex') {
525
+ return standaloneIdentityCore(platform, {
526
+ name: entry.name,
527
+ source: {
528
+ source: source.source,
529
+ url: source.url,
530
+ ref: source.ref,
531
+ sha: source.sha,
532
+ },
533
+ });
534
+ }
535
+ return standaloneIdentityCore(platform, { name: entry.name, source });
536
+ }
537
+
441
538
  /**
442
539
  * Resolve a declared skill projection surface to its public host name.
443
540
  * The host is always derived from the descriptor's authoritative
@@ -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.15.0',
59
- 'skill-family-engineering-kit': '0.15.0',
60
- 'skill-family-harness-node': '0.15.0',
58
+ 'skill-family-contracts': '0.16.0',
59
+ 'skill-family-engineering-kit': '0.16.0',
60
+ 'skill-family-harness-node': '0.16.0',
61
61
  });
62
62
 
63
63
  export const BINDING_RECORD_PATH = 'bin/foundation-resource-binding.json';
@@ -169,6 +169,28 @@ function findSkillNames(content, manifestSkillNames) {
169
169
  return manifestSkillNames.filter((name) => content.includes(name));
170
170
  }
171
171
 
172
+ /**
173
+ * Determine whether README content contains a supported installation command.
174
+ *
175
+ * npm and npx remain compatible with the original whole-document check. The
176
+ * platform plugin commands are checked only inside Markdown code so that a
177
+ * marketplace-source explanation cannot be mistaken for an installation.
178
+ * @param {string} content
179
+ * @returns {boolean}
180
+ */
181
+ function hasInstallCommand(content) {
182
+ if (/npm\s+install|npx\s+release-skill|npm\s+i\s+release-skill/i.test(content)) {
183
+ return true;
184
+ }
185
+
186
+ const codeBlocks = [
187
+ ...[...content.matchAll(/```[^\n]*\n([\s\S]*?)```/g)].map((match) => match[1]),
188
+ ...[...content.matchAll(/`([^`\n]+)`/g)].map((match) => match[1]),
189
+ ];
190
+ const pluginInstall = /^(?:[$>]\s*)?(?:codex\s+plugin\s+add|claude\s+plugin\s+install)\s+\S+/i;
191
+ return codeBlocks.some((block) => block.split('\n').some((line) => pluginInstall.test(line.trim())));
192
+ }
193
+
172
194
  // ---------------------------------------------------------------------------
173
195
  // Public API
174
196
  // ---------------------------------------------------------------------------
@@ -250,9 +272,7 @@ export async function evaluateReadme({ snapshotDir, pluginManifest }) {
250
272
 
251
273
  // Readability checks: installation, minimal example, failure diagnosis
252
274
  const readabilityChecks = {
253
- hasInstall: enContent
254
- ? /npm\s+install|npx\s+release-skill|npm\s+i\s+release-skill/i.test(enContent)
255
- : false,
275
+ hasInstall: enContent ? hasInstallCommand(enContent) : false,
256
276
  hasMinimalExample: enContent
257
277
  ? /```[\s\S]*?(release-skill|assess|prepare|help)[\s\S]*?```/i.test(enContent)
258
278
  : false,