release-skill 0.1.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 (125) hide show
  1. package/.agents/plugins/marketplace.json +23 -0
  2. package/.claude-plugin/marketplace.json +16 -0
  3. package/.claude-plugin/plugin.json +10 -0
  4. package/.codex-plugin/plugin.json +26 -0
  5. package/CHANGELOG.md +68 -0
  6. package/CODE_OF_CONDUCT.md +76 -0
  7. package/CONTRIBUTING.md +49 -0
  8. package/INSTALL.md +182 -0
  9. package/LICENSE +21 -0
  10. package/NOTICE +25 -0
  11. package/README.md +501 -0
  12. package/README.zh-CN.md +463 -0
  13. package/SECURITY.md +48 -0
  14. package/adapters/claude/.claude-plugin/marketplace.json +16 -0
  15. package/adapters/claude/.claude-plugin/plugin.json +10 -0
  16. package/adapters/claude/skills/release-assess/SKILL.md +52 -0
  17. package/adapters/claude/skills/release-help/SKILL.md +60 -0
  18. package/adapters/claude/skills/release-prepare/SKILL.md +71 -0
  19. package/adapters/claude/skills/release-publish/SKILL.md +55 -0
  20. package/adapters/claude/skills/release-reconcile/SKILL.md +73 -0
  21. package/adapters/claude/skills/release-verify/SKILL.md +70 -0
  22. package/adapters/codex/.codex-plugin/plugin.json +26 -0
  23. package/adapters/codex/skills/release-assess/SKILL.md +52 -0
  24. package/adapters/codex/skills/release-help/SKILL.md +60 -0
  25. package/adapters/codex/skills/release-prepare/SKILL.md +71 -0
  26. package/adapters/codex/skills/release-publish/SKILL.md +55 -0
  27. package/adapters/codex/skills/release-reconcile/SKILL.md +73 -0
  28. package/adapters/codex/skills/release-verify/SKILL.md +70 -0
  29. package/bin/release-skill.mjs +743 -0
  30. package/native/safe-write/binding.gyp +40 -0
  31. package/native/safe-write/prebuilds.json +4 -0
  32. package/native/safe-write/src/safe_write.cc +2023 -0
  33. package/package.json +75 -0
  34. package/references/.render-manifest.json +33 -0
  35. package/references/00-target-state.md +124 -0
  36. package/references/01-state-machine.md +155 -0
  37. package/references/02-project-config.md +217 -0
  38. package/references/03-readme-quality.md +136 -0
  39. package/references/04-supply-chain.md +147 -0
  40. package/references/05-evidence-and-errors.md +164 -0
  41. package/references/06-adapter-contract.md +178 -0
  42. package/schemas/.render-manifest.json +37 -0
  43. package/schemas/approval-record.schema.json +115 -0
  44. package/schemas/artifact-lock.schema.json +111 -0
  45. package/schemas/artifact-plan.schema.json +52 -0
  46. package/schemas/artifact-policy.schema.json +76 -0
  47. package/schemas/evidence-event.schema.json +89 -0
  48. package/schemas/release-plan.schema.json +369 -0
  49. package/schemas/release-project.schema.json +359 -0
  50. package/schemas/release-run.schema.json +195 -0
  51. package/skills/release-assess/SKILL.md +52 -0
  52. package/skills/release-help/SKILL.md +60 -0
  53. package/skills/release-prepare/SKILL.md +71 -0
  54. package/skills/release-publish/SKILL.md +55 -0
  55. package/skills/release-reconcile/SKILL.md +73 -0
  56. package/skills/release-verify/SKILL.md +70 -0
  57. package/skills-src/release-assess/SKILL.md +52 -0
  58. package/skills-src/release-help/SKILL.md +60 -0
  59. package/skills-src/release-prepare/SKILL.md +71 -0
  60. package/skills-src/release-publish/SKILL.md +55 -0
  61. package/skills-src/release-reconcile/SKILL.md +73 -0
  62. package/skills-src/release-verify/SKILL.md +70 -0
  63. package/src/adapters/contract.mjs +214 -0
  64. package/src/adapters/git-github.mjs +214 -0
  65. package/src/adapters/npm.mjs +947 -0
  66. package/src/adapters/plugin-marketplace.mjs +1365 -0
  67. package/src/adapters/push-snapshot.mjs +216 -0
  68. package/src/artifacts/adoption.mjs +743 -0
  69. package/src/artifacts/artifact-plan.mjs +162 -0
  70. package/src/artifacts/entry.mjs +240 -0
  71. package/src/artifacts/git-authority.mjs +637 -0
  72. package/src/artifacts/graph.mjs +189 -0
  73. package/src/artifacts/inspect.mjs +520 -0
  74. package/src/artifacts/inventory.mjs +192 -0
  75. package/src/artifacts/merge/binary.mjs +77 -0
  76. package/src/artifacts/merge/entry-merge.mjs +228 -0
  77. package/src/artifacts/merge/json.mjs +641 -0
  78. package/src/artifacts/merge/markdown.mjs +246 -0
  79. package/src/artifacts/merge/regions.mjs +156 -0
  80. package/src/artifacts/merge/text.mjs +432 -0
  81. package/src/artifacts/merge/tree.mjs +202 -0
  82. package/src/artifacts/merge/yaml.mjs +669 -0
  83. package/src/artifacts/path-key.mjs +94 -0
  84. package/src/artifacts/policy.mjs +319 -0
  85. package/src/artifacts/producer-registry.mjs +439 -0
  86. package/src/artifacts/project-lock.mjs +732 -0
  87. package/src/artifacts/resolution.mjs +658 -0
  88. package/src/artifacts/safe-fs-backend-internal.mjs +680 -0
  89. package/src/artifacts/safe-fs.mjs +72 -0
  90. package/src/artifacts/state.mjs +495 -0
  91. package/src/artifacts/transaction-journal.mjs +983 -0
  92. package/src/artifacts/transaction.mjs +1361 -0
  93. package/src/commands/approve.mjs +280 -0
  94. package/src/commands/artifacts.mjs +627 -0
  95. package/src/commands/assess.mjs +838 -0
  96. package/src/commands/prepare.mjs +1377 -0
  97. package/src/commands/publish.mjs +883 -0
  98. package/src/commands/reconcile.mjs +1255 -0
  99. package/src/commands/verify.mjs +915 -0
  100. package/src/core/approval.mjs +332 -0
  101. package/src/core/baseline.mjs +272 -0
  102. package/src/core/blackbox-hard-gates.mjs +142 -0
  103. package/src/core/config.mjs +448 -0
  104. package/src/core/digest.mjs +90 -0
  105. package/src/core/errors.mjs +113 -0
  106. package/src/core/evidence.mjs +167 -0
  107. package/src/core/hooks.mjs +241 -0
  108. package/src/core/node-version.mjs +64 -0
  109. package/src/core/plan.mjs +735 -0
  110. package/src/core/previous-public-baseline.mjs +204 -0
  111. package/src/core/run.mjs +681 -0
  112. package/src/core/state-machine.mjs +76 -0
  113. package/src/core/version-consistency.mjs +111 -0
  114. package/src/producers/build-adapters.mjs +231 -0
  115. package/src/producers/render-public-assets.mjs +152 -0
  116. package/src/producers/sync-skills.mjs +96 -0
  117. package/src/readme/contract.mjs +297 -0
  118. package/src/readme/examples.mjs +288 -0
  119. package/src/readme/parity.mjs +122 -0
  120. package/src/snapshot/export.mjs +99 -0
  121. package/src/snapshot/frozen.mjs +401 -0
  122. package/src/snapshot/manifest.mjs +207 -0
  123. package/src/snapshot/public-map.mjs +1459 -0
  124. package/src/snapshot/public-path.mjs +110 -0
  125. package/src/snapshot/scan.mjs +419 -0
@@ -0,0 +1,115 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/schemas/approval-record/v1",
4
+ "title": "Approval Record",
5
+ "description": "Schema for human approval record bound to a frozen release plan",
6
+ "type": "object",
7
+ "required": [
8
+ "planDigest",
9
+ "baseline",
10
+ "approvedActions",
11
+ "actor",
12
+ "approvedAt",
13
+ "expiresAt"
14
+ ],
15
+ "anyOf": [
16
+ { "required": ["targetVersion"] },
17
+ { "required": ["unitVersions"] }
18
+ ],
19
+ "additionalProperties": false,
20
+ "properties": {
21
+ "planDigest": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "description": "SHA-256 digest of the frozen release plan"
25
+ },
26
+ "baseline": {
27
+ "type": "object",
28
+ "required": ["gitTreeHash"],
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "gitTreeHash": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "description": "Git tree hash at plan freeze time"
35
+ },
36
+ "workspaceDigest": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "description": "Deterministic digest of workspace file state at plan freeze time"
40
+ },
41
+ "workspaceDigestAlgorithm": {
42
+ "type": "string",
43
+ "const": "git-workspace-v2",
44
+ "description": "Versioned algorithm authority for workspaceDigest"
45
+ }
46
+ }
47
+ },
48
+ "targetVersion": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "description": "Target release version approved"
52
+ },
53
+ "unitVersions": {
54
+ "type": "object",
55
+ "minProperties": 1,
56
+ "additionalProperties": {
57
+ "type": "string",
58
+ "minLength": 1
59
+ },
60
+ "description": "Exact unit-id to target-version authority for multi-unit releases"
61
+ },
62
+ "approvedActions": {
63
+ "type": "array",
64
+ "minItems": 1,
65
+ "items": {
66
+ "type": "string",
67
+ "minLength": 1
68
+ },
69
+ "uniqueItems": true,
70
+ "description": "List of approved external actions (no wildcards)"
71
+ },
72
+ "actor": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "Identity of the approver"
76
+ },
77
+ "approvedAt": {
78
+ "type": "string",
79
+ "format": "date-time",
80
+ "description": "ISO 8601 timestamp when approval was granted"
81
+ },
82
+ "expiresAt": {
83
+ "type": "string",
84
+ "format": "date-time",
85
+ "description": "ISO 8601 timestamp when approval expires (max 24h after approvedAt)"
86
+ },
87
+ "exceptions": {
88
+ "type": "array",
89
+ "items": {
90
+ "type": "object",
91
+ "required": ["rule", "reason", "responsible", "expiresAt"],
92
+ "additionalProperties": false,
93
+ "properties": {
94
+ "rule": {
95
+ "type": "string",
96
+ "minLength": 1
97
+ },
98
+ "reason": {
99
+ "type": "string",
100
+ "minLength": 1
101
+ },
102
+ "responsible": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ },
106
+ "expiresAt": {
107
+ "type": "string",
108
+ "format": "date-time"
109
+ }
110
+ }
111
+ },
112
+ "description": "Exception waivers with reason, responsible person, and expiration"
113
+ }
114
+ }
115
+ }
@@ -0,0 +1,111 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/artifact-lock.schema.json",
4
+ "title": "ArtifactLock",
5
+ "description": "Reachable accepted artifact manifest. Absolute repository paths are never authoritative.",
6
+ "type": "object",
7
+ "required": [
8
+ "lockVersion",
9
+ "repositoryId",
10
+ "repositoryIdentity",
11
+ "policyDigest",
12
+ "acceptanceId",
13
+ "acceptedArtifactManifestDigest",
14
+ "entries",
15
+ "acceptedAt",
16
+ "acceptedBy"
17
+ ],
18
+ "additionalProperties": false,
19
+ "properties": {
20
+ "apiVersion": {
21
+ "type": "string",
22
+ "const": "release-skill.dev/artifact-lock/v1"
23
+ },
24
+ "lockVersion": {
25
+ "type": "integer",
26
+ "const": 1
27
+ },
28
+ "repositoryId": {
29
+ "type": "string",
30
+ "minLength": 1
31
+ },
32
+ "repositoryIdentity": {
33
+ "type": "object",
34
+ "required": ["remoteUrlHash"],
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "remoteUrlHash": {
38
+ "type": "string",
39
+ "pattern": "^sha256:[a-f0-9]{64}$"
40
+ }
41
+ }
42
+ },
43
+ "policyDigest": {
44
+ "type": "string",
45
+ "pattern": "^sha256:[a-f0-9]{64}$"
46
+ },
47
+ "acceptanceId": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ },
51
+ "acceptedArtifactManifestDigest": {
52
+ "type": "string",
53
+ "pattern": "^sha256:[a-f0-9]{64}$"
54
+ },
55
+ "entries": {
56
+ "type": "object",
57
+ "minProperties": 1,
58
+ "additionalProperties": {
59
+ "type": "object",
60
+ "required": ["path", "type", "mode", "gitOid", "sha256"],
61
+ "additionalProperties": false,
62
+ "properties": {
63
+ "path": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "type": {
68
+ "type": "string",
69
+ "enum": ["blob", "tree"]
70
+ },
71
+ "mode": {
72
+ "type": "string",
73
+ "pattern": "^(100644|100755|040000)$"
74
+ },
75
+ "gitOid": {
76
+ "type": "string",
77
+ "pattern": "^[a-f0-9]{40,64}$"
78
+ },
79
+ "sha256": {
80
+ "type": "string",
81
+ "pattern": "^(sha256:)?[a-f0-9]{64}$"
82
+ },
83
+ "size": {
84
+ "type": "integer",
85
+ "minimum": 0
86
+ },
87
+ "manifestDigest": {
88
+ "type": "string",
89
+ "pattern": "^sha256:[a-f0-9]{64}$"
90
+ },
91
+ "ownership": {
92
+ "type": "string",
93
+ "enum": ["human", "generated", "mixed"]
94
+ },
95
+ "mergeDriver": {
96
+ "type": "string",
97
+ "minLength": 1
98
+ }
99
+ }
100
+ }
101
+ },
102
+ "acceptedAt": {
103
+ "type": "string",
104
+ "format": "date-time"
105
+ },
106
+ "acceptedBy": {
107
+ "type": "string",
108
+ "minLength": 1
109
+ }
110
+ }
111
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/artifact-plan.schema.json",
4
+ "title": "ArtifactPlan",
5
+ "description": "Read-only inspection plan for artifact state and next action.",
6
+ "type": "object",
7
+ "required": [
8
+ "apiVersion",
9
+ "operation",
10
+ "bindings",
11
+ "artifacts",
12
+ "safeToWrite",
13
+ "targetUnchanged",
14
+ "nextAction",
15
+ "planDigest"
16
+ ],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "apiVersion": { "type": "string", "const": "release-skill.dev/artifact-plan/v1" },
20
+ "operation": { "type": "string", "enum": ["inspect", "init", "status"] },
21
+ "bindings": {
22
+ "type": "object",
23
+ "required": [
24
+ "repositoryIdentity",
25
+ "policyDigest",
26
+ "baseManifestDigest",
27
+ "currentManifestDigest",
28
+ "producerClosureDigest"
29
+ ],
30
+ "additionalProperties": false,
31
+ "properties": {
32
+ "repositoryIdentity": { "type": "string" },
33
+ "policyDigest": { "type": "string" },
34
+ "baseManifestDigest": { "type": "string" },
35
+ "currentManifestDigest": { "type": "string" },
36
+ "producerClosureDigest": { "type": "string" }
37
+ }
38
+ },
39
+ "artifacts": { "type": "array" },
40
+ "safeToWrite": { "type": "boolean" },
41
+ "targetUnchanged": { "type": "boolean" },
42
+ "nextAction": {
43
+ "type": "object",
44
+ "required": ["command"],
45
+ "additionalProperties": false,
46
+ "properties": {
47
+ "command": { "type": "string" }
48
+ }
49
+ },
50
+ "planDigest": { "type": "string" }
51
+ }
52
+ }
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/artifact-policy.schema.json",
4
+ "title": "ArtifactPolicy",
5
+ "description": "Closed-world artifact policy defining repository identity, inventory, and artifact definitions.",
6
+ "type": "object",
7
+ "required": ["repository", "inventory", "artifacts"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "repository": {
11
+ "type": "object",
12
+ "required": ["id"],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "id": { "type": "string", "minLength": 1 }
16
+ }
17
+ },
18
+ "inventory": {
19
+ "type": "object",
20
+ "required": ["roots", "defaultOwnership"],
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "roots": {
24
+ "type": "array",
25
+ "items": { "type": "string", "minLength": 1 },
26
+ "minItems": 1
27
+ },
28
+ "defaultOwnership": { "type": "string", "enum": ["human", "generated"] }
29
+ }
30
+ },
31
+ "artifacts": {
32
+ "type": "array",
33
+ "minItems": 1,
34
+ "items": {
35
+ "type": "object",
36
+ "required": ["id", "type"],
37
+ "properties": {
38
+ "id": { "type": "string", "minLength": 1 },
39
+ "type": { "type": "string", "enum": ["declared", "generated"] },
40
+ "sourcePath": { "type": "string" },
41
+ "ownership": { "type": "string", "enum": ["human", "generated"] },
42
+ "producer": { "type": "string", "minLength": 1 },
43
+ "sourceArtifacts": {
44
+ "type": "array",
45
+ "items": { "type": "string", "minLength": 1 },
46
+ "minItems": 1
47
+ },
48
+ "adoptionRoutes": {
49
+ "type": "array",
50
+ "items": {
51
+ "type": "object",
52
+ "required": ["target", "sourceArtifact", "mode"],
53
+ "additionalProperties": false,
54
+ "properties": {
55
+ "target": { "type": "string", "minLength": 1 },
56
+ "sourceArtifact": { "type": "string", "minLength": 1 },
57
+ "mode": { "type": "string", "enum": ["exact-copy"] }
58
+ }
59
+ },
60
+ "minItems": 1
61
+ }
62
+ },
63
+ "oneOf": [
64
+ {
65
+ "properties": { "type": { "const": "declared" } },
66
+ "required": ["sourcePath"]
67
+ },
68
+ {
69
+ "properties": { "type": { "const": "generated" } },
70
+ "required": ["producer", "sourceArtifacts", "adoptionRoutes"]
71
+ }
72
+ ]
73
+ }
74
+ }
75
+ }
76
+ }
@@ -0,0 +1,89 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/schemas/evidence-event/v1",
4
+ "title": "Evidence Event",
5
+ "description": "Schema for JSONL evidence events produced during release execution",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "runId",
10
+ "sequence",
11
+ "timestamp",
12
+ "command",
13
+ "phase",
14
+ "status"
15
+ ],
16
+ "additionalProperties": false,
17
+ "properties": {
18
+ "schemaVersion": {
19
+ "type": "integer",
20
+ "const": 1,
21
+ "description": "Event format version"
22
+ },
23
+ "runId": {
24
+ "type": "string",
25
+ "minLength": 1,
26
+ "description": "Unique identifier for the run (UUID)"
27
+ },
28
+ "sequence": {
29
+ "type": "integer",
30
+ "minimum": 1,
31
+ "description": "Event sequence number within the run, starting from 1"
32
+ },
33
+ "timestamp": {
34
+ "type": "string",
35
+ "format": "date-time",
36
+ "description": "ISO 8601 UTC timestamp of the event"
37
+ },
38
+ "command": {
39
+ "type": "string",
40
+ "enum": ["assess", "prepare", "publish", "reconcile", "verify"],
41
+ "description": "The command that triggered this event"
42
+ },
43
+ "phase": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "description": "Current execution phase identifier"
47
+ },
48
+ "status": {
49
+ "type": "string",
50
+ "enum": ["started", "succeeded", "failed", "skipped"],
51
+ "description": "Status value of this event"
52
+ },
53
+ "error": {
54
+ "type": ["object", "null"],
55
+ "description": "Error details when status is failed",
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "code": {
59
+ "type": "string",
60
+ "enum": [
61
+ "CONFIG_INVALID",
62
+ "BASELINE_CHANGED",
63
+ "DIRTY_SCOPE_CONFLICT",
64
+ "GATE_FAILED",
65
+ "AUTH_MISSING",
66
+ "REMOTE_CONFLICT",
67
+ "HOOK_TIMEOUT",
68
+ "PARTIAL_RELEASE",
69
+ "POST_PUBLISH_VERIFY_FAILED"
70
+ ],
71
+ "description": "Stable error code"
72
+ },
73
+ "message": {
74
+ "type": "string",
75
+ "description": "Human-readable error message"
76
+ }
77
+ }
78
+ },
79
+ "duration": {
80
+ "type": "integer",
81
+ "minimum": 0,
82
+ "description": "Phase duration in milliseconds"
83
+ },
84
+ "details": {
85
+ "type": "object",
86
+ "description": "Phase-specific supplementary information"
87
+ }
88
+ }
89
+ }